dante-1.1.19.dfsg/0000755000175000017500000000000011037370225012276 5ustar roamroamdante-1.1.19.dfsg/bin/0000755000175000017500000000000011037370225013046 5ustar roamroamdante-1.1.19.dfsg/bin/Makefile.am0000644000175000017500000000002707710740237015110 0ustar roamroambin_SCRIPTS = socksify dante-1.1.19.dfsg/bin/Makefile.in0000644000175000017500000002450210362704161015116 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bin DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/socksify.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = socksify am__installdirs = "$(DESTDIR)$(bindir)" binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ bin_SCRIPTS = socksify 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/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 socksify: $(top_builddir)/config.status $(srcdir)/socksify.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binSCRIPTS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-binSCRIPTS uninstall-info-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: dante-1.1.19.dfsg/bin/socksify.in0000755000175000017500000000536410175146322015244 0ustar roamroam#!/bin/sh - # # Copyright (c) 1997, 1998, 2001 # Inferno Nettverk A/S, Norway. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. The above copyright notice, this list of conditions and the following # disclaimer must appear in all copies of the software, derivative works # or modified versions, and any portions thereof, aswell as in all # supporting documentation. # 2. All advertising materials mentioning features or use of this software # must display the following acknowledgement: # This product includes software developed by # Inferno Nettverk A/S, Norway. # 3. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Inferno Nettverk A/S requests users of this software to return to # # Software Distribution Coordinator or sdc@inet.no # Inferno Nettverk A/S # Oslo Research Park # Gaustadalléen 21 # NO-0349 Oslo # Norway # # any improvements or extensions that they make and grant Inferno Nettverk A/S # the rights to redistribute these changes. # # $Id: socksify.in,v 1.23 2005/01/24 10:24:18 karls Exp $ #On systems where a supported preloading mechanism is used, you can #do "socksify " and will use socks without having #been relinked or recompiled. This will not work on statically linked #binaries. SOCKSIFY_PRELOAD_LIBS="@SOCKSIFY_PRELOAD_LIBS@" LIBDIR="@LIBRARY_PREFIX@" #XXX shared library name should be generated too (possibly including version) LIBRARY="${SOCKS_LIBRARY-${LIBDIR}/libdsocks.@SOLIB_POSTFIX@}" PRELOAD_SEPERATOR="@PRELOAD_SEPERATOR@" PRELOAD_POSTFIX="@PRELOAD_POSTFIX@" @PRELOAD_VARIABLE@="${LIBRARY}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${SOCKSIFY_PRELOAD_LIBS}${PRELOAD_POSTFIX:+${PRELOAD_SEPERATOR}}${PRELOAD_POSTFIX}" export @PRELOAD_VARIABLE@ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}${LIBDIR}" export LD_LIBRARY_PATH exec "$@" dante-1.1.19.dfsg/doc/0000755000175000017500000000000011037401044013035 5ustar roamroamdante-1.1.19.dfsg/doc/sockd.conf.50000644000175000017500000003315510364161023015163 0ustar roamroam.\" $Id: sockd.conf.5,v 1.71 2006/01/20 12:59:09 michaels Exp $ .\" .\" Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 .\" Inferno Nettverk A/S, Norway. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. The above copyright notice, this list of conditions and the following .\" disclaimer must appear in all copies of the software, derivative works .\" or modified versions, and any portions thereof, aswell as in all .\" supporting documentation. .\" 2. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by .\" Inferno Nettverk A/S, Norway. .\" 3. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" Inferno Nettverk A/S requests users of this software to return to .\" .\" Software Distribution Coordinator or sdc@inet.no .\" Inferno Nettverk A/S .\" Oslo Research Park .\" Gaustadalléen 21 .\" NO-0349 Oslo .\" Norway .\" .\" any improvements or extensions that they make and grant Inferno Nettverk A/S .\" the rights to redistribute these changes. .\" .TH SOCKD.CONF 5 "May 11, 2001" .SH NAME sockd.conf \- \fBDante\fP server configuration file syntax .SH DESCRIPTION The configuration file for the \fBDante\fP server controls both access controls and logging. It is divided into three parts; server settings, rules, and routes. A line can be commented using the standard comment character \fB#\fP. .SH SERVER SETTINGS The server settings control the generic behaviour of the server. Each keyword is separated from it's value by a \fB':'\fP character. .\" .IP \fBchild.maxidle\fP .\" Maintains a maximum on how many children of each type can remain .\" idle. Used to reduce the amount of idle processes after a "client burst" .\" has occured. The default is \fB0\fP (no maximum). .IP \fBcompatibility\fP With the \fBsameport\fP keyword, the server attempts to use the same port on the server and the client. This functionality is the default, but when this option is given it will also be done with privileged ports. The \fBreuseaddr\fP keyword might solve problems when the bind extension is used but the effects of enabling \fBreuseaddr\fP is currently unknown, do not enable it unless you understand the effects. .IP \fBconnecttimeout\fP The number of seconds a client has to send the request after a connect. Set it to 0 for forever. .IP \fBexternal\fP The address to be used for outgoing connections. The address given may be either a IP address or a interfacename. Can be given multiple times for different addresses. .IP \fBexternal.rotation\fP If more than one external address is given, this governs which address is selected. Valid values are \fBnone\fP (the default) and \fBroute\fP. The latter might require you to set \fBuser.privileged\fP to \fBroot\fP. Note that \fBroute\fP might create problems for ftp-clients using active ftp if the \fBDante\fP bind extension is enabled for the ftp-client. .IP \fBinternal\fP The internal addresses. Connections will only be accepted on these addresses. The address given may be either a IP address or a interfacename. .IP \fBiotimeout\fP The number of seconds an established connection can be idle. Set it to 0 for forever. .IP \fBlogoutput\fP This value controls where the server sends logoutput. It can be either \fBsyslog\fP[/\fBfacility\fP], \fBstdout\fP, \fBstderr\fP, a filename, or a combination. .IP \fBmethod\fP A list of acceptable authentication methods for socks-rules, in order of preference. Supported values are \fBusername\fP, \fBnone\fP, \fBrfc931\fP and \fBpam\fP. This list is used as the default for all coming rules until changed. Then the changed list is used as the default for the next rules. If a method is not set in this list it will never be selected. See the section on methods for a explanation of the different methods. .IP \fBclientmethod\fP A list of acceptable authentication methods for client-rules, in order of preference. These are the authenticationmethods that can provide authentications based on just the client's TCP connection. Supported values are \fBnone\fP, \fBrfc931\fP and \fBpam\fP. This list is used as the default for all coming rules until changed. Then the changed list is used as the default for the next rules. The default value is \fBnone\fP. If a method is not set in this list it will never be selected. .IP \fBsrchost\fP With the \fBnomismatch\fP keyword, the server will not accept connects from addresses having a mismatch between DNS address and hostname. Default is to accept them. With the \fBnounknown\fP keyword, the server will not accept connects from addresses without a DNS record. Default is to accept them. .IP \fBuser.privileged\fP Username which will be used for doing privileged operations. .IP \fBuser.notprivileged\fP User which the server runs as most of the time. .IP \fBuser.libwrap\fP User used to execute libwrap commands. .SH MODULES The following modules are supported by \fBDante\fP. Modules are purchased separately from Inferno Nettverk A/S. See the \fBDante\fP homepage for more information. .IP \fBbandwidth\fP The \fBbandwidth\fP module gives you control over how much bandwidth the Dante server uses on behalf of different clients. .IP \fBredirect\fP The \fBredirect\fP module gives you control over what addresses the server will use on behalf of the client and allows you to both redirect client requests to a different addresses aswell as control the range of addresses and ports to be used on behalf of the client. .IP \fBsession\fP The \fBsession\fP module gives you control over the number of sessions that can be created by different socks users. .SH METHODS The \fBDante\fP server supports the following methods. Some installations of \fBDante\fP may support only a subset of these. .IP \fBnone\fP The method requires no form of authentication. .IP \fBusername\fP The method requires the client to provide a username and password. This must match the username and password given in the system passwordfile. .IP \fBrfc931\fP The method requires the client host to provide a rfc931 ("ident") reply for the connecting client. The name given in the reply must be present in the password database. .IP \fBpam\fP The method requires the available clientdata to match against the pam database. .SH ADDRESSES Each address field can consist of a IP address (and where meaningful, a netmask, separated from the IP address by a '\fB/\fP' sign.), a hostname, or a domainname (designated so by the leading '\fB.\fP'). Each address can be followed by a optional \fBport\fP specifier. .SH RULES There are two sets of rules and they work at different levels. Rules prefixed with \fBclient\fP are checked first and are used to see if the client is allowed to connect to the \fBDante\fP server. We will call them "client-rules". It is especially important that these do not use hostnames but only IP addresses, both for security and performance reasons. These rules work at the TCP/IP level. The other rules, which we will call "socks-rules" are a level higher and are checked after the client connection has been accepted by the client-rules. The socks-rules are used to evaluate the socks request that the client sends. They thus work at the socks protocol level. Both set of rules start with a \fBpass\fP/\fBdeny\fP keyword (the client-rules have "client" prefixed to the \fBpass\fP/\fBdeny\fP keyword) which determines if connections matching the rule are to pass or be blocked. Both set of rules also specify a \fBfrom\fP/\fBto\fP address pair which gives the addresses the rule will match. In both contexts, \fBfrom\fP means the clients address. In the client-rule context, \fBto\fP means the address the request is accepted on, i.e. the address the \fBDante\fP server listens on. In the socks-rule context, \fBto\fP means the client's destination address, as formulated in the client's proxy request. In addition to the addresses there is a set of optional keywords which can be given. There are two forms of keywords, conditions and actions. For each rule, all conditions are checked and if they match the request, the actions are executed. The list of condition keywords is: \fBfrom\fP, \fBto\fP, \fBcommand\fP, \fBmethod\fP, \fBprotocol\fP, \fBproxyprotocol\fP, \fBuser\fP. The list of actions keywords is: \fBbandwidth\fP, \fBlibwrap\fP, \fBlog\fP and \fBredirect\fP. The format and content of the rules is identical, but client-rules may contain only a subset of the socks-rules. More concrete, they may not contain any keywords related to the socks protocol. .IP The contents of a client-rule is: .IP \fBfrom\fP The rule applies to requests coming from the address given as value. .IP \fBto\fP The rule applies to requests going to the address given as value. .IP \fBport\fP Parameter to \fBfrom\fP, \fBto\fP and \fBvia\fP. Accepts the keywords \fBeq/=, neq/!=, ge/>=, le/<=, gt/>, lt/<\fP followed by a number. A portrange can also be given as "port - ", which will match all port numbers within the range and . .IP \fBlibwrap\fP The server will pass the line to libwrap for execution. .IP \fBlog\fP Used to control logging. Accepted keywords are \fBconnect\fP, \fBdisconnect\fP, \fBdata\fP, \fBerror\fP and \fBiooperation\fP. .IP \fBuser\fP The server will only accept connections from users matching one of the names given as value. If no \fBuser\fP value is given, everyone in the passwordfile will be matched. The rule must also allow usernamebased methods. .IP \fBmethod\fP Require that the connection be "authenticated" using one of the given methods. .IP \fBpam.servicename\fP Which servicename to use when involving pam. Default is "sockd". .IP The contents of a socks-rule is: .IP \fBfrom\fP The rule applies to requests coming from the address given as value. .IP \fBto\fP The rule applies to requests going to or using the address given as value. Note that the meaning of this address is affected by \fBcommand\fP. .IP \fBport\fP Parameter to \fBfrom\fP, \fBto\fP and \fBvia\fP. Accepts the keywords \fBeq/=, neq/!=, ge/>=, le/<=, gt/>, lt/<\fP followed by a number. A portrange can also be given as "port - ", which will match all port numbers within the range and . .IP \fBbandwidth\fP The clients matching this rule will all share this amount of bandwidth. .IP \fBcommand\fP The rule applies to the given commands. Valid commands are \fBbind\fP, \fBbindreply\fP, \fBconnect\fP, \fBudpassociate\fP and \fBudpreply\fP. Can be used instead of, or to complement, \fBprotocol\fP. .IP \fBlibwrap\fP The server will pass the line to libwrap for execution. .IP \fBlog\fP Used to control logging. Accepted keywords are \fBconnect\fP, \fBdisconnect\fP, \fBdata\fP and \fBiooperation\fP. .IP \fBmethod\fP Require that the connection be established using one of the given methods. \fBmethod\fP always refers to the source part of the rule. Valid values are the same as in the global \fBmethod\fP line. .IP \fBpam.servicename\fP What servicename to use when involving pam. Default is "sockd". .IP \fBprotocol\fP The rule applies to the given protocols. Valid values are \fBtcp\fP and \fBudp\fP. It is recommended that the \fBcommand\fP form is used since it provides more accuracy in defining rules. .IP \fBproxyprotocol\fP The rule applies to requests using the given proxyprotocol. Valid proxyprotocols are \fBsocks_v4\fP and \fBsocks_v5\fP. .IP \fBredirect\fP The source and/or destination can be redirected using the \fBredirect\fP statement. The syntax of the statement is as follows: .D1 \fBredirect\fP from: \fBADDRESS\fP .D1 \fBredirect\fP to: \fBADDRESS\fP The semantics of \fBfrom\fP and \fBto\fP vary according to \fBcommand\fP and should be intuitive enough. .IP \fBuser\fP The server will accept connections from users matching one of the names given as value. If no \fBuser\fP value is given, everyone in the passwordfile will be matched. The rule must in this case also allow usernamebased methods. .SH ROUTES The routes are specified with a \fBroute\fP keyword. Inside a pair of parens ({}) a set of keywords control the behavior of the route. See socks.conf(5) for a description. This is used to perform so-called "server-chaining", where one socks-server connects to another socks-server futher upstream. .SH EXAMPLES See the example directory in the distribution. .SH FILES .nf .ta \w 1 /etc/sockd.conf \fBDante\fP server configuration file. /etc/passwd file used when checking username/passwords. .fi .SH AUTHORS For Inferno Nettverk A/S, Norway: Michael Shuldman : Design and implementation. Karl-Andre' Skevik : Autoconf and porting. .SH SEE ALSO sockd(8), socks.conf(5), hosts_access(5) .Pp Information about new releases and other related issues can be found on the .Nm \fBDante\fP WWW home page at http://www.inet.no/dante. dante-1.1.19.dfsg/doc/socks.conf.50000754000175000017500000001267410351603141015205 0ustar roamroam.\" $Id: socks.conf.5,v 1.27 2005/12/19 14:22:16 michaels Exp $ .\" .\" Copyright (c) 1997, 1998, 1999, 2000, 2001, 2003 .\" Inferno Nettverk A/S, Norway. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. The above copyright notice, this list of conditions and the following .\" disclaimer must appear in all copies of the software, derivative works .\" or modified versions, and any portions thereof, aswell as in all .\" supporting documentation. .\" 2. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by .\" Inferno Nettverk A/S, Norway. .\" 3. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" Inferno Nettverk A/S requests users of this software to return to .\" .\" Software Distribution Coordinator or sdc@inet.no .\" Inferno Nettverk A/S .\" Oslo Research Park .\" Gaustadalléen 21 .\" NO-0349 Oslo .\" Norway .\" .\" any improvements or extensions that they make and grant Inferno Nettverk A/S .\" the rights to redistribute these changes. .\" .TH SOCKS.CONF 5 "February 17, 2001" .SH NAME socks.conf \- socks client configuration file syntax .SH DESCRIPTION The configuration file for the socks client library allow control over logging and server selection. It is divided into two parts, miscellaneous settings and routes. A line can be commented using the standard comment character \fB#\fP. .SH FORMAT The miscellaneous settings have a keyword followed by a colon and the value. .TP \fBdebug\fP Setting this field to 1 turns on debugging. .TP \fBlogoutput\fP This value controls where the sends logoutput. It can be either \fBsyslog\fP, \fBstdout\fP, \fBstderr\fP, a filename, or a combination. .IP \fBresolveprotocol\fP The protocol used to resolve hostnames. Valid values are \fBudp\fP (default), \fBtcp\fP and \fBfake\fP. .TP .SH ROUTES The routes are specified with a \fBroute\fP keyword. Inside a pair of parens ({}) a set of keywords control the behavior of the route. Each \fBroute\fP can contain three address specifications; \fBfrom\fP, \fBto\fP and \fBvia\fP. A route is selected for a connection based on the values within the \fBroute\fP block. The \fBroute\fP block can contain the following: .TP .SH ADDRESSES Each address field can consist of a ipaddress (and where meaningful, a netmask, separated from the ipaddress by a '\fB/\fP' sign.), a hostname, or a domainname (designated by the leading '\fB.\fP'). Each address can be followed by a optional \fBport\fP specifier. .IP \fBfrom\fP The route is used only by requests coming from the address given as value. .IP \fBto\fP The route is used only by requests going to the address given as value. .IP \fBvia\fP Address of socks server to be used for the connection. .IP \fBport\fP Parameter to \fBfrom\fP, \fBto\fP and \fBvia\fP. Accepts the keywords \fBeq/=, neq/!=, ge/>=, le/<=, gt/>, lt/<\fP followed by a number. A portrange can also be given as "port - ", which will match all port numbers within the range and . .IP \fBcommand\fP The server supports the given commands. Valid commands are \fBbind\fP, \fBbindreply\fP, \fBconnect\fP, \fBudpassociate\fP and \fBudpreply\fP. and \fBudpreply\fP. Can be used instead of, or to complement, \fBprotocol\fP. .IP \fBmethod\fP List of authentication methods the \fBclient\fP supports and which to offer the server. Currently supported values are \fBnone\fP and \fBusername\fP. .IP \fBprotocol\fP The protocols the server supports. Supported values are \fBtcp\fP and \fBudp\fP. .IP \fBproxyprotocol\fP The proxy protocols the server supports. Currently supported values are \fBsocks_v4\fP, \fBsocks_v5\fP, and \fBhttp_v1.0\fP. .SH EXAMPLES See the example directory in the distribution. .SH ENVIRONMENT .TP \fBSOCKS_USERNAME\fP Use \fBSOCKS_USERNAME\fP as the username when doing username authentication. .TP \fBSOCKS_PASSWORD\fP Use \fBSOCKS_PASSWORD\fP as the password when doing username authentication. Not recommended as other users on the system might be able to see your password. .SH FILES .I /etc/socks.conf .SH AUTHORS For Inferno Nettverk A/S, Norway: Michael Shuldman : Design and implementation. Karl-Andre' Skevik : Autoconf and porting. .SH SEE ALSO sockd(8) sockd.conf(5) .Pp Information about new releases and other related issues can be found on the \fBDante\fP WWW home page at http://www.inet.no/dante. .SH BUGS See the accompanying BUGS file. New ones should be reported to dante\-bugs@inet.no. dante-1.1.19.dfsg/doc/SOCKS4.protocol0000644000175000017500000001551007030114755015600 0ustar roamroam SOCKS: A protocol for TCP proxy across firewalls Ying-Da Lee yingda@best.com or yingda@esd.sgi.com SOCKS was originally developed by David Koblas and subsequently modified and extended by me to its current running version -- version 4. It is a protocol that relays TCP sessions at a firewall host to allow application users transparent access across the firewall. Because the protocol is independent of application protocols, it can be (and has been) used for many different services, such as telnet, ftp, finger, whois, gopher, WWW, etc. Access control can be applied at the beginning of each TCP session; thereafter the server simply relays the data between the client and the application server, incurring minimum processing overhead. Since SOCKS never has to know anything about the application protocol, it should also be easy for it to accommodate applications which use encryption to protect their traffic from nosey snoopers. Two operations are defined: CONNECT and BIND. 1) CONNECT The client connects to the SOCKS server and sends a CONNECT request when it wants to establish a connection to an application server. The client includes in the request packet the IP address and the port number of the destination host, and userid, in the following format. +----+----+----+----+----+----+----+----+----+----+....+----+ | VN | CD | DSTPORT | DSTIP | USERID |NULL| +----+----+----+----+----+----+----+----+----+----+....+----+ # of bytes: 1 1 2 4 variable 1 VN is the SOCKS protocol version number and should be 4. CD is the SOCKS command code and should be 1 for CONNECT request. NULL is a byte of all zero bits. The SOCKS server checks to see whether such a request should be granted based on any combination of source IP address, destination IP address, destination port number, the userid, and information it may obtain by consulting IDENT, cf. RFC 1413. If the request is granted, the SOCKS server makes a connection to the specified port of the destination host. A reply packet is sent to the client when this connection is established, or when the request is rejected or the operation fails. +----+----+----+----+----+----+----+----+ | VN | CD | DSTPORT | DSTIP | +----+----+----+----+----+----+----+----+ # of bytes: 1 1 2 4 VN is the version of the reply code and should be 0. CD is the result code with one of the following values: 90: request granted 91: request rejected or failed 92: request rejected becasue SOCKS server cannot connect to identd on the client 93: request rejected because the client program and identd report different user-ids The remaining fields are ignored. The SOCKS server closes its connection immediately after notifying the client of a failed or rejected request. For a successful request, the SOCKS server gets ready to relay traffic on both directions. This enables the client to do I/O on its connection as if it were directly connected to the application server. 2) BIND The client connects to the SOCKS server and sends a BIND request when it wants to prepare for an inbound connection from an application server. This should only happen after a primary connection to the application server has been established with a CONNECT. Typically, this is part of the sequence of actions: -bind(): obtain a socket -getsockname(): get the IP address and port number of the socket -listen(): ready to accept call from the application server -use the primary connection to inform the application server of the IP address and the port number that it should connect to. -accept(): accept a connection from the application server The purpose of SOCKS BIND operation is to support such a sequence but using a socket on the SOCKS server rather than on the client. The client includes in the request packet the IP address of the application server, the destination port used in the primary connection, and the userid. +----+----+----+----+----+----+----+----+----+----+....+----+ | VN | CD | DSTPORT | DSTIP | USERID |NULL| +----+----+----+----+----+----+----+----+----+----+....+----+ # of bytes: 1 1 2 4 variable 1 VN is again 4 for the SOCKS protocol version number. CD must be 2 to indicate BIND request. The SOCKS server uses the client information to decide whether the request is to be granted. The reply it sends back to the client has the same format as the reply for CONNECT request, i.e., +----+----+----+----+----+----+----+----+ | VN | CD | DSTPORT | DSTIP | +----+----+----+----+----+----+----+----+ # of bytes: 1 1 2 4 VN is the version of the reply code and should be 0. CD is the result code with one of the following values: 90: request granted 91: request rejected or failed 92: request rejected becasue SOCKS server cannot connect to identd on the client 93: request rejected because the client program and identd report different user-ids. However, for a granted request (CD is 90), the DSTPORT and DSTIP fields are meaningful. In that case, the SOCKS server obtains a socket to wait for an incoming connection and sends the port number and the IP address of that socket to the client in DSTPORT and DSTIP, respectively. If the DSTIP in the reply is 0 (the value of constant INADDR_ANY), then the client should replace it with the IP address of the SOCKS server to which the cleint is connected. (This happens if the SOCKS server is not a multi-homed host.) In the typical scenario, these two numbers are made available to the application client prgram via the result of the subsequent getsockname() call. The application protocol must provide a way for these two pieces of information to be sent from the client to the application server so that it can initiate the connection, which connects it to the SOCKS server rather than directly to the application client as it normally would. The SOCKS server sends a second reply packet to the client when the anticipated connection from the application server is established. The SOCKS server checks the IP address of the originating host against the value of DSTIP specified in the client's BIND request. If a mismatch is found, the CD field in the second reply is set to 91 and the SOCKS server closes both connections. If the two match, CD in the second reply is set to 90 and the SOCKS server gets ready to relay the traffic on its two connections. From then on the client does I/O on its connection to the SOCKS server as if it were directly connected to the application server. For both CONNECT and BIND operations, the server sets a time limit (2 minutes in current CSTC implementation) for the establishment of its connection with the application server. If the connection is still not establiched when the time limit expires, the server closes its connection to the client and gives up. dante-1.1.19.dfsg/doc/README.survey0000644000175000017500000000042606737443077015302 0ustar roamroam Dante development survey If you use this software, please take the time to fill out the survey at http://www.inet.no/dante/survey.html. It's purpose is to try to determine which features are most wanted, and will probably influence the direction future development will take. dante-1.1.19.dfsg/doc/faq.tex0000644000175000017500000006717110360255414014350 0ustar roamroam%@(#)$Id: faq.tex,v 1.59 2006/01/08 18:33:48 karls Exp $ %/* % * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 % * Inferno Nettverk A/S, Norway. All rights reserved. % * % * Redistribution and use in source and binary forms, with or without % * modification, are permitted provided that the following conditions % * are met: % * 1. The above copyright notice, this list of conditions and the following % * disclaimer must appear in all copies of the software, derivative works % * or modified versions, and any portions thereof, aswell as in all % * supporting documentation. % * 2. All advertising materials mentioning features or use of this software % * must display the following acknowledgement: % * This product includes software developed by % * Inferno Nettverk A/S, Norway. % * 3. The name of the author may not be used to endorse or promote products % * derived from this software without specific prior written permission. % * % * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR % * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES % * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. % * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, % * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT % * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, % * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY % * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT % * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF % * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. % * % * Inferno Nettverk A/S requests users of this software to return to % * % * Software Distribution Coordinator or sdc@inet.no % * Inferno Nettverk A/S % * Oslo Research Park % * Gaustadalléen 21 % * NO-0349 Oslo % * Norway % * % * any improvements or extensions that they make and grant Inferno Nettverk A/S % * the rights to redistribute these changes. % * % */ \documentclass[a4paper, final, twoside, english]{article} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{html} \usepackage{url} \title{Dante FAQ} \author{ Inferno Nettverk A/S \\ Oslo Research Park \\ Gaustadalléen 21 \\ NO-0349 Oslo \\ Norway} \date{$$$$Date: 2006/01/08 18:33:48 $$$$} \makeindex \begin{document} \maketitle \begin{center} \emph{See \htmladdnormallink{ http://www.inet.no/dante/FAQ/}{http://www.inet.no/dante/FAQ/} for the latest version of this faq.} Send updates/corrections to the public mailinglist dante-misc@inet.no. \end{center} \section{Reporting problems or bugs in Dante} \subsection{Why was I told to read this in response to my superb problem/bug report?} Because you were unable to provide a usable report. Since there are so many of you, we prefer to refer you to this FAQ rather than repeating ourselves over and over. \subsection{Why is "it does not work" not a good report?} It's a common misconception among users who have never done any programming that by stating something along the lines of "it does not work", or "I get a segmentation fault" (these are real examples, believe it or not), the programmers at Inferno Nettverk will without a shred of doubt be able to pin-point that one line, that one line among the thousands of other lines, responsible for it "not working" or "segmentation faulting". The fact is, any one of the tens of thousands of lines could be the "bad" line, we don't have time to re-read them all each time we get a "it does not work" message. \subsection{How can I provide you with the information you need?} First of all, look in the config file you are using. If you are using the Dante client, it's /etc/socks.conf. If you are using the Dante server, it's /etc/sockd.conf. Both files contain by default the lines "logoutput:". Set "logoutput:" to some file that Dante can log output to. If the problem is with the client, also uncomment the line containing "debug". If the problem is with the server, also add "-d" to whatever arguments you usually start the server with. Repeat whatever you did to produce the error and look at the log messages. Do they provide any hints? If it looks like a user error, you configured something wrong, etc. you can try sending a mail to dante-misc@inet.no, a public mailing list where someone might be kind enough to help you if you formulate your question in a understandable way. And remember, unless you are a customer of Inferno Nettverk, no one owes you any support or help, you are the one asking someone to spend their time to help you, not the other way around. If it looks like a bug, first perform the following step: \begin{enumerate} \item{} Make sure that you are using the latest version of Dante, even if the latest version is a "prerelease" and you are using official release. Always check ftp.inet.no:/pub/socks/ to see if there's a later version before sending a bugreport. Next, depending on whether the suspected bug is in the client or sever, do one of the following: If it's a bug in the client: \begin{enumerate} \item{} Compile the program you are trying to socksify with the compiler option "-g". \item{} Compile Dante with "-g" (--enable-debugging option to configure). \item{} Set debug and logoutput as described above. \item{} cp /dev/null (to make sure it's empty.) \item{} ktrace/truss/strace/ socksify . Save the output to a file. If you have a program that can trace library calls too (late version of Solaris truss and redhat Linux apparently do), please include information about that too. \item{} If a coredump was generated do \begin{verbatim} $ gdb (gdb) backtrace 50 \end{verbatim} Save the output to a file. \end{enumerate} If it's a bug in the server: \begin{enumerate} \item{} Compile Dante with "-g" (--enable-debugging option to configure). \item{} Set debug and logoutput as described above. \item{} cp /dev/null (to make sure it's empty.) \item{} If the server crashed/exited due to the bug, a coredump should be generated. If you do not find a coredump in the directory you started the Dante server from you need to find out why. Some possible reasons are: a) your shell has disabled coredumps (check what ulimit(1)) says. b) some systems by default disable coredumps on processes that are either setuid, or that are run by root. When you have found the coredump do \begin{verbatim} $ gdb (gdb) backtrace 50 \end{verbatim} Save the output to a file. \end{enumerate} Then: \item{} In addition to the server/client specific files mentioned below, include the output from configure and the file "include/autoconf.h". \item{} Collect the output from configure and the file include/autoconf.h, the , gdb/ktrace/truss/strace/whatever output in a orderly fashion so it's easy to read and understand, and send it to us. Make sure you include information about what all the IP addresses in the logfiles are (10.0.0.1 is "client using lynx", 10.0.0.2 is "remote webserver", etc.). The address to use for Dante bugs is dante-bugs@inet.no. See the BUGS file coming with Dante. \item{} If you have the possibility to create a temporary account for one of the Dante developers in the case we are unable to reproduce the error on our own systems, please mention that in the bugreport (but don't create the account until we ask for it, we rarely need it). \end{enumerate} \section{System installation} \subsection{How do I configure the client?} \subsubsection{Setting up the configuration file} The configuration file is usually called \emph{/etc/socks.conf} and needs information about where the server can be found. To configure it follow these easy steps: \begin{enumerate} \item Read the manual page (\emph{socks.conf}). It can also be found \htmladdnormallink{online}{http://www.inet.no/dante/doc/socks.conf.5.html}. \item Read the manual page again. \item Determine the IP address and port of the socks server you wish to use. \item If the server uses anything but socks version 5 you should probably also determine this. \end{enumerate} Lets assume that server is at address is 10.1.1.1, port 1080 and that it is a normal socks server (such as Dante) which supports socks version 5. You would then enter the following in \emph{/etc/socks.conf}: \begin{verbatim} route { from: 0.0.0.0/0 to: 0.0.0.0/0 via: 10.1.1.1 port = 1080 proxyprotocol: socks_v5 } \end{verbatim} The Dante socks library should now be able to connect to the socks server. \subsubsection{It doesn't work} If it doesn't work you might wish to add the lines below to the beginning of the file. When you try again you should get more information about what is happening, which will hopefully help you determine what the problem is: \begin{verbatim} debug: 1 logoutput: stdout \end{verbatim} \subsubsection{I want to do something more complicated} Reading the \htmladdnormallink{manual page}{http://www.inet.no/dante/doc/socks.conf.5.html} is a good start. Then have a look at the example configuration-files found in the archive (and via \htmladdnormallink{ftp}{ftp://ftp.inet.no/pub/socks/extracted/example/}). \subsection{How do I set up the server?} \subsubsection{Creating a simple server configuration file} Setting up the server is not significantly more difficult than setting up the client. The server usually uses the filename \emph{/etc/sockd.conf}. To configure the server follow these easy steps: \begin{enumerate} \item Read the manual pages (\emph{sockd.conf} and \emph{sockd}). They can also be found \htmladdnormallink{online}{http://www.inet.no/dante/doc/}. \item Read the manual pages again. \item Find out the name or IP address of the interface on the internal side of the network. \item Find out the name or IP address of the interface(s) on the external side of the network. \item Determine which networks (address/netmask pair) you wish to allow to connect to the server. \item Determine if you wish to use or need any special authentication to use the server. If not, the server will most likely not need to be started as root. \item Create a user (e.g. \emph{sockd}) which the server can run as when it doesn't need to perform privileged operations. Using \emph{nobody} is not recommended. \item Determine what users will be allowed to do via the server (i.e. which ports should they be allowed to use). \end{enumerate} Armed with this knowledge you can now start writing the configuration file. It generally consists of tree parts: \begin{itemize} \item General configuration; setting external interfaces etc. \item Client access rules; who is allowed to connect to the server \item Client usage rules; what users can do when they have connected \end{itemize} Let's start with the general rules: \begin{verbatim} internal: fxp0 port = 1080 external: fxp1 method: username none #user.privileged: root user.notprivileged: sockd logoutput: stderr \end{verbatim} This sets the internal and external interfaces and which users should be used by the server. It allows users to connect with username authentication, but allows access without authentication. Running as root might not be necessary if you do not use any authentication methods. Then we add the client access rules. These are placed after the first lines. \begin{verbatim} client pass { from: 10.1.1.0/24 to: 0.0.0.0/0 log: connect disconnect } \end{verbatim} These lines allow clients on the 10.1.1.0 network to connect to any external address. The server logs connects and disconnects. Finally we add the access rules. This example does not place any limits upon usage of the server. \begin{verbatim} #allow bind to ports greater than 1023 pass { from: 0.0.0.0/0 to: 0.0.0.0/0 port gt 1023 command: bind log: connect disconnect } #allow outgoing connections (tcp and udp) pass { from: 0.0.0.0/0 to: 0.0.0.0/0 command: connect udpassociate log: connect disconnect } #allow replies to bind, and incoming udp packets pass { from: 0.0.0.0/0 to: 0.0.0.0/0 command: bindreply udpreply log: connect error } #log the rest block { from: 0.0.0.0/0 to: 0.0.0.0/0 log: connect error } \end{verbatim} These lines allow all clients (which have been allowed to connect) to use the socks \emph{bind}, \emph{connect} and \emph{udpassociate} operations. This gives users full access through the socks server; clients can bind ports on the server (and receive replies), connect with TCP through the server, and send (and receive) UDP packets. The \emph{bind} command is typically used by \emph{ftp} clients (using active ftp), and the first pass command allows clients to bind a port (above 1023) on the server. The second pass command allows outgoing traffic; \emph{connect} operations (TCP) and transmission of UDP packets. The third \emph{pass} command controls \emph{replies}; this might be the reply to a bind request or it may be the reply to a UDP-packet, since UDP is packetbased. Note that nothing is done to verify that it's a \emph{genuine} reply, that is in general not possible anyway. The \emph{block} command at the end ensures that operations that do not match any of the above are logged. In the above configuration there will likely not be many blocked operations since the commands are very liberal in what they allow. The same result could have been achieved much simpler by a single \emph{pass} command. The structure above has been used to make it simpler to make modifications. By changing the networks matched in the \emph{from} and \emph{to} commands above it is possible to limit operations to specific subnets, only allow outgoing connections to some addresses etc. The complete sockd configuration file should now look like this: \begin{verbatim} ## general configuration internal: fxp0 port = 1080 external: fxp1 method: username none #user.privileged: root user.notprivileged: sockd logoutput: stderr ## client access rules client pass { from: 10.1.1.0/24 to: 0.0.0.0/0 log: connect disconnect } ## server operation access rules #allow bind to ports greater than 1023 pass { from: 0.0.0.0/0 to: 0.0.0.0/0 port gt 1023 command: bind log: connect disconnect } #allow outgoing connections (tcp and udp) pass { from: 0.0.0.0/0 to: 0.0.0.0/0 command: connect udpassociate log: connect disconnect } #allow replies to bind, and incoming udp packets pass { from: 0.0.0.0/0 to: 0.0.0.0/0 command: bindreply udpreply log: connect error } #log the rest block { from: 0.0.0.0/0 to: 0.0.0.0/0 log: connect error } \end{verbatim} This was a simple example to get you started. As you probably noticed when you read the manual page the server can do a lot more. Remember to test your configuration before you put it into production usage. When you are sure that the server works you might wish to redirect the logoutput to a file (by changing the \emph{logoutput} command). \subsection{Where can I find configuration file examples?} Several examples are included in the archive. They can also be downloaded via \htmladdnormallink{ftp}{ftp://ftp.inet.no/pub/socks/extracted/example/}. \subsection{SuSE 7} \begin{enumerate} \item{} Install the Dante package from SuSE (Version 1.1.2 is included in SuSE 7) \item{} Edit the /etc/rc.config and set the line START\_SOCKD="yes" \item{} Edit the config file /etc/sockd.conf and reboot Linux (or start sockd -D if you know what you are doing). Be sure that you have one client pass rule which allows you client to connect from your internal network and one pass rule that allows a client that is connected to use the proxy to the desired destinations (this is most likely to everywhere = 0.0.0.0/0 ) \end{enumerate} \emph{Thanks to: Andreas John } \section{How can I socksify the whole system?} On some systems doing the global equivalent of running a program with socksify is possible. You should however not do this unless you know what you are doing. \subsection{Linux} In Linux you can easily do the following: \begin{verbatim} edit the file /etc/ld.so.preload and add two lines saying: libdl.so libdsocks.so \end{verbatim} \emph{Thanks to: Dag Wieers .} Dag Wieers also has a (RedHat) SPEC file which contains scripts for doing this automatically. It can be found at: \htmladdnormallink{ftp://dag.wieers.com/home-made/dante/dante.spec}{ftp://dag.wieers.com/home-made/dante/dante.spec} \subsection{Generic} There is another way that gives you more control over what will and what will not be socksified. Instead of using the wrapper-script 'socksify', you could add \begin{verbatim} LD_PRELOAD="libdl.so libdsocks.so" export LD_PRELOAD \end{verbatim} to the environment. (/etc/profile ~/.profile ~/.bashrc) \\ \emph{Thanks to: Dag Wieers .} \subsubsection{Why do I want to be able to control this?} In same rare cases programs fail to work in a socksified environment (e.g. acroread 4.0 for Linux segfaults) or programs like rpm depend on a clean build-environment to get its (library) dependencies. \\ \emph{Thanks to Dag Wieers .} \subsubsection{How can I easily unsocksify the current shell?} By issuing \begin{verbatim} unset LD_PRELOAD \end{verbatim} \emph{Thanks to: Dag Wieers .} \section{Technical Problems} \subsection{Why doesn't the socksify program work with glibc-2?} If glibc is not correctly installed (old header files are still installed) socksify won't work if logging is enabled. The server will also crash when it exits. Upgrade the header files (/usr/include) and compile again. \subsection{Why doesn't socksify work on cvs?} It does work. A problem however is that cvs usually ends up calling a setuid program (rsh, ssh, whatever). See section~\ref{setuid}. \subsection{Why doesn't socksify work on setuid programs like ssh, rsh, etc?} \label{setuid} The reason is that these programs are setuid. Most systems will ignore the work socksify has done before running these programs and the result becomes the the same as not using socksify on them. Solution: strip off the suid bit if possible or recompile the binary (rsh, ssh, etc) with explicit socks support (adding "-ldsocks" to the linkoptions is usually enough.) \subsection{Why doesn't socksify work on HP-UX 11.00?} You might have to install patch \emph{PHSS\_22478}, or one of its successors, which adds \emph{LD\_PRELOAD} support to the loader. \emph{Thanks to: albert chin (china@thewrittenword.com)} \subsection{Why doesn't socksify work on AIX?} AIX does not support \emph{LD\_PRELOAD}, which is required for socksify to work. The alternative is static compilation, as specified in the \url{ftp://ftp.inet.no/pub/socks/extracted/doc/README.usage} file. \subsection{Why do I get undefined references to \_\_bswap\_32 during compilation on Linux?} This is likely due to a bug in one of the system header files. A workaround has been added in version 1.1.14. \subsection{How can I more easily get the Dante server to work when the external interface is using dynamic IP addresses?} Either specify the external address as a interfacename (available since Dante v1.1.7), in which case the Dante server will automatically use the new address whenever it changes, or if you must use a IP address, try the below. Automatically running a script that changes the "external:" line in your sockd.conf and then sends the server a SIGHUP when you get a new address should be simple enough though. A example of such a script is the following, modify to suit. \begin{verbatim} #!/bin/sh - # # usage: script.sh : {SOCKD_CONF='/etc/sockd.conf'} if [ ! -w ${SOCKD_CONF} ]; then echo "${SOCKD_CONF} does not exist or is not writable" exit 1 fi ex - +'1,$s/^external:.*/external: '$1'/ | wq' ${SOCKD_CONF} kill -HUP `cat /var/run/sockd.pid` \end{verbatim} As you see, this is intended to be called as " ", where is your external ip. We assume you can easily get the external ip from your ppp script. \emph{Thanks to: Tin Yu Mak .} \subsection{I have problems rotating Dante's logfiles. What can I do except log via syslog?} Dante now reopens the logfiles on SIGHUP, so you should not have any problems, just rename the file and send the Dante server a SIGHUP signal. A quick and dirty solution for dealing with most daemons that don't like having their logs rotated. Copy them instead of moving the files and then redirect an echo into them. Kick it off via cron every day at 11:59. I get 7 days of rotated logs like this: \begin{verbatim} sleep 60 DAY=`date +%a` cp /var/log/banned.log /var/log/banned.log.${DAY} echo > /var/log/banned.log \end{verbatim} \emph{Thanks to: James Coe .} Another solution: I use dante under supervise with multilog for log rotation (based on size, not date). This will run Dante under supervise (and limit its memory usage to 5 megabytes) and redirect its logging to /var/log/dante/current, rotated based on its size. \url{http://cr.yp.to/daemontools.html}{http://cr.yp.to/daemontools.html} for more information. \begin{verbatim} /service/dante/run: #!/bin/sh exec 2>&1 exec softlimit -m 5000000 -p 30 -c 0 \ /usr/sbin/sockd -f /etc/sockd.conf -N 1 -l # -d /service/dante/log/run: #!/bin/sh exec setuidgid logging multilog t /var/log/dante \end{verbatim} \emph{Thanks to: Michael T. Babcock" } \section{Authentication} \subsection{How do I setup a password file for authenticating users?} The Dante server uses the standard system passwordfile. On many systems, the Dante "user.privileged" id must be set to root or somebody with special access to read the encrypted passwordfile. Put the server in a chroot jail to manage a separate passwordfile. \subsection{How do I use LDAP authentication with Dante?} First, make sure that you compile Dante with support for PAM. The configure script should do this for you if the PAM development libraries are installed. Under RedHat Linux, make sure you have the PAM-devel RPM installed. You will also have to add LDAP support to your PAM implementation, if it is not already there. Check if you have /lib/security/pam\_ldap.so or the equivalent. If not, use pam\_ldap from \htmladdnormallink{http://www.padl.com/}{http://www.padl.com/}. pam\_ldap gets its configuration from /etc/ldap.conf. Make sure you set host to your LDAP server, and base to your base DN.You can also set pam\_filter and pam\_group\_dn to restrict logins to particular objecttypes or members of particular groups. Point sockd at LDAP by creating /etc/pam.d/sockd. An exapmle of this files contents is; \begin{verbatim} #%PAM-1.0 auth sufficient /lib/security/pam_ldap.so auth required /lib/security/pam_unix_auth.so try_first_pass account sufficient /lib/security/pam_ldap.so account required /lib/security/pam_unix_acct.so password required /lib/security/pam_ldap.so \end{verbatim} Finally, you need to configure sockd.conf to restrict access based on PAM. this is accomplished with the following: \begin{verbatim} # allowable authentication methods for socks-rules. # values are username, none, rfc931 and pam method: pam none # allowable authentication methods for client-rules. # values are username, none, rfc931 and pam clientmethod: pam none # Client rules, controls who may connect # ## everyone who authenticates is allowed to use tcp ## and udp pass { from: 0.0.0.0/0 to: 0.0.0.0/0 protocol: tcp udp log: connect disconnect error method: pam } # last line, block everyone else. This is the default but if you provide # one yourself you can specify your own logging/actions block { from: 0.0.0.0/0 to: 0.0.0.0/0 log: connect error } \end{verbatim} \emph{Thanks to: Sean Burford .} \subsubsection{... and against Microsoft Active Directory?} To authenticate against a Microsoft Active Directory the following bare minimum example configuration for 'test.org' with an active directory server at 123.123.123.123 of /etc/ldap.conf Directory is what you would require: \begin{verbatim} host 123.123.123.123 base cn=Users,dc=test,dc=org rootbinddn cn=Administrator,cn=Users,dc=test,dc=org pam_filter objectclass=user pam_login_attribute cn \end{verbatim} With the password for the Administrator user in the file /etc/ldap.secret and chowned to 0600. \emph{Thanks to: Alexander Cohen .} \subsection{Technical details} \subsubsection{Why do I always get an initial success to my erroneous username/password with Dante?} If username/password authentication is used, the socks client will always get a successful response at first. The username/password is not checked until the full socks request has been received from the client, at which point the request will fail if the username/password is incorrect in the same way it would if there was no "pass" rule for the request. The reason for this is that due to the generality of the Dante socks-rules, we do not know what authentication we will be using for this particular clients request, until we have read the request. That means, the same client address could in theory use one type of authentication for connections to one address, and another authentication type for connections to another address. As of version 1.1.16, this has been changed a little. If you are using only one type of username/password-based authentication scheme, the username/password will be checked at an point early enough to tell the client the username/password was wrong. \section{For system administrators} \subsection{What happens if I need to restart the Dante server?} If you kill one sockd process (any one), the rest of the processes will cope as best as they can. This means that if you kill the main sockd process, clients that have already established their socks-session will continue to run. These sockd processes will be orphaned (their parent pid will be init), and will not be able to accept new clients. You can at this point however start the Dante server again. The newly started Dante server will then accept clients as usual, but will have no relation to the processes created by the previous Dante server. Those processes will continue to run by themselves until all their clients have finished, at which point they will die my themselves. \section{For programmers} \subsection{What does a socksified application need to care about?} A socksified application will normaly work without any extra steps needing to be done, within the limits of the socks standard. The exception to this is the following: \begin{description} \item[select(2)/poll(2)] applications combining non-blocking sockets with select(2)/poll(2) need to make sure they can handle the select(2)/poll(2) call being interrupted. This is due to how the Dante clientlibrary implements support for non-blocking connect(2). \end{description} \end{document} dante-1.1.19.dfsg/doc/sockd.80000644000175000017500000000743110175146324014247 0ustar roamroam.\" $Id: sockd.8,v 1.29 2005/01/24 10:24:20 karls Exp $ .\" .\" Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2004 .\" Inferno Nettverk A/S, Norway. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. The above copyright notice, this list of conditions and the following .\" disclaimer must appear in all copies of the software, derivative works .\" or modified versions, and any portions thereof, aswell as in all .\" supporting documentation. .\" 2. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by .\" Inferno Nettverk A/S, Norway. .\" 3. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" Inferno Nettverk A/S requests users of this software to return to .\" .\" Software Distribution Coordinator or sdc@inet.no .\" Inferno Nettverk A/S .\" Oslo Research Park .\" Gaustadalléen 21 .\" NO-0349 Oslo .\" Norway .\" .\" any improvements or extensions that they make and grant Inferno Nettverk A/S .\" the rights to redistribute these changes. .\" .TH SOCKD 8 "Feb 17, 2001" .SH NAME sockd \- network proxyserver .SH SYNOPSIS .B sockd .RB [ \-DLVdhnv ] .RB [ \-N .IR number ] .RB [ \-f .IR file ] .SH DESCRIPTION .B Dante implements the socks standard and can function as a firewall between networks. .PP .B Dante relays TCP and UDP both from outside the network and in, and from inside and out. .PP The options are as follows: .TP .B \-D .B Dante will detach from the controlling terminal and run in the background as a system daemon. .TP .B \-L Displays the license .B Dante comes under. .TP .BI \-N number .B Dante will fork of .I number copies of itself when starting. Can be used for very busy servers. .TP .B \-V Verifies config file and exits. .TP .B \-d Enables debugging. .TP .BI \-f file .B Dante will read its configuration from .IR file . .TP .B \-h Shows the currently valid options. .TP .B \-n Disables TCP keep-alive messages. Normally .B Dante enables TCP keep-alive messages so that connections from machines that have crashed or for other reasons no longer can be reached time out. .TP .B \-v Displays .B Dante version. .SH ENVIRONMENT .TP .B TMPDIR Use .B TMPDIR for temporary files. Since .B Dante uses lockfiles it is recommended that .B TMPDIR be set to a (local) filesystem with low latency. .SH FILES .TP /etc/sockd.conf .B Dante server configuration file. .SH AUTHORS For Inferno Nettverk A/S, Norway: Michael Shuldman : Design and implementation. Karl-Andre' Skevik : Autoconf and porting. .SH SEE ALSO socks.conf(5) sockd.conf(5) .PP Information about new releases and other related issues can be found on the .B Dante WWW home page at http://www.inet.no/dante. .SH BUGS See the accompanying BUGS file. New ones should be reported to dante\-bugs@inet.no. dante-1.1.19.dfsg/doc/faq.ps0000644000175000017500000041473610360255720014175 0ustar roamroam%!PS-Adobe-2.0 %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: faq.dvi %%Pages: 13 %%PageOrder: Ascend %%BoundingBox: 0 0 596 842 %%EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips faq.dvi -o %DVIPSParameters: dpi=600, compressed %DVIPSSource: TeX output 2006.01.08:1936 %%BeginProcSet: texc.pro %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr 1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B /chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ /cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 {2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ 1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) (LaserWriter 16/600)]{A length product length le{A length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end %%EndProcSet TeXDict begin 39158280 55380996 1000 600 600 (faq.dvi) @start %DVIPSBitmapFont: Fa cmsy10 10 1 /Fa 1 16 df15 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fb ecbx1000 10 42 /Fb 42 122 df<913803FFC0027F13F00103B512FC010FEB00FED93FF8133FD97FE0EBFF 8049485A5A1480484A13C04A6C1380A36F1300167E93C7FCA592383FFFC0B8FCA4000390 C7FCB3ABB5D8FC3F13FFA4303A7EB935>28 D39 D<141C143C14F8EB01F0EB03E01307EB0FC0EB1F8014005B13 7E13FE5B12015B1203A2485AA2120F5B121FA25B123FA4485AA512FFB1127FA56C7EA412 1F7FA2120F7F1207A26C7EA212017F12007F137E7F7F1480EB0FC0EB07E01303EB01F0EB 00F8143C141C165377BD25>I<12E07E127C7E7E7F6C7E6C7E12037F6C7E7F12007F137E 137FA2EB3F80A214C0131F14E0A2130F14F0A4EB07F8A514FCB114F8A5EB0FF0A414E013 1FA214C0133F1480A2EB7F00A2137E13FE5B12015B485A5B1207485A485A90C7FC123E5A 12F05A16537BBD25>I45 DI<1618163816781670A216F016E0150116C01503 1680A2150716005D150E151E151CA2153C15381578157015F05DA214015D14035D140792 C7FCA25C140E141E141C143C1438A21478147014F05CA213015C13035C130791C8FCA25B 130E131E131C133C1338A21378137013F05B12015BA212035B120790C9FC5A120EA2121E 121C123C123812781270A212F05AA225537BBD30>I<141E143E14FE1307137FB5FCA313 8FEA000FB3B3A5007FB61280A4213679B530>49 DII<001C15C0D81F 80130701F8137F90B61280A216005D5D15F05D15804AC7FC14F090C9FCA7EB03FE90381F FFE0017F13F89038FE07FC9038F003FFD9C0011380496C13C090C7FC000E15E0C8127F16 F0A216F8A3121FEA3FC0487E12FF7FA316F05B15FFD87F8014E0007EC713C0003E5B003F 4913806C6C481300390FF01FFE6CB512F8000114E06C6C1380D90FF8C7FC25377BB530> 53 D63 D65 D67 DI72 DI77 D83 D87 D97 D<13FFB5FCA412077EAF4AB47E02 0F13F0023F13FC9138FE03FFDAF00013804AEB7FC00280EB3FE091C713F0EE1FF8A217FC 160FA217FEAA17FCA3EE1FF8A217F06E133F6EEB7FE06E14C0903AFDF001FF80903AF8FC 07FE009039F03FFFF8D9E00F13E0D9C00390C7FC2F3A7EB935>I<903801FFC0010F13FC 017F13FFD9FF8013802603FE0013C048485AEA0FF8121F13F0123F6E13804848EB7F0015 1C92C7FC12FFA9127FA27F123FED01E06C7E15036C6CEB07C06C6C14806C6C131FC69038 C07E006DB45A010F13F00101138023257DA42A>II<903803FF80011F13F0017F13FC3901FF83FE3A03 FE007F804848133F484814C0001FEC1FE05B003FEC0FF0A2485A16F8150712FFA290B6FC A301E0C8FCA4127FA36C7E1678121F6C6C14F86D14F000071403D801FFEB0FE06C9038C0 7FC06DB51200010F13FC010113E025257DA42C>II<161FD907FEEBFFC090387FFFE348B6EAEFE026 07FE07138F260FF801131F48486C138F003F15CF4990387FC7C0EEC000007F81A6003F5D A26D13FF001F5D6C6C4890C7FC3907FE07FE48B512F86D13E0261E07FEC8FC90CAFCA212 3E123F7F6C7E90B512F8EDFF8016E06C15F86C816C815A001F81393FC0000F48C8138048 157F5A163FA36C157F6C16006D5C6C6C495AD81FF0EB07FCD807FEEB3FF00001B612C06C 6C91C7FC010713F02B377DA530>I<13FFB5FCA412077EAFED7FC0913803FFF8020F13FE 91381F03FFDA3C01138014784A7E4A14C05CA25CA291C7FCB3A3B5D8FC3F13FFA4303A7D B935>II<13FFB5FCA412077EAF92380FFFE0A4923803FC0016F0ED0F E0ED1F804BC7FC157E5DEC03F8EC07E04A5A141FEC7FE04A7E8181A2ECCFFEEC0FFF496C 7F806E7F6E7F82157F6F7E6F7E82150F82B5D8F83F13F8A42D3A7EB932>107 D<13FFB5FCA412077EB3B3ACB512FCA4163A7DB91B>I<01FED97FE0EB0FFC00FF902601 FFFC90383FFF80020701FF90B512E0DA1F81903983F03FF0DA3C00903887801F000749DA CF007F00034914DE6D48D97FFC6D7E4A5CA24A5CA291C75BB3A3B5D8FC1FB50083B512F0 A44C257DA451>I<01FEEB7FC000FF903803FFF8020F13FE91381F03FFDA3C0113800007 13780003497E6D4814C05CA25CA291C7FCB3A3B5D8FC3F13FFA430257DA435>I<903801 FFC0010F13F8017F13FFD9FF807F3A03FE003FE048486D7E48486D7E48486D7EA2003F81 491303007F81A300FF1680A9007F1600A3003F5D6D1307001F5DA26C6C495A6C6C495A6C 6C495A6C6C6CB45A6C6CB5C7FC011F13FC010113C029257DA430>I<9039FF01FF80B500 0F13F0023F13FC9138FE07FFDAF00113800003496C13C00280EB7FE091C713F0EE3FF8A2 EE1FFCA3EE0FFEAA17FC161FA217F8163F17F06E137F6E14E06EEBFFC0DAF00313809139 FC07FE0091383FFFF8020F13E0020390C7FC91C9FCACB512FCA42F357EA435>I<9038FE 03F000FFEB0FFEEC3FFF91387C7F809138F8FFC000075B6C6C5A5CA29138807F80ED3F00 150C92C7FC91C8FCB3A2B512FEA422257EA427>114 D<90383FF0383903FFFEF8000F13 FF381FC00F383F0003007E1301007C130012FC15787E7E6D130013FCEBFFE06C13FCECFF 806C14C06C14F06C14F81203C614FC131F9038007FFE140700F0130114007E157E7E157C 6C14FC6C14F8EB80019038F007F090B512C000F8140038E01FF81F257DA426>I<130FA5 5BA45BA25B5BA25A1207001FEBFFE0B6FCA3000390C7FCB21578A815F86CEB80F014816C EBC3E090383FFFC06D1380903803FE001D357EB425>I<01FFEC3FC0B5EB3FFFA4000714 016C80B3A35DA25DA26C5C6E4813E06CD9C03E13FF90387FFFFC011F13F0010313803025 7DA435>III121 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fc ectt1000 10 80 /Fc 80 126 df<121FEA3F80EA7FC0EAFFE0B0EA7FC0AEEA1F00C7FCA7121FEA3F80EA7F C0EAFFE0A5EA7FC0EA3F80EA1F000B3470B32C>33 D<003C131E007F137F481480A66C14 00A6007E7FA6003E133EA3003C131E001C131C191977B32C>I<0107131C90380F803EA8 011F137EEC007CA4003FB612E0B712F8A43A003E00F800A2EB7E01017C5BA8EBFC0301F8 5BA2B712F8A4003F15E03A01F007C000A30003130F01E05BA86C486CC7FC25337DB22C> IIIII<143814FC13011303EB07F8EB0FF0EB1FC0EB3F80EB7F0013FE485A485A 5B12075B120F5B485AA2123F90C7FCA25A127EA312FE5AAC7E127EA3127F7EA27F121FA2 6C7E7F12077F12037F6C7E6C7E137FEB3F80EB1FC0EB0FF0EB07F8EB03FC130113001438 164272B92C>I<127012FC7E7E6C7E6C7EEA0FE06C7E6C7E6C7E6C7E137F7F1480131F14 C0130FEB07E0A214F01303A214F81301A314FC1300AC130114F8A3130314F0A2130714E0 A2EB0FC0131F1480133F14005B13FE485A485A485A485AEA3FC0485A48C7FC5A5A127016 4279B92C>II<1470 14F8AF003FB612E0B712F8A4C700F8C7FCB0147025267DAB2C>II<007FB512F0B612F8A36C14F01D0579942C>I<121FEA3F80EA7F C0EAFFE0A5EA7FC0EA3F80EA1F000B0B708A2C>I<1507ED0F80A2151F16005D153E157E 157CA215FC5D14015D14035D14075D140F5D141F92C7FC5C143EA2147E147C14FC5C1301 5C13035C13075C130F5C131F91C8FC5B133EA2137E137C13FC5B12015B12035B12075B12 0F5B121F90C9FCA25A123E127E127C12FC5AA2127021417BB92C>II<1307497EA2131FA2133F137F13FF5A1207127FB5FC13DF 139FEA7C1F1200B3AE007FB512E0B612F0A36C14E01C3477B32C>IIII<000FB512FE4880A35D0180C8FCADEB83FE9038 9FFF8090B512E015F8819038FE03FE9038F000FF01C07F49EB3F8090C7121F6C15C0C812 0FA2ED07E0A4123C127EB4FC150F16C0A248141F007EEC3F80007FEC7F006C6C5B6D485A 391FF80FFC6CB55A6C5C000114C06C6C90C7FCEB0FF823347CB22C>II56 DI<121FEA3F 80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F00C7FCAE121FEA3F80EA7FC0EAFFE0A5EA7FC0EA 3F80EA1F000B2470A32C>II<1502ED0F80151F157F15FF913803FE 00EC0FFCEC1FF0EC7FE0ECFF80D903FEC7FC495AEB1FF0495AEBFF80000390C8FCEA07FC EA1FF8EA3FE0EAFF8090C9FCA27FEA3FE0EA1FF8EA07FC6CB4FCC67FEB3FE06D7EEB07FC 6D7E903800FF80EC7FE0EC1FF0EC0FFCEC03FE913800FF80157F151F150FED0200212A7B AD2C>I<007FB612F0B712F8A36C15F0CAFCA8007FB612F0B712F8A36C15F025127DA12C> I<122012F87EB4FC7FEA3FE0EA1FF8EA07FC6CB4FCC67FEB3FE06D7EEB07FC6D7E903800 FF80EC7FE0EC1FF0EC0FFCEC03FE913800FF80157FA215FF913803FE00EC0FFCEC1FF0EC 7FE0ECFF80D903FEC7FC495AEB1FF0495AEBFF80000390C8FCEA07FCEA1FF8EA3FE0EAFF 8090C9FC12FC5A1220212A7BAD2C>I<14FE497EA4497FA214EFA2130781A214C7A2010F 7FA314C390381F83F0A590383F01F8A490387E00FCA549137E90B512FEA34880A29038F8 003FA34848EB1F80A4000715C049130FD87FFEEBFFFC6D5AB514FE6C15FC497E27347EB3 2C>65 D<02FF13700107EBE0F84913F9013F13FD4913FFEBFF813901FE007F4848131FD8 07F0130F1507485A491303485A150148C7FCA25A007EEC00F01600A212FE5AAB7E127EA3 007F15F06CEC01F8A26C7EA26C6C13036D14F06C6C130716E0D803FC131F6C6CEB3FC03A 00FF81FF806DB512006D5B010F5B6D13F00100138025357DB32C>67 D<007FB5FCB612C015F0816C803907E003FEEC00FFED7F80153FED1FC0ED0FE0A2150716 F0150316F81501A4ED00FCACED01F8A3150316F0A2150716E0150FED1FC0153FED7F80ED FF00EC03FE007FB55AB65A5D15C06C91C7FC26337EB22C>I<007FB612F0B712F8A37E39 03F00001A7ED00F01600A4EC01E04A7EA490B5FCA5EBF003A46E5A91C8FCA5163C167EA8 007FB612FEB7FCA36C15FC27337EB22C>I<007FB612F8B712FCA37ED803F0C7FCA71678 1600A515F04A7EA490B5FCA5EBF001A46E5A92C7FCAD387FFFE0B5FC805C7E26337EB22C >I72 D75 D<387FFFE0B57EA36C5BD803F0C8FCB3AE16F0ED01F8A800 7FB6FCB7FCA36C15F025337DB22C>IIII<007FB512C0B612F88115FF6C 15802603F00013C0153FED0FE0ED07F0A2150316F81501A6150316F01507A2ED0FE0ED3F C015FF90B61280160015FC5D15C001F0C8FCB0387FFF80B57EA36C5B25337EB22C>I<38 7FFFFCB67E15E015F86C803907E007FE1401EC007F6F7E151FA26F7EA64B5AA2153F4BC7 FCEC01FE140790B55A5D15E081819038E007FCEC01FE1400157F81A8160FEE1F80A5D87F FEEB1FBFB5ECFF00815E6C486D5AC8EA01F029347EB22C>82 D<90381FF80790B5EA0F80 4814CF000714FF5A381FF01F383FC003497E48C7FC007E147F00FE143F5A151FA46CEC0F 00007E91C7FC127F7FEA3FE0EA1FFCEBFFC06C13FC0003EBFFC06C14F06C6C7F01077F90 38007FFEEC07FF02001380153FED1FC0A2ED0FE0A20078140712FCA56CEC0FC0A26CEC1F 806D133F01E0EB7F009038FE01FF90B55A5D00F914F0D8F83F13C0D8700790C7FC23357C B32C>I<007FB612FCB712FEA43AFC007E007EA70078153CC71400B3AF90383FFFFCA249 7F6D5BA227337EB22C>I<3B7FFF803FFFC0B56C4813E0A36C496C13C03B03F00001F800 B3AF6D130300015DA26D130700005D6D130F017F495A6D6C485AECE0FF6DB5C7FC6D5B01 0313F86D5B9038003F802B3480B22C>I89 D<387FFFFCB512FEA314FC00FCC7FCB3B3B3B512FC 14FEA36C13FC17416FB92C>91 D<127012F8A27E127C127E123E123F7EA27F120F7F1207 7F12037F12017F12007F137C137E133EA2133F7F80130F80130780130380130180130080 147C147E143EA2143F8081140F81140781140381140181140081157CA2157E153E153F81 1680150FA2ED070021417BB92C>I<387FFFFCB512FEA37EC7127EB3B3B3387FFFFEB5FC A36C13FC17417DB92C>II<007FB6FCB71280A46C 150021067B7D2C>I<1338137CEA01FC1203EA07F813F0EA0FC0EA1F80A2EA3F00123E12 7E127CA212FC5AA3EAFFC013E013F013F8A2127FA2123F13F0EA1FE0EA07C00E1D72B82C >I<3801FFF0000713FE001F6D7E15E048809038C01FF81407EC01FC381F80000006C77E C8127EA3ECFFFE131F90B5FC1203120F48EB807E383FF800EA7FC090C7FC12FE5AA47E00 7F14FEEB8003383FE01F6CB612FC6C15FE6C14BF0001EBFE1F3A003FF007FC27247CA32C >II<903803FFE0011F13F8017F13FE48B5FC48804848C6FCEA0FF0485A49137E48 48131890C9FC5A127EA25AA8127EA2127F6C140F6DEB1F806C7E6D133F6C6CEB7F003907 FE03FF6CB55A6C5C6C6C5B011F13E0010390C7FC21247AA32C>IIIII< EA7FF0487EA3127F1201AAEC1FE0EC7FFC9038F9FFFE01FB7F90B6FC9138F03F80ECC01F 02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480A36C01E0140029337FB22C>I<13 07EB1FC0A2497EA36D5AA20107C7FC90C8FCA7387FFFC080B5FC7EA2EA0007B3A8007FB5 12FCB612FEA36C14FC1F3479B32C>I<140EEC3F80A2EC7FC0A3EC3F80A2EC0E0091C7FC A748B512804814C0A37EC7120FB3B3A2141F003C1480007E133FB414005CEB01FEEBFFFC 6C5B5C001F5B000790C7FC1A467CB32C>II<387FFFE0B57EA37EEA0003B3B3A5007FB6 1280B712C0A36C158022337BB22C>I<3A7F83F007E09039CFFC1FF83AFFDFFE3FFCD87F FF13FF91B57E3A07FE1FFC3E01FCEBF83F496C487E01F013E001E013C0A301C01380B33B 7FFC3FF87FF0027F13FFD8FFFE6D13F8D87FFC4913F0023F137F2D2481A32C>I<397FF0 1FE039FFF87FFC9038F9FFFE01FB7F6CB6FC00019038F03F80ECC01F02807FEC000F5B5B A25BB3267FFFE0B5FCB500F11480A36C01E0140029247FA32C>II<397FF01FE039 FFF8FFF801FB13FE90B6FC6C158000019038F07FC09138801FE091380007F049EB03F85B ED01FC491300A216FE167EA816FE6D14FCA2ED01F86D13036DEB07F0150F9138801FE091 38E07FC091B51280160001FB5B01F813F8EC3FC091C8FCAD387FFFE0B57EA36C5B27367F A32C>I<903903FC078090391FFF0FC0017F13CF48B512EF4814FF3807FE07380FF00148 487E49137F4848133F90C7FC48141F127E150F5AA87E007E141FA26C143F7F6C6C137F6D 13FF380FF0033807FC0F6CB6FC6C14EF6C6C138F6D130FEB07F890C7FCAD0203B5FC4A14 80A36E140029367DA32C>II<90387FF8700003B512F8120F5A5A387FC00F387E00034813015AA36CEB00 F0007F140013F0383FFFC06C13FE6CEBFF80000314E0C66C13F8010113FCEB0007EC00FE 0078147F00FC143F151F7EA26C143F6D133E6D13FE9038F007FC90B5FC15F815E000F814 8039701FFC0020247AA32C>I<131E133FA9007FB6FCB71280A36C1500D8003FC8FCB1ED 03C0ED07E0A5EC800F011FEB1FC0ECE07F6DB51280160001035B6D13F89038003FE0232E 7EAD2C>I<3A7FF003FF80486C487FA3007F7F0001EB000FB3A3151FA2153F6D137F3900 FE03FF90B7FC6D15807F6D13CF902603FE07130029247FA32C>I<3A7FFF01FFFCB514FE 148314016C15FC3A03E0000F80A26D131F00011500A26D5B0000143EA26D137E017C137C A2017E13FC013E5BA2EB3F01011F5BA21483010F5BA214C701075BA214EF01035BA214FF 6D90C7FCA26D5A147C27247EA32C>I I<3A3FFF03FFF048018713F8A36C010313F03A00FC007E005D90387E01F8013F5BEB1F83 EC87E090380FCFC0903807EF80EB03FF6D90C7FC5C6D5A147C14FE130180903803EF8090 3807CFC0EB0FC7EC83E090381F01F0013F7FEB7E00017C137C49137E0001803A7FFF01FF FC1483B514FE6C15FC140127247EA32C>I<3A7FFF01FFFCB5008113FE148314816C0101 13FC3A03E0000F806C7E151F6D140012005D6D133E137C017E137E013E137CA2013F13FC 6D5BA2EB0F815DA2EB07C1ECC3E0A2EB03E3ECE7C0130114F75DEB00FFA292C7FC80A214 3EA2147E147CA214FC5CA2EA0C01003F5BEA7F83EB87E0EA7E0F495A387FFF806C90C8FC 6C5A6C5AEA07E027367EA32C>I<15FF02071380141F147F91B512004913C04AC7FCEB03 F85CB31307EB1FE013FF007F5BB55A49C8FC6D7E6C7FC67F131FEB07F01303B380EB01FE ECFFC06D13FF6E1380141F14070200130021417BB92C>123 D<127812FCB3B3B3A91278 06416DB92C>II E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fd ecbx1200 12 54 /Fd 54 122 df28 D<391FC001FC397FE003 FF6D5A00FF1580A6007F1500A2497EA5003F5CA2EBC001A5001F5CA2EB8000A5000F5CA2 90C71278A2212275C538>34 D39 D44 DII<17C0EE01E01603A217C01607A2EE0F80A217 005EA2163EA2163C167CA25EA24B5AA25E1503A24B5AA25E150FA24BC7FCA2151E153EA2 5DA2157815F8A24A5AA25D1403A24A5AA25D140FA24AC8FCA2143EA2143C147CA25CA25C 1301A2495AA25C1307A2495AA291C9FC5BA2133EA2133C137CA25BA25B1201A2485AA248 5AA25B120FA248CAFCA2121E123EA25AA2127812F8A25A12602B647ACA38>II III<163FA25E5E5D5DA25D5D5D5D A25D92B5FCEC01F7EC03E7140715C7EC0F87EC1F07143E147E147C14F8EB01F0EB03E013 0714C0EB0F80EB1F00133E5BA25B485A485A485A120F5B48C7FC123E5A12FCB91280A5C8 000F90C7FCAC027FB61280A531417DC038>I<0007150301E0143F01FFEB07FF91B6FC5E 5E5E5E5E16804BC7FC5D15E092C8FC01C0C9FCAAEC3FF001C1B5FC01C714C001DF14F090 39FFE03FFC9138000FFE01FC6D7E01F06D13804915C0497F6C4815E0C8FC6F13F0A317F8 A4EA0F80EA3FE0487E12FF7FA317F05B5D6C4815E05B007EC74813C0123E003F4A1380D8 1FC0491300D80FF0495AD807FEEBFFFC6CB612F0C65D013F1480010F01FCC7FC010113C0 2D427BC038>I<4AB47E021F13F0027F13FC49B6FC01079038807F8090390FFC001FD93F F014C04948137F4948EBFFE048495A5A1400485A120FA248486D13C0EE7F80EE1E00003F 92C7FCA25B127FA2EC07FC91381FFF8000FF017F13E091B512F89039F9F01FFC9039FBC0 07FE9039FF8003FF17804A6C13C05B6F13E0A24915F0A317F85BA4127FA5123FA217F07F 121FA2000F4A13E0A26C6C15C06D4913806C018014006C6D485A6C9038E01FFC6DB55A01 1F5C010714C0010191C7FC9038003FF02D427BC038>I<121E121F13FC90B712FEA45A17 FC17F817F017E017C0A2481680007EC8EA3F00007C157E5E00785D15014B5A00F84A5A48 4A5A5E151FC848C7FC157E5DA24A5A14035D14074A5AA2141F5D143FA2147F5D14FFA25B A35B92C8FCA35BA55BAA6D5A6D5A6D5A2F447AC238>I I<903807FFC0013F13FC48B612804815E0260FF80013F0D81FC0EB3FF848C7EA1FFC4815 FE01C0130F486C14FF7FA66C485B6C4814FE000FC7FCC8EA3FFCED7FF8EDFFF04A13E04A 13801600EC07FC4A5A5D4A5A5D4A5A92C7FCA2147E147CA31478AA91C8FCA814F8EB03FE 497E497FA2497FA56D5BA26D90C7FC6D5AEB00F828467AC535>63 D65 D68 DI71 DII76 D80 D83 D<003FBA12E0A59026FE000F EB8003D87FE09338003FF049171F90C71607A2007E1803007C1801A300781800A400F819 F8481978A5C81700B3B3A20107B8FCA545437CC24E>II87 D<007FB6D8C003B61280A5D8000F01E0C7D801F8C7FC6D4C5A6F14076D6D5D6D6D4A5A4E 5A6D6D143F6E6C92C8FC6E157E705B6EEBC0016E01E05B4D5A6E6D485A6EEBF80F6E01FC 5B4D5A6E6D48C9FC6F6C5A6F137E5F6F5B815F816F7F81836F7F707E93B5FC844B805D4B 8004E77FDB0FC37FED1F83DB3F817F04007F037E137F4B8002016E7F4B6D7F4A5A4A486D 7F020F6E7F4B7F4A48814AC76C7F717F147E4A6F7E0101707F4A8149488349486F7F010F 707FB600E00103B612FCA54E447DC355>I<007FBA12E0BB12F0A46C19E04406776757> 95 D<903801FFE0011F13FE017F6D7E48B612E03A03FE007FF84848EB1FFC6D6D7E486C 6D7EA26F7FA36F7F6C5A6C5AEA00F090C7FCA40203B5FC91B6FC1307013F13F19038FFFC 01000313E0481380381FFE00485A5B127F5B12FF5BA35DA26D5B6C6C5B4B13F0D83FFE01 3EEBFFC03A1FFF80FC7F0007EBFFF86CECE01FC66CEB8007D90FFCC9FC322F7DAD36>97 DIIIIIII<137C48 B4FC4813804813C0A24813E0A56C13C0A26C13806C1300EA007C90C7FCAAEB7FC0EA7FFF A512037EB3AFB6FCA518467CC520>I107 DI<90277F8007FEEC0FFCB590263FFFC090387FFF8092B5D8F001B512E002816E48 80913D87F01FFC0FE03FF8913D8FC00FFE1F801FFC0003D99F009026FF3E007F6C019E6D 013C130F02BC5D02F86D496D7EA24A5D4A5DA34A5DB3A7B60081B60003B512FEA5572D7C AC5E>I<90397F8007FEB590383FFF8092B512E0028114F8913987F03FFC91388F801F00 0390399F000FFE6C139E14BC02F86D7E5CA25CA35CB3A7B60083B512FEA5372D7CAC3E> II<90397FC00FF8B590B57E 02C314E002CF14F89139DFC03FFC9139FF001FFE000301FCEB07FF6C496D13804A15C04A 6D13E05C7013F0A2EF7FF8A4EF3FFCACEF7FF8A318F017FFA24C13E06E15C06E5B6E4913 806E4913006E495A9139DFC07FFC02CFB512F002C314C002C091C7FCED1FF092C9FCADB6 7EA536407DAC3E>I<90387F807FB53881FFE0028313F0028F13F8ED8FFC91389F1FFE00 0313BE6C13BC14F8A214F0ED0FFC9138E007F8ED01E092C7FCA35CB3A5B612E0A5272D7D AC2E>114 D<90391FFC038090B51287000314FF120F381FF003383FC00049133F48C712 1F127E00FE140FA215077EA27F01E090C7FC13FE387FFFF014FF6C14C015F06C14FC6C80 0003806C15806C7E010F14C0EB003F020313E0140000F0143FA26C141F150FA27EA26C15 C06C141FA26DEB3F8001E0EB7F009038F803FE90B55A00FC5CD8F03F13E026E007FEC7FC 232F7CAD2C>IIIIIII E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fe ecbx1440 14.4 38 /Fe 38 122 df<151E153E15FE1403140F147FEB07FF0003B5FCB6FCA3EBF87FEAFC00C7 FCB3B3B3A6007FB712FCA52E4E76CD42>49 DI< 913807FFC0027F13FC0103B67E010F15E090261FF80313F890267FC0007F01FEC7EA3FFE 48488148486E138013FE486C6C6D13C0804817E080A66C5B18C06C5B6C90C75AD8003816 8090C8FC4C1300A24C5A5F4C5A4B5B4B13C0030F5BDB7FFEC7FC91387FFFF816C016FCEE FF80DA000313E09238007FF8EE3FFE707E70138018C07013E018F07013F8A218FC82A218 FEA3EA03C0EA0FF0EA3FFC487EA2B5FCA218FCA25E18F8A26C4816F0495C4916E0D83FE0 4A13C06C485CD80FF04A1380D807FE91387FFE003B03FFE003FFFC6C90B65A6C6C15E001 0F92C7FC010114FCD9001F1380374F7BCD42>I<17FC1601A216031607160FA2161F163F 167FA216FF5D5DA25D5D5D167F153E157E15FC15F8EC01F01403EC07E015C0EC0F80141F EC3F00143E5C14FC495A5C495A1307495A5C49C7FC5B137E137C5B1201485A5B485A120F 485A90C8FC123E127E5ABA1280A5C901FCC7FCAF021FB71280A5394F7CCE42>I<486C15 0601F0153E01FEEC01FED9FFF0133F91B65A5F5F5F5F5F94C7FC16FC5E16E093C8FC15FC 01F0138091CAFCAC913807FF80023F13F891B512FE01F36E7E9026FFFC0113E09139E000 7FF891C76C7E496E7E01F86E7E5B7013804916C0C9FC18E08218F0A418F8A31203EA0FE0 EA3FF8487EA212FF7FA218F0A25B5E6C4816E05B01C016C06CC85A18806C6C4A13007FD8 0FF04A5A6C6CECFFFCD803FE4913F02701FFE00F5B6C6CB612806D92C7FC010F14F80101 14C09026003FFCC8FC354F7ACD42>II<121F7F7FEBFF8091B8FCA4 5A18FE18FC18F818F0A218E018C018804817000180C8123E007EC9127E5F007C4B5A4C5A 5F16074C5A484B5A4CC7FC167E167CC912FC4B5A4B5AA24B5A150F4B5AA24B5AA24BC8FC 5DA25C5D1403A214075D140FA3141FA2143FA34A5AA414FFA65BAB6D5B6E5A6E5A6E5A38 5279D042>I63 D<173FA24D7EA34D7EA24C7FA34C7FA24C7FA34C7FA2 4C7FA34C7F163E83047E80EE7C3F04FC8016F8830301814C7E03038116E0830307814C7E 030F81168083031F811600834B81033E80037E82157C8403FC824B800201835D84020383 4B800207835D92B8FC4A83A34A8392C9FC4A83143E85027E84027C8202FC845C85010185 4A820103855C850107854A82A2494884D93FF082B600F0020FB712C0A55A547CD363>65 D68 D70 D72 DI80 D82 DI<003FBB12FCA59126C0007FEB000301FCC7ED003FD87FF0F0 0FFE49180749180349180190C81600A2007E1A7EA3007C1A3EA500FC1A3F481A1FA6C917 00B3B3AC49B912C0A550517BD05B>I97 DI<913803FFE0023F13FE91B67E010315E0010F9038003FF8D93FFC EB07FC4948497E4948131F4849497E485B485BA24890C7FC5A5B003F6F5A705A705A007F 92C8FC5BA312FFAD127F7FA3123F7F6CEE0F80A26C6D141F18006C6D5C6C6D143E6C6D14 7E6C6D5C6D6C495A6DB4EB07F0010F9038C01FE06D90B5128001014AC7FCD9003F13F802 03138031387CB63A>I<943803FF80040FB5FCA5EE003F170FB3A4913803FF80023F13F8 49B512FE0107ECFF8F011F9038C03FEF90273FFE0007B5FCD97FF8130149487F48498048 4980484980488291C8FC5A5B123FA2127F5BA312FFAD127FA37F123FA3121F7F6C5E6C6D 5C5F6C6D91B5FC6C6D5B6C6D4914E0D97FFCD90FEFEBFF80D91FFFEB7F8F010790B5120F 010114FC6D6C13E00207010049C7FC41547CD249>I<913807FF80027F13F849B512FE01 076E7E011F010313E0903A3FFC007FF0D97FF06D7E49486D7E4849130F48496D7E488248 90C77E1880485A82003F17C0A3485A18E082A212FFA290B8FCA401FCCAFCA6127FA37F12 3FA2EF03E06C7E17076C17C06C6D140F18806C6D141F6C6DEC3F006C6D147ED97FFC495A D91FFFEB07F86D9038E03FF0010390B512C001005D023F01FCC7FC020113E033387CB63C >IIII<133FEBFFC0 487F487FA2487FA66C5BA26C5B6C5B013FC7FC90C8FCAEEB1FF8B5FCA512017EB3B3A6B6 12F0A51C547CD324>I107 DIII<913801FFC0023F13FE91B67E010315E0010F018013F8903A3FFC001F FED97FF0EB07FF49486D7F48496D7F48496D7F91C8127F4883488349153F001F83A2003F 8349151FA2007F83A400FF1880AC007F1800A3003F5F6D153FA2001F5FA26C6C4B5AA26C 6D4A5A6C5F6C6D495B6C6D495B6D6C4990C7FCD93FFCEB1FFE6DB46CB45A010790B512F0 010115C0D9003F49C8FC020313E039387CB642>II<90393FF001FCB590380FFF804B13E0037F13F0 9238FE1FF89138F1F83F00019138F07FFC6CEBF3E015C0ECF780A2ECFF00EE3FF84AEB1F F0EE0FE093C7FC5CA45CB3ABB612FEA52E367DB535>114 D<903903FFC00E011FEBFC1E 90B6127E000315FE3907FE003FD80FF0130F4848130348481301491300127F90C8127EA2 48153EA27FA27F01F091C7FC13FCEBFF806C13FEECFFF06C14FE6F7E6C15E06C816C15FC 6C81C681133F010F15801301D9000F14C0EC003F030713E0150100F880167F6C153FA216 1F7EA217C07E6D143F17807F6DEC7F0001F85C6DEB03FE9039FF801FFC486CB512F0D8F8 1F14C0D8F00791C7FC39E0007FF02B387CB634>I<147CA614FCA41301A31303A21307A2 130F131F133F137F13FF1203000F90B512FEB7FCA426007FFCC8FCB3A9EE0F80ABEE1F00 6D7EA2011F143E806D6D5A6DEBC1F86DEBFFF001005C023F1380DA03FEC7FC294D7ECB33 >II119 D121 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Ff ecrm1000 10 80 /Ff 80 123 df21 D27 DI30 D<007C137C00FE13FEEAFF01A3EAFE 00A7007E13FC007C137CA8003C137800381338A700181330171E77BA2A>34 D<121C127FEAFF80A213C0A3127F121C1200A412011380A2120313005A1206120E5A5A5A 12600A1979B917>39 D<146014E0EB01C0EB0380EB0700130E131E5B5BA25B485AA2485A A212075B120F90C7FCA25A121EA2123EA35AA65AB2127CA67EA3121EA2121F7EA27F1207 7F1203A26C7EA26C7E1378A27F7F130E7FEB0380EB01C0EB00E01460135278BD20>I<12 C07E12707E7E7E120F6C7E6C7EA26C7E6C7EA21378A2137C133C133E131EA2131F7FA214 80A3EB07C0A6EB03E0B2EB07C0A6EB0F80A31400A25B131EA2133E133C137C1378A25BA2 485A485AA2485A48C7FC120E5A5A5A5A5A13527CBD20>I<121C127FEAFF80A213C0A312 7F121C1200A412011380A2120313005A1206120E5A5A5A12600A19798817>44 DI<121C127FEAFF80A5EA7F00121C0909798817>I<1506A2150E 150CA2151C151815381530A215701560A215E015C0A214011580A2140315005C1406A214 0E140CA2141C1418A214381430A21470146014E05CA213015CA2130391C7FCA25B1306A2 130E130C131C1318A213381330A213701360A213E05BA212015B120390C8FCA25A1206A2 120E120CA2121C1218A21238123012701260A212E05AA21F537BBD2A>IIIII<1538A2157815F8A2140114031407A2140F141F 141B14331473146314C313011483EB030313071306130C131C131813301370136013C012 01EA038013005A120E120C5A123812305A12E0B712F8A3C73803F800AA4A7E0103B512F8 A325387EB72A>I<0006140CD80780133C9038F003F890B5FC5D5D158092C7FC14FC3806 7FE090C9FCAAEB07F8EB1FFE9038780F809038E007E03907C003F0496C7E130000066D7E 81C8FC8181A21680A4121C127F5A7FA390C713005D12FC00605C12704A5A6C5C6C130300 1E495A6C6C485A3907E03F800001B5C7FC38007FFCEB1FE021397CB62A>II<12301238123E003FB612E0A316C05A168016000070C7120600 60140E5D5D00E014304814705D5DC712014A5A4AC7FC1406140E5CA25C1478147014F05C 1301A213035C1307A2130FA3131F5CA2133FA5137FA96DC8FC131E233A7BB72A>III<121C127FEAFF80A5EA7F00121CC7FC B2121C127FEAFF80A5EA7F00121C092479A317>I<121C127FEAFF80A5EA7F00121CC7FC B2121C127FEAFF80A213C0A3127F121C1200A412011380A2120313005A1206120E5A5A5A 12600A3479A317>II<007FB8 12F8B912FCCCFCB0B912FC6C17F836147B9E41>I<12E01278121EEA07C0EA01F0EA003C 130FEB03C0EB00F0143C140FEC03E0EC00F8151EED0780ED01E0ED0078161EEE07C0EE01 F0EE003C170FEF03C0A2EF0F00173CEE01F0EE07C0041EC7FC1678ED01E0ED0780031EC8 FC15F8EC03E0020FC9FC143C14F0EB03C0010FCAFC133CEA01F0EA07C0001ECBFC127812 E0322E79AB41>III<1538A3157CA315FEA34A7EA34A6C7EA202077FEC063FA202 0E7FEC0C1FA2021C7FEC180FA202387FEC3007A202707FEC6003A202C07F1501A2D90180 7F81A249C77F167FA20106810107B6FCA24981010CC7121FA2496E7EA3496E7EA3496E7E A213E0707E1201486C81D80FFC02071380B56C90B512FEA3373C7DBB3E>II<913A01FF800180020FEBE003027F13F8903A01FF807E07903A03FC000F0FD90F F0EB039F4948EB01DFD93F80EB00FF49C8127F01FE153F12014848151F4848150FA24848 1507A2485A1703123F5B007F1601A35B00FF93C7FCAD127F6DED0180A3123F7F001F1603 18006C7E5F6C7E17066C6C150E6C6C5D00001618017F15386D6C5CD91FE05C6D6CEB03C0 D903FCEB0F80902701FF803FC7FC9039007FFFFC020F13F002011380313D7BBA3C>IIIII II75 DIIIIII I I<003FB812E0A3D9C003EB001F273E0001FE130348EE01F00078160000701770A3006017 30A400E01738481718A4C71600B3B0913807FF80011FB612E0A335397DB83C>IIII<007FB590383FFFFCA3C601F801071380D97FE0D903FCC7FC013FEC01F06D6C5C 5F6D6C5C6D6C13034CC8FC6D6C1306160E6D6C5B6DEB8018163891387FC0306E6C5A16E0 6E6C5A91380FF18015FB6EB4C9FC5D14036E7EA26E7F6F7EA24B7E15DF9138019FF09138 038FF8150F91380607FC91380E03FE140C4A6C7EEC38000230804A6D7E14E04A6D7E4948 6D7E130391C76C7E01066E7E130E010C6E7E011C1401013C8101FE822607FF80010713E0 B500E0013FEBFF80A339397EB83E>I I<007FB81280B912C0A26C17803204797041>95 D97 DIIII<147E903803FF8090380FC1E0EB1F8790383F0FF0137EA213 FCA23901F803C091C7FCADB512FCA3D801F8C7FCB3AB487E387FFFF8A31C3B7FBA19>I< ED03F090390FF00FF890393FFC3C3C9039F81F707C3901F00FE03903E007C03A07C003E0 10000FECF000A248486C7EA86C6C485AA200075C6C6C485A6D485A6D48C7FC38073FFC38 060FF0000EC9FCA4120FA213C06CB512C015F86C14FE6CECFF804815C03A0F80007FE048 C7EA0FF0003E140348140116F8481400A56C1401007C15F06CEC03E0003F1407D80F80EB 0F80D807E0EB3F003901FC01FC39007FFFF0010790C7FC26387EA52A>IIIIII<2703F00FF0EB1FE000FFD93FFCEB7FF8913AF03F01E07E903BF1C01F8380 3F3D0FF3800FC7001F802603F70013CE01FE14DC49D907F8EB0FC0A2495CA3495CB3A348 6C496CEB1FE0B500C1B50083B5FCA340257EA445>I<3903F00FF000FFEB3FFCECF03F90 39F1C01F803A0FF3800FC03803F70013FE496D7EA25BA35BB3A3486C497EB500C1B51280 A329257EA42E>II<3903F01FE000FFEB7FF89038F1E07E9039F3801F 803A07F7000FC0D803FEEB07E049EB03F04914F849130116FC150016FEA3167FAA16FEA3 ED01FCA26DEB03F816F06D13076DEB0FE001F614C09039F7803F009038F1E07E9038F0FF F8EC1FC091C8FCAB487EB512C0A328357EA42E>II<3807E01F00FFEB7FC09038E1E3 E09038E387F0380FE707EA03E613EE9038EC03E09038FC0080491300A45BB3A2487EB512 F0A31C257EA421>II<1318A51338A31378A313F8120112031207001FB5FCB6FCA2D801F8C7FCB215 C0A93800FC011580EB7C03017E13006D5AEB0FFEEB01F81A347FB220>IIIIII<00 3FB512FCA2EB8003D83E0013F8003CEB07F00038EB0FE012300070EB1FC0EC3F80006013 7F150014FE495AA2C6485A495AA2495A495A495AA290387F000613FEA2485A485A000714 0E5B4848130C4848131CA24848133C48C7127C48EB03FC90B5FCA21F247EA325>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fg ecti1000 10 57 /Fg 57 122 df28 D<3801C0033903E00FC03807F01F120F13E0A21580EBC03FA2001F14001380A2 143E1300147E147C123EA21478123C14F85C5AA200705BA25CEA6001A200E05B12C01A1F 6DBA2A>34 D<150C151C153815F0EC01E0EC03C0EC0780EC0F00141E5C147C5C5C495A13 03495A5C130F49C7FCA2133EA25BA25BA2485AA212035B12075BA2120F5BA2121FA290C8 FCA25AA2123EA2127EA2127CA412FC5AAD1278A57EA3121C121EA2120E7EA26C7E6C7EA2 12001E5274BD22>40 D<140C140E80EC0380A2EC01C015E0A2140015F0A21578A4157C15 3CAB157CA715FCA215F8A21401A215F0A21403A215E0A21407A215C0140F1580A2141F15 00A2143EA25CA25CA2495AA2495A5C1307495A91C7FC5B133E133C5B5B485A12035B48C8 FC120E5A12785A12C01E527FBD22>I<120EEA3F80127F12FFA31300127E123C09097788 19>46 DI50 D<16E0ED03F0A3150716E0A3150F16C0A2151F1680A2153F1600A215 7EA35DA24A5AA24A5AA25D4A5AA24A5A141F92C7FC143EA25CECF81C153E903801F07EEB 03E014C0010713FE49485AEB1F00133EEB3C0101785B13F0EA01E03803C003D807FE5B38 1FFFC34813FB267C01FF13403AF0003FFFE000601307C71400EC0FE05DA3141F5DA3143F 92C7FCA4143E141C24477DB62A>52 D55 DI<133C137E13FF5AA313FE13FCEA0070 1300B2120EEA3F80127F12FFA31300127E123C102477A319>58 D<1838EF01F0EF07C0EF 1E001778EE03E0EE0F80043CC7FC16F0ED07C0031FC8FC1578EC01E0EC0F80023EC9FC14 F0EB03C0011FCAFC137CEA01E0EA0780003ECBFC12F85A123C120E6C7EEA01E0EA007813 1C130FEB03C0EB00F01438141EEC0780EC01E0EC0070153C150FED03C0ED00E01678161E EE0780EE01C0352E73AB40>60 D<131C130FEB0380EB01E0EB0078141E1407EC03C0EC00 F0153C150E6F7EED01E0ED0078161C160FEE03C0EE00F01738171EEF0780EF01E0EF0070 18F0EF03C0EF1F00177CEE01E0EE0780043EC7FC16F8ED03C0030FC8FC157CEC01F0EC07 80021EC9FC14F8EB03E0010FCAFC133CEA01F0EA07C0001ECBFC127812E0342E78AB40> 62 D64 DI< 0107B612FCEFFF8018C0903B000FF0001FF04BEB07F81703021F15FC17014B14FEA2023F 1400A24B1301A2147F18FC92C7120318F84A140718F04AEC0FE0EF1FC00101ED3F80EF7F 004AEB01FEEE07F849B612E05F9139F80007F0EE01FC01076E7E177F4AEC3F80A2010F16 C0171F5CA2131F173F5CA2133FEF7F805C1800017F5D4C5A91C7485A5F49140FEE1FE049 4A5A00014AB45AB748C7FC16F816C037397BB83A>II<0103B612FEEFFFC018F0903B0007F800 0FF84BEB03FCEF00FE020F157FF03F804B141F19C0021F150F19E05D1807143F19F05DA2 147FA292C8FCA25C180F5CA2130119E04A151FA2130319C04A153FA201071780187F4A16 00A2010F16FEA24A4A5A60011F15034D5A4A5D4D5A013F4B5A173F4A4AC7FC17FC017FEC 03F84C5A91C7EA1FC04949B45A007F90B548C8FCB712F016803C397CB83F>I<0107B8FC A3903A000FF000034BEB007F183E141F181E5DA2143FA25D181C147FA29238000380A24A 130718004A91C7FC5E13015E4A133E167E49B512FEA25EECF8000107147C163C4A1338A2 010F147818E04A13701701011F16C016004A14031880013F150718004A5CA2017F151E17 3E91C8123C177C4915FC4C5A4914070001ED7FF0B8FCA25F38397BB838>I<0107B712FE A3903A000FF000074B1300187C021F153CA25DA2143FA25D1838147FA292C8FCEE03804A 130718004A91C7FCA201015CA24A131E163E010314FE91B5FC5EA2903807F800167C4A13 78A2130FA24A1370A2011F14F0A24A90C8FCA2133FA25CA2137FA291CAFCA25BA25B487E B6FCA337397BB836>I<0103B5D8F80FB512E0A390260007F8C7381FE0004B5DA2020F15 3F615DA2021F157F96C7FC5DA2023F5D605DA2027F14016092C7FCA24A1403605CA249B7 FC60A202FCC712070103150F605CA20107151F605CA2010F153F605CA2011F157F95C8FC 5CA2013F5D5F5CA2017F14015F91C7FC491403007FD9FE01B512F8B55BA243397CB83E> 72 D<0207B512F0A391390007FC006F5AA215075EA3150F5EA3151F5EA3153F5EA3157F 93C7FCA35D5DA314015DA314035DA31407A25DA2140FA2003F5C5A141F485CA24A5A12FC 00E049C8FC14FE00705B495A6C485A381E0FC06CB4C9FCEA01F82C3B78B82C>74 D<0107B512FCA25E9026000FF8C7FC5D5D141FA25DA2143FA25DA2147FA292C8FCA25CA2 5CA21301A25CA21303A25CA21307A25CA2130F170C4A141CA2011F153C17384A1478A201 3F157017F04A14E01601017F140317C091C71207160F49EC1F80163F4914FF0001020713 00B8FCA25E2E397BB834>76 D<902607FFF8923807FFF0614F13E0D9000FEFF0004F5AA2 021F167FF1EFC0141DDA1CFCEC01CF023C16DF9538039F800238ED071FA20278ED0E3F97 C7FC0270151CA202F04B5AF0707E14E0037E14E0010117FE4D485A02C0EC0380A20103ED 0701610280140EA20107ED1C0305385B14006F137049160705E05B010EEC01C0A2011E91 3803800F61011CEC0700A2013C020E131F4C5C1338ED1FB80178163F04F091C8FC01705C A201F04A5B187E00015DD807F816FEB500C09039007FFFFC151E150E4C397AB84A>I79 D<0107B612F817FF1880903B000FF0003FE04BEB0FF0EF03F8141FEF01FC5DA2023F15FE A25DA2147FEF03FC92C7FCA24A15F817074A15F0EF0FE01301EF1FC04AEC3F80EFFE0001 034A5AEE0FF091B612C04CC7FCD907F8C9FCA25CA2130FA25CA2131FA25CA2133FA25CA2 137FA291CAFCA25BA25B1201B512FCA337397BB838>II<0103B612F017FEEFFF80903B0007F8003FC04BEB0FF01707020FEC03F8EF01 FC5DA2021F15FEA25DA2143FEF03FC5DA2027FEC07F818F092C7120F18E04AEC1FC0EF3F 004A14FEEE01F80101EC0FE091B6128004FCC7FC9138FC003F0103EC0F80834A6D7E8301 071403A25C83010F14075F5CA2011F140FA25CA2133F161F4AECE007A2017F160F180E91 C7FC49020F131C007F01FE153CB5913807F078040313F0CAEAFFE0EF3F80383B7CB83D> I<92383FC00E913901FFF01C020713FC91391FC07E3C91393F001F7C027CEB0FF84A1307 49481303495A4948EB01F0A2495AA2011F15E091C7FCA34915C0A36E90C7FCA2806D7E14 FCECFF806D13F015FE6D6D7E6D14E0010080023F7F14079138007FFC150F15031501A215 00A2167C120EA3001E15FC5EA3003E4A5AA24B5AA2007F4A5A4B5A6D49C7FC6D133ED8F9 F013FC39F8FC03F839F07FFFE0D8E01F138026C003FCC8FC2F3D7ABA2F>I<0007B812E0 A25AD9F800EB001F01C049EB07C0485AD900011403121E001C5C003C1780140312380078 5C00701607140700F01700485CA2140FC792C7FC5DA2141FA25DA2143FA25DA2147FA292 C9FCA25CA25CA21301A25CA21303A25CA21307A25CA2130FA25CEB3FF0007FB512F8B6FC A2333971B83B>I87 D89 D95 D<14F8EB07FE90381F871C90383E03FE137CEBF801120148486C5A485A120FEBC001 001F5CA2EA3F801403007F5C1300A21407485C5AA2140F5D48ECC1C0A2141F1583168014 3F1587007C017F1300ECFF076C485B9038038F8E391F0F079E3907FE03FC3901F000F022 2677A42A>97 D<133FEA1FFFA3C67E137EA313FE5BA312015BA312035BA31207EBE0F8EB E7FE9038EF0F80390FFC07C013F89038F003E013E0D81FC013F0A21380A2123F1300A214 075A127EA2140F12FE4814E0A2141F15C05AEC3F80A215005C147E5C387801F8007C5B38 3C03E0383E07C0381E1F80D80FFEC7FCEA01F01C3B77B926>I<147F903803FFC090380F C1E090381F0070017E13784913383901F801F83803F003120713E0120FD81FC013F091C7 FC485AA2127F90C8FCA35A5AA45AA3153015381578007C14F0007EEB01E0003EEB03C0EC 0F806CEB3E00380F81F83803FFE0C690C7FC1D2677A426>II<147F903803FFC090 380FC1E090383F00F0017E13785B485A485A485A120F4913F8001F14F0383F8001EC07E0 EC1F80397F81FF00EBFFF8148090C8FC5A5AA55AA21530007C14381578007E14F0003EEB 01E0EC03C06CEB0F806CEB3E00380781F83803FFE0C690C7FC1D2677A426>IIIII107 DIII<147F903803FFC090380FC1F090381F00F8017E137C5B4848 137E4848133E0007143F5B120F485AA2485A157F127F90C7FCA215FF5A4814FEA2140115 FC5AEC03F8A2EC07F015E0140F007C14C0007EEB1F80003EEB3F00147E6C13F8380F83F0 3803FFC0C648C7FC202677A42A>I<9039078007C090391FE03FF090393CF0787C903938 F8E03E9038787FC00170497EECFF00D9F0FE148013E05CEA01E113C15CA2D80003143FA2 5CA20107147FA24A1400A2010F5C5E5C4B5A131F5EEC80035E013F495A6E485A5E6E48C7 FC017F133EEC70FC90387E3FF0EC0F8001FEC9FCA25BA21201A25BA21203A25B1207B512 C0A3293580A42A>II<3903C003F0390FF0 1FFC391E783C0F381C7C703A3C3EE03F8038383FC0EB7F800078150000701300151CD8F0 7E90C7FCEAE0FE5BA2120012015BA312035BA312075BA3120F5BA3121F5BA3123F90C9FC 120E212679A423>I<14FE903807FF8090380F83C090383E00E04913F00178137001F813 F00001130313F0A215E00003EB01C06DC7FC7FEBFFC06C13F814FE6C7F6D13807F010F13 C01300143F141F140F123E127E00FE1480A348EB1F0012E06C133E00705B6C5B381E03E0 6CB45AD801FEC7FC1C267AA422>II<13F8D803FEEB01C0D8078FEB03E0390E0F8007121E121C0038140F131F0078 15C01270013F131F00F0130000E015805BD8007E133FA201FE14005B5D120149137EA215 FE120349EBFC0EA20201131E161C15F813E0163CD9F003133814070001ECF07091381EF8 F03A00F83C78E090393FF03FC090390FC00F00272679A42D>I<01F0130ED803FC133FD8 071EEB7F80EA0E1F121C123C0038143F49131F0070140FA25BD8F07E140000E08013FEC6 485B150E12015B151E0003141C5BA2153C000714385B5DA35DA24A5A140300035C6D48C7 FC0001130E3800F83CEB7FF8EB0FC0212679A426>I<01F01507D803FC903903801F80D8 071E903907C03FC0D80E1F130F121C123C0038021F131F49EC800F00701607A249133FD8 F07E168000E0ED000313FEC64849130718000001147E5B03FE5B0003160E495BA2171E00 070101141C01E05B173C1738A217781770020314F05F0003010713016D486C485A000190 391E7C07802800FC3C3E0FC7FC90393FF81FFE90390FE003F0322679A437>I<903907E0 07C090391FF81FF89039787C383C9038F03E703A01E01EE0FE3803C01F018013C0D80700 14FC481480000E1570023F1300001E91C7FC121CA2C75AA2147EA214FEA25CA21301A24A 1370A2010314F016E0001C5B007E1401010714C000FEEC0380010F1307010EEB0F003978 1CF81E9038387C3C393FF03FF03907C00FC027267CA427>I<13F0D803FCEB01C0D8071E EB03E0D80E1F1307121C123C0038140F4914C01270A249131FD8F07E148012E013FEC648 133F160012015B5D0003147E5BA215FE00075C5BA214015DA314035D14070003130FEBF0 1F3901F87FE038007FF7EB1FC7EB000F5DA2141F003F5C48133F92C7FC147E147C007E13 FC387001F8EB03E06C485A383C1F80D80FFEC8FCEA03F0233679A428>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fh ecrm1200 12 38 /Fh 38 234 df45 D<160CA2161C1618A21638163016701660A2 16E016C0A21501168015031600A25D1506A2150E150CA2151C151815381530A215701560 A215E05DA214015D140392C7FCA25C1406A2140E140C141C1418A214381430A214701460 A214E05C13015CA2130391C8FCA25B1306130E130CA2131C1318A213381330A213701360 13E05BA212015BA2120390C9FCA25A1206120E120CA2121C1218A21238123012701260A2 12E05AA226647BCA31>47 D<14FF010713E090381F81F890383E007C01FC133F4848EB1F 8049130F4848EB07C04848EB03E0A2000F15F0491301001F15F8A2003F15FCA390C8FC48 15FEA54815FFB3A46C15FEA56D1301003F15FCA3001F15F8A26C6CEB03F0A36C6CEB07E0 000315C06D130F6C6CEB1F806C6CEB3F00013E137C90381F81F8903807FFE0010090C7FC 28447CC131>I<143014F013011303131F13FFB5FC13E713071200B3B3B0497E497E007F B6FCA3204278C131>II<49B4FC010F 13E0013F13FC9038FE01FE3A01F0007F80D803C0EB3FC048C7EA1FE0120EED0FF0EA0FE0 486C14F8A215077F5BA26C48130FEA03C0C813F0A3ED1FE0A2ED3FC01680ED7F0015FE4A 5AEC03F0EC1FC0D90FFFC7FC15F090380001FCEC007FED3F80ED1FC0ED0FE016F0ED07F8 16FC150316FEA2150116FFA3121EEA7F80487EA416FE491303A2007EC713FC0070140700 3015F80038140F6C15F06CEC1FE06C6CEB3FC0D803E0EB7F803A01FE01FE0039007FFFF8 010F13E0010190C7FC28447CC131>II54 D<14FF010713E0011F13F890387F00FE01FC133FD801F0EB1F804848EB0FC049EB07E000 07EC03F048481301A290C713F8481400A47FA26D130116F07F6C6CEB03E013FC6C6CEB07 C09039FF800F806C9038C01F006CEBF03EECF87839007FFEF090383FFFC07F01077F6D13 F8497F90381E7FFFD97C1F1380496C13C02601E00313E048486C13F000079038007FF848 48EB3FFC48C7120F003EEC07FE150148140016FF167F48153FA2161FA56C151E007C153E A2007E153C003E157C6C15F86DEB01F06C6CEB03E06C6CEB07C0D803F8EB1F80C6B4EBFF 0090383FFFFC010F13F00101138028447CC131>56 D<14FF010713E0011F13F890387F80 FC9038FC007E48487F4848EB1F804848EB0FC0000FEC07E0485AED03F0485A16F8007F14 0190C713FCA25AA216FE1500A516FFA46C5CA36C7E5D121F7F000F5C6C6C1306150E6C6C 5B6C6C5BD8007C5B90383F01E090390FFF80FE903801FE0090C8FC150116FCA4ED03F8A2 16F0D80F801307486C14E0486C130F16C0ED1F80A249EB3F0049137E001EC75A001C495A 000F495A3907E01FE06CB51280C649C7FCEB1FF028447CC131>I<121EEA7F80A2EAFFC0 A4EA7F80A2EA1E00C7FCB3A5121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A2B78AA1B>I< 16C04B7EA34B7EA34B7EA34B7EA3ED19FEA3ED30FFA203707FED607FA203E07FEDC03FA2 020180ED801FA2DA03007F160FA20206801607A24A6D7EA34A6D7EA34A6D7EA202708102 60147FA202E08191B7FCA249820280C7121FA249C87F170FA20106821707A2496F7EA349 6F7EA3496F7EA201788313F8486C83D80FFF03037FB500E0027FEBFFC0A342477DC649> 65 D68 D71 D73 D78 DII82 D<49B41303010FEBE007013F13F89039FE00FE0FD801F8131FD807E0 EB079F49EB03DF48486DB4FC48C8FC4881003E81127E82127C00FC81A282A37E82A27EA2 6C6C91C7FC7F7FEA3FF813FE381FFFE06C13FE6CEBFFE06C14FC6C14FF6C15C0013F14F0 010F80010180D9001F7F14019138001FFF03031380816F13C0167F163F161F17E000C015 0FA31607A37EA36C16C0160F7E17806C151F6C16006C5D6D147ED8FBC05CD8F9F0495AD8 F07C495A90393FC00FE0D8E00FB51280010149C7FC39C0003FF02B487BC536>I97 D99 D<167FED3FFFA315018182B3EC7F80903803 FFF090380FC07C90383F000E017E1307496D5AD803F87F48487F5B000F81485AA2485AA2 127FA290C8FC5AAB7E7FA2123FA26C7EA2000F5D7F6C6C5B00035C6C6C9038077F806C6C 010E13C0013F011C13FE90380FC0F8903803FFE09026007F0013002F467DC436>III104 D107 DI<3901FC01FE00FF903807FFC091381E07F0913838 01F8000701707F0003EBE0002601FDC07F5C01FF147F91C7FCA25BA35BB3A8486CECFF80 B5D8F83F13FEA32F2C7DAB36>110 DI<39 03F803F000FFEB1FFCEC3C3EEC707F0007EBE0FF3803F9C000015B13FBEC007E153C01FF 13005BA45BB3A748B4FCB512FEA3202C7DAB26>114 D<90383FE0183901FFFC383907E0 1F78390F0003F8001E1301481300007C1478127800F81438A21518A27EA27E6C6C13006C 7E13FC383FFFE06C13FC6C13FF6C14C06C14E0C614F0011F13F81300EC0FFC140300C0EB 01FE1400157E7E153EA27EA36C143C6C147C15786C14F86CEB01F039F38003E039F1F00F 8039E07FFE0038C00FF01F2E7DAC26>I<1306A5130EA4131EA3133E137EA213FE120112 07001FB512F0B6FCA2C648C7FCB3A4150CAA017E131C017F1318A26D133890381F8030EC C070903807E0E0903801FFC09038007F001E3E7EBC26>IIII121 D<1402EC0F804A7E143F147FA24A5A4990C7FCEB03FC495A EB0FE0148049C8FC133C1338132090C9FCA4EB01FE903807FFC090381F03F090387E00FC 49137E48487F485A4848EB1F80000F15C049130F121F484814E01507A2007F15F090C7FC A25AA390B6FCA290C9FCA67EA27FA2123F16306C7E1670000F15606D14E06C6C14C00003 14016C6CEB03806C6CEB0700013E131E90381F80F8903803FFE0010090C7FC24427DC02B >233 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fi ecrm1728 17.28 8 /Fi 8 117 df<170FA34D7EA24D7EA34D7EA34D7EA34C7F17DFA29338039FFC178FA293 38070FFE1707040F7FEE0E03A2041E80EE1C01A2043C80EE3800A24C80187FA24C80183F A24B4880181F0303814C130FA203078193C71207A24B81030E80A24B8284A24B8284A24B 82197F03F0824B153FA20201834B151FA202038392B8FCA24A83A292C91207020E8385A2 4A8485023C84023882A20278840270177FA202F0844A173FA24948841A1FA24948841A0F A249CB7F1A074985865B496C85497E48486C4D7F000F01F8051F13F0B60407B612F0A45C 657CE465>65 D68 D70 D<933801FFE0043F13FF4BB612E00307903800 3FF8DB1FF0EB03FEDB7FC0903800FF804A48C8EA3FE0DA03FCED0FF0DA0FF8ED07FCDA1F E0ED01FE4A486F7E4A48707E4ACA6C7E4948717E4948717E4948717E010F854948717E49 48717EA24948717F01FF864A187F4890CC6C7EA2488749191F00078749190F000F87A200 1F87491907A2003F87A24985A2007F1C80A44985A200FF1CC0AF007F1C806D61A4003F1C 00A36D61001F63A36C6C4F5AA20007636D191FA26C6C4F5AA26C636C6DDA3F804A5AEFFF E06D6C010301F84A5A6D6C902607C07C4990C7FC93380F001E6D6C011E6D495A6D6C6F49 5A0107021CD903805B6D6C013C6D6C485A6E0138151F6D6C0300495A6D01806F485ADA3F C04CC8FCDA1FE0ED71FE91260FF83CEC77FC912607FC1CEC7FF8912601FF1EEC3FE09126 007FDEECFF80DB1FFFD903FEC9FC03079038C03FF8030190B56C1560DB003F143C0401EB E01C93C8121EA21DE0191FA3736C13011DC0741303A274130774130F736CEB1F8074133F 9738FF01FF7390B51200A264856485745B745B745B08071380E001FEC7FC5B8079E369> 81 D97 D101 D110 D<1470A714F0A51301A31303A21307A2130FA2131F133F137F 13FF1203000F90B6FCB8FCA326000FF0C8FCB3AEEE01C0AE6D6CEB0380A316076D6C1400 5E6D6C130E6D6C131E6E6C5A91383FE0F86EB45A020713C0020090C7FC2A597ED734> 116 D E %EndDVIPSBitmapFont end %%EndProlog %%BeginSetup %%Feature: *Resolution 600dpi TeXDict begin %%PaperSize: A4 %%EndSetup %%Page: 1 1 1 0 bop 1328 882 a Fi(Dan)l(te)45 b(F)-15 b(A)l(Q)1205 1125 y Fh(Inferno)33 b(Nettv)m(erk)i(A/S)1247 1242 y(Oslo)d(Researc)m (h)i(P)m(ark)1298 1358 y(Gaustadall\351en)d(21)1365 1474 y(NO-0349)g(Oslo)1502 1590 y(Norw)m(a)m(y)1094 2127 y(Date:)44 b(2006/01/08)30 b(18:33:48)383 2645 y Fg(Se)l(e)59 b (http://www.inet.no/dante/F)-8 b(A)n(Q/)33 b(for)d(the)g(latest)g (version)g(of)h(this)f(faq.)377 2747 y Ff(Send)e(up)r (dates/corrections)d(to)i(the)h(public)g(mailinglist)g(dan)n (te-misc@inet.no.)232 3034 y Fe(1)132 b(Rep)t(orting)43 b(problems)h(or)g(bugs)f(in)i(Dan)l(te)232 3236 y Fd(1.1)113 b(Wh)m(y)34 b(w)m(as)h(I)e(told)h(to)f(read)i(this)f(in)f(resp)s(onse)i (to)f(m)m(y)g(sup)s(erb)488 3353 y(problem/bug)j(rep)s(ort?)232 3510 y Ff(Because)31 b(y)n(ou)g(w)n(ere)f(unable)i(to)f(pro)n(vide)f(a) h(usable)g(rep)r(ort.)48 b(Since)32 b(there)f(are)g(so)f(man)n(y)232 3610 y(of)f(y)n(ou,)e(w)n(e)h(prefer)f(to)h(refer)g(y)n(ou)f(to)h(this) g(F)-9 b(A)n(Q)28 b(rather)f(than)h(rep)r(eating)f(ourselv)n(es)g(o)n (v)n(er)232 3709 y(and)h(o)n(v)n(er.)232 3954 y Fd(1.2)113 b(Wh)m(y)37 b(is)g("it)f(do)s(es)i(not)f(w)m(ork")g(not)g(a)h(go)s(o)s (d)g(rep)s(ort?)232 4112 y Ff(It's)31 b(a)e(common)g(misconception)h (among)e(users)h(who)h(ha)n(v)n(e)f(nev)n(er)g(done)g(an)n(y)g (program-)232 4211 y(ming)f(that)g(b)n(y)f(stating)g(something)g(along) g(the)h(lines)f(of)h("it)g(do)r(es)f(not)g(w)n(ork",)f(or)h("I)g(get) 232 4311 y(a)g(segmen)n(tation)e(fault")i(\(these)g(are)e(real)h (examples,)g(b)r(eliev)n(e)g(it)h(or)f(not\),)h(the)g(program-)232 4411 y(mers)c(at)g(Inferno)g(Nettv)n(erk)g(will)g(without)h(a)e(shred)h (of)g(doubt)h(b)r(e)f(able)g(to)g(pin-p)r(oin)n(t)h(that)232 4510 y(one)35 b(line,)j(that)e(one)f(line)h(among)e(the)i(thousands)e (of)i(other)f(lines,)i(resp)r(onsible)d(for)h(it)232 4610 y("not)28 b(w)n(orking")d(or)h("segmen)n(tation)g(faulting".)357 4712 y(The)d(fact)h(is,)g(an)n(y)e(one)h(of)g(the)h(tens)f(of)g (thousands)g(of)g(lines)g(could)g(b)r(e)h(the)f("bad")g(line,)232 4811 y(w)n(e)31 b(don't)g(ha)n(v)n(e)f(time)h(to)g(re-read)e(them)i (all)g(eac)n(h)f(time)h(w)n(e)g(get)f(a)h("it)f(do)r(es)h(not)g(w)n (ork")232 4911 y(message.)232 5156 y Fd(1.3)113 b(Ho)m(w)26 b(can)h(I)g(pro)m(vide)f(y)m(ou)h(with)f(the)h(information)e(y)m(ou)i (need?)232 5313 y Ff(First)21 b(of)g(all,)g(lo)r(ok)f(in)h(the)g (con\034g)f(\034le)h(y)n(ou)f(are)f(using.)34 b(If)21 b(y)n(ou)f(are)g(using)g(the)h(Dan)n(te)g(clien)n(t,)232 5413 y(it's)g(/etc/so)r(c)n(ks.conf.)32 b(If)20 b(y)n(ou)f(are)g(using) h(the)g(Dan)n(te)g(serv)n(er,)f(it's)i(/etc/so)r(c)n(kd.conf.)32 b(Both)1644 5662 y(1)p eop %%Page: 2 2 2 1 bop 656 531 a Ff(\034les)22 b(con)n(tain)f(b)n(y)h(default)h(the)g (lines)f("logoutput:".)33 b(Set)23 b("logoutput:")e(to)h(some)g(\034le) g(that)656 631 y(Dan)n(te)27 b(can)h(log)e(output)i(to.)780 731 y(If)33 b(the)g(problem)e(is)h(with)h(the)g(clien)n(t,)g(also)e (uncommen)n(t)i(the)f(line)h(con)n(taining)e("de-)656 830 y(bug".)47 b(If)32 b(the)f(problem)g(is)g(with)h(the)f(serv)n(er,)f (also)h(add)g("-d")f(to)h(whatev)n(er)f(argumen)n(ts)656 930 y(y)n(ou)d(usually)g(start)g(the)h(serv)n(er)d(with.)780 1029 y(Rep)r(eat)h(whatev)n(er)e(y)n(ou)g(did)i(to)f(pro)r(duce)g(the)g (error)e(and)i(lo)r(ok)g(at)g(the)h(log)e(messages.)656 1129 y(Do)j(they)h(pro)n(vide)f(an)n(y)f(hin)n(ts?)780 1229 y(If)d(it)f(lo)r(oks)f(lik)n(e)g(a)h(user)f(error,)g(y)n(ou)g (con\034gured)g(something)g(wrong,)h(etc.)35 b(y)n(ou)21 b(can)h(try)656 1328 y(sending)e(a)f(mail)i(to)f(dan)n (te-misc@inet.no,)g(a)g(public)g(mailing)g(list)h(where)e(someone)g (migh)n(t)656 1428 y(b)r(e)27 b(kind)h(enough)e(to)h(help)h(y)n(ou)e (if)i(y)n(ou)e(form)n(ulate)g(y)n(our)g(question)h(in)g(a)g (understandable)656 1528 y(w)n(a)n(y)-7 b(.)61 b(And)36 b(remem)n(b)r(er,)i(unless)e(y)n(ou)f(are)g(a)g(customer)h(of)g (Inferno)f(Nettv)n(erk,)j(no)e(one)656 1627 y(o)n(w)n(es)30 b(y)n(ou)h(an)n(y)f(supp)r(ort)h(or)g(help,)i(y)n(ou)d(are)h(the)h(one) f(asking)f(someone)g(to)h(sp)r(end)h(their)656 1727 y(time)c(to)f(help) h(y)n(ou,)f(not)h(the)g(other)f(w)n(a)n(y)f(around.)780 1826 y(If)i(it)g(lo)r(oks)f(lik)n(e)g(a)g(bug,)h(\034rst)f(p)r(erform)g (the)h(follo)n(wing)f(step:)757 1993 y(1.)41 b(Mak)n(e)23 b(sure)g(that)h(y)n(ou)e(are)h(using)g(the)h(latest)f(v)n(ersion)f(of)h (Dan)n(te,)i(ev)n(en)e(if)h(the)f(latest)863 2092 y(v)n(ersion)29 b(is)h(a)g("prerelease")e(and)i(y)n(ou)f(are)h(using)g(o\036cial)f (release.)44 b(Alw)n(a)n(ys)29 b(c)n(hec)n(k)863 2192 y(ftp.inet.no:/pub/so)r(c)n(ks/)k(to)h(see)f(if)i(there's)e(a)h(later)f (v)n(ersion)f(b)r(efore)i(sending)g(a)863 2291 y(bugrep)r(ort.)863 2424 y(Next,)h(dep)r(ending)e(on)g(whether)f(the)i(susp)r(ected)f(bug)f (is)h(in)g(the)h(clien)n(t)f(or)f(sev)n(er,)863 2524 y(do)c(one)f(of)g(the)h(follo)n(wing:)863 2657 y(If)g(it's)g(a)f(bug)h (in)g(the)g(clien)n(t:)899 2823 y(\(a\))41 b(Compile)35 b(the)h(program)e(y)n(ou)g(are)h(trying)f(to)i(so)r(c)n(ksify)e(with)i (the)g(compiler)1046 2922 y(option)27 b("-g".)894 3055 y(\(b\))42 b(Compile)27 b(Dan)n(te)h(with)g("-g")e (\(\025enable-debugging)f(option)j(to)f(con\034gure\).)903 3188 y(\(c\))42 b(Set)28 b(debug)f(and)h(logoutput)f(as)g(describ)r(ed) g(ab)r(o)n(v)n(e.)894 3321 y(\(d\))42 b(cp)28 b(/dev/n)n(ull)e ()g(\(to)h(mak)n(e)f(sure)g(it's)g(empt)n(y)-7 b(.\))903 3454 y(\(e\))42 b(ktrace/truss/strace/)17 b(so)r(c)n(ksify)23 b(.)32 b(Sa)n(v)n(e)23 b(the)1046 3553 y(output)32 b(to)g(a)g(\034le.)50 b(If)32 b(y)n(ou)f(ha)n(v)n(e)g(a)h(program)d(that)k(can)e(trace)g(library)g (calls)1046 3653 y(to)r(o)j(\(late)g(v)n(ersion)f(of)h(Solaris)f(truss) h(and)g(redhat)g(Lin)n(ux)g(apparen)n(tly)f(do\),)1046 3753 y(please)27 b(include)h(information)f(ab)r(out)g(that)h(to)r(o.) 908 3885 y(\(f)6 b(\))43 b(If)28 b(a)f(coredump)g(w)n(as)g(generated)f (do)1046 4035 y Fc($)43 b(gdb)g()g()1046 4134 y(\(gdb\))h(backtrace)d(50)1046 4384 y Ff(Sa)n(v)n(e)26 b(the)i(output)g(to)g(a)f(\034le.)863 4550 y(If)h(it's)g(a)f(bug)h(in)g (the)g(serv)n(er:)899 4716 y(\(a\))41 b(Compile)27 b(Dan)n(te)h(with)g ("-g")e(\(\025enable-debugging)f(option)j(to)f(con\034gure\).)894 4848 y(\(b\))42 b(Set)28 b(debug)f(and)h(logoutput)f(as)g(describ)r(ed) g(ab)r(o)n(v)n(e.)903 4981 y(\(c\))42 b(cp)28 b(/dev/n)n(ull)e ()g(\(to)h(mak)n(e)f(sure)g(it's)g(empt)n(y)-7 b(.\))894 5114 y(\(d\))42 b(If)33 b(the)h(serv)n(er)d(crashed/exited)g (due)i(to)g(the)g(bug,)h(a)f(coredump)f(should)h(b)r(e)1046 5214 y(generated.)h(If)22 b(y)n(ou)g(do)g(not)g(\034nd)g(a)g(coredump)g (in)g(the)h(directory)d(y)n(ou)i(started)1046 5313 y(the)29 b(Dan)n(te)f(serv)n(er)f(from)g(y)n(ou)h(need)g(to)h(\034nd)f(out)h(wh) n(y)-7 b(.)39 b(Some)28 b(p)r(ossible)g(rea-)1046 5413 y(sons)20 b(are:)33 b(a\))20 b(y)n(our)g(shell)h(has)f(disabled)h (coredumps)f(\(c)n(hec)n(k)g(what)h(ulimit\(1\)\))2067 5662 y(2)p eop %%Page: 3 3 3 2 bop 623 531 a Ff(sa)n(ys.)33 b(b\))20 b(some)g(systems)f(b)n(y)h (default)g(disable)g(coredumps)f(on)h(pro)r(cesses)f(that)623 631 y(are)26 b(either)i(setuid,)g(or)e(that)i(are)f(run)g(b)n(y)g(ro)r (ot.)623 740 y(When)h(y)n(ou)f(ha)n(v)n(e)f(found)i(the)g(coredump)f (do)623 874 y Fc($)43 b(gdb)f()g()623 973 y(\(gdb\))g(backtrace)f(50)623 1207 y Ff(Sa)n(v)n(e)26 b(the)i(output)g(to)f(a)h(\034le.)440 1358 y(Then:)334 1508 y(2.)41 b(In)26 b(addition)g(to)g(the)g(serv)n(er/clien)n(t)e(sp)r (eci\034c)i(\034les)g(men)n(tioned)g(b)r(elo)n(w,)g(include)g(the)440 1608 y(output)i(from)f(con\034gure)g(and)g(the)h(\034le)g ("include/auto)r(conf.h".)334 1759 y(3.)41 b(Collect)g(the)g(output)g (from)f(con\034gure)g(and)h(the)g(\034le)g(include/auto)r(conf.h,)i (the)440 1858 y(,)h (gdb/ktrace/truss/strace/whatev)n(er)26 b(output)33 b(in)f(a)g(orderly) 440 1958 y(fashion)27 b(so)g(it's)g(easy)g(to)g(read)g(and)g (understand,)g(and)h(send)f(it)h(to)f(us.)37 b(Mak)n(e)26 b(sure)440 2058 y(y)n(ou)d(include)i(information)e(ab)r(out)h(what)g (all)g(the)g(IP)h(addresses)d(in)i(the)h(log\034les)e(are)440 2157 y(\(10.0.0.1)j(is)h("clien)n(t)g(using)g(lynx",)g(10.0.0.2)f(is)h ("remote)g(w)n(ebserv)n(er",)e(etc.\).)440 2282 y(The)j(address)e(to)i (use)g(for)f(Dan)n(te)h(bugs)f(is)h(dan)n(te-bugs@inet.no.)36 b(See)28 b(the)g(BUGS)440 2382 y(\034le)g(coming)f(with)h(Dan)n(te.)334 2533 y(4.)41 b(If)33 b(y)n(ou)g(ha)n(v)n(e)e(the)j(p)r(ossibilit)n(y)e (to)h(create)f(a)h(temp)r(orary)e(accoun)n(t)h(for)h(one)g(of)f(the)440 2632 y(Dan)n(te)27 b(dev)n(elop)r(ers)f(in)h(the)h(case)e(w)n(e)h(are)f (unable)h(to)g(repro)r(duce)f(the)i(error)d(on)i(our)440 2732 y(o)n(wn)i(systems,)g(please)g(men)n(tion)g(that)h(in)g(the)g (bugrep)r(ort)e(\(but)i(don't)g(create)e(the)440 2832 y(accoun)n(t)f(un)n(til)h(w)n(e)f(ask)g(for)g(it,)h(w)n(e)f(rarely)f (need)h(it\).)232 3100 y Fe(2)132 b(System)43 b(installation)232 3298 y Fd(2.1)113 b(Ho)m(w)36 b(do)i(I)f(con\034gure)h(the)f(clien)m (t?)232 3451 y Fb(2.1.1)94 b(Setting)31 b(up)h(the)g(con\034guration)g (\034le)232 3604 y Ff(The)i(con\034guration)e(\034le)i(is)f(usually)g (called)g Fg(/etc/so)l(cks.c)l(onf)54 b Ff(and)33 b(needs)h (information)232 3704 y(ab)r(out)28 b(where)f(the)h(serv)n(er)e(can)h (b)r(e)h(found.)37 b(T)-7 b(o)27 b(con\034gure)f(it)i(follo)n(w)f (these)h(easy)e(steps:)334 3848 y(1.)41 b(Read)27 b(the)h(man)n(ual)f (page)g(\()p Fg(so)l(cks.c)l(onf)19 b Ff(\).)37 b(It)28 b(can)f(also)g(b)r(e)h(found)g(online.)334 3999 y(2.)41 b(Read)27 b(the)h(man)n(ual)f(page)g(again.)334 4150 y(3.)41 b(Determine)28 b(the)g(IP)g(address)e(and)i(p)r(ort)f(of)h(the) f(so)r(c)n(ks)g(serv)n(er)f(y)n(ou)g(wish)i(to)f(use.)334 4301 y(4.)41 b(If)32 b(the)f(serv)n(er)e(uses)i(an)n(ything)f(but)i(so) r(c)n(ks)e(v)n(ersion)f(5)i(y)n(ou)f(should)h(probably)f(also)440 4400 y(determine)e(this.)357 4545 y(Lets)i(assume)f(that)h(serv)n(er)e (is)h(at)h(address)e(is)i(10.1.1.1,)e(p)r(ort)i(1080)e(and)h(that)h(it) h(is)e(a)232 4644 y(normal)e(so)r(c)n(ks)f(serv)n(er)g(\(suc)n(h)i(as)e (Dan)n(te\))i(whic)n(h)g(supp)r(orts)f(so)r(c)n(ks)f(v)n(ersion)g(5.) 357 4744 y(Y)-7 b(ou)28 b(w)n(ould)f(then)h(en)n(ter)f(the)h(follo)n (wing)e(in)i Fg(/etc/so)l(cks.c)l(onf)20 b Ff(:)232 4879 y Fc(route)42 b({)537 4979 y(from:)g(0.0.0.0/0)127 b(to:)42 b(0.0.0.0/0)127 b(via:)42 b(10.1.1.1)e(port)i(=)h(1080)537 5078 y(proxyprotocol:)38 b(socks_v5)232 5178 y(})357 5413 y Ff(The)28 b(Dan)n(te)f(so)r(c)n(ks)f(library)h(should)g(no)n(w)g (b)r(e)h(able)f(to)h(connect)f(to)g(the)h(so)r(c)n(ks)f(serv)n(er.)1644 5662 y(3)p eop %%Page: 4 4 4 3 bop 656 531 a Fb(2.1.2)94 b(It)32 b(do)s(esn't)e(w)m(ork)656 685 y Ff(If)35 b(it)f(do)r(esn't)h(w)n(ork)d(y)n(ou)i(migh)n(t)g(wish)g (to)h(add)f(the)g(lines)g(b)r(elo)n(w)g(to)g(the)h(b)r(eginning)f(of) 656 785 y(the)f(\034le.)54 b(When)33 b(y)n(ou)g(try)f(again)g(y)n(ou)g (should)h(get)g(more)f(information)g(ab)r(out)h(what)g(is)656 884 y(happ)r(ening,)27 b(whic)n(h)h(will)g(hop)r(efully)g(help)f(y)n (ou)g(determine)h(what)f(the)h(problem)f(is:)656 1068 y Fc(debug:)41 b(1)656 1168 y(logoutput:)e(stdout)656 1385 y Fb(2.1.3)94 b(I)32 b(w)m(an)m(t)h(to)e(do)h(something)d(more)h (complicated)656 1539 y Ff(Reading)35 b(the)g(man)n(ual)g(page)g(is)g (a)g(go)r(o)r(d)g(start.)59 b(Then)36 b(ha)n(v)n(e)e(a)h(lo)r(ok)g(at)g (the)h(example)656 1638 y(con\034guration-\034les)25 b(found)j(in)g(the)g(arc)n(hiv)n(e)e(\(and)h(via)g(ftp\).)656 1872 y Fd(2.2)112 b(Ho)m(w)37 b(do)h(I)f(set)g(up)h(the)f(serv)m(er?) 656 2025 y Fb(2.2.1)94 b(Creating)31 b(a)h(simple)d(serv)m(er)j (con\034guration)g(\034le)656 2179 y Ff(Setting)22 b(up)g(the)g(serv)n (er)d(is)j(not)f(signi\034can)n(tly)g(more)g(di\036cult)h(than)g (setting)f(up)h(the)g(clien)n(t.)656 2279 y(The)34 b(serv)n(er)e (usually)h(uses)h(the)g(\034lename)f Fg(/etc/so)l(ckd.c)l(onf)p Ff(.)59 b(T)-7 b(o)33 b(con\034gure)g(the)h(serv)n(er)656 2378 y(follo)n(w)27 b(these)g(easy)g(steps:)757 2562 y(1.)41 b(Read)30 b(the)h(man)n(ual)e(pages)h(\()p Fg(so)l(ckd.c)l(onf) 50 b Ff(and)30 b Fg(so)l(ckd)9 b Ff(\).)45 b(They)30 b(can)g(also)f(b)r(e)i(found)863 2662 y(online.)757 2829 y(2.)41 b(Read)28 b(the)g(man)n(ual)e(pages)h(again.)757 2996 y(3.)41 b(Find)33 b(out)f(the)h(name)e(or)h(IP)g(address)f(of)h (the)g(in)n(terface)g(on)g(the)g(in)n(ternal)f(side)h(of)863 3095 y(the)c(net)n(w)n(ork.)757 3262 y(4.)41 b(Find)32 b(out)f(the)h(name)f(or)f(IP)i(address)d(of)i(the)h(in)n(terface\(s\))f (on)g(the)g(external)f(side)863 3362 y(of)e(the)g(net)n(w)n(ork.)757 3529 y(5.)41 b(Determine)34 b(whic)n(h)g(net)n(w)n(orks)e (\(address/netmask)f(pair\))i(y)n(ou)g(wish)h(to)f(allo)n(w)f(to)863 3629 y(connect)c(to)f(the)h(serv)n(er.)757 3796 y(6.)41 b(Determine)25 b(if)f(y)n(ou)f(wish)h(to)f(use)h(or)f(need)h(an)n(y)f (sp)r(ecial)g(authen)n(tication)h(to)f(use)h(the)863 3895 y(serv)n(er.)35 b(If)28 b(not,)g(the)g(serv)n(er)e(will)h(most)h (lik)n(ely)f(not)g(need)h(to)g(b)r(e)f(started)g(as)g(ro)r(ot.)757 4062 y(7.)41 b(Create)34 b(a)g(user)g(\(e.g.)57 b Fg(so)l(ckd)9 b Ff(\))35 b(whic)n(h)f(the)h(serv)n(er)e(can)h(run)g(as)g(when)g(it)h (do)r(esn't)863 4162 y(need)24 b(to)f(p)r(erform)g(privileged)g(op)r (erations.)34 b(Using)23 b Fg(nob)l(o)l(dy)32 b Ff(is)23 b(not)h(recommended.)757 4329 y(8.)41 b(Determine)23 b(what)f(users)f(will)i(b)r(e)g(allo)n(w)n(ed)d(to)i(do)g(via)g(the)h (serv)n(er)d(\(i.e.)36 b(whic)n(h)22 b(p)r(orts)863 4429 y(should)28 b(they)f(b)r(e)h(allo)n(w)n(ed)f(to)g(use\).)780 4612 y(Armed)e(with)h(this)f(kno)n(wledge)f(y)n(ou)g(can)g(no)n(w)h (start)f(writing)g(the)i(con\034guration)d(\034le.)656 4712 y(It)28 b(generally)e(consists)h(of)g(tree)g(parts:)780 4895 y Fa(\017)41 b Ff(General)27 b(con\034guration;)f(setting)i (external)e(in)n(terfaces)h(etc.)780 5062 y Fa(\017)41 b Ff(Clien)n(t)28 b(access)e(rules;)h(who)h(is)f(allo)n(w)n(ed)f(to)i (connect)f(to)h(the)f(serv)n(er)780 5229 y Fa(\017)41 b Ff(Clien)n(t)28 b(usage)f(rules;)g(what)g(users)g(can)g(do)g(when)h (they)g(ha)n(v)n(e)e(connected)780 5413 y(Let's)i(start)f(with)h(the)g (general)e(rules:)2067 5662 y(4)p eop %%Page: 5 5 5 4 bop 232 531 a Fc(internal:)40 b(fxp0)i(port)g(=)h(1080)232 631 y(external:)d(fxp1)232 731 y(method:)h(username)f(none)232 830 y(#user.privileged:)d(root)232 930 y(user.notprivilege)o(d:)g (sockd)232 1029 y(logoutput:)j(stderr)357 1245 y Ff(This)23 b(sets)f(the)h(in)n(ternal)f(and)g(external)g(in)n(terfaces)g(and)g (whic)n(h)h(users)e(should)i(b)r(e)g(used)232 1345 y(b)n(y)37 b(the)g(serv)n(er.)64 b(It)37 b(allo)n(ws)e(users)h(to)h(connect)g (with)g(username)f(authen)n(tication,)j(but)232 1445 y(allo)n(ws)29 b(access)f(without)i(authen)n(tication.)42 b(Running)30 b(as)f(ro)r(ot)g(migh)n(t)g(not)h(b)r(e)g(necessary)232 1544 y(if)f(y)n(ou)d(do)i(not)f(use)h(an)n(y)e(authen)n(tication)h (metho)r(ds.)357 1652 y(Then)h(w)n(e)f(add)g(the)h(clien)n(t)g(access)e (rules.)36 b(These)28 b(are)e(placed)i(after)f(the)h(\034rst)f(lines.) 232 1876 y Fc(client)41 b(pass)h({)232 1976 y(from:)g(10.1.1.0/24)d (to:)j(0.0.0.0/0)232 2076 y(log:)g(connect)f(disconnect)232 2175 y(})357 2391 y Ff(These)28 b(lines)f(allo)n(w)g(clien)n(ts)h(on)f (the)i(10.1.1.0)c(net)n(w)n(ork)i(to)g(connect)h(to)g(an)n(y)f (external)232 2491 y(address.)36 b(The)28 b(serv)n(er)d(logs)i (connects)g(and)g(disconnects.)357 2599 y(Finally)21 b(w)n(e)g(add)g(the)h(access)e(rules.)34 b(This)21 b(example)g(do)r(es) g(not)g(place)g(an)n(y)g(limits)h(up)r(on)232 2698 y(usage)27 b(of)g(the)h(serv)n(er.)232 2922 y Fc(#allow)41 b(bind)h(to)h(ports)f (greater)e(than)i(1023)232 3022 y(pass)g({)232 3122 y(from:)g (0.0.0.0/0)e(to:)i(0.0.0.0/0)e(port)i(gt)g(1023)232 3221 y(command:)f(bind)232 3321 y(log:)h(connect)f(disconnect)232 3421 y(})232 3620 y(#allow)g(outgoing)g(connections)e(\(tcp)i(and)i (udp\))232 3719 y(pass)f({)232 3819 y(from:)g(0.0.0.0/0)e(to:)i (0.0.0.0/0)232 3919 y(command:)f(connect)f(udpassociate)232 4018 y(log:)i(connect)f(disconnect)232 4118 y(})232 4317 y(#allow)g(replies)g(to)i(bind,)e(and)i(incoming)d(udp)i(packets)232 4417 y(pass)g({)537 4516 y(from:)g(0.0.0.0/0)e(to:)i(0.0.0.0/0)537 4616 y(command:)f(bindreply)e(udpreply)537 4716 y(log:)j(connect)f (error)232 4815 y(})232 5015 y(#log)h(the)h(rest)232 5114 y(block)f({)537 5214 y(from:)g(0.0.0.0/0)e(to:)i(0.0.0.0/0)537 5313 y(log:)g(connect)f(error)232 5413 y(})1644 5662 y Ff(5)p eop %%Page: 6 6 6 5 bop 780 531 a Ff(These)37 b(lines)h(allo)n(w)e(all)h(clien)n(ts)g (\(whic)n(h)g(ha)n(v)n(e)f(b)r(een)i(allo)n(w)n(ed)e(to)h(connect\))g (to)g(use)656 631 y(the)c(so)r(c)n(ks)e Fg(bind)p Ff(,)k Fg(c)l(onne)l(ct)40 b Ff(and)33 b Fg(udp)l(asso)l(ciate)40 b Ff(op)r(erations.)51 b(This)33 b(giv)n(es)e(users)h(full)h(ac-)656 731 y(cess)28 b(through)f(the)i(so)r(c)n(ks)e(serv)n(er;)g(clien)n(ts)i (can)f(bind)h(p)r(orts)e(on)i(the)f(serv)n(er)f(\(and)i(receiv)n(e)656 830 y(replies\),)38 b(connect)e(with)h(TCP)g(through)e(the)i(serv)n (er,)g(and)f(send)g(\(and)h(receiv)n(e\))e(UDP)656 930 y(pac)n(k)n(ets.)780 1031 y(The)g Fg(bind)43 b Ff(command)34 b(is)g(t)n(ypically)f(used)h(b)n(y)g Fg(ftp)40 b Ff(clien)n(ts)34 b(\(using)g(activ)n(e)f(ftp\),)k(and)656 1131 y(the)25 b(\034rst)f(pass)g(command)g(allo)n(ws)f(clien)n(ts)h(to)h(bind)g(a)f (p)r(ort)g(\(ab)r(o)n(v)n(e)g(1023\))f(on)h(the)h(serv)n(er.)780 1232 y(The)c(second)f(pass)g(command)h(allo)n(ws)e(outgoing)g (tra\036c;)k Fg(c)l(onne)l(ct)28 b Ff(op)r(erations)19 b(\(TCP\))656 1332 y(and)27 b(transmission)f(of)i(UDP)h(pac)n(k)n(ets.) 780 1433 y(The)f(third)g Fg(p)l(ass)35 b Ff(command)28 b(con)n(trols)e Fg(r)l(eplies)7 b Ff(;)29 b(this)f(migh)n(t)g(b)r(e)g (the)g(reply)g(to)f(a)h(bind)656 1533 y(request)36 b(or)g(it)i(ma)n(y)e (b)r(e)h(the)h(reply)e(to)h(a)g(UDP-pac)n(k)n(et,)i(since)e(UDP)h(is)f (pac)n(k)n(etbased.)656 1632 y(Note)29 b(that)g(nothing)g(is)g(done)f (to)h(v)n(erify)f(that)i(it's)f(a)f Fg(genuine)35 b Ff(reply)-7 b(,)29 b(that)h(is)e(in)i(general)656 1732 y(not)d(p)r(ossible)h(an)n (yw)n(a)n(y)-7 b(.)780 1833 y(The)31 b Fg(blo)l(ck)41 b Ff(command)30 b(at)h(the)g(end)f(ensures)g(that)h(op)r(erations)e (that)i(do)g(not)f(matc)n(h)656 1933 y(an)n(y)k(of)h(the)h(ab)r(o)n(v)n (e)d(are)i(logged.)58 b(In)35 b(the)g(ab)r(o)n(v)n(e)f(con\034guration) f(there)i(will)h(lik)n(ely)e(not)656 2032 y(b)r(e)c(man)n(y)f(blo)r(c)n (k)n(ed)f(op)r(erations)h(since)g(the)h(commands)f(are)f(v)n(ery)h(lib) r(eral)g(in)h(what)f(they)656 2132 y(allo)n(w.)71 b(The)39 b(same)g(result)g(could)g(ha)n(v)n(e)f(b)r(een)i(ac)n(hiev)n(ed)e(m)n (uc)n(h)h(simpler)g(b)n(y)g(a)g(single)656 2232 y Fg(p)l(ass)34 b Ff(command.)i(The)27 b(structure)g(ab)r(o)n(v)n(e)e(has)i(b)r(een)g (used)g(to)g(mak)n(e)f(it)i(simpler)e(to)h(mak)n(e)656 2331 y(mo)r(di\034cations.)34 b(By)20 b(c)n(hanging)g(the)h(net)n(w)n (orks)e(matc)n(hed)h(in)h(the)h Fg(fr)l(om)27 b Ff(and)21 b Fg(to)26 b Ff(commands)656 2431 y(ab)r(o)n(v)n(e)i(it)i(is)f(p)r (ossible)g(to)g(limit)h(op)r(erations)f(to)g(sp)r(eci\034c)g(subnets,)h (only)f(allo)n(w)g(outgoing)656 2531 y(connections)e(to)g(some)g (addresses)f(etc.)780 2632 y(The)i(complete)f(so)r(c)n(kd)g (con\034guration)f(\034le)i(should)f(no)n(w)g(lo)r(ok)g(lik)n(e)g (this:)656 2823 y Fc(##)43 b(general)d(configuration)656 3022 y(internal:)g(fxp0)i(port)f(=)j(1080)656 3122 y(external:)c(fxp1) 656 3221 y(method:)g(username)h(none)656 3321 y(#user.privileged)o(:)c (root)656 3421 y(user.notprivileg)o(ed)o(:)g(sockd)656 3520 y(logoutput:)i(stderr)656 3719 y(##)k(client)e(access)g(rules)656 3919 y(client)g(pass)h({)656 4018 y(from:)f(10.1.1.0/24)e(to:)k (0.0.0.0/0)656 4118 y(log:)f(connect)e(disconnect)656 4218 y(})656 4516 y(##)j(server)e(operation)e(access)i(rules)656 4716 y(#allow)g(bind)h(to)h(ports)e(greater)g(than)g(1023)656 4815 y(pass)h({)656 4915 y(from:)f(0.0.0.0/0)f(to:)i(0.0.0.0/0)e(port)i (gt)h(1023)656 5015 y(command:)d(bind)656 5114 y(log:)i(connect)e (disconnect)656 5214 y(})656 5413 y(#allow)h(outgoing)f(connections)f (\(tcp)j(and)g(udp\))2067 5662 y Ff(6)p eop %%Page: 7 7 7 6 bop 232 531 a Fc(pass)42 b({)232 631 y(from:)g(0.0.0.0/0)e(to:)i (0.0.0.0/0)232 731 y(command:)f(connect)f(udpassociate)232 830 y(log:)i(connect)f(disconnect)232 930 y(})232 1129 y(#allow)g(replies)g(to)i(bind,)e(and)i(incoming)d(udp)i(packets)232 1229 y(pass)g({)537 1328 y(from:)g(0.0.0.0/0)e(to:)i(0.0.0.0/0)537 1428 y(command:)f(bindreply)e(udpreply)537 1528 y(log:)j(connect)f (error)232 1627 y(})232 1826 y(#log)h(the)h(rest)232 1926 y(block)f({)537 2026 y(from:)g(0.0.0.0/0)e(to:)i(0.0.0.0/0)537 2125 y(log:)g(connect)f(error)232 2225 y(})357 2425 y Ff(This)c(w)n(as)g(a)f(simple)i(example)f(to)g(get)g(y)n(ou)f(started.) 66 b(As)37 b(y)n(ou)g(probably)f(noticed)232 2525 y(when)28 b(y)n(ou)f(read)g(the)h(man)n(ual)e(page)h(the)h(serv)n(er)e(can)h(do)g (a)g(lot)h(more.)357 2629 y(Remem)n(b)r(er)i(to)g(test)h(y)n(our)e (con\034guration)f(b)r(efore)i(y)n(ou)g(put)h(it)f(in)n(to)g(pro)r (duction)g(us-)232 2728 y(age.)49 b(When)32 b(y)n(ou)f(are)g(sure)g (that)h(the)g(serv)n(er)e(w)n(orks)g(y)n(ou)h(migh)n(t)g(wish)h(to)f (redirect)g(the)232 2828 y(logoutput)d(to)f(a)g(\034le)h(\(b)n(y)f(c)n (hanging)g(the)h Fg(lo)l(goutput)35 b Ff(command\).)232 3083 y Fd(2.3)113 b(Where)37 b(can)h(I)f(\034nd)h(con\034guration)f (\034le)g(examples?)232 3245 y Ff(Sev)n(eral)25 b(examples)h(are)f (included)i(in)f(the)h(arc)n(hiv)n(e.)35 b(They)26 b(can)g(also)f(b)r (e)h(do)n(wnloaded)f(via)232 3344 y(ftp.)232 3600 y Fd(2.4)113 b(SuSE)37 b(7)334 3761 y Ff(1.)k(Install)32 b(the)h(Dan)n(te)f(pac)n(k) -5 b(age)30 b(from)i(SuSE)h(\(V)-7 b(ersion)32 b(1.1.2)f(is)h(included) g(in)h(SuSE)440 3861 y(7\))334 4044 y(2.)41 b(Edit)29 b(the)f(/etc/rc.con\034g)d(and)i(set)h(the)g(line)g(ST)-7 b(AR)g(T_SOCKD="y)n(es")334 4227 y(3.)41 b(Edit)33 b(the)g(con\034g)e (\034le)h(/etc/so)r(c)n(kd.conf)f(and)h(reb)r(o)r(ot)f(Lin)n(ux)h(\(or) g(start)f(so)r(c)n(kd)h(-D)440 4327 y(if)g(y)n(ou)e(kno)n(w)g(what)i(y) n(ou)e(are)g(doing\).)47 b(Be)31 b(sure)g(that)g(y)n(ou)g(ha)n(v)n(e)f (one)g(clien)n(t)i(pass)440 4427 y(rule)i(whic)n(h)h(allo)n(ws)e(y)n (ou)h(clien)n(t)h(to)f(connect)g(from)h(y)n(our)e(in)n(ternal)h(net)n (w)n(ork)f(and)440 4526 y(one)24 b(pass)f(rule)h(that)h(allo)n(ws)d(a)i (clien)n(t)g(that)h(is)f(connected)g(to)g(use)g(the)h(pro)n(xy)d(to)i (the)440 4626 y(desired)j(destinations)g(\(this)h(is)g(most)f(lik)n (ely)g(to)g(ev)n(erywhere)f(=)h(0.0.0.0/0)e(\))232 4826 y Fg(Thanks)31 b(to:)39 b(A)n(ndr)l(e)l(as)29 b(John)h ()232 5124 y Fe(3)132 b(Ho)l(w)43 b(can)h(I)h(so)t(c)l(ksify)g(the)f(whole)f(system?)232 5313 y Ff(On)22 b(some)f(systems)g(doing)g(the)h(global)e(equiv)-5 b(alen)n(t)21 b(of)h(running)f(a)g(program)f(with)i(so)r(c)n(ksify)232 5413 y(is)g(p)r(ossible.)34 b(Y)-7 b(ou)21 b(should)g(ho)n(w)n(ev)n(er) f(not)h(do)g(this)g(unless)g(y)n(ou)g(kno)n(w)f(what)i(y)n(ou)e(are)g (doing.)1644 5662 y(7)p eop %%Page: 8 8 8 7 bop 656 531 a Fd(3.1)112 b(Lin)m(ux)656 685 y Ff(In)28 b(Lin)n(ux)f(y)n(ou)g(can)g(easily)g(do)g(the)h(follo)n(wing:)787 833 y Fc(edit)41 b(the)i(file)f(/etc/ld.so.prel)o(oa)o(d)787 933 y(and)g(add)g(two)h(lines)e(saying:)917 1033 y(libdl.so)917 1132 y(libdsocks.so)656 1381 y Fg(Thanks)31 b(to:)38 b(Dag)30 b(Wie)l(ers)g(.)780 1480 y Ff(Dag)e(Wieers)f(also)f(has)i(a)f(\(RedHat\))h(SPEC)h(\034le)f(whic) n(h)g(con)n(tains)f(scripts)g(for)g(doing)656 1580 y(this)19 b(automatically)-7 b(.)32 b(It)19 b(can)f(b)r(e)h(found)f(at:)32 b(ftp://dag.wieers.com/home-made/dan)n(te/dan)n(te.sp)r(ec)656 1809 y Fd(3.2)112 b(Generic)656 1962 y Ff(There)27 b(is)g(another)g(w)n (a)n(y)f(that)i(giv)n(es)f(y)n(ou)g(more)f(con)n(trol)h(o)n(v)n(er)f (what)h(will)h(and)f(what)h(will)656 2062 y(not)f(b)r(e)h(so)r(c)n (ksi\034ed.)36 b(Instead)27 b(of)h(using)f(the)h(wrapp)r(er-script)e ('so)r(c)n(ksify',)h(y)n(ou)f(could)i(add)787 2223 y Fc(LD_PRELOAD="lib)o(dl)o(.so)37 b(libdsocks.so")787 2322 y(export)k(LD_PRELOAD)656 2583 y Ff(to)27 b(the)h(en)n(vironmen)n (t.)36 b(\(/etc/pro\034le)54 b(/.pro\034le)g(/.bashrc\))656 2683 y Fg(Thanks)31 b(to:)38 b(Dag)30 b(Wie)l(ers)g(.)656 2895 y Fb(3.2.1)94 b(Wh)m(y)32 b(do)f(I)h(w)m(an)m(t)h(to)f (b)s(e)f(able)h(to)f(con)m(trol)h(this?)656 3048 y Ff(In)44 b(same)f(rare)f(cases)h(programs)e(fail)j(to)g(w)n(ork)e(in)i(a)g(so)r (c)n(ksi\034ed)f(en)n(vironmen)n(t)f(\(e.g.)656 3148 y(acroread)22 b(4.0)j(for)f(Lin)n(ux)h(segfaults\))f(or)g(programs)f (lik)n(e)i(rpm)g(dep)r(end)g(on)g(a)f(clean)h(build-)656 3247 y(en)n(vironmen)n(t)h(to)i(get)f(its)h(\(library\))f(dep)r (endencies.)656 3347 y Fg(Thanks)k(to)e(Dag)h(Wie)l(ers)g(.)656 3559 y Fb(3.2.2)94 b(Ho)m(w)31 b(can)i(I)f(easily)f (unso)s(c)m(ksify)h(the)f(curren)m(t)i(shell?)656 3712 y Ff(By)27 b(issuing)787 3861 y Fc(unset)41 b(LD_PRELOAD)656 4110 y Fg(Thanks)31 b(to:)38 b(Dag)30 b(Wie)l(ers)g(.)656 4381 y Fe(4)131 b(T)-11 b(ec)l(hnical)46 b(Problems)656 4579 y Fd(4.1)112 b(Wh)m(y)34 b(do)s(esn't)g(the)g(so)s(c)m(ksify)g (program)f(w)m(ork)h(with)e(glib)s(c-2?)656 4732 y Ff(If)20 b(glib)r(c)f(is)h(not)f(correctly)f(installed)i(\(old)f(header)g (\034les)g(are)g(still)g(installed\))h(so)r(c)n(ksify)f(w)n(on't)656 4832 y(w)n(ork)31 b(if)j(logging)d(is)i(enabled.)53 b(The)33 b(serv)n(er)e(will)i(also)f(crash)g(when)h(it)g(exits.)53 b(Upgrade)656 4931 y(the)28 b(header)f(\034les)g(\(/usr/include\))g (and)g(compile)h(again.)656 5160 y Fd(4.2)112 b(Wh)m(y)37 b(do)s(esn't)h(so)s(c)m(ksify)g(w)m(ork)f(on)g(cvs?)656 5313 y Ff(It)32 b(do)r(es)g(w)n(ork.)49 b(A)33 b(problem)e(ho)n(w)n(ev) n(er)f(is)i(that)h(cvs)f(usually)f(ends)h(up)h(calling)e(a)h(setuid)656 5413 y(program)25 b(\(rsh,)j(ssh,)f(whatev)n(er\).)36 b(See)27 b(section)h(4.3.)2067 5662 y(8)p eop %%Page: 9 9 9 8 bop 232 531 a Fd(4.3)113 b(Wh)m(y)52 b(do)s(esn't)h(so)s(c)m(ksify) f(w)m(ork)f(on)i(setuid)e(programs)h(lik)m(e)488 648 y(ssh,)38 b(rsh,)g(etc?)232 803 y Ff(The)23 b(reason)d(is)j(that)f (these)h(programs)d(are)h(setuid.)35 b(Most)22 b(systems)g(will)h (ignore)e(the)h(w)n(ork)232 903 y(so)r(c)n(ksify)h(has)g(done)g(b)r (efore)g(running)g(these)g(programs)e(and)j(the)g(result)f(b)r(ecomes)g (the)g(the)232 1002 y(same)k(as)g(not)h(using)f(so)r(c)n(ksify)g(on)g (them.)357 1103 y(Solution:)40 b(strip)29 b(o\033)g(the)h(suid)f(bit)h (if)g(p)r(ossible)f(or)f(recompile)h(the)g(binary)g(\(rsh,)g(ssh,)232 1203 y(etc\))e(with)g(explicit)f(so)r(c)n(ks)f(supp)r(ort)h(\(adding)g ("-ldso)r(c)n(ks")e(to)i(the)h(link)n(options)e(is)h(usually)232 1302 y(enough.\))232 1541 y Fd(4.4)113 b(Wh)m(y)37 b(do)s(esn't)h(so)s (c)m(ksify)f(w)m(ork)g(on)h(HP-UX)f(11.00?)232 1697 y Ff(Y)-7 b(ou)33 b(migh)n(t)f(ha)n(v)n(e)g(to)g(install)g(patc)n(h)h Fg(PHSS_22478)p Ff(,)i(or)c(one)h(of)h(its)f(successors,)g(whic)n(h)232 1796 y(adds)c Fg(LD_PRELO)n(AD)34 b Ff(supp)r(ort)27 b(to)g(the)h(loader.)357 1897 y Fg(Thanks)j(to:)38 b(alb)l(ert)30 b(chin)h(\(china@thewrittenwor)l(d.c)l(om\))232 2136 y Fd(4.5)113 b(Wh)m(y)37 b(do)s(esn't)h(so)s(c)m(ksify)f(w)m(ork)g(on)h (AIX?)232 2291 y Ff(AIX)30 b(do)r(es)f(not)g(supp)r(ort)h Fg(LD_PRELO)n(AD)p Ff(,)d(whic)n(h)j(is)f(required)f(for)h(so)r(c)n (ksify)f(to)h(w)n(ork.)232 2391 y(The)j(alternativ)n(e)d(is)i(static)g (compilation,)h(as)e(sp)r(eci\034ed)h(in)h(the)f Fc(ftp://ftp.inet.no)o (/)232 2491 y(pub/socks/extract)o(ed)o(/do)o(c/)o(RE)o(ADM)o(E.)o(us)o (age)21 b Ff(\034le.)232 2729 y Fd(4.6)113 b(Wh)m(y)47 b(do)g(I)f(get)h(unde\034ned)h(references)g(to)e(__bsw)m(ap_32)488 2846 y(during)37 b(compilation)d(on)k(Lin)m(ux?)232 3001 y Ff(This)28 b(is)e(lik)n(ely)h(due)g(to)g(a)g(bug)g(in)g(one)g(of)g (the)g(system)g(header)f(\034les.)37 b(A)27 b(w)n(ork)-5 b(around)25 b(has)232 3101 y(b)r(een)j(added)g(in)g(v)n(ersion)e (1.1.14.)232 3340 y Fd(4.7)113 b(Ho)m(w)42 b(can)h(I)g(more)f(easily)g (get)g(the)h(Dan)m(te)g(serv)m(er)g(to)f(w)m(ork)488 3456 y(when)j(the)g(external)g(in)m(terface)f(is)h(using)g(dynamic)f (IP)h(ad-)488 3572 y(dresses?)232 3728 y Ff(Either)36 b(sp)r(ecify)g(the)g(external)e(address)g(as)h(a)g(in)n(terfacename)f (\(a)n(v)-5 b(ailable)35 b(since)g(Dan)n(te)232 3827 y(v1.1.7\),)29 b(in)h(whic)n(h)f(case)f(the)i(Dan)n(te)g(serv)n(er)d (will)j(automatically)e(use)h(the)h(new)f(address)232 3927 y(whenev)n(er)e(it)h(c)n(hanges,)e(or)h(if)h(y)n(ou)f(m)n(ust)g (use)h(a)f(IP)h(address,)e(try)i(the)g(b)r(elo)n(w.)357 4028 y(Automatically)39 b(running)f(a)h(script)f(that)i(c)n(hanges)d (the)i("external:")f(line)h(in)g(y)n(our)232 4127 y(so)r(c)n(kd.conf)32 b(and)h(then)g(sends)f(the)i(serv)n(er)c(a)j(SIGHUP)h(when)f(y)n(ou)f (get)g(a)g(new)h(address)232 4227 y(should)28 b(b)r(e)g(simple)f (enough)g(though.)357 4328 y(A)h(example)f(of)h(suc)n(h)f(a)g(script)g (is)h(the)g(follo)n(wing,)e(mo)r(dify)i(to)g(suit.)407 4516 y Fc(#!/bin/sh)40 b(-)407 4616 y(#)407 4716 y(#)j(usage:)e (script.sh)f()407 4915 y(:)j ({SOCKD_CONF='/et)o(c/)o(so)o(ckd)o(.c)o(on)o(f'})407 5114 y(if)f([)i(!)f(-w)g(${SOCKD_CONF})38 b(];)k(then)537 5214 y(echo)g("${SOCKD_CONF})c(does)k(not)g(exist)g(or)g(is)h(not)f (writable")537 5313 y(exit)g(1)407 5413 y(fi)1644 5662 y Ff(9)p eop %%Page: 10 10 10 9 bop 830 631 a Fc(ex)43 b(-)g(+'1,$s/^external)o(:.)o(*/e)o(xt)o (er)o(nal)o(:)37 b('$1'/)42 b(|)h(wq')f(${SOCKD_CONF})830 731 y(kill)g(-HUP)g(`cat)g(/var/run/sockd.)o(pid)o(`)780 1034 y Ff(As)27 b(y)n(ou)f(see,)g(this)h(is)g(in)n(tended)g(to)f(b)r(e) h(called)f(as)g(")f(",)656 1134 y(where)36 b()h(is)h(y)n(our)e(external)h(ip.)64 b(W)-7 b(e)36 b(assume)g(y)n(ou)g(can)g(easily)g(get)g(the)656 1234 y(external)27 b(ip)g(from)h(y)n(our)e(ppp)i(script.)36 b Fg(Thanks)31 b(to:)39 b(Tin)30 b(Y)-6 b(u)29 b(Mak)h (.)656 1495 y Fd(4.8)112 b(I)34 b(ha)m(v)m(e)i(problems) d(rotating)h(Dan)m(te's)h(log\034les.)48 b(What)34 b(can)h(I)911 1611 y(do)j(except)f(log)g(via)g(syslog?)656 1774 y Ff(Dan)n(te)30 b(no)n(w)g(reop)r(ens)f(the)i(log\034les)e(on)h(SIGHUP)-7 b(,)32 b(so)d(y)n(ou)h(should)g(not)g(ha)n(v)n(e)f(an)n(y)g(prob-)656 1874 y(lems,)e(just)i(rename)d(the)i(\034le)g(and)f(send)h(the)g(Dan)n (te)f(serv)n(er)f(a)h(SIGHUP)i(signal.)780 1979 y(A)35 b(quic)n(k)f(and)h(dirt)n(y)f(solution)g(for)g(dealing)g(with)h(most)f (daemons)g(that)h(don't)g(lik)n(e)656 2078 y(ha)n(ving)k(their)h(logs)f (rotated.)74 b(Cop)n(y)39 b(them)i(instead)f(of)g(mo)n(ving)f(the)i (\034les)f(and)g(then)656 2178 y(redirect)25 b(an)h(ec)n(ho)f(in)n(to)h (them.)37 b(Kic)n(k)25 b(it)h(o\033)h(via)e(cron)g(ev)n(ery)g(da)n(y)g (at)h(11:59.)35 b(I)26 b(get)g(7)f(da)n(ys)656 2278 y(of)i(rotated)g (logs)g(lik)n(e)g(this:)830 2487 y Fc(sleep)42 b(60)830 2587 y(DAY=`date)e(+\045a`)830 2687 y(cp)j(/var/log/banned.)o(lo)o(g)37 b(/var/log/banned.l)o(og)o(.${)o(DA)o(Y})830 2786 y(echo)42 b(>)h(/var/log/banned.)o(log)656 3090 y Fg(Thanks)31 b(to:)38 b(James)30 b(Co)l(e)g(.) 780 3195 y Ff(Another)e(solution:)780 3300 y(I)36 b(use)e(dan)n(te)h (under)g(sup)r(ervise)f(with)i(m)n(ultilog)e(for)h(log)f(rotation)g (\(based)h(on)g(size,)656 3400 y(not)27 b(date\).)37 b(This)28 b(will)f(run)h(Dan)n(te)f(under)g(sup)r(ervise)g(\(and)h (limit)g(its)f(memory)g(usage)f(to)656 3499 y(5)h(megab)n(ytes\))f(and) g(redirect)h(its)g(logging)e(to)i(/v)-5 b(ar/log/dan)n(te/curren)n(t,) 23 b(rotated)j(based)656 3599 y(on)h(its)h(size.)780 3704 y Fc(http://cr.yp.to/d)o(ae)o(mon)o(to)o(ol)o(s.h)o(tm)o(l)p Ff(h)n(ttp://)o(cr.yp.to/)o(daemo)o(n)n(to)r(ols)o(.h)n(tml)16 b(for)656 3804 y(more)27 b(information.)787 4013 y Fc(/service/dante/)o (ru)o(n:)656 4213 y(#!/bin/sh)656 4412 y(exec)42 b(2>&1)656 4511 y(exec)g(softlimit)e(-m)i(5000000)f(-p)i(30)f(-c)h(0)g(\\)1048 4611 y(/usr/sbin/sockd)37 b(-f)43 b(/etc/sockd.conf)37 b(-N)43 b(1)g(-l)g(#)g(-d)656 4810 y(/service/dante/l)o(og)o(/r)o(un:) 656 5010 y(#!/bin/sh)656 5209 y(exec)f(setuidgid)e(logging)g(multilog)g (t)j(/var/log/dante)656 5413 y Fg(Thanks)31 b(to:)38 b(Michael)32 b(T.)f(Bab)l(c)l(o)l(ck")g()2047 5662 y Ff(10)p eop %%Page: 11 11 11 10 bop 232 531 a Fe(5)132 b(Authen)l(tication)232 730 y Fd(5.1)113 b(Ho)m(w)59 b(do)h(I)f(setup)h(a)g(passw)m(ord)h (\034le)e(for)h(authen)m(ticating)488 846 y(users?)232 999 y Ff(The)24 b(Dan)n(te)g(serv)n(er)d(uses)i(the)h(standard)f (system)g(passw)n(ord\034le.)33 b(On)24 b(man)n(y)f(systems,)g(the)232 1099 y(Dan)n(te)k("user.privileged")d(id)k(m)n(ust)e(b)r(e)i(set)e(to)h (ro)r(ot)f(or)g(someb)r(o)r(dy)g(with)i(sp)r(ecial)e(access)232 1198 y(to)i(read)f(the)h(encrypted)f(passw)n(ord\034le.)357 1298 y(Put)i(the)e(serv)n(er)f(in)i(a)f(c)n(hro)r(ot)g(jail)g(to)h (manage)e(a)h(separate)f(passw)n(ord\034le.)232 1530 y Fd(5.2)113 b(Ho)m(w)36 b(do)i(I)f(use)h(LD)m(AP)f(authen)m(tication)f (with)g(Dan)m(te?)232 1683 y Ff(First,)28 b(mak)n(e)f(sure)f(that)i(y)n (ou)f(compile)g(Dan)n(te)h(with)g(supp)r(ort)f(for)g(P)-7 b(AM.)29 b(The)e(con\034gure)232 1783 y(script)37 b(should)f(do)g(this) h(for)f(y)n(ou)f(if)i(the)g(P)-7 b(AM)38 b(dev)n(elopmen)n(t)d (libraries)g(are)h(installed.)232 1883 y(Under)28 b(RedHat)g(Lin)n(ux,) f(mak)n(e)g(sure)g(y)n(ou)g(ha)n(v)n(e)f(the)i(P)-7 b(AM-dev)n(el)28 b(RPM)g(installed.)357 1982 y(Y)-7 b(ou)32 b(will)g(also)f(ha)n(v)n(e)g (to)h(add)g(LD)n(AP)h(supp)r(ort)e(to)h(y)n(our)f(P)-7 b(AM)33 b(implemen)n(tation,)g(if)232 2082 y(it)38 b(is)e(not)h (already)f(there.)64 b(Chec)n(k)36 b(if)i(y)n(ou)e(ha)n(v)n(e)f (/lib/securit)n(y/pam_ldap.so)e(or)j(the)232 2181 y(equiv)-5 b(alen)n(t.)37 b(If)28 b(not,)g(use)f(pam_ldap)g(from)g(h)n (ttp://www.padl.com/.)357 2281 y(pam_ldap)19 b(gets)h(its)g (con\034guration)f(from)h(/etc/ldap.conf.)33 b(Mak)n(e)19 b(sure)h(y)n(ou)f(set)h(host)232 2381 y(to)33 b(y)n(our)f(LD)n(AP)h (serv)n(er,)f(and)h(base)f(to)h(y)n(our)e(base)h(DN.Y)-7 b(ou)34 b(can)e(also)g(set)h(pam_\034lter)232 2480 y(and)d (pam_group_dn)d(to)i(restrict)g(logins)f(to)i(particular)e(ob)5 b(jectt)n(yp)r(es)28 b(or)h(mem)n(b)r(ers)g(of)232 2580 y(particular)e(groups.)357 2680 y(P)n(oin)n(t)35 b(so)r(c)n(kd)f(at)g (LD)n(AP)i(b)n(y)e(creating)g(/etc/pam.d/so)r(c)n(kd.)56 b(An)35 b(exapmle)g(of)g(this)232 2779 y(\034les)28 b(con)n(ten)n(ts)f (is;)320 2960 y Fc(#\045PAM-1.0)320 3059 y(auth)303 b(sufficient)39 b(/lib/security/pa)o(m_l)o(da)o(p.s)o(o)320 3159 y(auth)303 b(required)127 b(/lib/security/pa)o(m_u)o(ni)o(x_a)o(ut)o(h.)o(so)37 b(try_first_pass)320 3259 y(account)171 b(sufficient)39 b(/lib/security/pa)o(m_l)o(da)o(p.s)o(o)320 3358 y(account)171 b(required)127 b(/lib/security/pa)o(m_u)o(ni)o(x_a)o(cc)o(t.)o(so)320 3458 y(password)g(required)g(/lib/security/pa)o(m_l)o(da)o(p.s)o(o)357 3738 y Ff(Finally)-7 b(,)32 b(y)n(ou)f(need)g(to)g(con\034gure)f(so)r (c)n(kd.conf)g(to)i(restrict)e(access)g(based)h(on)g(P)-7 b(AM.)232 3838 y(this)28 b(is)g(accomplished)e(with)j(the)e(follo)n (wing:)320 4018 y Fc(#)43 b(allowable)d(authentication)d(methods)k(for) h(socks-rules.)320 4118 y(#)h(values)e(are)h(username,)e(none,)h (rfc931)g(and)i(pam)320 4218 y(method:)d(pam)j(none)320 4417 y(#)g(allowable)d(authentication)d(methods)k(for)h(client-rules.) 320 4516 y(#)h(values)e(are)h(username,)e(none,)h(rfc931)g(and)i(pam) 320 4616 y(clientmethod:)38 b(pam)k(none)320 4815 y(#)h(Client)e (rules,)g(controls)f(who)i(may)h(connect)320 4915 y(#)320 5015 y(##)f(everyone)f(who)h(authenticates)c(is)43 b(allowed)d(to)j (use)f(tcp)320 5114 y(##)g(and)h(udp)320 5214 y(pass)e({)625 5313 y(from:)g(0.0.0.0/0)f(to:)i(0.0.0.0/0)625 5413 y(protocol:)d(tcp)k (udp)1623 5662 y Ff(11)p eop %%Page: 12 12 12 11 bop 1048 531 a Fc(log:)42 b(connect)f(disconnect)e(error)1048 631 y(method:)i(pam)743 731 y(})743 930 y(#)i(last)f(line,)g(block)f (everyone)f(else.)85 b(This)42 b(is)h(the)f(default)f(but)h(if)h(you) 743 1029 y(provide)743 1129 y(#)g(one)86 b(yourself)40 b(you)j(can)f(specify)e(your)i(own)h(logging/actions)743 1229 y(block)e({)1048 1328 y(from:)h(0.0.0.0/0)d(to:)k(0.0.0.0/0)1048 1428 y(log:)f(connect)f(error)743 1528 y(})780 1827 y Fg(Thanks)31 b(to:)39 b(Se)l(an)29 b(Burfor)l(d)i(.)656 2066 y Fb(5.2.1)94 b(...)40 b(and)33 b(against)e(Microsoft)g(A)m(ctiv)m(e)i(Directory?)656 2227 y Ff(T)-7 b(o)34 b(authen)n(ticate)g(against)f(a)h(Microsoft)f(A)n (ctiv)n(e)h(Directory)f(the)i(follo)n(wing)e(bare)g(min-)656 2326 y(im)n(um)40 b(example)e(con\034guration)g(for)h('test.org')f (with)i(an)f(activ)n(e)g(directory)f(serv)n(er)f(at)656 2426 y(123.123.123.123)22 b(of)27 b(/etc/ldap.conf)g(Directory)f(is)i (what)f(y)n(ou)g(w)n(ould)g(require:)787 2630 y Fc(host)41 b(123.123.123.123)787 2730 y(base)g(cn=Users,dc=test,)o(dc)o(=or)o(g) 787 2829 y(rootbinddn)e(cn=Administrator)o(,c)o(n=)o(Use)o(rs)o(,d)o (c=t)o(es)o(t,d)o(c=)o(or)o(g)787 2929 y(pam_filter)g(objectclass=user) 787 3029 y(pam_login_attri)o(bu)o(te)e(cn)780 3229 y Ff(With)h(the)e(passw)n(ord)e(for)i(the)h(A)n(dministrator)e(user)g(in) i(the)g(\034le)f(/etc/ldap.secret)656 3328 y(and)27 b(c)n(ho)n(wned)g (to)g(0600.)780 3432 y Fg(Thanks)k(to:)39 b(A)n(lexander)30 b(Cohen)g(.)656 3687 y Fd(5.3)112 b(T)-9 b(ec)m(hnical)36 b(details)656 3848 y Fb(5.3.1)94 b(Wh)m(y)34 b(do)g(I)h(alw)m(a)m(ys)g(get)f(an)h(initial) d(success)i(to)g(m)m(y)g(erroneous)g(user-)948 3948 y(name/passw)m(ord) c(with)h(Dan)m(te?)656 4109 y Ff(If)e(username/passw)n(ord)24 b(authen)n(tication)k(is)g(used,)h(the)f(so)r(c)n(ks)f(clien)n(t)i (will)f(alw)n(a)n(ys)f(get)h(a)656 4209 y(successful)34 b(resp)r(onse)g(at)h(\034rst.)58 b(The)35 b(username/passw)n(ord)c(is)k (not)g(c)n(hec)n(k)n(ed)f(un)n(til)h(the)656 4309 y(full)29 b(so)r(c)n(ks)d(request)i(has)f(b)r(een)i(receiv)n(ed)e(from)h(the)g (clien)n(t,)g(at)g(whic)n(h)g(p)r(oin)n(t)g(the)h(request)656 4408 y(will)d(fail)g(if)g(the)g(username/passw)n(ord)c(is)k(incorrect)e (in)i(the)g(same)f(w)n(a)n(y)g(it)h(w)n(ould)f(if)h(there)656 4508 y(w)n(as)g(no)i("pass")d(rule)j(for)f(the)h(request.)780 4612 y(The)34 b(reason)e(for)i(this)g(is)g(that)g(due)g(to)f(the)h (generalit)n(y)f(of)g(the)i(Dan)n(te)e(so)r(c)n(ks-rules,)656 4711 y(w)n(e)27 b(do)f(not)i(kno)n(w)e(what)h(authen)n(tication)f(w)n (e)h(will)g(b)r(e)h(using)f(for)f(this)i(particular)d(clien)n(ts)656 4811 y(request,)33 b(un)n(til)f(w)n(e)g(ha)n(v)n(e)f(read)g(the)i (request.)49 b(That)32 b(means,)h(the)g(same)e(clien)n(t)i(address)656 4911 y(could)d(in)h(theory)f(use)h(one)f(t)n(yp)r(e)h(of)f(authen)n (tication)h(for)f(connections)g(to)g(one)g(address,)656 5010 y(and)d(another)g(authen)n(tication)g(t)n(yp)r(e)h(for)f (connections)f(to)i(another)e(address.)780 5114 y(As)e(of)g(v)n(ersion) f(1.1.16,)g(this)h(has)g(b)r(een)g(c)n(hanged)f(a)g(little.)37 b(If)24 b(y)n(ou)f(are)g(using)h(only)g(one)656 5214 y(t)n(yp)r(e)18 b(of)h(username/passw)n(ord-based)13 b(authen)n(tication)18 b(sc)n(heme,)i(the)f(username/passw)n(ord)656 5313 y(will)h(b)r(e)g(c)n(hec)n(k)n(ed)e(at)i(an)f(p)r(oin)n(t)h(early) e(enough)h(to)h(tell)g(the)g(clien)n(t)g(the)g(username/passw)n(ord)656 5413 y(w)n(as)26 b(wrong.)2047 5662 y(12)p eop %%Page: 13 13 13 12 bop 232 531 a Fe(6)132 b(F)-11 b(or)43 b(system)h(administrators) 232 730 y Fd(6.1)113 b(What)37 b(happ)s(ens)i(if)e(I)g(need)h(to)f (restart)g(the)g(Dan)m(te)h(serv)m(er?)232 883 y Ff(If)d(y)n(ou)d(kill) i(one)f(so)r(c)n(kd)g(pro)r(cess)g(\(an)n(y)g(one\),)i(the)f(rest)f(of) h(the)g(pro)r(cesses)e(will)i(cop)r(e)f(as)232 983 y(b)r(est)28 b(as)f(they)h(can.)357 1082 y(This)c(means)g(that)h(if)f(y)n(ou)g(kill) g(the)h(main)f(so)r(c)n(kd)g(pro)r(cess,)g(clien)n(ts)g(that)g(ha)n(v)n (e)f(already)232 1182 y(established)29 b(their)g(so)r(c)n(ks-session)e (will)i(con)n(tin)n(ue)g(to)g(run.)42 b(These)29 b(so)r(c)n(kd)f(pro)r (cesses)g(will)232 1282 y(b)r(e)i(orphaned)d(\(their)i(paren)n(t)f(pid) i(will)e(b)r(e)i(init\),)g(and)e(will)h(not)g(b)r(e)g(able)g(to)f (accept)h(new)232 1381 y(clien)n(ts.)357 1481 y(Y)-7 b(ou)39 b(can)f(at)h(this)g(p)r(oin)n(t)g(ho)n(w)n(ev)n(er)d(start)i (the)h(Dan)n(te)g(serv)n(er)e(again.)69 b(The)39 b(newly)232 1580 y(started)28 b(Dan)n(te)f(serv)n(er)f(will)i(then)g(accept)f (clien)n(ts)h(as)f(usual,)g(but)h(will)g(ha)n(v)n(e)e(no)i(relation)232 1680 y(to)38 b(the)g(pro)r(cesses)e(created)h(b)n(y)g(the)h(previous)e (Dan)n(te)i(serv)n(er.)65 b(Those)37 b(pro)r(cesses)f(will)232 1780 y(con)n(tin)n(ue)k(to)f(run)h(b)n(y)g(themselv)n(es)f(un)n(til)h (all)g(their)g(clien)n(ts)f(ha)n(v)n(e)g(\034nished,)k(at)d(whic)n(h) 232 1879 y(p)r(oin)n(t)28 b(they)g(will)g(die)f(m)n(y)h(themselv)n(es.) 232 2154 y Fe(7)132 b(F)-11 b(or)43 b(programmers)232 2352 y Fd(7.1)113 b(What)25 b(do)s(es)h(a)f(so)s(c)m(ksi\034ed)h (application)d(need)j(to)f(care)g(ab)s(out?)232 2505 y Ff(A)31 b(so)r(c)n(ksi\034ed)e(application)g(will)h(normaly)f(w)n (ork)f(without)i(an)n(y)f(extra)g(steps)h(needing)g(to)232 2605 y(b)r(e)i(done,)g(within)g(the)g(limits)g(of)f(the)h(so)r(c)n(ks)e (standard.)48 b(The)31 b(exception)g(to)g(this)h(is)f(the)232 2705 y(follo)n(wing:)232 2887 y Fb(select\(2\)/p)s(oll\(2\))39 b Ff(applications)18 b(com)n(bining)f(non-blo)r(c)n(king)g(so)r(c)n(k)n (ets)g(with)i(select\(2\)/p)r(oll\(2\))440 2987 y(need)31 b(to)f(mak)n(e)f(sure)h(they)h(can)f(handle)g(the)h(select\(2\)/p)r (oll\(2\))f(call)g(b)r(eing)h(in)n(ter-)440 3087 y(rupted.)56 b(This)34 b(is)g(due)g(to)g(ho)n(w)g(the)g(Dan)n(te)g(clien)n(tlibrary) f(implemen)n(ts)h(supp)r(ort)440 3186 y(for)27 b(non-blo)r(c)n(king)f (connect\(2\).)1623 5662 y(13)p eop %%Trailer end userdict /end-hook known{end-hook}if %%EOF dante-1.1.19.dfsg/doc/Makefile.am0000644000175000017500000000041110355510631015072 0ustar roamroam#EXTRA_DIST seems to be needed (for manual pages) EXTRA_DIST = sockd.8 sockd.conf.5 socks.conf.5 rfc1928.txt rfc1929.txt \ SOCKS4.protocol faq.tex faq.ps \ README.socksify README.survey README.usage SUBDIRS = module man_MANS = sockd.8 sockd.conf.5 socks.conf.5 dante-1.1.19.dfsg/doc/Makefile.in0000644000175000017500000004404010362704166015117 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive man5dir = $(mandir)/man5 am__installdirs = "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man_MANS) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ #EXTRA_DIST seems to be needed (for manual pages) EXTRA_DIST = sockd.8 sockd.conf.5 socks.conf.5 rfc1928.txt rfc1929.txt \ SOCKS4.protocol faq.tex faq.ps \ README.socksify README.survey README.usage SUBDIRS = module man_MANS = sockd.8 sockd.conf.5 socks.conf.5 all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-man5: $(man5_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man5dir)" || $(mkdir_p) "$(DESTDIR)$(man5dir)" @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.5*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 5*) ;; \ *) ext='5' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \ done uninstall-man5: @$(NORMAL_UNINSTALL) @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.5*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 5*) ;; \ *) ext='5' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man5dir)/$$inst"; \ done install-man8: $(man8_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)" @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.8*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 8*) ;; \ *) ext='8' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ done uninstall-man8: @$(NORMAL_UNINSTALL) @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.8*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 8*) ;; \ *) ext='8' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(MANS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-man install-exec-am: install-info: install-info-recursive install-man: install-man5 install-man8 installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-man uninstall-info: uninstall-info-recursive uninstall-man: uninstall-man5 uninstall-man8 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-man5 install-man8 \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-info-am \ uninstall-man uninstall-man5 uninstall-man8 # 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: dante-1.1.19.dfsg/doc/README.socksify0000644000175000017500000000113706711067641015566 0ustar roamroam$Id: README.socksify,v 1.4 1999/04/26 13:52:33 michaels Exp $ The shell script socksify in the bin directory is meant to aid in using socks with already compiled dynamic binaries. This works by setting the LD_PRELOAD environment variable to libdsocks. It will then wrap all networking-related system calls. When used the script can socksify a program by simply giving it as a parameter to socksify: socksify ftp A more permanent solution would be to add the LD_PRELOAD environment value to the shell startup files. Then all non-set[ug]id applications that are linked dynamically would be socksified. dante-1.1.19.dfsg/doc/README.usage0000644000175000017500000000505710253255130015031 0ustar roamroam$Id: README.usage,v 1.7 2005/06/10 11:22:21 michaels Exp $ The socks package can be used in two ways. Dynamically The simplest way to add socks support to an already (dynamically) complied application is to use the LD_PRELOAD facility to replace the standard library functions with socksified ones. The libdsocks library is provided for this purpose. See the README.socksify file for more information. This will probably only work with non-setuid applications since LD_PRELOAD is usually ignored otherwise. If setting LD_PRELOAD is not possible, compilation is another possibility. If the application can be compiled dynamically socks support can be added explicitly by linking with libdsocks (usually done by adding '-ldsocks'). This will automagically give the application socks support without making any code changes. Static Compilation If the source code for an application is available it can be changed to use socks, even if it is not linked dynamically. Several systemcalls and librarycalls must be changed to use the socksified versions instead of the standard ones. The application is then linked with the libsocks library in the distribution (-lsocks, not -ldsocks). These function calls can be found in the socks library: Raccept Rbind Rbindresvport Rconnect Rgetaddrinfo() Rgethostbyname Rgethostbyname2 Rgetipnodebyname() Rgetpeername Rgetsockname Rread Rreadv Rrecv Rrecvfrom Rrecvfrom Rrecvmsg Rrresvport Rsend Rsendmsg Rsendto Rwrite Rwritev These calls currently does nothing and are only provided for compatibility with programs which use them: Rlisten Rselect SOCKSinit The source can either be modified directly, or by using defines to change the source during compilation, as following: Either add this line to the command compilation line (e.g. CFLAGS): -Dconnect=Rconnect -Dbind=Rbind -Dgetsockname=Rgetsockname -Dgetpeername=Rgetpeername -Daccept=Raccept -Drresvport=Rrresvport -Dbindresvport=Rbindresvport -Dgethostbyname=Rgethostbyname -Dgethostbyname2=Rgethostbyname2 -Dsendto=Rsendto -Drecvfrom=Rrecvfrom -Drecvfrom=Rrecvfrom -Dwrite=Rwrite -Dwritev=Rwritev -Dsend=Rsend -Dsendmsg=Rsendmsg -Dread=Rread -Dreadv=Rreadv -Drecv=Rrecv -Drecvmsg=Rrecvmsg -Dgetaddrinfo=Rgetaddrinfo -Dgetipnodebyname=Rgetipnodebyname or add "include " to every C file in the program you are compiling. Libraries In total there are three libraries distributed with this package: libsocks.so - standard shared library, contains Rfoo type functions. libsocks.a - static version of the above. libdsocks.so - shared library which does "on the fly" socksification. dante-1.1.19.dfsg/doc/module/0000755000175000017500000000000011037370225014330 5ustar roamroamdante-1.1.19.dfsg/doc/module/redirect.tex0000644000175000017500000001562007405654350016667 0ustar roamroam%@(#)$Id: redirect.tex,v 1.11 2001/12/12 13:17:28 karls Exp $ %/* % * Copyright (c) 2001 % * Inferno Nettverk A/S, Norway. All rights reserved. % * % * Redistribution and use in source and binary forms, with or without % * modification, are permitted provided that the following conditions % * are met: % * 1. The above copyright notice, this list of conditions and the following % * disclaimer must appear in all copies of the software, derivative works % * or modified versions, and any portions thereof, aswell as in all % * supporting documentation. % * 2. All advertising materials mentioning features or use of this software % * must display the following acknowledgement: % * This product includes software developed by % * Inferno Nettverk A/S, Norway. % * 3. The name of the author may not be used to endorse or promote products % * derived from this software without specific prior written permission. % * % * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR % * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES % * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. % * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, % * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT % * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, % * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY % * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT % * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF % * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. % * % * Inferno Nettverk A/S requests users of this software to return to % * % * Software Distribution Coordinator or sdc@inet.no % * Inferno Nettverk A/S % * Oslo Research Park % * Gaustadalléen 21 % * NO-0349 Oslo % * Norway % * % * any improvements or extensions that they make and grant Inferno Nettverk A/S % * the rights to redistribute these changes. % * % */ \documentclass[a4paper, final, twoside, english]{article} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{html} \title{\emph{Dante}, Module \emph{Redirect}} \author{ Inferno Nettverk A/S \\ Oslo Research Park \\ Gaustadalléen 21 \\ NO-0349 Oslo \\ Norway} \date{$$$$Date: 2001/12/12 13:17:28 $$$$} \makeindex \begin{document} \maketitle \thispagestyle{empty} \clearpage \setcounter{page}{1} \section{Description} The \emph{Redirect} module gives you control over both where clients requests and replies will end up, and what addresses and portranges the Dante server will use on behalf of the clients for outgoing connections. It can be used to redirect clients connections from one address to another, useful for cases where you for instance want clients to go via a local web-proxy instead of directly to the webserver. It can be used to restrict the portranges used by the Dante server, useful for cases where a firewall needs to know what portranges the Dante server will use. A stranger but also possible use is to limit the number of sessions clients can establish. \section{Syntax} The syntax of the \texttt{redirect} statement is as follows: \verb"redirect from:
to:
" Either \texttt{from} or \texttt{to} are optional, but at least one must be given. \texttt{address} are addresses in the usual Dante format. \section{Semantics} The \texttt{redirect} statement integrates as a part of socks-rules. The meaning of \texttt{to} and \texttt{from} varies considerably depending on what socks \texttt{command} the \texttt{redirect} statement applies to. The next section will detail the semantics of each \emph{redirect} application based on the \texttt{command} used (with the corresponding \texttt{protocol} in parenthesis, for those preferring that). \subsection{\texttt{bind} (\texttt{protocol: tcp})} \texttt{from} is the address to bind on behalf of the client. \\ \texttt{to} is ignored. \subsection{\texttt{bindreply} (\texttt{protocol: tcp})} \texttt{from} is the address to tell the client the bindreply (connection) is from. \\ \texttt{to} is the address to send the bindreply (connection) to. \subsection{\texttt{connect} (\texttt{protocol: tcp})} \texttt{from} is the address to use on behalf of the client for making the connection. \\ \texttt{to} is the address to connect the client to. \subsection{\texttt{udpassociate} (\texttt{protocol: udp})} \texttt{from} is the address to use on behalf of the client for sending udp packets. \\ \texttt{to} is the address to send packets from the client to. \subsection{\texttt{udpreply} (\texttt{protocol: udp})} \texttt{from} is the address to tell the client the reply is from. \\ \texttt{to} is the address to send the reply to. \section{Examples} This section shows several examples of how one could use the \emph{redirect} module. \subsection{Redirecting web-requests to a web proxy} The below rule redirects clients from the \texttt{10.0.0.0/24} net who want to connect to the http port of any address to the address \texttt{squid.example.com}, port \texttt{3128}. \begin{verbatim} pass { from: 10.0.0.0/24 to: 0.0.0.0/0 port = http command: connect redirect to: squid.example.com port = 3128 } \end{verbatim} \subsection{Limiting the portranges used by the \emph{Dante} server} The next rule says that the server should limit itself to using portranges above \texttt{32768} on the interface \texttt{de1} when sending packets out on behalf of the clients on the \texttt{10.1.1.0/24} net. \begin{verbatim} pass { from: 10.0.0.0/24 redirect from: de1 port > 32768} } \end{verbatim} \subsection{Limiting concurrent user sessions} A more novel use of the \texttt{redirect} statement allows one, in a rather ad-hoc way, to limit the number of concurrent user sessions. The next rule says the server should limit itself to using the portrange \texttt{2048 - 2051} on the interface \texttt{de1}, a range of four portnumbers, for the client 10.0.0.1. \begin{verbatim} pass { from: 10.0.0.1/32 redirect from: de1 port 2048 - 2051 } \end{verbatim} When the client 10.1.1.1 reaches four concurrent sessions, it will not be able to create new ones until it closes one of the previously established sessions. For this to work correctly it is however required that no other client accidently ends up using the same portrange. One way to accomplish this is to make the interfacename \texttt{de1} be used uniquely for this sort of thing, or to make sure all other rules use a different portrange by way of having their own \texttt{redirect} statement. The former is greatly preferred. As can probably be guessed, this is a new usage of the \texttt{redirect} statement that was not intended in the design, but was discovered by accident and is mentioned here since it could be useful. \end{document} dante-1.1.19.dfsg/doc/module/bandwidth.ps0000644000175000017500000017253010333437502016650 0ustar roamroam%!PS-Adobe-2.0 %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: bandwidth.dvi %%Pages: 4 %%PageOrder: Ascend %%BoundingBox: 0 0 596 842 %%EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips bandwidth.dvi -o bandwidth.ps %DVIPSParameters: dpi=600, compressed %DVIPSSource: TeX output 2005.11.03:1423 %%BeginProcSet: texc.pro %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr 1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B /chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ /cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 {2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ 1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) (LaserWriter 16/600)]{A length product length le{A length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end %%EndProcSet TeXDict begin 39158280 55380996 1000 600 600 (bandwidth.dvi) @start %DVIPSBitmapFont: Fa ecbx1200 12 30 /Fa 30 122 df46 D<17C0EE01E01603A217C01607A2EE0F80A217005EA2163EA2163C167CA2 5EA24B5AA25E1503A24B5AA25E150FA24BC7FCA2151E153EA25DA2157815F8A24A5AA25D 1403A24A5AA25D140FA24AC8FCA2143EA2143C147CA25CA25C1301A2495AA25C1307A249 5AA291C9FC5BA2133EA2133C137CA25BA25B1201A2485AA2485AA25B120FA248CAFCA212 1E123EA25AA2127812F8A25A12602B647ACA38>I49 DII<163FA25E5E5D5DA25D5D5D5DA25D92B5FCEC01F7EC03E7140715C7 EC0F87EC1F07143E147E147C14F8EB01F0EB03E0130714C0EB0F80EB1F00133E5BA25B48 5A485A485A120F5B48C7FC123E5A12FCB91280A5C8000F90C7FCAC027FB61280A531417D C038>I<0007150301E0143F01FFEB07FF91B6FC5E5E5E5E5E16804BC7FC5D15E092C8FC 01C0C9FCAAEC3FF001C1B5FC01C714C001DF14F09039FFE03FFC9138000FFE01FC6D7E01 F06D13804915C0497F6C4815E0C8FC6F13F0A317F8A4EA0F80EA3FE0487E12FF7FA317F0 5B5D6C4815E05B007EC74813C0123E003F4A1380D81FC0491300D80FF0495AD807FEEBFF FC6CB612F0C65D013F1480010F01FCC7FC010113C02D427BC038>I73 D76 D<903801FFE0011F13FE017F6D7E48B612E03A03FE007FF84848EB1FFC6D6D7E486C6D7E A26F7FA36F7F6C5A6C5AEA00F090C7FCA40203B5FC91B6FC1307013F13F19038FFFC0100 0313E0481380381FFE00485A5B127F5B12FF5BA35DA26D5B6C6C5B4B13F0D83FFE013EEB FFC03A1FFF80FC7F0007EBFFF86CECE01FC66CEB8007D90FFCC9FC322F7DAD36>97 DIIIIIII<137C48 B4FC4813804813C0A24813E0A56C13C0A26C13806C1300EA007C90C7FCAAEB7FC0EA7FFF A512037EB3AFB6FCA518467CC520>I108 D<90277F8007FEEC0FFCB590263FFFC090387FFF8092B5D8F001B512E00281 6E4880913D87F01FFC0FE03FF8913D8FC00FFE1F801FFC0003D99F009026FF3E007F6C01 9E6D013C130F02BC5D02F86D496D7EA24A5D4A5DA34A5DB3A7B60081B60003B512FEA557 2D7CAC5E>I<90397F8007FEB590383FFF8092B512E0028114F8913987F03FFC91388F80 1F000390399F000FFE6C139E14BC02F86D7E5CA25CA35CB3A7B60083B512FEA5372D7CAC 3E>II<90397FC00FF8B590 B57E02C314E002CF14F89139DFC03FFC9139FF001FFE000301FCEB07FF6C496D13804A15 C04A6D13E05C7013F0A2EF7FF8A4EF3FFCACEF7FF8A318F017FFA24C13E06E15C06E5B6E 4913806E4913006E495A9139DFC07FFC02CFB512F002C314C002C091C7FCED1FF092C9FC ADB67EA536407DAC3E>I<90387F807FB53881FFE0028313F0028F13F8ED8FFC91389F1F FE000313BE6C13BC14F8A214F0ED0FFC9138E007F8ED01E092C7FCA35CB3A5B612E0A527 2D7DAC2E>114 D<90391FFC038090B51287000314FF120F381FF003383FC00049133F48 C7121F127E00FE140FA215077EA27F01E090C7FC13FE387FFFF014FF6C14C015F06C14FC 6C800003806C15806C7E010F14C0EB003F020313E0140000F0143FA26C141F150FA27EA2 6C15C06C141FA26DEB3F8001E0EB7F009038F803FE90B55A00FC5CD8F03F13E026E007FE C7FC232F7CAD2C>IIIII121 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fb ectt1000 10 41 /Fb 41 126 df<007FB512F0B612F8A36C14F01D0579942C>45 D<121FEA3F80EA7FC0EA FFE0A5EA7FC0EA3F80EA1F000B0B708A2C>I<1507ED0F80A2151F16005D153E157E157C A215FC5D14015D14035D14075D140F5D141F92C7FC5C143EA2147E147C14FC5C13015C13 035C13075C130F5C131F91C8FC5B133EA2137E137C13FC5B12015B12035B12075B120F5B 121F90C9FCA25A123E127E127C12FC5AA2127021417BB92C>II<1307497EA2131FA2133F137F13FF5A1207127FB5FC13DF139F EA7C1F1200B3AE007FB512E0B612F0A36C14E01C3477B32C>II52 D<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F00C7FCAE 121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B2470A32C>58 D<1502ED0F80151F157F15FF913803FE00EC0FFCEC1FF0EC7FE0ECFF80D903FEC7FC495A EB1FF0495AEBFF80000390C8FCEA07FCEA1FF8EA3FE0EAFF8090C9FCA27FEA3FE0EA1FF8 EA07FC6CB4FCC67FEB3FE06D7EEB07FC6D7E903800FF80EC7FE0EC1FF0EC0FFCEC03FE91 3800FF80157F151F150FED0200212A7BAD2C>60 D<007FB612F0B712F8A36C15F0CAFCA8 007FB612F0B712F8A36C15F025127DA12C>I<122012F87EB4FC7FEA3FE0EA1FF8EA07FC 6CB4FCC67FEB3FE06D7EEB07FC6D7E903800FF80EC7FE0EC1FF0EC0FFCEC03FE913800FF 80157FA215FF913803FE00EC0FFCEC1FF0EC7FE0ECFF80D903FEC7FC495AEB1FF0495AEB FF80000390C8FCEA07FCEA1FF8EA3FE0EAFF8090C9FC12FC5A1220212A7BAD2C>I<9039 01FC038090390FFF87C04913EF017F13FF90B6FC4813073803FC01497E4848137F484813 3F49131F121F5B003F140F90C7FCA2127EED078092C7FCA212FE5AA8913803FFF84A13FC A27E007E6D13F89138000FC0A36C141FA27F121F6D133F120F6D137F6C7E6C6C13FF6D5A 3801FF076C90B5FC6D13EF011F13CF6DEB0780D901FCC7FC26357DB32C>71 DI<007FB512F8B612FCA36C14F839000F C000B3B3A5007FB512F8B612FCA36C14F81E3379B22C>I<007FB512C0B612F88115FF6C 15802603F00013C0153FED0FE0ED07F0A2150316F81501A6150316F01507A2ED0FE0ED3F C015FF90B61280160015FC5D15C001F0C8FCB0387FFF80B57EA36C5B25337EB22C>80 D<90381FF80790B5EA0F804814CF000714FF5A381FF01F383FC003497E48C7FC007E147F 00FE143F5A151FA46CEC0F00007E91C7FC127F7FEA3FE0EA1FFCEBFFC06C13FC0003EBFF C06C14F06C6C7F01077F9038007FFEEC07FF02001380153FED1FC0A2ED0FE0A200781407 12FCA56CEC0FC0A26CEC1F806D133F01E0EB7F009038FE01FF90B55A5D00F914F0D8F83F 13C0D8700790C7FC23357CB32C>83 D<3B7FFF803FFFC0B56C4813E0A36C496C13C03B03 F00001F800B3AF6D130300015DA26D130700005D6D130F017F495A6D6C485AECE0FF6DB5 C7FC6D5B010313F86D5B9038003F802B3480B22C>85 D<3801FFF0000713FE001F6D7E15 E048809038C01FF81407EC01FC381F80000006C77EC8127EA3ECFFFE131F90B5FC120312 0F48EB807E383FF800EA7FC090C7FC12FE5AA47E007F14FEEB8003383FE01F6CB612FC6C 15FE6C14BF0001EBFE1F3A003FF007FC27247CA32C>97 DI<903803FFE0011F13F8 017F13FE48B5FC48804848C6FCEA0FF0485A49137E4848131890C9FC5A127EA25AA8127E A2127F6C140F6DEB1F806C7E6D133F6C6CEB7F003907FE03FF6CB55A6C5C6C6C5B011F13 E0010390C7FC21247AA32C>IIII104 D<1307EB1FC0A2497EA36D5AA20107C7FC90C8FCA7387FFFC0 80B5FC7EA2EA0007B3A8007FB512FCB612FEA36C14FC1F3479B32C>I107 D<387FFFE0B57EA37EEA0003B3B3A5007FB61280B712C0A36C158022337BB22C>I<3A7F 83F007E09039CFFC1FF83AFFDFFE3FFCD87FFF13FF91B57E3A07FE1FFC3E01FCEBF83F49 6C487E01F013E001E013C0A301C01380B33B7FFC3FF87FF0027F13FFD8FFFE6D13F8D87F FC4913F0023F137F2D2481A32C>I<397FF01FE039FFF87FFC9038F9FFFE01FB7F6CB6FC 00019038F03F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480A36C01E0 140029247FA32C>II<397FF01FE039FFF8FFF801FB13FE90B6FC6C158000019038 F07FC09138801FE091380007F049EB03F85BED01FC491300A216FE167EA816FE6D14FCA2 ED01F86D13036DEB07F0150F9138801FE09138E07FC091B51280160001FB5B01F813F8EC 3FC091C8FCAD387FFFE0B57EA36C5B27367FA32C>I114 D<90387FF8700003B512F8120F5A5A387FC00F 387E00034813015AA36CEB00F0007F140013F0383FFFC06C13FE6CEBFF80000314E0C66C 13F8010113FCEB0007EC00FE0078147F00FC143F151F7EA26C143F6D133E6D13FE9038F0 07FC90B5FC15F815E000F8148039701FFC0020247AA32C>I<131E133FA9007FB6FCB712 80A36C1500D8003FC8FCB1ED03C0ED07E0A5EC800F011FEB1FC0ECE07F6DB51280160001 035B6D13F89038003FE0232E7EAD2C>I<3A7FF003FF80486C487FA3007F7F0001EB000F B3A3151FA2153F6D137F3900FE03FF90B7FC6D15807F6D13CF902603FE07130029247FA3 2C>I<3A7FFF01FFFCB514FE148314016C15FC3A03E0000F80A26D131F00011500A26D5B 0000143EA26D137E017C137CA2017E13FC013E5BA2EB3F01011F5BA21483010F5BA214C7 01075BA214EF01035BA214FF6D90C7FCA26D5A147C27247EA32C>II<3A3FFF03FFF048018713F8A36C010313F03A00FC007E00 5D90387E01F8013F5BEB1F83EC87E090380FCFC0903807EF80EB03FF6D90C7FC5C6D5A14 7C14FE130180903803EF80903807CFC0EB0FC7EC83E090381F01F0013F7FEB7E00017C13 7C49137E0001803A7FFF01FFFC1483B514FE6C15FC140127247EA32C>I<3A7FFF01FFFC B5008113FE148314816C010113FC3A03E0000F806C7E151F6D140012005D6D133E137C01 7E137E013E137CA2013F13FC6D5BA2EB0F815DA2EB07C1ECC3E0A2EB03E3ECE7C0130114 F75DEB00FFA292C7FC80A2143EA2147E147CA214FC5CA2EA0C01003F5BEA7F83EB87E0EA 7E0F495A387FFF806C90C8FC6C5A6C5AEA07E027367EA32C>I<15FF02071380141F147F 91B512004913C04AC7FCEB03F85CB31307EB1FE013FF007F5BB55A49C8FC6D7E6C7FC67F 131FEB07F01303B380EB01FEECFFC06D13FF6E1380141F14070200130021417BB92C> 123 D125 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fc ecti1000 10 24 /Fc 24 121 df<387FFFF8A2B5FCA214F0150579941E>45 D<120EEA3F80127F12FFA313 00127E123C0909778819>I<0107B612FCEFFF8018C0903B000FF0001FF04BEB07F81703 021F15FC17014B14FEA2023F1400A24B1301A2147F18FC92C7120318F84A140718F04AEC 0FE0EF1FC00101ED3F80EF7F004AEB01FEEE07F849B612E05F9139F80007F0EE01FC0107 6E7E177F4AEC3F80A2010F16C0171F5CA2131F173F5CA2133FEF7F805C1800017F5D4C5A 91C7485A5F49140FEE1FE0494A5A00014AB45AB748C7FC16F816C037397BB83A>66 D<0103B612FEEFFFC018F0903B0007F8000FF84BEB03FCEF00FE020F157FF03F804B141F 19C0021F150F19E05D1807143F19F05DA2147FA292C8FCA25C180F5CA2130119E04A151F A2130319C04A153FA201071780187F4A1600A2010F16FEA24A4A5A60011F15034D5A4A5D 4D5A013F4B5A173F4A4AC7FC17FC017FEC03F84C5A91C7EA1FC04949B45A007F90B548C8 FCB712F016803C397CB83F>68 D<14F8EB07FE90381F871C90383E03FE137CEBF8011201 48486C5A485A120FEBC001001F5CA2EA3F801403007F5C1300A21407485C5AA2140F5D48 ECC1C0A2141F15831680143F1587007C017F1300ECFF076C485B9038038F8E391F0F079E 3907FE03FC3901F000F0222677A42A>97 D<133FEA1FFFA3C67E137EA313FE5BA312015B A312035BA31207EBE0F8EBE7FE9038EF0F80390FFC07C013F89038F003E013E0D81FC013 F0A21380A2123F1300A214075A127EA2140F12FE4814E0A2141F15C05AEC3F80A215005C 147E5C387801F8007C5B383C03E0383E07C0381E1F80D80FFEC7FCEA01F01C3B77B926> I<147F903803FFC090380FC1E090381F0070017E13784913383901F801F83803F0031207 13E0120FD81FC013F091C7FC485AA2127F90C8FCA35A5AA45AA3153015381578007C14F0 007EEB01E0003EEB03C0EC0F806CEB3E00380F81F83803FFE0C690C7FC1D2677A426>I< ED01F815FFA3150316F0A21507A216E0A2150FA216C0A2151FA21680A2153FA202F81300 EB07FE90381F877F90383E03FF017C5BEBF80112013803F00048485B120FEBC001121F5D EA3F801403127F01005BA214075A485CA2140FA248ECC1C0A2141F15C3ED8380143F1587 007C017F1300ECFF076C485B9038038F8E391F0F079E3907FE03FC3901F000F0253B77B9 2A>I<147F903803FFC090380FC1E090383F00F0017E13785B485A485A485A120F4913F8 001F14F0383F8001EC07E0EC1F80397F81FF00EBFFF8148090C8FC5A5AA55AA21530007C 14381578007E14F0003EEB01E0EC03C06CEB0F806CEB3E00380781F83803FFE0C690C7FC 1D2677A426>I104 DI107 DIII<147F90 3803FFC090380FC1F090381F00F8017E137C5B4848137E4848133E0007143F5B120F485A A2485A157F127F90C7FCA215FF5A4814FEA2140115FC5AEC03F8A2EC07F015E0140F007C 14C0007EEB1F80003EEB3F00147E6C13F8380F83F03803FFC0C648C7FC202677A42A>I< 9039078007C090391FE03FF090393CF0787C903938F8E03E9038787FC00170497EECFF00 D9F0FE148013E05CEA01E113C15CA2D80003143FA25CA20107147FA24A1400A2010F5C5E 5C4B5A131F5EEC80035E013F495A6E485A5E6E48C7FC017F133EEC70FC90387E3FF0EC0F 8001FEC9FCA25BA21201A25BA21203A25B1207B512C0A3293580A42A>I<3903C003F039 0FF01FFC391E783C0F381C7C703A3C3EE03F8038383FC0EB7F800078150000701300151C D8F07E90C7FCEAE0FE5BA2120012015BA312035BA312075BA3120F5BA3121F5BA3123F90 C9FC120E212679A423>114 D<14FE903807FF8090380F83C090383E00E04913F0017813 7001F813F00001130313F0A215E00003EB01C06DC7FC7FEBFFC06C13F814FE6C7F6D1380 7F010F13C01300143F141F140F123E127E00FE1480A348EB1F0012E06C133E00705B6C5B 381E03E06CB45AD801FEC7FC1C267AA422>II<13F8D803FEEB01C0D8078FEB03E0390E0F8007121E121C0038140F 131F007815C01270013F131F00F0130000E015805BD8007E133FA201FE14005B5D120149 137EA215FE120349EBFC0EA20201131E161C15F813E0163CD9F003133814070001ECF070 91381EF8F03A00F83C78E090393FF03FC090390FC00F00272679A42D>I<01F0130ED803 FC133FD8071EEB7F80EA0E1F121C123C0038143F49131F0070140FA25BD8F07E140000E0 8013FEC6485B150E12015B151E0003141C5BA2153C000714385B5DA35DA24A5A14030003 5C6D48C7FC0001130E3800F83CEB7FF8EB0FC0212679A426>I<01F01507D803FC903903 801F80D8071E903907C03FC0D80E1F130F121C123C0038021F131F49EC800F00701607A2 49133FD8F07E168000E0ED000313FEC64849130718000001147E5B03FE5B0003160E495B A2171E00070101141C01E05B173C1738A217781770020314F05F0003010713016D486C48 5A000190391E7C07802800FC3C3E0FC7FC90393FF81FFE90390FE003F0322679A437>I< 903907E007C090391FF81FF89039787C383C9038F03E703A01E01EE0FE3803C01F018013 C0D8070014FC481480000E1570023F1300001E91C7FC121CA2C75AA2147EA214FEA25CA2 1301A24A1370A2010314F016E0001C5B007E1401010714C000FEEC0380010F1307010EEB 0F0039781CF81E9038387C3C393FF03FF03907C00FC027267CA427>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fd ecrm1000 10 49 /Fd 49 122 df27 DI30 D<121C127FEAFF80A213C0A3127F121C1200A4 12011380A2120313005A1206120E5A5A5A12600A1979B917>39 D<146014E0EB01C0EB03 80EB0700130E131E5B5BA25B485AA2485AA212075B120F90C7FCA25A121EA2123EA35AA6 5AB2127CA67EA3121EA2121F7EA27F12077F1203A26C7EA26C7E1378A27F7F130E7FEB03 80EB01C0EB00E01460135278BD20>I<12C07E12707E7E7E120F6C7E6C7EA26C7E6C7EA2 1378A2137C133C133E131EA2131F7FA21480A3EB07C0A6EB03E0B2EB07C0A6EB0F80A314 00A25B131EA2133E133C137C1378A25BA2485A485AA2485A48C7FC120E5A5A5A5A5A1352 7CBD20>I<121C127FEAFF80A213C0A3127F121C1200A412011380A2120313005A120612 0E5A5A5A12600A19798817>44 DI<121C127FEAFF80A5EA7F00 121C0909798817>I<1506A2150E150CA2151C151815381530A215701560A215E015C0A2 14011580A2140315005C1406A2140E140CA2141C1418A214381430A21470146014E05CA2 13015CA2130391C7FCA25B1306A2130E130C131C1318A213381330A213701360A213E05B A212015B120390C8FCA25A1206A2120E120CA2121C1218A21238123012701260A212E05A A21F537BBD2A>IIIII<1538A21578 15F8A2140114031407A2140F141F141B14331473146314C313011483EB03031307130613 0C131C131813301370136013C01201EA038013005A120E120C5A123812305A12E0B712F8 A3C73803F800AA4A7E0103B512F8A325387EB72A>I<121C127FEAFF80A5EA7F00121CC7 FCB2121C127FEAFF80A5EA7F00121C092479A317>58 D66 D<913A01FF800180020FEBE003027F13F8903A01FF807E07903A03FC000F0FD90FF0EB03 9F4948EB01DFD93F80EB00FF49C8127F01FE153F12014848151F4848150FA248481507A2 485A1703123F5B007F1601A35B00FF93C7FCAD127F6DED0180A3123F7F001F160318006C 7E5F6C7E17066C6C150E6C6C5D00001618017F15386D6C5CD91FE05C6D6CEB03C0D903FC EB0F80902701FF803FC7FC9039007FFFFC020F13F002011380313D7BBA3C>I69 D73 D75 DII83 D<003FB812E0A3D9C003EB001F27 3E0001FE130348EE01F00078160000701770A300601730A400E01738481718A4C71600B3 B0913807FF80011FB612E0A335397DB83C>I97 DIIII<147E903803FF8090380FC1E0EB1F8790383F0FF0137EA213FCA23901F803C091C7FC ADB512FCA3D801F8C7FCB3AB487E387FFFF8A31C3B7FBA19>IIII107 DI< 2703F00FF0EB1FE000FFD93FFCEB7FF8913AF03F01E07E903BF1C01F83803F3D0FF3800F C7001F802603F70013CE01FE14DC49D907F8EB0FC0A2495CA3495CB3A3486C496CEB1FE0 B500C1B50083B5FCA340257EA445>I<3903F00FF000FFEB3FFCECF03F9039F1C01F803A 0FF3800FC03803F70013FE496D7EA25BA35BB3A3486C497EB500C1B51280A329257EA42E >II<3903F01FE000FFEB7FF89038F1E07E9039F3801F803A07F7000F C0D803FEEB07E049EB03F04914F849130116FC150016FEA3167FAA16FEA3ED01FCA26DEB 03F816F06D13076DEB0FE001F614C09039F7803F009038F1E07E9038F0FFF8EC1FC091C8 FCAB487EB512C0A328357EA42E>II<3807E01F00FFEB7FC09038E1E3E09038E387F0 380FE707EA03E613EE9038EC03E09038FC0080491300A45BB3A2487EB512F0A31C257EA4 21>II<13 18A51338A31378A313F8120112031207001FB5FCB6FCA2D801F8C7FCB215C0A93800FC01 1580EB7C03017E13006D5AEB0FFEEB01F81A347FB220>IIIIII E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fe ecbx1440 14.4 22 /Fe 22 122 df<151E153E15FE1403140F147FEB07FF0003B5FCB6FCA3EBF87FEAFC00C7 FCB3B3B3A6007FB712FCA52E4E76CD42>49 DI< 913807FFC0027F13FC0103B67E010F15E090261FF80313F890267FC0007F01FEC7EA3FFE 48488148486E138013FE486C6C6D13C0804817E080A66C5B18C06C5B6C90C75AD8003816 8090C8FC4C1300A24C5A5F4C5A4B5B4B13C0030F5BDB7FFEC7FC91387FFFF816C016FCEE FF80DA000313E09238007FF8EE3FFE707E70138018C07013E018F07013F8A218FC82A218 FEA3EA03C0EA0FF0EA3FFC487EA2B5FCA218FCA25E18F8A26C4816F0495C4916E0D83FE0 4A13C06C485CD80FF04A1380D807FE91387FFE003B03FFE003FFFC6C90B65A6C6C15E001 0F92C7FC010114FCD9001F1380374F7BCD42>I<17FC1601A216031607160FA2161F163F 167FA216FF5D5DA25D5D5D167F153E157E15FC15F8EC01F01403EC07E015C0EC0F80141F EC3F00143E5C14FC495A5C495A1307495A5C49C7FC5B137E137C5B1201485A5B485A120F 485A90C8FC123E127E5ABA1280A5C901FCC7FCAF021FB71280A5394F7CCE42>I<486C15 0601F0153E01FEEC01FED9FFF0133F91B65A5F5F5F5F5F94C7FC16FC5E16E093C8FC15FC 01F0138091CAFCAC913807FF80023F13F891B512FE01F36E7E9026FFFC0113E09139E000 7FF891C76C7E496E7E01F86E7E5B7013804916C0C9FC18E08218F0A418F8A31203EA0FE0 EA3FF8487EA212FF7FA218F0A25B5E6C4816E05B01C016C06CC85A18806C6C4A13007FD8 0FF04A5A6C6CECFFFCD803FE4913F02701FFE00F5B6C6CB612806D92C7FC010F14F80101 14C09026003FFCC8FC354F7ACD42>I68 DI83 D97 D<913803FFE0023F13FE91B67E010315E0010F9038003FF8D93FFCEB07FC4948497E4948 131F4849497E485B485BA24890C7FC5A5B003F6F5A705A705A007F92C8FC5BA312FFAD12 7F7FA3123F7F6CEE0F80A26C6D141F18006C6D5C6C6D143E6C6D147E6C6D5C6D6C495A6D B4EB07F0010F9038C01FE06D90B5128001014AC7FCD9003F13F80203138031387CB63A> 99 D<913807FF80027F13F849B512FE01076E7E011F010313E0903A3FFC007FF0D97FF0 6D7E49486D7E4849130F48496D7E48824890C77E1880485A82003F17C0A3485A18E082A2 12FFA290B8FCA401FCCAFCA6127FA37F123FA2EF03E06C7E17076C17C06C6D140F18806C 6D141F6C6DEC3F006C6D147ED97FFC495AD91FFFEB07F86D9038E03FF0010390B512C001 005D023F01FCC7FC020113E033387CB63C>101 D<133FEBFFC0487F487FA2487FA66C5B A26C5B6C5B013FC7FC90C8FCAEEB1FF8B5FCA512017EB3B3A6B612F0A51C547CD324> 105 D108 DII<913801FFC0023F13FE91B67E010315E001 0F018013F8903A3FFC001FFED97FF0EB07FF49486D7F48496D7F48496D7F91C8127F4883 488349153F001F83A2003F8349151FA2007F83A400FF1880AC007F1800A3003F5F6D153F A2001F5FA26C6C4B5AA26C6D4A5A6C5F6C6D495B6C6D495B6D6C4990C7FCD93FFCEB1FFE 6DB46CB45A010790B512F0010115C0D9003F49C8FC020313E039387CB642>II<90393FF001FCB590 380FFF804B13E0037F13F09238FE1FF89138F1F83F00019138F07FFC6CEBF3E015C0ECF7 80A2ECFF00EE3FF84AEB1FF0EE0FE093C7FC5CA45CB3ABB612FEA52E367DB535>114 D<903903FFC00E011FEBFC1E90B6127E000315FE3907FE003FD80FF0130F484813034848 1301491300127F90C8127EA248153EA27FA27F01F091C7FC13FCEBFF806C13FEECFFF06C 14FE6F7E6C15E06C816C15FC6C81C681133F010F15801301D9000F14C0EC003F030713E0 150100F880167F6C153FA2161F7EA217C07E6D143F17807F6DEC7F0001F85C6DEB03FE90 39FF801FFC486CB512F0D8F81F14C0D8F00791C7FC39E0007FF02B387CB634>I<147CA6 14FCA41301A31303A21307A2130F131F133F137F13FF1203000F90B512FEB7FCA426007F FCC8FCB3A9EE0F80ABEE1F006D7EA2011F143E806D6D5A6DEBC1F86DEBFFF001005C023F 1380DA03FEC7FC294D7ECB33>I120 DI E %EndDVIPSBitmapFont %DVIPSBitmapFont: Ff ecrm1200 12 37 /Ff 37 234 df45 D<160CA2161C1618A21638163016701660A2 16E016C0A21501168015031600A25D1506A2150E150CA2151C151815381530A215701560 A215E05DA214015D140392C7FCA25C1406A2140E140C141C1418A214381430A214701460 A214E05C13015CA2130391C8FCA25B1306130E130CA2131C1318A213381330A213701360 13E05BA212015BA2120390C9FCA25A1206120E120CA2121C1218A21238123012701260A2 12E05AA226647BCA31>47 D<14FF010713E090381F81F890383E007C01FC133F4848EB1F 8049130F4848EB07C04848EB03E0A2000F15F0491301001F15F8A2003F15FCA390C8FC48 15FEA54815FFB3A46C15FEA56D1301003F15FCA3001F15F8A26C6CEB03F0A36C6CEB07E0 000315C06D130F6C6CEB1F806C6CEB3F00013E137C90381F81F8903807FFE0010090C7FC 28447CC131>I<143014F013011303131F13FFB5FC13E713071200B3B3B0497E497E007F B6FCA3204278C131>II<49B4FC010F 13E0013F13FC9038FE01FE3A01F0007F80D803C0EB3FC048C7EA1FE0120EED0FF0EA0FE0 486C14F8A215077F5BA26C48130FEA03C0C813F0A3ED1FE0A2ED3FC01680ED7F0015FE4A 5AEC03F0EC1FC0D90FFFC7FC15F090380001FCEC007FED3F80ED1FC0ED0FE016F0ED07F8 16FC150316FEA2150116FFA3121EEA7F80487EA416FE491303A2007EC713FC0070140700 3015F80038140F6C15F06CEC1FE06C6CEB3FC0D803E0EB7F803A01FE01FE0039007FFFF8 010F13E0010190C7FC28447CC131>II<121CA2EA1F8090B712C0A3481680A2 17005E0038C8120C0030151C00705D0060153016705E5E4814014B5A4BC7FCC81206150E 5D151815385D156015E04A5AA24A5A140792C8FC5CA25C141E143EA2147E147CA214FCA2 1301A3495AA41307A6130FAA6D5AEB01C02A457BC231>55 D<14FF010713E0011F13F890 387F80FC9038FC007E48487F4848EB1F804848EB0FC0000FEC07E0485AED03F0485A16F8 007F140190C713FCA25AA216FE1500A516FFA46C5CA36C7E5D121F7F000F5C6C6C130615 0E6C6C5B6C6C5BD8007C5B90383F01E090390FFF80FE903801FE0090C8FC150116FCA4ED 03F8A216F0D80F801307486C14E0486C130F16C0ED1F80A249EB3F0049137E001EC75A00 1C495A000F495A3907E01FE06CB51280C649C7FCEB1FF028447CC131>57 D<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3A5121EEA7F80A2EAFFC0A4EA7F80A2 EA1E000A2B78AA1B>I<16C04B7EA34B7EA34B7EA34B7EA3ED19FEA3ED30FFA203707FED 607FA203E07FEDC03FA2020180ED801FA2DA03007F160FA20206801607A24A6D7EA34A6D 7EA34A6D7EA20270810260147FA202E08191B7FCA249820280C7121FA249C87F170FA201 06821707A2496F7EA3496F7EA3496F7EA201788313F8486C83D80FFF03037FB500E0027F EBFFC0A342477DC649>65 D68 D71 D73 D78 DII82 D<49B41303010FEBE007013F13F89039FE00FE0FD801F8131FD807E0 EB079F49EB03DF48486DB4FC48C8FC4881003E81127E82127C00FC81A282A37E82A27EA2 6C6C91C7FC7F7FEA3FF813FE381FFFE06C13FE6CEBFFE06C14FC6C14FF6C15C0013F14F0 010F80010180D9001F7F14019138001FFF03031380816F13C0167F163F161F17E000C015 0FA31607A37EA36C16C0160F7E17806C151F6C16006C5D6D147ED8FBC05CD8F9F0495AD8 F07C495A90393FC00FE0D8E00FB51280010149C7FC39C0003FF02B487BC536>I97 D99 D<167FED3FFFA315018182B3EC7F80903803 FFF090380FC07C90383F000E017E1307496D5AD803F87F48487F5B000F81485AA2485AA2 127FA290C8FC5AAB7E7FA2123FA26C7EA2000F5D7F6C6C5B00035C6C6C9038077F806C6C 010E13C0013F011C13FE90380FC0F8903803FFE09026007F0013002F467DC436>III104 D107 DI<3901FC01FE00FF903807FFC091381E07F0913838 01F8000701707F0003EBE0002601FDC07F5C01FF147F91C7FCA25BA35BB3A8486CECFF80 B5D8F83F13FEA32F2C7DAB36>110 DI<39 03F803F000FFEB1FFCEC3C3EEC707F0007EBE0FF3803F9C000015B13FBEC007E153C01FF 13005BA45BB3A748B4FCB512FEA3202C7DAB26>114 D<90383FE0183901FFFC383907E0 1F78390F0003F8001E1301481300007C1478127800F81438A21518A27EA27E6C6C13006C 7E13FC383FFFE06C13FC6C13FF6C14C06C14E0C614F0011F13F81300EC0FFC140300C0EB 01FE1400157E7E153EA27EA36C143C6C147C15786C14F86CEB01F039F38003E039F1F00F 8039E07FFE0038C00FF01F2E7DAC26>I<1306A5130EA4131EA3133E137EA213FE120112 07001FB512F0B6FCA2C648C7FCB3A4150CAA017E131C017F1318A26D133890381F8030EC C070903807E0E0903801FFC09038007F001E3E7EBC26>IIII121 D<1402EC0F804A7E143F147FA24A5A4990C7FCEB03FC495A EB0FE0148049C8FC133C1338132090C9FCA4EB01FE903807FFC090381F03F090387E00FC 49137E48487F485A4848EB1F80000F15C049130F121F484814E01507A2007F15F090C7FC A25AA390B6FCA290C9FCA67EA27FA2123F16306C7E1670000F15606D14E06C6C14C00003 14016C6CEB03806C6CEB0700013E131E90381F80F8903803FFE0010090C7FC24427DC02B >233 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fg ecrm1728 17.28 7 /Fg 7 118 df<120FEA3FC0EA7FE012FF13F0A313F8A2127F123FEA0F381200A8137813 70A313F013E0A2120113C0120313801207A2EA0F00120E121E5A5AA212300D28748B25> 44 D77 D<181EEF3FFEEE07FFA4EE000F1703A21701B3AAEDFF80020F13F8023F13FE91 39FF803F81903A03FC0007C14948EB01E1D91FE0EB00F94948147D4948143D49C8121F48 48150F491507120348481503491501120F121F5BA2123F5B127FA45B12FFAD127F7FA312 3FA27F121FA26C6C1503A26C6C150712036D150F6C6C151F0000163D137F6D6CECF9FF6D 6CEB01F1D90FF0D903C113C06D6CD90F81EBFF80D901FFEB7F019039007FFFFC021F13E0 0201010091C7FC41657BE34B>100 DI108 D<4AB47E020F13F0027F13FE4AC67ED903F8EB1FC0D907E0 EB07E0D91FC0EB03F849486D7E49C87E01FE157F49814848ED1F80000317C04848ED0FE0 A24848ED07F0A2001F17F8491503003F17FCA3007F17FE491501A400FF17FFAC007F17FE A26D1503A3003F17FCA2001F17F86D1507A2000F17F06D150F000717E06C6CED1FC0A26C 6CED3F806C6CED7F00017F15FE6D6C495A6D6C495A6D6C495AD903F8EB1FC06DB4EBFF80 6D6CB448C7FC020F13F00201138038417BBF43>111 D117 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fh ecti1728 17.28 10 /Fh 10 120 df<92B97E1BF84A18FE757E91C701F8C7000113E0047F6F6C7E70486F7E04 7FEE0FFC884D1507757EA204FF7013805FA21DC04B835FA35D94C95AA34B19805E631D00 030F5F4C5FA2515A031F171F4C5F515A515A033F4D5A4C4B5B5090C7FC505A037F4C5A4C ED1FF0F27FE0963801FF8003FFDB07FEC8FC4CEC3FF093B712801AF04A01C0C7EA07FC4C EC01FF9638007FC0747E4A717E93C96C7E871A074A844B160387A2020F854B82A3141F5D A3023F5F5DA3027F96C7FC4B5EA26302FF170F4B5F1A1F6349183F4B4C5A631AFF494D5B 92C9485B4F90C8FC4F5A494D5A4AEE7FF84F5A010F040313C0011F040F5B013FDC7FFEC9 FCBA12F819E096CAFC18F05A6277E15F>66 D<92B97E1BF84A18FE757E91C701F8C70007 7F047F030013F07048ED3FF8047FEE0FFC757E4D6F7E8775138004FFEF7FC04D163F1DE0 1C1F4B19F04D160F1DF8A25D94CAEA07FCA35D5E1DFEA2150F5EA3151F5EA3153F5EA21C 0F157F5E1DFCA215FF4C171FA34A1AF84C173FA34A1AF093CB127FA21DE04A19FF5D1DC0 63020F1A805D631D00141F4B4D5AA2515A143F4B4D5A641B3F027F614B4D5AA2515A02FF 4D90C7FC4B5F1A03505A494E5A4B4C5A505A505A494E5A92C94890C8FC4F5AF10FFC49EF 1FF04AEE7FE04F5A010F040790C9FC011FEE1FFC013F4BB45ABA12C096CAFC18F818805F 6277E166>68 D97 D100 DI<153FEC3FFF010FB5FC5DA3EB000F 6E5AA45DA2140FA25DA2141FA25DA2143FA25DA2147FA25DA214FFA292CAFCA25BA25CA2 0103EC3FE0923801FFFC9139FC07E07E92391F003F800107013C6D7E4B130F4A4880ECF9 E090260FFBC06D7EECFF8092C7FC5C131F5C5C170F495AA25CA24948141F605CA201FF15 3F6091C8FCA248167F605B17FF000394C7FCA2495C5F1207A24914035F000F15074D1338 491778160F001F4C13F819F049141F5F003FEF01E0163F4915C0F003C0127F9438800780 5BF00F0012FF041F131E90C85C040F133818F048923807C1E0933801FF800078DB007EC7 FC3D6576E345>104 D<151E157FEDFF805CA31600A25DEC007892C7FCB3A3EB03F0EB0F FEEB3C1F496C7E01F07FEA01E0EA03C081EA078013005A141F121EA248495AA3007C137F 00785CA214FF00F891C7FCEA700100005BA213035CA213075CA2130F5CA2131F5C133F5C A2137F5C150701FF5B14005D48141E5BA200035C5BA25D5B5DA25DEBF0014A5A5D000149 C7FC3800F80EEB783CEB3FF0EB0FC0215F75DD29>I110 D 116 D119 D E %EndDVIPSBitmapFont end %%EndProlog %%BeginSetup %%Feature: *Resolution 600dpi TeXDict begin %%PaperSize: A4 %%EndSetup %%Page: 1 1 1 0 bop 888 880 a Fh(Dante)p Fg(,)44 b(Mo)t(dule)h Fh(Bandwidth)1205 1121 y Ff(Inferno)33 b(Nettv)m(erk)i(A/S)1247 1237 y(Oslo)d(Researc)m (h)i(P)m(ark)1298 1353 y(Gaustadall\351en)d(21)1365 1469 y(NO-0349)g(Oslo)1502 1586 y(Norw)m(a)m(y)1094 2110 y(Date:)44 b(2001/12/12)30 b(13:17:27)p eop %%Page: 1 2 1 1 bop 232 531 a Fe(1)132 b(Description)232 727 y Fd(The)28 b Fc(Bandwidth)36 b Fd(mo)r(dule)27 b(giv)n(es)f(y)n(ou)h(con)n(trol)f (o)n(v)n(er)f(ho)n(w)i(m)n(uc)n(h)g(bandwidth)h(the)f Fc(Dante)232 826 y Fd(serv)n(er)f(uses)h(on)h(b)r(ehalf)g(of)f(the)h (clien)n(ts.)357 933 y(It)j(can)f(b)r(e)h(used)g(to)f(limit)h (bandwidth)g(to)g(non-w)n(ork)e(related)g(w)n(eb/ftp)i(sites,)g(or)f (to)232 1033 y(prev)n(en)n(t)36 b(ftp-related)h(tra\036c)f(from)h (impacting)g(to)r(o)f(m)n(uc)n(h)h(on)f(in)n(teractiv)n(e)g(telnet/ssh) 232 1132 y(tra\036c.)357 1239 y(It)25 b(can)f(also)g(b)r(e)h(used)g(to) f(giv)n(e)g(more)g(bandwidth)h(to)f(certain)g(clien)n(ts)h(or)f(for)g (tra\036c)g(to)232 1339 y(certain)j(cites.)357 1446 y(In)f(addition,)g (when)g(using)g(the)g Fc(Dante)32 b(bind)d(extension)p Fd(,)d(it)g(can)g(b)r(e)g(used)g(to)g(pro)n(vide)232 1545 y(bandwidth)i(con)n(trol)d(to)i(net)n(w)n(orkserv)n(ers)c(\(lik)n (e)j(e.g.)36 b(w)n(ebserv)n(ers\))25 b(that)i(do)f(not)h(supp)r(ort)232 1645 y(bandwidth)h(con)n(trol)f(in)n(ternally)-7 b(.)232 1957 y Fe(2)132 b(Syn)l(tax)232 2153 y Fd(The)28 b(syn)n(tax)f(of)g (the)h Fb(bandwidth)c Fd(statemen)n(t)k(is)f(as)g(follo)n(ws:)357 2259 y Fb(bandwidth:)39 b()357 2366 y(bytes)26 b Fd(is)h(the)h(maxim)n(um)f(bandwidth,)h(measured)f(in)h(b)n(ytes,)f (to)g(use)h(p)r(er)f(second.)232 2679 y Fe(3)132 b(Seman)l(tics)232 2874 y Fd(The)28 b Fb(bandwidth)c Fd(statemen)n(t)j(in)n(tegrates)g(as) f(a)i(part)f(of)g(so)r(c)n(ks-rules.)357 2981 y(The)e(maximal)f Fb(bandwidth)d Fd(set)k(for)f(a)g(rule)h(will)g(b)r(e)g(shared)f(b)n(y) g(all)h(clien)n(ts)f(matc)n(hing)232 3081 y(that)40 b(rule.)71 b(The)39 b Fc(Dante)45 b Fd(serv)n(er)38 b(will)h(distribute)h(the)f (bandwidth)h(to)f(the)g(matc)n(hing)232 3180 y(clien)n(ts)28 b(in)g(a)f(least-recen)n(tly)f(used)h(fashion,)g(trying)g(to)h(let)g (all)f(clien)n(ts)g(get)h(a)f(fair)g(share.)232 3493 y Fe(4)132 b(Sp)t(ecial)44 b(notes)232 3688 y Fd(Sending)33 b(the)f Fc(Dante)39 b Fd(serv)n(er)30 b(a)i Fb(SIGHUP)e Fd(signal)h(forces)h(a)g(reload)f(of)h(the)h(con\034guration)232 3788 y(\034le.)k(It)28 b(should)g(b)r(e)g(noted)f(that)h(this)g(do)r (es)f(not)h(a\033ect)f(curren)n(t)g(sessions.)357 3895 y(Changing)22 b(e.g.)35 b(a)22 b Fc(p)l(ass)31 b Fd(statemen)n(t)23 b(to)g(a)f Fc(blo)l(ck)33 b Fd(statemen)n(t,)24 b(do)r(es)f(not)g (terminate)f(the)232 3994 y(session)32 b(of)g(an)n(y)f(existing)h (clien)n(t.)52 b(Lik)n(ewise,)32 b(a)g(reload)f(of)h(the)h (con\034guration)e(\034le)h(do)r(es)232 4094 y(not)24 b(let)g(sessions)f(created)g(b)r(efore)g(the)h(reload)e(a\033ect)i (sessions)f(created)g(after)g(the)h(reload.)357 4201 y(This)43 b(means)g(that)g(after)g(a)f(reload)g(of)h(the)g (con\034guration)f(\034le,)47 b(the)c(bandwidth)232 4300 y(coun)n(ter)21 b(for)f(new)i(sessions)d(will)j(b)r(e)f(reset,)h(and)f (the)h(p)r(ossibly)e(confusing)h(situation)g(migh)n(t)232 4400 y(arise)27 b(where)h(more)f(than)h(the)g(con\034gured)f(n)n(um)n (b)r(er)h(of)g(bandwidth)g(is)g(used,)h(as)e(old)h(ses-)232 4499 y(sions)c(will)g(use)g(the)g(bandwidth)h(allo)r(cated)e(to)h(them) h(b)r(efore)e(the)i(reload,)e(indep)r(enden)n(tly)232 4599 y(of)28 b(new)g(sessions.)357 4706 y(Ev)n(en)n(tually)f(the)i(old) e(sessions)g(will)h(\034nish)g(ho)n(w)n(ev)n(er,)e(and)i(the)g(maximal) f(n)n(um)n(b)r(er)h(of)232 4806 y(sessions)h(will)g(b)r(e)h(the)g(the)g (n)n(um)n(b)r(er)f(curren)n(tly)f(con\034gured,)h(un)n(til)h(a)f(new)h (reload)e(of)h(the)232 4905 y(con\034guration-\034le)d(o)r(ccurs.)232 5218 y Fe(5)132 b(Examples)232 5413 y Fd(This)21 b(section)g(sho)n(ws)f (sev)n(eral)f(examples)h(of)h(ho)n(w)f(one)h(could)g(use)f(the)i Fc(b)l(andwidth)29 b Fd(mo)r(dule.)1644 5662 y(1)p eop %%Page: 2 3 2 2 bop 656 531 a Fa(5.1)112 b(Limiting)34 b(w)m(eb/h)m(ttp)j (bandwidth)656 690 y Fd(The)24 b(b)r(elo)n(w)g(rule)f(sho)n(ws)g(ho)n (w)h(one)f(can)h(limit)h(the)f(bandwidth)h(used)f(for)f(w)n(ebtra\036c) h(from)656 790 y(the)k(clien)n(ts)f(on)g(the)h(10.0.0.0/24)c(net)k(to)g (a)f(total)g(of)h(10240)d(b)n(ytes,)i(or)g(100)f(KiloBytes.)656 986 y Fb(pass)42 b({)787 1086 y(from:)f(10.0.0.0/24)e(to:)j(0.0.0.0/0)e (port)i(=)h(http)787 1186 y(command:)d(connect)787 1285 y(bandwidth:)f(102400)656 1385 y(})656 1732 y Fa(5.2)112 b(Increasing)37 b(w)m(eb/h)m(ttp)g(bandwidth)656 1891 y Fd(The)21 b(next)h(rule,)g(if)g(placed)g(b)r(efore)f(other)g (bandwith-limiting)g(rules,)h(sho)n(ws)f(ho)n(w)g(one)g(can)656 1990 y(increase)30 b(the)h(bandwidth)h(used)f(for)g(w)n(ebtra\036c)f (from)h(the)g(clien)n(ts)g(on)g(the)h(10.0.0.0/24)656 2090 y(net)c(to)f(certain)g(sites.)780 2192 y(In)g(this)g(case,)e(the)i (clien)n(ts)f(will)h(b)r(e)f(able)g(to)h(use)f(1024000)d(b)n(ytes,)j (or)f(one)h(MegaByte,)656 2292 y(p)r(er)h(second)g(when)h(going)e(to)i (the)g(address)e(w)n(ork.example.com.)656 2489 y Fb(pass)42 b({)787 2588 y(from:)f(10.0.0.0/24)e(to:)j(work.example.com)37 b(port)42 b(=)h(http)787 2688 y(command:)d(connect)787 2788 y(bandwidth:)f(1024000)656 2887 y(})656 3234 y Fa(5.3)112 b(Limiting)34 b(ftp)k(bandwidth)656 3393 y Fd(The)27 b(next)g(rule)f(sho)n(ws)g(ho)n(w)g(one)g(can)h(limit)g(the)h (bandwidth)f(used)g(for)f(ftp-data)h(for)f(the)656 3493 y(clien)n(ts)h(on)h(the)f(10.0.0.0/24)d(net)k(to)g(a)f(total)g(of)h (10240)d(b)n(ytes,)i(or)g(10)f(kB/s)780 3595 y(This)40 b(only)f(w)n(orks)f(for)h Fc(active)46 b Fd(ftp,)e(since)39 b(for)g Fc(p)l(assive)47 b Fd(ftp)40 b(w)n(e)f(don't)h(ha)n(v)n(e)e (\034xed)656 3695 y(p)r(ortn)n(um)n(b)r(ers.)656 3892 y Fb(pass)k({)787 3991 y(from:)f(0.0.0.0/0)f(port)i(=)h(ftp-data)d(to:) i(10.0.0.0/24)787 4091 y(command:)e(bindreply)787 4191 y(bandwidth:)f(10240)656 4290 y(})656 4637 y Fa(5.4)112 b(Limiting)49 b(bandwidth)j(pro)m(vided)f(b)m(y)h(in)m(ternal)f(serv)m (ers)h(to)911 4754 y(the)37 b(outside)656 4912 y Fd(The)26 b(next)g(rule)g(sho)n(ws)e(ho)n(w)i(one)f(could)h(use)g(the)g Fc(Dante)i(bind)h(extension)j Fd(together)25 b(with)656 5012 y(the)c Fc(Bandwidth)30 b Fd(mo)r(dule)21 b(to)g(limit)g(the)h (amoun)n(t)e(of)h(data)g(pro)n(vided)e(b)n(y)i(a)g(in)n(ternal)f(serv)n (er,)656 5111 y(in)29 b(this)g(case,)f(a)h(w)n(ebserv)n(er)d(called)j Fc(our-webserver.example.c)l(om)p Fd(,)i(to)e(a)f(total)h(of)g(10240) 656 5211 y(b)n(ytes,)e(or)g(10)f(kB/s.)780 5313 y(This)35 b(requires)f(the)h(w)n(ebserv)n(er)d(to)j(b)r(e)g(so)r(c)n(ksi\034ed)f (and)h(the)g Fc(bind)i(extension)k Fd(to)35 b(b)r(e)656 5413 y(enabled)27 b(on)g(b)r(oth)h(the)g(so)r(c)n(ksi\034ed)f(clien)n (t)h(and)f(on)g(the)h Fc(Dante)34 b Fd(serv)n(er.)2067 5662 y(2)p eop %%Page: 3 4 3 3 bop 232 531 a Fb(pass)42 b({)363 631 y(from:)g(0.0.0.0/0)d(to:)k (our-webserver.e)o(xa)o(mpl)o(e.)o(com)37 b(port)42 b(=)h(http)363 731 y(command:)d(bindreply)363 830 y(bandwidth:)g(10240)232 930 y(})1644 5662 y Fd(3)p eop %%Trailer end userdict /end-hook known{end-hook}if %%EOF dante-1.1.19.dfsg/doc/module/redirect.ps0000644000175000017500000017263307374163222016517 0ustar roamroam%!PS-Adobe-2.0 %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: redirect.dvi %%Pages: 4 %%PageOrder: Ascend %%BoundingBox: 0 0 596 842 %%EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips redirect.dvi -o %DVIPSParameters: dpi=600, compressed %DVIPSSource: TeX output 2001.11.13:1022 %%BeginProcSet: texc.pro %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr 1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B /chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ /cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 {2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ 1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) (LaserWriter 16/600)]{A length product length le{A length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end %%EndProcSet TeXDict begin 39158280 55380996 1000 600 600 (redirect.dvi) @start %DVIPSBitmapFont: Fa ecbi1200 12 5 /Fa 5 117 df<027FB712F891B97E1AE01AF81AFE9126007FFEC77F071F13804C020713 C07313E003FF15001BF04C157FF23FF85C1BFC4C151FA25C1BFE5EA25CA25EA25CA24C15 3FA24A18FCA293C9FC1A7F5C1BF85D1AFF147F1BF05D6102FF18E0A24B4B13C0A2491980 614B17006149604F5A4B153F62494D5A4F5A4B4A5B4E5B494C90C7FC4E5A4BEC3FFCF0FF F84903035B053F13C0007FB9C8FCB912FC18F0188005F0C9FC4F447AC355>68 D97 D<4AB4FC021F13E0027F13F80103B57E49EB01FE90391FF800FF49487F4948 7F494814804849131F4890C7123F4816005B000F5D485A16FE4848495AED07F8ED3FF048 B65A168003FCC7FC15C0D8FFF0C9FC5BA45BA5160C160E007F151F5E6C6C14FE4B5A6C6C EB07F86DEB1FF03A0FFE01FFC00003B65A6C02FCC7FC6C6C13F0D907FEC8FC292E75AC34 >101 D<017EEC7FC03B01FFC003FFF048D9E00F13FC48D9F03F7F3B0FCFF87F03FF9027 87FDFC017F3A1F07FFF0004B80003E5C5D4990C7FC007E5B127C5CD8FC1F5C00F85F0078 5B1200013F5C95C7FC5CA2017F5C5F5C160F01FF5DA24A131FEFF80F48033FEB1F8005F0 13005C167F48EEE03EA291C7147EEFC07C4817FC6049EDC1F093383FC7E0EFFFC0496E5B 49020790C7FCD801E0EC01F8392E78AC3F>110 D<141E147FECFF805BA25BA21500A25B A25CA2130FA25CA2131FA25C007FB512FCB612FE15FCA27E39007FF000A25CA213FFA25C A25AA25CA25AA291C7FCA25AA25BA2120FA25B1578001F14FC15F85B140115F0003F1303 9038F007E015C0001F130FEC1F80EC3F00380FF8FE6CB45A6C13F06C5BD8003FC7FC1F41 77BF25>116 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fb ectt1200 12 16 /Fb 16 122 df<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F00C7FCB3A3121FEA3F 80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B2B6CAA33>58 D97 DIIII<14E0EB03F8A2497EA36D5AA2EB00E091C8FCAA383FFFF8487FA47EEA0001B3AD 007FB612C0B712E016F0A216E06C15C0243E78BD33>105 D<383FFFFC487FB5FCA27E7E C7FCB3B3AD003FB612F84815FCB712FEA26C15FC6C15F8273D7ABC33>108 D<4AB4FC263FFC0713C0267FFE1F13F000FF017F7F91B5FC6CB67E6CEC07FEC6EBF801EC F0004A7F4A7F5CA291C7FCA35BB3A43B3FFFF80FFFFC486D4813FEB56C4813FFA26C496C 13FE6C496C13FC302C7FAB33>110 DII114 D<90381FFE0F90B5EA8F80000314FF120F5A5AEBF007 387F800190C7FC00FE147F5A153FA37E007FEC1F0001C090C7FCEA3FF8EBFFC06C13FF6C 14E0000314F8C680011F13FF01001480020713C0EC007FED1FE0007C140F00FEEC07F015 03A27EA27F15076D14E06D130F6DEB3FC09038FE01FF90B61280160000FD5C00FC14F8D8 F83F13E0D8780790C7FC242E79AC33>III<3B7FFF801FFFE0B56C4813F06E 4813F8A24A6C13F06C496C13E0D803F8C7EAFC00000114015E7F000014036D5C137EA201 7F495A7FA26E485A131FA26D6C485AA214E0010749C7FCA214F01303157EEB01F8A2157C 010013FC14FC5D147C147DEC3FF0A36E5AA36E5AA2141F5DA2143F92C8FCA3147EA214FE 003F5B1301387F81F81383EB87F0139FEBFFE06C5B5C6C90C9FCEA0FFCEA03F02D427DAA 33>121 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fc ecbx1200 12 32 /Fc 32 122 df40 D<12F07E127E7E6C7E6C7E6C7E7F6C7E6C7E12007F137F80133F806D7EA26D7EA26D7EA2 801303A2801301A280A27F1580A4EC7FC0A615E0A2143FAE147FA215C0A6ECFF80A41500 5BA25CA213035CA213075CA2495AA2495AA2495A5C137F91C7FC13FE5B1201485A485A5B 485A485A48C8FC127E12F85A1B647ACA2C>I45 DI< EC03C01407141F147FEB03FF133FB6FCA413C3EA0003B3B3ADB712FCA5264177C038>49 DII<163FA25E5E5D5DA25D5D5D5D A25D92B5FCEC01F7EC03E7140715C7EC0F87EC1F07143E147E147C14F8EB01F0EB03E013 0714C0EB0F80EB1F00133E5BA25B485A485A485A120F5B48C7FC123E5A12FCB91280A5C8 000F90C7FCAC027FB61280A531417DC038>I<0007150301E0143F01FFEB07FF91B6FC5E 5E5E5E5E16804BC7FC5D15E092C8FC01C0C9FCAAEC3FF001C1B5FC01C714C001DF14F090 39FFE03FFC9138000FFE01FC6D7E01F06D13804915C0497F6C4815E0C8FC6F13F0A317F8 A4EA0F80EA3FE0487E12FF7FA317F05B5D6C4815E05B007EC74813C0123E003F4A1380D8 1FC0491300D80FF0495AD807FEEBFFFC6CB612F0C65D013F1480010F01FCC7FC010113C0 2D427BC038>I76 D82 D<903801FFE0011F13FE017F6D 7E48B612E03A03FE007FF84848EB1FFC6D6D7E486C6D7EA26F7FA36F7F6C5A6C5AEA00F0 90C7FCA40203B5FC91B6FC1307013F13F19038FFFC01000313E0481380381FFE00485A5B 127F5B12FF5BA35DA26D5B6C6C5B4B13F0D83FFE013EEBFFC03A1FFF80FC7F0007EBFFF8 6CECE01FC66CEB8007D90FFCC9FC322F7DAD36>97 DIIII103 DI<137C48B4FC4813804813C0A24813E0A56C13C0A26C 13806C1300EA007C90C7FCAAEB7FC0EA7FFFA512037EB3AFB6FCA518467CC520>I<9027 7F8007FEEC0FFCB590263FFFC090387FFF8092B5D8F001B512E002816E4880913D87F01F FC0FE03FF8913D8FC00FFE1F801FFC0003D99F009026FF3E007F6C019E6D013C130F02BC 5D02F86D496D7EA24A5D4A5DA34A5DB3A7B60081B60003B512FEA5572D7CAC5E>109 D<90397F8007FEB590383FFF8092B512E0028114F8913987F03FFC91388F801F00039039 9F000FFE6C139E14BC02F86D7E5CA25CA35CB3A7B60083B512FEA5372D7CAC3E>II<90397FC00FF8B590B57E02C314 E002CF14F89139DFC03FFC9139FF001FFE000301FCEB07FF6C496D13804A15C04A6D13E0 5C7013F0A2EF7FF8A4EF3FFCACEF7FF8A318F017FFA24C13E06E15C06E5B6E4913806E49 13006E495A9139DFC07FFC02CFB512F002C314C002C091C7FCED1FF092C9FCADB67EA536 407DAC3E>II<90 387F807FB53881FFE0028313F0028F13F8ED8FFC91389F1FFE000313BE6C13BC14F8A214 F0ED0FFC9138E007F8ED01E092C7FCA35CB3A5B612E0A5272D7DAC2E>I<90391FFC0380 90B51287000314FF120F381FF003383FC00049133F48C7121F127E00FE140FA215077EA2 7F01E090C7FC13FE387FFFF014FF6C14C015F06C14FC6C800003806C15806C7E010F14C0 EB003F020313E0140000F0143FA26C141F150FA27EA26C15C06C141FA26DEB3F8001E0EB 7F009038F803FE90B55A00FC5CD8F03F13E026E007FEC7FC232F7CAD2C>IIIIIII E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fd ectt1000 10 36 /Fd 36 126 df<007FB512F0B612F8A36C14F01D0579942C>45 D<121FEA3F80EA7FC0EA FFE0A5EA7FC0EA3F80EA1F000B0B708A2C>I<1507ED0F80A2151F16005D153E157E157C A215FC5D14015D14035D14075D140F5D141F92C7FC5C143EA2147E147C14FC5C13015C13 035C13075C130F5C131F91C8FC5B133EA2137E137C13FC5B12015B12035B12075B120F5B 121F90C9FCA25A123E127E127C12FC5AA2127021417BB92C>II<1307497EA2131FA2133F137F13FF5A1207127FB5FC13DF139F EA7C1F1200B3AE007FB512E0B612F0A36C14E01C3477B32C>IIII<000FB512FE4880A35D0180C8FCADEB83FE90389FFF 8090B512E015F8819038FE03FE9038F000FF01C07F49EB3F8090C7121F6C15C0C8120FA2 ED07E0A4123C127EB4FC150F16C0A248141F007EEC3F80007FEC7F006C6C5B6D485A391F F80FFC6CB55A6C5C000114C06C6C90C7FCEB0FF823347CB22C>II<1278B712C016E0A316C000FCC7EA3F80ED7F0015FE 00785CC712014A5A4A5A5D140F5D4A5A143F92C7FC5C147E14FE5C13015CA2495AA21307 5CA3495AA4495AA5133F91C8FCAA131E23357CB32C>II<121FEA3F80EA7FC0EAFFE0A5EA 7FC0EA3F80EA1F00C7FCAE121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B2470A3 2C>58 D<1502ED0F80151F157F15FF913803FE00EC0FFCEC1FF0EC7FE0ECFF80D903FEC7 FC495AEB1FF0495AEBFF80000390C8FCEA07FCEA1FF8EA3FE0EAFF8090C9FCA27FEA3FE0 EA1FF8EA07FC6CB4FCC67FEB3FE06D7EEB07FC6D7E903800FF80EC7FE0EC1FF0EC0FFCEC 03FE913800FF80157F151F150FED0200212A7BAD2C>60 D<007FB612F0B712F8A36C15F0 CAFCA8007FB612F0B712F8A36C15F025127DA12C>I<122012F87EB4FC7FEA3FE0EA1FF8 EA07FC6CB4FCC67FEB3FE06D7EEB07FC6D7E903800FF80EC7FE0EC1FF0EC0FFCEC03FE91 3800FF80157FA215FF913803FE00EC0FFCEC1FF0EC7FE0ECFF80D903FEC7FC495AEB1FF0 495AEBFF80000390C8FCEA07FCEA1FF8EA3FE0EAFF8090C9FC12FC5A1220212A7BAD2C> I<3801FFF0000713FE001F6D7E15E048809038C01FF81407EC01FC381F80000006C77EC8 127EA3ECFFFE131F90B5FC1203120F48EB807E383FF800EA7FC090C7FC12FE5AA47E007F 14FEEB8003383FE01F6CB612FC6C15FE6C14BF0001EBFE1F3A003FF007FC27247CA32C> 97 D<903803FFE0011F13F8017F13FE48B5FC48804848C6FCEA0FF0485A49137E484813 1890C9FC5A127EA25AA8127EA2127F6C140F6DEB1F806C7E6D133F6C6CEB7F003907FE03 FF6CB55A6C5C6C6C5B011F13E0010390C7FC21247AA32C>99 DIII104 D<1307EB1FC0A2497EA36D5A A20107C7FC90C8FCA7387FFFC080B5FC7EA2EA0007B3A8007FB512FCB612FEA36C14FC1F 3479B32C>I<387FFFE0B57EA37EEA0003B3B3A5007FB61280B712C0A36C158022337BB2 2C>108 D<3A7F83F007E09039CFFC1FF83AFFDFFE3FFCD87FFF13FF91B57E3A07FE1FFC 3E01FCEBF83F496C487E01F013E001E013C0A301C01380B33B7FFC3FF87FF0027F13FFD8 FFFE6D13F8D87FFC4913F0023F137F2D2481A32C>I<397FF01FE039FFF87FFC9038F9FF FE01FB7F6CB6FC00019038F03F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB500 F11480A36C01E0140029247FA32C>II<397FF01FE039FFF8FFF801FB13FE90B6FC 6C158000019038F07FC09138801FE091380007F049EB03F85BED01FC491300A216FE167E A816FE6D14FCA2ED01F86D13036DEB07F0150F9138801FE09138E07FC091B51280160001 FB5B01F813F8EC3FC091C8FCAD387FFFE0B57EA36C5B27367FA32C>I<903903FC078090 391FFF0FC0017F13CF48B512EF4814FF3807FE07380FF00148487E49137F4848133F90C7 FC48141F127E150F5AA87E007E141FA26C143F7F6C6C137F6D13FF380FF0033807FC0F6C B6FC6C14EF6C6C138F6D130FEB07F890C7FCAD0203B5FC4A1480A36E140029367DA32C> II<90387FF870 0003B512F8120F5A5A387FC00F387E00034813015AA36CEB00F0007F140013F0383FFFC0 6C13FE6CEBFF80000314E0C66C13F8010113FCEB0007EC00FE0078147F00FC143F151F7E A26C143F6D133E6D13FE9038F007FC90B5FC15F815E000F8148039701FFC0020247AA32C >I<131E133FA9007FB6FCB71280A36C1500D8003FC8FCB1ED03C0ED07E0A5EC800F011F EB1FC0ECE07F6DB51280160001035B6D13F89038003FE0232E7EAD2C>I<3A7FF003FF80 486C487FA3007F7F0001EB000FB3A3151FA2153F6D137F3900FE03FF90B7FC6D15807F6D 13CF902603FE07130029247FA32C>I<3A3FFF03FFF048018713F8A36C010313F03A00FC 007E005D90387E01F8013F5BEB1F83EC87E090380FCFC0903807EF80EB03FF6D90C7FC5C 6D5A147C14FE130180903803EF80903807CFC0EB0FC7EC83E090381F01F0013F7FEB7E00 017C137C49137E0001803A7FFF01FFFC1483B514FE6C15FC140127247EA32C>120 D<15FF02071380141F147F91B512004913C04AC7FCEB03F85CB31307EB1FE013FF007F5B B55A49C8FC6D7E6C7FC67F131FEB07F01303B380EB01FEECFFC06D13FF6E1380141F1407 0200130021417BB92C>123 D125 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fe ecti1000 10 7 /Fe 7 117 df<0103B612F017FEEFFF80903B0007F8003FC04BEB0FF01707020FEC03F8 EF01FC5DA2021F15FEA25DA2143FEF03FC5DA2027FEC07F818F092C7120F18E04AEC1FC0 EF3F004A14FEEE01F80101EC0FE091B6128004FCC7FC9138FC003F0103EC0F80834A6D7E 8301071403A25C83010F14075F5CA2011F140FA25CA2133F161F4AECE007A2017F160F18 0E91C7FC49020F131C007F01FE153CB5913807F078040313F0CAEAFFE0EF3F80383B7CB8 3D>82 D<147F903803FFC090380FC1E090381F0070017E13784913383901F801F83803F0 03120713E0120FD81FC013F091C7FC485AA2127F90C8FCA35A5AA45AA315301538157800 7C14F0007EEB01E0003EEB03C0EC0F806CEB3E00380F81F83803FFE0C690C7FC1D2677A4 26>99 DI<147F903803FFC090380FC1E090383F00F0017E13785B485A485A485A12 0F4913F8001F14F0383F8001EC07E0EC1F80397F81FF00EBFFF8148090C8FC5A5AA55AA2 1530007C14381578007E14F0003EEB01E0EC03C06CEB0F806CEB3E00380781F83803FFE0 C690C7FC1D2677A426>I105 D<3903C003F0390FF01FFC391E783C0F381C7C703A3C3EE03F803838 3FC0EB7F800078150000701300151CD8F07E90C7FCEAE0FE5BA2120012015BA312035BA3 12075BA3120F5BA3121F5BA3123F90C9FC120E212679A423>114 D116 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Ff ecrm1000 10 44 /Ff 44 122 df27 DI<146014E0EB01C0EB0380EB0700130E131E5B5BA25B485AA2485A A212075B120F90C7FCA25A121EA2123EA35AA65AB2127CA67EA3121EA2121F7EA27F1207 7F1203A26C7EA26C7E1378A27F7F130E7FEB0380EB01C0EB00E01460135278BD20>40 D<12C07E12707E7E7E120F6C7E6C7EA26C7E6C7EA21378A2137C133C133E131EA2131F7F A21480A3EB07C0A6EB03E0B2EB07C0A6EB0F80A31400A25B131EA2133E133C137C1378A2 5BA2485A485AA2485A48C7FC120E5A5A5A5A5A13527CBD20>I<121C127FEAFF80A213C0 A3127F121C1200A412011380A2120313005A1206120E5A5A5A12600A19798817>44 DI<121C127FEAFF80A5EA7F00121C0909798817>I48 D III<121C127FEAFF80A5EA7F0012 1CC7FCB2121C127FEAFF80A5EA7F00121C092479A317>58 D<1538A3157CA315FEA34A7E A34A6C7EA202077FEC063FA2020E7FEC0C1FA2021C7FEC180FA202387FEC3007A202707F EC6003A202C07F1501A2D901807F81A249C77F167FA20106810107B6FCA24981010CC712 1FA2496E7EA3496E7EA3496E7EA213E0707E1201486C81D80FFC02071380B56C90B512FE A3373C7DBB3E>65 D68 DI< B812F8A30001903880001F6C90C71201EE00FC177C173C171CA2170CA4170E1706A2ED01 80A21700A41503A21507151F91B5FCA3EC001F15071503A21501A692C8FCAD4813C0B612 C0A32F397DB836>I73 D79 D<003FB812E0A3D9C003EB001F273E0001FE130348EE01F00078160000701770A3 00601730A400E01738481718A4C71600B3B0913807FF80011FB612E0A335397DB83C>84 D87 D97 DIIII<147E903803FF8090380FC1E0EB1F8790383F0FF0137EA213 FCA23901F803C091C7FCADB512FCA3D801F8C7FCB3AB487E387FFFF8A31C3B7FBA19>I< ED03F090390FF00FF890393FFC3C3C9039F81F707C3901F00FE03903E007C03A07C003E0 10000FECF000A248486C7EA86C6C485AA200075C6C6C485A6D485A6D48C7FC38073FFC38 060FF0000EC9FCA4120FA213C06CB512C015F86C14FE6CECFF804815C03A0F80007FE048 C7EA0FF0003E140348140116F8481400A56C1401007C15F06CEC03E0003F1407D80F80EB 0F80D807E0EB3F003901FC01FC39007FFFF0010790C7FC26387EA52A>III107 DI<2703F00FF0EB1FE000FFD93FFCEB7FF8913AF03F01E07E903B F1C01F83803F3D0FF3800FC7001F802603F70013CE01FE14DC49D907F8EB0FC0A2495CA3 495CB3A3486C496CEB1FE0B500C1B50083B5FCA340257EA445>I<3903F00FF000FFEB3F FCECF03F9039F1C01F803A0FF3800FC03803F70013FE496D7EA25BA35BB3A3486C497EB5 00C1B51280A329257EA42E>II<3903F01FE000FFEB7FF89038F1E07E 9039F3801F803A07F7000FC0D803FEEB07E049EB03F04914F849130116FC150016FEA316 7FAA16FEA3ED01FCA26DEB03F816F06D13076DEB0FE001F614C09039F7803F009038F1E0 7E9038F0FFF8EC1FC091C8FCAB487EB512C0A328357EA42E>II<3807E01F00FFEB7F C09038E1E3E09038E387F0380FE707EA03E613EE9038EC03E09038FC0080491300A45BB3 A2487EB512F0A31C257EA421>II<1318A51338A31378A313F8120112031207001FB5FCB6FCA2D801 F8C7FCB215C0A93800FC011580EB7C03017E13006D5AEB0FFEEB01F81A347FB220>IIIIII E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fg ecbx1440 14.4 21 /Fg 21 122 df<151E153E15FE1403140F147FEB07FF0003B5FCB6FCA3EBF87FEAFC00C7 FCB3B3B3A6007FB712FCA52E4E76CD42>49 DI< 913807FFC0027F13FC0103B67E010F15E090261FF80313F890267FC0007F01FEC7EA3FFE 48488148486E138013FE486C6C6D13C0804817E080A66C5B18C06C5B6C90C75AD8003816 8090C8FC4C1300A24C5A5F4C5A4B5B4B13C0030F5BDB7FFEC7FC91387FFFF816C016FCEE FF80DA000313E09238007FF8EE3FFE707E70138018C07013E018F07013F8A218FC82A218 FEA3EA03C0EA0FF0EA3FFC487EA2B5FCA218FCA25E18F8A26C4816F0495C4916E0D83FE0 4A13C06C485CD80FF04A1380D807FE91387FFE003B03FFE003FFFC6C90B65A6C6C15E001 0F92C7FC010114FCD9001F1380374F7BCD42>I<17FC1601A216031607160FA2161F163F 167FA216FF5D5DA25D5D5D167F153E157E15FC15F8EC01F01403EC07E015C0EC0F80141F EC3F00143E5C14FC495A5C495A1307495A5C49C7FC5B137E137C5B1201485A5B485A120F 485A90C8FC123E127E5ABA1280A5C901FCC7FCAF021FB71280A5394F7CCE42>I68 DI83 D97 D<913803FFE0023F13FE91B67E010315E0010F9038003FF8D9 3FFCEB07FC4948497E4948131F4849497E485B485BA24890C7FC5A5B003F6F5A705A705A 007F92C8FC5BA312FFAD127F7FA3123F7F6CEE0F80A26C6D141F18006C6D5C6C6D143E6C 6D147E6C6D5C6D6C495A6DB4EB07F0010F9038C01FE06D90B5128001014AC7FCD9003F13 F80203138031387CB63A>99 D<913807FF80027F13F849B512FE01076E7E011F010313E0 903A3FFC007FF0D97FF06D7E49486D7E4849130F48496D7E48824890C77E1880485A8200 3F17C0A3485A18E082A212FFA290B8FCA401FCCAFCA6127FA37F123FA2EF03E06C7E1707 6C17C06C6D140F18806C6D141F6C6DEC3F006C6D147ED97FFC495AD91FFFEB07F86D9038 E03FF0010390B512C001005D023F01FCC7FC020113E033387CB63C>101 D<133FEBFFC0487F487FA2487FA66C5BA26C5B6C5B013FC7FC90C8FCAEEB1FF8B5FCA512 017EB3B3A6B612F0A51C547CD324>105 D108 DII<913801FFC0023F13FE 91B67E010315E0010F018013F8903A3FFC001FFED97FF0EB07FF49486D7F48496D7F4849 6D7F91C8127F4883488349153F001F83A2003F8349151FA2007F83A400FF1880AC007F18 00A3003F5F6D153FA2001F5FA26C6C4B5AA26C6D4A5A6C5F6C6D495B6C6D495B6D6C4990 C7FCD93FFCEB1FFE6DB46CB45A010790B512F0010115C0D9003F49C8FC020313E039387C B642>II< 90393FF001FCB590380FFF804B13E0037F13F09238FE1FF89138F1F83F00019138F07FFC 6CEBF3E015C0ECF780A2ECFF00EE3FF84AEB1FF0EE0FE093C7FC5CA45CB3ABB612FEA52E 367DB535>114 D<903903FFC00E011FEBFC1E90B6127E000315FE3907FE003FD80FF013 0F4848130348481301491300127F90C8127EA248153EA27FA27F01F091C7FC13FCEBFF80 6C13FEECFFF06C14FE6F7E6C15E06C816C15FC6C81C681133F010F15801301D9000F14C0 EC003F030713E0150100F880167F6C153FA2161F7EA217C07E6D143F17807F6DEC7F0001 F85C6DEB03FE9039FF801FFC486CB512F0D8F81F14C0D8F00791C7FC39E0007FF02B387C B634>I<147CA614FCA41301A31303A21307A2130F131F133F137F13FF1203000F90B512 FEB7FCA426007FFCC8FCB3A9EE0F80ABEE1F006D7EA2011F143E806D6D5A6DEBC1F86DEB FFF001005C023F1380DA03FEC7FC294D7ECB33>I 120 DI E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fh ecrm1200 12 37 /Fh 37 234 df45 D<160CA2161C1618A21638163016701660A2 16E016C0A21501168015031600A25D1506A2150E150CA2151C151815381530A215701560 A215E05DA214015D140392C7FCA25C1406A2140E140C141C1418A214381430A214701460 A214E05C13015CA2130391C8FCA25B1306130E130CA2131C1318A213381330A213701360 13E05BA212015BA2120390C9FCA25A1206120E120CA2121C1218A21238123012701260A2 12E05AA226647BCA31>47 D<14FF010713E090381F81F890383E007C01FC133F4848EB1F 8049130F4848EB07C04848EB03E0A2000F15F0491301001F15F8A2003F15FCA390C8FC48 15FEA54815FFB3A46C15FEA56D1301003F15FCA3001F15F8A26C6CEB03F0A36C6CEB07E0 000315C06D130F6C6CEB1F806C6CEB3F00013E137C90381F81F8903807FFE0010090C7FC 28447CC131>I<143014F013011303131F13FFB5FC13E713071200B3B3B0497E497E007F B6FCA3204278C131>II<49B4FC010F 13E0013F13FC9038FE01FE3A01F0007F80D803C0EB3FC048C7EA1FE0120EED0FF0EA0FE0 486C14F8A215077F5BA26C48130FEA03C0C813F0A3ED1FE0A2ED3FC01680ED7F0015FE4A 5AEC03F0EC1FC0D90FFFC7FC15F090380001FCEC007FED3F80ED1FC0ED0FE016F0ED07F8 16FC150316FEA2150116FFA3121EEA7F80487EA416FE491303A2007EC713FC0070140700 3015F80038140F6C15F06CEC1FE06C6CEB3FC0D803E0EB7F803A01FE01FE0039007FFFF8 010F13E0010190C7FC28447CC131>II54 D<14FF010713E0011F13F890387F80FC9038FC007E48487F4848EB1F804848EB0FC0000F EC07E0485AED03F0485A16F8007F140190C713FCA25AA216FE1500A516FFA46C5CA36C7E 5D121F7F000F5C6C6C1306150E6C6C5B6C6C5BD8007C5B90383F01E090390FFF80FE9038 01FE0090C8FC150116FCA4ED03F8A216F0D80F801307486C14E0486C130F16C0ED1F80A2 49EB3F0049137E001EC75A001C495A000F495A3907E01FE06CB51280C649C7FCEB1FF028 447CC131>57 D<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3A5121EEA7F80A2EAFF C0A4EA7F80A2EA1E000A2B78AA1B>I<16C04B7EA34B7EA34B7EA34B7EA3ED19FEA3ED30 FFA203707FED607FA203E07FEDC03FA2020180ED801FA2DA03007F160FA20206801607A2 4A6D7EA34A6D7EA34A6D7EA20270810260147FA202E08191B7FCA249820280C7121FA249 C87F170FA20106821707A2496F7EA3496F7EA3496F7EA201788313F8486C83D80FFF0303 7FB500E0027FEBFFC0A342477DC649>65 D68 D71 D73 D78 DII82 D<49B41303010FEBE007013F13F89039FE00FE0FD801F8131FD807E0 EB079F49EB03DF48486DB4FC48C8FC4881003E81127E82127C00FC81A282A37E82A27EA2 6C6C91C7FC7F7FEA3FF813FE381FFFE06C13FE6CEBFFE06C14FC6C14FF6C15C0013F14F0 010F80010180D9001F7F14019138001FFF03031380816F13C0167F163F161F17E000C015 0FA31607A37EA36C16C0160F7E17806C151F6C16006C5D6D147ED8FBC05CD8F9F0495AD8 F07C495A90393FC00FE0D8E00FB51280010149C7FC39C0003FF02B487BC536>I97 D99 D<167FED3FFFA315018182B3EC7F80903803 FFF090380FC07C90383F000E017E1307496D5AD803F87F48487F5B000F81485AA2485AA2 127FA290C8FC5AAB7E7FA2123FA26C7EA2000F5D7F6C6C5B00035C6C6C9038077F806C6C 010E13C0013F011C13FE90380FC0F8903803FFE09026007F0013002F467DC436>III104 D107 DI<3901FC01FE00FF903807FFC091381E07F0913838 01F8000701707F0003EBE0002601FDC07F5C01FF147F91C7FCA25BA35BB3A8486CECFF80 B5D8F83F13FEA32F2C7DAB36>110 DI<39 03F803F000FFEB1FFCEC3C3EEC707F0007EBE0FF3803F9C000015B13FBEC007E153C01FF 13005BA45BB3A748B4FCB512FEA3202C7DAB26>114 D<90383FE0183901FFFC383907E0 1F78390F0003F8001E1301481300007C1478127800F81438A21518A27EA27E6C6C13006C 7E13FC383FFFE06C13FC6C13FF6C14C06C14E0C614F0011F13F81300EC0FFC140300C0EB 01FE1400157E7E153EA27EA36C143C6C147C15786C14F86CEB01F039F38003E039F1F00F 8039E07FFE0038C00FF01F2E7DAC26>I<1306A5130EA4131EA3133E137EA213FE120112 07001FB512F0B6FCA2C648C7FCB3A4150CAA017E131C017F1318A26D133890381F8030EC C070903807E0E0903801FFC09038007F001E3E7EBC26>IIII121 D<1402EC0F804A7E143F147FA24A5A4990C7FCEB03FC495A EB0FE0148049C8FC133C1338132090C9FCA4EB01FE903807FFC090381F03F090387E00FC 49137E48487F485A4848EB1F80000F15C049130F121F484814E01507A2007F15F090C7FC A25AA390B6FCA290C9FCA67EA27FA2123F16306C7E1670000F15606D14E06C6C14C00003 14016C6CEB03806C6CEB0700013E131E90381F80F8903803FFE0010090C7FC24427DC02B >233 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fi ecrm1728 17.28 7 /Fi 7 118 df<120FEA3FC0EA7FE012FF13F0A313F8A2127F123FEA0F381200A8137813 70A313F013E0A2120113C0120313801207A2EA0F00120E121E5A5AA212300D28748B25> 44 D77 D<181EEF3FFEEE07FFA4EE000F1703A21701B3AAEDFF80020F13F8023F13FE91 39FF803F81903A03FC0007C14948EB01E1D91FE0EB00F94948147D4948143D49C8121F48 48150F491507120348481503491501120F121F5BA2123F5B127FA45B12FFAD127F7FA312 3FA27F121FA26C6C1503A26C6C150712036D150F6C6C151F0000163D137F6D6CECF9FF6D 6CEB01F1D90FF0D903C113C06D6CD90F81EBFF80D901FFEB7F019039007FFFFC021F13E0 0201010091C7FC41657BE34B>100 DI108 D<4AB47E020F13F0027F13FE4AC67ED903F8EB1FC0D907E0 EB07E0D91FC0EB03F849486D7E49C87E01FE157F49814848ED1F80000317C04848ED0FE0 A24848ED07F0A2001F17F8491503003F17FCA3007F17FE491501A400FF17FFAC007F17FE A26D1503A3003F17FCA2001F17F86D1507A2000F17F06D150F000717E06C6CED1FC0A26C 6CED3F806C6CED7F00017F15FE6D6C495A6D6C495A6D6C495AD903F8EB1FC06DB4EBFF80 6D6CB448C7FC020F13F00201138038417BBF43>111 D117 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fj ecti1728 17.28 10 /Fj 10 117 df<92B97E1BF84A18FE757E91C701F8C700077F047F030013F07048ED3FF8 047FEE0FFC757E4D6F7E8775138004FFEF7FC04D163F1DE01C1F4B19F04D160F1DF8A25D 94CAEA07FCA35D5E1DFEA2150F5EA3151F5EA3153F5EA21C0F157F5E1DFCA215FF4C171F A34A1AF84C173FA34A1AF093CB127FA21DE04A19FF5D1DC063020F1A805D631D00141F4B 4D5AA2515A143F4B4D5A641B3F027F614B4D5AA2515A02FF4D90C7FC4B5F1A03505A494E 5A4B4C5A505A505A494E5A92C94890C8FC4F5AF10FFC49EF1FF04AEE7FE04F5A010F0407 90C9FC011FEE1FFC013F4BB45ABA12C096CAFC18F818805F6277E166>68 D<92B812E01AFF4A18C01BF891C701F8C76C7E047FED0FFF704802011380047F6F13C0F3 7FE04DED3FF01B1FF30FF804FF17FC4D15071CFEA25D5FA21CFF5D94C9FCA21CFE4B170F 5EA3030FEF1FFC5E1CF81B3F031F18F04CEE7FE0A2F3FFC0033F18804C4B1300505A505A 037F4C5A4CED1FE0505A08FFC7FC03FF4B5A4CEC0FF8F13FC0DE03FFC8FC4A90B612F019 C09339800007F8F001FE4A6F7E93C8EA3F801AE0191F4A707E4B82A2737E140F5D86A214 1F5DA2190F023F5F5DA2191F147F5D62193F14FF5DA2197F49605DA3491A1E92C912FF62 1C3E49057F143C5C1C78130F011F1AF0496C163FB76CEE01E0071FEB03C0F10FF00707EB 0780CC3901FC1E009638007FFCF20FE0586577E162>82 D97 D99 DII<151E157FEDFF805CA31600A25DEC007892C7FCB3A3EB03F0EB0FFEEB3C1F496C7E 01F07FEA01E0EA03C081EA078013005A141F121EA248495AA3007C137F00785CA214FF00 F891C7FCEA700100005BA213035CA213075CA2130F5CA2131F5C133F5CA2137F5C150701 FF5B14005D48141E5BA200035C5BA25D5B5DA25DEBF0014A5A5D000149C7FC3800F80EEB 783CEB3FF0EB0FC0215F75DD29>105 D110 D 114 D116 D E %EndDVIPSBitmapFont end %%EndProlog %%BeginSetup %%Feature: *Resolution 600dpi TeXDict begin %%PaperSize: A4 %%EndSetup %%Page: 1 1 1 0 bop 962 880 a Fj(Dante)p Fi(,)45 b(Mo)t(dule)g Fj(R)-7 b(e)g(dir)g(e)g(ct)1205 1121 y Fh(Inferno)33 b(Nettv)m(erk)i(A/S)1247 1237 y(Oslo)d(Researc)m(h)i(P)m(ark)1298 1353 y(Gaustadall\351en)d(21) 1365 1469 y(NO-0349)g(Oslo)1502 1586 y(Norw)m(a)m(y)1094 2110 y(Date:)44 b(2001/11/13)30 b(09:16:12)p eop %%Page: 1 2 1 1 bop 232 531 a Fg(1)132 b(Description)232 722 y Ff(The)38 b Fe(R)l(e)l(dir)l(e)l(ct)46 b Ff(mo)r(dule)38 b(giv)n(es)e(y)n(ou)h (con)n(trol)f(o)n(v)n(er)g(b)r(oth)i(where)g(clien)n(ts)f(requests)g (and)232 822 y(replies)d(will)g(end)h(up,)h(and)e(what)g(addresses)e (and)i(p)r(ortranges)f(the)h(Dan)n(te)g(serv)n(er)f(will)232 921 y(use)28 b(on)f(b)r(ehalf)h(of)g(the)g(clien)n(ts)f(for)g(outgoing) f(connections.)357 1026 y(It)31 b(can)g(b)r(e)g(used)f(to)h(redirect)f (clien)n(ts)h(connections)f(from)g(one)h(address)e(to)i(another,)232 1126 y(useful)d(for)f(cases)f(where)h(y)n(ou)g(for)g(instance)g(w)n(an) n(t)f(clien)n(ts)i(to)f(go)f(via)h(a)g(lo)r(cal)g(w)n(eb-pro)n(xy)232 1225 y(instead)h(of)f(directly)h(to)f(the)h(w)n(ebserv)n(er.)357 1330 y(It)d(can)f(b)r(e)g(used)h(to)f(restrict)g(the)g(p)r(ortranges)f (used)h(b)n(y)g(the)h(Dan)n(te)f(serv)n(er,)g(useful)g(for)232 1429 y(cases)g(where)h(a)g(\034rew)n(all)f(needs)g(to)h(kno)n(w)g(what) g(p)r(ortranges)e(the)i(Dan)n(te)g(serv)n(er)f(will)h(use.)357 1534 y(A)f(stranger)d(but)j(also)f(p)r(ossible)g(use)g(is)g(to)h(limit) g(the)f(n)n(um)n(b)r(er)h(of)f(sessions)f(clien)n(ts)h(can)232 1633 y(establish.)232 1934 y Fg(2)132 b(Syn)l(tax)232 2125 y Ff(The)28 b(syn)n(tax)f(of)g(the)h Fd(redirect)c Ff(statemen)n(t)k(is)f(as)g(follo)n(ws:)357 2229 y Fd(redirect)40 b(from:)i(
)d(to:)k(
)357 2334 y Ff(Either)28 b Fd(from)e Ff(or)h Fd(to)f Ff(are)h(optional,)g(but)h(at)f(least)h (one)f(m)n(ust)g(b)r(e)h(giv)n(en.)357 2438 y Fd(address)d Ff(are)h(addresses)g(in)i(the)g(usual)f(Dan)n(te)h(format.)232 2738 y Fg(3)132 b(Seman)l(tics)232 2929 y Ff(The)28 b Fd(redirect)c Ff(statemen)n(t)k(in)n(tegrates)e(as)h(a)g(part)g(of)h (so)r(c)n(ks-rules.)357 3034 y(The)j(meaning)f(of)38 b Fd(to)30 b Ff(and)h Fd(from)e Ff(v)-5 b(aries)30 b(considerably)f (dep)r(ending)j(on)e(what)h(so)r(c)n(ks)232 3133 y Fd(command)g Ff(the)j Fd(redirect)d Ff(statemen)n(t)i(applies)g(to.)55 b(The)34 b(next)g(section)f(will)h(detail)f(the)232 3233 y(seman)n(tics)39 b(of)g(eac)n(h)g Fe(r)l(e)l(dir)l(e)l(ct)48 b Ff(application)38 b(based)h(on)g(the)h Fd(command)d Ff(used)i(\(with)h(the)232 3333 y(corresp)r(onding)27 b Fd(protocol)d Ff(in)k(paren)n(thesis,)f(for)g(those)g(preferring)f (that\).)232 3591 y Fc(3.1)113 b Fb(bind)38 b Fc(\()p Fb(protocol:)104 b(tcp)p Fc(\))232 3753 y Fd(from)26 b Ff(is)i(the)g(address)e(to)i(bind)g(on)f(b)r(ehalf)h(of)f(the)h (clien)n(t.)232 3853 y Fd(to)f Ff(is)h(ignored.)232 4111 y Fc(3.2)113 b Fb(bindreply)39 b Fc(\()p Fb(protocol:)105 b(tcp)p Fc(\))232 4273 y Fd(from)26 b Ff(is)i(the)g(address)e(to)i (tell)g(the)f(clien)n(t)h(the)g(bindreply)f(\(connection\))h(is)g (from.)232 4373 y Fd(to)f Ff(is)h(the)g(address)e(to)h(send)h(the)g (bindreply)f(\(connection\))h(to.)232 4631 y Fc(3.3)113 b Fb(connect)39 b Fc(\()p Fb(protocol:)104 b(tcp)p Fc(\))232 4793 y Fd(from)26 b Ff(is)i(the)g(address)e(to)i(use)f(on)g(b)r(ehalf)h (of)g(the)g(clien)n(t)f(for)g(making)g(the)h(connection.)232 4893 y Fd(to)f Ff(is)h(the)g(address)e(to)h(connect)h(the)g(clien)n(t)f (to.)232 5151 y Fc(3.4)113 b Fb(udpassociate)40 b Fc(\()p Fb(protocol:)104 b(udp)p Fc(\))232 5313 y Fd(from)26 b Ff(is)i(the)g(address)e(to)i(use)f(on)g(b)r(ehalf)h(of)g(the)g(clien) n(t)f(for)g(sending)h(udp)g(pac)n(k)n(ets.)232 5413 y Fd(to)f Ff(is)h(the)g(address)e(to)h(send)h(pac)n(k)n(ets)e(from)h(the) h(clien)n(t)g(to.)1644 5662 y(1)p eop %%Page: 2 3 2 2 bop 656 531 a Fc(3.5)112 b Fb(udpreply)39 b Fc(\()p Fb(protocol:)105 b(udp)p Fc(\))656 685 y Fd(from)26 b Ff(is)h(the)h(address)f(to)g(tell)h(the)g(clien)n(t)g(the)f(reply)g(is) h(from.)656 784 y Fd(to)f Ff(is)g(the)h(address)e(to)i(send)f(the)h (reply)f(to.)656 1058 y Fg(4)131 b(Examples)656 1240 y Ff(This)27 b(section)h(sho)n(ws)e(sev)n(eral)g(examples)h(of)g(ho)n (w)g(one)g(could)g(use)h(the)g Fe(r)l(e)l(dir)l(e)l(ct)35 b Ff(mo)r(dule.)656 1472 y Fc(4.1)112 b(Redirecting)35 b(w)m(eb-requests)j(to)f(a)h(w)m(eb)g(pro)m(xy)656 1626 y Ff(The)24 b(b)r(elo)n(w)f(rule)g(redirects)g(clien)n(ts)g(from)h(the) g Fd(10.0.0.0/24)19 b Ff(net)24 b(who)f(w)n(an)n(t)g(to)g(connect)656 1725 y(to)k(the)h(h)n(ttp)f(p)r(ort)g(of)h(an)n(y)e(address)g(to)h(the) h(address)e Fd(squid.example.c)o(om)o Ff(,)c(p)r(ort)27 b Fd(3128)p Ff(.)656 1907 y Fd(pass)42 b({)787 2006 y(from:)f (10.0.0.0/24)e(to:)j(0.0.0.0/0)e(port)i(=)h(http)787 2106 y(command:)d(connect)787 2205 y(redirect)g(to:)i(squid.example.co) o(m)37 b(port)42 b(=)h(3128)656 2305 y(})656 2637 y Fc(4.2)112 b(Limiting)34 b(the)k(p)s(ortranges)g(used)g(b)m(y)f(the)h Fa(Dante)46 b Fc(serv)m(er)656 2790 y Ff(The)27 b(next)h(rule)f(sa)n (ys)f(that)i(the)g(serv)n(er)d(should)j(limit)g(itself)g(to)f(using)g (p)r(ortranges)f(ab)r(o)n(v)n(e)656 2890 y Fd(32768)d Ff(on)h(the)h(in)n(terface)g Fd(de1)e Ff(when)i(sending)g(pac)n(k)n (ets)e(out)i(on)g(b)r(ehalf)g(of)g(the)g(clien)n(ts)g(on)656 2989 y(the)j Fd(10.1.1.0/24)23 b Ff(net.)656 3171 y Fd(pass)42 b({)787 3270 y(from:)f(10.0.0.0/24)787 3370 y(redirect)f(from:)h(de1)i (port)e(>)j(32768})656 3470 y(})656 3801 y Fc(4.3)112 b(Limiting)34 b(concurren)m(t)j(user)h(sessions)656 3955 y Ff(A)24 b(more)f(no)n(v)n(el)f(use)h(of)h(the)g Fd(redirect)c Ff(statemen)n(t)k(allo)n(ws)e(one,)i(in)g(a)f(rather)g(ad-ho)r(c)f(w)n (a)n(y)-7 b(,)656 4054 y(to)27 b(limit)i(the)f(n)n(um)n(b)r(er)f(of)g (concurren)n(t)g(user)f(sessions.)780 4154 y(The)g(next)g(rule)g(sa)n (ys)e(the)i(serv)n(er)e(should)i(limit)g(itself)g(to)g(using)g(the)g(p) r(ortrange)e Fd(2048)656 4253 y(-)43 b(2051)20 b Ff(on)i(the)g(in)n (terface)g Fd(de1)p Ff(,)g(a)f(range)g(of)h(four)f(p)r(ortn)n(um)n(b)r (ers,)i(for)e(the)h(clien)n(t)g(10.0.0.1.)656 4435 y Fd(pass)42 b({)787 4534 y(from:)f(10.0.0.1/32)787 4634 y(redirect)f(from:)h(de1)i(port)e(2048)h(-)h(2051)656 4734 y(})780 5015 y Ff(When)26 b(the)g(clien)n(t)g(10.1.1.1)d(reac)n (hes)g(four)i(concurren)n(t)f(sessions,)h(it)h(will)f(not)h(b)r(e)g (able)656 5114 y(to)h(create)g(new)h(ones)e(un)n(til)i(it)g(closes)f (one)g(of)h(the)g(previously)e(established)h(sessions.)780 5214 y(F)-7 b(or)33 b(this)g(to)f(w)n(ork)g(correctly)f(it)i(is)g(ho)n (w)n(ev)n(er)e(required)g(that)j(no)e(other)g(clien)n(t)h(acci-)656 5313 y(den)n(tly)21 b(ends)g(up)h(using)e(the)i(same)f(p)r(ortrange.)33 b(One)20 b(w)n(a)n(y)g(to)h(accomplish)g(this)g(is)g(to)g(mak)n(e)656 5413 y(the)30 b(in)n(terfacename)f Fd(de1)g Ff(b)r(e)i(used)f(uniquely) g(for)f(this)i(sort)e(of)h(thing,)h(or)e(to)h(mak)n(e)f(sure)2067 5662 y(2)p eop %%Page: 3 4 3 3 bop 232 531 a Ff(all)31 b(other)g(rules)f(use)h(a)g(di\033eren)n(t) g(p)r(ortrange)f(b)n(y)h(w)n(a)n(y)e(of)j(ha)n(ving)e(their)h(o)n(wn)f Fd(redirect)232 631 y Ff(statemen)n(t.)37 b(The)28 b(former)e(is)i (greatly)e(preferred.)357 731 y(As)h(can)g(probably)f(b)r(e)i(guessed,) f(this)g(is)g(a)g(new)h(usage)e(of)h(the)h Fd(redirect)c Ff(statemen)n(t)232 830 y(that)40 b(w)n(as)e(not)h(in)n(tended)g(in)h (the)f(design,)j(but)d(w)n(as)g(disco)n(v)n(ered)e(b)n(y)h(acciden)n(t) h(and)g(is)232 930 y(men)n(tioned)28 b(here)f(since)g(it)h(could)g(b)r (e)g(useful.)1644 5662 y(3)p eop %%Trailer end userdict /end-hook known{end-hook}if %%EOF dante-1.1.19.dfsg/doc/module/Makefile.am0000644000175000017500000000013210333437502016360 0ustar roamroamEXTRA_DIST = bandwidth.tex session.tex redirect.tex \ bandwidth.ps session.ps redirect.ps dante-1.1.19.dfsg/doc/module/Makefile.in0000644000175000017500000002246210362704167016411 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc/module DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = bandwidth.tex session.tex redirect.tex \ bandwidth.ps session.ps redirect.ps 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/module/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/module/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 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-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: dante-1.1.19.dfsg/doc/module/session.tex0000644000175000017500000001351410362451677016554 0ustar roamroam%@(#)$Id: session.tex,v 1.3 2006/01/10 12:24:24 michaels Exp $ %/* % * Copyright (c) 2005 % * Inferno Nettverk A/S, Norway. All rights reserved. % * % * Redistribution and use in source and binary forms, with or without % * modification, are permitted provided that the following conditions % * are met: % * 1. The above copyright notice, this list of conditions and the following % * disclaimer must appear in all copies of the software, derivative works % * or modified versions, and any portions thereof, aswell as in all % * supporting documentation. % * 2. All advertising materials mentioning features or use of this software % * must display the following acknowledgement: % * This product includes software developed by % * Inferno Nettverk A/S, Norway. % * 3. The name of the author may not be used to endorse or promote products % * derived from this software without specific prior written permission. % * % * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR % * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES % * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. % * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, % * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT % * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, % * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY % * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT % * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF % * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. % * % * Inferno Nettverk A/S requests users of this software to return to % * % * Software Distribution Coordinator or sdc@inet.no % * Inferno Nettverk A/S % * Oslo Research Park % * Gaustadalléen 21 % * NO-0349 Oslo % * Norway % * % * any improvements or extensions that they make and grant Inferno Nettverk A/S % * the rights to redistribute these changes. % * % */ \documentclass[a4paper, final, twoside, english]{article} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{html} \title{\emph{Dante}, Module \emph{Session}} \author{ Inferno Nettverk A/S \\ Oslo Research Park \\ Gaustadalléen 21 \\ NO-0349 Oslo \\ Norway} \date{$$$$Date: 2006/01/10 12:24:24 $$$$} \makeindex \begin{document} \maketitle \thispagestyle{empty} \clearpage \setcounter{page}{1} \section{Description} The \emph{Session} module gives you control over how many con-current sessions the \emph{Dante} server will allow different user to create. It can be used to limit the number of active sessions going to certain not work-related web/ftp-sites for instance, or impose different limits on different users. \section{Syntax} The syntax of the \texttt{bandwidth} statement is as follows: \verb"maxsessions: " \texttt{sessions} is the maximum number of sessions that can be active. \section{Semantics} The \texttt{maxsessions} statement integrates as a part of \emph{client-rules} or \emph{socks-rules}. See \emph{sockd.conf(5)} for more information about these. The maximal number of sessions set for a rule will be shared by all clients matching that rule. The \emph{Dante} server will distribute the sessions on a first come, first served basis. When the maximal number of sessions has been reached, future clients will not be allowed to create new socks sessions and will instead receive the socks error code indicating a general socks server failure. These clients may re-try again later, and if one of the old clients has finished in the mean-time, and no new ones have become active, be granted access. \section{Special notes} Sending the \emph{Dante} server a \texttt{SIGHUP} signal forces a reload of the configuration file. It should be noted that this does not affect current sessions. Changing e.g. a \emph{pass} statement to a \emph{block} statement, does not terminate the session of any existing client. Likewise, a reload of the configuration file does not let sessions created before the reload affect sessions created after the reload. This means that after a reload of the configuration file, the session counter for new sessions will be reset, and the possibly confusing situation might arise where more than the configured number of sessions exists con-currently. Eventually the old sessions will finish however, and the maximal number of sessions will be the the number currently configured, until a new reload of the configuration-file occurs. \section{Examples} This section shows some examples of how one could use this module. \subsection{Limiting the number of clients negotiating} The below rule shows how one can limit the number of clients on the 10.0.0.0/24 net con-currently negotiating with the \emph{Dante} server to a total 10. \begin{verbatim} client-pass { from: 10.0.0.0/24 to: 0.0.0.0/0 maxsessions: 10 } \end{verbatim} Note that since this is a client-rule, it only limits the clients while they are negotiating. It enforces no limitations on the number of clients once they have finished negotiating, and as thus, is of limited use. \subsection{Limiting the number of clients using the web} The next rule shows how one can limit the number of clients con-currently "surfing" the web to 10. \begin{verbatim} pass { from: 0.0.0.0/0 to: 0.0.0.0/0 port http maxsessions: 10 } \end{verbatim} Since this is a socks-rule, it takes action when the clients have finished negotiating with the \emph{Dante} server. A last examples shows how one could limit a particular user, in this example, the user "monica", to one ftp-session at a time. \begin{verbatim} pass { from: 0.0.0.0/0 to: 0.0.0.0/0 port ftp maxsessions: 1 user: monica } \end{verbatim} \end{document} dante-1.1.19.dfsg/doc/module/session.ps0000644000175000017500000015702010332407601016360 0ustar roamroam%!PS-Adobe-2.0 %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: session.dvi %%Pages: 3 %%PageOrder: Ascend %%BoundingBox: 0 0 596 842 %%EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips session.dvi -o session.ps %DVIPSParameters: dpi=600, compressed %DVIPSSource: TeX output 2005.11.03:1418 %%BeginProcSet: texc.pro %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr 1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B /chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ /cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 {2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ 1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) (LaserWriter 16/600)]{A length product length le{A length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end %%EndProcSet TeXDict begin 39158280 55380996 1000 600 600 (session.dvi) @start %DVIPSBitmapFont: Fa ecbx1200 12 22 /Fa 22 120 df46 D49 DI<0007150301E0 143F01FFEB07FF91B6FC5E5E5E5E5E16804BC7FC5D15E092C8FC01C0C9FCAAEC3FF001C1 B5FC01C714C001DF14F09039FFE03FFC9138000FFE01FC6D7E01F06D13804915C0497F6C 4815E0C8FC6F13F0A317F8A4EA0F80EA3FE0487E12FF7FA317F05B5D6C4815E05B007EC7 4813C0123E003F4A1380D81FC0491300D80FF0495AD807FEEBFFFC6CB612F0C65D013F14 80010F01FCC7FC010113C02D427BC038>53 D76 D<903801FFE0011F13FE017F6D7E48B612E03A03FE007FF84848EB1FFC6D6D7E486C6D7E A26F7FA36F7F6C5A6C5AEA00F090C7FCA40203B5FC91B6FC1307013F13F19038FFFC0100 0313E0481380381FFE00485A5B127F5B12FF5BA35DA26D5B6C6C5B4B13F0D83FFE013EEB FFC03A1FFF80FC7F0007EBFFF86CECE01FC66CEB8007D90FFCC9FC322F7DAD36>97 DII101 DIII<137C48B4FC4813804813C0A24813E0A56C13C0A26C13806C1300EA00 7C90C7FCAAEB7FC0EA7FFFA512037EB3AFB6FCA518467CC520>I108 D<90277F8007FEEC0FFCB590263FFFC090387FFF 8092B5D8F001B512E002816E4880913D87F01FFC0FE03FF8913D8FC00FFE1F801FFC0003 D99F009026FF3E007F6C019E6D013C130F02BC5D02F86D496D7EA24A5D4A5DA34A5DB3A7 B60081B60003B512FEA5572D7CAC5E>I<90397F8007FEB590383FFF8092B512E0028114 F8913987F03FFC91388F801F000390399F000FFE6C139E14BC02F86D7E5CA25CA35CB3A7 B60083B512FEA5372D7CAC3E>II<90387F807FB53881FFE0028313F0028F13F8ED8FFC91389F1FFE000313BE6C13BC 14F8A214F0ED0FFC9138E007F8ED01E092C7FCA35CB3A5B612E0A5272D7DAC2E>114 D<90391FFC038090B51287000314FF120F381FF003383FC00049133F48C7121F127E00FE 140FA215077EA27F01E090C7FC13FE387FFFF014FF6C14C015F06C14FC6C800003806C15 806C7E010F14C0EB003F020313E0140000F0143FA26C141F150FA27EA26C15C06C141FA2 6DEB3F8001E0EB7F009038F803FE90B55A00FC5CD8F03F13E026E007FEC7FC232F7CAD2C >III119 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fb ectt1000 10 37 /Fb 37 126 df<007FB512F0B612F8A36C14F01D0579942C>45 D<121FEA3F80EA7FC0EA FFE0A5EA7FC0EA3F80EA1F000B0B708A2C>I<1507ED0F80A2151F16005D153E157E157C A215FC5D14015D14035D14075D140F5D141F92C7FC5C143EA2147E147C14FC5C13015C13 035C13075C130F5C131F91C8FC5B133EA2137E137C13FC5B12015B12035B12075B120F5B 121F90C9FCA25A123E127E127C12FC5AA2127021417BB92C>II<1307497EA2131FA2133F137F13FF5A1207127FB5FC13DF139F EA7C1F1200B3AE007FB512E0B612F0A36C14E01C3477B32C>II52 D<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F00C7FCAE 121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B2470A32C>58 D<1502ED0F80151F157F15FF913803FE00EC0FFCEC1FF0EC7FE0ECFF80D903FEC7FC495A EB1FF0495AEBFF80000390C8FCEA07FCEA1FF8EA3FE0EAFF8090C9FCA27FEA3FE0EA1FF8 EA07FC6CB4FCC67FEB3FE06D7EEB07FC6D7E903800FF80EC7FE0EC1FF0EC0FFCEC03FE91 3800FF80157F151F150FED0200212A7BAD2C>60 D<122012F87EB4FC7FEA3FE0EA1FF8EA 07FC6CB4FCC67FEB3FE06D7EEB07FC6D7E903800FF80EC7FE0EC1FF0EC0FFCEC03FE9138 00FF80157FA215FF913803FE00EC0FFCEC1FF0EC7FE0ECFF80D903FEC7FC495AEB1FF049 5AEBFF80000390C8FCEA07FCEA1FF8EA3FE0EAFF8090C9FC12FC5A1220212A7BAD2C>62 D<903901FC038090390FFF87C04913EF017F13FF90B6FC4813073803FC01497E4848137F 4848133F49131F121F5B003F140F90C7FCA2127EED078092C7FCA212FE5AA8913803FFF8 4A13FCA27E007E6D13F89138000FC0A36C141FA27F121F6D133F120F6D137F6C7E6C6C13 FF6D5A3801FF076C90B5FC6D13EF011F13CF6DEB0780D901FCC7FC26357DB32C>71 DI<007FB512F8B612FCA36C14F839000F C000B3B3A5007FB512F8B612FCA36C14F81E3379B22C>I<007FB512C0B612F88115FF6C 15802603F00013C0153FED0FE0ED07F0A2150316F81501A6150316F01507A2ED0FE0ED3F C015FF90B61280160015FC5D15C001F0C8FCB0387FFF80B57EA36C5B25337EB22C>80 D<90381FF80790B5EA0F804814CF000714FF5A381FF01F383FC003497E48C7FC007E147F 00FE143F5A151FA46CEC0F00007E91C7FC127F7FEA3FE0EA1FFCEBFFC06C13FC0003EBFF C06C14F06C6C7F01077F9038007FFEEC07FF02001380153FED1FC0A2ED0FE0A200781407 12FCA56CEC0FC0A26CEC1F806D133F01E0EB7F009038FE01FF90B55A5D00F914F0D8F83F 13C0D8700790C7FC23357CB32C>83 D<3B7FFF803FFFC0B56C4813E0A36C496C13C03B03 F00001F800B3AF6D130300015DA26D130700005D6D130F017F495A6D6C485AECE0FF6DB5 C7FC6D5B010313F86D5B9038003F802B3480B22C>85 D<3801FFF0000713FE001F6D7E15 E048809038C01FF81407EC01FC381F80000006C77EC8127EA3ECFFFE131F90B5FC120312 0F48EB807E383FF800EA7FC090C7FC12FE5AA47E007F14FEEB8003383FE01F6CB612FC6C 15FE6C14BF0001EBFE1F3A003FF007FC27247CA32C>97 DI<903803FFE0011F13F8 017F13FE48B5FC48804848C6FCEA0FF0485A49137E4848131890C9FC5A127EA25AA8127E A2127F6C140F6DEB1F806C7E6D133F6C6CEB7F003907FE03FF6CB55A6C5C6C6C5B011F13 E0010390C7FC21247AA32C>IIII104 D<1307EB1FC0A2497EA36D5AA20107C7FC90C8FCA7387FFFC0 80B5FC7EA2EA0007B3A8007FB512FCB612FEA36C14FC1F3479B32C>I<387FFFE0B57EA3 7EEA0003B3B3A5007FB61280B712C0A36C158022337BB22C>108 D<3A7F83F007E09039CFFC1FF83AFFDFFE3FFCD87FFF13FF91B57E3A07FE1FFC3E01FCEB F83F496C487E01F013E001E013C0A301C01380B33B7FFC3FF87FF0027F13FFD8FFFE6D13 F8D87FFC4913F0023F137F2D2481A32C>I<397FF01FE039FFF87FFC9038F9FFFE01FB7F 6CB6FC00019038F03F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480A3 6C01E0140029247FA32C>II<397FF01FE039FFF8FFF801FB13FE90B6FC6C158000 019038F07FC09138801FE091380007F049EB03F85BED01FC491300A216FE167EA816FE6D 14FCA2ED01F86D13036DEB07F0150F9138801FE09138E07FC091B51280160001FB5B01F8 13F8EC3FC091C8FCAD387FFFE0B57EA36C5B27367FA32C>I114 D<90387FF8700003B512F8120F5A5A38 7FC00F387E00034813015AA36CEB00F0007F140013F0383FFFC06C13FE6CEBFF80000314 E0C66C13F8010113FCEB0007EC00FE0078147F00FC143F151F7EA26C143F6D133E6D13FE 9038F007FC90B5FC15F815E000F8148039701FFC0020247AA32C>I<131E133FA9007FB6 FCB71280A36C1500D8003FC8FCB1ED03C0ED07E0A5EC800F011FEB1FC0ECE07F6DB51280 160001035B6D13F89038003FE0232E7EAD2C>I<3A7FF003FF80486C487FA3007F7F0001 EB000FB3A3151FA2153F6D137F3900FE03FF90B7FC6D15807F6D13CF902603FE07130029 247FA32C>I119 D<3A3FFF03FFF048018713F8A36C010313F03A00FC007E005D90387E01F8013F5BEB1F83 EC87E090380FCFC0903807EF80EB03FF6D90C7FC5C6D5A147C14FE130180903803EF8090 3807CFC0EB0FC7EC83E090381F01F0013F7FEB7E00017C137C49137E0001803A7FFF01FF FC1483B514FE6C15FC140127247EA32C>I<15FF02071380141F147F91B512004913C04A C7FCEB03F85CB31307EB1FE013FF007F5BB55A49C8FC6D7E6C7FC67F131FEB07F01303B3 80EB01FEECFFC06D13FF6E1380141F14070200130021417BB92C>123 D125 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fc ecti1000 10 23 /Fc 23 118 df<150C151C153815F0EC01E0EC03C0EC0780EC0F00141E5C147C5C5C495A 1303495A5C130F49C7FCA2133EA25BA25BA2485AA212035B12075BA2120F5BA2121FA290 C8FCA25AA2123EA2127EA2127CA412FC5AAD1278A57EA3121C121EA2120E7EA26C7E6C7E A212001E5274BD22>40 D<140C140E80EC0380A2EC01C015E0A2140015F0A21578A4157C 153CAB157CA715FCA215F8A21401A215F0A21403A215E0A21407A215C0140F1580A2141F 1500A2143EA25CA25CA2495AA2495A5C1307495A91C7FC5B133E133C5B5B485A12035B48 C8FC120E5A12785A12C01E527FBD22>I<387FFFF8A2B5FCA214F0150579941E>45 D<120EEA3F80127F12FFA31300127E123C0909778819>I<01031438496C13F89138F007 F091B512E016804914005D15F815C0D91E1CC7FC011CC8FCA3133C1338A313781370A214 7F9038F1FFC09038E783E09038FE01F09038F800F8485A497F49137C5BC8127EA315FEA4 14015D121E127F1403485CA248495A12F800E05C140F4A5A5D6C49C7FC147E00785B387C 01F8383E07F0381FFFC06C90C8FCEA03F8253977B62A>53 D<0103B612FEEFFFC018F090 3B0007F8000FF84BEB03FCEF00FE020F157FF03F804B141F19C0021F150F19E05D180714 3F19F05DA2147FA292C8FCA25C180F5CA2130119E04A151FA2130319C04A153FA2010717 80187F4A1600A2010F16FEA24A4A5A60011F15034D5A4A5D4D5A013F4B5A173F4A4AC7FC 17FC017FEC03F84C5A91C7EA1FC04949B45A007F90B548C8FCB712F016803C397CB83F> 68 D<92383FC00E913901FFF01C020713FC91391FC07E3C91393F001F7C027CEB0FF84A 130749481303495A4948EB01F0A2495AA2011F15E091C7FCA34915C0A36E90C7FCA2806D 7E14FCECFF806D13F015FE6D6D7E6D14E0010080023F7F14079138007FFC150F15031501 A21500A2167C120EA3001E15FC5EA3003E4A5AA24B5AA2007F4A5A4B5A6D49C7FC6D133E D8F9F013FC39F8FC03F839F07FFFE0D8E01F138026C003FCC8FC2F3D7ABA2F>83 D<14F8EB07FE90381F871C90383E03FE137CEBF801120148486C5A485A120FEBC001001F 5CA2EA3F801403007F5C1300A21407485C5AA2140F5D48ECC1C0A2141F15831680143F15 87007C017F1300ECFF076C485B9038038F8E391F0F079E3907FE03FC3901F000F0222677 A42A>97 D<133FEA1FFFA3C67E137EA313FE5BA312015BA312035BA31207EBE0F8EBE7FE 9038EF0F80390FFC07C013F89038F003E013E0D81FC013F0A21380A2123F1300A214075A 127EA2140F12FE4814E0A2141F15C05AEC3F80A215005C147E5C387801F8007C5B383C03 E0383E07C0381E1F80D80FFEC7FCEA01F01C3B77B926>I<147F903803FFC090380FC1E0 90381F0070017E13784913383901F801F83803F003120713E0120FD81FC013F091C7FC48 5AA2127F90C8FCA35A5AA45AA3153015381578007C14F0007EEB01E0003EEB03C0EC0F80 6CEB3E00380F81F83803FFE0C690C7FC1D2677A426>II<147F903803FFC090380F C1E090383F00F0017E13785B485A485A485A120F4913F8001F14F0383F8001EC07E0EC1F 80397F81FF00EBFFF8148090C8FC5A5AA55AA21530007C14381578007E14F0003EEB01E0 EC03C06CEB0F806CEB3E00380781F83803FFE0C690C7FC1D2677A426>II105 D107 DI110 D<147F903803FFC090380FC1F090381F00F8017E137C5B4848137E4848133E0007 143F5B120F485AA2485A157F127F90C7FCA215FF5A4814FEA2140115FC5AEC03F8A2EC07 F015E0140F007C14C0007EEB1F80003EEB3F00147E6C13F8380F83F03803FFC0C648C7FC 202677A42A>I<9039078007C090391FE03FF090393CF0787C903938F8E03E9038787FC0 0170497EECFF00D9F0FE148013E05CEA01E113C15CA2D80003143FA25CA20107147FA24A 1400A2010F5C5E5C4B5A131F5EEC80035E013F495A6E485A5E6E48C7FC017F133EEC70FC 90387E3FF0EC0F8001FEC9FCA25BA21201A25BA21203A25B1207B512C0A3293580A42A> I<3903C003F0390FF01FFC391E783C0F381C7C703A3C3EE03F8038383FC0EB7F80007815 0000701300151CD8F07E90C7FCEAE0FE5BA2120012015BA312035BA312075BA3120F5BA3 121F5BA3123F90C9FC120E212679A423>114 D<14FE903807FF8090380F83C090383E00 E04913F00178137001F813F00001130313F0A215E00003EB01C06DC7FC7FEBFFC06C13F8 14FE6C7F6D13807F010F13C01300143F141F140F123E127E00FE1480A348EB1F0012E06C 133E00705B6C5B381E03E06CB45AD801FEC7FC1C267AA422>II<13F8D803FEEB01C0D8078FEB03E0390E0F800712 1E121C0038140F131F007815C01270013F131F00F0130000E015805BD8007E133FA201FE 14005B5D120149137EA215FE120349EBFC0EA20201131E161C15F813E0163CD9F0031338 14070001ECF07091381EF8F03A00F83C78E090393FF03FC090390FC00F00272679A42D> I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fd ecrm1000 10 44 /Fd 44 122 df27 DI<007C137C00FE13FEEAFF01A3EAFE00A7007E13FC007C137CA800 3C137800381338A700181330171E77BA2A>34 D<121C127FEAFF80A213C0A3127F121C12 00A412011380A2120313005A1206120E5A5A5A12600A19798817>44 DI<121C127FEAFF80A5EA7F00121C0909798817>I<1506A2150E 150CA2151C151815381530A215701560A215E015C0A214011580A2140315005C1406A214 0E140CA2141C1418A214381430A21470146014E05CA213015CA2130391C7FCA25B1306A2 130E130C131C1318A213381330A213701360A213E05BA212015B120390C8FCA25A1206A2 120E120CA2121C1218A21238123012701260A212E05AA21F537BBD2A>IIII<1538A2157815F8A2140114031407A2140F141F141B143314731463 14C313011483EB030313071306130C131C131813301370136013C01201EA038013005A12 0E120C5A123812305A12E0B712F8A3C73803F800AA4A7E0103B512F8A325387EB72A>52 D<121C127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A5EA7F00121C092479A317> 58 D<1538A3157CA315FEA34A7EA34A6C7EA202077FEC063FA2020E7FEC0C1FA2021C7F EC180FA202387FEC3007A202707FEC6003A202C07F1501A2D901807F81A249C77F167FA2 0106810107B6FCA24981010CC7121FA2496E7EA3496E7EA3496E7EA213E0707E1201486C 81D80FFC02071380B56C90B512FEA3373C7DBB3E>65 D<913A01FF800180020FEBE00302 7F13F8903A01FF807E07903A03FC000F0FD90FF0EB039F4948EB01DFD93F80EB00FF49C8 127F01FE153F12014848151F4848150FA248481507A2485A1703123F5B007F1601A35B00 FF93C7FCAD127F6DED0180A3123F7F001F160318006C7E5F6C7E17066C6C150E6C6C5D00 001618017F15386D6C5CD91FE05C6D6CEB03C0D903FCEB0F80902701FF803FC7FC903900 7FFFFC020F13F002011380313D7BBA3C>67 D69 D 73 D76 D78 D83 D<003FB812E0A3D9C003EB001F273E 0001FE130348EE01F00078160000701770A300601730A400E01738481718A4C71600B3B0 913807FF80011FB612E0A335397DB83C>I87 D97 DIIII<147E903803FF8090380FC1E0EB 1F8790383F0FF0137EA213FCA23901F803C091C7FCADB512FCA3D801F8C7FCB3AB487E38 7FFFF8A31C3B7FBA19>IIII107 DI<2703F00FF0EB1FE000 FFD93FFCEB7FF8913AF03F01E07E903BF1C01F83803F3D0FF3800FC7001F802603F70013 CE01FE14DC49D907F8EB0FC0A2495CA3495CB3A3486C496CEB1FE0B500C1B50083B5FCA3 40257EA445>I<3903F00FF000FFEB3FFCECF03F9039F1C01F803A0FF3800FC03803F700 13FE496D7EA25BA35BB3A3486C497EB500C1B51280A329257EA42E>I I<3903F01FE000FFEB7FF89038F1E07E9039F3801F803A07F7000FC0D803FEEB07E049EB 03F04914F849130116FC150016FEA3167FAA16FEA3ED01FCA26DEB03F816F06D13076DEB 0FE001F614C09039F7803F009038F1E07E9038F0FFF8EC1FC091C8FCAB487EB512C0A328 357EA42E>I<3807E01F00FFEB7FC09038E1E3E09038E387F0380FE707EA03E613EE9038 EC03E09038FC0080491300A45BB3A2487EB512F0A31C257EA421>114 DI<1318A5 1338A31378A313F8120112031207001FB5FCB6FCA2D801F8C7FCB215C0A93800FC011580 EB7C03017E13006D5AEB0FFEEB01F81A347FB220>IIII< B538807FFFA33A03FE003FF00001EC1F80000092C7FC017E131C6D13186D6C5AECC07001 0F5B6D6C5AECF180EB03FB6DB4C8FC6D5AA2147F804A7E8114CF903801C7E090380383F0 90380703F8EB0601496C7E011C137E49137F01787F496D7E486C80000FEC3FF0D8FFFE90 B51280A329247FA32C>II E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fe ecbx1440 14.4 22 /Fe 22 122 df<151E153E15FE1403140F147FEB07FF0003B5FCB6FCA3EBF87FEAFC00C7 FCB3B3B3A6007FB712FCA52E4E76CD42>49 DI< 913807FFC0027F13FC0103B67E010F15E090261FF80313F890267FC0007F01FEC7EA3FFE 48488148486E138013FE486C6C6D13C0804817E080A66C5B18C06C5B6C90C75AD8003816 8090C8FC4C1300A24C5A5F4C5A4B5B4B13C0030F5BDB7FFEC7FC91387FFFF816C016FCEE FF80DA000313E09238007FF8EE3FFE707E70138018C07013E018F07013F8A218FC82A218 FEA3EA03C0EA0FF0EA3FFC487EA2B5FCA218FCA25E18F8A26C4816F0495C4916E0D83FE0 4A13C06C485CD80FF04A1380D807FE91387FFE003B03FFE003FFFC6C90B65A6C6C15E001 0F92C7FC010114FCD9001F1380374F7BCD42>I<17FC1601A216031607160FA2161F163F 167FA216FF5D5DA25D5D5D167F153E157E15FC15F8EC01F01403EC07E015C0EC0F80141F EC3F00143E5C14FC495A5C495A1307495A5C49C7FC5B137E137C5B1201485A5B485A120F 485A90C8FC123E127E5ABA1280A5C901FCC7FCAF021FB71280A5394F7CCE42>I<486C15 0601F0153E01FEEC01FED9FFF0133F91B65A5F5F5F5F5F94C7FC16FC5E16E093C8FC15FC 01F0138091CAFCAC913807FF80023F13F891B512FE01F36E7E9026FFFC0113E09139E000 7FF891C76C7E496E7E01F86E7E5B7013804916C0C9FC18E08218F0A418F8A31203EA0FE0 EA3FF8487EA212FF7FA218F0A25B5E6C4816E05B01C016C06CC85A18806C6C4A13007FD8 0FF04A5A6C6CECFFFCD803FE4913F02701FFE00F5B6C6CB612806D92C7FC010F14F80101 14C09026003FFCC8FC354F7ACD42>I68 DI83 D97 D<913803FFE0023F13FE91B67E010315E0010F9038003FF8D93FFCEB07FC4948497E4948 131F4849497E485B485BA24890C7FC5A5B003F6F5A705A705A007F92C8FC5BA312FFAD12 7F7FA3123F7F6CEE0F80A26C6D141F18006C6D5C6C6D143E6C6D147E6C6D5C6D6C495A6D B4EB07F0010F9038C01FE06D90B5128001014AC7FCD9003F13F80203138031387CB63A> 99 D<913807FF80027F13F849B512FE01076E7E011F010313E0903A3FFC007FF0D97FF0 6D7E49486D7E4849130F48496D7E48824890C77E1880485A82003F17C0A3485A18E082A2 12FFA290B8FCA401FCCAFCA6127FA37F123FA2EF03E06C7E17076C17C06C6D140F18806C 6D141F6C6DEC3F006C6D147ED97FFC495AD91FFFEB07F86D9038E03FF0010390B512C001 005D023F01FCC7FC020113E033387CB63C>101 D<133FEBFFC0487F487FA2487FA66C5B A26C5B6C5B013FC7FC90C8FCAEEB1FF8B5FCA512017EB3B3A6B612F0A51C547CD324> 105 D108 DII<913801FFC0023F13FE91B67E010315E001 0F018013F8903A3FFC001FFED97FF0EB07FF49486D7F48496D7F48496D7F91C8127F4883 488349153F001F83A2003F8349151FA2007F83A400FF1880AC007F1800A3003F5F6D153F A2001F5FA26C6C4B5AA26C6D4A5A6C5F6C6D495B6C6D495B6D6C4990C7FCD93FFCEB1FFE 6DB46CB45A010790B512F0010115C0D9003F49C8FC020313E039387CB642>II<90393FF001FCB590 380FFF804B13E0037F13F09238FE1FF89138F1F83F00019138F07FFC6CEBF3E015C0ECF7 80A2ECFF00EE3FF84AEB1FF0EE0FE093C7FC5CA45CB3ABB612FEA52E367DB535>114 D<903903FFC00E011FEBFC1E90B6127E000315FE3907FE003FD80FF0130F484813034848 1301491300127F90C8127EA248153EA27FA27F01F091C7FC13FCEBFF806C13FEECFFF06C 14FE6F7E6C15E06C816C15FC6C81C681133F010F15801301D9000F14C0EC003F030713E0 150100F880167F6C153FA2161F7EA217C07E6D143F17807F6DEC7F0001F85C6DEB03FE90 39FF801FFC486CB512F0D8F81F14C0D8F00791C7FC39E0007FF02B387CB634>I<147CA6 14FCA41301A31303A21307A2130F131F133F137F13FF1203000F90B512FEB7FCA426007F FCC8FCB3A9EE0F80ABEE1F006D7EA2011F143E806D6D5A6DEBC1F86DEBFFF001005C023F 1380DA03FEC7FC294D7ECB33>I120 DI E %EndDVIPSBitmapFont %DVIPSBitmapFont: Ff ecrm1200 12 37 /Ff 37 234 df45 D<160CA2161C1618A21638163016701660A2 16E016C0A21501168015031600A25D1506A2150E150CA2151C151815381530A215701560 A215E05DA214015D140392C7FCA25C1406A2140E140C141C1418A214381430A214701460 A214E05C13015CA2130391C8FCA25B1306130E130CA2131C1318A213381330A213701360 13E05BA212015BA2120390C9FCA25A1206120E120CA2121C1218A21238123012701260A2 12E05AA226647BCA31>47 D<14FF010713E090381F81F890383E007C01FC133F4848EB1F 8049130F4848EB07C04848EB03E0A2000F15F0491301001F15F8A2003F15FCA390C8FC48 15FEA54815FFB3A46C15FEA56D1301003F15FCA3001F15F8A26C6CEB03F0A36C6CEB07E0 000315C06D130F6C6CEB1F806C6CEB3F00013E137C90381F81F8903807FFE0010090C7FC 28447CC131>I<143014F013011303131F13FFB5FC13E713071200B3B3B0497E497E007F B6FCA3204278C131>II<49B4FC010F 13E0013F13FC9038FE01FE3A01F0007F80D803C0EB3FC048C7EA1FE0120EED0FF0EA0FE0 486C14F8A215077F5BA26C48130FEA03C0C813F0A3ED1FE0A2ED3FC01680ED7F0015FE4A 5AEC03F0EC1FC0D90FFFC7FC15F090380001FCEC007FED3F80ED1FC0ED0FE016F0ED07F8 16FC150316FEA2150116FFA3121EEA7F80487EA416FE491303A2007EC713FC0070140700 3015F80038140F6C15F06CEC1FE06C6CEB3FC0D803E0EB7F803A01FE01FE0039007FFFF8 010F13E0010190C7FC28447CC131>II<000615C0D807C0130701FCEB7F8090 B612005D5D5D15E0158026063FFCC7FC90C9FCAE14FF010713C090381F01F090383800FC 01F0137ED807C07F49EB1F8016C090C7120F000615E0C8EA07F0A316F81503A216FCA512 3E127F487EA416F890C712075A006015F0A20070140F003015E00038EC1FC07E001EEC3F 806CEC7F006C6C13FE6C6C485A3901F807F039007FFFE0011F90C7FCEB07F826447BC131 >I<14FF010713E0011F13F890387F80FC9038FC007E48487F4848EB1F804848EB0FC000 0FEC07E0485AED03F0485A16F8007F140190C713FCA25AA216FE1500A516FFA46C5CA36C 7E5D121F7F000F5C6C6C1306150E6C6C5B6C6C5BD8007C5B90383F01E090390FFF80FE90 3801FE0090C8FC150116FCA4ED03F8A216F0D80F801307486C14E0486C130F16C0ED1F80 A249EB3F0049137E001EC75A001C495A000F495A3907E01FE06CB51280C649C7FCEB1FF0 28447CC131>57 D<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3A5121EEA7F80A2EA FFC0A4EA7F80A2EA1E000A2B78AA1B>I<16C04B7EA34B7EA34B7EA34B7EA3ED19FEA3ED 30FFA203707FED607FA203E07FEDC03FA2020180ED801FA2DA03007F160FA20206801607 A24A6D7EA34A6D7EA34A6D7EA20270810260147FA202E08191B7FCA249820280C7121FA2 49C87F170FA20106821707A2496F7EA3496F7EA3496F7EA201788313F8486C83D80FFF03 037FB500E0027FEBFFC0A342477DC649>65 D68 D 71 D73 D78 DII82 D<49B41303010FEBE007013F13F89039FE00FE0FD801F8131FD807E0 EB079F49EB03DF48486DB4FC48C8FC4881003E81127E82127C00FC81A282A37E82A27EA2 6C6C91C7FC7F7FEA3FF813FE381FFFE06C13FE6CEBFFE06C14FC6C14FF6C15C0013F14F0 010F80010180D9001F7F14019138001FFF03031380816F13C0167F163F161F17E000C015 0FA31607A37EA36C16C0160F7E17806C151F6C16006C5D6D147ED8FBC05CD8F9F0495AD8 F07C495A90393FC00FE0D8E00FB51280010149C7FC39C0003FF02B487BC536>I97 D99 D<167FED3FFFA315018182B3EC7F80903803 FFF090380FC07C90383F000E017E1307496D5AD803F87F48487F5B000F81485AA2485AA2 127FA290C8FC5AAB7E7FA2123FA26C7EA2000F5D7F6C6C5B00035C6C6C9038077F806C6C 010E13C0013F011C13FE90380FC0F8903803FFE09026007F0013002F467DC436>III104 D107 DI<3901FC01FE00FF903807FFC091381E07F0913838 01F8000701707F0003EBE0002601FDC07F5C01FF147F91C7FCA25BA35BB3A8486CECFF80 B5D8F83F13FEA32F2C7DAB36>110 DI<39 03F803F000FFEB1FFCEC3C3EEC707F0007EBE0FF3803F9C000015B13FBEC007E153C01FF 13005BA45BB3A748B4FCB512FEA3202C7DAB26>114 D<90383FE0183901FFFC383907E0 1F78390F0003F8001E1301481300007C1478127800F81438A21518A27EA27E6C6C13006C 7E13FC383FFFE06C13FC6C13FF6C14C06C14E0C614F0011F13F81300EC0FFC140300C0EB 01FE1400157E7E153EA27EA36C143C6C147C15786C14F86CEB01F039F38003E039F1F00F 8039E07FFE0038C00FF01F2E7DAC26>I<1306A5130EA4131EA3133E137EA213FE120112 07001FB512F0B6FCA2C648C7FCB3A4150CAA017E131C017F1318A26D133890381F8030EC C070903807E0E0903801FFC09038007F001E3E7EBC26>IIII121 D<1402EC0F804A7E143F147FA24A5A4990C7FCEB03FC495A EB0FE0148049C8FC133C1338132090C9FCA4EB01FE903807FFC090381F03F090387E00FC 49137E48487F485A4848EB1F80000F15C049130F121F484814E01507A2007F15F090C7FC A25AA390B6FCA290C9FCA67EA27FA2123F16306C7E1670000F15606D14E06C6C14C00003 14016C6CEB03806C6CEB0700013E131E90381F80F8903803FFE0010090C7FC24427DC02B >233 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fg ecrm1728 17.28 7 /Fg 7 118 df<120FEA3FC0EA7FE012FF13F0A313F8A2127F123FEA0F381200A8137813 70A313F013E0A2120113C0120313801207A2EA0F00120E121E5A5AA212300D28748B25> 44 D77 D<181EEF3FFEEE07FFA4EE000F1703A21701B3AAEDFF80020F13F8023F13FE91 39FF803F81903A03FC0007C14948EB01E1D91FE0EB00F94948147D4948143D49C8121F48 48150F491507120348481503491501120F121F5BA2123F5B127FA45B12FFAD127F7FA312 3FA27F121FA26C6C1503A26C6C150712036D150F6C6C151F0000163D137F6D6CECF9FF6D 6CEB01F1D90FF0D903C113C06D6CD90F81EBFF80D901FFEB7F019039007FFFFC021F13E0 0201010091C7FC41657BE34B>100 DI108 D<4AB47E020F13F0027F13FE4AC67ED903F8EB1FC0D907E0 EB07E0D91FC0EB03F849486D7E49C87E01FE157F49814848ED1F80000317C04848ED0FE0 A24848ED07F0A2001F17F8491503003F17FCA3007F17FE491501A400FF17FFAC007F17FE A26D1503A3003F17FCA2001F17F86D1507A2000F17F06D150F000717E06C6CED1FC0A26C 6CED3F806C6CED7F00017F15FE6D6C495A6D6C495A6D6C495AD903F8EB1FC06DB4EBFF80 6D6CB448C7FC020F13F00201138038417BBF43>111 D117 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fh ecti1728 17.28 9 /Fh 9 117 df<92B97E1BF84A18FE757E91C701F8C700077F047F030013F07048ED3FF8 047FEE0FFC757E4D6F7E8775138004FFEF7FC04D163F1DE01C1F4B19F04D160F1DF8A25D 94CAEA07FCA35D5E1DFEA2150F5EA3151F5EA3153F5EA21C0F157F5E1DFCA215FF4C171F A34A1AF84C173FA34A1AF093CB127FA21DE04A19FF5D1DC063020F1A805D631D00141F4B 4D5AA2515A143F4B4D5A641B3F027F614B4D5AA2515A02FF4D90C7FC4B5F1A03505A494E 5A4B4C5A505A505A494E5A92C94890C8FC4F5AF10FFC49EF1FF04AEE7FE04F5A010F0407 90C9FC011FEE1FFC013F4BB45ABA12C096CAFC18F818805F6277E166>68 D83 D97 D101 D<151E157FEDFF805CA31600A25DEC00 7892C7FCB3A3EB03F0EB0FFEEB3C1F496C7E01F07FEA01E0EA03C081EA078013005A141F 121EA248495AA3007C137F00785CA214FF00F891C7FCEA700100005BA213035CA213075C A2130F5CA2131F5C133F5CA2137F5C150701FF5B14005D48141E5BA200035C5BA25D5B5D A25DEBF0014A5A5D000149C7FC3800F80EEB783CEB3FF0EB0FC0215F75DD29>105 D110 DI115 DI E %EndDVIPSBitmapFont end %%EndProlog %%BeginSetup %%Feature: *Resolution 600dpi TeXDict begin %%PaperSize: A4 %%EndSetup %%Page: 1 1 1 0 bop 981 880 a Fh(Dante)p Fg(,)45 b(Mo)t(dule)g Fh(Session)1205 1121 y Ff(Inferno)33 b(Nettv)m(erk)i(A/S)1247 1237 y(Oslo)d(Researc)m (h)i(P)m(ark)1298 1353 y(Gaustadall\351en)d(21)1365 1469 y(NO-0349)g(Oslo)1502 1586 y(Norw)m(a)m(y)1094 2110 y(Date:)44 b(2005/11/02)30 b(12:45:31)p eop %%Page: 1 2 1 1 bop 232 531 a Fe(1)132 b(Description)232 713 y Fd(The)30 b Fc(Session)36 b Fd(mo)r(dule)30 b(giv)n(es)e(y)n(ou)h(con)n(trol)f(o) n(v)n(er)g(ho)n(w)h(man)n(y)g(con-curren)n(t)e(sessions)h(the)232 813 y Fc(Dante)34 b Fd(serv)n(er)26 b(will)h(allo)n(w)g(di\033eren)n(t) g(user)g(to)h(create.)357 912 y(It)j(can)g(b)r(e)g(used)g(to)g(limit)h (the)g(n)n(um)n(b)r(er)e(of)h(activ)n(e)g(sessions)e(going)h(to)h (certain)f(non-)232 1012 y(related)d(w)n(eb/ftp-sites)g(for)g (instance,)h(or)e(imp)r(ose)i(di\033eren)n(t)f(limits)h(on)g (di\033eren)n(t)f(users.)232 1286 y Fe(2)132 b(Syn)l(tax)232 1468 y Fd(The)28 b(syn)n(tax)f(of)g(the)h Fb(bandwidth)c Fd(statemen)n(t)k(is)f(as)g(follo)n(ws:)357 1568 y Fb(maxsessions:)38 b()357 1667 y(sessions)24 b Fd(is)k(the)g(maxim)n(um)f(n)n (um)n(b)r(er)g(of)h(sessions)e(that)i(can)f(b)r(e)h(activ)n(e.)232 1941 y Fe(3)132 b(Seman)l(tics)232 2123 y Fd(The)31 b Fb(maxsessions)26 b Fd(statemen)n(t)31 b(in)n(tegrates)e(as)h(a)g(part) g(of)h Fc(client-rules)37 b Fd(or)30 b Fc(so)l(cks-rules)p Fd(.)232 2223 y(See)e Fc(so)l(ckd.c)l(onf\(5\))33 b Fd(for)27 b(more)g(information)f(ab)r(out)i(these.)357 2323 y(The)j(maximal)f(n)n (um)n(b)r(er)g(of)h(sessions)e(set)h(for)g(a)h(rule)f(will)h(b)r(e)g (shared)e(b)n(y)i(all)f(clien)n(ts)232 2422 y(matc)n(hing)20 b(that)h(rule.)34 b(The)21 b Fc(Dante)26 b Fd(serv)n(er)19 b(will)i(distribute)g(the)f(sessions)g(on)g(a)g(\034rst)g(come,)232 2522 y(\034rst)28 b(serv)n(ed)e(basis.)357 2621 y(When)j(the)g(maximal) f(n)n(um)n(b)r(er)g(of)h(sessions)e(has)h(b)r(een)h(reac)n(hed,)e (future)i(clien)n(ts)g(will)232 2721 y(not)k(b)r(e)g(allo)n(w)n(ed)e (to)h(create)f(new)i(so)r(c)n(ks)e(sessions)g(and)h(will)h(instead)f (receiv)n(e)f(the)i(so)r(c)n(ks)232 2821 y(error)h(co)r(de)h (indicating)g(a)g(general)f(so)r(c)n(ks)g(serv)n(er)f(failure.)60 b(These)34 b(clien)n(ts)i(ma)n(y)e(re-try)232 2920 y(again)29 b(later,)g(and)g(if)h(one)f(of)h(the)f(old)h(clien)n(ts)f(has)g (\034nished)h(in)f(the)h(mean-time,)g(and)f(no)232 3020 y(new)f(ones)f(ha)n(v)n(e)f(b)r(ecome)i(activ)n(e,)f(b)r(e)h(gran)n (ted)e(access.)232 3294 y Fe(4)132 b(Sp)t(ecial)44 b(notes)232 3476 y Fd(Sending)33 b(the)f Fc(Dante)39 b Fd(serv)n(er)30 b(a)i Fb(SIGHUP)e Fd(signal)h(forces)h(a)g(reload)f(of)h(the)h (con\034guration)232 3576 y(\034le.)k(It)26 b(should)f(b)r(e)h(noted)f (that)h(this)g(do)r(es)f(not)h(a\033ect)f(curren)n(t)g(sessions.)35 b(Changing)24 b(e.g.)232 3675 y(a)34 b Fc(p)l(ass)41 b Fd(statemen)n(t)34 b(to)g(a)f Fc(blo)l(ck)44 b Fd(statemen)n(t,)36 b(do)r(es)d(not)h(terminate)g(the)g(session)f(of)h(an)n(y)232 3775 y(existing)28 b(clien)n(t.)357 3874 y(Lik)n(ewise,)21 b(a)f(reload)f(of)i(the)g(con\034guration)e(\034le)i(do)r(es)f(not)g (let)h(sessions)e(created)h(b)r(efore)232 3974 y(the)28 b(reload)f(a\033ect)g(sessions)f(created)h(after)g(the)h(reload.)357 4074 y(This)h(means)g(that)g(after)g(a)f(reload)g(of)h(the)g (con\034guration)f(\034le,)h(the)h(session)e(coun)n(ter)232 4173 y(for)33 b(new)h(sessions)e(will)i(b)r(e)f(reset,)i(and)e(it)h(is) f(p)r(ossible)g(for)g(more)g(than)g(the)h(con\034gured)232 4273 y(n)n(um)n(b)r(er)41 b(of)h(sessions)e(to)h(exists)g(con-curren)n (tly)-7 b(.)76 b(Ev)n(en)n(tually)41 b(the)h(old)f(sessions)f(will)232 4373 y(\034nish)34 b(ho)n(w)n(ev)n(er,)f(and)h(the)g(con\034gured)e(n)n (um)n(b)r(er)h(of)h(sessions)e(will)i(again)e(b)r(e)i(lo)r(c)n(k)n(ed)f (to)232 4472 y(the)28 b(con\034gured)f(v)-5 b(alues,)27 b(un)n(til)h(a)f(new)h(reload)e(of)i(the)g(con\034guration-\034le)d(o)r (ccurs.)232 4746 y Fe(5)132 b(Examples)232 4928 y Fd(This)28 b(section)f(sho)n(ws)g(some)f(examples)h(of)h(ho)n(w)f(one)g(could)g (use)h(this)g(mo)r(dule.)232 5160 y Fa(5.1)113 b(Limiting)34 b(the)j(n)m(um)m(b)s(er)h(of)f(clien)m(ts)f(negotiating)232 5313 y Fd(The)23 b(b)r(elo)n(w)e(rule)h(sho)n(ws)f(ho)n(w)g(one)h(can)g (limit)g(the)h(n)n(um)n(b)r(er)e(of)h(clien)n(ts)g(on)g(the)h (10.0.0.0/24)232 5413 y(net)28 b(con-curren)n(tly)e(negotiating)h(with) h(the)g Fc(Dante)33 b Fd(serv)n(er)26 b(to)h(a)g(total)h(10.)1644 5662 y(1)p eop %%Page: 2 3 2 2 bop 656 531 a Fb(client-pass)39 b({)787 631 y(from:)i(10.0.0.0/24)e (to:)j(0.0.0.0/0)787 731 y(maxsessions:)c(10)656 830 y(})780 1112 y Fd(Note)29 b(that)g(since)g(this)g(is)g(a)g(clien)n (t-rule,)f(it)h(only)g(limits)g(the)g(clien)n(ts)g(while)g(they)g(are) 656 1212 y(negotiating.)38 b(It)28 b(enforces)g(no)g(limitations)g(on)g (the)h(n)n(um)n(b)r(er)f(of)g(clien)n(ts)g(once)g(they)g(ha)n(v)n(e)656 1312 y(\034nished)g(negotiating,)e(and)i(as)e(th)n(us,)i(is)g(of)f (limited)h(use.)656 1544 y Fa(5.2)112 b(Limiting)34 b(the)k(n)m(um)m(b) s(er)f(of)h(clien)m(ts)d(using)i(the)h(w)m(eb)656 1697 y Fd(The)i(next)g(rule)g(sho)n(ws)f(ho)n(w)h(one)f(can)h(limit)h(the)f (n)n(um)n(b)r(er)g(of)g(clien)n(ts)g(con-curren)n(tly)656 1797 y("sur\034ng")26 b(the)i(w)n(eb)f(to)g(10.)656 1980 y Fb(pass)42 b({)787 2079 y(from:)f(0.0.0.0/0)f(to:)i(0.0.0.0/0)e(port) i(http)787 2179 y(maxsessions:)c(10)656 2279 y(})780 2561 y Fd(Since)31 b(this)f(is)h(a)f(so)r(c)n(ks-rule,)f(it)h(tak)n(es) g(action)g(when)g(the)h(clien)n(ts)f(ha)n(v)n(e)f(\034nished)h(ne-)656 2660 y(gotiating)c(with)i(the)g Fc(Dante)34 b Fd(serv)n(er.)780 2760 y(A)22 b(last)f(examples)g(sho)n(ws)f(ho)n(w)h(one)g(could)g (limit)h(a)f(particular)f(user,)i(in)g(this)g(example,)656 2860 y(the)28 b(user)f("monica",)f(to)h(one)g(ftp-session)g(at)h(a)f (time.)656 3042 y Fb(pass)42 b({)787 3142 y(from:)f(0.0.0.0/0)f(to:)i (0.0.0.0/0)e(port)i(ftp)787 3242 y(maxsessions:)c(1)787 3341 y(user:)j(monica)656 3441 y(})2067 5662 y Fd(2)p eop %%Trailer end userdict /end-hook known{end-hook}if %%EOF dante-1.1.19.dfsg/doc/module/bandwidth.tex0000644000175000017500000001513310333437503017022 0ustar roamroam%@(#)$Id: bandwidth.tex,v 1.11 2005/11/03 13:24:17 michaels Exp $ %/* % * Copyright (c) 2001 % * Inferno Nettverk A/S, Norway. All rights reserved. % * % * Redistribution and use in source and binary forms, with or without % * modification, are permitted provided that the following conditions % * are met: % * 1. The above copyright notice, this list of conditions and the following % * disclaimer must appear in all copies of the software, derivative works % * or modified versions, and any portions thereof, aswell as in all % * supporting documentation. % * 2. All advertising materials mentioning features or use of this software % * must display the following acknowledgement: % * This product includes software developed by % * Inferno Nettverk A/S, Norway. % * 3. The name of the author may not be used to endorse or promote products % * derived from this software without specific prior written permission. % * % * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR % * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES % * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. % * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, % * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT % * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, % * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY % * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT % * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF % * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. % * % * Inferno Nettverk A/S requests users of this software to return to % * % * Software Distribution Coordinator or sdc@inet.no % * Inferno Nettverk A/S % * Oslo Research Park % * Gaustadalléen 21 % * NO-0349 Oslo % * Norway % * % * any improvements or extensions that they make and grant Inferno Nettverk A/S % * the rights to redistribute these changes. % * % */ \documentclass[a4paper, final, twoside, english]{article} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{html} \title{\emph{Dante}, Module \emph{Bandwidth}} \author{ Inferno Nettverk A/S \\ Oslo Research Park \\ Gaustadalléen 21 \\ NO-0349 Oslo \\ Norway} \date{$$$$Date: 2005/11/03 13:24:17 $$$$} \makeindex \begin{document} \maketitle \thispagestyle{empty} \clearpage \setcounter{page}{1} \section{Description} The \emph{Bandwidth} module gives you control over how much bandwidth the \emph{Dante} server uses on behalf of the clients. It can be used to limit bandwidth to non-work related web/ftp sites, or to prevent ftp-related traffic from impacting too much on interactive telnet/ssh traffic. It can also be used to give more bandwidth to certain clients or for traffic to certain cites. In addition, when using the \emph{Dante} \emph{bind extension}, it can be used to provide bandwidth control to networkservers (like e.g. webservers) that do not support bandwidth control internally. \section{Syntax} The syntax of the \texttt{bandwidth} statement is as follows: \verb"bandwidth: " \texttt{bytes} is the maximum bandwidth, measured in bytes, to use per second. \section{Semantics} The \texttt{bandwidth} statement integrates as a part of socks-rules. The maximal \texttt{bandwidth} set for a rule will be shared by all clients matching that rule. The \emph{Dante} server will distribute the bandwidth to the matching clients in a least-recently used fashion, trying to let all clients get a fair share. \section{Special notes} Sending the \emph{Dante} server a \texttt{SIGHUP} signal forces a reload of the configuration file. It should be noted that this does not affect current sessions. Changing e.g. a \emph{pass} statement to a \emph{block} statement, does not terminate the session of any existing client. Likewise, a reload of the configuration file does not let sessions created before the reload affect sessions created after the reload. This means that after a reload of the configuration file, the bandwidth counter for new sessions will be reset, and the possibly confusing situation might arise where more than the configured number of bandwidth is used, as old sessions will use the bandwidth allocated to them before the reload, independently of new sessions. Eventually the old sessions will finish however, and the maximal number of sessions will be the the number currently configured, until a new reload of the configuration-file occurs. \section{Examples} This section shows several examples of how one could use the \emph{bandwidth} module. \subsection{Limiting web/http bandwidth} The below rule shows how one can limit the bandwidth used for webtraffic from the clients on the 10.0.0.0/24 net to a total of 10240 bytes, or 100 KiloBytes. \begin{verbatim} pass { from: 10.0.0.0/24 to: 0.0.0.0/0 port = http command: connect bandwidth: 102400 } \end{verbatim} \subsection{Increasing web/http bandwidth} The next rule, if placed before other bandwith-limiting rules, shows how one can increase the bandwidth used for webtraffic from the clients on the 10.0.0.0/24 net to certain sites. In this case, the clients will be able to use 1024000 bytes, or one MegaByte, per second when going to the address work.example.com. \begin{verbatim} pass { from: 10.0.0.0/24 to: work.example.com port = http command: connect bandwidth: 1024000 } \end{verbatim} \subsection{Limiting ftp bandwidth} The next rule shows how one can limit the bandwidth used for ftp-data for the clients on the 10.0.0.0/24 net to a total of 10240 bytes, or 10 kB/s This only works for \emph{active} ftp, since for \emph{passive} ftp we don't have fixed portnumbers. \begin{verbatim} pass { from: 0.0.0.0/0 port = ftp-data to: 10.0.0.0/24 command: bindreply bandwidth: 10240 } \end{verbatim} \subsection{Limiting bandwidth provided by internal servers to the outside} The next rule shows how one could use the \emph{Dante bind extension} together with the \emph{Bandwidth} module to limit the amount of data provided by a internal server, in this case, a webserver called \emph{our-webserver.example.com}, to a total of 10240 bytes, or 10 kB/s. This requires the webserver to be socksified and the \emph{bind extension} to be enabled on both the socksified client and on the \emph{Dante} server. \begin{verbatim} pass { from: 0.0.0.0/0 to: our-webserver.example.com port = http command: bindreply bandwidth: 10240 } \end{verbatim} \end{document} dante-1.1.19.dfsg/lib/0000755000175000017500000000000011037370225013044 5ustar roamroamdante-1.1.19.dfsg/lib/connectchild.c0000644000175000017500000005153610353516041015655 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: connectchild.c,v 1.119 2005/12/24 16:44:57 michaels Exp $"; #define MOTHER 0 /* descriptor mother reads/writes on. */ #define CHILD 1 /* descriptor child reads/writes on. */ __BEGIN_DECLS static void sigchld __P((int sig)); static void run_connectchild __P((int mother)); __END_DECLS /* * if caller already has a signal handler for SIGCHLD, save it * so we can call it from our own handler if something else than our * own child dies, for compatibility with caller. */ static struct sigaction oldsig; #ifdef FDPASS_MAX #undef FDPASS_MAX #endif #define FDPASS_MAX 2 /* one for socks, one more if msproxy (separate control) */ struct route_t * socks_nbconnectroute(s, control, packet, src, dst) int s; int control; struct socks_t *packet; const struct sockshost_t *src, *dst; { const char *function = "socks_nbconnectroute()"; struct sigaction currentsig; struct socksfd_t socksfd; struct childpacket_t childreq; struct iovec iov[1]; struct sockaddr_in local; socklen_t len; ssize_t p, fdsent; struct msghdr msg; CMSG_AALLOC(cmsg, sizeof(int) * FDPASS_MAX); slog(LOG_DEBUG, "%s: s = %d", function, s); if (socks_getroute(&packet->req, src, dst) == NULL) return NULL; if (sigaction(SIGCHLD, NULL, ¤tsig) != 0) { swarn("%s: sigaction(SIGCHLD)", function); return NULL; } if (currentsig.sa_handler != sigchld) { /* * Our signalhandler is not installed, install it. */ struct sigaction oursig; oldsig = currentsig; /* * This is far from 100% but... */ if (oldsig.sa_flags != 0) swarnx("%s: sigchld sa_flags not handled currently,\n" "contact Inferno Nettverk A/S for more information", function); if (oldsig.sa_handler == SIG_DFL || oldsig.sa_handler == SIG_IGN) oldsig.sa_handler = NULL; if (oldsig.sa_handler == NULL) { /* no signal handler, free to do what we want. */ sigemptyset(&oursig.sa_mask); oursig.sa_flags = SA_RESTART; } else /* duplicate old handler as much as possible */ oursig = oldsig; oursig.sa_handler = sigchld; if (sigaction(SIGCHLD, &oursig, NULL) != 0) { swarn("%s: sigaction(SIGCHLD)", function); return NULL; } } if (sockscf.connectchild == 0) { /* * Create child process that will do our connections. */ int pipev[2]; if (socketpair(AF_LOCAL, SOCK_STREAM, 0, pipev) != 0) { swarn("%s: socketpair(AF_LOCAL, SOCK_STREAM)", function); return NULL; } switch (sockscf.connectchild = fork()) { case -1: swarn("%s: fork()", function); return NULL; case 0: { struct itimerval timerval; int i, max; slog(LOG_DEBUG, "%s: connectchild forked", function); /* close unknown descriptors. */ for (i = 0, max = getdtablesize(); i < max; ++i) if (socks_logmatch((unsigned int)i, &sockscf.log) || i == pipev[CHILD]) continue; else if (isatty(i)) continue; else close(i); newprocinit(); /* * in case of using msproxy stuff, don't want mothers mess, * disable alarmtimers. */ if (signal(SIGALRM, SIG_DFL) == SIG_ERR) swarn("%s: signal()", function); timerval.it_value.tv_sec = 0; timerval.it_value.tv_usec = 0; timerval.it_interval = timerval.it_value; if (setitimer(ITIMER_REAL, &timerval, NULL) != 0) swarn("%s: setitimer()", function); run_connectchild(pipev[CHILD]); /* NOTREACHED */ } default: sockscf.connect_s = pipev[MOTHER]; close(pipev[CHILD]); } } switch (packet->req.version) { case SOCKS_V4: case SOCKS_V5: case HTTP_V1_0: { /* * Controlsocket is what later becomes datasocket. * We don't want to allow the client to read/write/select etc. * on the socket yet, since we need to read/write on it * ourselves to setup the connection to the socksserver. * * We therefore create a new unconnected socket and assign * it the same descriptor number as the number the client uses. * This way, the clients select(2)/poll(2) will not * mark the descriptor as ready for anything untill we * are working. * * When the connection has been set up we duplicate back the * socket we were passed here and close the temporarily created * socket. */ int tmp; struct sockaddr_in addr; SASSERTX(control == s); if ((control = socketoptdup(s)) == -1) return NULL; /* * The below bind(2) and listen(2) is neccessary for * Linux not to mark the socket as readable/writable. * Under other unix systems, just a socket() is * enough. Judging from the Open Unix spec., Linux * is the one that is correct though. */ bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl(INADDR_ANY); addr.sin_port = htons(0); /* LINTED pointer casts may be troublesome */ if (bind(control, (struct sockaddr *)&addr, sizeof(addr)) != 0 || listen(control, 1) != 0) { close(control); return NULL; } if ((tmp = dup(s)) == -1) { close(control); return NULL; } if (dup2(control, s) == -1) { close(control); return NULL; } close(control); control = tmp; /* * s: new (temporary) socket using original index of "s". * control: original "s" socket, but using new descriptor index. */ break; } case MSPROXY_V2: /* * Controlsocket is separate from datasocket. * Identical to our fixed sockssetup. */ break; default: SERRX(packet->req.version); } bzero(&socksfd, sizeof(socksfd)); if ((socksfd.route = socks_connectroute(control, packet, src, dst)) == NULL) return NULL; /* * datasocket probably unbound. If so we need to bind it so * we can get a (hopefully) unique local address for it. */ len = sizeof(local); /* LINTED pointer casts may be troublesome */ if (getsockname(s, (struct sockaddr *)&local, &len) != 0) return NULL; if (!ADDRISBOUND(local)) { bzero(&local, sizeof(local)); /* bind same IP as control, any fixed address would do though. */ len = sizeof(local); /* LINTED pointer casts may be troublesome */ if (getsockname(control, (struct sockaddr *)&local, &len) != 0) { int new_control; socks_badroute(socksfd.route); if ((new_control = socketoptdup(control)) == -1) return NULL; switch (packet->req.version) { case SOCKS_V4: case SOCKS_V5: case HTTP_V1_0: close(control); /* created in this function. */ control = s; break; case MSPROXY_V2: swarn("%s: connect failed", function); break; default: SERRX(packet->req.version); } if (dup2(new_control, control) != -1) { close(new_control); /* try again, hopefully there's a backup route. */ return socks_nbconnectroute(s, control, packet, src, dst); } close(new_control); return NULL; } SASSERTX(ADDRISBOUND(local)); local.sin_port = htons(0); /* LINTED pointer casts may be troublesome */ if (bind(s, (struct sockaddr *)&local, sizeof(local)) != 0) return NULL; } len = sizeof(socksfd.local); if (getsockname(s, &socksfd.local, &len) != 0) SERR(s); /* this has to be done here or there would be a race against the signal. */ socksfd.control = control; socksfd.state.command = packet->req.command; socksfd.state.version = packet->req.version; socksfd.state.protocol.tcp = 1; socksfd.state.inprogress = 1; sockshost2sockaddr(&packet->req.host, &socksfd.forus.connected); socks_addaddr((unsigned int)s, &socksfd); /* * send the request to our connectprocess and let it do the rest. * When it's done, we get a signal and dup "s" over "socksfd.control" * in the handler. */ fdsent = 0; /* LINTED pointer casts may be troublesome */ CMSG_ADDOBJECT(control, cmsg, sizeof(control) * fdsent++); switch (packet->req.version) { case SOCKS_V4: case SOCKS_V5: case HTTP_V1_0: break; case MSPROXY_V2: /* LINTED pointer casts may be troublesome */ CMSG_ADDOBJECT(s, cmsg, sizeof(s) * fdsent++); break; default: SERRX(packet->req.version); } childreq.s = s; childreq.src = *src; childreq.dst = *dst; childreq.packet = *packet; iov[0].iov_base = &childreq; iov[0].iov_len = sizeof(childreq); len = sizeof(childreq); msg.msg_iov = iov; msg.msg_iovlen = ELEMENTS(iov); msg.msg_name = NULL; msg.msg_namelen = 0; /* LINTED pointer casts may be troublesome */ CMSG_SETHDR_SEND(msg, cmsg, sizeof(int) * fdsent); slog(LOG_DEBUG, "sending request to connectchild"); #if 0 sleep(20); #endif if ((p = sendmsg(sockscf.connect_s, &msg, 0)) != (ssize_t)len) { swarn("%s: sendmsg(): %d of %d", function, p, len); return NULL; } errno = EINPROGRESS; return socksfd.route; } /* * XXX should have more code so we could handle multiple requests at * a time. */ static void run_connectchild(mother) int mother; { const char *function = "run_connectchild()"; char string[MAXSOCKADDRSTRING]; int p, rbits; fd_set rset; struct sigaction sig; slog(LOG_DEBUG, function); #if 0 sleep(20); #endif sigemptyset(&sig.sa_mask); sig.sa_flags = 0; sig.sa_handler = SIG_DFL; if (sigaction(SIGCONT, &sig, NULL) != 0) serr(EXIT_FAILURE, "%s: sigaction(SIGCONT)", function); setproctitle("connectchild"); /* CONSTCOND */ while (1) { int flags; FD_ZERO(&rset); FD_SET(mother, &rset); rbits = mother; ++rbits; switch (selectn(rbits, &rset, NULL, NULL, NULL)) { case -1: SERR(-1); /* NOTREACHED */ } if (FD_ISSET(mother, &rset)) { /* * Mother sending us a connected (or in the process of being * connected) socket and necessary info to negotiate with * proxyserver. */ struct childpacket_t req; struct iovec iov[1]; socklen_t len; int s, control; struct sockaddr local, remote; struct msghdr msg; CMSG_AALLOC(cmsg, sizeof(int) * FDPASS_MAX); iov[0].iov_base = &req; iov[0].iov_len = sizeof(req); len = sizeof(req); msg.msg_iov = iov; msg.msg_iovlen = ELEMENTS(iov); msg.msg_name = NULL; msg.msg_namelen = 0; /* LINTED pointer casts may be troublesome */ CMSG_SETHDR_RECV(msg, cmsg, CMSG_MEMSIZE(cmsg)); if ((p = recvmsgn(mother, &msg, 0)) != (ssize_t)len) { switch (p) { case -1: serr(EXIT_FAILURE, "%s: recvmsgn()", function); /* NOTREACHED */ case 0: serrx(LOG_DEBUG, "%s: recvmsgn(): mother closed", function); _exit(EXIT_SUCCESS); /* NOTREACHED */ default: swarn("%s: recvmsgn(): got %d of %d", function, p, len); } continue; } /* how many descriptors are we supposed to receive? */ switch (req.packet.req.version) { case MSPROXY_V2: len = 2; /* control + socket for dataflow. */ break; case SOCKS_V4: case SOCKS_V5: case HTTP_V1_0: len = 1; /* only controlsocket (which is also datasocket). */ break; default: SERRX(req.packet.req.version); } #if !HAVE_DEFECT_RECVMSG SASSERTX(CMSG_TOTLEN(msg) == CMSG_SPACE(sizeof(int) * len)); #endif len = 0; /* LINTED pointer casts may be troublesome */ CMSG_GETOBJECT(control, cmsg, sizeof(control) * len++); switch (req.packet.req.version) { case MSPROXY_V2: /* LINTED pointer casts may be troublesome */ CMSG_GETOBJECT(s, cmsg, sizeof(s) * len++); break; case SOCKS_V4: case SOCKS_V5: case HTTP_V1_0: s = control; /* datachannel is controlchannel. */ break; default: SERRX(req.packet.req.version); } slog(LOG_DEBUG, "%s: req.s = %d", function, req.s); #if DIAGNOSTIC /* DIAGNOSTIC */ len = sizeof(local); if (getsockname(s, &local, &len) == 0) slog(LOG_DEBUG, "%s: s local: %s", function, sockaddr2string(&local, string, sizeof(string))); len = sizeof(local); if (getsockname(control, &local, &len) == 0) slog(LOG_DEBUG, "%s: control local: %s", function, sockaddr2string(&local, string, sizeof(string))); else swarn("%s: getsockname(%d)", function, control); len = sizeof(local); if (getpeername(control, &local, &len) == 0) slog(LOG_DEBUG, "%s: control remote: %s", function, sockaddr2string(&local, string, sizeof(string))); #endif /* DIAGNOSTIC */ /* XXX set socket to blocking while we use it. */ if ((flags = fcntl(s, F_GETFL, 0)) == -1 || fcntl(s, F_SETFL, flags & ~NONBLOCKING) == -1) swarn("%s: fcntl(s)", function); /* default, in case we don't even get a response. */ req.packet.res.reply = (char)sockscode(req.packet.req.version, SOCKS_FAILURE); req.packet.res.version = req.packet.req.version; /* CONSTCOND */ if (1) { /* XXX wait for the connection to complete. */ fd_set wset; FD_ZERO(&wset); FD_SET(control, &wset); slog(LOG_DEBUG, "%s: waiting for connectresponse ...", function); switch (selectn(control + 1, NULL, &wset, NULL, NULL)) { case -1: SERR(-1); /* NOTREACHED */ case 0: SERRX(0); /* NOTREACHED */ } } #if !HAVE_SOLARIS_BUGS len = sizeof(errno); if (getsockopt(control, SOL_SOCKET, SO_ERROR, &errno, &len) != 0) SERR(-1); #else /* !HAVE_SOLARIS_2_5_1 */ /* even read() doesn't work right on 2.5.1. */ errno = 0; recvfrom(control, NULL, 0, 0, NULL, NULL); /* just get errno. */ #endif /* !HAVE_SO_ERROR */ if (errno != 0) { req.packet.state.err = errno; swarn("%s: connect failed", function); } else /* connected ok. */ if (socks_negotiate(s, control, &req.packet, NULL) != 0) req.packet.state.err = errno; /* XXX back to original. */ if (fcntl(s, F_SETFL, flags) == -1) swarn("%s: fcntl(s)", function); len = sizeof(local); if (getsockname(control, &local, &len) != 0) { if (req.packet.state.err == 0) /* not warned. */ swarn("%s: getsockname(control)", function); /* * this is pretty bad, but it could happen unfortunately. */ bzero(&local, sizeof(local)); local.sa_family = AF_INET; /* LINTED pointer casts may be troublesome */ TOIN(&local)->sin_addr.s_addr = htonl(INADDR_ANY); /* LINTED pointer casts may be troublesome */ TOIN(&local)->sin_port = htons(0); } len = sizeof(remote); if (getpeername(control, &remote, &len) != 0) { if (req.packet.state.err != 0) /* not warned. */ swarn("%s: getpeername(control)", function); bzero(&remote, sizeof(remote)); remote.sa_family = AF_INET; /* LINTED pointer casts may be troublesome */ TOIN(&remote)->sin_addr.s_addr = htonl(INADDR_ANY); /* LINTED pointer casts may be troublesome */ TOIN(&remote)->sin_port = htons(0); } sockaddr2sockshost(&local, &req.src); sockaddr2sockshost(&remote, &req.dst); /* send response to mother. */ if ((p = write(mother, &req, sizeof(req))) != sizeof(req)) swarn("%s: write(): %d out of %d", function, p, sizeof(req)); close(s); slog(LOG_DEBUG, "raising SIGSTOP"); if (raise(SIGSTOP) != 0) serr(EXIT_FAILURE, "raise(SIGSTOP)"); } } } static void sigchld(sig) int sig; { const char *function = "sigchld()"; const int errno_s = errno; /* CONSTCOND */ char string[MAX(MAXSOCKADDRSTRING, MAXSOCKSHOSTSTRING)]; int status; slog(LOG_DEBUG, "%s: connectchild: %d", function, sockscf.connectchild); switch (waitpid(sockscf.connectchild, &status, WNOHANG | WUNTRACED)) { case -1: break; case 0: /* Does user have a handler for this signal? */ if (oldsig.sa_handler != NULL) { errno = errno_s; oldsig.sa_handler(sig); } break; default: { struct childpacket_t childres; struct sockaddr localmem, *local = &localmem; struct sockaddr remotemem, *remote = &remotemem; socklen_t len; struct socksfd_t *socksfd; int p, s; /* XXX if child dies, set err in all "inprogress" socksfd's. */ if (WIFSIGNALED(status)) { swarnx("%s: connectchild terminated on signal %d", function, WTERMSIG(status)); sockscf.connectchild = 0; close(sockscf.connect_s); break; } /* LINTED bitwise operation on signed value possibly nonportable */ if (WIFEXITED(status)) { /* LINTED bitwise operation on signed value possibly nonportable */ swarnx("%s: cconnectchild exited with status %d", function, WEXITSTATUS(status)); sockscf.connectchild = 0; close(sockscf.connect_s); break; } SASSERTX(WIFSTOPPED(status)); kill(sockscf.connectchild, SIGCONT); if ((p = read(sockscf.connect_s, &childres, sizeof(childres))) != sizeof(childres)) { swarn("%s: read(): got %d of %d", function, p, sizeof(childres)); return; } sockshost2sockaddr(&childres.src, local); sockshost2sockaddr(&childres.dst, remote); slog(LOG_DEBUG, "%s: local = %s", function, sockaddr2string(local, string, sizeof(string))); slog(LOG_DEBUG, "%s: remote = %s", function, sockaddr2string(remote, string, sizeof(string))); if ((s = socks_addrcontrol(local, remote)) == -1) { char lstring[MAXSOCKADDRSTRING]; char rstring[MAXSOCKADDRSTRING]; if (socks_isaddr(childres.s)) s = childres.s; /* not as safe. */ else { swarnx("%s: can't find controlsocket for %s <-> %s, s = %d", function, sockaddr2string(local, lstring, sizeof(lstring)), sockaddr2string(remote, rstring, sizeof(rstring)), childres.s); return; } } socksfd = socks_getaddr((unsigned int)s); SASSERTX(socksfd != NULL); switch (socksfd->state.version) { case MSPROXY_V2: break; /* nothing to do, control separate from data. */ case SOCKS_V4: case SOCKS_V5: case HTTP_V1_0: slog(LOG_DEBUG, "%s: duping %d over %d", function, socksfd->control, s); if (dup2(socksfd->control, s) == -1) { SASSERT(errno != EBADF); swarn("%s: dup2(socksfd->control, s)", function); socksfd->state.err = errno; break; } close(socksfd->control); socksfd->control = s; break; default: SERRX(socksfd->state.version); } /* * it's possible endpoint changed/got fixed. Update in case. */ len = sizeof(socksfd->local); if (getsockname(s, &socksfd->local, &len) != 0) swarn("%s: getsockname(s)", function); else slog(LOG_DEBUG, "%s: socksfd->local: %s", function, sockaddr2string(&socksfd->local, string, sizeof(string))); len = sizeof(socksfd->server); if (getpeername(s, &socksfd->server, &len) != 0) swarn("%s: getpeername(s)", function); /* child that was supposed to setup relaying finished. status? */ if (!serverreplyisok(childres.packet.res.version, childres.packet.res.reply, socksfd->route)) { socksfd->state.err = errno; /* * XXX If it's a servererror it would be nice to retry, could * be there's a backup route. */ return; } slog(LOG_DEBUG, "serverreplyisok, server will use as src: %s", sockshost2string(&childres.packet.res.host, string, sizeof(string))); socksfd->state.auth = childres.packet.auth; socksfd->state.msproxy = childres.packet.state.msproxy; socksfd->state.inprogress = 0; sockshost2sockaddr(&childres.packet.res.host, &socksfd->remote); /* needed for standard socks bind. */ sockscf.state.lastconnect = socksfd->forus.connected; } } errno = errno_s; } dante-1.1.19.dfsg/lib/io.c0000644000175000017500000002321110324735544013625 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #define _NO_FUNCTION_REDIFINE #include "common.h" static const char rcsid[] = "$Id: io.c,v 1.67 2005/10/11 13:17:12 michaels Exp $"; #if SOCKS_CLIENT && SOCKSLIBRARY_DYNAMIC #undef sendmsg #if HAVE_EXTRA_OSF_SYMBOLS #define sendmsg(s, msg, flags) sys_Esendmsg(s, msg, flags) #else #define sendmsg(s, msg, flags) sys_sendmsg(s, msg, flags) #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #undef recvmsg #if HAVE_EXTRA_OSF_SYMBOLS #define recvmsg(s, msg, flags) sys_Erecvmsg(s, msg, flags) #else #define recvmsg(s, msg, flags) sys_recvmsg(s, msg, flags) #endif /* HAVE_EXTRA_OSF_SYMBOLS */ /* XXX needed on AIX apparently */ #ifdef recvmsg_system #undef recvmsg #define recvmsg recvmsg_system #endif /* recvmsg_system */ #ifdef sendmsg_system #undef sendmsg #define sendmsg sendmsg_system #endif /* sendmsg_system */ #endif /* SOCKS_CLIENT && SOCKSLIBRARY_DYNAMIC */ ssize_t readn(d, buf, nbytes, auth) int d; void *buf; size_t nbytes; struct authmethod_t *auth; { const char *function = "readn()"; ssize_t p; size_t left = nbytes; do { if ((p = socks_recvfrom(d, &((char *)buf)[nbytes - left], left, 0, NULL, NULL, auth)) == -1) { #if SOCKS_SERVER if (errno == EINTR) continue; #else /* SOCKS_CLIENT; retry. */ if (errno == EAGAIN) { fd_set rset; FD_ZERO(&rset); FD_SET(d, &rset); if (select(d + 1, &rset, NULL, NULL, NULL) == -1) swarn("%s: select()", function); continue; } #endif break; } else if (p == 0) break; left -= p; } while (left > 0); if (left == nbytes) return p; /* nothing read. */ return nbytes - left; } ssize_t writen(d, buf, nbytes, auth) int d; const void *buf; size_t nbytes; struct authmethod_t *auth; { const char *function = "writen()"; ssize_t p; size_t left = nbytes; do { if ((p = socks_sendto(d, &((const char *)buf)[nbytes - left], left, 0, NULL, 0, auth)) == -1) { #if SOCKS_SERVER if (errno == EINTR) continue; #endif if (errno == EAGAIN) { fd_set wset; FD_ZERO(&wset); FD_SET(d, &wset); if (select(d + 1, NULL, &wset , NULL, NULL) == -1) swarn("%s: select()", function); continue; } break; } left -= p; } while (left > 0); if (left == nbytes) return p; /* nothing written. */ return nbytes - left; } ssize_t socks_recvfrom(s, buf, len, flags, from, fromlen, auth) int s; void *buf; size_t len; int flags; struct sockaddr *from; socklen_t *fromlen; struct authmethod_t *auth; { if (auth != NULL) switch (auth->method) { case AUTHMETHOD_NOTSET: case AUTHMETHOD_NONE: case AUTHMETHOD_UNAME: case AUTHMETHOD_NOACCEPT: case AUTHMETHOD_RFC931: case AUTHMETHOD_PAM: break; default: SERRX(auth->method); } if (from == NULL && flags == 0) /* may not be a socket and read(2) will work just as well then. */ return read(s, buf, len); return recvfrom(s, buf, len, flags, from, fromlen); } ssize_t socks_sendto(s, msg, len, flags, to, tolen, auth) int s; const void *msg; size_t len; int flags; const struct sockaddr *to; socklen_t tolen; struct authmethod_t *auth; { if (auth != NULL) switch (auth->method) { case AUTHMETHOD_NOTSET: case AUTHMETHOD_NONE: case AUTHMETHOD_UNAME: case AUTHMETHOD_NOACCEPT: case AUTHMETHOD_RFC931: case AUTHMETHOD_PAM: break; default: SERRX(auth->method); } if (to == NULL && flags == 0) /* may not be a socket and write(2) will work just as well then. */ return write(s, msg, len); return sendto(s, msg, len, flags, to, tolen); } ssize_t recvmsgn(s, msg, flags) int s; struct msghdr *msg; int flags; { const char *function = "recvmsgn()"; ssize_t p; size_t len, left; for (p = len = 0; p < (ssize_t)msg->msg_iovlen; ++p) len += msg->msg_iov[p].iov_len; while ((p = recvmsg(s, msg, flags)) == -1 && errno == EINTR) #if SOCKS_SERVER ; #else return -1; #endif #if HAVE_SOLARIS_BUGS if (p == -1 && (errno == EMFILE || errno == ENFILE)) { /* * Even if Solaris (2.5.1) fails on recvmsg() it may still have * gotten a descriptor or more as ancillary data which it neglects * to get rid of, so we have to check for it ourselves and close it, * else it just gets lost in the void. */ size_t leaked; int d; for (leaked = 0; CMSG_SPACE(leaked * sizeof(d)) < CMSG_TOTLEN(*msg); ++leaked) { CMSG_GETOBJECT(d, CMSG_CONTROLDATA(*msg), leaked * sizeof(d)); close(d); } } #endif /* HAVE_SOLARIS_BUGS */ if (p <= 0) return p; left = len - p; if (left > 0) { size_t i, count, done; /* * Can't call recvmsg() again since we could be getting ancillary data, * read the elements one by one. */ SASSERTX(p >= 0); done = p; i = count = p = 0; while (i < msg->msg_iovlen && left > 0) { const struct iovec *io = &msg->msg_iov[i]; count += io->iov_len; if (count > done) { /* didn't read all of this iovec. */ if ((p = readn(s, &((char *)(io->iov_base))[io->iov_len - (count - done)], count - done, NULL)) != ((ssize_t)(count - done))) { /* * Failed to read all data, close any descriptors we * may have gotten then. */ size_t leaked; int d; swarn("%s: %d bytes left", function, left); for (leaked = 0; CMSG_SPACE(leaked * sizeof(d)) < (size_t)CMSG_TOTLEN(*msg); ++leaked) { CMSG_GETOBJECT(d, CMSG_CONTROLDATA(*msg), leaked * sizeof(d)); close(d); } break; } left -= p; done += p; } ++i; } } if (left == len) return p; /* nothing read. */ return len - left; } ssize_t sendmsgn(s, msg, flags) int s; const struct msghdr *msg; int flags; { const char *function = "sendmsgn()"; ssize_t p; size_t len, left; for (p = len = 0; p < (ssize_t)msg->msg_iovlen; ++p) len += msg->msg_iov[p].iov_len; while ((p = sendmsg(s, msg, flags)) == -1 && errno == EINTR) #if SOCKS_SERVER ; #else return -1; #endif if (p <= 0) return p; left = len - p; if (left > 0) { size_t i, count, done; /* * Can't call sendmsg() again since we could be sending ancillary data, * send the elements one by one. */ SASSERTX(p >= 0); done = p; i = count = p = 0; while (i < msg->msg_iovlen && left > 0) { const struct iovec *io = &msg->msg_iov[i]; count += io->iov_len; if (count > done) { /* didn't send all of this iovec. */ while ((p = writen(s, &((char *)(io->iov_base))[io->iov_len - (count - done)], count - done, NULL)) != ((ssize_t)(count - done))) { /* * yes, we only re-try once. What errors should we * retry again on? */ swarn("%s: failed on re-try", function); break; } left -= p; done += p; } ++i; } } if (left == len) return p; /* nothing read. */ return len - left; } int closen(d) int d; { int rc; while ((rc = close(d)) == -1 && errno == EINTR) ; #if DIAGNOSTIC SASSERT(rc == 0 || d >= 0); #endif return rc; } int selectn(nfds, readfds, writefds, exceptfds, timeout) int nfds; fd_set *readfds; fd_set *writefds; fd_set *exceptfds; struct timeval *timeout; { const char *function = "selectn()"; /* const */ fd_set rset = readfds == NULL ? rset : *readfds; /* const */ fd_set wset = writefds == NULL ? wset : *writefds; /* const */ fd_set eset = exceptfds == NULL ? eset : *exceptfds; /* const */ struct timeval tout = timeout == NULL ? tout : *timeout; int rc; if (timeout != NULL) slog(LOG_DEBUG, "%s, tv_sec = %ld, tv_usec = %ld", function, timeout->tv_sec, timeout->tv_usec); else slog(LOG_DEBUG, "%s, timeout = NULL", function); while ((rc = select(nfds, readfds, writefds, exceptfds, timeout)) == -1 && errno == EINTR) { if (readfds != NULL) *readfds = rset; if (writefds != NULL) *writefds = wset; if (exceptfds != NULL) *exceptfds = eset; if (timeout != NULL) *timeout = tout; } return rc; } dante-1.1.19.dfsg/lib/Rbindresvport.c0000754000175000017500000000530107700305322016052 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: Rbindresvport.c,v 1.22 2003/07/01 13:21:22 michaels Exp $"; /* * Note that for this function to work correctly the remote socksserver * would have to be using the bind extension. */ int Rbindresvport(sd, sin) int sd; struct sockaddr_in *sin; { const char *function = "Rbindresvport()"; struct sockaddr name; socklen_t namelen; clientinit(); slog(LOG_DEBUG, "%s", function); if (bindresvport(sd, sin) != 0) return -1; namelen = sizeof(name); if (getsockname(sd, &name, &namelen) != 0) return -1; /* * Rbind() will accept failure at binding socket that is already bound * and will try a remote serverbinding too if appropriate. */ return Rbind(sd, &name, namelen); } dante-1.1.19.dfsg/lib/Rgetpeername.c0000644000175000017500000000603510175146325015636 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: Rgetpeername.c,v 1.34 2005/01/24 10:24:21 karls Exp $"; int Rgetpeername(s, name, namelen) int s; struct sockaddr *name; socklen_t *namelen; { const char *function = "Rgetpeername()"; struct socksfd_t *socksfd; struct sockaddr *addr; clientinit(); slog(LOG_DEBUG, "%s", function); if (!socks_addrisok((unsigned int)s)) { socks_rmaddr((unsigned int)s); return getpeername(s, name, namelen); } socksfd = socks_getaddr((unsigned int)s); SASSERTX(socksfd != NULL); switch (socksfd->state.command) { case SOCKS_BIND: addr = &socksfd->forus.accepted; break; case SOCKS_CONNECT: if (socksfd->state.err != 0) { errno = ENOTCONN; return -1; } addr = &socksfd->forus.connected; break; case SOCKS_UDPASSOCIATE: if (!socksfd->state.udpconnect) { errno = ENOTCONN; return -1; } addr = &socksfd->forus.connected; break; default: SERRX(socksfd->state.command); } *namelen = MIN(*namelen, (socklen_t)sizeof(*addr)); memcpy(name, addr, (size_t)*namelen); return 0; } dante-1.1.19.dfsg/lib/debug.c0000644000175000017500000000425607700305330014302 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: debug.c,v 1.25 2003/07/01 13:21:28 michaels Exp $"; #if DEBUG int fd_isset(fd, fdset) int fd; fd_set *fdset; { return FD_ISSET(fd, fdset); } #endif /* DEBUG */ dante-1.1.19.dfsg/lib/Rconnect.c0000754000175000017500000002165210324735543015001 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: Rconnect.c,v 1.122 2005/10/13 12:38:06 michaels Exp $"; int Rconnect(s, name, namelen) int s; const struct sockaddr *name; socklen_t namelen; { const char *function = "Rconnect()"; struct sockshost_t src, dst; struct socksfd_t socksfdmem, *socksfd; struct socks_t packet; socklen_t len; char namestring[MAXSOCKADDRSTRING]; int type, p; clientinit(); if (name == NULL) { slog(LOG_DEBUG, "%s: sockaddr argument NULL, fallback to system connect()", function); return connect(s, name, namelen); } if (name->sa_family != AF_INET) { slog(LOG_DEBUG, "%s: unsupported address family '%d', fallback to system connect()", function, name->sa_family); return connect(s, name, namelen); } slog(LOG_DEBUG, "%s: %s", function, sockaddr2string(name, namestring, sizeof(namestring))); if (socks_addrisok((unsigned int)s)) { socksfd = socks_getaddr((unsigned int)s); switch (socksfd->state.command) { case SOCKS_BIND: /* * Our guess; the client has succeeded to bind a specific * address and is now trying to connect out from it. * That also indicates the socksserver is listening on a port * for this client. Can't accept() on a connected socket so * lets close the connection to the server so it can stop * listening on our behalf and we continue as if this was an * ordinary connect(). Can only hope the server will use * same port as we for connecting out. */ socks_rmaddr((unsigned int)s); break; case SOCKS_CONNECT: if (socksfd->state.err != 0) errno = socksfd->state.err; else if (socksfd->state.inprogress) errno = EALREADY; else errno = EISCONN; return -1; case SOCKS_UDPASSOCIATE: /* * Trying to connect a udp socket (to a new address)? * Just continue as usual, udpsetup() will reuse existing * setup and we just assign the new ("connected") address. */ break; default: SERRX(socksfd->state.command); } } else socks_rmaddr((unsigned int)s); len = sizeof(type); if (getsockopt(s, SOL_SOCKET, SO_TYPE, &type, &len) != 0) return -1; switch (type) { case SOCK_DGRAM: if (udpsetup(s, name, SOCKS_SEND) == 0) { socksfd = socks_getaddr((unsigned int)s); SASSERTX(socksfd != NULL); if (connect(s, &socksfd->reply, sizeof(socksfd->reply)) != 0) { socks_rmaddr((unsigned int)s); return -1; } socksfd->state.udpconnect = 1; socksfd->forus.connected = *name; return 0; } else { if (errno == 0) /* not a network error, try standard connect. */ return connect(s, name, namelen); else return -1; } } socksfd = &socksfdmem; bzero(socksfd, sizeof(*socksfd)); len = sizeof(socksfd->local); if (getsockname(s, &socksfd->local, &len) != 0) return -1; src.atype = SOCKS_ADDR_IPV4; /* LINTED pointer casts may be troublesome */ src.addr.ipv4 = TOIN(&socksfd->local)->sin_addr; /* LINTED pointer casts may be troublesome */ src.port = TOIN(&socksfd->local)->sin_port; fakesockaddr2sockshost(name, &dst); bzero(&packet, sizeof(packet)); packet.req.version = SOCKS_V5; packet.auth.method = AUTHMETHOD_NOTSET; packet.req.command = SOCKS_CONNECT; packet.req.host = dst; if (socks_requestpolish(&packet.req, &src, &dst) == NULL) return connect(s, name, namelen); packet.version = packet.req.version; switch (packet.req.version) { case SOCKS_V4: case SOCKS_V5: socksfd->control = s; break; case MSPROXY_V2: /* always needs a separate controlchannel. */ if ((socksfd->control = socket(AF_INET, SOCK_DGRAM, 0)) == -1) return -1; break; case HTTP_V1_0: socksfd->control = s; break; default: SERRX(packet.req.version); } if ((p = fcntl(s, F_GETFL, 0)) == -1) return -1; errno = 0; if (p & NONBLOCKING) socksfd->route = socks_nbconnectroute(s, socksfd->control, &packet, &src, &dst); else socksfd->route = socks_connectroute(socksfd->control, &packet, &src, &dst); slog(LOG_DEBUG, "%s: route = %s, errno = %d", function, socksfd->route == NULL ? "null" : "found", errno); if (socksfd->route == NULL) { if (s != socksfd->control) close(socksfd->control); switch (errno) { case EADDRINUSE: { /* * This problem can arise when we are socksifying * a serverapplication that does several outbound * connections from the same address (e.g. ftpd) to the * same socksserver. * It has by now successfully bound the address (it thinks) * and is not expecting this error. * Not sure what is best to do, just failing here prevents * ftpd from working for clients using the PORT command. * * For now, lets retry with a new socket. * This means the server no longer has bound the address * it (may) think it has ofcourse, so not sure how smart this * really is. */ int tmp_s; swarn("%s: server socksified? trying to work around problem...", function); if ((tmp_s = socketoptdup(s)) == -1) break; if (dup2(tmp_s, s) == -1) break; close(tmp_s); /* * if s was bound to a privileged port, try to bind the new * s too to a privileged port. */ /* LINTED pointer casts may be troublesome */ if (PORTISRESERVED(TOIN(&socksfd->local)->sin_port)) { /* LINTED pointer casts may be troublesome */ TOIN(&socksfd->local)->sin_port = htons(0); /* LINTED pointer casts may be troublesome */ bindresvport(s, TOIN(&socksfd->local)); } return Rconnect(s, name, namelen); } } return errno == 0 ? connect(s, name, namelen) : -1; } if (p & NONBLOCKING) return -1; /* got route, nonblocking connect in progress. */ if (socks_negotiate(s, socksfd->control, &packet, socksfd->route) != 0) return -1; socksfd->state.auth = packet.auth; socksfd->state.command = packet.req.command; socksfd->state.version = packet.req.version; socksfd->state.protocol.tcp = 1; socksfd->state.msproxy = packet.state.msproxy; sockshost2sockaddr(&packet.res.host, &socksfd->remote); socksfd->forus.connected = *name; /* LINTED pointer casts may be troublesome */ if (TOIN(&socksfd->local)->sin_port != htons(0) && TOIN(&socksfd->local)->sin_port != TOIN(&socksfd->remote)->sin_port) { /* * unfortunate; the client is trying to connect from a specific * port, a port it has successfully bound, but the port is currently * in use on the serverside or the server doesn't care. */ /* LINTED pointer casts may be troublesome */ slog(LOG_DEBUG, "failed to get wanted port: %d", ntohs(TOIN(&socksfd->local)->sin_port)); } len = sizeof(socksfd->server); if (getpeername(s, &socksfd->server, &len) != 0) { if (s != socksfd->control) close(socksfd->control); return -1; } len = sizeof(socksfd->local); if (getsockname(s, &socksfd->local, &len) != 0) { if (s != socksfd->control) close(socksfd->control); return -1; } socks_addaddr((unsigned int)s, socksfd); sockscf.state.lastconnect = *name; /* needed for standard socks bind. */ return 0; } dante-1.1.19.dfsg/lib/log.c0000644000175000017500000001304210355543272013777 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: log.c,v 1.68 2005/12/31 17:56:55 michaels Exp $"; __BEGIN_DECLS static char * logformat __P((int priority, char *buf, size_t buflen, const char *message, va_list ap)); /* * formats "message" as appropriate. The formated message is stored * in the buffer "buf", which is of size "buflen". * If no newline is present at the end of the string, one is added. * Returns: * On success: pointer to "buf". * On failure: NULL. */ __END_DECLS void newprocinit(void) { #if SOCKS_SERVER /* don't want to override original clients stuff. */ sockscf.state.pid = getpid(); if (sockscf.log.type & LOGTYPE_SYSLOG) { closelog(); /* * LOG_NDELAY so we don't end up in a situation where we * have no free descriptors and haven't yet syslog-ed anything. */ openlog(__progname, LOG_NDELAY | LOG_PID, sockscf.log.facility); } #endif /* SOCKS_SERVER */ #if SOCKSLIBRARY_DYNAMIC symbolcheck(); #endif } void #ifdef STDC_HEADERS slog(int priority, const char *message, ...) #else slog(priority, message, va_alist) int priority; char *message; va_dcl #endif /* STDC_HEADERS */ { va_list ap; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, message); #else va_start(ap); #endif /* STDC_HEADERS */ vslog(priority, message, ap); /* LINTED expression has null effect */ va_end(ap); } void vslog(priority, message, ap) int priority; const char *message; va_list ap; { const int errno_s = errno; char buf[2048]; int logged = 0; if (sockscf.log.type & LOGTYPE_SYSLOG) if ((sockscf.state.init && priority != LOG_DEBUG) || (priority == LOG_DEBUG && sockscf.option.debug)) { vsyslog(priority, message, ap); logged = 1; } if (sockscf.log.type & LOGTYPE_FILE) { size_t i; if (logformat(priority, buf, sizeof(buf), message, ap) == NULL) return; for (i = 0; i < sockscf.log.fpc; ++i) { #if SOCKS_CLIENT && SOCKSLIBRARY_DYNAMIC /* XXX should not need SOCKS_CLIENT. */ SYSCALL_START(fileno(sockscf.log.fpv[i])); #endif #if DEBUG if (getenv("NO_SLOG_LOCK") == NULL) #endif socks_lock(sockscf.log.fplockv[i], F_WRLCK, -1); fprintf(sockscf.log.fpv[i], "%s", buf); #if DEBUG if (getenv("NO_SLOG_LOCK") == NULL) #endif socks_unlock(sockscf.log.fplockv[i]); logged = 1; #if SOCKS_CLIENT && SOCKSLIBRARY_DYNAMIC SYSCALL_END(fileno(sockscf.log.fpv[i])); #endif } } if (!logged && !sockscf.state.init) { /* may not have set-up logfiles yet. */ #if SOCKS_SERVER /* log to stdout for now. */ if (logformat(priority, buf, sizeof(buf), message, ap) != NULL) fprintf(stdout, "%s", buf); return; #else /* SOCKS_CLIENT */ /* no idea where stdout points to in client case. */ #endif /* SOCKS_SERVER */ } errno = errno_s; } static char * logformat(priority, buf, buflen, message, ap) int priority; char *buf; size_t buflen; const char *message; va_list ap; { size_t bufused; time_t timenow; pid_t pid; if (sockscf.state.pid == 0) pid = getpid(); else pid = sockscf.state.pid; switch (priority) { case LOG_DEBUG: if (sockscf.state.init && !sockscf.option.debug) return NULL; break; } time(&timenow); bufused = strftime(buf, buflen, "%h %e %T ", localtime(&timenow)); bufused += snprintfn(&buf[bufused], buflen - bufused, "(%ld) %s[%lu]: ", (long)timenow, __progname, (unsigned long)pid); vsnprintf(&buf[bufused], buflen - bufused, message, ap); bufused = strlen(buf); if (buf[bufused - 1] != '\n') { /* add ending newline. */ bufused = MIN(bufused, buflen - 2); /* silently truncate. */ buf[bufused++] = '\n'; buf[bufused++] = NUL; } return buf; } dante-1.1.19.dfsg/lib/udp.c0000644000175000017500000003034610324735544014015 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: udp.c,v 1.132 2005/10/11 13:17:13 michaels Exp $"; /* ARGSUSED */ ssize_t Rsendto(s, msg, len, flags, to, tolen) int s; const void *msg; size_t len; int flags; const struct sockaddr *to; socklen_t tolen; { const char *function = "Rsendto()"; struct socksfd_t *socksfd; struct sockshost_t host; char srcstring[MAXSOCKADDRSTRING], dststring[sizeof(srcstring)]; char *nmsg; size_t nlen; ssize_t n; clientinit(); if (to != NULL && to->sa_family != AF_INET) { slog(LOG_DEBUG, "%s: unsupported address family '%d', fallback to system sendto()", function, to->sa_family); return sendto(s, msg, len, flags, to, tolen); } if (udpsetup(s, to, SOCKS_SEND) != 0) return errno == 0 ? sendto(s, msg, len, flags, to, tolen) : -1; socksfd = socks_getaddr((unsigned int)s); SASSERTX(socksfd != NULL); if (to == NULL) if (socksfd->state.udpconnect) to = &socksfd->forus.connected; else { /* tcp. */ n = sendto(s, msg, len, flags, NULL, 0); slog(LOG_DEBUG, "%s: %s: %s -> %s (%lu)", function, protocol2string(SOCKS_TCP), sockaddr2string(&socksfd->local, dststring, sizeof(dststring)), sockaddr2string(&socksfd->server, srcstring, sizeof(srcstring)), (unsigned long)n); return n; } /* prefix a UDP header to the msg */ nlen = len; /* LINTED warning: cast discards 'const' from pointer target type */ if ((nmsg = udpheader_add(fakesockaddr2sockshost(to, &host), (const char *)msg, &nlen, 0)) == NULL) { errno = ENOBUFS; return -1; } n = sendto(s, nmsg, nlen, flags, socksfd->state.udpconnect ? NULL : &socksfd->reply, socksfd->state.udpconnect ? 0 : sizeof(socksfd->reply)); n -= nlen - len; free(nmsg); slog(LOG_DEBUG, "%s: %s: %s -> %s (%lu)", function, protocol2string(SOCKS_TCP), sockaddr2string(&socksfd->local, dststring, sizeof(dststring)), sockaddr2string(&socksfd->reply, srcstring, sizeof(srcstring)), (unsigned long)n); return MAX(-1, n); } ssize_t Rrecvfrom(s, buf, len, flags, from, fromlen) int s; void *buf; size_t len; int flags; struct sockaddr *from; socklen_t *fromlen; { const char *function = "Rrecvfrom()"; struct socksfd_t *socksfd; struct udpheader_t header; struct sockaddr newfrom; char srcstring[MAXSOCKADDRSTRING], dststring[sizeof(srcstring)]; socklen_t newfromlen; char *newbuf; size_t newlen; ssize_t n; if (!socks_addrisok((unsigned int)s)) { socks_rmaddr((unsigned int)s); return recvfrom(s, buf, len, flags, from, fromlen); } if (udpsetup(s, from, SOCKS_RECV) != 0) return errno == 0 ? recvfrom(s, buf, len, flags, from, fromlen) : -1; socksfd = socks_getaddr((unsigned int)s); SASSERTX(socksfd != NULL); if (socksfd->state.protocol.tcp) { struct sockaddr *forus; if (socksfd->state.err != 0) { errno = socksfd->state.err; return -1; } else if (socksfd->state.inprogress) { errno = ENOTCONN; return -1; } n = recvfrom(s, buf, len, flags, from, fromlen); switch (socksfd->state.command) { case SOCKS_CONNECT: forus = &socksfd->forus.connected; break; case SOCKS_BIND: forus = &socksfd->forus.accepted; break; default: SERRX(socksfd->state.command); } slog(LOG_DEBUG, "%s: %s: %s -> %s (%lu)", function, protocol2string(SOCKS_TCP), sockaddr2string(forus, srcstring, sizeof(srcstring)), sockaddr2string(&socksfd->local, dststring, sizeof(dststring)), (unsigned long)n); return n; } SASSERTX(socksfd->state.protocol.udp); /* udp. If packet is from socksserver it will be prefixed with a header. */ newlen = len + sizeof(header); if ((newbuf = (char *)malloc(sizeof(*newbuf) * newlen)) == NULL) { errno = ENOBUFS; return -1; } newfromlen = sizeof(newfrom); if ((n = recvfrom(s, newbuf, newlen, flags, &newfrom, &newfromlen)) == -1) { free(newbuf); return n; } SASSERTX(newfromlen > 0); if (sockaddrareeq(&newfrom, &socksfd->reply)) { /* * packet is from socksserver. */ if (string2udpheader(newbuf, (size_t)n, &header) == NULL) { char badfrom[MAXSOCKADDRSTRING]; swarnx("%s: unrecognized socks udppacket from %s", function, sockaddr2string(&newfrom, badfrom, sizeof(badfrom))); errno = EAGAIN; return -1; /* don't know if callee wants to retry. */ } /* if connected udpsocket, only forward from "connected" source. */ if (socksfd->state.udpconnect) { struct sockshost_t host; if (!sockshostareeq(&header.host, fakesockaddr2sockshost(&socksfd->forus.connected, &host))) { char a[MAXSOCKSHOSTSTRING]; char b[MAXSOCKSHOSTSTRING]; /* * We have a problem here ... If we failed to resolve * address we gave to the socksserver and instead gave a * hostname to it, sockshostareeq() will fail unless the server * sends the address it is forwarding from as the sockshost too. * * It is better to place safe than sorry though, so * we have to drop the packet in that case, even if it * is from the correct source since we can not verify it. */ free(newbuf); slog(LOG_DEBUG, "%s: expected udpreply from %s, got it from %s", function, sockshost2string(fakesockaddr2sockshost(&socksfd->forus.connected, &host), a, sizeof(a)), sockshost2string(&header.host, b, sizeof(b))); /* * Not sure what to do now, return error or retry? * Going with returning error for now. */ #if 0 if ((p = fcntl(s, F_GETFL, 0)) == -1) return -1; if (p & NONBLOCKING) { #endif errno = EAGAIN; return -1; #if 0 } /* else; assume the best thing is to retry. */ return Rrecvfrom(s, buf, len, flags, from, fromlen); #endif } } /* replace "newfrom" with the address socksserver says packet is from. */ fakesockshost2sockaddr(&header.host, &newfrom); /* callee doesn't get socksheader. */ n -= PACKETSIZE_UDP(&header); SASSERTX(n >= 0); memcpy(buf, &newbuf[PACKETSIZE_UDP(&header)], MIN(len, (size_t)n)); } else /* ordinary udppacket, not from socksserver. */ memcpy(buf, newbuf, MIN(len, (size_t)n)); free(newbuf); slog(LOG_DEBUG, "%s: %s: %s -> %s (%lu)", function, protocol2string(SOCKS_UDP), sockaddr2string(&newfrom, srcstring, sizeof(srcstring)), sockaddr2string(&socksfd->local, dststring, sizeof(dststring)), (unsigned long)n); if (from != NULL) { *fromlen = MIN(*fromlen, newfromlen); memcpy(from, &newfrom, (size_t)*fromlen); } return MIN(len, (size_t)n); } int udpsetup(s, to, type) int s; const struct sockaddr *to; int type; { const char *function = "udpsetup()"; struct socks_t packet; struct socksfd_t socksfd; struct sockaddr_in newto; struct sockshost_t src, dst; socklen_t len; int p; slog(LOG_DEBUG, "%s: s = %d", function, s); if (!socks_addrisok((unsigned int)s)) socks_rmaddr((unsigned int)s); if (socks_getaddr((unsigned int)s) != NULL) return 0; /* all set up. */ /* * if this socket has not previously been used we need to * make a new connection to the socksserver for it. */ errno = 0; switch (type) { case SOCKS_RECV: /* * problematic, trying to receive on socket not sent on. */ bzero(&newto, sizeof(newto)); newto.sin_family = AF_INET; newto.sin_addr.s_addr = htonl(INADDR_ANY); newto.sin_port = htons(0); /* LINTED pointer casts may be troublesome */ to = (struct sockaddr *)&newto; break; case SOCKS_SEND: if (to == NULL) return -1; /* no address and unknown socket, no idea. */ break; default: SERRX(type); } /* * we need to send the socksserver our address. * First check if the socket already has a name, if so * use that, otherwise assign the name ourselves. */ bzero(&socksfd, sizeof(socksfd)); len = sizeof(socksfd.local); if (getsockname(s, &socksfd.local, &len) != 0) return -1; sockaddr2sockshost(&socksfd.local, &src); fakesockaddr2sockshost(to, &dst); bzero(&packet, sizeof(packet)); packet.version = SOCKS_V5; packet.auth.method = AUTHMETHOD_NOTSET; packet.req.version = packet.version; packet.req.command = SOCKS_UDPASSOCIATE; packet.req.flag |= SOCKS_USECLIENTPORT; /* packet.req.flag |= SOCKS_INTERFACEREQUEST; */ packet.req.host = src; if ((socksfd.control = socket(AF_INET, SOCK_STREAM, 0)) == -1) return -1; if ((socksfd.route = socks_connectroute(socksfd.control, &packet, &src, &dst)) == NULL) { close(socksfd.control); return -1; } /* LINTED pointer casts may be troublesome */ if ((TOIN((&socksfd.local))->sin_addr.s_addr == htonl(INADDR_ANY)) /* LINTED pointer casts may be troublesome */ || TOIN((&socksfd.local))->sin_port == htons(0)) { /* * local name not fixed, set it, port may be bound, we need to bind * IP too however. */ /* LINTED pointer casts may be troublesome */ const in_port_t port = TOIN((&socksfd.local))->sin_port; if (port != htons(0)) { /* * port is bound. We will try to unbind and then rebind same port * but now also bind IP address. XXX Dangerous stuff. */ if ((p = socketoptdup(s)) == -1) { close(socksfd.control); return -1; } if (dup2(p, s) == -1) { close(socksfd.control); close(p); return -1; } close(p); } /* * don't have much of an idea on what IP address to use so might as * well use same as tcp connection to socksserver uses. */ len = sizeof(socksfd.local); if (getsockname(socksfd.control, &socksfd.local, &len) != 0) { close(socksfd.control); return -1; } /* LINTED pointer casts may be troublesome */ TOIN(&socksfd.local)->sin_port = port; if (bind(s, &socksfd.local, sizeof(socksfd.local)) != 0) { close(socksfd.control); return -1; } if (getsockname(s, &socksfd.local, &len) != 0) { close(socksfd.control); return -1; } sockaddr2sockshost(&socksfd.local, &packet.req.host); } /* packet.req.host.addr.ipv4.s_addr = htonl(INADDR_ANY); */ /* packet.req.host.port = htons(0); */ if (socks_negotiate(s, socksfd.control, &packet, socksfd.route) != 0) return -1; socksfd.state.auth = packet.auth; socksfd.state.version = packet.version; socksfd.state.command = SOCKS_UDPASSOCIATE; socksfd.state.protocol.udp = 1; sockshost2sockaddr(&packet.res.host, &socksfd.reply); len = sizeof(socksfd.server); if (getpeername(socksfd.control, &socksfd.server, &len) != 0) { close(socksfd.control); return -1; } if (socks_addaddr((unsigned int)s, &socksfd) == NULL) { close(socksfd.control); errno = ENOBUFS; return -1; } return 0; } dante-1.1.19.dfsg/lib/Rgethostbyname.c0000755000175000017500000002435510247253160016217 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ /* * getaddrinfo() contributed by Motoyuki Kasahara * getipnodebyname() contributed by Lennart Dahlström */ #include "common.h" static const char rcsid[] = "$Id: Rgethostbyname.c,v 1.46 2005/05/10 11:44:57 michaels Exp $"; struct hostent * Rgethostbyname2(name, af) const char *name; int af; { const char *function = "Rgethostbyname2()"; static struct hostent hostentmem; static char *aliases[] = { NULL }; struct in_addr ipindex; struct hostent *hostent; clientinit(); slog(LOG_DEBUG, "%s: %s", function, name); switch (sockscf.resolveprotocol) { case RESOLVEPROTOCOL_TCP: case RESOLVEPROTOCOL_UDP: if ((hostent = gethostbyname(name)) != NULL) return hostent; break; case RESOLVEPROTOCOL_FAKE: hostent = NULL; break; default: SERRX(sockscf.resolveprotocol); } if (hostent != NULL) return hostent; if (sockscf.resolveprotocol != RESOLVEPROTOCOL_FAKE) slog(LOG_DEBUG, "%s: gethostbyname(%s): %s", function, name, hstrerror(h_errno)); /* continue as if resolveprotocol is set to fake and hope that works. */ hostent = &hostentmem; /* anything that fails from here is due to resource shortage. */ h_errno = TRY_AGAIN; free(hostent->h_name); if ((hostent->h_name = strdup(name)) == NULL) return NULL; hostent->h_aliases = aliases; hostent->h_addrtype = af; if (hostent->h_addr_list == NULL) { /* * 2; NULL terminated and always only one valid entry (fake). */ if ((hostent->h_addr_list = (char **)malloc(sizeof(hostent->h_addr_list) * 2)) == NULL) return NULL; hostent->h_addr_list[1] = NULL; } switch (af) { case AF_INET: { static char ipv4[INET_ADDRSTRLEN]; hostent->h_length = sizeof(ipv4); *hostent->h_addr_list = ipv4; break; } #if HAVE_IPV6_SUPPORT case AF_INET6: { static char ipv6[INET6_ADDRSTRLEN]; hostent->h_length = sizeof(ipv6); *hostent->h_addr_list = ipv6; break; } #endif /* HAVE_IPV6_SUPPORT */ default: errno = ENOPROTOOPT; return NULL; } if ((ipindex.s_addr = socks_addfakeip(name)) == htonl(INADDR_NONE)) return NULL; if (inet_pton(af, inet_ntoa(ipindex), *hostent->h_addr_list) != 1) return NULL; return hostent; } struct hostent * Rgethostbyname(name) const char *name; { return Rgethostbyname2(name, AF_INET); } #if HAVE_GETADDRINFO int Rgetaddrinfo(nodename, servname, hints, res) const char *nodename; const char *servname; const struct addrinfo *hints; struct addrinfo **res; { const char *function = "Rgetaddrinfo()"; struct addrinfo fakehints; struct in_addr ipindex; char addrstr[INET6_ADDRSTRLEN]; char addrbuf[sizeof(struct in6_addr)]; int fakeip_flag; int gaierr; clientinit(); if (nodename != NULL) slog(LOG_DEBUG, "%s: %s", function, nodename); fakeip_flag = 1; if (nodename == NULL || (hints != NULL && hints->ai_flags & AI_NUMERICHOST)) { fakeip_flag = 0; } else if (hints == NULL || hints->ai_protocol == PF_UNSPEC) { #if HAVE_IPV6_SUPPORT if (inet_pton(AF_INET6, nodename, addrbuf) == 1 || inet_pton(AF_INET, nodename, addrbuf) == 1) fakeip_flag = 0; #else /* HAVE_IPV6_SUPPORT */ if (inet_pton(AF_INET, nodename, addrbuf) == 1) fakeip_flag = 0; #endif /* HAVE_IPV6_SUPPORT */ #if HAVE_IPV6_SUPPORT } else if (hints->ai_protocol == PF_INET6) { if (inet_pton(AF_INET6, nodename, addrbuf) == 1) fakeip_flag = 0; #endif /* HAVE_IPV6_SUPPORT */ } else if (hints->ai_protocol == PF_INET) { if (inet_pton(AF_INET, nodename, addrbuf) == 1) fakeip_flag = 0; } switch (sockscf.resolveprotocol) { case RESOLVEPROTOCOL_TCP: case RESOLVEPROTOCOL_UDP: gaierr = getaddrinfo(nodename, servname, hints, res); if (gaierr == 0 || !fakeip_flag) return gaierr; break; case RESOLVEPROTOCOL_FAKE: if (!fakeip_flag) return getaddrinfo(nodename, servname, hints, res); break; default: SERRX(sockscf.resolveprotocol); } if (!fakeip_flag || nodename == NULL) return EAI_NONAME; if (sockscf.resolveprotocol != RESOLVEPROTOCOL_FAKE) slog(LOG_DEBUG, "%s: getaddrinfo(%s): %s", function, nodename, gai_strerror(gaierr)); if ((ipindex.s_addr = socks_addfakeip(nodename)) == htonl(INADDR_NONE)) return EAI_NONAME; strcpy(addrstr, inet_ntoa(ipindex)); if (hints == NULL) { fakehints.ai_flags = AI_NUMERICHOST; fakehints.ai_family = PF_INET; fakehints.ai_socktype = 0; fakehints.ai_protocol = 0; } else { fakehints.ai_flags = hints->ai_flags | AI_NUMERICHOST; fakehints.ai_family = hints->ai_family; fakehints.ai_socktype = hints->ai_socktype; fakehints.ai_protocol = hints->ai_protocol; } fakehints.ai_addrlen = 0; fakehints.ai_canonname = NULL; fakehints.ai_addr = NULL; fakehints.ai_next = NULL; return getaddrinfo(addrstr, servname, &fakehints, res); } #endif /* HAVE_GETADDRINFO */ #if HAVE_GETIPNODEBYNAME /* * Solaris appears to implement getaddrinfo() by calling * getipnodebyname(), but since they are in different libraries, they * must be implemented independently. * * XXX thread safety */ struct hostent * Rgetipnodebyname2(name, af, flags, error_num) const char *name; int af; int flags; int *error_num; { const char *function = "Rgetipnodebyname2()"; char **addrlist; struct in_addr ipindex; struct hostent *hostent; /* needs to be done before getipnodebyname calls. */ clientinit(); slog(LOG_DEBUG, "%s: %s", function, name); switch (sockscf.resolveprotocol) { case RESOLVEPROTOCOL_TCP: case RESOLVEPROTOCOL_UDP: slog(LOG_DEBUG, "%s: using udp/tcp", function); if ((hostent = getipnodebyname(name, af, flags, error_num)) != NULL) return hostent; break; case RESOLVEPROTOCOL_FAKE: slog(LOG_DEBUG, "%s: using fake", function); hostent = NULL; h_errno = NO_RECOVERY; break; default: SERRX(sockscf.resolveprotocol); } if (h_errno != NO_RECOVERY) return hostent; hostent = (struct hostent *) malloc(sizeof(struct hostent)); /* anything that fails from here is due to resource shortage. */ h_errno = TRY_AGAIN; if ((hostent->h_name = strdup(name)) == NULL) { free(hostent); return NULL; } hostent->h_aliases = NULL; hostent->h_addrtype = af; /* * 2; NULL terminated. */ if ((addrlist = (char **)malloc(sizeof(addrlist) * 2)) == NULL) { free(hostent->h_name); free(hostent); return NULL; } switch (af) { case AF_INET: { static char ipv4[INET_ADDRSTRLEN]; slog(LOG_DEBUG, "%s: AF_INET", function); hostent->h_length = sizeof(ipv4); *addrlist = ipv4; break; } case AF_INET6: { static char ipv6[INET6_ADDRSTRLEN]; slog(LOG_DEBUG, "%s: AF_INET6", function); hostent->h_length = sizeof(ipv6); *addrlist = ipv6; break; } default: slog(LOG_DEBUG, "%s: AF_????? (%d)", function, af); errno = ENOPROTOOPT; free(hostent->h_name); free(hostent); return NULL; } if ((ipindex.s_addr = socks_addfakeip(name)) == htonl(INADDR_NONE)) { free(hostent->h_name); free(*addrlist); free(addrlist); free(hostent); return NULL; } switch (af) { case AF_INET: { memcpy(*addrlist, &ipindex.s_addr, sizeof(in_addr_t)); break; } case AF_INET6: { unsigned char ff[] = {0xff,0xff}; memset(*addrlist, 0, 10); memcpy(*addrlist+10, ff, 2); memcpy(*addrlist+12, &ipindex.s_addr, sizeof(in_addr_t)); break; } default: slog(LOG_DEBUG, "%s: AF_????? (%d)", function, af); errno = ENOPROTOOPT; free(hostent->h_name); free(*addrlist); free(addrlist); free(hostent); return NULL; } slog(LOG_DEBUG, "%s: after inet_pton (0x%x, %s)", function, (unsigned int)*addrlist, inet_ntoa(ipindex)); hostent->h_addr_list = addrlist++; *addrlist = NULL; return hostent; } struct hostent * Rgetipnodebyname(name, af, flags, error_num) const char *name; int af; int flags; int *error_num; { struct hostent *hent; const char *function = "Rgetipnodebyname()"; slog(LOG_DEBUG, "%s: %s, %d", function, name, af); if ((hent = Rgetipnodebyname2(name, af, flags, error_num)) == NULL) *error_num = h_errno; return hent; } void Rfreehostent(ptr) struct hostent *ptr; { struct in_addr addr; if(socks_getfakeip(ptr->h_name, &addr)) { free(ptr->h_name); free(*(ptr->h_addr_list)); free(ptr->h_addr_list); free(ptr); } else freehostent(ptr); } #endif /* HAVE_GETIPNODEBYNAME */ dante-1.1.19.dfsg/lib/udp_util.c0000644000175000017500000000642507700305335015046 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: udp_util.c,v 1.48 2003/07/01 13:21:33 michaels Exp $"; struct udpheader_t * sockaddr2udpheader(to, header) const struct sockaddr *to; struct udpheader_t *header; { SASSERTX(to->sa_family == AF_INET); bzero(header, sizeof(*header)); fakesockaddr2sockshost(to, &header->host); return header; } char * udpheader_add(host, msg, len, msgsize) const struct sockshost_t *host; char *msg; size_t *len; size_t msgsize; { /* const char *function = "udpheader_add()"; */ struct udpheader_t header; unsigned char *newmsg, *offset; bzero(&header, sizeof(header)); header.host = *host; if (msgsize >= sizeof(*newmsg) * (*len + PACKETSIZE_UDP(&header))) newmsg = (unsigned char *)msg; else if ((newmsg = (unsigned char *)malloc(sizeof(*newmsg) * (*len + PACKETSIZE_UDP(&header)))) == NULL) return NULL; /* offset old contents by size of header we are about to prefix. */ memmove(newmsg + PACKETSIZE_UDP(&header), msg, *len); offset = newmsg; memcpy(offset, &header.flag, sizeof(header.flag)); offset += sizeof(header.flag); memcpy(offset, &header.frag, sizeof(header.frag)); offset += sizeof(header.frag); offset = sockshost2mem(&header.host, offset, SOCKS_V5); offset += *len; /* len bytes copied above. */ *len = offset - newmsg; return (char *)newmsg; } dante-1.1.19.dfsg/lib/address.c0000644000175000017500000002602007700305324014635 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: address.c,v 1.83 2003/07/01 13:21:24 michaels Exp $"; __BEGIN_DECLS static struct socksfd_t socksfdinit; static int *dv; static unsigned int dc; static struct socksfd_t *socksfdv; static unsigned int socksfdc; static int socks_sigblock __P((sigset_t *oldmask)); /* * Blocks signals that can change socksfdv, writing the old * signalmask to "oldmask". * Returns: * On success: 0 * On failure: -1 */ __END_DECLS struct socksfd_t * socks_addaddr(clientfd, socksfd) unsigned int clientfd; struct socksfd_t *socksfd; { const char *function = "socks_addaddr()"; #if 0 /* DEBUG */ if (socksfd->state.command != -1 && !socksfd->state.system) slog(LOG_DEBUG, "%s: %d", function, clientfd); #endif SASSERTX(socksfd->state.command == -1 || socksfd->state.command == SOCKS_BIND || socksfd->state.command == SOCKS_CONNECT || socksfd->state.command == SOCKS_UDPASSOCIATE); if (socks_addfd(clientfd) != 0) serrx(EXIT_FAILURE, "%s: error adding descriptor %d", function, clientfd); if (socksfdc < dc) { /* init/reallocate */ sigset_t oldmask; if (socksfdinit.control == 0) { /* not initialized */ socksfdinit.control = -1; /* other members have ok default value. */ } if (socks_sigblock(&oldmask) != 0) return NULL; if ((socksfdv = (struct socksfd_t *)realloc(socksfdv, sizeof(*socksfdv) * dc)) == NULL) serrx(EXIT_FAILURE, "%s: %s", function, NOMEM); /* init new objects */ while (socksfdc < dc) socksfdv[socksfdc++] = socksfdinit; if (sigprocmask(SIG_SETMASK, &oldmask, NULL) != 0) swarn("%s: sigprocmask()", function); } switch (socksfd->state.command) { case SOCKS_BIND: #if SOCKS_TRYHARDER if ((socksfd->state.lock = socks_mklock(SOCKS_LOCKFILE)) == -1) swarn("%s: socks_mklock()", function); #endif break; } socksfdv[clientfd] = *socksfd; socksfdv[clientfd].allocated = 1; return &socksfdv[clientfd]; } struct socksfd_t * socks_getaddr(d) unsigned int d; { if (socks_isaddr(d)) return &socksfdv[d]; return NULL; } void socks_rmaddr(d) unsigned int d; { /* const char *function = "socks_rmaddr()"; */ #if 0 /* DEBUG */ if (!socks_isaddr(d) || (!socksfdv[d].state.command != -1 && !socksfdv[d].state.system)) slog(LOG_DEBUG, "%s: %d", function, d); #endif if (!socks_isaddr(d)) return; socks_rmfd(d); switch (socksfdv[d].state.version) { case MSPROXY_V2: if (socksfdv[d].control != -1) close(socksfdv[d].control); break; case SOCKS_V4: case SOCKS_V5: case HTTP_V1_0: if (!socksfdv[d].state.system) switch (socksfdv[d].state.command) { case SOCKS_BIND: if (socksfdv[d].control == -1 || socksfdv[d].control == (int)d) break; /* * If we are using the bind extension it's possible * that this controlconnection is shared with other * (accept()'ed) addresses, if so we must leave it * open for the other connections. */ if (socks_addrcontrol(&socksfdv[d].local, &socksfdv[d].remote) == -1) break; close(socksfdv[d].control); break; case SOCKS_CONNECT: break; /* no separate controlconnection. */ case SOCKS_UDPASSOCIATE: if (socksfdv[d].control != -1) close(socksfdv[d].control); break; default: SERRX(socksfdv[d].state.command); } switch (socksfdv[d].state.command) { case SOCKS_BIND: #if SOCKS_TRYHARDER if (close(socksfdv[d].state.lock) != 0) swarn("socks_rmaddr()"); #endif break; } } socksfdv[d] = socksfdinit; } int socks_isaddr(d) unsigned int d; { if (d < socksfdc && socksfdv[d].allocated) return 1; return 0; } int socks_addrisok(s) unsigned int s; { const char *function = "socks_addrisok()"; const int errno_s = errno; int matched; sigset_t oldmask; if (socks_sigblock(&oldmask) != 0) return 0; matched = 0; do { struct socksfd_t *socksfd; struct sockaddr local; socklen_t locallen; locallen = sizeof(local); if (getsockname((int)s, &local, &locallen) != 0) break; socksfd = socks_getaddr(s); if (socksfd != NULL) { if (!sockaddrareeq(&local, &socksfd->local)) break; /* check remote endpoint too? */ matched = 1; } else { /* unknown descriptor. Try to check whether it's a dup. */ int duped; if ((duped = socks_addrmatch(&local, NULL, NULL)) != -1) { struct socksfd_t nsocksfd; socksfd = socksfddup(socks_getaddr((unsigned int)duped), &nsocksfd); if (socksfd == NULL) { swarn("%s: socksfddup()", function); break; } socks_addaddr(s, socksfd); matched = 1; } break; } /* CONSTCOND */ } while (0); if (sigprocmask(SIG_SETMASK, &oldmask, NULL) != 0) swarn("%s: sigprocmask()", function); errno = errno_s; return matched; } int socks_addrcontrol(local, remote) const struct sockaddr *local; const struct sockaddr *remote; { unsigned int i; for (i = 0; i < socksfdc; ++i) { struct sockaddr localcontrol, remotecontrol; if (!socks_isaddr((unsigned int)i)) continue; if (local != NULL) { socklen_t len = sizeof(localcontrol); if (getsockname(socksfdv[i].control, &localcontrol, &len) != 0) continue; if (!sockaddrareeq(local, &localcontrol)) continue; } if (remote != NULL) { socklen_t len = sizeof(remotecontrol); if (getpeername(socksfdv[i].control, &remotecontrol, &len) != 0) continue; if (!sockaddrareeq(remote, &remotecontrol)) continue; } return i; } return -1; } int socks_addrmatch(local, remote, state) const struct sockaddr *local; const struct sockaddr *remote; const struct socksstate_t *state; { unsigned int i; for (i = 0; i < socksfdc; ++i) { if (!socks_isaddr(i)) continue; /* * only compare fields that have a valid value in request to compare * against. */ if (local != NULL) if (!sockaddrareeq(local, &socksfdv[i].local)) continue; if (remote != NULL) if (!sockaddrareeq(remote, &socksfdv[i].remote)) continue; if (state != NULL) { if (state->version != -1) if (state->version != socksfdv[i].state.version) continue; if (state->command != -1) if (state->command != socksfdv[i].state.command) continue; if (state->inprogress != -1) if (state->inprogress != socksfdv[i].state.inprogress) continue; if (state->acceptpending != -1) if (state->acceptpending != socksfdv[i].state.acceptpending) continue; } return i; } return -1; } int socks_addfd(d) unsigned int d; { const char *function = "socks_addfd()"; if (d + 1 < d) /* integer overflow. */ return -1; if (d >= dc) { /* init/reallocate */ sigset_t oldmask; int *newfdv; unsigned int newfdc; if (socks_sigblock(&oldmask) != 0) return -1; newfdc = MAX(d + 1, (unsigned int)getdtablesize()); if ((newfdv = (int *)realloc(dv, sizeof(*dv) * newfdc)) == NULL) serrx(EXIT_FAILURE, "%s: %s", function, NOMEM); dv = newfdv; /* init all to -1, a illegal value for a d. */ while (dc < newfdc) dv[dc++] = -1; if (sigprocmask(SIG_SETMASK, &oldmask, NULL) != 0) swarn("%s: sigprocmask()", function); } dv[d] = d; return 0; } int socks_isfd(d) unsigned int d; { if (d >= dc || dv[d] == -1) return 0; return 1; } void socks_rmfd(d) unsigned int d; { if (socks_isfd(d)) dv[d] = -1; } struct socksfd_t * socksfddup(old, new) const struct socksfd_t *old; struct socksfd_t *new; { *new = *old; /* init most stuff. */ switch (old->state.command) { case SOCKS_BIND: case SOCKS_UDPASSOCIATE: if ((new->control = socketoptdup(old->control)) == -1) return NULL; break; case SOCKS_CONNECT: /* only descriptor for connect is the one client has. */ break; default: SERRX(old->state.command); } return new; } static int socks_sigblock(oldmask) sigset_t *oldmask; { const char *function = "socks_sigblock()"; sigset_t newmask; /* * block signals that might change socksfd. */ sigemptyset(&newmask); sigaddset(&newmask, SIGIO); sigaddset(&newmask, SIGCHLD); if (sigprocmask(SIG_BLOCK, &newmask, oldmask) != 0) { swarn("%s: sigprocmask()", function); return -1; } return 0; } #if 0 void ccinit(void) { const char *function = "cc()"; struct sigaction sigact; struct itimerval itimer; slog(LOG_DEBUG, function); if (sigaction(SIGALRM, NULL, &sigact) != 0) { swarn("%s: sigaction(SIGALRM)", function); return; } if (sigact.sa_handler != SIG_DFL && sigact.sa_handler != SIG_IGN) { swarnx("%s: could not install signalhandler for SIGALRM, already set", function); return; } sigemptyset(&sigact.sa_mask); sigact.sa_flags = SA_RESTART; sigact.sa_handler = cc_socksfdv; if (sigaction(SIGALRM, &sigact, NULL) != 0) { swarn("%s: sigaction(SIGALRM)", function); return; } itimer.it_interval.tv_sec = 1; itimer.it_interval.tv_usec = 0; itimer.it_value.tv_sec = 1; itimer.it_value.tv_usec = 1; if (setitimer(ITIMER_REAL, &itimer, NULL) != 0) swarn("%s: setitimer()", function); } #endif #if DIAGNOSTIC void cc_socksfdv(sig) int sig; { unsigned int i; for (i = 0; i < socksfdc; ++i) { if (!socksfdv[i].allocated) continue; if (socksfdv[i].state.system) SERRX(i); } } #endif /* DIAGNOSTIC */ dante-1.1.19.dfsg/lib/Rgetsockname.c0000644000175000017500000001114510175146325015640 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: Rgetsockname.c,v 1.44 2005/01/24 10:24:21 karls Exp $"; int Rgetsockname(s, name, namelen) int s; struct sockaddr *name; socklen_t *namelen; { const char *function = "Rgetsockname()"; struct socksfd_t *socksfd; struct sockaddr *addr; clientinit(); slog(LOG_DEBUG, "%s", function); if (!socks_addrisok((unsigned int)s)) { socks_rmaddr((unsigned int)s); return getsockname(s, name, namelen); } socksfd = socks_getaddr((unsigned int)s); SASSERTX(socksfd != NULL); switch (socksfd->state.command) { case SOCKS_CONNECT: { sigset_t set, oset; /* for non-blocking connect, we get a SIGCHLD upon completion. */ sigemptyset(&set); sigaddset(&set, SIGCHLD); if (sigprocmask(SIG_BLOCK, &set, &oset) != 0) { swarn("%s: sigprocmask()", function); return -1; } if (socksfd->state.inprogress) { /* non-blocking connect. */ /* * this is bad. We don't know what address the socksserver * will use on our behalf yet. Lets wait for a SIGCHLD * and then retry, unless client is blocking that signal, * then we can only hope the client will retry on ENOBUFS, * but we are probably screwed anyway. */ if (sigismember(&oset, SIGCHLD)) { slog(LOG_DEBUG, "%s: SIGCHLD blocked by client", function); if (sigprocmask(SIG_BLOCK, &oset, NULL) != 0) { swarn("%s: sigprocmask()", function); return -1; } errno = ENOBUFS; return -1; } sigsuspend(&oset); if (sigprocmask(SIG_BLOCK, &oset, NULL) != 0) { swarn("%s: sigprocmask()", function); return -1; } return Rgetsockname(s, name, namelen); } if (sigprocmask(SIG_SETMASK, &oset, NULL) != 0) swarn("%s: sigprocmask()", function); addr = &socksfd->remote; break; } case SOCKS_BIND: addr = &socksfd->remote; break; case SOCKS_UDPASSOCIATE: swarnx("%s: getsockname() on udp sockets is not supported by the " "socks protocol, trying to fake it.", function); /* * some clients might call this for no good reason, try to * help them by returning a invalid address; if they are * going to use it for anything, they will fail later though. */ addr = &socksfd->remote; /* LINTED pointer casts may be troublesome */ TOIN(addr)->sin_family = AF_INET; /* LINTED pointer casts may be troublesome */ TOIN(addr)->sin_addr.s_addr = htonl(INADDR_ANY); /* LINTED pointer casts may be troublesome */ TOIN(addr)->sin_port = htons(0); break; default: SERRX(socksfd->state.command); } *namelen = MIN(*namelen, (socklen_t)sizeof(*addr)); memcpy(name, addr, (size_t)*namelen); return 0; } dante-1.1.19.dfsg/lib/protocol.c0000755000175000017500000001152607700305333015061 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: protocol.c,v 1.55 2003/07/01 13:21:31 michaels Exp $"; unsigned char * sockshost2mem(host, mem, version) const struct sockshost_t *host; unsigned char *mem; int version; { switch (version) { case SOCKS_V4: case SOCKS_V4REPLY_VERSION: SASSERTX(host->atype == SOCKS_ADDR_IPV4); /* DSTPORT */ memcpy(mem, &host->port, sizeof(host->port)); mem += sizeof(host->port); /* DSTIP */ memcpy(mem, &host->addr.ipv4, sizeof(host->addr.ipv4)); mem += sizeof(host->addr.ipv4); break; case SOCKS_V5: /* ATYP */ memcpy(mem, &host->atype, sizeof(host->atype)); mem += sizeof(host->atype); switch (host->atype) { case SOCKS_ADDR_IPV4: memcpy(mem, &host->addr.ipv4.s_addr, sizeof(host->addr.ipv4.s_addr)); mem += sizeof(host->addr.ipv4.s_addr); break; case SOCKS_ADDR_IPV6: memcpy(mem, &host->addr.ipv6, sizeof(host->addr.ipv6)); mem += sizeof(host->addr.ipv6); break; case SOCKS_ADDR_DOMAIN: /* first byte gives length of rest. */ *mem = (unsigned char)strlen(host->addr.domain); memcpy(mem + 1, host->addr.domain, (size_t)*mem); mem += *mem + 1; break; default: SERRX(host->atype); } /* DST.PORT */ memcpy(mem, &host->port, sizeof(host->port)); mem += sizeof(host->port); break; default: SERRX(version); } return mem; } const unsigned char * mem2sockshost(host, mem, len, version) struct sockshost_t *host; const unsigned char *mem; size_t len; int version; { const char *function = "mem2sockshost()"; switch (version) { case SOCKS_V5: if (len < sizeof(host->atype)) return NULL; memcpy(&host->atype, mem, sizeof(host->atype)); mem += sizeof(host->atype); len -= sizeof(host->atype); switch (host->atype) { case SOCKS_ADDR_IPV4: if (len < sizeof(host->addr.ipv4)) return NULL; memcpy(&host->addr.ipv4, mem, sizeof(host->addr.ipv4)); mem += sizeof(host->addr.ipv4); len -= sizeof(host->addr.ipv4); break; case SOCKS_ADDR_DOMAIN: { size_t domainlen = (size_t)*mem; mem += sizeof(*mem); OCTETIFY(domainlen); if (len < domainlen + 1) /* +1 for NUL to be added. */ return NULL; SASSERTX(domainlen < sizeof(host->addr.domain)); memcpy(host->addr.domain, mem, domainlen); host->addr.domain[domainlen] = NUL; mem += domainlen; len -= domainlen + 1; /* +1 for added NUL. */ break; } case SOCKS_ADDR_IPV6: slog(LOG_INFO, "%s: IPv6 not supported", function); return NULL; default: slog(LOG_INFO, "%s: unknown atype field: %d", function, host->atype); return NULL; } if (len < sizeof(host->port)) return NULL; memcpy(&host->port, mem, sizeof(host->port)); mem += sizeof(host->port); len -= sizeof(host->port); break; default: SERRX(version); } return mem; } dante-1.1.19.dfsg/lib/config_scan.c0000644000175000017500000032762610351604126015477 0ustar roamroam#define yy_create_buffer socks_yy_create_buffer #define yy_delete_buffer socks_yy_delete_buffer #define yy_scan_buffer socks_yy_scan_buffer #define yy_scan_string socks_yy_scan_string #define yy_scan_bytes socks_yy_scan_bytes #define yy_flex_debug socks_yy_flex_debug #define yy_init_buffer socks_yy_init_buffer #define yy_flush_buffer socks_yy_flush_buffer #define yy_load_buffer_state socks_yy_load_buffer_state #define yy_switch_to_buffer socks_yy_switch_to_buffer #define yyin socks_yyin #define yyleng socks_yyleng #define yylex socks_yylex #define yyout socks_yyout #define yyrestart socks_yyrestart #define yytext socks_yytext #define yylineno socks_yylineno #line 20 "config_scan.c" /* $OpenBSD: flex.skl,v 1.8 2004/02/09 11:38:31 espie Exp $ */ /* A lexical scanner generated by flex */ /* Scanner skeleton version: * $Header: /cvs/src/usr.bin/lex/flex.skl,v 1.8 2004/02/09 11:38:31 espie Exp $ */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #include #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include #include /* Use prototypes in function declarations. */ #define YY_USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ #ifdef __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch #pragma warn -use #include #include #define YY_USE_CONST #define YY_USE_PROTOS #endif #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define YY_BUF_SIZE 16384 typedef struct yy_buffer_state *YY_BUFFER_STATE; extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yyless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int yy_size_t; struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define YY_CURRENT_BUFFER yy_current_buffer /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) #define YY_USES_REJECT #define yywrap() 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yytext_ptr = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_NUM_RULES 84 #define YY_END_OF_BUFFER 85 static yyconst short int yy_acclist[750] = { 0, 26, 26, 85, 83, 84, 79, 83, 84, 81, 84, 80, 83, 84, 78, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 21, 83, 84, 78, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 83, 84, 25, 83, 84, 83, 84, 83, 84, 83, 84, 26, 83, 84, 26, 79, 83, 84, 26, 80, 83, 84, 26, 78, 83, 84, 26, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 23, 83, 84, 23, 80, 83, 84, 23, 78, 83, 84, 23, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 19, 78, 83, 84, 12, 83, 84, 12, 83, 84, 12, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 24, 83, 84, 24, 80, 83, 84, 24, 78, 83, 84, 24, 83, 84, 20, 78, 83, 84, 18, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 79, 80, 80, 78, 82, 44, 21, 78, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 44, 22, 22, 26, 26, 79, 26, 80, 26, 80, 26, 26, 78, 23, 23, 80, 23, 23, 78, 12, 19, 78, 24, 24, 80, 24, 24, 78, 20, 78, 18, 18, 78, 73, 45, 21, 21, 21, 78, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 73, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 45, 26, 26, 78, 23, 23, 78, 70, 19, 78, 24, 24, 78, 20, 78, 29, 30, 78, 62, 43, 49, 72, 52, 21, 21, 78, 22, 22, 62, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 43, 22, 22, 22, 22, 22, 22, 22, 22, 49, 22, 22, 72, 22, 22, 22, 22, 22, 22, 22, 22, 22, 52, 11, 5, 26, 26, 26, 78, 14, 23, 23, 23, 78, 66, 19, 78, 24, 24, 24, 78, 20, 78, 31, 71, 32, 33, 48, 21, 22, 22, 71, 22, 22, 22, 22, 22, 22, 32, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 21, 22, 22, 22, 22, 22, 22, 22, 33, 48, 22, 22, 26, 26, 16, 23, 23, 19, 78, 24, 24, 20, 78, 63, 64, 22, 22, 63, 22, 22, 22, 10, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 64, 21, 22, 22, 22, 22, 22, 22, 22, 22, 21, 21, 21, 26, 26, 23, 23, 67, 69, 24, 24, 77, 39, 74, 35, 22, 21, 22, 22, 39, 22, 22, 22, 22, 22, 22, 22, 74, 22, 22, 22, 21, 22, 22, 22, 22, 22, 22, 22, 22, 35, 21, 21, 21, 6, 26, 77, 26, 13, 23, 77, 23, 24, 77, 24, 77, 50, 46, 38, 40, 59, 22, 21, 22, 22, 22, 22, 22, 50, 22, 46, 22, 22, 22, 22, 21, 22, 22, 38, 22, 22, 40, 22, 22, 22, 59, 21, 21, 21, 9, 26, 77, 23, 77, 68, 1, 2, 24, 77, 77, 41, 61, 56, 37, 58, 22, 41, 21, 22, 22, 22, 22, 61, 22, 22, 22, 22, 56, 22, 22, 37, 22, 21, 22, 22, 22, 22, 58, 21, 21, 21, 8, 26, 77, 23, 77, 4, 24, 77, 28, 21, 22, 22, 22, 21, 22, 22, 22, 21, 22, 22, 22, 21, 21, 21, 15, 3, 27, 42, 21, 22, 22, 22, 21, 22, 22, 22, 42, 21, 22, 22, 22, 21, 21, 21, 17, 65, 76, 55, 21, 22, 65, 22, 22, 21, 22, 22, 22, 76, 22, 21, 22, 22, 22, 21, 55, 21, 21, 7, 51, 57, 76, 76, 36, 21, 51, 22, 57, 22, 21, 22, 21, 22, 76, 22, 76, 21, 22, 22, 36, 22, 21, 21, 60, 75, 22, 60, 21, 22, 21, 21, 21, 22, 75, 22, 21, 21, 34, 53, 21, 22, 21, 75, 22, 34, 21, 21, 53, 21, 22, 21, 47, 47, 21, 47, 22, 47, 21, 54, 21, 54 } ; static yyconst short int yy_accept[948] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 6, 9, 11, 14, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 107, 110, 112, 114, 116, 119, 123, 127, 131, 134, 136, 138, 140, 142, 145, 149, 153, 156, 158, 160, 162, 164, 166, 168, 172, 175, 178, 181, 183, 185, 187, 189, 191, 193, 195, 198, 202, 206, 209, 213, 216, 218, 220, 222, 224, 225, 226, 227, 227, 228, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 230, 230, 230, 230, 230, 231, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 260, 261, 262, 262, 262, 262, 262, 263, 265, 267, 269, 270, 272, 272, 272, 272, 272, 272, 273, 275, 276, 278, 278, 278, 278, 278, 278, 279, 281, 281, 281, 281, 281, 282, 284, 285, 287, 289, 290, 291, 291, 291, 291, 291, 291, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 330, 330, 330, 330, 330, 331, 333, 333, 333, 333, 333, 333, 334, 336, 336, 336, 337, 337, 337, 339, 339, 339, 339, 340, 342, 344, 344, 344, 344, 345, 346, 346, 346, 347, 347, 348, 348, 348, 348, 348, 348, 348, 348, 348, 349, 349, 349, 349, 349, 349, 349, 349, 350, 350, 350, 351, 351, 351, 351, 351, 351, 351, 351, 351, 352, 353, 354, 355, 356, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 369, 370, 371, 372, 373, 374, 375, 376, 378, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 391, 392, 393, 393, 393, 393, 394, 395, 397, 397, 398, 398, 398, 398, 399, 400, 402, 402, 403, 403, 403, 405, 405, 405, 405, 406, 407, 409, 411, 411, 411, 412, 412, 412, 412, 413, 413, 413, 413, 413, 413, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 416, 416, 416, 416, 417, 418, 420, 421, 422, 423, 424, 425, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 447, 448, 449, 449, 449, 449, 449, 449, 450, 451, 451, 451, 452, 452, 453, 454, 454, 454, 454, 456, 456, 456, 456, 457, 458, 460, 460, 460, 460, 460, 460, 460, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 463, 463, 465, 466, 467, 468, 470, 471, 472, 473, 474, 475, 476, 477, 478, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 492, 492, 492, 492, 493, 494, 494, 494, 494, 495, 496, 497, 498, 498, 498, 498, 498, 499, 500, 500, 500, 501, 501, 501, 501, 501, 502, 502, 502, 502, 502, 502, 502, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 504, 504, 504, 504, 505, 506, 507, 509, 510, 511, 512, 513, 514, 515, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 530, 531, 532, 533, 533, 534, 534, 534, 536, 537, 538, 538, 538, 540, 541, 541, 541, 541, 541, 543, 544, 544, 544, 545, 545, 545, 545, 545, 545, 545, 546, 547, 547, 547, 547, 547, 547, 547, 548, 548, 549, 549, 549, 550, 550, 550, 550, 551, 552, 553, 554, 555, 556, 558, 560, 561, 562, 563, 564, 565, 566, 568, 569, 571, 572, 573, 575, 576, 577, 578, 578, 578, 579, 581, 581, 581, 583, 584, 584, 584, 585, 586, 588, 588, 588, 589, 590, 590, 590, 590, 590, 591, 591, 592, 592, 593, 593, 593, 593, 593, 593, 594, 594, 594, 594, 596, 597, 598, 599, 600, 602, 602, 602, 603, 604, 605, 607, 608, 610, 611, 612, 613, 614, 615, 617, 618, 619, 620, 621, 621, 623, 623, 623, 625, 626, 626, 628, 628, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 630, 631, 632, 633, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 644, 645, 645, 646, 647, 647, 647, 647, 647, 647, 647, 648, 648, 648, 648, 648, 648, 648, 648, 649, 650, 651, 652, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 664, 664, 665, 665, 666, 666, 666, 666, 666, 667, 667, 667, 667, 667, 668, 668, 668, 669, 671, 672, 673, 673, 674, 675, 675, 675, 676, 678, 679, 680, 681, 682, 683, 685, 686, 687, 688, 689, 690, 690, 690, 691, 692, 692, 692, 693, 693, 693, 693, 695, 697, 698, 698, 699, 700, 701, 703, 705, 706, 707, 709, 710, 711, 712, 713, 713, 713, 714, 714, 714, 714, 716, 716, 717, 718, 719, 720, 721, 723, 724, 725, 726, 726, 727, 727, 728, 728, 729, 730, 732, 734, 735, 737, 737, 737, 737, 738, 739, 740, 741, 741, 742, 744, 746, 747, 748, 750, 750 } ; static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 16, 17, 1, 18, 19, 20, 1, 1, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 1, 22, 1, 1, 23, 1, 24, 25, 26, 27, 28, 29, 30, 31, 32, 21, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 21, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst int yy_meta[48] = { 0, 1, 2, 3, 1, 1, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 1, 1, 1, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 4, 4, 4, 4, 4, 4, 4 } ; static yyconst short int yy_base[991] = { 0, 0, 0, 47, 0, 2685, 2684, 78, 0, 83, 98, 2704, 2703, 140, 161, 108, 152, 183, 204, 193, 194, 234, 0, 2702, 2701, 224, 225, 269, 290, 312, 0, 81, 94, 115, 246, 351, 359, 2717, 2724, 94, 2724, 0, 2709, 2712, 105, 191, 2686, 2667, 2672, 65, 96, 103, 2674, 141, 110, 163, 2673, 2668, 2676, 2700, 0, 369, 380, 392, 386, 387, 398, 401, 413, 414, 428, 429, 433, 440, 446, 447, 451, 463, 403, 2724, 2674, 2668, 2677, 0, 199, 0, 491, 2700, 2665, 135, 2661, 2663, 0, 144, 501, 2696, 2657, 2660, 2672, 2666, 2653, 2674, 2685, 2672, 2724, 2671, 2650, 140, 245, 2660, 2645, 2645, 2648, 0, 210, 511, 2681, 2676, 527, 2645, 2657, 2654, 2652, 256, 0, 0, 0, 2671, 2724, 2641, 2640, 2638, 2642, 2641, 154, 2647, 2629, 2633, 2627, 2626, 2642, 209, 2620, 2623, 2628, 167, 2626, 267, 2619, 2626, 2634, 2724, 2631, 2634, 2650, 0, 568, 576, 584, 594, 0, 588, 589, 592, 595, 606, 607, 610, 623, 619, 626, 630, 637, 641, 652, 648, 657, 663, 664, 675, 680, 691, 687, 703, 707, 712, 719, 716, 2616, 2619, 2618, 2615, 0, 426, 0, 0, 745, 755, 2616, 2609, 2609, 2609, 2611, 0, 294, 763, 771, 2606, 2610, 2610, 2618, 2615, 2724, 2635, 2602, 2598, 2601, 2612, 0, 412, 779, 787, 2630, 0, 0, 234, 2603, 2597, 2596, 2626, 2625, 2604, 2603, 2603, 2594, 2599, 401, 2590, 2582, 2596, 2588, 2594, 2589, 2575, 2595, 2581, 2576, 2585, 2587, 393, 2573, 412, 2581, 2575, 2570, 2568, 2581, 2577, 2567, 2724, 797, 0, 807, 815, 808, 809, 813, 814, 825, 820, 832, 837, 849, 850, 855, 864, 838, 861, 867, 870, 876, 881, 890, 896, 895, 899, 908, 914, 915, 920, 929, 934, 935, 940, 2564, 2578, 2568, 469, 969, 979, 2567, 2578, 2575, 2563, 2555, 989, 997, 2560, 2547, 2724, 2550, 2514, 2538, 2503, 2498, 2502, 1007, 1015, 2525, 2497, 2490, 2497, 2724, 2724, 0, 2517, 2513, 2472, 2724, 2481, 2485, 2473, 2484, 2481, 2474, 2467, 419, 2724, 2455, 2456, 2448, 2446, 2433, 2443, 2433, 2724, 2426, 2431, 2724, 2418, 2403, 2409, 2407, 2404, 2398, 2384, 2383, 2412, 1023, 1031, 2409, 1024, 1025, 1028, 1039, 1040, 1043, 1046, 1055, 1058, 1067, 1062, 1071, 1076, 1080, 1085, 1089, 1094, 1106, 1107, 1111, 2373, 1118, 1123, 1124, 1130, 1135, 1136, 1148, 1155, 1154, 1161, 1167, 2724, 2370, 2374, 2327, 2338, 1193, 1203, 1211, 2337, 2724, 2327, 2323, 2333, 1219, 1227, 1235, 2312, 2724, 2337, 2310, 0, 2322, 2261, 2253, 1243, 1251, 1259, 0, 2251, 2258, 2724, 2283, 2282, 2248, 2724, 2272, 2234, 2239, 2168, 2180, 2724, 2164, 2167, 2166, 2173, 2168, 2164, 2146, 2132, 2131, 2127, 2110, 2118, 2103, 2111, 2094, 2103, 2724, 2085, 2080, 599, 2111, 1139, 1252, 1270, 1255, 1256, 1259, 1274, 1271, 1275, 1286, 1287, 1290, 1301, 1304, 1307, 1308, 1313, 1319, 2088, 1324, 1331, 1328, 1343, 1344, 1348, 1349, 1355, 1361, 656, 2087, 2086, 2064, 2066, 1396, 2095, 2075, 2064, 2724, 2059, 1406, 2090, 2063, 2080, 2062, 2067, 2029, 2025, 2047, 1416, 2062, 2015, 1983, 1981, 0, 2008, 1985, 1967, 1958, 1964, 1941, 1928, 1937, 1943, 1942, 1920, 1916, 1897, 1895, 1891, 2724, 1879, 1874, 1880, 1876, 1889, 1886, 1877, 1863, 1858, 1867, 1851, 1845, 1367, 1848, 1409, 1413, 1366, 1414, 1418, 1425, 1429, 1430, 1434, 1441, 1446, 1450, 1453, 1457, 1842, 1466, 1469, 1473, 1485, 1480, 1491, 1492, 1496, 1849, 1841, 1827, 1828, 1821, 1825, 1827, 1530, 1540, 1792, 1794, 1804, 1548, 1556, 2724, 2724, 1786, 1808, 1767, 1765, 1564, 1572, 1773, 1753, 0, 1782, 1745, 1762, 1711, 2724, 1706, 1688, 1692, 1694, 1692, 1671, 2724, 1676, 1667, 1650, 1635, 1646, 1643, 1638, 1622, 1625, 1634, 1610, 2724, 1622, 1601, 1608, 1565, 1614, 1503, 1566, 1569, 1572, 1578, 1584, 1585, 1589, 1596, 1601, 1605, 1610, 1587, 1617, 1621, 1622, 1626, 1633, 1642, 1638, 1649, 1602, 1584, 1592, 1588, 2724, 1585, 1558, 1675, 1588, 2724, 1564, 1549, 1683, 1541, 1508, 0, 1511, 284, 1691, 1526, 1487, 1477, 0, 1490, 1456, 1457, 1464, 1463, 1456, 0, 2724, 1444, 1452, 1430, 1432, 1435, 1434, 2724, 1413, 2724, 1411, 1399, 2724, 1391, 1397, 1390, 1684, 1378, 1685, 1688, 1689, 1700, 1736, 1701, 1760, 1761, 1764, 1767, 1382, 1779, 1776, 1783, 1788, 1792, 1795, 1799, 1359, 1359, 1352, 1339, 1352, 2724, 1827, 1348, 1338, 1835, 2724, 1360, 1317, 2724, 2724, 1843, 1333, 1313, 2724, 2724, 1312, 1299, 1282, 1280, 2724, 1273, 2724, 1280, 2724, 1260, 1259, 1254, 1244, 1241, 2724, 1171, 1160, 1165, 1836, 1164, 1840, 1841, 1845, 1852, 1880, 1154, 1912, 1150, 1873, 1874, 1877, 1878, 1906, 1158, 1907, 1912, 1913, 1919, 1141, 1126, 1133, 2724, 1129, 0, 1109, 1112, 0, 2724, 1125, 0, 1102, 2724, 1105, 1092, 1095, 1096, 1085, 1084, 1070, 1079, 1070, 1071, 1043, 1060, 1049, 1034, 1038, 1924, 1928, 1931, 451, 1018, 1940, 1944, 1947, 1026, 1951, 1958, 1962, 1029, 1019, 1016, 973, 2724, 961, 2724, 2724, 953, 950, 931, 934, 928, 943, 2724, 919, 926, 906, 898, 896, 882, 897, 887, 1971, 1965, 1976, 454, 874, 1977, 2019, 1982, 875, 2043, 2044, 2048, 871, 853, 858, 848, 2724, 847, 2724, 820, 822, 839, 843, 834, 826, 799, 781, 779, 2724, 731, 722, 721, 2055, 2059, 2060, 495, 721, 2064, 2106, 2129, 2152, 2167, 0, 718, 2085, 2108, 2161, 0, 697, 698, 2724, 2724, 2724, 684, 682, 705, 703, 678, 680, 2724, 669, 668, 673, 0, 2111, 2162, 575, 651, 2165, 2207, 2246, 2255, 650, 2249, 2166, 2250, 636, 638, 2724, 631, 628, 2724, 602, 574, 549, 2254, 450, 512, 2261, 0, 2295, 502, 2319, 2320, 501, 472, 452, 2724, 446, 2724, 612, 432, 2323, 0, 2324, 412, 0, 377, 384, 578, 352, 2335, 349, 2724, 282, 250, 0, 2338, 249, 2724, 0, 2724, 2372, 2381, 2390, 2399, 2404, 2408, 2414, 2420, 2429, 2438, 2447, 2456, 2461, 2468, 2477, 2482, 260, 2485, 2489, 2492, 2496, 2499, 2506, 2511, 2514, 2518, 2523, 2526, 250, 2529, 233, 184, 2532, 153, 2535, 141, 2542, 90, 2551, 2554, 2563, 2572, 2581, 2590 } ; static yyconst short int yy_def[991] = { 0, 946, 1, 946, 3, 1, 1, 1, 7, 7, 7, 7, 7, 947, 947, 7, 7, 948, 948, 7, 7, 7, 21, 7, 7, 7, 7, 949, 949, 946, 29, 7, 7, 7, 7, 29, 29, 946, 946, 946, 946, 950, 951, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 952, 953, 952, 954, 954, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 946, 946, 946, 946, 946, 955, 955, 956, 955, 955, 946, 946, 946, 946, 957, 958, 957, 957, 946, 946, 946, 946, 946, 946, 959, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 960, 961, 960, 960, 962, 946, 946, 946, 946, 946, 946, 950, 950, 963, 964, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 952, 953, 965, 953, 61, 61, 966, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 946, 946, 946, 946, 955, 955, 956, 956, 955, 955, 946, 946, 946, 946, 946, 957, 958, 957, 94, 946, 946, 946, 946, 946, 946, 967, 946, 946, 946, 946, 960, 961, 960, 115, 968, 969, 118, 946, 946, 946, 946, 970, 971, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 965, 972, 965, 61, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 946, 946, 946, 946, 955, 955, 946, 946, 946, 946, 946, 94, 94, 946, 946, 946, 946, 946, 973, 946, 946, 946, 115, 115, 974, 946, 946, 946, 946, 946, 975, 976, 971, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 972, 262, 263, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 953, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 946, 946, 946, 946, 946, 955, 955, 955, 946, 946, 946, 946, 946, 957, 305, 957, 946, 946, 946, 946, 977, 946, 946, 946, 960, 316, 960, 978, 946, 946, 946, 979, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 260, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 63, 63, 63, 63, 63, 953, 946, 946, 946, 946, 955, 955, 946, 946, 946, 946, 957, 957, 946, 946, 946, 971, 946, 946, 946, 960, 960, 971, 946, 946, 980, 981, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 63, 953, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 63, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 955, 955, 946, 946, 946, 957, 494, 946, 946, 946, 946, 946, 946, 960, 503, 946, 946, 982, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 63, 260, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 63, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 955, 955, 946, 946, 946, 957, 957, 946, 983, 946, 946, 960, 960, 946, 946, 984, 946, 946, 946, 946, 946, 946, 985, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 63, 260, 63, 63, 63, 63, 946, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 63, 63, 63, 260, 260, 260, 946, 946, 946, 955, 946, 946, 957, 946, 946, 946, 946, 946, 960, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 63, 260, 63, 63, 63, 63, 263, 953, 747, 986, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 260, 260, 260, 946, 946, 955, 946, 946, 957, 946, 946, 960, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 260, 63, 63, 63, 747, 260, 63, 63, 63, 260, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 987, 946, 946, 946, 946, 946, 946, 946, 946, 260, 63, 63, 63, 747, 260, 63, 946, 63, 260, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 946, 946, 946, 987, 988, 946, 946, 946, 946, 946, 946, 946, 260, 63, 63, 63, 747, 260, 63, 989, 990, 989, 988, 831, 260, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 946, 988, 988, 946, 946, 946, 946, 946, 946, 260, 63, 63, 747, 260, 63, 946, 988, 988, 260, 63, 63, 63, 260, 260, 946, 946, 946, 946, 946, 946, 946, 63, 747, 260, 63, 894, 946, 260, 63, 63, 260, 260, 946, 946, 946, 946, 747, 260, 63, 260, 63, 260, 260, 946, 946, 747, 260, 63, 260, 946, 946, 747, 260, 63, 260, 946, 260, 0, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946 } ; static yyconst short int yy_nxt[2772] = { 0, 38, 39, 40, 38, 41, 38, 38, 38, 42, 42, 42, 42, 42, 42, 42, 42, 38, 38, 38, 38, 38, 43, 38, 38, 44, 45, 46, 47, 48, 38, 38, 49, 38, 50, 51, 52, 38, 53, 38, 54, 55, 56, 57, 58, 38, 38, 38, 38, 39, 40, 38, 41, 59, 60, 38, 61, 61, 61, 61, 61, 61, 61, 61, 38, 38, 38, 38, 62, 43, 38, 62, 63, 64, 65, 66, 67, 62, 62, 68, 62, 69, 70, 71, 62, 72, 62, 73, 74, 75, 76, 77, 62, 62, 62, 79, 123, 721, 38, 124, 38, 138, 139, 38, 38, 38, 38, 38, 80, 81, 38, 38, 38, 38, 38, 38, 38, 119, 38, 38, 38, 38, 38, 80, 81, 38, 82, 142, 140, 129, 119, 143, 38, 141, 88, 89, 90, 130, 147, 131, 91, 82, 84, 40, 120, 85, 125, 148, 659, 86, 86, 86, 86, 86, 86, 86, 86, 121, 122, 199, 586, 125, 87, 84, 40, 145, 85, 200, 212, 38, 86, 86, 86, 86, 86, 86, 86, 86, 88, 89, 90, 146, 212, 87, 91, 39, 40, 149, 93, 236, 237, 505, 94, 94, 94, 94, 94, 94, 94, 94, 38, 193, 249, 150, 194, 95, 39, 40, 250, 93, 38, 38, 125, 94, 94, 94, 94, 94, 94, 94, 94, 38, 132, 96, 96, 133, 95, 125, 134, 97, 97, 98, 98, 99, 99, 244, 100, 100, 101, 245, 499, 38, 38, 102, 102, 102, 102, 102, 102, 102, 102, 38, 103, 104, 105, 110, 110, 424, 123, 111, 111, 124, 106, 38, 107, 112, 112, 229, 108, 319, 109, 39, 40, 212, 114, 120, 945, 320, 115, 115, 115, 115, 115, 115, 115, 115, 38, 212, 121, 122, 154, 116, 39, 40, 252, 114, 125, 716, 717, 115, 115, 115, 115, 115, 115, 115, 115, 38, 253, 944, 254, 125, 116, 38, 39, 40, 38, 41, 38, 38, 38, 117, 117, 117, 117, 117, 117, 117, 117, 38, 38, 38, 38, 118, 43, 38, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 157, 943, 158, 158, 158, 158, 158, 158, 158, 158, 154, 155, 941, 159, 159, 159, 159, 159, 159, 159, 159, 160, 154, 155, 346, 159, 159, 159, 159, 159, 159, 159, 159, 160, 161, 161, 939, 938, 125, 168, 162, 165, 161, 169, 166, 161, 161, 167, 163, 161, 164, 145, 193, 125, 161, 194, 161, 161, 347, 161, 332, 161, 161, 333, 188, 171, 937, 146, 170, 161, 174, 161, 161, 172, 173, 175, 176, 161, 349, 434, 177, 179, 350, 435, 161, 161, 161, 161, 161, 161, 178, 161, 181, 935, 183, 161, 161, 180, 161, 161, 933, 182, 161, 161, 161, 161, 925, 161, 185, 161, 184, 161, 828, 932, 154, 154, 186, 396, 154, 187, 860, 161, 196, 931, 197, 197, 197, 197, 197, 197, 197, 197, 205, 397, 206, 206, 206, 206, 206, 206, 206, 206, 220, 891, 221, 221, 221, 221, 221, 221, 221, 221, 223, 930, 928, 223, 223, 223, 223, 154, 223, 223, 223, 223, 223, 223, 223, 223, 926, 223, 223, 223, 224, 223, 223, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 261, 924, 156, 156, 156, 156, 156, 156, 156, 156, 262, 262, 262, 262, 262, 262, 262, 262, 263, 263, 263, 263, 263, 263, 263, 263, 155, 923, 159, 159, 159, 159, 159, 159, 159, 159, 160, 161, 161, 940, 154, 161, 911, 154, 161, 161, 161, 161, 161, 161, 264, 161, 161, 265, 161, 161, 161, 266, 534, 161, 535, 922, 536, 267, 268, 161, 161, 161, 161, 161, 269, 270, 161, 271, 934, 161, 161, 154, 161, 161, 161, 906, 161, 161, 272, 161, 161, 161, 921, 161, 161, 920, 274, 273, 161, 919, 161, 161, 161, 278, 161, 161, 277, 279, 275, 161, 161, 161, 276, 161, 916, 161, 161, 161, 161, 562, 161, 563, 912, 564, 161, 161, 161, 161, 161, 282, 909, 908, 280, 161, 281, 907, 161, 906, 161, 283, 161, 161, 905, 161, 161, 284, 285, 286, 161, 881, 161, 881, 161, 904, 161, 903, 161, 902, 901, 289, 161, 287, 291, 288, 161, 161, 161, 290, 161, 293, 161, 897, 161, 161, 892, 161, 292, 161, 888, 161, 161, 887, 161, 298, 298, 298, 298, 298, 298, 298, 298, 196, 886, 299, 299, 299, 299, 299, 299, 299, 299, 305, 305, 305, 305, 305, 305, 305, 305, 306, 306, 306, 306, 306, 306, 306, 306, 316, 316, 316, 316, 316, 316, 316, 316, 317, 317, 317, 317, 317, 317, 317, 317, 261, 885, 156, 156, 156, 156, 156, 156, 156, 156, 358, 884, 359, 359, 359, 359, 359, 359, 359, 359, 360, 360, 360, 360, 360, 360, 360, 360, 161, 161, 883, 361, 362, 161, 161, 363, 161, 161, 161, 161, 161, 161, 161, 161, 364, 161, 882, 881, 161, 365, 161, 366, 161, 161, 367, 161, 848, 161, 161, 879, 161, 878, 161, 877, 368, 161, 374, 161, 161, 161, 161, 876, 875, 370, 371, 161, 369, 161, 161, 161, 161, 161, 874, 161, 161, 161, 372, 376, 373, 161, 161, 161, 161, 873, 161, 161, 161, 161, 161, 381, 161, 161, 375, 377, 161, 872, 161, 868, 379, 161, 161, 161, 861, 378, 380, 161, 161, 856, 161, 161, 161, 855, 854, 161, 161, 161, 161, 161, 161, 161, 853, 852, 383, 382, 161, 161, 386, 384, 161, 851, 161, 385, 161, 161, 161, 161, 850, 387, 161, 161, 161, 849, 388, 390, 161, 161, 848, 161, 389, 161, 161, 391, 161, 161, 161, 161, 846, 845, 161, 844, 161, 392, 398, 843, 399, 399, 399, 399, 399, 399, 399, 399, 196, 842, 400, 400, 400, 400, 400, 400, 400, 400, 406, 841, 407, 407, 407, 407, 407, 407, 407, 407, 408, 408, 408, 408, 408, 408, 408, 408, 417, 840, 418, 418, 418, 418, 418, 418, 418, 418, 419, 419, 419, 419, 419, 419, 419, 419, 424, 424, 424, 424, 424, 424, 424, 424, 454, 454, 454, 454, 454, 454, 454, 454, 161, 161, 839, 838, 161, 837, 833, 829, 161, 161, 161, 161, 161, 456, 161, 161, 161, 824, 457, 459, 823, 455, 460, 161, 161, 161, 161, 161, 458, 161, 161, 161, 161, 822, 161, 461, 821, 820, 161, 161, 462, 161, 161, 161, 161, 463, 161, 161, 161, 819, 464, 161, 161, 161, 465, 161, 161, 161, 818, 817, 161, 161, 161, 816, 161, 161, 161, 467, 466, 161, 161, 161, 815, 161, 814, 469, 813, 468, 161, 812, 161, 811, 161, 161, 810, 809, 471, 161, 808, 470, 161, 161, 161, 161, 161, 161, 472, 161, 474, 161, 161, 807, 161, 806, 161, 805, 161, 161, 161, 161, 161, 161, 161, 475, 161, 161, 161, 804, 803, 161, 161, 161, 478, 537, 161, 161, 483, 477, 479, 476, 161, 161, 161, 802, 161, 480, 798, 161, 161, 161, 161, 161, 779, 161, 481, 161, 794, 161, 789, 788, 482, 161, 787, 161, 488, 488, 488, 488, 488, 488, 488, 488, 398, 786, 489, 489, 489, 489, 489, 489, 489, 489, 400, 400, 400, 400, 400, 400, 400, 400, 494, 494, 494, 494, 494, 494, 494, 494, 495, 495, 495, 495, 495, 495, 495, 495, 408, 408, 408, 408, 408, 408, 408, 408, 503, 503, 503, 503, 503, 503, 503, 503, 504, 504, 504, 504, 504, 504, 504, 504, 419, 419, 419, 419, 419, 419, 419, 419, 161, 538, 785, 161, 161, 784, 783, 161, 161, 782, 161, 161, 161, 161, 161, 161, 540, 161, 161, 161, 781, 539, 161, 161, 542, 541, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 780, 779, 161, 778, 777, 543, 161, 161, 161, 161, 161, 545, 161, 161, 546, 544, 548, 547, 776, 161, 161, 161, 549, 161, 161, 161, 161, 161, 161, 161, 161, 161, 775, 161, 552, 161, 161, 774, 550, 161, 161, 161, 551, 161, 161, 555, 161, 773, 161, 771, 161, 161, 554, 161, 556, 161, 161, 770, 768, 557, 559, 161, 767, 161, 161, 161, 161, 161, 161, 161, 161, 161, 765, 161, 764, 161, 558, 161, 161, 161, 560, 161, 614, 161, 763, 762, 618, 161, 161, 161, 561, 569, 761, 570, 570, 570, 570, 570, 570, 570, 570, 574, 756, 575, 575, 575, 575, 575, 575, 575, 575, 582, 742, 583, 583, 583, 583, 583, 583, 583, 583, 161, 740, 739, 738, 161, 161, 737, 617, 161, 161, 161, 616, 161, 161, 161, 161, 161, 161, 736, 161, 621, 622, 735, 619, 620, 161, 161, 734, 161, 161, 161, 161, 161, 161, 733, 161, 732, 161, 623, 731, 161, 161, 161, 730, 161, 161, 624, 161, 161, 161, 625, 161, 161, 729, 161, 626, 161, 161, 161, 727, 161, 627, 726, 725, 161, 161, 724, 161, 161, 723, 161, 161, 161, 630, 161, 633, 161, 629, 632, 161, 631, 161, 161, 161, 161, 634, 161, 161, 722, 720, 161, 161, 161, 161, 161, 161, 719, 161, 685, 635, 582, 715, 161, 713, 161, 636, 644, 644, 644, 644, 644, 644, 644, 644, 569, 574, 645, 645, 645, 645, 645, 645, 645, 645, 649, 649, 649, 649, 649, 649, 649, 649, 650, 650, 650, 650, 650, 650, 650, 650, 655, 655, 655, 655, 655, 655, 655, 655, 656, 656, 656, 656, 656, 656, 656, 656, 161, 161, 711, 710, 161, 686, 569, 161, 161, 161, 161, 161, 161, 161, 161, 161, 708, 161, 683, 161, 161, 161, 707, 161, 161, 687, 688, 161, 161, 689, 690, 161, 161, 706, 161, 705, 161, 704, 703, 161, 161, 161, 695, 691, 161, 161, 161, 692, 161, 684, 161, 682, 161, 694, 681, 161, 161, 161, 680, 693, 696, 161, 161, 679, 161, 161, 697, 161, 161, 161, 698, 161, 678, 161, 677, 676, 161, 161, 161, 699, 701, 161, 700, 161, 161, 161, 675, 161, 674, 673, 672, 702, 161, 671, 161, 709, 709, 709, 709, 709, 709, 709, 709, 712, 712, 712, 712, 712, 712, 712, 712, 718, 718, 718, 718, 718, 718, 718, 718, 161, 161, 670, 669, 161, 161, 668, 741, 161, 161, 161, 161, 744, 745, 161, 161, 161, 161, 667, 743, 666, 665, 664, 663, 161, 161, 161, 161, 746, 728, 728, 662, 728, 728, 747, 748, 728, 749, 749, 749, 749, 749, 749, 749, 749, 750, 728, 728, 728, 751, 728, 728, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 161, 753, 661, 660, 161, 508, 658, 161, 161, 161, 161, 161, 161, 657, 161, 161, 161, 161, 752, 161, 755, 757, 754, 161, 161, 654, 161, 161, 161, 161, 653, 161, 161, 161, 652, 161, 161, 651, 161, 161, 161, 758, 161, 161, 648, 161, 647, 161, 759, 161, 646, 760, 766, 766, 766, 766, 766, 766, 766, 766, 769, 769, 769, 769, 769, 769, 769, 769, 772, 772, 772, 772, 772, 772, 772, 772, 161, 643, 642, 641, 161, 161, 640, 639, 161, 161, 161, 790, 161, 161, 161, 791, 161, 161, 638, 161, 792, 637, 628, 615, 161, 613, 161, 155, 612, 154, 154, 154, 154, 154, 154, 154, 154, 161, 161, 611, 610, 161, 161, 609, 608, 161, 161, 161, 161, 796, 161, 161, 161, 795, 607, 606, 605, 604, 603, 602, 793, 159, 159, 159, 159, 159, 159, 159, 159, 160, 161, 161, 601, 600, 599, 799, 161, 161, 161, 161, 161, 161, 797, 161, 161, 161, 161, 161, 161, 800, 801, 161, 161, 161, 598, 161, 161, 597, 161, 827, 826, 825, 161, 161, 161, 161, 596, 595, 161, 594, 593, 161, 161, 592, 161, 161, 161, 830, 161, 161, 831, 161, 161, 161, 835, 161, 161, 834, 832, 161, 161, 591, 161, 590, 161, 161, 161, 161, 857, 161, 161, 161, 589, 161, 836, 161, 161, 858, 161, 161, 161, 161, 588, 859, 161, 508, 161, 585, 584, 862, 847, 847, 946, 847, 847, 863, 864, 847, 865, 865, 865, 865, 865, 865, 865, 865, 866, 847, 847, 847, 867, 847, 847, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 869, 161, 417, 581, 580, 161, 579, 946, 161, 161, 161, 161, 161, 161, 870, 161, 161, 161, 871, 578, 161, 893, 161, 577, 161, 161, 161, 161, 576, 161, 406, 161, 573, 572, 571, 398, 890, 568, 567, 889, 847, 847, 161, 847, 847, 566, 864, 847, 565, 553, 161, 358, 161, 898, 533, 532, 848, 847, 847, 847, 531, 847, 847, 847, 847, 161, 847, 847, 161, 847, 847, 530, 529, 161, 528, 899, 161, 527, 161, 848, 847, 847, 847, 526, 847, 847, 847, 847, 525, 847, 847, 524, 864, 847, 865, 865, 865, 865, 865, 865, 865, 865, 866, 847, 847, 847, 523, 847, 847, 895, 895, 895, 895, 895, 895, 895, 895, 896, 161, 161, 900, 522, 161, 161, 521, 520, 161, 161, 161, 161, 161, 161, 161, 161, 519, 518, 517, 910, 516, 515, 913, 847, 847, 514, 847, 847, 914, 915, 847, 894, 894, 894, 894, 894, 894, 894, 894, 848, 847, 847, 847, 914, 847, 847, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 895, 895, 895, 895, 895, 895, 895, 895, 896, 895, 895, 895, 895, 895, 895, 895, 895, 896, 161, 161, 513, 512, 917, 161, 511, 510, 161, 161, 161, 161, 161, 161, 918, 161, 324, 508, 507, 506, 927, 502, 161, 847, 847, 501, 847, 847, 915, 915, 847, 847, 847, 847, 847, 847, 847, 847, 847, 848, 847, 847, 847, 915, 847, 847, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 161, 161, 500, 498, 161, 161, 497, 496, 161, 161, 161, 929, 161, 161, 161, 161, 161, 936, 493, 161, 492, 491, 490, 487, 161, 486, 161, 161, 942, 161, 83, 83, 83, 83, 83, 83, 83, 83, 83, 92, 92, 92, 92, 92, 92, 92, 92, 92, 113, 113, 113, 113, 113, 113, 113, 113, 113, 125, 125, 485, 125, 125, 125, 125, 125, 125, 127, 484, 127, 154, 154, 473, 154, 155, 154, 156, 453, 452, 156, 451, 156, 161, 161, 450, 161, 161, 161, 192, 192, 449, 192, 192, 192, 192, 192, 192, 195, 195, 448, 195, 195, 195, 195, 195, 195, 203, 447, 446, 203, 203, 203, 203, 445, 203, 204, 204, 444, 204, 204, 204, 204, 204, 204, 213, 443, 213, 218, 442, 441, 218, 218, 218, 218, 440, 218, 219, 219, 439, 219, 219, 219, 219, 219, 219, 222, 438, 222, 230, 437, 230, 260, 260, 436, 260, 433, 260, 160, 160, 312, 432, 312, 318, 431, 318, 223, 430, 429, 223, 223, 428, 223, 427, 223, 325, 426, 325, 326, 946, 326, 261, 261, 324, 423, 422, 261, 413, 421, 413, 420, 126, 420, 425, 416, 425, 509, 415, 509, 587, 414, 587, 714, 714, 126, 714, 714, 714, 714, 714, 714, 728, 728, 412, 728, 728, 728, 728, 728, 728, 160, 160, 160, 847, 847, 411, 847, 847, 847, 847, 847, 847, 880, 880, 410, 880, 880, 880, 880, 880, 880, 863, 863, 409, 863, 863, 863, 863, 863, 863, 894, 894, 405, 894, 894, 894, 894, 894, 894, 404, 403, 402, 401, 395, 394, 393, 357, 356, 355, 354, 353, 352, 351, 348, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 331, 330, 329, 328, 327, 126, 324, 323, 322, 321, 126, 315, 314, 313, 212, 126, 311, 310, 309, 308, 307, 304, 303, 302, 301, 300, 297, 296, 295, 294, 155, 259, 258, 257, 256, 255, 251, 248, 247, 246, 243, 242, 241, 240, 239, 238, 235, 234, 233, 232, 231, 126, 228, 227, 226, 225, 126, 128, 217, 216, 215, 214, 212, 212, 212, 126, 212, 211, 210, 209, 208, 207, 128, 202, 201, 198, 128, 191, 190, 189, 155, 153, 152, 151, 144, 137, 136, 135, 128, 126, 946, 38, 38, 38, 38, 78, 78, 37, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946 } ; static yyconst short int yy_chk[2772] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 39, 984, 31, 39, 9, 49, 49, 7, 7, 7, 7, 7, 9, 9, 7, 32, 7, 7, 7, 10, 7, 31, 7, 7, 7, 7, 7, 10, 10, 15, 9, 51, 50, 44, 32, 51, 33, 50, 15, 15, 15, 44, 54, 44, 15, 10, 13, 13, 33, 13, 93, 54, 982, 13, 13, 13, 13, 13, 13, 13, 13, 33, 33, 89, 980, 93, 13, 14, 14, 53, 14, 89, 107, 16, 14, 14, 14, 14, 14, 14, 14, 14, 16, 16, 16, 53, 107, 14, 16, 17, 17, 55, 17, 134, 134, 978, 17, 17, 17, 17, 17, 17, 17, 17, 17, 84, 145, 55, 84, 17, 18, 18, 145, 18, 19, 20, 114, 18, 18, 18, 18, 18, 18, 18, 18, 18, 45, 19, 20, 45, 18, 114, 45, 19, 20, 19, 20, 19, 20, 141, 19, 20, 21, 141, 977, 25, 26, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 25, 26, 975, 123, 25, 26, 123, 21, 34, 21, 25, 26, 963, 21, 225, 21, 27, 27, 108, 27, 34, 943, 225, 27, 27, 27, 27, 27, 27, 27, 27, 27, 108, 34, 34, 940, 27, 28, 28, 147, 28, 204, 654, 654, 28, 28, 28, 28, 28, 28, 28, 28, 28, 147, 939, 147, 204, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36, 61, 937, 61, 61, 61, 61, 61, 61, 61, 61, 62, 62, 935, 62, 62, 62, 62, 62, 62, 62, 62, 62, 63, 63, 249, 63, 63, 63, 63, 63, 63, 63, 63, 63, 64, 65, 933, 932, 219, 65, 63, 64, 64, 65, 64, 65, 66, 64, 63, 67, 63, 78, 193, 219, 66, 193, 66, 67, 249, 67, 236, 68, 69, 236, 78, 67, 930, 78, 66, 68, 69, 68, 69, 68, 68, 69, 70, 71, 251, 336, 70, 72, 251, 336, 70, 71, 70, 71, 73, 72, 71, 72, 73, 926, 74, 75, 73, 72, 73, 76, 923, 73, 74, 75, 74, 75, 911, 76, 75, 76, 74, 77, 793, 921, 911, 793, 76, 297, 828, 77, 828, 77, 86, 920, 86, 86, 86, 86, 86, 86, 86, 86, 94, 297, 94, 94, 94, 94, 94, 94, 94, 94, 115, 860, 115, 115, 115, 115, 115, 115, 115, 115, 118, 919, 916, 118, 118, 118, 118, 860, 118, 118, 118, 118, 118, 118, 118, 118, 912, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 156, 909, 156, 156, 156, 156, 156, 156, 156, 156, 157, 157, 157, 157, 157, 157, 157, 157, 158, 158, 158, 158, 158, 158, 158, 158, 159, 908, 159, 159, 159, 159, 159, 159, 159, 159, 159, 161, 162, 934, 891, 163, 891, 934, 164, 161, 162, 161, 162, 163, 162, 163, 164, 163, 164, 165, 166, 164, 453, 167, 453, 907, 453, 165, 166, 165, 166, 167, 169, 167, 167, 167, 168, 168, 925, 170, 169, 925, 169, 171, 168, 905, 168, 170, 169, 170, 172, 171, 904, 171, 173, 902, 171, 170, 172, 901, 172, 175, 173, 175, 173, 174, 174, 175, 172, 175, 176, 175, 173, 174, 897, 174, 177, 178, 176, 483, 176, 483, 892, 483, 177, 178, 177, 178, 179, 178, 887, 886, 176, 180, 177, 885, 179, 883, 179, 179, 182, 180, 882, 180, 181, 179, 180, 181, 182, 881, 182, 880, 181, 879, 181, 878, 183, 874, 873, 182, 184, 181, 184, 181, 183, 185, 183, 183, 184, 187, 184, 868, 186, 185, 861, 185, 186, 187, 856, 187, 186, 855, 186, 196, 196, 196, 196, 196, 196, 196, 196, 197, 854, 197, 197, 197, 197, 197, 197, 197, 197, 205, 205, 205, 205, 205, 205, 205, 205, 206, 206, 206, 206, 206, 206, 206, 206, 220, 220, 220, 220, 220, 220, 220, 220, 221, 221, 221, 221, 221, 221, 221, 221, 260, 852, 260, 260, 260, 260, 260, 260, 260, 260, 262, 851, 262, 262, 262, 262, 262, 262, 262, 262, 263, 263, 263, 263, 263, 263, 263, 263, 264, 265, 850, 264, 265, 266, 267, 266, 264, 265, 264, 265, 269, 266, 267, 266, 267, 268, 849, 848, 269, 268, 269, 269, 270, 268, 269, 268, 847, 271, 276, 846, 270, 845, 270, 844, 270, 271, 276, 271, 276, 272, 273, 842, 840, 272, 273, 274, 271, 272, 273, 272, 273, 277, 839, 274, 275, 274, 274, 278, 275, 277, 279, 277, 275, 838, 275, 278, 280, 278, 279, 283, 279, 281, 277, 279, 280, 837, 280, 833, 281, 281, 282, 281, 829, 280, 282, 284, 283, 824, 282, 285, 282, 823, 822, 284, 283, 284, 283, 285, 286, 285, 821, 820, 284, 283, 287, 288, 286, 285, 286, 819, 289, 285, 287, 288, 287, 288, 818, 287, 289, 290, 289, 817, 288, 290, 291, 292, 815, 290, 289, 290, 293, 291, 291, 292, 291, 292, 814, 813, 293, 812, 293, 292, 298, 811, 298, 298, 298, 298, 298, 298, 298, 298, 299, 810, 299, 299, 299, 299, 299, 299, 299, 299, 305, 807, 305, 305, 305, 305, 305, 305, 305, 305, 306, 306, 306, 306, 306, 306, 306, 306, 316, 805, 316, 316, 316, 316, 316, 316, 316, 316, 317, 317, 317, 317, 317, 317, 317, 317, 358, 358, 358, 358, 358, 358, 358, 358, 359, 359, 359, 359, 359, 359, 359, 359, 361, 362, 804, 803, 363, 802, 798, 794, 361, 362, 361, 362, 363, 363, 363, 364, 365, 789, 364, 366, 788, 361, 367, 364, 365, 364, 365, 366, 365, 366, 367, 368, 367, 787, 369, 368, 786, 785, 371, 368, 369, 368, 369, 370, 369, 370, 371, 372, 371, 784, 371, 370, 373, 370, 371, 372, 374, 372, 783, 782, 373, 375, 373, 781, 374, 376, 374, 374, 373, 375, 377, 375, 780, 376, 779, 376, 778, 375, 377, 777, 377, 776, 378, 379, 775, 773, 378, 380, 771, 377, 378, 379, 378, 379, 382, 380, 379, 380, 382, 383, 384, 768, 382, 767, 382, 765, 385, 383, 384, 383, 384, 386, 387, 384, 385, 455, 385, 763, 762, 386, 387, 386, 387, 455, 388, 455, 392, 386, 388, 385, 390, 389, 388, 761, 388, 389, 756, 391, 390, 389, 390, 389, 750, 392, 390, 391, 748, 391, 742, 740, 391, 392, 739, 392, 398, 398, 398, 398, 398, 398, 398, 398, 399, 738, 399, 399, 399, 399, 399, 399, 399, 399, 400, 400, 400, 400, 400, 400, 400, 400, 406, 406, 406, 406, 406, 406, 406, 406, 407, 407, 407, 407, 407, 407, 407, 407, 408, 408, 408, 408, 408, 408, 408, 408, 417, 417, 417, 417, 417, 417, 417, 417, 418, 418, 418, 418, 418, 418, 418, 418, 419, 419, 419, 419, 419, 419, 419, 419, 456, 457, 736, 458, 459, 735, 734, 460, 456, 733, 456, 458, 459, 458, 459, 460, 459, 460, 457, 462, 732, 458, 461, 463, 461, 460, 457, 462, 457, 462, 461, 463, 461, 463, 464, 465, 730, 728, 466, 726, 725, 463, 464, 465, 464, 465, 466, 465, 466, 467, 466, 464, 468, 467, 724, 469, 470, 467, 469, 467, 468, 471, 468, 469, 470, 469, 470, 472, 723, 471, 472, 471, 474, 720, 470, 472, 476, 472, 471, 475, 474, 475, 474, 719, 476, 715, 476, 475, 474, 475, 476, 477, 478, 714, 711, 477, 479, 480, 710, 477, 478, 477, 478, 481, 479, 480, 479, 480, 707, 482, 706, 481, 478, 481, 541, 537, 481, 482, 537, 482, 705, 704, 541, 537, 541, 537, 482, 488, 703, 488, 488, 488, 488, 488, 488, 488, 488, 494, 695, 494, 494, 494, 494, 494, 494, 494, 494, 503, 684, 503, 503, 503, 503, 503, 503, 503, 503, 539, 682, 681, 680, 540, 542, 678, 540, 539, 543, 539, 539, 540, 542, 540, 542, 544, 543, 677, 543, 545, 546, 675, 542, 544, 547, 544, 673, 545, 546, 545, 546, 548, 547, 672, 547, 671, 549, 547, 670, 548, 550, 548, 669, 551, 549, 548, 549, 552, 550, 549, 550, 551, 668, 551, 550, 552, 554, 552, 665, 555, 551, 664, 663, 556, 554, 662, 554, 555, 661, 555, 558, 556, 555, 556, 558, 557, 554, 557, 558, 556, 558, 559, 560, 557, 559, 557, 561, 660, 658, 559, 560, 559, 560, 616, 561, 657, 561, 616, 560, 656, 653, 616, 651, 616, 561, 569, 569, 569, 569, 569, 569, 569, 569, 570, 650, 570, 570, 570, 570, 570, 570, 570, 570, 574, 574, 574, 574, 574, 574, 574, 574, 575, 575, 575, 575, 575, 575, 575, 575, 582, 582, 582, 582, 582, 582, 582, 582, 583, 583, 583, 583, 583, 583, 583, 583, 614, 617, 648, 647, 618, 618, 645, 619, 614, 617, 614, 617, 618, 620, 618, 619, 643, 619, 614, 621, 622, 620, 642, 620, 623, 619, 620, 621, 622, 621, 622, 624, 623, 640, 623, 639, 625, 638, 637, 624, 626, 624, 628, 623, 625, 627, 625, 625, 626, 615, 626, 613, 629, 627, 612, 627, 630, 631, 611, 626, 629, 632, 629, 609, 630, 631, 630, 631, 633, 632, 631, 632, 608, 635, 607, 606, 633, 634, 633, 632, 634, 635, 633, 635, 636, 634, 605, 634, 604, 603, 602, 635, 636, 601, 636, 644, 644, 644, 644, 644, 644, 644, 644, 649, 649, 649, 649, 649, 649, 649, 649, 655, 655, 655, 655, 655, 655, 655, 655, 683, 685, 600, 599, 686, 687, 597, 683, 683, 685, 683, 685, 686, 687, 686, 687, 688, 690, 596, 685, 595, 594, 593, 592, 688, 690, 688, 690, 688, 689, 689, 590, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 691, 692, 589, 588, 693, 587, 585, 694, 691, 692, 691, 692, 693, 584, 693, 694, 697, 694, 691, 696, 694, 696, 693, 698, 697, 581, 697, 696, 699, 696, 580, 698, 700, 698, 579, 701, 699, 578, 699, 702, 700, 698, 700, 701, 573, 701, 572, 702, 700, 702, 571, 701, 709, 709, 709, 709, 709, 709, 709, 709, 712, 712, 712, 712, 712, 712, 712, 712, 718, 718, 718, 718, 718, 718, 718, 718, 741, 568, 567, 566, 743, 744, 565, 564, 741, 745, 741, 743, 743, 744, 743, 744, 746, 745, 563, 745, 745, 562, 553, 538, 746, 536, 746, 747, 535, 747, 747, 747, 747, 747, 747, 747, 747, 751, 752, 534, 533, 753, 754, 532, 531, 751, 752, 751, 752, 753, 754, 753, 754, 751, 530, 529, 528, 527, 526, 525, 747, 749, 749, 749, 749, 749, 749, 749, 749, 749, 755, 757, 523, 522, 521, 757, 758, 759, 755, 757, 755, 757, 755, 760, 758, 759, 758, 759, 790, 758, 759, 760, 791, 760, 520, 792, 790, 519, 790, 792, 791, 790, 791, 792, 795, 792, 518, 517, 796, 516, 515, 797, 795, 514, 795, 799, 796, 795, 796, 797, 796, 797, 800, 799, 800, 799, 801, 799, 797, 826, 800, 513, 800, 512, 801, 825, 801, 826, 825, 826, 827, 830, 511, 825, 801, 825, 832, 826, 827, 830, 827, 830, 510, 827, 832, 509, 832, 507, 506, 830, 831, 831, 505, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 834, 835, 504, 502, 501, 836, 500, 499, 834, 835, 834, 835, 857, 836, 835, 836, 858, 859, 836, 498, 857, 862, 857, 497, 858, 859, 858, 859, 496, 862, 495, 862, 493, 491, 490, 489, 859, 487, 486, 858, 863, 863, 869, 863, 863, 485, 863, 863, 484, 473, 869, 454, 869, 869, 452, 451, 863, 863, 863, 863, 449, 863, 863, 864, 864, 870, 864, 864, 889, 864, 864, 448, 447, 870, 446, 870, 889, 445, 889, 864, 864, 864, 864, 444, 864, 864, 865, 865, 443, 865, 865, 442, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 441, 865, 865, 866, 866, 866, 866, 866, 866, 866, 866, 866, 871, 890, 871, 440, 893, 899, 439, 438, 871, 890, 871, 890, 893, 899, 893, 899, 437, 436, 435, 890, 434, 432, 893, 894, 894, 431, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 895, 895, 895, 895, 895, 895, 895, 895, 895, 896, 896, 896, 896, 896, 896, 896, 896, 896, 898, 900, 430, 429, 898, 910, 428, 426, 898, 900, 898, 900, 913, 910, 900, 910, 425, 424, 422, 421, 913, 416, 913, 915, 915, 415, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 917, 918, 414, 412, 927, 929, 411, 409, 917, 918, 917, 918, 927, 929, 927, 929, 936, 927, 405, 942, 404, 403, 401, 397, 936, 396, 936, 942, 936, 942, 947, 947, 947, 947, 947, 947, 947, 947, 947, 948, 948, 948, 948, 948, 948, 948, 948, 948, 949, 949, 949, 949, 949, 949, 949, 949, 949, 950, 950, 395, 950, 950, 950, 950, 950, 950, 951, 394, 951, 952, 952, 381, 952, 360, 952, 953, 357, 356, 953, 355, 953, 954, 954, 354, 954, 954, 954, 955, 955, 353, 955, 955, 955, 955, 955, 955, 956, 956, 352, 956, 956, 956, 956, 956, 956, 957, 351, 350, 957, 957, 957, 957, 349, 957, 958, 958, 347, 958, 958, 958, 958, 958, 958, 959, 346, 959, 960, 344, 343, 960, 960, 960, 960, 342, 960, 961, 961, 341, 961, 961, 961, 961, 961, 961, 962, 340, 962, 964, 339, 964, 965, 965, 338, 965, 335, 965, 966, 966, 967, 334, 967, 968, 333, 968, 969, 332, 331, 969, 969, 330, 969, 329, 969, 970, 327, 970, 971, 326, 971, 972, 972, 325, 321, 320, 972, 973, 319, 973, 974, 318, 974, 976, 315, 976, 979, 314, 979, 981, 313, 981, 983, 983, 312, 983, 983, 983, 983, 983, 983, 985, 985, 311, 985, 985, 985, 985, 985, 985, 986, 986, 986, 987, 987, 310, 987, 987, 987, 987, 987, 987, 988, 988, 308, 988, 988, 988, 988, 988, 988, 989, 989, 307, 989, 989, 989, 989, 989, 989, 990, 990, 304, 990, 990, 990, 990, 990, 990, 303, 302, 301, 300, 296, 295, 294, 258, 257, 256, 255, 254, 253, 252, 250, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 222, 217, 216, 215, 214, 213, 211, 210, 209, 208, 207, 202, 201, 200, 199, 198, 191, 190, 189, 188, 154, 153, 152, 150, 149, 148, 146, 144, 143, 142, 140, 139, 138, 137, 136, 135, 133, 132, 131, 130, 129, 127, 122, 121, 120, 119, 117, 116, 112, 111, 110, 109, 106, 105, 103, 102, 101, 100, 99, 98, 97, 96, 95, 91, 90, 88, 87, 82, 81, 80, 59, 58, 57, 56, 52, 48, 47, 46, 43, 42, 37, 24, 23, 12, 11, 6, 5, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946 } ; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; static char *yy_full_match; static int yy_lp; #define REJECT \ { \ *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ yy_cp = yy_full_match; /* restore poss. backed-over text */ \ ++yy_lp; \ goto find_rule; \ } #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "config_scan.l" #define INITIAL 0 /* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #line 45 "config_scan.l" #include "common.h" #include "yacconfig.h" #include "config_parse.h" extern int socks_parseinit; extern const int socks_configtype; static const char rcsid[] = "$Id: config_scan.l,v 1.76 2005/12/19 14:22:13 michaels Exp $"; #define YY_STACK_USED 0 #define YY_ALWAYS_INTERACTIVE 0 #define YY_NEVER_INTERACTIVE 1 #define YY_MAIN 0 /*%option debug */ /* non-exclusive startconditions. */ #define start_address 1 #define start_port 2 /* exclusive startconditions */ #define lineprefix 3 #define start_command 4 #define start_compatibility 5 #define start_line 6 #define start_log 7 #define start_logoutput 8 #define start_method 9 #define start_operator 10 #define start_option 11 #define start_proxyprotocol 12 #define start_username 13 #define start_portnumber 14 #define start_srchost 15 #define start_protocol 16 #define start_servicename 17 #line 1507 "config_scan.c" /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap YY_PROTO(( void )); #else extern int yywrap YY_PROTO(( void )); #endif #endif #ifndef YY_NO_UNPUT static void yyunput YY_PROTO(( int c, char *buf_ptr )); #endif #ifndef yytext_ptr static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen YY_PROTO(( yyconst char * )); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif #endif #if YY_STACK_USED static int yy_start_stack_ptr = 0; static int yy_start_stack_depth = 0; static int *yy_start_stack = 0; #ifndef YY_NO_PUSH_STATE static void yy_push_state YY_PROTO(( int new_state )); #endif #ifndef YY_NO_POP_STATE static void yy_pop_state YY_PROTO(( void )); #endif #ifndef YY_NO_TOP_STATE static int yy_top_state YY_PROTO(( void )); #endif #else #define YY_NO_PUSH_STATE 1 #define YY_NO_POP_STATE 1 #define YY_NO_TOP_STATE 1 #endif #ifdef YY_MALLOC_DECL YY_MALLOC_DECL #else #ifdef __STDC__ #ifndef __cplusplus #include #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( yy_current_buffer->yy_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL int yylex YY_PROTO(( void )) #endif /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 91 "config_scan.l" /* * we can operate in more than one mode, find out which it is and * let the parser know. */ if (!socks_parseinit) { socks_parseinit = 1; switch (socks_configtype) { case CONFIGTYPE_SERVER: return SERVERCONFIG; case CONFIGTYPE_CLIENT: return CLIENTCONFIG; default: SERRX(socks_configtype); } } /* start-condition dependent stuff. */ #line 1688 "config_scan.c" if ( yy_init ) { yy_init = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yy_c_buf_p; /* Support of yytext. */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_state_ptr = yy_state_buf; *yy_state_ptr++ = yy_current_state; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 947 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yy_state_ptr++ = yy_current_state; ++yy_cp; } while ( yy_base[yy_current_state] != 2724 ); yy_find_action: yy_current_state = *--yy_state_ptr; yy_lp = yy_accept[yy_current_state]; find_rule: /* we branch to this label when backing up */ for ( ; ; ) /* until we find what rule we matched */ { if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) { yy_act = yy_acclist[yy_lp]; { yy_full_match = yy_cp; break; } } --yy_cp; yy_current_state = *--yy_state_ptr; yy_lp = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; if ( yy_act != YY_END_OF_BUFFER ) { int yyl; for ( yyl = 0; yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) ++yylineno; } do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 1: YY_RULE_SETUP #line 120 "config_scan.l" { yylval.string = yytext; return PROXYPROTOCOL_SOCKS_V4; } YY_BREAK case 2: YY_RULE_SETUP #line 125 "config_scan.l" { yylval.string = yytext; return PROXYPROTOCOL_SOCKS_V5; } YY_BREAK case 3: YY_RULE_SETUP #line 130 "config_scan.l" { yylval.string = yytext; return DEPRECATED; } YY_BREAK case 4: YY_RULE_SETUP #line 135 "config_scan.l" { yylval.string = yytext; return PROXYPROTOCOL_HTTP_V1_0; } YY_BREAK case 5: YY_RULE_SETUP #line 140 "config_scan.l" { yylval.string = yytext; return COMMAND_BIND; } YY_BREAK case 6: YY_RULE_SETUP #line 145 "config_scan.l" { yylval.string = yytext; return COMMAND_CONNECT; } YY_BREAK case 7: YY_RULE_SETUP #line 150 "config_scan.l" { yylval.string = yytext; return COMMAND_UDPASSOCIATE; } YY_BREAK case 8: YY_RULE_SETUP #line 155 "config_scan.l" { yylval.string = yytext; return COMMAND_BINDREPLY; } YY_BREAK case 9: YY_RULE_SETUP #line 160 "config_scan.l" { yylval.string = yytext; return COMMAND_UDPREPLY; } YY_BREAK case 10: YY_RULE_SETUP #line 166 "config_scan.l" { yylval.string = yytext; return DIRECT; } YY_BREAK case 11: YY_RULE_SETUP #line 172 "config_scan.l" { BEGIN(start_operator); yylval.string = yytext; return PORT; } YY_BREAK case 12: YY_RULE_SETUP #line 179 "config_scan.l" { BEGIN(start_portnumber); yylval.string = yytext; return OPERATOR; } YY_BREAK case 13: YY_RULE_SETUP #line 187 "config_scan.l" { yylval.string = yytext; return LOG_CONNECT; } YY_BREAK case 14: YY_RULE_SETUP #line 192 "config_scan.l" { yylval.string = yytext; return LOG_DATA; } YY_BREAK case 15: YY_RULE_SETUP #line 197 "config_scan.l" { yylval.string = yytext; return LOG_DISCONNECT; } YY_BREAK case 16: YY_RULE_SETUP #line 202 "config_scan.l" { yylval.string = yytext; return LOG_ERROR; } YY_BREAK case 17: YY_RULE_SETUP #line 207 "config_scan.l" { yylval.string = yytext; return LOG_IOOPERATION; } YY_BREAK case 18: YY_RULE_SETUP #line 212 "config_scan.l" { BEGIN(INITIAL); yylval.string = yytext; return SERVICENAME; } YY_BREAK case 19: YY_RULE_SETUP #line 219 "config_scan.l" { BEGIN(start_portnumber); /* no operator, first port in range then. */ yylval.string = yytext; return PORTNUMBER; } YY_BREAK case 20: YY_RULE_SETUP #line 226 "config_scan.l" { BEGIN(INITIAL); yylval.string = yytext; return PORTNUMBER; } YY_BREAK case 21: YY_RULE_SETUP #line 233 "config_scan.l" { BEGIN(start_port); yylval.string = yytext; return DOMAINNAME; } YY_BREAK case 22: YY_RULE_SETUP #line 240 "config_scan.l" { BEGIN(start_port); yylval.string = yytext; return IFNAME; } YY_BREAK case 23: YY_RULE_SETUP #line 247 "config_scan.l" { yylval.string = yytext; return LOGFILE; } YY_BREAK case 24: YY_RULE_SETUP #line 252 "config_scan.l" { yylval.string = yytext; return USERNAME; } YY_BREAK case 25: YY_RULE_SETUP #line 257 "config_scan.l" { BEGIN(start_line); yylval.string = yytext; return *yytext; } YY_BREAK case 26: YY_RULE_SETUP #line 264 "config_scan.l" { BEGIN(INITIAL); yylval.string = yytext; return LINE; } YY_BREAK case 27: YY_RULE_SETUP #line 271 "config_scan.l" { yylval.string = yytext; return NOMISMATCH; } YY_BREAK case 28: YY_RULE_SETUP #line 276 "config_scan.l" { yylval.string = yytext; return NOUNKNOWN; } YY_BREAK case 29: YY_RULE_SETUP #line 281 "config_scan.l" { yylval.string = yytext; return PROTOCOL_TCP; } YY_BREAK case 30: YY_RULE_SETUP #line 286 "config_scan.l" { yylval.string = yytext; return PROTOCOL_UDP; } YY_BREAK case 31: YY_RULE_SETUP #line 291 "config_scan.l" { yylval.string = yytext; return PROTOCOL_FAKE; } YY_BREAK /* non-startcondition dependents. */ case 32: YY_RULE_SETUP #line 299 "config_scan.l" { yylval.string = yytext; return DEBUGING; } YY_BREAK case 33: YY_RULE_SETUP #line 304 "config_scan.l" { yylval.string = yytext; return ROUTE; } YY_BREAK case 34: YY_RULE_SETUP #line 309 "config_scan.l" { BEGIN(start_protocol); yylval.string = yytext; return RESOLVEPROTOCOL; } YY_BREAK case 35: YY_RULE_SETUP #line 316 "config_scan.l" { BEGIN(start_srchost); yylval.string = yytext; return SRCHOST; } YY_BREAK case 36: YY_RULE_SETUP #line 323 "config_scan.l" { BEGIN(start_proxyprotocol); yylval.string = yytext; return PROXYPROTOCOL; } YY_BREAK case 37: YY_RULE_SETUP #line 330 "config_scan.l" { BEGIN(start_logoutput); yylval.string = yytext; return LOGOUTPUT; } YY_BREAK case 38: YY_RULE_SETUP #line 337 "config_scan.l" { BEGIN(start_protocol); yylval.string = yytext; return PROTOCOL; } YY_BREAK case 39: YY_RULE_SETUP #line 344 "config_scan.l" { BEGIN(start_command); yylval.string = yytext; return COMMAND; } YY_BREAK case 40: YY_RULE_SETUP #line 351 "config_scan.l" { yylval.string = yytext; return REDIRECT; } YY_BREAK case 41: YY_RULE_SETUP #line 356 "config_scan.l" { yylval.string = yytext; return BANDWIDTH; } YY_BREAK case 42: YY_RULE_SETUP #line 361 "config_scan.l" { yylval.string = yytext; return MAXSESSIONS; } YY_BREAK case 43: YY_RULE_SETUP #line 366 "config_scan.l" { BEGIN(start_address); yylval.string = yytext; return FROM; } YY_BREAK case 44: YY_RULE_SETUP #line 373 "config_scan.l" { BEGIN(start_address); yylval.string = yytext; return TO; } YY_BREAK case 45: YY_RULE_SETUP #line 380 "config_scan.l" { BEGIN(start_address); yylval.string = yytext; return VIA; } YY_BREAK /* server configstuff */ case 46: YY_RULE_SETUP #line 388 "config_scan.l" { BEGIN(start_address); yylval.string = yytext; return INTERNAL; } YY_BREAK case 47: YY_RULE_SETUP #line 395 "config_scan.l" { yylval.string = yytext; return EXTERNAL_ROTATION; } YY_BREAK case 48: YY_RULE_SETUP #line 400 "config_scan.l" { yylval.string = yytext; return ROUTE; } YY_BREAK case 49: YY_RULE_SETUP #line 405 "config_scan.l" { yylval.string = yytext; return NONE; } YY_BREAK case 50: YY_RULE_SETUP #line 411 "config_scan.l" { BEGIN(start_address); yylval.string = yytext; return EXTERNAL; } YY_BREAK case 51: YY_RULE_SETUP #line 418 "config_scan.l" { yylval.string = yytext; return CHILD_MAXIDLE; } YY_BREAK case 52: YY_RULE_SETUP #line 423 "config_scan.l" { BEGIN(start_username); yylval.string = yytext; return USER; } YY_BREAK case 53: YY_RULE_SETUP #line 430 "config_scan.l" { BEGIN(start_username); yylval.string = yytext; return USER_PRIVILEGED; } YY_BREAK case 54: YY_RULE_SETUP #line 437 "config_scan.l" { BEGIN(start_username); yylval.string = yytext; return USER_UNPRIVILEGED; } YY_BREAK case 55: YY_RULE_SETUP #line 444 "config_scan.l" { BEGIN(start_username); yylval.string = yytext; return USER_LIBWRAP; } YY_BREAK case 56: YY_RULE_SETUP #line 451 "config_scan.l" { yylval.string = yytext; return IOTIMEOUT; } YY_BREAK case 57: YY_RULE_SETUP #line 456 "config_scan.l" { yylval.string = yytext; return COMPATIBILITY; } YY_BREAK case 58: YY_RULE_SETUP #line 461 "config_scan.l" { yylval.string = yytext; return REUSEADDR; } YY_BREAK case 59: YY_RULE_SETUP #line 466 "config_scan.l" { yylval.string = yytext; return SAMEPORT; } YY_BREAK case 60: YY_RULE_SETUP #line 472 "config_scan.l" { yylval.string = yytext; return CONNECTTIMEOUT; } YY_BREAK case 61: YY_RULE_SETUP #line 477 "config_scan.l" { yylval.string = yytext; return EXTENSION; } YY_BREAK case 62: YY_RULE_SETUP #line 482 "config_scan.l" { yylval.string = yytext; return BIND; } YY_BREAK case 63: YY_RULE_SETUP #line 489 "config_scan.l" { yylval.string = yytext; return CLIENTRULE; } YY_BREAK case 64: YY_RULE_SETUP #line 495 "config_scan.l" { BEGIN(start_method); yylval.string = yytext; return METHOD; } YY_BREAK case 65: YY_RULE_SETUP #line 502 "config_scan.l" { BEGIN(start_method); yylval.string = yytext; return CLIENTMETHOD; } YY_BREAK case 66: YY_RULE_SETUP #line 509 "config_scan.l" { yylval.string = yytext; return NONE; } YY_BREAK case 67: YY_RULE_SETUP #line 514 "config_scan.l" { yylval.string = yytext; return GSSAPI; } YY_BREAK case 68: YY_RULE_SETUP #line 519 "config_scan.l" { yylval.string = yytext; return UNAME; } YY_BREAK case 69: YY_RULE_SETUP #line 524 "config_scan.l" { yylval.string = yytext; return RFC931; } YY_BREAK case 70: YY_RULE_SETUP #line 529 "config_scan.l" { yylval.string = yytext; return PAM; } YY_BREAK /* filterrules */ /* * verdicts */ case 71: YY_RULE_SETUP #line 541 "config_scan.l" { yylval.string = yytext; return VERDICT_BLOCK; } YY_BREAK case 72: YY_RULE_SETUP #line 546 "config_scan.l" { yylval.string = yytext; return VERDICT_PASS; } YY_BREAK /* * logging */ case 73: YY_RULE_SETUP #line 557 "config_scan.l" { BEGIN(start_log); yylval.string = yytext; return LOG; } YY_BREAK case 74: YY_RULE_SETUP #line 565 "config_scan.l" { BEGIN(lineprefix); yylval.string = yytext; return LIBWRAPSTART; } YY_BREAK case 75: YY_RULE_SETUP #line 572 "config_scan.l" { BEGIN(start_servicename); yylval.string = yytext; return PAMSERVICENAME; } YY_BREAK /* * Old keywords that are no longer used. */ case 76: YY_RULE_SETUP #line 584 "config_scan.l" { yylval.string = yytext; return DEPRECATED; } YY_BREAK /* misc. generic stuff. */ case 77: YY_RULE_SETUP #line 593 "config_scan.l" { BEGIN(start_port); yylval.string = yytext; return IPADDRESS; } YY_BREAK case 78: YY_RULE_SETUP #line 601 "config_scan.l" { yylval.string = yytext; return NUMBER; } YY_BREAK /* ignored */ case 79: YY_RULE_SETUP #line 608 "config_scan.l" { ; } YY_BREAK /* shell style comment */ case 80: YY_RULE_SETUP #line 613 "config_scan.l" { ; } YY_BREAK /* state always ends at eol. */ case 81: YY_RULE_SETUP #line 618 "config_scan.l" { BEGIN(INITIAL); } YY_BREAK /* unless it's escaped. */ case 82: YY_RULE_SETUP #line 623 "config_scan.l" { ; } YY_BREAK case 83: YY_RULE_SETUP #line 627 "config_scan.l" { return *yytext; } YY_BREAK case 84: YY_RULE_SETUP #line 630 "config_scan.l" ECHO; YY_BREAK #line 2520 "config_scan.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(start_address): case YY_STATE_EOF(start_port): case YY_STATE_EOF(lineprefix): case YY_STATE_EOF(start_command): case YY_STATE_EOF(start_compatibility): case YY_STATE_EOF(start_line): case YY_STATE_EOF(start_log): case YY_STATE_EOF(start_logoutput): case YY_STATE_EOF(start_method): case YY_STATE_EOF(start_operator): case YY_STATE_EOF(start_option): case YY_STATE_EOF(start_proxyprotocol): case YY_STATE_EOF(start_username): case YY_STATE_EOF(start_portnumber): case YY_STATE_EOF(start_srchost): case YY_STATE_EOF(start_protocol): case YY_STATE_EOF(start_servicename): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_c_buf_p; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer() { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr; register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf, b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); yy_current_buffer->yy_n_chars = yy_n_chars; } if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state() { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; yy_state_ptr = yy_state_buf; *yy_state_ptr++ = yy_current_state; for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 947 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yy_state_ptr++ = yy_current_state; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { register int yy_is_jam; register YY_CHAR yy_c = 1; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 947 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 946); if ( ! yy_is_jam ) *yy_state_ptr++ = yy_current_state; return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; register char *yy_bp; #endif { register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_n_chars + 2; register char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); yy_current_buffer->yy_n_chars = yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; if ( c == '\n' ) --yylineno; yytext_ptr = yy_bp; yy_hold_char = *yy_cp; yy_c_buf_p = yy_cp; } #endif /* ifndef YY_NO_UNPUT */ #ifdef __cplusplus static int yyinput() #else static int input() #endif { int c; *yy_c_buf_p = yy_hold_char; if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ *yy_c_buf_p = '\0'; else { /* need more input */ int offset = yy_c_buf_p - yytext_ptr; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( yywrap() ) return EOF; if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + offset; break; } } } c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ *yy_c_buf_p = '\0'; /* preserve yytext */ yy_hold_char = *++yy_c_buf_p; if ( c == '\n' ) ++yylineno; return c; } #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) #else void yyrestart( input_file ) FILE *input_file; #endif { if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_init_buffer( yy_current_buffer, input_file ); yy_load_buffer_state(); } #ifdef YY_USE_PROTOS void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) #else void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { if ( yy_current_buffer == new_buffer ) return; if ( yy_current_buffer ) { /* Flush out information for old buffer. */ *yy_c_buf_p = yy_hold_char; yy_current_buffer->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = new_buffer; yy_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ yy_did_buffer_switch_on_eof = 1; } #ifdef YY_USE_PROTOS void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yyin = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) #else YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } #ifdef YY_USE_PROTOS void yy_delete_buffer( YY_BUFFER_STATE b ) #else void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yy_flex_free( (void *) b->yy_ch_buf ); yy_flex_free( (void *) b ); } #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE #include #endif #endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif { int oerrno = errno; yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; #if YY_ALWAYS_INTERACTIVE b->yy_is_interactive = 1; #else #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif errno = oerrno; } #ifdef YY_USE_PROTOS void yy_flush_buffer( YY_BUFFER_STATE b ) #else void yy_flush_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == yy_current_buffer ) yy_load_buffer_state(); } #ifndef YY_NO_SCAN_BUFFER #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) #else YY_BUFFER_STATE yy_scan_buffer( base, size ) char *base; yy_size_t size; #endif { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } #endif #ifndef YY_NO_SCAN_STRING #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) #else YY_BUFFER_STATE yy_scan_string( yy_str ) yyconst char *yy_str; #endif { int len; for ( len = 0; yy_str[len]; ++len ) ; return yy_scan_bytes( yy_str, len ); } #endif #ifndef YY_NO_SCAN_BYTES #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) #else YY_BUFFER_STATE yy_scan_bytes( bytes, len ) yyconst char *bytes; int len; #endif { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) yy_flex_alloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #endif #ifndef YY_NO_PUSH_STATE #ifdef YY_USE_PROTOS static void yy_push_state( int new_state ) #else static void yy_push_state( new_state ) int new_state; #endif { if ( yy_start_stack_ptr >= yy_start_stack_depth ) { yy_size_t new_size; yy_start_stack_depth += YY_START_STACK_INCR; new_size = yy_start_stack_depth * sizeof( int ); if ( ! yy_start_stack ) yy_start_stack = (int *) yy_flex_alloc( new_size ); else yy_start_stack = (int *) yy_flex_realloc( (void *) yy_start_stack, new_size ); if ( ! yy_start_stack ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } yy_start_stack[yy_start_stack_ptr++] = YY_START; BEGIN(new_state); } #endif #ifndef YY_NO_POP_STATE static void yy_pop_state() { if ( --yy_start_stack_ptr < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(yy_start_stack[yy_start_stack_ptr]); } #endif #ifndef YY_NO_TOP_STATE static int yy_top_state() { return yy_start_stack[yy_start_stack_ptr - 1]; } #endif #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif #ifdef YY_USE_PROTOS static void yy_fatal_error( yyconst char msg[] ) #else static void yy_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ yytext[yyleng] = yy_hold_char; \ yy_c_buf_p = yytext + n; \ yy_hold_char = *yy_c_buf_p; \ *yy_c_buf_p = '\0'; \ yyleng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef yytext_ptr #ifdef YY_USE_PROTOS static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) #else static void yy_flex_strncpy( s1, s2, n ) char *s1; yyconst char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN #ifdef YY_USE_PROTOS static int yy_flex_strlen( yyconst char *s ) #else static int yy_flex_strlen( s ) yyconst char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef YY_USE_PROTOS static void *yy_flex_alloc( yy_size_t size ) #else static void *yy_flex_alloc( size ) yy_size_t size; #endif { return (void *) malloc( size ); } #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, yy_size_t size ) #else static void *yy_flex_realloc( ptr, size ) void *ptr; yy_size_t size; #endif { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr ) #else static void yy_flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if YY_MAIN int main() { yylex(); return 0; } #endif #line 630 "config_scan.l" dante-1.1.19.dfsg/lib/config_scan.l0000644000175000017500000002273510351603142015476 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ %{ #include "common.h" #include "yacconfig.h" #include "config_parse.h" extern int socks_parseinit; extern const int socks_configtype; static const char rcsid[] = "$Id: config_scan.l,v 1.76 2005/12/19 14:22:13 michaels Exp $"; #define YY_STACK_USED 0 #define YY_ALWAYS_INTERACTIVE 0 #define YY_NEVER_INTERACTIVE 1 #define YY_MAIN 0 %} %option yylineno %option noyywrap /*%option debug */ PORTNUMBER [0-9]{1,5} /* non-exclusive startconditions. */ %s start_address %s start_port /* exclusive startconditions */ %x lineprefix %x start_command %x start_compatibility %x start_line %x start_log %x start_logoutput %x start_method %x start_operator %x start_option %x start_proxyprotocol %x start_username %x start_portnumber %x start_srchost %x start_protocol %x start_servicename %% /* * we can operate in more than one mode, find out which it is and * let the parser know. */ %{ if (!socks_parseinit) { socks_parseinit = 1; switch (socks_configtype) { case CONFIGTYPE_SERVER: return SERVERCONFIG; case CONFIGTYPE_CLIENT: return CLIENTCONFIG; default: SERRX(socks_configtype); } } %} /* start-condition dependent stuff. */ socks_v4 { yylval.string = yytext; return PROXYPROTOCOL_SOCKS_V4; } socks_v5 { yylval.string = yytext; return PROXYPROTOCOL_SOCKS_V5; } msproxy_v2 { yylval.string = yytext; return DEPRECATED; } http_v1.0 { yylval.string = yytext; return PROXYPROTOCOL_HTTP_V1_0; } bind { yylval.string = yytext; return COMMAND_BIND; } connect { yylval.string = yytext; return COMMAND_CONNECT; } udpassociate { yylval.string = yytext; return COMMAND_UDPASSOCIATE; } bindreply { yylval.string = yytext; return COMMAND_BINDREPLY; } udpreply { yylval.string = yytext; return COMMAND_UDPREPLY; } direct { yylval.string = yytext; return DIRECT; } port { BEGIN(start_operator); yylval.string = yytext; return PORT; } eq|=|neq|!=|ge|>=|le|<=|gt|>|lt|< { BEGIN(start_portnumber); yylval.string = yytext; return OPERATOR; } connect { yylval.string = yytext; return LOG_CONNECT; } data { yylval.string = yytext; return LOG_DATA; } disconnect { yylval.string = yytext; return LOG_DISCONNECT; } error { yylval.string = yytext; return LOG_ERROR; } iooperation { yylval.string = yytext; return LOG_IOOPERATION; } [a-zA-Z]+[^: /\t\n]* { BEGIN(INITIAL); yylval.string = yytext; return SERVICENAME; } {PORTNUMBER} { BEGIN(start_portnumber); /* no operator, first port in range then. */ yylval.string = yytext; return PORTNUMBER; } {PORTNUMBER} { BEGIN(INITIAL); yylval.string = yytext; return PORTNUMBER; } ([a-zA-Z0-9-]*\.[a-zA-Z0-9-]+[a-zA-Z\.-]*|\.) { BEGIN(start_port); yylval.string = yytext; return DOMAINNAME; } [a-zA-Z]+[0-9:]* { BEGIN(start_port); yylval.string = yytext; return IFNAME; } [^: \t\n]+ { yylval.string = yytext; return LOGFILE; } [^: \t\n]+ { yylval.string = yytext; return USERNAME; } : { BEGIN(start_line); yylval.string = yytext; return *yytext; } .* { BEGIN(INITIAL); yylval.string = yytext; return LINE; } nomismatch { yylval.string = yytext; return NOMISMATCH; } nounknown { yylval.string = yytext; return NOUNKNOWN; } tcp { yylval.string = yytext; return PROTOCOL_TCP; } udp { yylval.string = yytext; return PROTOCOL_UDP; } fake { yylval.string = yytext; return PROTOCOL_FAKE; } /* non-startcondition dependents. */ debug { yylval.string = yytext; return DEBUGING; } route { yylval.string = yytext; return ROUTE; } resolveprotocol { BEGIN(start_protocol); yylval.string = yytext; return RESOLVEPROTOCOL; } srchost { BEGIN(start_srchost); yylval.string = yytext; return SRCHOST; } proxyprotocol { BEGIN(start_proxyprotocol); yylval.string = yytext; return PROXYPROTOCOL; } logoutput { BEGIN(start_logoutput); yylval.string = yytext; return LOGOUTPUT; } protocol { BEGIN(start_protocol); yylval.string = yytext; return PROTOCOL; } command { BEGIN(start_command); yylval.string = yytext; return COMMAND; } redirect { yylval.string = yytext; return REDIRECT; } bandwidth { yylval.string = yytext; return BANDWIDTH; } maxsessions { yylval.string = yytext; return MAXSESSIONS; } from { BEGIN(start_address); yylval.string = yytext; return FROM; } to { BEGIN(start_address); yylval.string = yytext; return TO; } via { BEGIN(start_address); yylval.string = yytext; return VIA; } /* server configstuff */ internal { BEGIN(start_address); yylval.string = yytext; return INTERNAL; } external.rotation { yylval.string = yytext; return EXTERNAL_ROTATION; } route { yylval.string = yytext; return ROUTE; } none { yylval.string = yytext; return NONE; } external { BEGIN(start_address); yylval.string = yytext; return EXTERNAL; } child\.maxidle { yylval.string = yytext; return CHILD_MAXIDLE; } user { BEGIN(start_username); yylval.string = yytext; return USER; } user\.privileged { BEGIN(start_username); yylval.string = yytext; return USER_PRIVILEGED; } user\.notprivileged { BEGIN(start_username); yylval.string = yytext; return USER_UNPRIVILEGED; } user\.libwrap { BEGIN(start_username); yylval.string = yytext; return USER_LIBWRAP; } iotimeout { yylval.string = yytext; return IOTIMEOUT; } compatibility { yylval.string = yytext; return COMPATIBILITY; } reuseaddr { yylval.string = yytext; return REUSEADDR; } sameport { yylval.string = yytext; return SAMEPORT; } connecttimeout { yylval.string = yytext; return CONNECTTIMEOUT; } extension { yylval.string = yytext; return EXTENSION; } bind { yylval.string = yytext; return BIND; } client { yylval.string = yytext; return CLIENTRULE; } method { BEGIN(start_method); yylval.string = yytext; return METHOD; } clientmethod { BEGIN(start_method); yylval.string = yytext; return CLIENTMETHOD; } none { yylval.string = yytext; return NONE; } gssapi { yylval.string = yytext; return GSSAPI; } username { yylval.string = yytext; return UNAME; } rfc931 { yylval.string = yytext; return RFC931; } pam { yylval.string = yytext; return PAM; } /* filterrules */ /* * verdicts */ block { yylval.string = yytext; return VERDICT_BLOCK; } pass { yylval.string = yytext; return VERDICT_PASS; } /* * logging */ log { BEGIN(start_log); yylval.string = yytext; return LOG; } libwrap { BEGIN(lineprefix); yylval.string = yytext; return LIBWRAPSTART; } pam\.servicename|pamservicename { BEGIN(start_servicename); yylval.string = yytext; return PAMSERVICENAME; } /* * Old keywords that are no longer used. */ localdomain.*:.* { yylval.string = yytext; return DEPRECATED; } /* misc. generic stuff. */ <*>[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} { BEGIN(start_port); yylval.string = yytext; return IPADDRESS; } <*>[0-9]+ { yylval.string = yytext; return NUMBER; } /* ignored */ <*>[[:blank:]]+ { ; } /* shell style comment */ <*>[[:blank:]]*#.* { ; } /* state always ends at eol. */ <*>\n { BEGIN(INITIAL); } /* unless it's escaped. */ <*>\\\n { ; } <*>. { return *yytext; } dante-1.1.19.dfsg/lib/broken.c0000644000175000017500000000521407700305325014473 0ustar roamroam/* * $Id: broken.c,v 1.14 2003/07/01 13:21:25 michaels Exp $ * * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: broken.c,v 1.14 2003/07/01 13:21:25 michaels Exp $"; #if HAVE_SHADOW_H && HAVE_GETSPNAM #include #endif /* HAVE_SHADOW_H && HAVE_GETSPNAM */ struct passwd * socks_getpwnam(login) const char *login; { struct passwd *pwd; if ((pwd = getpwnam(login)) == NULL) return NULL; #if HAVE_GETSPNAM /* broken sysv stuff. */ { struct spwd *spwd; if ((spwd = getspnam(login)) != NULL) pwd->pw_passwd = spwd->sp_pwdp; } #elif HAVE_GETPRPWNAM /* some other broken stuff. */ /* * XXX, don't know how this looks yet. */ /* getprpwnam(login); */ #endif return pwd; } dante-1.1.19.dfsg/lib/Rbind.c0000754000175000017500000002303310356724075014262 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: Rbind.c,v 1.120 2006/01/03 16:54:03 michaels Exp $"; int Rbind(s, name, namelen) int s; const struct sockaddr *name; socklen_t namelen; { const char *function = "Rbind()"; struct socks_t packet; struct socksfd_t socksfd; int type, rc; socklen_t len; clientinit(); slog(LOG_DEBUG, "%s", function); /* * Nothing can be called before Rbind(), delete any old cruft. */ socks_rmaddr((unsigned int)s); if (name->sa_family != AF_INET) { slog(LOG_DEBUG, "%s: unsupported address family '%d', fallback to system bind()", function, name->sa_family); return bind(s, name, namelen); } if ((rc = bind(s, name, namelen)) != 0) { switch (errno) { case EADDRNOTAVAIL: { /* LINTED pointer casts may be troublesome */ struct sockaddr_in newname = *TOCIN(name); /* * We try to make the client think it's address is the address * the server is using on it's behalf. Some clients might try * bind that IP address (with a different port, presumably) * themselves though, in that case, use INADDR_ANY. */ newname.sin_addr.s_addr = htonl(INADDR_ANY); /* LINTED pointer casts may be troublesome */ if (bind(s, (struct sockaddr *)&newname, sizeof(newname)) != 0) return -1; break; } case EINVAL: { struct sockaddr_in addr; socklen_t addrlen; int errno_s = errno; /* * Do a little testing on what caused the error. */ addrlen = sizeof(addr); /* LINTED pointer casts may be troublesome */ if (getsockname(s, (struct sockaddr *)&addr, &addrlen) != 0 || addr.sin_port == htons(0)) { errno = errno_s; return -1; } /* * Somehow the socket has been bound locally already. * Best guess is probably to keep that and attempt a * remote server binding aswell. */ break; } default: return -1; } } /* hack for performance testing. */ if (getenv("SOCKS_BINDLOCALONLY") != NULL) return rc; len = sizeof(type); if (getsockopt(s, SOL_SOCKET, SO_TYPE, &type, &len) != 0) return -1; switch (type) { case SOCK_DGRAM: { swarnx("%s: binding UDP sockets is not supported by the socks " "protocol,\n" "contact Inferno Nettverk A/S for more information.", function); return 0; /* cross our fingers and hope the local bind is enough. */ #if 0 /* LINTED pointer casts may be troublesome */ if (udpconnect((unsigned int)s, name, SOCKS_RECV) != 0) return -1; bzero(&to, sizeof(to)); to.sin_family = AF_INET; to.sin_addr.s_addr = htonl(0); to.sin_port = htons(0); /* LINTED pointer casts may be troublesome */ if ((s = Rsendto(s, NULL, 0, 0, (struct sockaddr *)&to, sizeof(to))) != 0) return -1; return 0; #endif } } bzero(&socksfd, sizeof(socksfd)); len = sizeof(socksfd.local); if (getsockname(s, &socksfd.local, &len) != 0) { close(socksfd.control); return -1; } bzero(&packet, sizeof(packet)); packet.req.version = SOCKS_V5; packet.auth.method = AUTHMETHOD_NOTSET; packet.req.command = SOCKS_BIND; packet.req.host.atype = SOCKS_ADDR_IPV4; /* try to get a server that supports our bindextension. */ packet.req.host.addr.ipv4.s_addr = htonl(0); /* LINTED pointer casts may be troublesome */ packet.req.host.port = TOIN(&socksfd.local)->sin_port; if (socks_requestpolish(&packet.req, NULL, NULL) == NULL) return 0; /* no route, socket bound, hope local bind is enough. */ packet.version = packet.req.version; switch (packet.req.version) { case SOCKS_V4: case SOCKS_V5: { int portisreserved; if ((socksfd.control = socketoptdup(s)) == -1) return -1; switch (packet.req.version) { case SOCKS_V4: /* * v4 can only specify wanted port by using bind extension. */ SASSERTX(packet.req.host.atype == SOCKS_ADDR_IPV4); if (packet.req.host.addr.ipv4.s_addr == ntohl(0)) portisreserved = PORTISRESERVED(packet.req.host.port); else portisreserved = 0; break; case SOCKS_V5: portisreserved = PORTISRESERVED(packet.req.host.port); break; default: SERRX(packet.req.version); } if (portisreserved) { int p; struct sockaddr_in controladdr; /* * Our caller has gotten a reserved port. It is possible the * server will differentiate between requests coming from * privileged ports and those not so try to connect to server * from a privileged port. */ bzero(&controladdr, sizeof(controladdr)); controladdr.sin_family = AF_INET; controladdr.sin_addr.s_addr = htonl(INADDR_ANY); controladdr.sin_port = htons(0); if ((p = bindresvport(socksfd.control, &controladdr)) != 0) { controladdr.sin_port = htons(0); /* LINTED pointer casts may be troublesome */ p = bind(socksfd.control, (struct sockaddr *)&controladdr, sizeof(controladdr)); } if (p != 0) { close(socksfd.control); return -1; } } break; } case MSPROXY_V2: if ((socksfd.control = socket(AF_INET, SOCK_DGRAM, 0)) == -1) return -1; break; default: SERRX(packet.req.version); } if ((socksfd.route = socks_connectroute(socksfd.control, &packet, NULL, NULL)) == NULL) { close(socksfd.control); return 0; /* have done a normal bind and no route, assume local. */ } if (socks_negotiate(s, socksfd.control, &packet, socksfd.route) != 0) { close(socksfd.control); return -1; } socksfd.state.auth = packet.auth; socksfd.state.command = SOCKS_BIND; socksfd.state.protocol.tcp = 1; socksfd.state.version = packet.req.version; sockshost2sockaddr(&packet.res.host, &socksfd.remote); switch (packet.req.version) { case SOCKS_V4: /* LINTED pointer casts may be troublesome */ if (TOIN(&socksfd.remote)->sin_addr.s_addr == htonl(0)) { /* v4 specific; remote doesn't know, set to remote. */ struct sockaddr_in addr; len = sizeof(addr); /* LINTED pointer casts may be troublesome */ if (getpeername(socksfd.control, (struct sockaddr *)&addr, &len) != 0) SERR(-1); /* LINTED pointer casts may be troublesome */ TOIN(&socksfd.remote)->sin_addr = addr.sin_addr; } /* FALLTHROUGH */ case SOCKS_V5: socksfd.reply = socksfd.remote; /* same IP address. */ socksfd.state.acceptpending = socksfd.route->gw.state.extension.bind; break; case MSPROXY_V2: socksfd.state.acceptpending = 1; /* separate data connection. */ socksfd.state.msproxy = packet.state.msproxy; /* don't know what address connection will be forwarded from yet. */ break; default: SERRX(packet.req.version); } /* did we get the requested port? */ /* LINTED pointer casts may be troublesome */ if (TOCIN(name)->sin_port != htons(0) && TOCIN(name)->sin_port != TOIN(&socksfd.remote)->sin_port) { /* no. */ /* * Since the socket is already bound locally, "unbind" it so caller * doesn't get confused. */ int new_s; close(socksfd.control); if ((new_s = socketoptdup(s)) == -1) return -1; dup2(new_s, s); close(new_s); errno = EADDRINUSE; return -1; } len = sizeof(socksfd.server); if (getpeername(socksfd.control, &socksfd.server, &len) != 0) { close(socksfd.control); return -1; } switch (socksfd.state.version) { case SOCKS_V4: case SOCKS_V5: socks_addaddr((unsigned int)s, &socksfd); break; case MSPROXY_V2: /* more talk will have to occur before we can perform a accept(). */ socksfd.state.inprogress = 1; socks_addaddr((unsigned int)s, &socksfd); if (msproxy_sigio(s) != 0) { socks_rmaddr((unsigned int)s); return -1; } break; default: SERRX(socksfd.state.version); } return 0; } dante-1.1.19.dfsg/lib/httpproxy.c0000644000175000017500000001340310355510522015270 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: httpproxy.c,v 1.16 2005/12/31 13:59:47 michaels Exp $"; int httpproxy_negotiate(s, packet) int s; struct socks_t *packet; { const char *function = "httpproxy_negotiate()"; char buf[MAXHOSTNAMELEN + 512]; /* +512 for httpbabble. */ char host[MAXSOCKSHOSTSTRING]; int checked, eof; ssize_t len, rc; struct sockaddr addr; socklen_t addrlen; slog(LOG_DEBUG, function); sockshost2string(&packet->req.host, host, sizeof(host)); /* * replace the dot that sockshost2string uses to separate port from host * with http's ':'. */ *strrchr(host, '.') = ':'; len = snprintfn(buf, sizeof(buf), "CONNECT %s HTTP/1.0\r\n" "User-agent: %s/client v%s\r\n" "\r\n", host, PACKAGE, VERSION); slog(LOG_DEBUG, "%s: sending: %s", function, buf); if ((rc = writen(s, buf, (size_t)len, NULL)) != len) { swarn("%s: wrote %d/%d bytes", function, rc, len); return -1; } eof = checked = 0; /* * read til eof so there's no junk left in buffer for client, then return * reply. */ do { char *eol; const char *terminator = "\r\n"; /* * -1 so we can NUL-terminate, and - length of terminator so we can * read the missing bits if neccessary. */ switch(len = read(s, buf, sizeof(buf) - 1 - (strlen(terminator) + 1))) { case -1: swarn("%s: read()", function); return -1; case 0: eof = 1; break; } /* * if last char we read is start of terminator, * read some more to make sure the terminator does not get split * accross buffers. */ if (buf[len - 1] == *terminator) switch(rc = read(s, &buf[len], strlen(terminator) - 1)) { case -1: swarn("%s: read()", function); return -1; case 0: eof = 1; break; default: len += rc; } buf[len] = NUL; while ((eol = strstr(buf, terminator)) != NULL) { /* new line. */ *eol = NUL; slog(LOG_DEBUG, "%s: read: %s", function, buf); if (!checked) { int error = 0; switch (packet->req.version) { case HTTP_V1_0: { const char *offset = "HTTP/1.0 "; if (strncmp(buf, offset, strlen(offset)) != 0) { error = 1; break; } if (!isdigit(buf[strlen(offset)])) { error = 1; break; } packet->res.version = packet->req.version; /* * XXX we've assumed that a reply is the size of a socks * reply, http replies can however be bigger. :-/ */ /* * http replycode is > 8 bits, socks is 8 bits. * Just make sure we don't end up truncating to * HTTP_SUCCESS. */ rc = atoi(&buf[strlen(offset)]); if (rc != HTTP_SUCCESS && (unsigned char)rc == HTTP_SUCCESS) rc = 0; packet->res.reply = (unsigned char)rc; /* * we don't know what address the server will use on * our behalf, set it to what we use, better than nothing. */ addrlen = sizeof(addr); if (getsockname(s, &addr, &addrlen) != 0) SWARN(s); sockaddr2sockshost(&addr, &packet->res.host); checked = 1; break; } default: SERRX(packet->req.version); } if (error) { swarnx("%s: unknown response: \"%s\"", function, buf); errno = ECONNREFUSED; return -1; } } /* shift out the line we just parsed. */ len -= (eol + strlen(terminator)) - buf; SASSERTX(len >= 0); SASSERTX((size_t)len < sizeof(buf)); memmove(buf, eol + strlen(terminator), (size_t)len); buf[len] = NUL; if (strcmp(buf, terminator) == 0) eof = 1; /* empty line, end of response. */ } if (*buf != NUL) slog(LOG_DEBUG, "%s: read: %s", function, buf); } while (!eof); if (checked) return packet->res.reply == HTTP_SUCCESS ? 0 : -1; slog(LOG_DEBUG, "%s: didn't get statuscode from proxy", function); return -1; /* proxyserver doing something strange/unknown. */ } dante-1.1.19.dfsg/lib/addressmatch.c0000644000175000017500000003476310247253161015670 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: addressmatch.c,v 1.10 2005/05/28 17:12:37 michaels Exp $"; __BEGIN_DECLS static int addrisinlist __P((const struct in_addr *addr, const struct in_addr *mask, const struct in_addr **list)); /* * Compares "addr" bitwise anded with "mask" against each element in * "list" bitwise anded with "mask". "list" is NULL terminated. * Returns: * If "list" contains a element matching "addr" and "mask": true * else: false */ static int addrareeq __P((const struct in_addr *addr, const struct in_addr *mask, const struct in_addr *against)); /* * Compares "addr" bitwise anded with "mask" against "against" bitwise * anded with "mask". * Returns: * If "against" matches "addr" and "mask": true * else: false */ static int hostisinlist __P((const char *host, const char **list)); /* * Compares "host" against each element in "list", which is NULL * terminated. * Note that if "host" starts with a dot, it will match "list" if the * last part of "list" matches the part after the dot in "host". * Returns: * If "list" contains a element matching "host": true * else: false */ static int hostareeq __P((const char *domain, const char *remotedomain)); /* * Compares the rulegiven domain "domain" against "remotedomain". * Note that if "domain" starts with a dot, it will match * "remotedomain" if the last part of "remotedomain" matches * the part after the dot in "domain". * Returns: * on match: true * else: false */ __END_DECLS int addressmatch(rule, address, protocol, alias) const struct ruleaddress_t *rule; const struct sockshost_t *address; int protocol; int alias; { const char *function = "addressmatch()"; struct hostent *hostent; in_port_t ruleport; int matched, doresolve; char rstring[MAXRULEADDRSTRING], astring[MAXSOCKSHOSTSTRING]; slog(LOG_DEBUG, "%s: %s, %s, %s, %d", function, ruleaddress2string(rule, rstring, sizeof(rstring)), sockshost2string(address, astring, sizeof(astring)), protocol2string(protocol), alias); /* test port first since we always have all info needed for that locally. */ switch (protocol) { case SOCKS_TCP: ruleport = rule->port.tcp; break; case SOCKS_UDP: ruleport = rule->port.udp; break; default: SERRX(protocol); } switch (rule->operator) { case none: break; case eq: if (address->port == ruleport) break; return 0; case neq: if (address->port != ruleport) break; return 0; case ge: if (ntohs(address->port) >= ntohs(ruleport)) break; return 0; case le: if (ntohs(address->port) <= ntohs(ruleport)) break; return 0; case gt: if (ntohs(address->port) > ntohs(ruleport)) break; return 0; case lt: if (ntohs(address->port) < ntohs(ruleport)) break; return 0; case range: if (ntohs(address->port) >= ntohs(ruleport) && ntohs(address->port) <= ntohs(rule->portend)) break; return 0; default: SERRX(rule->operator); } /* only needed for client really... */ switch (sockscf.resolveprotocol) { case RESOLVEPROTOCOL_TCP: case RESOLVEPROTOCOL_UDP: doresolve = 1; break; case RESOLVEPROTOCOL_FAKE: doresolve = 0; break; default: SERRX(sockscf.resolveprotocol); } /* * The hard work begins. */ matched = 0; /* * if mask of rule is 0, it should match anything. Try that first * so we can save lots of potentioally heavy work. */ if (rule->atype == SOCKS_ADDR_IPV4 && (rule->addr.ipv4.mask.s_addr == 0)) matched = 1; else if (rule->atype == SOCKS_ADDR_IPV4 && address->atype == SOCKS_ADDR_DOMAIN) { /* * match(rule.ipaddress, address.hostname) * resolve address to ipaddress(es) and try to match each * resolved IP address against rule. * rule isin address->ipaddress(es) * . */ if (!doresolve) return 0; /* LINTED pointer casts may be troublesome */ if ((hostent = gethostbyname(address->addr.domain)) == NULL) { slog(LOG_DEBUG, "%s: gethostbyname(%s): %s", function, address->addr.domain, hstrerror(h_errno)); return 0; } matched = addrisinlist(&rule->addr.ipv4.ip, &rule->addr.ipv4.mask, (const struct in_addr **)hostent->h_addr_list); } else if (rule->atype == SOCKS_ADDR_IPV4 && address->atype == SOCKS_ADDR_IPV4) { /* * match(rule.ipaddress, address.ipaddress) * try first a simple comparison, address against rule. */ if (!(matched = addrareeq(&rule->addr.ipv4.ip, &rule->addr.ipv4.mask, &address->addr.ipv4))) { /* * Didn't match. If alias is set, try to resolve address * to hostname(s), the hostname back to IP address(es) and * then match those IP address(es) against rule. * rule isin address->hostname(s)->ipaddress(es) * . */ if (!doresolve) return 0; if (alias) { char *nexthost; int i; /* LINTED pointer casts may be troublesome */ if ((hostent = gethostbyaddr((const char *)&address->addr.ipv4, sizeof(address->addr.ipv4), AF_INET)) == NULL) { slog(LOG_DEBUG, "%s: %s: %s", function, inet_ntoa(address->addr.ipv4), hstrerror(h_errno)); return 0; } if ((hostent = hostentdup(hostent)) == NULL) { swarnx("%s: hostentdup()", function); return 0; } nexthost = hostent->h_name; i = 0; do { struct hostent *iphostent; /* iphostent = address->hostname(s)->ipaddress(es) */ if ((iphostent = gethostbyname(nexthost)) == NULL) { slog(LOG_DEBUG, "%s: gethostbyname(%s): %s", function, nexthost, hstrerror(h_errno)); continue; } /* rule isin address->hostname(s)->ipaddress(es) */ if (addrisinlist(&rule->addr.ipv4.ip, &rule->addr.ipv4.mask, (const struct in_addr **)iphostent->h_addr_list)) { matched = 1; break; } } while (hostent->h_aliases != NULL && (nexthost = hostent->h_aliases[i++]) != NULL); hostentfree(hostent); } if (!matched) return 0; } } else if (rule->atype == SOCKS_ADDR_DOMAIN && address->atype == SOCKS_ADDR_DOMAIN) { /* * match(rule.hostname, address.hostname) * Try simple match first. * * If no go and rule is a hostname rather than a domain, * resolve both rule and address to IP address(es) and compare * each IP address of resolved rule against each IP address of * resolved address. * rule->ipaddress(es) isin address->ipaddress(es) * . * */ if (hostareeq(rule->addr.domain, address->addr.domain)) matched = 1; else if (doresolve && *rule->addr.domain != '.') { struct hostent *addresshostent; struct in_addr mask; int i; if ((hostent = gethostbyname(rule->addr.domain)) == NULL) { slog(LOG_DEBUG, "%s: gethostbyname(%s): %s", function, rule->addr.domain, hstrerror(h_errno)); return 0; } if ((hostent = hostentdup(hostent)) == NULL) { swarnx("%s: hostentdup()", function); return 0; } if ((addresshostent = gethostbyname(address->addr.domain)) == NULL) { slog(LOG_DEBUG, "%s: gethostbyname(%s): %s", function, address->addr.domain, hstrerror(h_errno)); hostentfree(hostent); return 0; } /* * rule->ipaddress(es) isin address->ipaddress(es) */ if (hostent->h_addr_list == NULL) { hostentfree(hostent); return 0; } mask.s_addr = htonl(0xffffffff); for (i = 0; !matched && hostent->h_addr_list[i] != NULL; ++i) /* LINTED pointer casts may be troublesome */ matched = addrisinlist((const struct in_addr *)hostent->h_addr_list[i], &mask, (const struct in_addr **)addresshostent->h_addr_list); hostentfree(hostent); } if (!matched) return 0; } else if (rule->atype == SOCKS_ADDR_DOMAIN && address->atype == SOCKS_ADDR_IPV4) { /* * match(rule.hostname, address.ipaddress) * If rule is not a domain, try resolving rule to IP address(es) * and match against address. * address isin rule->ipaddress * . * * If no match, resolve address to hostname(s) and match each * against rule. * rule isin address->hostname * . * * If still no match and alias is set, resolve all IP addresses * of all hostname(s) resolved from address back to hostname(s) * and match them against rule. * rule isin address->hostname->ipaddress->hostname * . */ if (!doresolve) return 0; if (*rule->addr.domain != '.') { /* address isin rule->ipaddress */ struct in_addr mask; if ((hostent = gethostbyname(rule->addr.domain)) == NULL) { slog(LOG_DEBUG, "%s: gethostbyname(%s): %s", function, rule->addr.domain, hstrerror(h_errno)); return 0; } mask.s_addr = htonl(0xffffffff); matched = addrisinlist(&address->addr.ipv4, &mask, (const struct in_addr **)hostent->h_addr_list); } if (!matched) { /* rule isin address->hostname */ /* LINTED pointer casts may be troublesome */ if ((hostent = gethostbyaddr((const char *)&address->addr.ipv4, sizeof(address->addr.ipv4), AF_INET)) == NULL) { slog(LOG_DEBUG, "%s: gethostbyaddr(%s): %s", function, inet_ntoa(address->addr.ipv4), hstrerror(h_errno)); return 0; } if (hostareeq(rule->addr.domain, hostent->h_name) || hostisinlist(rule->addr.domain, (const char **)hostent->h_aliases)) matched = 1; } if (!matched && alias) { /* * rule isin address->hostname->ipaddress->hostname. * hostent is already address->hostname due to above. */ char *nexthost; int i; if ((hostent = hostentdup(hostent)) == NULL) { swarnx("%s: hostentdup()", function); return 0; } nexthost = hostent->h_name; i = 0; do { int ii; struct hostent *host; /* host; address->hostname->ipaddress */ if ((host = gethostbyname(nexthost)) == NULL) { slog(LOG_DEBUG, "%s: gethostbyname(%s): %s", function, nexthost, hstrerror(h_errno)); continue; } if ((host = hostentdup(host)) == NULL) { swarnx("%s: hostentdup()", function); break; } /* LINTED pointer casts may be troublesome */ for (ii = 0; host->h_addr_list != NULL && host->h_addr_list[ii] != NULL; ++ii) { struct hostent *ip; /* ip; address->hostname->ipaddress->hostname */ if ((ip = gethostbyaddr(host->h_addr_list[ii], sizeof(struct in_addr), AF_INET)) == NULL) { /* LINTED pointer casts may be troublesome */ slog(LOG_DEBUG, "%s: gethostbyaddr(%s): %s", function, inet_ntoa(*(struct in_addr *)host->h_addr_list[ii]), hstrerror(h_errno)); continue; } if (hostareeq(rule->addr.domain, ip->h_name) || hostisinlist(rule->addr.domain, (const char **)ip->h_aliases)) { matched = 1; break; } } hostentfree(host); } while (!matched && hostent->h_aliases != NULL && (nexthost = hostent->h_aliases[i++]) != NULL); hostentfree(hostent); } if (!matched) return 0; } else if (rule->atype == SOCKS_ADDR_IFNAME) { /* * Like ipaddress, just call it for each IP address of interface. * * match(rule.ifname2ipaddress, address) */ int i; struct sockaddr sa; i = 0; while (!matched && ifname2sockaddr(rule->addr.ifname, i++, &sa) != NULL) { struct ruleaddress_t ruleaddr; ruleaddr = *rule; /* identical except addr field. */ ruleaddr.atype = SOCKS_ADDR_IPV4; /* LINTED pointer casts may be troublesome */ ruleaddr.addr.ipv4.ip = TOIN(&sa)->sin_addr; ruleaddr.addr.ipv4.mask.s_addr = htonl(0xffffffff); matched = addressmatch(&ruleaddr, address, protocol, alias); } } else SERRX(0); return matched; } static int addrisinlist(addr, mask, list) const struct in_addr *addr; const struct in_addr *mask; const struct in_addr **list; { if (list == NULL) return 0; while (*list != NULL) if (addrareeq(addr, mask, *list)) return 1; else ++list; return 0; } static int addrareeq(addr, mask, against) const struct in_addr *addr; const struct in_addr *mask; const struct in_addr *against; { if ((addr->s_addr & mask->s_addr) == (against->s_addr & mask->s_addr)) return 1; return 0; } static int hostisinlist(host, list) const char *host; const char **list; { if (list == NULL) return 0; while (*list != NULL) if (hostareeq(host, *list)) return 1; else ++list; return 0; } static int hostareeq(domain, remotedomain) const char *domain; const char *remotedomain; { const int domainlen = strlen(domain); const int remotedomainlen = strlen(remotedomain); if (*domain == '.') { /* match everything ending in domain */ if (domainlen - 1 > remotedomainlen) return 0; /* address to compare against too short, can't match. */ return strcasecmp(domain + 1, remotedomain + (remotedomainlen - (domainlen - 1))) == 0; } else /* need exact match. */ return strcasecmp(domain, remotedomain) == 0; } dante-1.1.19.dfsg/lib/config_parse.c0000644000175000017500000017001310364161443015653 0ustar roamroam#ifndef lint /*static char yysccsid[] = "from: @(#)yaccpar 1.9 (Berkeley) 02/21/93";*/ static char yyrcsid[] #if __GNUC__ >= 2 __attribute__ ((unused)) #endif /* __GNUC__ >= 2 */ = "$OpenBSD: skeleton.c,v 1.23 2004/03/12 13:39:50 henning Exp $"; #endif #include #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 #define YYLEX yylex() #define YYEMPTY -1 #define yyclearin (yychar=(YYEMPTY)) #define yyerrok (yyerrflag=0) #define YYRECOVERING() (yyerrflag!=0) #define yyparse socks_yyparse #define yylex socks_yylex #define yyerror socks_yyerror #define yychar socks_yychar #define yyval socks_yyval #define yylval socks_yylval #define yydebug socks_yydebug #define yynerrs socks_yynerrs #define yyerrflag socks_yyerrflag #define yyss socks_yyss #define yysslim socks_yysslim #define yyssp socks_yyssp #define yyvs socks_yyvs #define yyvsp socks_yyvsp #define yystacksize socks_yystacksize #define yylhs socks_yylhs #define yylen socks_yylen #define yydefred socks_yydefred #define yydgoto socks_yydgoto #define yysindex socks_yysindex #define yyrindex socks_yyrindex #define yygindex socks_yygindex #define yytable socks_yytable #define yycheck socks_yycheck #define yyname socks_yyname #define yyrule socks_yyrule #define YYPREFIX "socks_yy" #line 45 "config_parse.y" #include "common.h" #include "yacconfig.h" static const char rcsid[] = "$Id: config_parse.y,v 1.199 2006/01/20 12:59:06 michaels Exp $"; __BEGIN_DECLS #if HAVE_LIBWRAP && SOCKS_SERVER extern jmp_buf tcpd_buf; #endif /* HAVE_LIBWRAP && SOCKS_SERVER */ static void addressinit __P((struct ruleaddress_t *address)); #if SOCKS_SERVER static void ruleinit __P((struct rule_t *rule)); static void fixconfig __P((void)); #endif __END_DECLS extern int yylineno; extern char *yytext; #if SOCKS_SERVER static struct rule_t ruleinitmem; static struct rule_t rule; /* new rule. */ static struct protocol_t protocolmem; /* new protocolmem. */ #endif static struct serverstate_t state; static struct route_t route; /* new route. */ static struct ruleaddress_t gw; /* new gateway. */ static struct ruleaddress_t src; /* new src. */ static struct ruleaddress_t dst; /* new dst. */ static struct ruleaddress_t rdr_from; static struct ruleaddress_t rdr_to; static struct ruleaddress_t *ruleaddress; /* current ruleaddress */ static struct extension_t *extension; /* new extensions */ static struct proxyprotocol_t *proxyprotocol;/* proxy protocol. */ static char *atype; /* atype of new address. */ static struct in_addr *ipaddr; /* new ipaddress */ static struct in_addr *netmask; /* new netmask */ static char *domain; /* new domain. */ static char *ifname; /* new ifname. */ static in_port_t *port_tcp; /* new TCP portnumber. */ static in_port_t *port_udp; /* new UDP portnumber. */ static int *methodv; /* new authmethods. */ static size_t *methodc; /* number of them. */ static struct protocol_t *protocol; /* new protocol. */ static struct command_t *command; /* new command. */ static enum operator_t *operator; /* new operator. */ static const struct { const char *name; const int value; } syslogfacilityv[] = { #ifdef LOG_AUTH { "auth", LOG_AUTH }, #endif /* LOG_AUTH */ #ifdef LOG_AUTHPRIV { "authpriv", LOG_AUTHPRIV }, #endif /* LOG_AUTHPRIV */ #ifdef LOG_DAEMON { "daemon", LOG_DAEMON }, #endif /* LOG_DAEMON */ #ifdef LOG_USER { "user", LOG_USER }, #endif /* LOG_USER */ #ifdef LOG_LOCAL0 { "local0", LOG_LOCAL0 }, #endif /* LOG_LOCAL0 */ #ifdef LOG_LOCAL1 { "local1", LOG_LOCAL1 }, #endif /* LOG_LOCAL1 */ #ifdef LOG_LOCAL2 { "local2", LOG_LOCAL2 }, #endif /* LOG_LOCAL2 */ #ifdef LOG_LOCAL3 { "local3", LOG_LOCAL3 }, #endif /* LOG_LOCAL3 */ #ifdef LOG_LOCAL4 { "local4", LOG_LOCAL4 }, #endif /* LOG_LOCAL4 */ #ifdef LOG_LOCAL5 { "local5", LOG_LOCAL5 }, #endif /* LOG_LOCAL5 */ #ifdef LOG_LOCAL6 { "local6", LOG_LOCAL6 }, #endif /* LOG_LOCAL6 */ #ifdef LOG_LOCAL7 { "local7", LOG_LOCAL7 } #endif /* LOG_LOCAL7 */ }; #define YYDEBUG 1 #define ADDMETHOD(method) \ do { \ if (methodisset(method, methodv, *methodc)) \ yywarn("duplicate method: %s", method2string(method)); \ else { \ if (*methodc >= MAXMETHOD) \ yyerror("internal error, (%d >= %d)", *methodc, MAXMETHOD); \ methodv[(*methodc)++] = method; \ } \ } while (0) #line 167 "config_parse.y" #ifndef YYSTYPE_DEFINED #define YYSTYPE_DEFINED typedef union { char *string; uid_t uid; } YYSTYPE; #endif /* YYSTYPE_DEFINED */ #line 175 "config_parse.c" #define SERVERCONFIG 257 #define CLIENTCONFIG 258 #define DEPRECATED 259 #define CLIENTRULE 260 #define INTERNAL 261 #define EXTERNAL 262 #define EXTERNAL_ROTATION 263 #define DEBUGING 264 #define RESOLVEPROTOCOL 265 #define SRCHOST 266 #define NOMISMATCH 267 #define NOUNKNOWN 268 #define EXTENSION 269 #define BIND 270 #define PRIVILEGED 271 #define IOTIMEOUT 272 #define CONNECTTIMEOUT 273 #define METHOD 274 #define CLIENTMETHOD 275 #define NONE 276 #define GSSAPI 277 #define UNAME 278 #define RFC931 279 #define PAM 280 #define COMPATIBILITY 281 #define REUSEADDR 282 #define SAMEPORT 283 #define USERNAME 284 #define USER_PRIVILEGED 285 #define USER_UNPRIVILEGED 286 #define USER_LIBWRAP 287 #define LOGOUTPUT 288 #define LOGFILE 289 #define CHILD_MAXIDLE 290 #define ROUTE 291 #define VIA 292 #define VERDICT_BLOCK 293 #define VERDICT_PASS 294 #define PAMSERVICENAME 295 #define PROTOCOL 296 #define PROTOCOL_TCP 297 #define PROTOCOL_UDP 298 #define PROTOCOL_FAKE 299 #define PROXYPROTOCOL 300 #define PROXYPROTOCOL_SOCKS_V4 301 #define PROXYPROTOCOL_SOCKS_V5 302 #define PROXYPROTOCOL_MSPROXY_V2 303 #define PROXYPROTOCOL_HTTP_V1_0 304 #define USER 305 #define COMMAND 306 #define COMMAND_BIND 307 #define COMMAND_CONNECT 308 #define COMMAND_UDPASSOCIATE 309 #define COMMAND_BINDREPLY 310 #define COMMAND_UDPREPLY 311 #define ACTION 312 #define LINE 313 #define LIBWRAPSTART 314 #define OPERATOR 315 #define LOG 316 #define LOG_CONNECT 317 #define LOG_DATA 318 #define LOG_DISCONNECT 319 #define LOG_ERROR 320 #define LOG_IOOPERATION 321 #define IPADDRESS 322 #define DOMAINNAME 323 #define DIRECT 324 #define IFNAME 325 #define PORT 326 #define PORTNUMBER 327 #define SERVICENAME 328 #define NUMBER 329 #define FROM 330 #define TO 331 #define REDIRECT 332 #define BANDWIDTH 333 #define MAXSESSIONS 334 #define YYERRCODE 256 #if defined(__cplusplus) || defined(__STDC__) const short socks_yylhs[] = #else short socks_yylhs[] = #endif { -1, 0, 0, 53, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 27, 28, 28, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 52, 52, 52, 52, 52, 52, 3, 61, 26, 7, 8, 8, 8, 8, 8, 9, 9, 10, 11, 12, 12, 33, 34, 35, 35, 36, 37, 38, 39, 40, 40, 29, 29, 29, 41, 42, 43, 43, 60, 55, 55, 55, 56, 57, 58, 59, 31, 32, 30, 44, 45, 45, 46, 46, 14, 15, 15, 15, 16, 17, 17, 18, 18, 49, 98, 47, 99, 48, 51, 51, 51, 51, 51, 50, 50, 69, 70, 71, 71, 66, 67, 67, 67, 67, 67, 67, 68, 68, 72, 72, 72, 72, 72, 72, 73, 73, 19, 21, 21, 21, 21, 21, 20, 20, 4, 6, 6, 5, 5, 74, 22, 22, 24, 25, 23, 75, 77, 77, 77, 77, 77, 76, 76, 13, 78, 79, 80, 100, 101, 63, 64, 64, 64, 64, 64, 65, 65, 89, 90, 102, 103, 62, 81, 81, 81, 82, 82, 82, 83, 83, 83, 85, 85, 85, 84, 91, 91, 86, 87, 88, 92, 92, 92, 96, 96, 93, 94, 104, 97, 95, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yylen[] = #else short socks_yylen[] = #endif { 2, 2, 2, 1, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 4, 0, 4, 0, 3, 3, 1, 1, 1, 3, 1, 1, 2, 3, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, 2, 3, 1, 1, 1, 3, 1, 1, 1, 2, 3, 0, 4, 0, 4, 1, 1, 1, 1, 1, 1, 2, 7, 1, 0, 2, 6, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 2, 1, 3, 3, 3, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 4, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 3, 2, 1, 1, 3, 1, 1, 1, 1, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yydefred[] = #else short socks_yydefred[] = #endif { 0, 3, 14, 0, 10, 4, 0, 0, 33, 0, 0, 0, 35, 11, 16, 60, 12, 15, 59, 58, 13, 0, 53, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 122, 5, 19, 31, 32, 30, 28, 29, 20, 21, 22, 23, 27, 17, 18, 24, 6, 25, 66, 67, 68, 26, 9, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 93, 0, 0, 0, 0, 0, 0, 75, 83, 84, 82, 81, 62, 0, 61, 0, 0, 0, 0, 56, 57, 86, 87, 0, 85, 49, 0, 48, 73, 74, 0, 0, 77, 78, 0, 76, 72, 69, 70, 71, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 111, 119, 118, 109, 112, 108, 120, 139, 115, 0, 0, 107, 117, 116, 64, 159, 160, 157, 158, 161, 0, 0, 0, 0, 103, 181, 184, 185, 52, 0, 0, 0, 54, 172, 173, 174, 89, 51, 95, 96, 97, 98, 99, 92, 0, 94, 80, 0, 0, 0, 0, 0, 0, 0, 0, 166, 167, 137, 138, 0, 0, 0, 0, 114, 164, 0, 0, 0, 163, 0, 105, 0, 0, 169, 170, 171, 101, 90, 150, 132, 133, 131, 0, 37, 38, 39, 40, 41, 0, 36, 45, 0, 44, 124, 125, 126, 127, 128, 123, 0, 151, 143, 144, 145, 146, 147, 142, 0, 0, 0, 141, 140, 0, 165, 136, 0, 0, 168, 0, 0, 0, 196, 193, 189, 0, 0, 135, 43, 47, 130, 149, 154, 0, 0, 0, 155, 106, 0, 152, 0, 0, 102, 0, 195, 191, 188, 190, 0, 176, 177, 153, 186, 0, 156, 0, 180, 34, 194, 192, 183, 182, 0, 178, 179, 175, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yydgoto[] = #else short socks_yydgoto[] = #endif { 3, 7, 6, 216, 128, 210, 211, 129, 217, 218, 130, 220, 221, 131, 15, 87, 41, 99, 100, 132, 227, 228, 133, 134, 135, 136, 66, 4, 16, 17, 18, 42, 43, 147, 102, 103, 45, 68, 46, 69, 47, 19, 89, 90, 49, 110, 111, 50, 51, 137, 172, 173, 52, 5, 53, 54, 55, 56, 57, 113, 58, 20, 247, 248, 149, 150, 60, 138, 139, 61, 151, 152, 140, 62, 194, 141, 235, 236, 142, 195, 243, 157, 161, 260, 261, 282, 262, 263, 284, 196, 244, 290, 202, 252, 253, 254, 274, 275, 106, 107, 186, 187, 188, 189, 287, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yysindex[] = #else short socks_yysindex[] = #endif { -199, 0, 0, 0, 0, 0, -10, 269, 0, -28, -22, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, -227, 0, 0, 10, 17, 26, 28, 51, 63, 66, 75, 76, 78, 79, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, -187, -264, -146, 21, 22, 88, 90, -254, -185, -121, -179, -178, 0, 0, -175, -131, -131, -131, -174, -243, 0, 0, 0, 0, 0, 0, -146, 0, -200, -235, -277, -277, 0, 0, 0, 0, -185, 0, 0, -121, 0, 0, 0, -236, -236, 0, 0, -175, 0, 0, 0, 0, 0, 0, 98, 99, 100, 102, 104, 107, 108, 109, -233, 110, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -243, -158, 0, 0, 0, 0, 0, 0, 0, 0, 0, -200, -158, -235, -158, 0, 0, 0, 0, 0, -150, -150, -150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -236, 0, 0, -236, -142, -186, -209, -102, -206, -125, -203, 0, 0, 0, 0, 131, 135, -133, -126, 0, 0, -243, -127, 140, 0, -87, 0, -235, -289, 0, 0, 0, 0, 0, 0, 0, 0, 0, -186, 0, 0, 0, 0, 0, -209, 0, 0, -102, 0, 0, 0, 0, 0, 0, 0, -206, 0, 0, 0, 0, 0, 0, 0, -203, -277, -277, 0, 0, 91, 0, 0, 148, -277, 0, 163, -200, 103, 0, 0, 0, 178, -205, 0, 0, 0, 0, 0, 0, 177, -150, -150, 0, 0, -277, 0, -268, 105, 0, -100, 0, 0, 0, 0, -297, 0, 0, 0, 0, -150, 0, -150, 0, 0, 0, 0, 0, 0, -150, 0, 0, 0,}; #if defined(__cplusplus) || defined(__STDC__) const short socks_yyrindex[] = #else short socks_yyrindex[] = #endif { 0, 0, 0, 0, 0, 0, 225, 229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -99, 0, 0, 0, 0, 0, 0, 125, 0, -96, -95, 0, 0, 0, 0, 0, 0, 161, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -116, 0, -110, 0, 0, 0, 0, 0, 0, 233, 233, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -115, 0, 0, 0, 0, 0, 271, 0, 0, 319, 0, 0, 0, 0, 0, 0, 0, 278, 0, 0, 0, 0, 0, 0, 0, 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -122, -122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -74, 0, -74, 0, 0, 0, 0, 0, 0, -122, 0, 0, 0,}; #if defined(__cplusplus) || defined(__STDC__) const short socks_yygindex[] = #else short socks_yygindex[] = #endif { 0, 0, 0, 121, -85, 25, 0, -84, 0, 23, 0, 0, 24, 0, 234, 0, 0, 0, 143, -73, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 238, 0, 144, 0, 0, 0, 0, 0, 241, 0, 162, 0, 0, 142, 0, 0, -71, -88, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 243, 0, 0, 0, -135, 0, 0, -114, 0, 0, -128, -90, 232, -123, 0, 20, 0, 0, 0, 0, 0, 0, -217, -89, 0, -81, 38, 0, 0, 0, 0, -143, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; #define YYTABLESIZE 676 #if defined(__cplusplus) || defined(__STDC__) const short socks_yytable[] = #else short socks_yytable[] = #endif { 13, 100, 153, 187, 158, 162, 144, 145, 113, 162, 134, 100, 159, 163, 197, 104, 203, 204, 146, 174, 148, 264, 95, 199, 192, 288, 250, 198, 267, 200, 63, 117, 289, 84, 85, 86, 64, 96, 251, 117, 167, 168, 169, 170, 171, 154, 155, 65, 156, 279, 8, 187, 118, 119, 154, 155, 280, 120, 1, 2, 118, 153, 121, 122, 144, 145, 36, 37, 70, 26, 121, 123, 249, 124, 117, 71, 146, 50, 148, 123, 241, 124, 97, 98, 72, 205, 73, 50, 206, 125, 126, 127, 212, 213, 214, 215, 119, 184, 185, 127, 120, 222, 223, 224, 225, 226, 122, 108, 109, 74, 153, 208, 209, 269, 230, 231, 232, 233, 234, 277, 278, 75, 251, 272, 76, 63, 100, 14, 39, 114, 115, 160, 164, 77, 78, 63, 79, 80, 291, 81, 292, 82, 83, 88, 91, 92, 93, 293, 94, 101, 104, 105, 187, 112, 134, 116, 176, 177, 178, 134, 179, 88, 180, 144, 145, 181, 182, 183, 190, 191, 187, 88, 193, 187, 187, 146, 201, 148, 187, 281, 134, 134, 219, 187, 187, 134, 207, 283, 229, 237, 134, 134, 187, 238, 187, 187, 239, 79, 245, 134, 187, 134, 50, 240, 242, 246, 266, 79, 187, 187, 187, 187, 187, 113, 162, 134, 265, 134, 134, 134, 104, 268, 187, 271, 276, 2, 187, 286, 270, 1, 285, 113, 187, 187, 162, 104, 255, 113, 104, 162, 256, 40, 165, 187, 257, 44, 166, 258, 48, 8, 59, 143, 175, 67, 9, 10, 259, 273, 0, 0, 100, 100, 100, 100, 100, 0, 100, 100, 0, 0, 100, 0, 0, 100, 100, 100, 100, 0, 11, 38, 0, 12, 100, 0, 0, 0, 100, 100, 100, 100, 0, 100, 100, 0, 100, 100, 100, 100, 0, 0, 0, 100, 0, 0, 0, 0, 100, 100, 0, 0, 0, 0, 0, 0, 0, 100, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 100, 100, 100, 50, 50, 50, 50, 50, 0, 50, 50, 0, 0, 50, 0, 0, 50, 50, 50, 50, 0, 0, 0, 0, 0, 50, 0, 0, 0, 50, 50, 50, 50, 0, 50, 50, 0, 50, 50, 0, 50, 0, 0, 0, 50, 0, 0, 0, 0, 0, 50, 63, 63, 63, 63, 63, 63, 63, 63, 0, 0, 63, 0, 42, 63, 63, 63, 63, 0, 0, 129, 0, 0, 63, 50, 0, 0, 63, 63, 63, 63, 0, 63, 63, 0, 63, 63, 88, 88, 88, 88, 88, 0, 88, 88, 0, 0, 88, 0, 0, 88, 88, 88, 88, 0, 0, 0, 0, 0, 88, 0, 46, 0, 88, 88, 88, 88, 0, 88, 88, 0, 88, 88, 79, 79, 79, 79, 79, 0, 79, 79, 0, 0, 79, 148, 0, 79, 79, 79, 79, 0, 0, 0, 0, 0, 79, 0, 0, 0, 79, 79, 79, 79, 0, 79, 79, 0, 79, 79, 187, 187, 187, 187, 187, 0, 187, 187, 0, 0, 187, 0, 0, 187, 187, 187, 187, 0, 0, 0, 0, 0, 187, 0, 0, 0, 187, 187, 187, 187, 0, 187, 187, 0, 187, 187, 8, 21, 22, 23, 24, 0, 10, 25, 0, 0, 26, 0, 42, 27, 28, 29, 30, 42, 0, 129, 0, 0, 31, 0, 129, 0, 32, 33, 34, 11, 0, 35, 12, 0, 36, 37, 0, 0, 42, 42, 0, 0, 0, 42, 0, 129, 129, 0, 42, 42, 129, 0, 0, 0, 0, 129, 129, 42, 0, 42, 0, 0, 0, 0, 129, 46, 129, 0, 0, 0, 0, 0, 0, 42, 0, 42, 42, 42, 0, 0, 129, 0, 129, 129, 129, 0, 46, 46, 148, 0, 0, 46, 0, 0, 0, 0, 46, 46, 0, 0, 0, 0, 0, 0, 0, 46, 0, 46, 0, 148, 148, 0, 0, 0, 148, 0, 0, 0, 0, 148, 148, 46, 0, 46, 46, 46, 0, 0, 148, 0, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, 0, 148, 148, 148, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yycheck[] = #else short socks_yycheck[] = #endif { 10, 0, 92, 125, 93, 94, 91, 91, 125, 125, 125, 10, 93, 94, 149, 125, 159, 160, 91, 107, 91, 238, 276, 151, 138, 322, 315, 150, 245, 152, 58, 274, 329, 297, 298, 299, 58, 291, 327, 274, 276, 277, 278, 279, 280, 322, 323, 58, 325, 266, 259, 125, 295, 296, 322, 323, 324, 300, 257, 258, 295, 151, 305, 306, 149, 149, 293, 294, 58, 269, 305, 314, 200, 316, 274, 58, 149, 0, 149, 314, 194, 316, 267, 268, 58, 173, 58, 10, 176, 332, 333, 334, 301, 302, 303, 304, 296, 330, 331, 334, 300, 307, 308, 309, 310, 311, 306, 282, 283, 58, 200, 297, 298, 248, 317, 318, 319, 320, 321, 262, 263, 58, 327, 328, 58, 0, 125, 6, 7, 79, 80, 93, 94, 58, 58, 10, 58, 58, 281, 58, 283, 123, 329, 289, 123, 123, 58, 290, 58, 270, 329, 329, 274, 284, 269, 329, 58, 58, 58, 274, 58, 0, 58, 248, 248, 58, 58, 58, 58, 58, 292, 10, 330, 295, 296, 248, 326, 248, 300, 268, 295, 296, 284, 305, 306, 300, 328, 268, 313, 58, 305, 306, 314, 58, 316, 269, 329, 0, 58, 314, 274, 316, 125, 329, 331, 292, 58, 10, 330, 331, 332, 333, 334, 330, 330, 330, 125, 332, 333, 334, 330, 58, 296, 45, 47, 0, 300, 327, 125, 0, 125, 330, 306, 0, 330, 330, 211, 125, 125, 125, 217, 7, 99, 10, 220, 7, 102, 228, 7, 259, 7, 89, 110, 21, 264, 265, 236, 254, -1, -1, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, -1, 272, 273, 274, 275, -1, 288, 10, -1, 291, 281, -1, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 295, 296, -1, -1, -1, 300, -1, -1, -1, -1, 305, 306, -1, -1, -1, -1, -1, -1, -1, 314, -1, 316, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 330, -1, 332, 333, 334, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, -1, 272, 273, 274, 275, -1, -1, -1, -1, -1, 281, -1, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, -1, 296, -1, -1, -1, 300, -1, -1, -1, -1, -1, 306, 259, 260, 261, 262, 263, 264, 265, 266, -1, -1, 269, -1, 125, 272, 273, 274, 275, -1, -1, 125, -1, -1, 281, 330, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, -1, 272, 273, 274, 275, -1, -1, -1, -1, -1, 281, -1, 125, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, 125, -1, 272, 273, 274, 275, -1, -1, -1, -1, -1, 281, -1, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, -1, 272, 273, 274, 275, -1, -1, -1, -1, -1, 281, -1, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, 269, 272, 273, 274, 275, 274, -1, 269, -1, -1, 281, -1, 274, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, -1, -1, 295, 296, -1, -1, -1, 300, -1, 295, 296, -1, 305, 306, 300, -1, -1, -1, -1, 305, 306, 314, -1, 316, -1, -1, -1, -1, 314, 274, 316, -1, -1, -1, -1, -1, -1, 330, -1, 332, 333, 334, -1, -1, 330, -1, 332, 333, 334, -1, 295, 296, 274, -1, -1, 300, -1, -1, -1, -1, 305, 306, -1, -1, -1, -1, -1, -1, -1, 314, -1, 316, -1, 295, 296, -1, -1, -1, 300, -1, -1, -1, -1, 305, 306, 330, -1, 332, 333, 334, -1, -1, 314, -1, 316, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 330, -1, 332, 333, 334, }; #define YYFINAL 3 #ifndef YYDEBUG #define YYDEBUG 0 #endif #define YYMAXTOKEN 334 #if YYDEBUG #if defined(__cplusplus) || defined(__STDC__) const char * const socks_yyname[] = #else char *socks_yyname[] = #endif { "end-of-file",0,0,0,0,0,0,0,0,0,"'\\n'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'-'",0,"'/'",0,0,0,0,0,0,0,0,0,0,"':'",0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'",0,"'}'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, "SERVERCONFIG","CLIENTCONFIG","DEPRECATED","CLIENTRULE","INTERNAL","EXTERNAL", "EXTERNAL_ROTATION","DEBUGING","RESOLVEPROTOCOL","SRCHOST","NOMISMATCH", "NOUNKNOWN","EXTENSION","BIND","PRIVILEGED","IOTIMEOUT","CONNECTTIMEOUT", "METHOD","CLIENTMETHOD","NONE","GSSAPI","UNAME","RFC931","PAM","COMPATIBILITY", "REUSEADDR","SAMEPORT","USERNAME","USER_PRIVILEGED","USER_UNPRIVILEGED", "USER_LIBWRAP","LOGOUTPUT","LOGFILE","CHILD_MAXIDLE","ROUTE","VIA", "VERDICT_BLOCK","VERDICT_PASS","PAMSERVICENAME","PROTOCOL","PROTOCOL_TCP", "PROTOCOL_UDP","PROTOCOL_FAKE","PROXYPROTOCOL","PROXYPROTOCOL_SOCKS_V4", "PROXYPROTOCOL_SOCKS_V5","PROXYPROTOCOL_MSPROXY_V2","PROXYPROTOCOL_HTTP_V1_0", "USER","COMMAND","COMMAND_BIND","COMMAND_CONNECT","COMMAND_UDPASSOCIATE", "COMMAND_BINDREPLY","COMMAND_UDPREPLY","ACTION","LINE","LIBWRAPSTART", "OPERATOR","LOG","LOG_CONNECT","LOG_DATA","LOG_DISCONNECT","LOG_ERROR", "LOG_IOOPERATION","IPADDRESS","DOMAINNAME","DIRECT","IFNAME","PORT", "PORTNUMBER","SERVICENAME","NUMBER","FROM","TO","REDIRECT","BANDWIDTH", "MAXSESSIONS", }; #if defined(__cplusplus) || defined(__STDC__) const char * const socks_yyrule[] = #else char *socks_yyrule[] = #endif {"$accept : configtype", "configtype : serverinit serverline", "configtype : clientinit clientline", "serverinit : SERVERCONFIG", "serverline :", "serverline : serverline '\\n'", "serverline : serverline serverconfig", "serverline : serverline clientrule", "serverline : serverline rule", "serverline : serverline route", "clientline :", "clientline : clientline '\\n'", "clientline : clientline clientconfig", "clientline : clientline route", "clientinit : CLIENTCONFIG", "clientconfig : clientoption", "clientconfig : deprecated", "serverconfig : global_authmethod", "serverconfig : global_clientauthmethod", "serverconfig : deprecated", "serverconfig : internal", "serverconfig : external", "serverconfig : external_rotation", "serverconfig : logoutput", "serverconfig : serveroption", "serverconfig : userids", "serverconfig : childstate", "serveroption : compatibility", "serveroption : connecttimeout", "serveroption : extension", "serveroption : iotimeout", "serveroption : resolveprotocol", "serveroption : srchost", "deprecated : DEPRECATED", "route : ROUTE routeinit '{' routeoptions fromto gateway routeoptions '}'", "routeinit :", "proxyprotocol : PROXYPROTOCOL ':' proxyprotocols", "proxyprotocolname : PROXYPROTOCOL_SOCKS_V4", "proxyprotocolname : PROXYPROTOCOL_SOCKS_V5", "proxyprotocolname : PROXYPROTOCOL_MSPROXY_V2", "proxyprotocolname : PROXYPROTOCOL_HTTP_V1_0", "proxyprotocolname : deprecated", "proxyprotocols : proxyprotocolname", "proxyprotocols : proxyprotocolname proxyprotocols", "user : USER ':' usernames", "username : USERNAME", "usernames : username", "usernames : username usernames", "extension : EXTENSION ':' extensions", "extensionname : BIND", "extensions : extensionname", "extensions : extensionname extensions", "internal : INTERNAL internalinit ':' internaladdress", "internalinit :", "external : EXTERNAL externalinit ':' externaladdress", "externalinit :", "external_rotation : EXTERNAL_ROTATION ':' NONE", "external_rotation : EXTERNAL_ROTATION ':' ROUTE", "clientoption : logoutput", "clientoption : debuging", "clientoption : resolveprotocol", "logoutput : LOGOUTPUT ':' logoutputdevices", "logoutputdevice : LOGFILE", "logoutputdevices : logoutputdevice", "logoutputdevices : logoutputdevice logoutputdevices", "childstate : CHILD_MAXIDLE ':' NUMBER", "userids : user_privileged", "userids : user_unprivileged", "userids : user_libwrap", "user_privileged : USER_PRIVILEGED ':' userid", "user_unprivileged : USER_UNPRIVILEGED ':' userid", "user_libwrap : USER_LIBWRAP ':' userid", "userid : USERNAME", "iotimeout : IOTIMEOUT ':' NUMBER", "connecttimeout : CONNECTTIMEOUT ':' NUMBER", "debuging : DEBUGING ':' NUMBER", "compatibility : COMPATIBILITY ':' compatibilitys", "compatibilityname : REUSEADDR", "compatibilityname : SAMEPORT", "compatibilitys : compatibilityname", "compatibilitys : compatibilityname compatibilitys", "resolveprotocol : RESOLVEPROTOCOL ':' resolveprotocolname", "resolveprotocolname : PROTOCOL_FAKE", "resolveprotocolname : PROTOCOL_TCP", "resolveprotocolname : PROTOCOL_UDP", "srchost : SRCHOST ':' srchostoptions", "srchostoption : NOMISMATCH", "srchostoption : NOUNKNOWN", "srchostoptions : srchostoption", "srchostoptions : srchostoption srchostoptions", "authmethod : METHOD ':' authmethods", "$$1 :", "global_authmethod : METHOD ':' $$1 authmethods", "$$2 :", "global_clientauthmethod : CLIENTMETHOD ':' $$2 authmethods", "authmethodname : NONE", "authmethodname : GSSAPI", "authmethodname : UNAME", "authmethodname : RFC931", "authmethodname : PAM", "authmethods : authmethodname", "authmethods : authmethodname authmethods", "clientrule : CLIENTRULE verdict '{' clientruleoptions fromto clientruleoptions '}'", "clientruleoption : option", "clientruleoptions :", "clientruleoptions : clientruleoption clientruleoptions", "rule : verdict '{' ruleoptions fromto ruleoptions '}'", "ruleoption : option", "ruleoption : bandwidth", "ruleoption : command", "ruleoption : protocol", "ruleoption : proxyprotocol", "ruleoption : redirect", "ruleoptions :", "ruleoptions : ruleoption ruleoptions", "option : authmethod", "option : libwrap", "option : log", "option : pamservicename", "option : user", "option : session", "verdict : VERDICT_BLOCK", "verdict : VERDICT_PASS", "command : COMMAND ':' commands", "commandname : COMMAND_BIND", "commandname : COMMAND_CONNECT", "commandname : COMMAND_UDPASSOCIATE", "commandname : COMMAND_BINDREPLY", "commandname : COMMAND_UDPREPLY", "commands : commandname", "commands : commandname commands", "protocol : PROTOCOL ':' protocols", "protocolname : PROTOCOL_TCP", "protocolname : PROTOCOL_UDP", "protocols : protocolname", "protocols : protocolname protocols", "fromto : srcaddress dstaddress", "redirect : REDIRECT rdr_fromaddress", "redirect : REDIRECT rdr_toaddress", "session : maxsessions", "maxsessions : MAXSESSIONS ':' NUMBER", "bandwidth : BANDWIDTH ':' NUMBER", "log : LOG ':' logs", "logname : LOG_CONNECT", "logname : LOG_DATA", "logname : LOG_DISCONNECT", "logname : LOG_ERROR", "logname : LOG_IOOPERATION", "logs : logname", "logs : logname logs", "pamservicename : PAMSERVICENAME ':' SERVICENAME", "libwrap : LIBWRAPSTART ':' LINE", "srcaddress : from ':' address", "dstaddress : to ':' address", "rdr_fromaddress : rdr_from ':' address", "rdr_toaddress : rdr_to ':' address", "gateway : via ':' gwaddress", "routeoption : command", "routeoption : extension", "routeoption : protocol", "routeoption : proxyprotocol", "routeoption : authmethod", "routeoptions :", "routeoptions : routeoption routeoptions", "from : FROM", "to : TO", "rdr_from : FROM", "rdr_to : TO", "via : VIA", "internaladdress : ipaddress port", "internaladdress : domain port", "internaladdress : ifname port", "externaladdress : ipaddress", "externaladdress : domain", "externaladdress : ifname", "address : ipaddress '/' netmask port", "address : domain port", "address : ifname port", "gwaddress : ipaddress port", "gwaddress : domain port", "gwaddress : direct", "ipaddress : IPADDRESS", "netmask : NUMBER", "netmask : IPADDRESS", "domain : DOMAINNAME", "ifname : IFNAME", "direct : DIRECT", "port :", "port : PORT portoperator portnumber", "port : PORT portrange", "portnumber : portservice", "portnumber : portstart", "portrange : portstart '-' portend", "portstart : PORTNUMBER", "portend : PORTNUMBER", "portservice : SERVICENAME", "portoperator : OPERATOR", }; #endif #ifdef YYSTACKSIZE #undef YYMAXDEPTH #define YYMAXDEPTH YYSTACKSIZE #else #ifdef YYMAXDEPTH #define YYSTACKSIZE YYMAXDEPTH #else #define YYSTACKSIZE 10000 #define YYMAXDEPTH 10000 #endif #endif #define YYINITSTACKSIZE 200 int yydebug; int yynerrs; int yyerrflag; int yychar; short *yyssp; YYSTYPE *yyvsp; YYSTYPE yyval; YYSTYPE yylval; short *yyss; short *yysslim; YYSTYPE *yyvs; int yystacksize; #line 1182 "config_parse.y" #define INTERACTIVE 0 extern FILE *yyin; int socks_parseinit; int readconfig(filename) const char *filename; { const char *function = "readconfig()"; /* yydebug = 1; */ yylineno = 1; socks_parseinit = 0; if ((yyin = fopen(filename, "r")) == NULL) { swarn("%s: %s", function, filename); return -1; } errno = 0; /* don't report old errors in yyparse(). */ yyparse(); fclose(yyin); #if SOCKS_SERVER fixconfig(); #endif /* SOCKS_SERVER */ errno = 0; return 0; } void #ifdef STDC_HEADERS yyerror(const char *fmt, ...) #else yyerror(fmt, va_alist) const char *fmt; va_dcl #endif /* STDC_HEADERS */ { va_list ap; char buf[2048]; size_t bufused; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, fmt); #else va_start(ap); #endif /* STDC_HEADERS */ bufused = snprintfn(buf, sizeof(buf), "%s: error on line %d, near '%.10s': ", sockscf.option.configfile, yylineno, (yytext == NULL || *yytext == NUL) ? "'start of line'" : yytext); vsnprintf(&buf[bufused], sizeof(buf) - bufused, fmt, ap); /* LINTED expression has null effect */ va_end(ap); if (errno) serr(EXIT_FAILURE, buf); serrx(EXIT_FAILURE, buf); } void #ifdef STDC_HEADERS yywarn(const char *fmt, ...) #else yywarn(fmt, va_alist) const char *fmt; va_dcl #endif /* STDC_HEADERS */ { va_list ap; char buf[2048]; size_t bufused; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, fmt); #else va_start(ap); #endif /* STDC_HEADERS */ bufused = snprintfn(buf, sizeof(buf), "%s: warning on line %d, near '%.10s': ", sockscf.option.configfile, yylineno, (yytext == NULL || *yytext == NUL) ? "'start of line'" : yytext); vsnprintf(&buf[bufused], sizeof(buf) - bufused, fmt, ap); /* LINTED expression has null effect */ va_end(ap); if (errno) swarn(buf); swarnx(buf); } static void addressinit(address) struct ruleaddress_t *address; { ruleaddress = address; atype = &ruleaddress->atype; ipaddr = &ruleaddress->addr.ipv4.ip; netmask = &ruleaddress->addr.ipv4.mask; domain = ruleaddress->addr.domain; ifname = ruleaddress->addr.ifname; port_tcp = &ruleaddress->port.tcp; port_udp = &ruleaddress->port.udp; operator = &ruleaddress->operator; } #if SOCKS_SERVER static void ruleinit(rule) struct rule_t *rule; { rule->linenumber = yylineno; command = &rule->state.command; methodv = rule->state.methodv; methodc = &rule->state.methodc; protocol = &rule->state.protocol; proxyprotocol = &rule->state.proxyprotocol; bzero(&src, sizeof(src)); bzero(&dst, sizeof(dst)); *rule = ruleinitmem; src.atype = SOCKS_ADDR_IPV4; src.addr.ipv4.ip.s_addr = htonl(INADDR_ANY); src.port.tcp = src.port.udp = src.portend = htons(0); dst = rdr_from = rdr_to = src; } static void fixconfig(void) { const char *function = "fixsettings()"; int i; uid_t euid; /* * Check arguments and settings, do they make sense? */ if (sockscf.clientmethodc == 0) sockscf.clientmethodv[sockscf.clientmethodc++] = AUTHMETHOD_NONE; #if !HAVE_DUMPCONF if (!sockscf.uid.privileged_isset) sockscf.uid.privileged = sockscf.state.euid; else { socks_seteuid(&euid, sockscf.uid.privileged); socks_reseteuid(sockscf.uid.privileged, euid); } if (!sockscf.uid.unprivileged_isset) sockscf.uid.unprivileged = sockscf.state.euid; else { socks_seteuid(&euid, sockscf.uid.unprivileged); socks_reseteuid(sockscf.uid.unprivileged, euid); } #if HAVE_LIBWRAP if (!sockscf.uid.libwrap_isset) sockscf.uid.libwrap = sockscf.state.euid; else { socks_seteuid(&euid, sockscf.uid.libwrap); socks_reseteuid(sockscf.uid.libwrap, euid); } #endif /* HAVE_LIBWRAP */ #endif /* !HAVE_DUMPCONF */ if (sockscf.internalc == 0) serrx(EXIT_FAILURE, "%s: no internal address given", function); /* values will be used once and checked there. */ if (sockscf.external.addrc == 0) serrx(EXIT_FAILURE, "%s: no external address given", function); #if !HAVE_DUMPCONF for (i = 0; i < sockscf.external.addrc; ++i) if (!addressisbindable(&sockscf.external.addrv[i])) serrx(EXIT_FAILURE, NULL); #endif /* !HAVE_DUMPCONF */ #if !HAVE_DUMPCONF if (sockscf.methodc == 0) swarnx("%s: no methods enabled (total block)", function); if (sockscf.uid.unprivileged == 0) swarnx("%s: setting the unprivileged uid to %d is not recommended", function, sockscf.uid.unprivileged); #if HAVE_LIBWRAP if (sockscf.uid.libwrap == 0) swarnx("%s: setting the libwrap uid to %d is not recommended", function, sockscf.uid.libwrap); #endif /* HAVE_LIBWRAP */ #endif /* !HAVE_DUMPCONF */ } #endif /* SOCKS_SERVER */ #line 1032 "config_parse.c" /* allocate initial stack or double stack size, up to YYMAXDEPTH */ #if defined(__cplusplus) || defined(__STDC__) static int yygrowstack(void) #else static int yygrowstack() #endif { int newsize, i; short *newss; YYSTYPE *newvs; if ((newsize = yystacksize) == 0) newsize = YYINITSTACKSIZE; else if (newsize >= YYMAXDEPTH) return -1; else if ((newsize *= 2) > YYMAXDEPTH) newsize = YYMAXDEPTH; i = yyssp - yyss; newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) : (short *)malloc(newsize * sizeof *newss); if (newss == NULL) goto bail; yyss = newss; yyssp = newss + i; newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) : (YYSTYPE *)malloc(newsize * sizeof *newvs); if (newvs == NULL) goto bail; yyvs = newvs; yyvsp = newvs + i; yystacksize = newsize; yysslim = yyss + newsize - 1; return 0; bail: if (yyss) free(yyss); if (yyvs) free(yyvs); yyss = yyssp = NULL; yyvs = yyvsp = NULL; yystacksize = 0; return -1; } #define YYABORT goto yyabort #define YYREJECT goto yyabort #define YYACCEPT goto yyaccept #define YYERROR goto yyerrlab int #if defined(__cplusplus) || defined(__STDC__) yyparse(void) #else yyparse() #endif { int yym, yyn, yystate; #if YYDEBUG #if defined(__cplusplus) || defined(__STDC__) const char *yys; #else /* !(defined(__cplusplus) || defined(__STDC__)) */ char *yys; #endif /* !(defined(__cplusplus) || defined(__STDC__)) */ if ((yys = getenv("YYDEBUG"))) { yyn = *yys; if (yyn >= '0' && yyn <= '9') yydebug = yyn - '0'; } #endif /* YYDEBUG */ yynerrs = 0; yyerrflag = 0; yychar = (-1); if (yyss == NULL && yygrowstack()) goto yyoverflow; yyssp = yyss; yyvsp = yyvs; *yyssp = yystate = 0; yyloop: if ((yyn = yydefred[yystate]) != 0) goto yyreduce; if (yychar < 0) { if ((yychar = yylex()) < 0) yychar = 0; #if YYDEBUG if (yydebug) { yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, yystate, yychar, yys); } #endif } if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yychar) { #if YYDEBUG if (yydebug) printf("%sdebug: state %d, shifting to state %d\n", YYPREFIX, yystate, yytable[yyn]); #endif if (yyssp >= yysslim && yygrowstack()) { goto yyoverflow; } *++yyssp = yystate = yytable[yyn]; *++yyvsp = yylval; yychar = (-1); if (yyerrflag > 0) --yyerrflag; goto yyloop; } if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yychar) { yyn = yytable[yyn]; goto yyreduce; } if (yyerrflag) goto yyinrecovery; #if defined(lint) || defined(__GNUC__) goto yynewerror; #endif yynewerror: yyerror("syntax error"); #if defined(lint) || defined(__GNUC__) goto yyerrlab; #endif yyerrlab: ++yynerrs; yyinrecovery: if (yyerrflag < 3) { yyerrflag = 3; for (;;) { if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) { #if YYDEBUG if (yydebug) printf("%sdebug: state %d, error recovery shifting\ to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); #endif if (yyssp >= yysslim && yygrowstack()) { goto yyoverflow; } *++yyssp = yystate = yytable[yyn]; *++yyvsp = yylval; goto yyloop; } else { #if YYDEBUG if (yydebug) printf("%sdebug: error recovery discarding state %d\n", YYPREFIX, *yyssp); #endif if (yyssp <= yyss) goto yyabort; --yyssp; --yyvsp; } } } else { if (yychar == 0) goto yyabort; #if YYDEBUG if (yydebug) { yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; printf("%sdebug: state %d, error recovery discards token %d (%s)\n", YYPREFIX, yystate, yychar, yys); } #endif yychar = (-1); goto yyloop; } yyreduce: #if YYDEBUG if (yydebug) printf("%sdebug: state %d, reducing by rule %d (%s)\n", YYPREFIX, yystate, yyn, yyrule[yyn]); #endif yym = yylen[yyn]; yyval = yyvsp[1-yym]; switch (yyn) { case 3: #line 275 "config_parse.y" { #if SOCKS_SERVER protocol = &protocolmem; extension = &sockscf.extension; #endif } break; case 4: #line 284 "config_parse.y" { yyval.string = NULL; } break; case 10: #line 292 "config_parse.y" { yyval.string = NULL; } break; case 14: #line 299 "config_parse.y" { } break; case 33: #line 328 "config_parse.y" { yywarn("given keyword is deprecated"); } break; case 34: #line 332 "config_parse.y" { route.src = src; route.dst = dst; ruleaddress2sockshost(&gw, &route.gw.host, SOCKS_TCP); route.gw.state = state; addroute(&route); } break; case 35: #line 342 "config_parse.y" { command = &state.command; extension = &state.extension; methodv = state.methodv; methodc = &state.methodc; protocol = &state.protocol; proxyprotocol = &state.proxyprotocol; bzero(&state, sizeof(state)); bzero(&route, sizeof(route)); bzero(&gw, sizeof(gw)); bzero(&src, sizeof(src)); bzero(&dst, sizeof(dst)); src.atype = SOCKS_ADDR_IPV4; dst.atype = SOCKS_ADDR_IPV4; } break; case 37: #line 364 "config_parse.y" { proxyprotocol->socks_v4 = 1; } break; case 38: #line 367 "config_parse.y" { proxyprotocol->socks_v5 = 1; } break; case 39: #line 370 "config_parse.y" { proxyprotocol->msproxy_v2 = 1; } break; case 40: #line 373 "config_parse.y" { proxyprotocol->http_v1_0 = 1; } break; case 45: #line 386 "config_parse.y" { #if SOCKS_SERVER #if !HAVE_LIBWRAP if (strcmp(yyvsp[0].string, method2string(AUTHMETHOD_RFC931)) == 0) yyerror("method %s requires libwrap", AUTHMETHOD_RFC931s); #endif /* !HAVE_LIBWRAP */ if (adduser(&rule.user, yyvsp[0].string) == NULL) yyerror(NOMEM); #endif /* SOCKS_SERVER */ } break; case 49: #line 405 "config_parse.y" { extension->bind = 1; } break; case 52: #line 415 "config_parse.y" { #if SOCKS_SERVER addinternal(ruleaddress); #endif } break; case 53: #line 422 "config_parse.y" { #if SOCKS_SERVER static struct ruleaddress_t mem; struct servent *service; addressinit(&mem); /* set default port. */ if ((service = getservbyname("socks", "tcp")) == NULL) *port_tcp = htons(SOCKD_PORT); else *port_tcp = (in_port_t)service->s_port; #endif } break; case 54: #line 438 "config_parse.y" { #if SOCKS_SERVER addexternal(ruleaddress); #endif } break; case 55: #line 445 "config_parse.y" { #if SOCKS_SERVER static struct ruleaddress_t mem; addressinit(&mem); #endif } break; case 56: #line 454 "config_parse.y" { #if SOCKS_SERVER sockscf.external.rotation = ROTATION_NONE; } break; case 57: #line 458 "config_parse.y" { #if !HAVE_ROUTE_SOURCE yyerror("don't have code to discover route/address source on platform"); #else /* !HAVE_ROUTE_SOURCE */ sockscf.external.rotation = ROTATION_ROUTE; #endif /* HAVE_ROUTE_SOURCE */ #endif /* SOCKS_SERVER */ } break; case 62: #line 476 "config_parse.y" { const char *syslogname = "syslog"; if (strncmp(yyvsp[0].string, syslogname, strlen(syslogname)) == 0 && (yyvsp[0].string[strlen(syslogname)] == NUL || yyvsp[0].string[strlen(syslogname)] == '/')) { char *sl; sockscf.log.type |= LOGTYPE_SYSLOG; if (*(sl = &(yyvsp[0].string[strlen(syslogname)])) == '/') { /* facility. */ size_t i; for (i = 0, ++sl; i < ELEMENTS(syslogfacilityv); ++i) if (strcmp(sl, syslogfacilityv[i].name) == 0) break; if (i == ELEMENTS(syslogfacilityv)) yyerror("unknown syslog facility \"%s\"", sl); sockscf.log.facility = syslogfacilityv[i].value; sockscf.log.facilityname = syslogfacilityv[i].name; } else { sockscf.log.facility = LOG_DAEMON; /* default. */ sockscf.log.facilityname = "daemon"; } } else /* adding/changing filename. */ if (!sockscf.state.init) { int flag; sockscf.log.type |= LOGTYPE_FILE; if ((sockscf.log.fpv = (FILE **)realloc(sockscf.log.fpv, sizeof(*sockscf.log.fpv) * (sockscf.log.fpc + 1))) == NULL || (sockscf.log.fplockv = (int *)realloc(sockscf.log.fplockv, sizeof(*sockscf.log.fplockv) * (sockscf.log.fpc + 1))) == NULL || (sockscf.log.fnamev = (char **)realloc(sockscf.log.fnamev, sizeof(*sockscf.log.fnamev) * (sockscf.log.fpc + 1))) == NULL) serrx(EXIT_FAILURE, NOMEM); if ((sockscf.log.fplockv[sockscf.log.fpc] = socks_mklock(SOCKS_LOCKFILE)) == -1) serr(EXIT_FAILURE, "socks_mklock()"); if (strcmp(yyvsp[0].string, "stdout") == 0) sockscf.log.fpv[sockscf.log.fpc] = stdout; else if (strcmp(yyvsp[0].string, "stderr") == 0) sockscf.log.fpv[sockscf.log.fpc] = stderr; else if ((sockscf.log.fpv[sockscf.log.fpc] = fopen(yyvsp[0].string, "a")) == NULL) yyerror("fopen(%s)", yyvsp[0].string); if ((flag = fcntl(fileno(sockscf.log.fpv[sockscf.log.fpc]), F_GETFD, 0)) == -1 || fcntl(fileno(sockscf.log.fpv[sockscf.log.fpc]), F_SETFD, flag | FD_CLOEXEC) == -1) serr(EXIT_FAILURE, "fcntl(F_GETFD/F_SETFD)"); if ((sockscf.log.fnamev[sockscf.log.fpc] = strdup(yyvsp[0].string)) == NULL) serr(EXIT_FAILURE, NOMEM); ++sockscf.log.fpc; } else { /* * Can't change filenames we log to after startup (well, * to be exact, we can't add new filenames, but we complain * about changing too for now since it's easier. */ size_t i; for (i = 0; i < sockscf.log.fpc; ++i) if (strcmp(sockscf.log.fnamev[i], yyvsp[0].string) == 0) { /* same name. */ FILE *fp; if (strcmp(sockscf.log.fnamev[i], "stdout") == 0 || strcmp(sockscf.log.fnamev[i], "stderr") == 0) continue; /* don't need to close these, hard to reopen. */ /* reopen logfiles. */ if ((fp = fopen(sockscf.log.fnamev[i], "a")) == NULL) yyerror("fopen(%s)", yyvsp[0].string); fclose(sockscf.log.fpv[i]); sockscf.log.fpv[i] = fp; break; } if (i == sockscf.log.fpc) /* no match found. */ yywarn("can't change logoutput after startup"); } } break; case 65: #line 578 "config_parse.y" { #if SOCKS_SERVER yyerror("Sorry, child.maxidle is disabled due to a suspected bug"); if (atoi(yyvsp[0].string) != 0 && atoi(yyvsp[0].string) < SOCKD_FREESLOTS) yyerror("%s (%s) can't be less than SOCKD_FREESLOTS (%d)", yyvsp[-2].string, yyvsp[0].string, SOCKD_FREESLOTS); sockscf.child.maxidle = atoi(yyvsp[0].string); #endif } break; case 69: #line 595 "config_parse.y" { #if SOCKS_SERVER sockscf.uid.privileged = yyvsp[0].uid; sockscf.uid.privileged_isset = 1; #endif } break; case 70: #line 603 "config_parse.y" { #if SOCKS_SERVER sockscf.uid.unprivileged = yyvsp[0].uid; sockscf.uid.unprivileged_isset = 1; #endif } break; case 71: #line 611 "config_parse.y" { #if HAVE_LIBWRAP && SOCKS_SERVER sockscf.uid.libwrap = yyvsp[0].uid; sockscf.uid.libwrap_isset = 1; #else /* HAVE_LIBWRAP */ yyerror("libwrapsupport not compiled in"); #endif /* !HAVE_LIBWRAP */ } break; case 72: #line 622 "config_parse.y" { struct passwd *pw; if ((pw = getpwnam(yyvsp[0].string)) == NULL) serrx(EXIT_FAILURE, "no such user \"%s\"", yyvsp[0].string); else yyval.uid = pw->pw_uid; } break; case 73: #line 632 "config_parse.y" { #if SOCKS_SERVER sockscf.timeout.io = (time_t)atol(yyvsp[0].string); #endif } break; case 74: #line 639 "config_parse.y" { #if SOCKS_SERVER sockscf.timeout.negotiate = (time_t)atol(yyvsp[0].string); #endif } break; case 75: #line 646 "config_parse.y" { sockscf.option.debug = atoi(yyvsp[0].string); } break; case 77: #line 654 "config_parse.y" { #if SOCKS_SERVER sockscf.compat.reuseaddr = 1; } break; case 78: #line 658 "config_parse.y" { sockscf.compat.sameport = 1; #endif } break; case 82: #line 671 "config_parse.y" { sockscf.resolveprotocol = RESOLVEPROTOCOL_FAKE; } break; case 83: #line 674 "config_parse.y" { #if HAVE_NO_RESOLVESTUFF yyerror("resolveprotocol keyword not supported on this installation"); #else /* HAVE_NO_RESOLVESTUFF */ sockscf.resolveprotocol = RESOLVEPROTOCOL_TCP; #endif /* !HAVE_NO_RESOLVESTUFF */ } break; case 84: #line 681 "config_parse.y" { sockscf.resolveprotocol = RESOLVEPROTOCOL_UDP; } break; case 86: #line 689 "config_parse.y" { #if HAVE_LIBWRAP && SOCKS_SERVER sockscf.srchost.nomismatch = 1; } break; case 87: #line 693 "config_parse.y" { sockscf.srchost.nounknown = 1; #else yyerror("srchostoption requires libwrap"); #endif } break; case 91: #line 709 "config_parse.y" { #if SOCKS_SERVER methodv = sockscf.methodv; methodc = &sockscf.methodc; *methodc = 0; /* reset. */ #endif } break; case 93: #line 718 "config_parse.y" { #if SOCKS_SERVER methodv = sockscf.clientmethodv; methodc = &sockscf.clientmethodc; *methodc = 0; /* reset. */ #endif } break; case 95: #line 727 "config_parse.y" { ADDMETHOD(AUTHMETHOD_NONE); } break; case 96: #line 730 "config_parse.y" { yyerror("%s not supported", AUTHMETHOD_GSSAPIs); } break; case 97: #line 733 "config_parse.y" { ADDMETHOD(AUTHMETHOD_UNAME); } break; case 98: #line 736 "config_parse.y" { #if HAVE_LIBWRAP && SOCKS_SERVER ADDMETHOD(AUTHMETHOD_RFC931); #else /* !HAVE_LIBWRAP */ yyerror("method %s requires libwraplibrary", AUTHMETHOD_RFC931s); #endif /* !HAVE_LIBWRAP */ } break; case 99: #line 743 "config_parse.y" { #if !HAVE_PAM yyerror("method %s requires pamlibrary", AUTHMETHOD_PAMs); #else /* HAVE_PAM */ ADDMETHOD(AUTHMETHOD_PAM); #endif /* !HAVE_PAM */ } break; case 102: #line 759 "config_parse.y" { #if SOCKS_SERVER rule.src = src; rule.dst = dst; rule.rdr_from = rdr_from; rule.rdr_to = rdr_to; addclientrule(&rule); #endif } break; case 104: #line 775 "config_parse.y" { yyval.string = NULL; } break; case 106: #line 779 "config_parse.y" { #if SOCKS_SERVER rule.src = src; rule.dst = dst; rule.rdr_from = rdr_from; rule.rdr_to = rdr_to; addsocksrule(&rule); #endif } break; case 108: #line 793 "config_parse.y" { #if SOCKS_SERVER checkmodule("bandwidth"); #endif } break; case 112: #line 801 "config_parse.y" { #if SOCKS_SERVER checkmodule("redirect"); #endif } break; case 113: #line 808 "config_parse.y" { yyval.string = NULL; } break; case 120: #line 817 "config_parse.y" { #if SOCKS_SERVER checkmodule("session"); #endif } break; case 121: #line 824 "config_parse.y" { #if SOCKS_SERVER ruleinit(&rule); rule.verdict = VERDICT_BLOCK; } break; case 122: #line 829 "config_parse.y" { ruleinit(&rule); rule.verdict = VERDICT_PASS; #endif } break; case 124: #line 840 "config_parse.y" { command->bind = 1; } break; case 125: #line 843 "config_parse.y" { command->connect = 1; } break; case 126: #line 846 "config_parse.y" { command->udpassociate = 1; } break; case 127: #line 852 "config_parse.y" { command->bindreply = 1; } break; case 128: #line 856 "config_parse.y" { command->udpreply = 1; } break; case 132: #line 868 "config_parse.y" { protocol->tcp = 1; } break; case 133: #line 871 "config_parse.y" { protocol->udp = 1; } break; case 140: #line 891 "config_parse.y" { #if SOCKS_SERVER static session_t ssinit; /* * temporarily allocate ordinary memory, later on point it to * the correct shared mem. */ if ((rule.ss = malloc(sizeof(*rule.ss))) == NULL) serr(EXIT_FAILURE, NOMEM); *rule.ss = ssinit; if ((rule.ss->maxsessions = atoi(yyvsp[0].string)) < 0) yyerror("session value can not be less than 0"); #endif /* SOCKS_SERVER */ } break; case 141: #line 908 "config_parse.y" { #if SOCKS_SERVER static bw_t bwmeminit; /* * temporarily allocate ordinary memory, later on point it to * the correct index in sockscf.bwv. */ if ((rule.bw = (bw_t *)malloc(sizeof(*rule.bw))) == NULL) serr(EXIT_FAILURE, NOMEM); *rule.bw = bwmeminit; if ((rule.bw->maxbps = atoi(yyvsp[0].string)) <= 0) yyerror("bandwidth value must be greater than 0"); #endif /* SOCKS_SERVER */ } break; case 143: #line 929 "config_parse.y" { #if SOCKS_SERVER rule.log.connect = 1; } break; case 144: #line 933 "config_parse.y" { rule.log.data = 1; } break; case 145: #line 936 "config_parse.y" { rule.log.disconnect = 1; } break; case 146: #line 939 "config_parse.y" { rule.log.error = 1; } break; case 147: #line 942 "config_parse.y" { rule.log.iooperation = 1; #endif } break; case 150: #line 953 "config_parse.y" { #if HAVE_PAM && SOCKS_SERVER if (strlen(yyvsp[0].string) >= sizeof(rule.pamservicename)) yyerror("servicename too long"); strcpy(rule.pamservicename, yyvsp[0].string); #else /* !HAVE_PAM */ yyerror("pamsupport not compiled in"); #endif /* HAVE_PAM */ } break; case 151: #line 964 "config_parse.y" { #if HAVE_LIBWRAP && SOCKS_SERVER struct request_info request; char libwrap[LIBWRAPBUF]; if (strlen(yyvsp[0].string) >= sizeof(rule.libwrap)) yyerror("libwrapline too long, make LIBWRAPBUF bigger"); strcpy(rule.libwrap, yyvsp[0].string); /* libwrap modifies the passed buffer. */ SASSERTX(strlen(rule.libwrap) < sizeof(libwrap)); strcpy(libwrap, rule.libwrap); ++dry_run; request_init(&request, RQ_FILE, -1, RQ_DAEMON, __progname, 0); if (setjmp(tcpd_buf) != 0) yyerror("bad libwrap line"); process_options(libwrap, &request); --dry_run; #else /* !HAVE_LIBWRAP */ yyerror("libwrapsupport not compiled in"); #endif } break; case 162: #line 1014 "config_parse.y" { yyval.string = NULL; } break; case 164: #line 1018 "config_parse.y" { addressinit(&src); } break; case 165: #line 1023 "config_parse.y" { addressinit(&dst); } break; case 166: #line 1028 "config_parse.y" { addressinit(&rdr_from); } break; case 167: #line 1033 "config_parse.y" { addressinit(&rdr_to); } break; case 168: #line 1040 "config_parse.y" { addressinit(&gw); } break; case 181: #line 1068 "config_parse.y" { *atype = SOCKS_ADDR_IPV4; if (inet_aton(yyvsp[0].string, ipaddr) != 1) yyerror("bad address: %s", yyvsp[0].string); } break; case 182: #line 1077 "config_parse.y" { if (atoi(yyvsp[0].string) < 0 || atoi(yyvsp[0].string) > 32) yyerror("bad netmask: %s", yyvsp[0].string); netmask->s_addr = atoi(yyvsp[0].string) == 0 ? 0 : htonl(0xffffffff << (32 - atoi(yyvsp[0].string))); } break; case 183: #line 1084 "config_parse.y" { if (!inet_aton(yyvsp[0].string, netmask)) yyerror("bad netmask: %s", yyvsp[0].string); } break; case 184: #line 1090 "config_parse.y" { *atype = SOCKS_ADDR_DOMAIN; if (strlen(yyvsp[0].string) >= MAXHOSTNAMELEN) yyerror("domainname too long"); strcpy(domain, yyvsp[0].string); } break; case 185: #line 1099 "config_parse.y" { *atype = SOCKS_ADDR_IFNAME; if (strlen(yyvsp[0].string) >= MAXIFNAMELEN) yyerror("interfacename too long"); strcpy(ifname, yyvsp[0].string); } break; case 186: #line 1109 "config_parse.y" { *atype = SOCKS_ADDR_DOMAIN; if (strlen(yyvsp[0].string) >= MAXHOSTNAMELEN) yyerror("domainname too long"); strcpy(domain, yyvsp[0].string); route.state.direct = 1; } break; case 187: #line 1120 "config_parse.y" { yyval.string = NULL; } break; case 193: #line 1133 "config_parse.y" { *port_tcp = htons((in_port_t)atoi(yyvsp[0].string)); *port_udp = htons((in_port_t)atoi(yyvsp[0].string)); } break; case 194: #line 1139 "config_parse.y" { ruleaddress->portend = htons((in_port_t)atoi(yyvsp[0].string)); ruleaddress->operator = range; } break; case 195: #line 1145 "config_parse.y" { struct servent *service; if ((service = getservbyname(yyvsp[0].string, "tcp")) == NULL) { if (protocol->tcp) yyerror("unknown tcp protocol: %s", yyvsp[0].string); *port_tcp = htons(0); } else *port_tcp = (in_port_t)service->s_port; if ((service = getservbyname(yyvsp[0].string, "udp")) == NULL) { if (protocol->udp) yyerror("unknown udp protocol: %s", yyvsp[0].string); *port_udp = htons(0); } else *port_udp = (in_port_t)service->s_port; if (*port_tcp == htons(0) && *port_udp == htons(0)) yyerror("unknown tcp/udp protocol"); /* if one protocol is unset, set to same as the other. */ if (*port_tcp == htons(0)) *port_tcp = *port_udp; else if (*port_udp == htons(0)) *port_udp = *port_tcp; } break; case 196: #line 1176 "config_parse.y" { *operator = string2operator(yyvsp[0].string); } break; #line 2040 "config_parse.c" } yyssp -= yym; yystate = *yyssp; yyvsp -= yym; yym = yylhs[yyn]; if (yystate == 0 && yym == 0) { #if YYDEBUG if (yydebug) printf("%sdebug: after reduction, shifting from state 0 to\ state %d\n", YYPREFIX, YYFINAL); #endif yystate = YYFINAL; *++yyssp = YYFINAL; *++yyvsp = yyval; if (yychar < 0) { if ((yychar = yylex()) < 0) yychar = 0; #if YYDEBUG if (yydebug) { yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, YYFINAL, yychar, yys); } #endif } if (yychar == 0) goto yyaccept; goto yyloop; } if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yystate) yystate = yytable[yyn]; else yystate = yydgoto[yym]; #if YYDEBUG if (yydebug) printf("%sdebug: after reduction, shifting from state %d \ to state %d\n", YYPREFIX, *yyssp, yystate); #endif if (yyssp >= yysslim && yygrowstack()) { goto yyoverflow; } *++yyssp = yystate; *++yyvsp = yyval; goto yyloop; yyoverflow: yyerror("yacc stack overflow"); yyabort: if (yyss) free(yyss); if (yyvs) free(yyvs); yyss = yyssp = NULL; yyvs = yyvsp = NULL; yystacksize = 0; return (1); yyaccept: if (yyss) free(yyss); if (yyvs) free(yyvs); yyss = yyssp = NULL; yyvs = yyvsp = NULL; yystacksize = 0; return (0); } dante-1.1.19.dfsg/lib/config_parse.h0000644000175000017500000000366410333443140015660 0ustar roamroam#define SERVERCONFIG 257 #define CLIENTCONFIG 258 #define DEPRECATED 259 #define CLIENTRULE 260 #define INTERNAL 261 #define EXTERNAL 262 #define EXTERNAL_ROTATION 263 #define DEBUGING 264 #define RESOLVEPROTOCOL 265 #define SRCHOST 266 #define NOMISMATCH 267 #define NOUNKNOWN 268 #define EXTENSION 269 #define BIND 270 #define PRIVILEGED 271 #define IOTIMEOUT 272 #define CONNECTTIMEOUT 273 #define METHOD 274 #define CLIENTMETHOD 275 #define NONE 276 #define GSSAPI 277 #define UNAME 278 #define RFC931 279 #define PAM 280 #define COMPATIBILITY 281 #define REUSEADDR 282 #define SAMEPORT 283 #define USERNAME 284 #define USER_PRIVILEGED 285 #define USER_UNPRIVILEGED 286 #define USER_LIBWRAP 287 #define LOGOUTPUT 288 #define LOGFILE 289 #define CHILD_MAXIDLE 290 #define ROUTE 291 #define VIA 292 #define VERDICT_BLOCK 293 #define VERDICT_PASS 294 #define PAMSERVICENAME 295 #define PROTOCOL 296 #define PROTOCOL_TCP 297 #define PROTOCOL_UDP 298 #define PROTOCOL_FAKE 299 #define PROXYPROTOCOL 300 #define PROXYPROTOCOL_SOCKS_V4 301 #define PROXYPROTOCOL_SOCKS_V5 302 #define PROXYPROTOCOL_MSPROXY_V2 303 #define PROXYPROTOCOL_HTTP_V1_0 304 #define USER 305 #define COMMAND 306 #define COMMAND_BIND 307 #define COMMAND_CONNECT 308 #define COMMAND_UDPASSOCIATE 309 #define COMMAND_BINDREPLY 310 #define COMMAND_UDPREPLY 311 #define ACTION 312 #define LINE 313 #define LIBWRAPSTART 314 #define OPERATOR 315 #define LOG 316 #define LOG_CONNECT 317 #define LOG_DATA 318 #define LOG_DISCONNECT 319 #define LOG_ERROR 320 #define LOG_IOOPERATION 321 #define IPADDRESS 322 #define DOMAINNAME 323 #define DIRECT 324 #define IFNAME 325 #define PORT 326 #define PORTNUMBER 327 #define SERVICENAME 328 #define NUMBER 329 #define FROM 330 #define TO 331 #define REDIRECT 332 #define BANDWIDTH 333 #define MAXSESSIONS 334 #ifndef YYSTYPE_DEFINED #define YYSTYPE_DEFINED typedef union { char *string; uid_t uid; } YYSTYPE; #endif /* YYSTYPE_DEFINED */ extern YYSTYPE socks_yylval; dante-1.1.19.dfsg/lib/config_parse.y0000644000175000017500000007247010364161025015705 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ %{ #include "common.h" #include "yacconfig.h" static const char rcsid[] = "$Id: config_parse.y,v 1.199 2006/01/20 12:59:06 michaels Exp $"; __BEGIN_DECLS #if HAVE_LIBWRAP && SOCKS_SERVER extern jmp_buf tcpd_buf; #endif /* HAVE_LIBWRAP && SOCKS_SERVER */ static void addressinit __P((struct ruleaddress_t *address)); #if SOCKS_SERVER static void ruleinit __P((struct rule_t *rule)); static void fixconfig __P((void)); #endif __END_DECLS extern int yylineno; extern char *yytext; #if SOCKS_SERVER static struct rule_t ruleinitmem; static struct rule_t rule; /* new rule. */ static struct protocol_t protocolmem; /* new protocolmem. */ #endif static struct serverstate_t state; static struct route_t route; /* new route. */ static struct ruleaddress_t gw; /* new gateway. */ static struct ruleaddress_t src; /* new src. */ static struct ruleaddress_t dst; /* new dst. */ static struct ruleaddress_t rdr_from; static struct ruleaddress_t rdr_to; static struct ruleaddress_t *ruleaddress; /* current ruleaddress */ static struct extension_t *extension; /* new extensions */ static struct proxyprotocol_t *proxyprotocol;/* proxy protocol. */ static char *atype; /* atype of new address. */ static struct in_addr *ipaddr; /* new ipaddress */ static struct in_addr *netmask; /* new netmask */ static char *domain; /* new domain. */ static char *ifname; /* new ifname. */ static in_port_t *port_tcp; /* new TCP portnumber. */ static in_port_t *port_udp; /* new UDP portnumber. */ static int *methodv; /* new authmethods. */ static size_t *methodc; /* number of them. */ static struct protocol_t *protocol; /* new protocol. */ static struct command_t *command; /* new command. */ static enum operator_t *operator; /* new operator. */ static const struct { const char *name; const int value; } syslogfacilityv[] = { #ifdef LOG_AUTH { "auth", LOG_AUTH }, #endif /* LOG_AUTH */ #ifdef LOG_AUTHPRIV { "authpriv", LOG_AUTHPRIV }, #endif /* LOG_AUTHPRIV */ #ifdef LOG_DAEMON { "daemon", LOG_DAEMON }, #endif /* LOG_DAEMON */ #ifdef LOG_USER { "user", LOG_USER }, #endif /* LOG_USER */ #ifdef LOG_LOCAL0 { "local0", LOG_LOCAL0 }, #endif /* LOG_LOCAL0 */ #ifdef LOG_LOCAL1 { "local1", LOG_LOCAL1 }, #endif /* LOG_LOCAL1 */ #ifdef LOG_LOCAL2 { "local2", LOG_LOCAL2 }, #endif /* LOG_LOCAL2 */ #ifdef LOG_LOCAL3 { "local3", LOG_LOCAL3 }, #endif /* LOG_LOCAL3 */ #ifdef LOG_LOCAL4 { "local4", LOG_LOCAL4 }, #endif /* LOG_LOCAL4 */ #ifdef LOG_LOCAL5 { "local5", LOG_LOCAL5 }, #endif /* LOG_LOCAL5 */ #ifdef LOG_LOCAL6 { "local6", LOG_LOCAL6 }, #endif /* LOG_LOCAL6 */ #ifdef LOG_LOCAL7 { "local7", LOG_LOCAL7 } #endif /* LOG_LOCAL7 */ }; #define YYDEBUG 1 #define ADDMETHOD(method) \ do { \ if (methodisset(method, methodv, *methodc)) \ yywarn("duplicate method: %s", method2string(method)); \ else { \ if (*methodc >= MAXMETHOD) \ yyerror("internal error, (%d >= %d)", *methodc, MAXMETHOD); \ methodv[(*methodc)++] = method; \ } \ } while (0) %} %union { char *string; uid_t uid; } %type configtype serverline clientline deprecated %token SERVERCONFIG CLIENTCONFIG DEPRECATED %type protocol protocols protocolname %type proxyprotocol proxyprotocolname proxyprotocols %type user username usernames %type pamservicename %type resolveprotocol resolveprotocolname %type srchost srchostoption srchostoptions %type command commands commandname %type redirect %type bandwidth %type session maxsessions %type routeinit /* clientconfig exclusive. */ %type clientinit clientconfig %type clientoption %type debuging /* serverconfig exclusive */ %type iotimeout connecttimeout %type extension extensionname extensions %type internal internalinit external externalinit %type external_rotation %type logoutput logoutputdevice logoutputdevices %type compatibility compatibilityname compatibilitys %type global_authmethod global_clientauthmethod %type authmethod authmethods authmethodname %type serveroption %type serverinit serverconfig %type userids user_privileged user_unprivileged user_libwrap %type userid %type childstate %token CLIENTRULE %token INTERNAL EXTERNAL EXTERNAL_ROTATION %token DEBUGING RESOLVEPROTOCOL %token SRCHOST NOMISMATCH NOUNKNOWN %token EXTENSION BIND PRIVILEGED %token IOTIMEOUT CONNECTTIMEOUT %token METHOD CLIENTMETHOD NONE GSSAPI UNAME RFC931 PAM %token COMPATIBILITY REUSEADDR SAMEPORT %token USERNAME %token USER_PRIVILEGED USER_UNPRIVILEGED USER_LIBWRAP %token LOGOUTPUT LOGFILE %token CHILD_MAXIDLE /* route */ %type route %type via gateway routeoption routeoptions %token ROUTE VIA /* rulelines */ %type rule ruleoption ruleoptions %type clientrule clientruleoption clientruleoptions %type option %type verdict %type fromto %type log logs logname %type libwrap %type srcaddress dstaddress %type internaladdress externaladdress %type address ipaddress gwaddress domain ifname direct %type from to %type netmask %type port portrange portstart portoperator portnumber portservice %token VERDICT_BLOCK VERDICT_PASS %token PAMSERVICENAME %token PROTOCOL PROTOCOL_TCP PROTOCOL_UDP PROTOCOL_FAKE %token PROXYPROTOCOL PROXYPROTOCOL_SOCKS_V4 PROXYPROTOCOL_SOCKS_V5 PROXYPROTOCOL_MSPROXY_V2 PROXYPROTOCOL_HTTP_V1_0 %token USER %token COMMAND COMMAND_BIND COMMAND_CONNECT COMMAND_UDPASSOCIATE COMMAND_BINDREPLY COMMAND_UDPREPLY %token ACTION %token LINE %token LIBWRAPSTART %token OPERATOR %token LOG LOG_CONNECT LOG_DATA LOG_DISCONNECT LOG_ERROR LOG_IOOPERATION %token IPADDRESS DOMAINNAME DIRECT IFNAME %token PORT PORTNUMBER SERVICENAME %token NUMBER %token FROM TO %token REDIRECT %token BANDWIDTH %% /* * first token we get should say whether we are parsing for client * or server. Init as appropriate. */ configtype: serverinit serverline | clientinit clientline ; serverinit: SERVERCONFIG { #if SOCKS_SERVER protocol = &protocolmem; extension = &sockscf.extension; #endif } ; serverline: { $$ = NULL; } | serverline '\n' | serverline serverconfig | serverline clientrule | serverline rule | serverline route ; clientline: { $$ = NULL; } | clientline '\n' | clientline clientconfig | clientline route ; clientinit: CLIENTCONFIG { } ; clientconfig: clientoption | deprecated ; serverconfig: global_authmethod | global_clientauthmethod | deprecated | internal | external | external_rotation | logoutput | serveroption | userids | childstate ; serveroption: compatibility | connecttimeout | extension | iotimeout | resolveprotocol | srchost ; deprecated: DEPRECATED { yywarn("given keyword is deprecated"); } route: ROUTE routeinit '{' routeoptions fromto gateway routeoptions '}' { route.src = src; route.dst = dst; ruleaddress2sockshost(&gw, &route.gw.host, SOCKS_TCP); route.gw.state = state; addroute(&route); } ; routeinit: { command = &state.command; extension = &state.extension; methodv = state.methodv; methodc = &state.methodc; protocol = &state.protocol; proxyprotocol = &state.proxyprotocol; bzero(&state, sizeof(state)); bzero(&route, sizeof(route)); bzero(&gw, sizeof(gw)); bzero(&src, sizeof(src)); bzero(&dst, sizeof(dst)); src.atype = SOCKS_ADDR_IPV4; dst.atype = SOCKS_ADDR_IPV4; } ; proxyprotocol: PROXYPROTOCOL ':' proxyprotocols ; proxyprotocolname: PROXYPROTOCOL_SOCKS_V4 { proxyprotocol->socks_v4 = 1; } | PROXYPROTOCOL_SOCKS_V5 { proxyprotocol->socks_v5 = 1; } | PROXYPROTOCOL_MSPROXY_V2 { proxyprotocol->msproxy_v2 = 1; } | PROXYPROTOCOL_HTTP_V1_0 { proxyprotocol->http_v1_0 = 1; } | deprecated ; proxyprotocols: proxyprotocolname | proxyprotocolname proxyprotocols ; user: USER ':' usernames ; username: USERNAME { #if SOCKS_SERVER #if !HAVE_LIBWRAP if (strcmp($1, method2string(AUTHMETHOD_RFC931)) == 0) yyerror("method %s requires libwrap", AUTHMETHOD_RFC931s); #endif /* !HAVE_LIBWRAP */ if (adduser(&rule.user, $1) == NULL) yyerror(NOMEM); #endif /* SOCKS_SERVER */ } ; usernames: username | username usernames ; extension: EXTENSION ':' extensions ; extensionname: BIND { extension->bind = 1; } ; extensions: extensionname | extensionname extensions ; internal: INTERNAL internalinit ':' internaladdress { #if SOCKS_SERVER addinternal(ruleaddress); #endif } ; internalinit: { #if SOCKS_SERVER static struct ruleaddress_t mem; struct servent *service; addressinit(&mem); /* set default port. */ if ((service = getservbyname("socks", "tcp")) == NULL) *port_tcp = htons(SOCKD_PORT); else *port_tcp = (in_port_t)service->s_port; #endif } ; external: EXTERNAL externalinit ':' externaladdress { #if SOCKS_SERVER addexternal(ruleaddress); #endif } ; externalinit: { #if SOCKS_SERVER static struct ruleaddress_t mem; addressinit(&mem); #endif } ; external_rotation: EXTERNAL_ROTATION ':' NONE { #if SOCKS_SERVER sockscf.external.rotation = ROTATION_NONE; } | EXTERNAL_ROTATION ':' ROUTE { #if !HAVE_ROUTE_SOURCE yyerror("don't have code to discover route/address source on platform"); #else /* !HAVE_ROUTE_SOURCE */ sockscf.external.rotation = ROTATION_ROUTE; #endif /* HAVE_ROUTE_SOURCE */ #endif /* SOCKS_SERVER */ } ; clientoption: logoutput | debuging | resolveprotocol ; logoutput: LOGOUTPUT ':' logoutputdevices ; logoutputdevice: LOGFILE { const char *syslogname = "syslog"; if (strncmp($1, syslogname, strlen(syslogname)) == 0 && ($1[strlen(syslogname)] == NUL || $1[strlen(syslogname)] == '/')) { char *sl; sockscf.log.type |= LOGTYPE_SYSLOG; if (*(sl = &($1[strlen(syslogname)])) == '/') { /* facility. */ size_t i; for (i = 0, ++sl; i < ELEMENTS(syslogfacilityv); ++i) if (strcmp(sl, syslogfacilityv[i].name) == 0) break; if (i == ELEMENTS(syslogfacilityv)) yyerror("unknown syslog facility \"%s\"", sl); sockscf.log.facility = syslogfacilityv[i].value; sockscf.log.facilityname = syslogfacilityv[i].name; } else { sockscf.log.facility = LOG_DAEMON; /* default. */ sockscf.log.facilityname = "daemon"; } } else /* adding/changing filename. */ if (!sockscf.state.init) { int flag; sockscf.log.type |= LOGTYPE_FILE; if ((sockscf.log.fpv = (FILE **)realloc(sockscf.log.fpv, sizeof(*sockscf.log.fpv) * (sockscf.log.fpc + 1))) == NULL || (sockscf.log.fplockv = (int *)realloc(sockscf.log.fplockv, sizeof(*sockscf.log.fplockv) * (sockscf.log.fpc + 1))) == NULL || (sockscf.log.fnamev = (char **)realloc(sockscf.log.fnamev, sizeof(*sockscf.log.fnamev) * (sockscf.log.fpc + 1))) == NULL) serrx(EXIT_FAILURE, NOMEM); if ((sockscf.log.fplockv[sockscf.log.fpc] = socks_mklock(SOCKS_LOCKFILE)) == -1) serr(EXIT_FAILURE, "socks_mklock()"); if (strcmp($1, "stdout") == 0) sockscf.log.fpv[sockscf.log.fpc] = stdout; else if (strcmp($1, "stderr") == 0) sockscf.log.fpv[sockscf.log.fpc] = stderr; else if ((sockscf.log.fpv[sockscf.log.fpc] = fopen($1, "a")) == NULL) yyerror("fopen(%s)", $1); if ((flag = fcntl(fileno(sockscf.log.fpv[sockscf.log.fpc]), F_GETFD, 0)) == -1 || fcntl(fileno(sockscf.log.fpv[sockscf.log.fpc]), F_SETFD, flag | FD_CLOEXEC) == -1) serr(EXIT_FAILURE, "fcntl(F_GETFD/F_SETFD)"); if ((sockscf.log.fnamev[sockscf.log.fpc] = strdup($1)) == NULL) serr(EXIT_FAILURE, NOMEM); ++sockscf.log.fpc; } else { /* * Can't change filenames we log to after startup (well, * to be exact, we can't add new filenames, but we complain * about changing too for now since it's easier. */ size_t i; for (i = 0; i < sockscf.log.fpc; ++i) if (strcmp(sockscf.log.fnamev[i], $1) == 0) { /* same name. */ FILE *fp; if (strcmp(sockscf.log.fnamev[i], "stdout") == 0 || strcmp(sockscf.log.fnamev[i], "stderr") == 0) continue; /* don't need to close these, hard to reopen. */ /* reopen logfiles. */ if ((fp = fopen(sockscf.log.fnamev[i], "a")) == NULL) yyerror("fopen(%s)", $1); fclose(sockscf.log.fpv[i]); sockscf.log.fpv[i] = fp; break; } if (i == sockscf.log.fpc) /* no match found. */ yywarn("can't change logoutput after startup"); } } ; logoutputdevices: logoutputdevice | logoutputdevice logoutputdevices ; childstate: CHILD_MAXIDLE ':' NUMBER { #if SOCKS_SERVER yyerror("Sorry, child.maxidle is disabled due to a suspected bug"); if (atoi($3) != 0 && atoi($3) < SOCKD_FREESLOTS) yyerror("%s (%s) can't be less than SOCKD_FREESLOTS (%d)", $1, $3, SOCKD_FREESLOTS); sockscf.child.maxidle = atoi($3); #endif } ; userids: user_privileged | user_unprivileged | user_libwrap ; user_privileged: USER_PRIVILEGED ':' userid { #if SOCKS_SERVER sockscf.uid.privileged = $3; sockscf.uid.privileged_isset = 1; #endif } ; user_unprivileged: USER_UNPRIVILEGED ':' userid { #if SOCKS_SERVER sockscf.uid.unprivileged = $3; sockscf.uid.unprivileged_isset = 1; #endif } ; user_libwrap: USER_LIBWRAP ':' userid { #if HAVE_LIBWRAP && SOCKS_SERVER sockscf.uid.libwrap = $3; sockscf.uid.libwrap_isset = 1; #else /* HAVE_LIBWRAP */ yyerror("libwrapsupport not compiled in"); #endif /* !HAVE_LIBWRAP */ } ; userid: USERNAME { struct passwd *pw; if ((pw = getpwnam($1)) == NULL) serrx(EXIT_FAILURE, "no such user \"%s\"", $1); else $$ = pw->pw_uid; } ; iotimeout: IOTIMEOUT ':' NUMBER { #if SOCKS_SERVER sockscf.timeout.io = (time_t)atol($3); #endif } ; connecttimeout: CONNECTTIMEOUT ':' NUMBER { #if SOCKS_SERVER sockscf.timeout.negotiate = (time_t)atol($3); #endif } ; debuging: DEBUGING ':' NUMBER { sockscf.option.debug = atoi($3); } ; compatibility: COMPATIBILITY ':' compatibilitys ; compatibilityname: REUSEADDR { #if SOCKS_SERVER sockscf.compat.reuseaddr = 1; } | SAMEPORT { sockscf.compat.sameport = 1; #endif } ; compatibilitys: compatibilityname | compatibilityname compatibilitys ; resolveprotocol: RESOLVEPROTOCOL ':' resolveprotocolname ; resolveprotocolname: PROTOCOL_FAKE { sockscf.resolveprotocol = RESOLVEPROTOCOL_FAKE; } | PROTOCOL_TCP { #if HAVE_NO_RESOLVESTUFF yyerror("resolveprotocol keyword not supported on this installation"); #else /* HAVE_NO_RESOLVESTUFF */ sockscf.resolveprotocol = RESOLVEPROTOCOL_TCP; #endif /* !HAVE_NO_RESOLVESTUFF */ } | PROTOCOL_UDP { sockscf.resolveprotocol = RESOLVEPROTOCOL_UDP; } ; srchost: SRCHOST ':' srchostoptions ; srchostoption: NOMISMATCH { #if HAVE_LIBWRAP && SOCKS_SERVER sockscf.srchost.nomismatch = 1; } | NOUNKNOWN { sockscf.srchost.nounknown = 1; #else yyerror("srchostoption requires libwrap"); #endif } ; srchostoptions: srchostoption | srchostoption srchostoptions ; authmethod: METHOD ':' authmethods ; global_authmethod: METHOD ':' { #if SOCKS_SERVER methodv = sockscf.methodv; methodc = &sockscf.methodc; *methodc = 0; /* reset. */ #endif } authmethods ; global_clientauthmethod: CLIENTMETHOD ':' { #if SOCKS_SERVER methodv = sockscf.clientmethodv; methodc = &sockscf.clientmethodc; *methodc = 0; /* reset. */ #endif } authmethods ; authmethodname: NONE { ADDMETHOD(AUTHMETHOD_NONE); }; | GSSAPI { yyerror("%s not supported", AUTHMETHOD_GSSAPIs); } | UNAME { ADDMETHOD(AUTHMETHOD_UNAME); } | RFC931 { #if HAVE_LIBWRAP && SOCKS_SERVER ADDMETHOD(AUTHMETHOD_RFC931); #else /* !HAVE_LIBWRAP */ yyerror("method %s requires libwraplibrary", AUTHMETHOD_RFC931s); #endif /* !HAVE_LIBWRAP */ } | PAM { #if !HAVE_PAM yyerror("method %s requires pamlibrary", AUTHMETHOD_PAMs); #else /* HAVE_PAM */ ADDMETHOD(AUTHMETHOD_PAM); #endif /* !HAVE_PAM */ } ; authmethods: authmethodname | authmethodname authmethods ; /* filterrules */ clientrule: CLIENTRULE verdict '{' clientruleoptions fromto clientruleoptions '}' { #if SOCKS_SERVER rule.src = src; rule.dst = dst; rule.rdr_from = rdr_from; rule.rdr_to = rdr_to; addclientrule(&rule); #endif } ; clientruleoption: option ; clientruleoptions: { $$ = NULL; } | clientruleoption clientruleoptions ; rule: verdict '{' ruleoptions fromto ruleoptions '}' { #if SOCKS_SERVER rule.src = src; rule.dst = dst; rule.rdr_from = rdr_from; rule.rdr_to = rdr_to; addsocksrule(&rule); #endif } ; ruleoption: option | bandwidth { #if SOCKS_SERVER checkmodule("bandwidth"); #endif } | command | protocol | proxyprotocol | redirect { #if SOCKS_SERVER checkmodule("redirect"); #endif } ; ruleoptions: { $$ = NULL; } | ruleoption ruleoptions ; option: authmethod | libwrap | log | pamservicename | user | session { #if SOCKS_SERVER checkmodule("session"); #endif } ; verdict: VERDICT_BLOCK { #if SOCKS_SERVER ruleinit(&rule); rule.verdict = VERDICT_BLOCK; } | VERDICT_PASS { ruleinit(&rule); rule.verdict = VERDICT_PASS; #endif } ; command: COMMAND ':' commands ; commandname: COMMAND_BIND { command->bind = 1; } | COMMAND_CONNECT { command->connect = 1; } | COMMAND_UDPASSOCIATE { command->udpassociate = 1; } /* pseudocommands */ | COMMAND_BINDREPLY { command->bindreply = 1; } | COMMAND_UDPREPLY { command->udpreply = 1; } ; commands: commandname | commandname commands ; protocol: PROTOCOL ':' protocols ; protocolname: PROTOCOL_TCP { protocol->tcp = 1; } | PROTOCOL_UDP { protocol->udp = 1; } ; protocols: protocolname | protocolname protocols ; fromto: srcaddress dstaddress ; redirect: REDIRECT rdr_fromaddress | REDIRECT rdr_toaddress ; session: maxsessions ; maxsessions: MAXSESSIONS ':' NUMBER { #if SOCKS_SERVER static session_t ssinit; /* * temporarily allocate ordinary memory, later on point it to * the correct shared mem. */ if ((rule.ss = malloc(sizeof(*rule.ss))) == NULL) serr(EXIT_FAILURE, NOMEM); *rule.ss = ssinit; if ((rule.ss->maxsessions = atoi($3)) < 0) yyerror("session value can not be less than 0"); #endif /* SOCKS_SERVER */ } ; bandwidth: BANDWIDTH ':' NUMBER { #if SOCKS_SERVER static bw_t bwmeminit; /* * temporarily allocate ordinary memory, later on point it to * the correct index in sockscf.bwv. */ if ((rule.bw = (bw_t *)malloc(sizeof(*rule.bw))) == NULL) serr(EXIT_FAILURE, NOMEM); *rule.bw = bwmeminit; if ((rule.bw->maxbps = atoi($3)) <= 0) yyerror("bandwidth value must be greater than 0"); #endif /* SOCKS_SERVER */ } ; log: LOG ':' logs ; logname: LOG_CONNECT { #if SOCKS_SERVER rule.log.connect = 1; } | LOG_DATA { rule.log.data = 1; } | LOG_DISCONNECT { rule.log.disconnect = 1; } | LOG_ERROR { rule.log.error = 1; } | LOG_IOOPERATION { rule.log.iooperation = 1; #endif } ; logs: logname | logname logs ; pamservicename: PAMSERVICENAME ':' SERVICENAME { #if HAVE_PAM && SOCKS_SERVER if (strlen($3) >= sizeof(rule.pamservicename)) yyerror("servicename too long"); strcpy(rule.pamservicename, $3); #else /* !HAVE_PAM */ yyerror("pamsupport not compiled in"); #endif /* HAVE_PAM */ } ; libwrap: LIBWRAPSTART ':' LINE { #if HAVE_LIBWRAP && SOCKS_SERVER struct request_info request; char libwrap[LIBWRAPBUF]; if (strlen($3) >= sizeof(rule.libwrap)) yyerror("libwrapline too long, make LIBWRAPBUF bigger"); strcpy(rule.libwrap, $3); /* libwrap modifies the passed buffer. */ SASSERTX(strlen(rule.libwrap) < sizeof(libwrap)); strcpy(libwrap, rule.libwrap); ++dry_run; request_init(&request, RQ_FILE, -1, RQ_DAEMON, __progname, 0); if (setjmp(tcpd_buf) != 0) yyerror("bad libwrap line"); process_options(libwrap, &request); --dry_run; #else /* !HAVE_LIBWRAP */ yyerror("libwrapsupport not compiled in"); #endif } ; srcaddress: from ':' address ; dstaddress: to ':' address ; rdr_fromaddress: rdr_from ':' address ; rdr_toaddress: rdr_to ':' address ; gateway: via ':' gwaddress ; routeoption: command | extension | protocol | proxyprotocol | authmethod ; routeoptions: { $$ = NULL; } | routeoption routeoptions ; from: FROM { addressinit(&src); } ; to: TO { addressinit(&dst); } ; rdr_from: FROM { addressinit(&rdr_from); } ; rdr_to: TO { addressinit(&rdr_to); } ; via: VIA { addressinit(&gw); } ; internaladdress: ipaddress port | domain port | ifname port ; externaladdress: ipaddress | domain | ifname ; address: ipaddress '/' netmask port | domain port | ifname port ; gwaddress: ipaddress port | domain port | direct ; ipaddress: IPADDRESS { *atype = SOCKS_ADDR_IPV4; if (inet_aton($1, ipaddr) != 1) yyerror("bad address: %s", $1); } ; netmask: NUMBER { if (atoi($1) < 0 || atoi($1) > 32) yyerror("bad netmask: %s", $1); netmask->s_addr = atoi($1) == 0 ? 0 : htonl(0xffffffff << (32 - atoi($1))); } | IPADDRESS { if (!inet_aton($1, netmask)) yyerror("bad netmask: %s", $1); } ; domain: DOMAINNAME { *atype = SOCKS_ADDR_DOMAIN; if (strlen($1) >= MAXHOSTNAMELEN) yyerror("domainname too long"); strcpy(domain, $1); } ; ifname: IFNAME { *atype = SOCKS_ADDR_IFNAME; if (strlen($1) >= MAXIFNAMELEN) yyerror("interfacename too long"); strcpy(ifname, $1); } ; direct: DIRECT { *atype = SOCKS_ADDR_DOMAIN; if (strlen($1) >= MAXHOSTNAMELEN) yyerror("domainname too long"); strcpy(domain, $1); route.state.direct = 1; } ; port: { $$ = NULL; } | PORT portoperator portnumber | PORT portrange ; portnumber: portservice | portstart ; portrange: portstart '-' portend ; portstart: PORTNUMBER { *port_tcp = htons((in_port_t)atoi($1)); *port_udp = htons((in_port_t)atoi($1)); } ; portend: PORTNUMBER { ruleaddress->portend = htons((in_port_t)atoi($1)); ruleaddress->operator = range; } ; portservice: SERVICENAME { struct servent *service; if ((service = getservbyname($1, "tcp")) == NULL) { if (protocol->tcp) yyerror("unknown tcp protocol: %s", $1); *port_tcp = htons(0); } else *port_tcp = (in_port_t)service->s_port; if ((service = getservbyname($1, "udp")) == NULL) { if (protocol->udp) yyerror("unknown udp protocol: %s", $1); *port_udp = htons(0); } else *port_udp = (in_port_t)service->s_port; if (*port_tcp == htons(0) && *port_udp == htons(0)) yyerror("unknown tcp/udp protocol"); /* if one protocol is unset, set to same as the other. */ if (*port_tcp == htons(0)) *port_tcp = *port_udp; else if (*port_udp == htons(0)) *port_udp = *port_tcp; } ; portoperator: OPERATOR { *operator = string2operator($1); } ; %% #define INTERACTIVE 0 extern FILE *yyin; int socks_parseinit; int readconfig(filename) const char *filename; { const char *function = "readconfig()"; /* yydebug = 1; */ yylineno = 1; socks_parseinit = 0; if ((yyin = fopen(filename, "r")) == NULL) { swarn("%s: %s", function, filename); return -1; } errno = 0; /* don't report old errors in yyparse(). */ yyparse(); fclose(yyin); #if SOCKS_SERVER fixconfig(); #endif /* SOCKS_SERVER */ errno = 0; return 0; } void #ifdef STDC_HEADERS yyerror(const char *fmt, ...) #else yyerror(fmt, va_alist) const char *fmt; va_dcl #endif /* STDC_HEADERS */ { va_list ap; char buf[2048]; size_t bufused; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, fmt); #else va_start(ap); #endif /* STDC_HEADERS */ bufused = snprintfn(buf, sizeof(buf), "%s: error on line %d, near '%.10s': ", sockscf.option.configfile, yylineno, (yytext == NULL || *yytext == NUL) ? "'start of line'" : yytext); vsnprintf(&buf[bufused], sizeof(buf) - bufused, fmt, ap); /* LINTED expression has null effect */ va_end(ap); if (errno) serr(EXIT_FAILURE, buf); serrx(EXIT_FAILURE, buf); } void #ifdef STDC_HEADERS yywarn(const char *fmt, ...) #else yywarn(fmt, va_alist) const char *fmt; va_dcl #endif /* STDC_HEADERS */ { va_list ap; char buf[2048]; size_t bufused; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, fmt); #else va_start(ap); #endif /* STDC_HEADERS */ bufused = snprintfn(buf, sizeof(buf), "%s: warning on line %d, near '%.10s': ", sockscf.option.configfile, yylineno, (yytext == NULL || *yytext == NUL) ? "'start of line'" : yytext); vsnprintf(&buf[bufused], sizeof(buf) - bufused, fmt, ap); /* LINTED expression has null effect */ va_end(ap); if (errno) swarn(buf); swarnx(buf); } static void addressinit(address) struct ruleaddress_t *address; { ruleaddress = address; atype = &ruleaddress->atype; ipaddr = &ruleaddress->addr.ipv4.ip; netmask = &ruleaddress->addr.ipv4.mask; domain = ruleaddress->addr.domain; ifname = ruleaddress->addr.ifname; port_tcp = &ruleaddress->port.tcp; port_udp = &ruleaddress->port.udp; operator = &ruleaddress->operator; } #if SOCKS_SERVER static void ruleinit(rule) struct rule_t *rule; { rule->linenumber = yylineno; command = &rule->state.command; methodv = rule->state.methodv; methodc = &rule->state.methodc; protocol = &rule->state.protocol; proxyprotocol = &rule->state.proxyprotocol; bzero(&src, sizeof(src)); bzero(&dst, sizeof(dst)); *rule = ruleinitmem; src.atype = SOCKS_ADDR_IPV4; src.addr.ipv4.ip.s_addr = htonl(INADDR_ANY); src.port.tcp = src.port.udp = src.portend = htons(0); dst = rdr_from = rdr_to = src; } static void fixconfig(void) { const char *function = "fixsettings()"; int i; uid_t euid; /* * Check arguments and settings, do they make sense? */ if (sockscf.clientmethodc == 0) sockscf.clientmethodv[sockscf.clientmethodc++] = AUTHMETHOD_NONE; #if !HAVE_DUMPCONF if (!sockscf.uid.privileged_isset) sockscf.uid.privileged = sockscf.state.euid; else { socks_seteuid(&euid, sockscf.uid.privileged); socks_reseteuid(sockscf.uid.privileged, euid); } if (!sockscf.uid.unprivileged_isset) sockscf.uid.unprivileged = sockscf.state.euid; else { socks_seteuid(&euid, sockscf.uid.unprivileged); socks_reseteuid(sockscf.uid.unprivileged, euid); } #if HAVE_LIBWRAP if (!sockscf.uid.libwrap_isset) sockscf.uid.libwrap = sockscf.state.euid; else { socks_seteuid(&euid, sockscf.uid.libwrap); socks_reseteuid(sockscf.uid.libwrap, euid); } #endif /* HAVE_LIBWRAP */ #endif /* !HAVE_DUMPCONF */ if (sockscf.internalc == 0) serrx(EXIT_FAILURE, "%s: no internal address given", function); /* values will be used once and checked there. */ if (sockscf.external.addrc == 0) serrx(EXIT_FAILURE, "%s: no external address given", function); #if !HAVE_DUMPCONF for (i = 0; i < sockscf.external.addrc; ++i) if (!addressisbindable(&sockscf.external.addrv[i])) serrx(EXIT_FAILURE, NULL); #endif /* !HAVE_DUMPCONF */ #if !HAVE_DUMPCONF if (sockscf.methodc == 0) swarnx("%s: no methods enabled (total block)", function); if (sockscf.uid.unprivileged == 0) swarnx("%s: setting the unprivileged uid to %d is not recommended", function, sockscf.uid.unprivileged); #if HAVE_LIBWRAP if (sockscf.uid.libwrap == 0) swarnx("%s: setting the libwrap uid to %d is not recommended", function, sockscf.uid.libwrap); #endif /* HAVE_LIBWRAP */ #endif /* !HAVE_DUMPCONF */ } #endif /* SOCKS_SERVER */ dante-1.1.19.dfsg/lib/Raccept.c0000754000175000017500000001773610324735543014617 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: Raccept.c,v 1.80 2005/10/11 13:17:10 michaels Exp $"; int Raccept(s, addr, addrlen) int s; struct sockaddr *addr; socklen_t *addrlen; { const char *function = "Raccept()"; char addrstring[MAXSOCKADDRSTRING]; struct sockaddr accepted; struct socks_t packet; struct socksfd_t *socksfd; fd_set rset; int fdbits, p, iotype, remote; clientinit(); slog(LOG_DEBUG, "%s", function); /* can't call Raccept() on unknown descriptors. */ if (!socks_addrisok((unsigned int)s)) { socks_rmaddr((unsigned int)s); return accept(s, addr, addrlen); } socksfd = socks_getaddr((unsigned int)s); SASSERTX(socksfd != NULL); bzero(&packet, sizeof(packet)); packet.version = (unsigned char)socksfd->state.version; packet.auth.method = AUTHMETHOD_NOTSET; if ((iotype = fcntl(s, F_GETFL, 0)) == -1) return -1; #if SOCKS_TRYHARDER /* * Perhaps overkill, but try to be as compatible as possible. * BSD supports multiple process' calling accept(2) on * the same descriptor, try to support that functionality by locking * the socksfd object ourself in this function, so another process * calling Raccept() on this object will fail. */ if (iotype & NONBLOCKING) p = socks_lock(socksfd->state.lock, F_WRLCK, 0); else p = socks_lock(socksfd->state.lock, F_WRLCK, -1); if (p != 0) return -1; #endif /* SOCKS_TRYHARDER */ FD_ZERO(&rset); fdbits = -1; /* check socket we listen on because we support ordinary connects. */ FD_SET(s, &rset); fdbits = MAX(fdbits, s); switch (packet.version) { case SOCKS_V4: case SOCKS_V5: /* connection to server, for forwarded connections or errors. */ FD_SET(socksfd->control, &rset); fdbits = MAX(fdbits, socksfd->control); break; case MSPROXY_V2: break; /* controlconnection checked asynchronously. */ default: SERRX(packet.version); } SASSERTX(fdbits >= 0); ++fdbits; if (iotype & NONBLOCKING) { struct timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = 0; if ((p = selectn(fdbits, &rset, NULL, NULL, &timeout)) == 0) { errno = EWOULDBLOCK; p = -1; } } else p = selectn(fdbits, &rset, NULL, NULL, NULL); if (p == -1) { #if SOCKS_TRYHARDER socks_unlock(socksfd->state.lock); #endif /* SOCKS_TRYHARDER */ return -1; } SASSERTX(p > 0); if (FD_ISSET(s, &rset)) { /* pending connection on datasocket. */ socklen_t len; len = sizeof(accepted); if ((remote = accept(s, &accepted, &len)) == -1) { #if SOCKS_TRYHARDER socks_unlock(socksfd->state.lock); #endif /* SOCKS_TRYHARDER */ return -1; } slog(LOG_DEBUG, "%s: accepted: %s", function, sockaddr2string(&accepted, addrstring, sizeof(addrstring))); if (socksfd->state.acceptpending) { /* * connection forwarded by server or a ordinary connect? */ /* LINTED pointer casts may be troublesome */ if (TOIN(&accepted)->sin_addr.s_addr == TOIN(&socksfd->reply)->sin_addr.s_addr) { /* matches servers IP address, could be forwarded. */ int forwarded; switch (socksfd->state.version) { case SOCKS_V4: case SOCKS_V5: packet.req.version = (char)socksfd->state.version; packet.req.command = SOCKS_BIND; packet.req.flag = 0; sockaddr2sockshost(&accepted, &packet.req.host); packet.req.auth = &socksfd->state.auth; if (socks_sendrequest(socksfd->control, &packet.req) != 0) { close(remote); return -1; } if (socks_recvresponse(socksfd->control, &packet.res, packet.req.version) != 0) { #if SOCKS_TRYHARDER socks_unlock(socksfd->state.lock); #endif close(remote); return -1; } if (packet.res.host.atype != SOCKS_ADDR_IPV4) { swarnx("%s: unexpected atype in bindquery response: %d", function, packet.res.host.atype); #if SOCKS_TRYHARDER socks_unlock(socksfd->state.lock); #endif close(remote); errno = ECONNABORTED; return -1; } if (packet.res.host.addr.ipv4.s_addr == htonl(0)) forwarded = 0; else forwarded = 1; break; case MSPROXY_V2: if (sockaddrareeq(&socksfd->reply, &accepted)) { /* socksfd->forus.accepted filled in by sigio(). */ accepted = socksfd->forus.accepted; sockaddr2sockshost(&socksfd->forus.accepted, &packet.res.host); /* seems to support only one forward. */ socksfd->state.acceptpending = 0; forwarded = 1; } else forwarded = 0; break; default: SERRX(socksfd->state.version); } if (forwarded) { /* a separate socket with it's own remote address. */ socksfd = socks_addaddr((unsigned int)remote, socksfd); fakesockshost2sockaddr(&packet.res.host, &accepted); socksfd->forus.accepted = accepted; /* has a different local address if INADDR_ANY was bound. */ /* LINTED pointer casts may be troublesome */ if (TOIN(&socksfd->local)->sin_addr.s_addr == htonl(INADDR_ANY)) { len = sizeof(socksfd->local); if (getsockname(remote, &socksfd->local, &len) != 0) swarn("%s: getsockname(remote)", function); } } /* else; ordinary connect. */ } } /* else; not bind extension, must be a ordinary connect. */ } else { /* pending connection on controlchannel, server wants to forward. */ SASSERTX(FD_ISSET(socksfd->control, &rset)); switch (packet.version) { case SOCKS_V4: case SOCKS_V5: if (socks_recvresponse(socksfd->control, &packet.res, packet.version) != 0) { #if SOCKS_TRYHARDER socks_unlock(socksfd->state.lock); #endif return -1; } fakesockshost2sockaddr(&packet.res.host, &accepted); socksfd->forus.accepted = accepted; remote = socksfd->control; break; case MSPROXY_V2: SERRX(0); /* should not be checked, so not checked either. */ break; default: SERRX(packet.version); } } #if SOCKS_TRYHARDER socks_unlock(socksfd->state.lock); #endif if (addr != NULL) { *addrlen = MIN(*addrlen, (socklen_t)sizeof(accepted)); memcpy(addr, &accepted, (size_t)*addrlen); } return remote; } dante-1.1.19.dfsg/lib/config.c0000644000175000017500000004232010354742704014464 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: config.c,v 1.162 2005/12/28 18:25:04 michaels Exp $"; void genericinit(void) { const char *function = "genericinit()"; size_t i; #if SOCKS_SERVER sigset_t set, oset; #endif if (!sockscf.state.init) { #if !HAVE_SETPROCTITLE /* create a backup to avoid setproctitle replacement overwriting it. */ if ((__progname = strdup(__progname)) == NULL) serrx(EXIT_FAILURE, "%s: %s", function, NOMEM); #endif /* !HAVE_SETPROCTITLE */ } #if SOCKS_SERVER sigemptyset(&set); sigaddset(&set, SIGHUP); sigaddset(&set, SIGTERM); if (sigprocmask(SIG_BLOCK, &set, &oset) != 0) swarn("%s: sigprocmask(SIG_BLOCK)", function); #endif if (readconfig(sockscf.option.configfile) != 0) #if SOCKS_SERVER exit(EXIT_FAILURE); #else return; #endif #if SOCKS_SERVER if (sigprocmask(SIG_SETMASK, &oset, NULL) != 0) swarn("%s: sigprocmask(SIG_SETMASK)", function); #endif newprocinit(); switch (sockscf.resolveprotocol) { case RESOLVEPROTOCOL_TCP: #if !HAVE_NO_RESOLVESTUFF _res.options |= RES_USEVC; #else /* HAVE_NO_RESOLVESTUFF */ SERRX(sockscf.resolveprotocol); #endif /* HAVE_NO_RESOLVESTUFF */ break; case RESOLVEPROTOCOL_UDP: case RESOLVEPROTOCOL_FAKE: break; default: SERRX(sockscf.resolveprotocol); } for (i = 0; i < sockscf.log.fpc; ++i) if (setvbuf(sockscf.log.fpv[i], NULL, _IOLBF, 0) != 0) swarn("%s: setvbuf(_IOLBF)", function); #if !HAVE_NO_RESOLVESTUFF res_init(); #endif /* !HAVE_NO_RESOLVSTUFF */ sockscf.state.init = 1; } struct route_t * addroute(newroute) const struct route_t *newroute; { const char *function = "addroute()"; static const struct serverstate_t state; struct route_t *route; if ((route = (struct route_t *)malloc(sizeof(*route))) == NULL) serrx(EXIT_FAILURE, "%s: %s", function, NOMEM); *route = *newroute; /* check gateway. */ /* if no command set, set all. */ if (memcmp(&state.command, &route->gw.state.command, sizeof(state.command)) == 0) { #if SOCKS_CLIENT memset(&route->gw.state.command, UCHAR_MAX, sizeof(route->gw.state.command)); #else /* SOCKS_SERVER, only connect is supported. */ route->gw.state.command.connect = 1; #endif } #if SOCKS_SERVER else if (route->gw.state.command.bind || route->gw.state.command.bindreply || route->gw.state.command.udpassociate || route->gw.state.command.udpreply) swarnx("%s: serverchaining is only supported for the connect command", function); #endif /* if no protocol set, set all. */ if (memcmp(&state.protocol, &route->gw.state.protocol, sizeof(state.protocol)) == 0) { #if SOCKS_CLIENT memset(&route->gw.state.protocol, UCHAR_MAX, sizeof(route->gw.state.protocol)); #else /* SOCKS_SERVER, only connect is supported. */ route->gw.state.protocol.tcp = 1; #endif } #if SOCKS_SERVER else if (route->gw.state.protocol.udp) swarnx("%s: serverchaining is only supported for the tcp protocol", function); #endif /* if no proxyprotocol set, set all except msproxy. */ if (memcmp(&state.proxyprotocol, &route->gw.state.proxyprotocol, sizeof(state.proxyprotocol)) == 0) { memset(&route->gw.state.proxyprotocol, UCHAR_MAX, sizeof(route->gw.state.proxyprotocol)); route->gw.state.proxyprotocol.msproxy_v2 = 0; } /* switch off commands/protocols set but not supported by proxyprotocol. */ if (!route->gw.state.proxyprotocol.socks_v5) { route->gw.state.command.udpassociate = 0; route->gw.state.protocol.udp = 0; } if (!route->gw.state.proxyprotocol.socks_v4 && !route->gw.state.proxyprotocol.socks_v5 && !route->gw.state.proxyprotocol.msproxy_v2) route->gw.state.command.bind = 0; /* if no method set, set all we support. */ if (route->gw.state.methodc == 0) { int *methodv = route->gw.state.methodv; size_t *methodc = &route->gw.state.methodc; methodv[(*methodc)++] = AUTHMETHOD_NONE; methodv[(*methodc)++] = AUTHMETHOD_UNAME; } if (route->src.atype == SOCKS_ADDR_IFNAME) yyerror("interfacenames not supported for src address"); if (route->dst.atype == SOCKS_ADDR_IFNAME) yyerror("interfacenames not supported for src address"); if (sockscf.route == NULL) { sockscf.route = route; sockscf.route->number = 1; } else { /* append rule to the end of list. */ struct route_t *lastroute; lastroute = sockscf.route; while (lastroute->next != NULL) lastroute = lastroute->next; route->number = lastroute->number + 1; lastroute->next = route; } route->next = NULL; return route; } void showroute(route) const struct route_t *route; { char hstring[MAXSOCKSHOSTSTRING]; char addr[MAXRULEADDRSTRING]; slog(LOG_INFO, "route #%d", route->number); slog(LOG_INFO, "src: %s", ruleaddress2string(&route->src, addr, sizeof(addr))); slog(LOG_INFO, "dst: %s", ruleaddress2string(&route->dst, addr, sizeof(addr))); slog(LOG_INFO, "gateway: %s", sockshost2string(&route->gw.host, hstring, sizeof(hstring))); showstate(&route->gw.state); } struct route_t * socks_getroute(req, src, dst) const struct request_t *req; const struct sockshost_t *src; const struct sockshost_t *dst; { /* const char *function = "socks_getroute()"; */ struct route_t *route; int protocol; #if SOCKS_CLIENT clientinit(); #endif for (route = sockscf.route; route != NULL; route = route->next) { if (route->state.bad) /* CONSTCOND */ if (BADROUTE_EXPIRE == 0 || difftime(time(NULL), route->state.badtime) <= BADROUTE_EXPIRE) continue; else route->state.bad = 0; switch (req->version) { case SOCKS_V4: if (!route->gw.state.proxyprotocol.socks_v4) continue; switch (req->host.atype) { case SOCKS_ADDR_IPV4: break; case SOCKS_ADDR_IPV6: case SOCKS_ADDR_DOMAIN: continue; /* not failure, just checking. */ default: SERRX(req->host.atype); /* failure, nothing else exists. */ } break; case SOCKS_V5: if (!route->gw.state.proxyprotocol.socks_v5) continue; switch (req->host.atype) { case SOCKS_ADDR_IPV4: case SOCKS_ADDR_IPV6: case SOCKS_ADDR_DOMAIN: break; default: SERRX(req->host.atype); /* failure, nothing else exists. */ } break; case MSPROXY_V2: if (!route->gw.state.proxyprotocol.msproxy_v2) continue; break; case HTTP_V1_0: if (!route->gw.state.proxyprotocol.http_v1_0) continue; break; default: SERRX(req->version); } switch (req->command) { case SOCKS_BIND: if (!route->gw.state.command.bind) continue; if (req->host.atype == SOCKS_ADDR_IPV4 && req->host.addr.ipv4.s_addr == htonl(0)) if (req->version == MSPROXY_V2) ; /* supports binding wildcard */ else if (!route->gw.state.extension.bind) continue; break; case SOCKS_CONNECT: if (!route->gw.state.command.connect) continue; break; case SOCKS_UDPASSOCIATE: if (!route->gw.state.command.udpassociate) continue; break; default: SERRX(req->command); } /* server supports protocol? */ switch (req->command) { case SOCKS_BIND: case SOCKS_CONNECT: if (!route->gw.state.protocol.tcp) continue; protocol = SOCKS_TCP; break; case SOCKS_UDPASSOCIATE: if (!route->gw.state.protocol.udp) continue; protocol = SOCKS_UDP; break; default: SERRX(req->command); } if (req->auth != NULL) /* find server that supports method in use. */ switch (req->auth->method) { case AUTHMETHOD_NOTSET: break; default: if (!methodisset(req->auth->method, route->gw.state.methodv, route->gw.state.methodc)) continue; /* does not support the method in use. */ } if (src != NULL) if (!addressmatch(&route->src, src, protocol, 0)) continue; if (dst != NULL) if (!addressmatch(&route->dst, dst, protocol, 0)) continue; if (route->state.direct) return NULL; /* don't use any route, connect directly. */ break; /* all matched */ } return route; } struct route_t * socks_connectroute(s, packet, src, dst) int s; struct socks_t *packet; const struct sockshost_t *src; const struct sockshost_t *dst; { const char *function = "socks_connectroute()"; int sdup, current_s, errno_s; struct route_t *route; /* * This is a little tricky since we attempt to support trying * more than one socksserver. If the first one fails, we try * the next, etc. Ofcourse, if connect() on one socket fails, * that socket can no longer be used, so we need to be able to * copy/dup the original socket as much as possible. Later, * if it turned out a connection failed and we had to use a * different socket than the orignal 's', we try to dup the * differently numbered socket to 's' and hope the best. * * sdup: copy of the original socket. Need to create this * before the first connectattempt since the connectattempt * could prevent us from doing it later, depending on failure * reason. * * current_s: socket to use for next connection attempt. For the * first attempt this is 's'. */ slog(LOG_DEBUG, "%s: s = %d", function, s); current_s = s; sdup = -1; while ((route = socks_getroute(&packet->req, src, dst)) != NULL) { char hstring[MAXSOCKSHOSTSTRING]; /* inside loop since if no route, no need for it. */ if (sdup == -1) sdup = socketoptdup(s); if (current_s == -1) if ((current_s = socketoptdup(sdup == -1 ? s : sdup)) == -1) return NULL; slog(LOG_DEBUG, "%s: trying route #%d (%s)", function, route->number, sockshost2string(&route->gw.host, hstring, sizeof(hstring))); if (socks_connect(current_s, &route->gw.host) == 0) break; else /* * Check whether the error indicates bad socksserver or * something else. */ if (errno == EINPROGRESS) { SASSERTX(current_s == s); break; } else if (errno == EADDRINUSE) { /* see Rbind() for explanation. */ SASSERTX(current_s == s); route = NULL; break; } else { #if SOCKS_CLIENT swarn("%s: socks_connect(%s)", function, sockshost2string(&route->gw.host, hstring, sizeof(hstring))); #endif socks_badroute(route); close(current_s); current_s = -1; } } errno_s = errno; if (sdup != -1) close(sdup); if (current_s != s && current_s != -1) { /* created a new socket for connect, need to make it same descriptor #. */ if (dup2(current_s, s) == -1) { close(current_s); return NULL; } close(current_s); #if SOCKS_SERVER && HAVE_LIBWRAP if ((current_s = fcntl(s, F_GETFD, 0)) == -1 || fcntl(s, F_SETFD, current_s | FD_CLOEXEC) == -1) swarn("%s: fcntl(F_GETFD/F_SETFD)", function); #endif } if (route != NULL) { #if SOCKS_CLIENT static int init; #endif packet->gw = route->gw; #if SOCKS_CLIENT /* need to set up misc. crap for msproxy stuff. */ if (!init && route->gw.state.proxyprotocol.msproxy_v2) { if (msproxy_init() != 0) ; /* yes, then what? */ init = 1; } #endif /* SOCKS_CLIENT */ } errno = errno_s; return route; } void socks_badroute(route) struct route_t *route; { const char *function = "socks_badroute()"; slog(LOG_DEBUG, "%s: badrouting route #%d", function, route->number); route->state.bad = 1; time(&route->state.badtime); } #if SOCKS_CLIENT struct request_t * socks_requestpolish(req, src, dst) struct request_t *req; const struct sockshost_t *src; const struct sockshost_t *dst; { const char *function = "socks_requestpolish()"; const unsigned char originalversion = req->version; if (socks_getroute(req, src, dst) != NULL) return req; /* no route found. Can we "polish" the request and then find a route? */ switch (req->command) { case SOCKS_BIND: /* * bind semantics differ between v4 and everything else. * Assuming we always start with v5 semantics makes the * following code much simpler. */ SASSERTX(req->version == SOCKS_V5); break; case SOCKS_CONNECT: break; case SOCKS_UDPASSOCIATE: SERRX(req->command); /* currently not implemented, shouldn't happen. */ /* NOTREACHED */ default: SERRX(req->command); } /* * Try all proxyprotocols we support. */ req->version = SOCKS_V4; if (socks_getroute(req, src, dst) != NULL) { if (req->command == SOCKS_BIND) /* v4/v5 difference in portsemantics. */ /* LINTED pointer casts may be troublesome */ req->host.port = TOIN(&sockscf.state.lastconnect)->sin_port; return req; } req->version = HTTP_V1_0; if (socks_getroute(req, src, dst) != NULL) return req; req->version = MSPROXY_V2; if (socks_getroute(req, src, dst) != NULL) return req; req->version = originalversion; /* changing proxyprotocol didn't do it, can we try other things? */ switch (req->command) { case SOCKS_BIND: if (req->host.addr.ipv4.s_addr == htonl(0)) { in_port_t originalport; /* attempting to use bind extension, can we retry without it? */ /* LINTED pointer casts may be troublesome */ if (!ADDRISBOUND(sockscf.state.lastconnect)) { slog(LOG_DEBUG, "%s: couldn't find route for bind(2), " "try enabling \"extension: bind\"?", function); return NULL; } originalport = req->host.port; fakesockaddr2sockshost(&sockscf.state.lastconnect, &req->host); /* keep portnumber req. for bind(2), not a previous connect(2). */ req->host.port = originalport; if (socks_requestpolish(req, src, dst) == NULL) return NULL; /* giving up. */ /* * else, it may be that socks_requestpolish() was * forced to change req.version to succeed. We may * the need to change req->host.port due to difference * in v4 and v5 semantics. */ if (req->version != originalversion) { /* version changed. */ SASSERTX(originalversion == SOCKS_V5); switch (req->version) { case SOCKS_V4: /* the only one with this strangeness. */ /* LINTED pointer casts may be troublesome */ req->host.port = TOIN(&sockscf.state.lastconnect)->sin_port; break; } } return req; } break; } slog(LOG_DEBUG, function); return NULL; } #endif /* SOCKS_CLIENT */ void showstate(state) const struct serverstate_t *state; { char buf[1024]; size_t bufused; bufused = snprintfn(buf, sizeof(buf), "command(s): "); if (state->command.bind) bufused += snprintfn(&buf[bufused], sizeof(buf) - bufused, "%s, ", SOCKS_BINDs); if (state->command.bindreply) bufused += snprintfn(&buf[bufused], sizeof(buf) - bufused, "%s, ", SOCKS_BINDREPLYs); if (state->command.connect) bufused += snprintfn(&buf[bufused], sizeof(buf) - bufused, "%s, ", SOCKS_CONNECTs); if (state->command.udpassociate) bufused += snprintfn(&buf[bufused], sizeof(buf) - bufused, "%s, ", SOCKS_UDPASSOCIATEs); if (state->command.udpreply) bufused += snprintfn(&buf[bufused], sizeof(buf) - bufused, "%s, ", SOCKS_UDPREPLYs); slog(LOG_INFO, buf); bufused = snprintfn(buf, sizeof(buf), "extension(s): "); if (state->extension.bind) bufused += snprintfn(&buf[bufused], sizeof(buf) - bufused, "bind"); slog(LOG_INFO, buf); bufused = snprintfn(buf, sizeof(buf), "protocol(s): "); protocols2string(&state->protocol, &buf[bufused], sizeof(buf) - bufused); slog(LOG_INFO, buf); showmethod(state->methodc, state->methodv); bufused = snprintfn(buf, sizeof(buf), "proxyprotocol(s): "); proxyprotocols2string(&state->proxyprotocol, &buf[bufused], sizeof(buf) - bufused); slog(LOG_INFO, buf); } void showmethod(methodc, methodv) size_t methodc; const int *methodv; { char buf[1024]; slog(LOG_INFO, "method(s): %s", methods2string(methodc, methodv, buf, sizeof(buf))); } dante-1.1.19.dfsg/lib/msproxy_clientprotocol.c0000644000175000017500000016326307700305332020063 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ /* * This code is terrible so hopefully it will match the protocol. */ #include "common.h" static const char rcsid[] = "$Id: msproxy_clientprotocol.c,v 1.30 2003/07/01 13:21:30 michaels Exp $"; static char executable[] = "TELNET.EXE"; static struct sigaction oldsigio; __BEGIN_DECLS static int msproxy_connect __P((int s, int control, struct socks_t *packet)); static int msproxy_bind __P((int s, int control, struct socks_t *packet)); static char * mem2response __P((struct msproxy_response_t *res, char *mem, size_t len)); static char * request2mem __P((const struct msproxy_request_t *req, char *mem)); static void msproxy_sessionsend __P((void)); /* * Terminates all msproxy sessions. */ static void msproxy_sessionend __P((int s, struct msproxy_state_t *msproxy)); /* * ends the session negotiated with "s" and having state "msproxy". */ static void msproxy_keepalive __P((int signal)); /* * Sends a keepalive packet on behalf of all established sessions. */ static void sigio __P((int sig)); __END_DECLS int msproxy_init(void) { const char *function = "msproxy_init()"; struct itimerval timerval; struct sigaction sigact, oldsigact; if (atexit(msproxy_sessionsend) != 0) { swarn("%s: atexit()", function); return -1; } if (sigaction(SIGALRM, NULL, &oldsigact) != 0) { swarn("%s: sigaction(SIGALRM)", function); return -1; } /* XXX */ if (oldsigact.sa_handler != SIG_DFL && oldsigact.sa_handler != SIG_IGN) { swarnx("%s: could not install signalhandler for SIGALRM, already set", function); return 0; /* will probably timeout, don't consider it fatal for now. */ } sigemptyset(&sigact.sa_mask); sigact.sa_flags = SA_RESTART; sigact.sa_handler = msproxy_keepalive; if (sigaction(SIGALRM, &sigact, NULL) != 0) { swarn("%s: sigaction(SIGALRM)", function); return -1; } timerval.it_value.tv_sec = MSPROXY_PINGINTERVAL; timerval.it_value.tv_usec = 0; timerval.it_interval = timerval.it_value; if (setitimer(ITIMER_REAL, &timerval, NULL) != 0) { swarn("%s: setitimer()", function); return -1; } srand((unsigned int)time(NULL) * getpid()); return 0; } int msproxy_negotiate(s, control, packet) int s; int control; struct socks_t *packet; { const char *function = "msproxy_negotiate()"; char string[MAXSOCKADDRSTRING]; struct msproxy_request_t req; struct msproxy_response_t res; int p; slog(LOG_DEBUG, "%s: packet #1", function); bzero(&req, sizeof(req)); req.clientid = htonl(0x0a000000); req.command = htons(MSPROXY_HELLO); /* in case we don't get something more sensible. */ packet->res.version = packet->req.version; packet->res.reply = MSPROXY_FAILURE; switch (packet->req.command) { case SOCKS_BIND: #if 1 req.packet._1.magic5 = htons(0x4800); req.packet._1.magic10 = htons(0x1400); req.packet._1.magic15 = htons(0x0400); req.packet._1.magic20 = htons(0x5704); req.packet._1.magic25 = htons(0x0004); req.packet._1.magic30 = htons(0x0100); req.packet._1.magic35 = htons(0x4a02); req.packet._1.magic40 = htons(0x3000); req.packet._1.magic45 = htons(0x4100); req.packet._1.magic50 = htons(0x3900); #endif break; case SOCKS_CONNECT: #if 0 req.packet._1.magic5 = htons(0x4b00); req.packet._1.magic10 = htons(0x1400); req.packet._1.magic15 = htons(0x0400); req.packet._1.magic20 = htons(0x5704); req.packet._1.magic25 = htons(0x0004); req.packet._1.magic30 = htons(0x0100); req.packet._1.magic35 = htons(0x4a02); req.packet._1.magic40 = htons(0x3000); req.packet._1.magic45 = htons(0x4400); req.packet._1.magic50 = htons(0x3900); #endif break; case SOCKS_UDPASSOCIATE: SERRX(packet->req.command); /* NOTREACHED */ default: SERRX(packet->req.command); } if (socks_getusername(&packet->gw.host, req.username, sizeof(req.username)) == NULL) return -1; *req.unknown = NUL; strncpy(req.executable, executable, sizeof(req.executable) - 1); req.executable[sizeof(req.executable) - 1] = NUL; *req.clienthost = NUL; #if 0 strncpy(req.clienthost, "foo", sizeof(req.clienthost) - 1); req.clienthost[sizeof(req.clienthost) - 1] = NUL; #endif if (send_msprequest(control, &packet->state.msproxy, &req) == -1) return -1; if (recv_mspresponse(control, &packet->state.msproxy, &res) == -1) return -1; if (strcmp(res.RWSP, "RWSP") != 0) serrx(EXIT_FAILURE, "expected \"RWSP\", got \"%s\"", str2vis(res.RWSP, sizeof(res.RWSP))); if (ntohs(res.command) >> 8 != 0x10) serrx(EXIT_FAILURE, "expected res.command = 10??, is %x", ntohs(res.command)); packet->state.msproxy.controladdr.sin_family = AF_INET; packet->state.msproxy.controladdr.sin_port = res.packet._1.udpport; packet->state.msproxy.controladdr.sin_addr.s_addr = res.packet._1.udpaddr; packet->state.msproxy.clientid = htonl(rand()); packet->state.msproxy.serverid = res.serverid; slog(LOG_DEBUG, "%s: clientid: 0x%x, serverid: 0x%0x", function, packet->state.msproxy.clientid, packet->state.msproxy.serverid); /* LINTED pointer casts may be troublesome */ slog(LOG_DEBUG, "%s: msproxy controladdress: %s", function, sockaddr2string((struct sockaddr *)&packet->state.msproxy.controladdr, string, sizeof(string))); slog(LOG_DEBUG, "%s: packet #2", function); /* almost identical. */ req.clientid = packet->state.msproxy.clientid; req.serverid = packet->state.msproxy.serverid; if (send_msprequest(control, &packet->state.msproxy, &req) == -1) return -1; if (recv_mspresponse(control, &packet->state.msproxy, &res) == -1) return -1; if (res.serverid != packet->state.msproxy.serverid) serrx(EXIT_FAILURE, "expected serverid = 0x%x, is 0x%x", packet->state.msproxy.serverid, res.serverid); if (res.sequence != 0x01) serrx(EXIT_FAILURE, "expected res.sequence = 0x%x, is 0x%x", 0x01, res.sequence); if (ntohs(res.command) != MSPROXY_USERINFO_ACK) serrx(EXIT_FAILURE, "expected res.command = 0x%x, is 0x%x", MSPROXY_USERINFO_ACK, ntohs(res.command)); switch (packet->req.command) { case SOCKS_BIND: p = msproxy_bind(s, control, packet); break; case SOCKS_CONNECT: p = msproxy_connect(s, control, packet); break; case SOCKS_UDPASSOCIATE: default: SERRX(packet->req.command); } return p; } static int msproxy_connect(s, control, packet) int s; int control; struct socks_t *packet; { const char *function = "msproxy_connect()"; char string[MAXSOCKSHOSTSTRING]; struct msproxy_request_t req; struct msproxy_response_t res; struct sockaddr_in addr; socklen_t len; slog(LOG_DEBUG, function); #if 0 bzero(&req, sizeof(req)); req.clientid = packet->state.msproxy.clientid; req.serverid = packet->state.msproxy.serverid; req.command = htons(MSPROXY_SOMETHING); memcpy(req.packet._3.NTLMSSP, "NTLMSSP", sizeof("NTLMSSP")); req.packet._3.bindaddr = htonl(0x02000000); req.packet._3.magic5 = htons(0x0100); req.packet._3.magic10 = htons(0x9682); #if 0 req.packet._3.magic50 = htons(0x3000); req.packet._3.magic55 = htons(0x3000); #endif if (send_msprequest(control, &packet->state.msproxy, &req) == -1) return -1; if (recv_mspresponse(control, &packet->state.msproxy, &res) == -1) return -1; if (res.serverid != packet->state.msproxy.serverid) serrx(EXIT_FAILURE, "expected serverid = 0x%x, is 0x%x", packet->state.msproxy.serverid, res.serverid); if (ntohs(res.command) != MSPROXY_SOMETHING_1_ACK) serrx(EXIT_FAILURE, "expected res.command = 0x%x, is 0x%x", MSPROXY_SOMETHING_1_ACK, ntohs(res.command)); slog(LOG_DEBUG, "%s: ntdomain: \"%s\"", function, res.packet._3.ntdomain); slog(LOG_DEBUG, "%s: packet #4", function); bzero(&req, sizeof(req)); req.clientid = packet->state.msproxy.clientid; req.serverid = packet->state.msproxy.serverid; req.command = htons(MSPROXY_SOMETHING_2); #if 0 memcpy(req.packet._4.NTLMSSP, "NTLMSSP", sizeof("NTLMSSP")); req.packet._4.magic3 = htons(0x0200); req.packet._4.magic5 = htons(0x0300); req.packet._4.magic10 = htons(0x1800); req.packet._4.magic15 = htons(0x1800); req.packet._4.magic20 = htons(0x4900); req.packet._4.magic30 = htons(0x6100); req.packet._4.magic35 = htons(0x0800); req.packet._4.magic40 = htons(0x0800); req.packet._4.magic45 = htons(0x3400); req.packet._4.magic50 = htons(0x0700); req.packet._4.magic55 = htons(0x0700); req.packet._4.magic60 = htons(0x3c00); req.packet._4.magic65 = htons(0x0600); req.packet._4.magic70 = htons(0x0600); req.packet._4.magic75 = htons(0x4300); #endif if (send_msprequest(control, &packet->state.msproxy, &req) == -1) return -1; if (recv_mspresponse(control, &packet->state.msproxy, &res) == -1) return -1; if (res.serverid != packet->state.msproxy.serverid) serrx(EXIT_FAILURE, "expected res.serverid = 0x%x, is 0x%x", packet->state.msproxy.serverid, res.serverid); if (res.clientack != 0x01) serrx(EXIT_FAILURE, "expected res.clientack = 0x%x, is 0x%x", 0x01, res.clientack); if (ntohs(res.command) >> 8 != 0x47) serrx(EXIT_FAILURE, "expected res.command = 47??, is 0x%x", ntohs(res.command)); #endif switch (packet->req.host.atype) { case SOCKS_ADDR_IPV4: /* LINTED pointer casts may be troublesome */ sockshost2sockaddr(&packet->req.host, (struct sockaddr *)&addr); break; case SOCKS_ADDR_DOMAIN: slog(LOG_DEBUG, "%s: resolve packet", function); bzero(&req, sizeof(req)); req.clientid = packet->state.msproxy.clientid; req.serverid = packet->state.msproxy.serverid; req.command = htons(MSPROXY_RESOLVE); req.packet.resolve.hostlength = (unsigned char)(strlen(packet->req.host.addr.domain) + 1); memcpy(&req.packet.resolve.host, packet->req.host.addr.domain, (size_t)req.packet.resolve.hostlength); if (send_msprequest(control, &packet->state.msproxy, &req) == -1) return -1; if (recv_mspresponse(control, &packet->state.msproxy, &res) == -1) return -1; if (ntohs(res.command) != MSPROXY_RESOLVE_ACK) serrx(EXIT_FAILURE, "expected res.command = 0x%x, is 0x%x", MSPROXY_RESOLVE_ACK, ntohs(res.command)); addr.sin_addr.s_addr = res.packet.resolve.hostaddr; slog(LOG_DEBUG, "%s: IP address of %s: %s", function, packet->req.host.addr.domain, inet_ntoa(addr.sin_addr)); break; default: SERRX(packet->req.host.atype); } slog(LOG_DEBUG, "%s: packet #5", function); bzero(&req, sizeof(req)); req.clientid = packet->state.msproxy.clientid; req.serverid = packet->state.msproxy.serverid; req.command = htons(MSPROXY_CONNECT); req.packet._5.magic6 = htons(0x0200); req.packet._5.destport = packet->req.host.port; req.packet._5.destaddr = addr.sin_addr.s_addr; /* * need to tell server what port we will connect from, so if socket * is not bound, bind it. */ len = sizeof(addr); /* LINTED pointer casts may be troublesome */ if (getsockname(s, (struct sockaddr *)&addr, &len) != 0) return -1; if (!ADDRISBOUND(addr)) { /* * Don't have any specific preference for what address to bind and * proxyserver only expects to be told port. */ addr.sin_addr.s_addr = htonl(INADDR_ANY); /* LINTED pointer casts may be troublesome */ if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) != 0) return -1; len = sizeof(addr); /* LINTED pointer casts may be troublesome */ if (getsockname(s, (struct sockaddr *)&addr, &len) != 0) return -1; } req.packet._5.srcport = addr.sin_port; if (send_msprequest(control, &packet->state.msproxy, &req) == -1) return -1; if (recv_mspresponse(control, &packet->state.msproxy, &res) == -1) return -1; if (ntohs(res.command) != MSPROXY_CONNECT_ACK) { swarnx("expected res.command = 0x%x, is 0x%x", MSPROXY_CONNECT_ACK, ntohs(res.command)); packet->res.reply = MSPROXY_NOTALLOWED; return -1; } packet->res.host.atype = SOCKS_ADDR_IPV4; packet->res.host.port = res.packet._5.clientport; packet->res.host.addr.ipv4.s_addr = res.packet._5.clientaddr; if (socks_connect(s, &packet->res.host) != 0) { swarn("%s: failed to connect to %s", function, sockshost2string(&packet->res.host, string, sizeof(string))); return -1; } else slog(LOG_DEBUG, "%s: connected to %s", function, sockshost2string(&packet->res.host, string, sizeof(string))); packet->res.host.atype = SOCKS_ADDR_IPV4; packet->res.host.port = res.packet._5.clientport; packet->res.host.addr.ipv4.s_addr = res.packet._5.clientaddr; /* LINTED pointer casts may be troublesome */ slog(LOG_DEBUG, "%s: server will use as source address: %s", function, sockshost2string(&packet->res.host, string, sizeof(string))); slog(LOG_DEBUG, "%s: packet #6", function); bzero(&req, sizeof(req)); req.clientid = packet->state.msproxy.clientid; req.serverid = packet->state.msproxy.serverid; req.command = htons(MSPROXY_CONNECTED); if (send_msprequest(control, &packet->state.msproxy, &req) == -1) return -1; /* make response look sensible. */ packet->res.version = packet->req.version; packet->res.reply = MSPROXY_SUCCESS; packet->res.flag = 0; packet->res.auth = NULL; return 0; } static int msproxy_bind(s, control, packet) int s; int control; struct socks_t *packet; { const char *function = "msproxy_bind()"; char string[MAXSOCKSHOSTSTRING]; struct msproxy_request_t req; struct msproxy_response_t res; struct sockaddr_in addr; socklen_t len; slog(LOG_DEBUG, function); bzero(&req, sizeof(req)); req.clientid = packet->state.msproxy.clientid; req.serverid = packet->state.msproxy.serverid; req.command = htons(MSPROXY_BIND); req.packet._3.magic2 = htons(0x0100); req.packet._3.bindaddr = packet->req.host.addr.ipv4.s_addr; req.packet._3.bindport = packet->req.host.port; req.packet._3.magic3 = htons(0x0200); len = sizeof(addr); /* LINTED pointer casts may be troublesome */ if (getsockname(s, (struct sockaddr *)&addr, &len) != 0) return -1; req.packet._3.boundport = addr.sin_port; if (send_msprequest(control, &packet->state.msproxy, &req) == -1) return -1; if (recv_mspresponse(control, &packet->state.msproxy, &res) == -1) return -1; if (res.serverid != packet->state.msproxy.serverid) serrx(EXIT_FAILURE, "expected serverid = 0x%x, is 0x%x", packet->state.msproxy.serverid, res.serverid); if (ntohs(res.command) != MSPROXY_BIND_ACK) { swarnx("expected res.command = 0x%x, is 0x%x", MSPROXY_BIND_ACK, ntohs(res.command)); packet->res.reply = MSPROXY_NOTALLOWED; return -1; } packet->state.msproxy.bindid = res.packet._3.magic10; packet->res.host.atype = SOCKS_ADDR_IPV4; packet->res.host.port = res.packet._3.boundport; packet->res.host.addr.ipv4.s_addr = res.packet._3.boundaddr; slog(LOG_DEBUG, "%s: server bound for us: %s", function, sockshost2string(&packet->res.host, string, sizeof(string))); slog(LOG_DEBUG, "%s: packet #4", function); bzero(&req, sizeof(req)); req.clientid = packet->state.msproxy.clientid; req.serverid = packet->state.msproxy.serverid; req.command = htons(MSPROXY_BIND2); req.packet._4.magic1 = htons(0x0100); req.packet._4.magic2 = packet->state.msproxy.bindid; req.packet._4.magic3 = htons(0x0500); memcpy(req.packet._4.pad3 + 2, &addr.sin_port, sizeof(addr.sin_port)); req.packet._4.magic4 = htons(0x0200); req.packet._4.boundport = addr.sin_port; if (send_msprequest(control, &packet->state.msproxy, &req) == -1) return -1; if (recv_mspresponse(control, &packet->state.msproxy, &res) == -1) return -1; if (res.serverid != packet->state.msproxy.serverid) serrx(EXIT_FAILURE, "expected res.serverid = 0x%x, is 0x%x", packet->state.msproxy.serverid, res.serverid); if (res.clientack != 0x01) serrx(EXIT_FAILURE, "expected res.clientack = 0x%x, is 0x%x", 0x01, res.clientack); if (ntohs(res.command) != MSPROXY_BIND2_ACK) { swarnx("expected res.command = %x, is 0x%x", MSPROXY_BIND2_ACK, ntohs(res.command)); return -1; } slog(LOG_DEBUG, "%s: packet #5", function); bzero(&req, sizeof(req)); req.clientid = packet->state.msproxy.clientid; req.serverid = packet->state.msproxy.serverid; req.command = htons(MSPROXY_LISTEN); req.packet._5.magic6 = htons(0x0200); req.packet._5.destport = packet->res.host.port; req.packet._5.destaddr = packet->res.host.addr.ipv4.s_addr; if (send_msprequest(control, &packet->state.msproxy, &req) == -1) return -1; /* * When the server accepts the client, it will send us a new * controlpacket. That will be caught in sigio(). */ slog(LOG_DEBUG, "%s: waiting for forwarded connection...", function); /* make response look sensible. */ packet->res.version = packet->req.version; packet->res.reply = MSPROXY_SUCCESS; packet->res.flag = 0; packet->res.auth = NULL; return 0; } int msproxy_sigio(s) int s; { const char *function = "msproxy_sigio()"; static int init; const int errno_s = errno; struct socksfd_t *socksfd; int p; /* * The msproxy protocol sends a udp packet which we must ack * before it will connect to us. We set up the controlsocket * for signaldriven i/o so we can ack it asynchronously. * */ SASSERTX(socks_addrisok((unsigned int)s)); socksfd = socks_getaddr((unsigned int)s); SASSERTX(socksfd->state.version == MSPROXY_V2); if (!init) { /* could be smarter about this... */ struct sigaction sigact; sigemptyset(&sigact.sa_mask); sigact.sa_flags = SA_RESTART; sigact.sa_handler = sigio; if (sigaction(SIGIO, &sigact, &oldsigio) != 0) return -1; init = 1; } if (fcntl(socksfd->control, F_SETOWN, getpid()) == -1) return -1; p = 1; if (ioctl(socksfd->control, FIOASYNC, &p) == -1) return -1; slog(LOG_DEBUG, "%s: set up sigio for %d", function, socksfd->control); errno = errno_s; return 0; } /* ARGSUSED */ static void sigio(sig) int sig; { const char *function = "sigio()"; const int errno_s = errno; char string[MAXSOCKSHOSTSTRING]; int i, max, dset; struct socksfd_t *socksfd; fd_set rset; struct timeval timeout; int dbits; slog(LOG_DEBUG, function); /* * Find the socket we were signalled for. */ dbits = -1; FD_ZERO(&rset); for (i = 0, max = getdtablesize(); i < max; ++i) { if ((socksfd = socks_getaddr((unsigned int)i)) == NULL) continue; if (socksfd->state.command != SOCKS_BIND || socksfd->state.version != MSPROXY_V2 || !socksfd->state.inprogress) continue; if (!socks_addrisok((unsigned int)i)) continue; SASSERTX(fdisopen(socksfd->control)); FD_SET(socksfd->control, &rset); dbits = MAX(dbits, socksfd->control); } if (dbits == -1) { if (oldsigio.sa_handler != NULL) oldsigio.sa_handler(sig); return; /* old signal handler. */ } dset = 0; do { fd_set newrset; timeout.tv_sec = 0; timeout.tv_usec = 0; newrset = rset; switch (selectn(dbits + 1, &newrset, NULL, NULL, &timeout)) { case -1: SERR(-1); /* NOTREACHED */ case 0: dset = 0; slog(LOG_DEBUG, "%s: no descriptors readable", function); if (oldsigio.sa_handler != NULL) oldsigio.sa_handler(sig); break; default: { dset = 1; for (i = 0, max = getdtablesize(); i < max; ++i) { if ((socksfd = socks_getaddr((unsigned int)i)) == NULL) continue; if (FD_ISSET(socksfd->control, &newrset)) { struct sockshost_t host; struct msproxy_request_t req; struct msproxy_response_t res; int p; SASSERTX(socksfd->state.command == SOCKS_BIND && socksfd->state.version == MSPROXY_V2 && socksfd->state.inprogress); slog(LOG_DEBUG, "%s: attempting to receive bind info...", function); FD_CLR(socksfd->control, &newrset); if (recv_mspresponse(socksfd->control, &socksfd->state.msproxy, &res) == -1) continue; if (ntohs(res.command) != MSPROXY_BINDINFO) { swarnx("%s: expected res.command = %x, is 0x%x", function, MSPROXY_BINDINFO, ntohs(res.command)); continue; } /* no need for more signals on this socket. */ p = 0; if (ioctl(socksfd->control, FIOASYNC, &p) == -1) { swarn("%s: ioctl(socksfd->control)", function); continue; } slog(LOG_DEBUG, "%s: turned off sigio for %d", function, socksfd->control); /* * if we asked server to bind INADDR_ANY, we don't know * what address it bound until now. */ host.atype = SOCKS_ADDR_IPV4; host.port = res.packet._5.boundport; host.addr.ipv4.s_addr = res.packet._5.boundaddr; sockshost2sockaddr(&host, &socksfd->remote); slog(LOG_DEBUG, "%s: server bound address %s", function, sockshost2string(&host, string, sizeof(string))); host.atype = SOCKS_ADDR_IPV4; host.port = res.packet._5.clientport; host.addr.ipv4.s_addr = res.packet._5.clientaddr; sockshost2sockaddr(&host, &socksfd->forus.accepted); slog(LOG_DEBUG, "%s: server accepted: %s", function, sockshost2string(&host, string, sizeof(string))); slog(LOG_DEBUG, "%s: server will connect to us from port %d", function, ntohs(res.packet._5.serverport)); /* LINTED pointer casts may be troublesome */ TOIN(&socksfd->reply)->sin_port = res.packet._5.serverport; slog(LOG_DEBUG, "%s: packet #6", function); bzero(&req, sizeof(req)); req.clientid = socksfd->state.msproxy.clientid; req.serverid = socksfd->state.msproxy.serverid; req.command = htons(MSPROXY_BINDINFO_ACK); req.packet._6.magic1 = res.packet._5.magic1; req.packet._6.magic5 = htons(0x0100); req.packet._6.magic10 = socksfd->state.msproxy.bindid; req.packet._6.magic15 = htons(0x0100); req.packet._6.magic16 = socksfd->state.msproxy.bindid; req.packet._6.magic20 = htons(0x0200); req.packet._6.clientport = res.packet._5.clientport; req.packet._6.clientaddr = res.packet._5.clientaddr; req.packet._6.magic30 = res.packet._5.magic10; req.packet._6.magic35 = res.packet._5.magic15; req.packet._6.serverport = res.packet._5.serverport; req.packet._6.srcport = res.packet._5.srcport; req.packet._6.boundport = res.packet._5.boundport; req.packet._6.boundaddr = res.packet._5.boundaddr; if (send_msprequest(socksfd->control, &socksfd->state.msproxy, &req) == -1) continue; if (recv_mspresponse(socksfd->control, &socksfd->state.msproxy, &res) == -1) continue; /* all done. Can accept(). */ socksfd->state.inprogress = 0; } } } } } while (dset != 0); errno = errno_s; } int recv_mspresponse(s, state, response) int s; struct msproxy_state_t *state; struct msproxy_response_t *response; { const char *function = "recv_mspresponse()"; /* CONSTCOND */ char responsemem[MAX(sizeof(*response), 1024)]; ssize_t r; /* CONSTCOND */ while (1) { if ((r = read(s, responsemem, sizeof(responsemem))) < MSPROXY_MINLENGTH) { swarn("%s: expected to read atleast %d, read %d", function, MSPROXY_MINLENGTH, r); return -1; } if (mem2response(response, responsemem, (size_t)r) == NULL) { swarnx("%s: bad response from server", function); return -1; } if (state->seq_recv > 0) { if (response->sequence == state->seq_recv + 1) break; /* all ok. */ else if (response->sequence < state->seq_recv) { /* * sequence number less that last, sometimes this happens too, * don't know why. */ slog(LOG_DEBUG, "%s: sequence (%d) < seq_recv (%d)", function, response->sequence, state->seq_recv); break; } else if (response->sequence == state->seq_recv) { slog(LOG_DEBUG, "%s: seq_recv: %d, dup response, seqnumber: 0x%x", function, state->seq_recv, response->sequence); if (response->clientack == state->seq_sent) { slog(LOG_DEBUG, "%s: ack matches last sent though, hoping it's a new one...", function); break; } } else if (response->sequence > state->seq_recv) { slog(LOG_DEBUG, "%s: sequence (%d) > seq_recv (%d)", function, response->sequence, state->seq_recv); break; } } else break; /* not started incrementing yet. */ } state->seq_recv = response->sequence; return r; } int send_msprequest(s, state, request) int s; struct msproxy_state_t *state; struct msproxy_request_t *request; { const char *function = "send_msprequest()"; ssize_t w; char requestmem[sizeof(struct msproxy_request_t)], *p; request->magic25 = htonl(MSPROXY_VERSION); request->serverack = state->seq_recv; /* don't start incrementing sequence until we are acking packet #2. */ request->sequence = (unsigned char)(request->serverack >= 2 ? state->seq_sent + 1 : 0); memcpy(request->RWSP, "RWSP", sizeof(request->RWSP)); p = request2mem(request, requestmem); /* all requests must be atleast MSPROXY_MINLENGTH it seems. */ if (p - requestmem < MSPROXY_MINLENGTH) { bzero(p, (size_t)(MSPROXY_MINLENGTH - (p - requestmem))); p = requestmem + MSPROXY_MINLENGTH; } if ((w = write(s, requestmem, (size_t)(p - requestmem))) != (ssize_t)(p - requestmem)) { swarn("%s: write()", function); return -1; } state->seq_sent = request->sequence; return w; } static char * mem2response(res, mem, len) struct msproxy_response_t *res; char *mem; size_t len; { const char *function = "mem2response()"; if (len < sizeof(res->packetid)) return NULL; memcpy(&res->packetid, mem, sizeof(res->packetid)); mem += sizeof(res->packetid); len -= sizeof(res->packetid); if (len < sizeof(res->magic5)) return NULL; memcpy(&res->magic5, mem, sizeof(res->magic5)); mem += sizeof(res->magic5); len -= sizeof(res->magic5); if (len < sizeof(res->serverid)) return NULL; memcpy(&res->serverid, mem, sizeof(res->serverid)); mem += sizeof(res->serverid); len -= sizeof(res->serverid); if (len < sizeof(res->clientack)) return NULL; memcpy(&res->clientack, mem, sizeof(res->clientack)); mem += sizeof(res->clientack); len -= sizeof(res->clientack); if (len < sizeof(res->pad5)) return NULL; memcpy(res->pad5, mem, sizeof(res->pad5)); mem += sizeof(res->pad5); len -= sizeof(res->pad5); if (len < sizeof(res->sequence)) return NULL; memcpy(&res->sequence, mem, sizeof(res->sequence)); mem += sizeof(res->sequence); len -= sizeof(res->sequence); if (len < sizeof(res->pad10)) return NULL; memcpy(res->pad10, mem, sizeof(res->pad10)); mem += sizeof(res->pad10); len -= sizeof(res->pad10); if (len < sizeof(res->RWSP)) return NULL; memcpy(res->RWSP, mem, sizeof(res->RWSP)); mem += sizeof(res->RWSP); len -= sizeof(res->RWSP); if (len < sizeof(res->pad15)) return NULL; memcpy(res->pad15, mem, sizeof(res->pad15)); mem += sizeof(res->pad15); len -= sizeof(res->pad15); if (len < sizeof(res->command)) return NULL; memcpy(&res->command, mem, sizeof(res->command)); mem += sizeof(res->command); len -= sizeof(res->command); switch (ntohs(res->command)) { case MSPROXY_HELLO_ACK: if (len < sizeof(res->packet._1.pad5)) return NULL; memcpy(res->packet._1.pad5, mem, sizeof(res->packet._1.pad5)); mem += sizeof(res->packet._1.pad5); len -= sizeof(res->packet._1.pad5); if (len < sizeof(res->packet._1.magic20)) return NULL; memcpy(&res->packet._1.magic20, mem, sizeof(res->packet._1.magic20)); mem += sizeof(res->packet._1.magic20); len -= sizeof(res->packet._1.magic20); if (len < sizeof(res->packet._1.pad10)) return NULL; memcpy(&res->packet._1.pad10, mem, sizeof(res->packet._1.pad10)); mem += sizeof(res->packet._1.pad10); len -= sizeof(res->packet._1.pad10); if (len < sizeof(res->packet._1.magic30)) return NULL; memcpy(&res->packet._1.magic30, mem, sizeof(res->packet._1.magic30)); mem += sizeof(res->packet._1.magic30); len -= sizeof(res->packet._1.magic30); if (len < sizeof(res->packet._1.pad15)) return NULL; memcpy(res->packet._1.pad15, mem, sizeof(res->packet._1.pad15)); mem += sizeof(res->packet._1.pad15); len -= sizeof(res->packet._1.pad15); if (len < sizeof(res->packet._1.magic35)) return NULL; memcpy(&res->packet._1.magic35, mem, sizeof(res->packet._1.magic35)); mem += sizeof(res->packet._1.magic35); len -= sizeof(res->packet._1.magic35); if (len < sizeof(res->packet._1.pad20)) return NULL; memcpy(res->packet._1.pad20, mem, sizeof(res->packet._1.pad20)); mem += sizeof(res->packet._1.pad20); len -= sizeof(res->packet._1.pad20); if (len < sizeof(res->packet._1.magic50)) return NULL; memcpy(&res->packet._1.magic50, mem, sizeof(res->packet._1.magic50)); mem += sizeof(res->packet._1.magic50); len -= sizeof(res->packet._1.magic50); if (len < sizeof(res->packet._1.pad30)) return NULL; memcpy(res->packet._1.pad30, mem, sizeof(res->packet._1.pad30)); mem += sizeof(res->packet._1.pad30); len -= sizeof(res->packet._1.pad30); if (len < sizeof(res->packet._1.magic60)) return NULL; memcpy(&res->packet._1.magic60, mem, sizeof(res->packet._1.magic60)); mem += sizeof(res->packet._1.magic60); len -= sizeof(res->packet._1.magic60); if (len < sizeof(res->packet._1.pad35)) return NULL; memcpy(res->packet._1.pad35, mem, sizeof(res->packet._1.pad35)); mem += sizeof(res->packet._1.pad35); len -= sizeof(res->packet._1.pad35); if (len < sizeof(res->packet._1.magic65)) return NULL; memcpy(&res->packet._1.magic65, mem, sizeof(res->packet._1.magic65)); mem += sizeof(res->packet._1.magic65); len -= sizeof(res->packet._1.magic65); if (len < sizeof(res->packet._1.pad40)) return NULL; memcpy(res->packet._1.pad40, mem, sizeof(res->packet._1.pad40)); mem += sizeof(res->packet._1.pad40); len -= sizeof(res->packet._1.pad40); if (len < sizeof(res->packet._1.udpport)) return NULL; memcpy(&res->packet._1.udpport, mem, sizeof(res->packet._1.udpport)); mem += sizeof(res->packet._1.udpport); len -= sizeof(res->packet._1.udpport); if (len < sizeof(res->packet._1.udpaddr)) return NULL; memcpy(&res->packet._1.udpaddr, mem, sizeof(res->packet._1.udpaddr)); mem += sizeof(res->packet._1.udpaddr); len -= sizeof(res->packet._1.udpaddr); break; case MSPROXY_USERINFO_ACK: if (len < sizeof(res->packet._2.pad5)) return NULL; memcpy(res->packet._2.pad5, mem, sizeof(res->packet._2.pad5)); mem += sizeof(res->packet._2.pad5); len -= sizeof(res->packet._2.pad5); if (len < sizeof(res->packet._2.magic5)) return NULL; memcpy(&res->packet._2.magic5, mem, sizeof(res->packet._2.magic5)); mem += sizeof(res->packet._2.magic5); len -= sizeof(res->packet._2.magic5); break; case MSPROXY_BIND_ACK: case MSPROXY_SOMETHING_1_ACK: if (len < sizeof(res->packet._3.pad1)) return NULL; memcpy(res->packet._3.pad1, mem, sizeof(res->packet._3.pad1)); mem += sizeof(res->packet._3.pad1); len -= sizeof(res->packet._3.pad1); if (len < sizeof(res->packet._3.magic10)) return NULL; memcpy(&res->packet._3.magic10, mem, sizeof(res->packet._3.magic10)); mem += sizeof(res->packet._3.magic10); len -= sizeof(res->packet._3.magic10); if (len < sizeof(res->packet._3.pad3)) return NULL; memcpy(res->packet._3.pad3, mem, sizeof(res->packet._3.pad3)); mem += sizeof(res->packet._3.pad3); len -= sizeof(res->packet._3.pad3); if (len < sizeof(res->packet._3.boundport)) return NULL; memcpy(&res->packet._3.boundport, mem, sizeof(res->packet._3.boundport)); mem += sizeof(res->packet._3.boundport); len -= sizeof(res->packet._3.boundport); if (len < sizeof(res->packet._3.boundaddr)) return NULL; memcpy(&res->packet._3.boundaddr, mem, sizeof(res->packet._3.boundaddr)); mem += sizeof(res->packet._3.boundaddr); len -= sizeof(res->packet._3.boundaddr); if (len < sizeof(res->packet._3.pad10)) return NULL; memcpy(res->packet._3.pad10, mem, sizeof(res->packet._3.pad10)); mem += sizeof(res->packet._3.pad10); len -= sizeof(res->packet._3.pad10); if (len < sizeof(res->packet._3.magic15)) return NULL; memcpy(&res->packet._3.magic15, mem, sizeof(res->packet._3.magic15)); mem += sizeof(res->packet._3.magic15); len -= sizeof(res->packet._3.magic15); if (len < sizeof(res->packet._3.pad15)) return NULL; memcpy(res->packet._3.pad15, mem, sizeof(res->packet._3.pad15)); mem += sizeof(res->packet._3.pad15); len -= sizeof(res->packet._3.pad15); if (len < sizeof(res->packet._3.NTLMSSP)) return NULL; memcpy(res->packet._3.NTLMSSP, mem, sizeof(res->packet._3.NTLMSSP)); mem += sizeof(res->packet._3.NTLMSSP); len -= sizeof(res->packet._3.NTLMSSP); if (len < sizeof(res->packet._3.magic50)) return NULL; memcpy(&res->packet._3.magic50, mem, sizeof(res->packet._3.magic50)); mem += sizeof(res->packet._3.magic50); len -= sizeof(res->packet._3.magic50); if (len < sizeof(res->packet._3.pad50)) return NULL; memcpy(res->packet._3.pad50, mem, sizeof(res->packet._3.pad50)); mem += sizeof(res->packet._3.pad50); len -= sizeof(res->packet._3.pad50); if (len < sizeof(res->packet._3.magic55)) return NULL; memcpy(&res->packet._3.magic55, mem, sizeof(res->packet._3.magic55)); mem += sizeof(res->packet._3.magic55); len -= sizeof(res->packet._3.magic55); if (len < sizeof(res->packet._3.magic60)) return NULL; memcpy(&res->packet._3.magic60, mem, sizeof(res->packet._3.magic60)); mem += sizeof(res->packet._3.magic60); len -= sizeof(res->packet._3.magic60); if (len < sizeof(res->packet._3.magic65)) return NULL; memcpy(&res->packet._3.magic65, mem, sizeof(res->packet._3.magic65)); mem += sizeof(res->packet._3.magic65); len -= sizeof(res->packet._3.magic65); if (len < sizeof(res->packet._3.pad60)) return NULL; memcpy(res->packet._3.pad60, mem, sizeof(res->packet._3.pad60)); mem += sizeof(res->packet._3.pad60); len -= sizeof(res->packet._3.pad60); if (len < sizeof(res->packet._3.magic70)) return NULL; memcpy(&res->packet._3.magic70, mem, sizeof(res->packet._3.magic70)); mem += sizeof(res->packet._3.magic70); len -= sizeof(res->packet._3.magic70); if (len < sizeof(res->packet._3.magic75)) return NULL; memcpy(&res->packet._3.magic75, mem, sizeof(res->packet._3.magic75)); mem += sizeof(res->packet._3.magic75); len -= sizeof(res->packet._3.magic75); if (len < sizeof(res->packet._3.pad70)) return NULL; memcpy(res->packet._3.pad70, mem, sizeof(res->packet._3.pad70)); mem += sizeof(res->packet._3.pad70); len -= sizeof(res->packet._3.pad70); if (len > sizeof(res->packet._3.ntdomain)) swarnx("hmm, ntdomain length is %d, our max is %d?", len, sizeof(res->packet._3.ntdomain) - 1); memcpy(res->packet._3.ntdomain, mem, MIN(len, sizeof(res->packet._3.ntdomain) - 1)); res->packet._3.ntdomain[len] = NUL; mem += len; len -= len; break; case MSPROXY_SOMETHING_2_ACK: case MSPROXY_SOMETHING_2_ACK2: case MSPROXY_BIND2_ACK: if (len < sizeof(res->packet._4.pad5)) return NULL; memcpy(res->packet._4.pad5, mem, sizeof(res->packet._4.pad5)); mem += sizeof(res->packet._4.pad5); len -= sizeof(res->packet._4.pad5); break; case MSPROXY_RESOLVE_ACK: { if (len < sizeof(res->packet.resolve.addroffset)) return NULL; memcpy(&res->packet.resolve.addroffset, mem, sizeof(res->packet.resolve.addroffset)); mem += sizeof(res->packet.resolve.addroffset); len -= sizeof(res->packet.resolve.addroffset); if (len < sizeof(res->packet.resolve.pad5)) return NULL; memcpy(res->packet.resolve.pad5, mem, sizeof(res->packet.resolve.pad5)); mem += sizeof(res->packet.resolve.pad5); len -= sizeof(res->packet.resolve.pad5); mem += res->packet.resolve.addroffset; if (len < sizeof(res->packet.resolve.hostaddr)) return NULL; memcpy(&res->packet.resolve.hostaddr, mem, sizeof(res->packet.resolve.hostaddr)); mem += sizeof(res->packet.resolve.hostaddr); len -= sizeof(res->packet.resolve.hostaddr); break; } case MSPROXY_CONNECT_ACK: case MSPROXY_BINDINFO: if (len < sizeof(res->packet._5.magic1)) return NULL; memcpy(&res->packet._5.magic1, mem, sizeof(res->packet._5.magic1)); mem += sizeof(res->packet._5.magic1); len -= sizeof(res->packet._5.magic1); if (len < sizeof(res->packet._5.pad5)) return NULL; memcpy(res->packet._5.pad5, mem, sizeof(res->packet._5.pad5)); mem += sizeof(res->packet._5.pad5); len -= sizeof(res->packet._5.pad5); if (len < sizeof(res->packet._5.clientport)) return NULL; memcpy(&res->packet._5.clientport, mem, sizeof(res->packet._5.clientport)); mem += sizeof(res->packet._5.clientport); len -= sizeof(res->packet._5.clientport); if (len < sizeof(res->packet._5.clientaddr)) return NULL; memcpy(&res->packet._5.clientaddr, mem, sizeof(res->packet._5.clientaddr)); mem += sizeof(res->packet._5.clientaddr); len -= sizeof(res->packet._5.clientaddr); if (len < sizeof(res->packet._5.magic10)) return NULL; memcpy(&res->packet._5.magic10, mem, sizeof(res->packet._5.magic10)); mem += sizeof(res->packet._5.magic10); len -= sizeof(res->packet._5.magic10); if (len < sizeof(res->packet._5.magic15)) return NULL; memcpy(&res->packet._5.magic15, mem, sizeof(res->packet._5.magic15)); mem += sizeof(res->packet._5.magic15); len -= sizeof(res->packet._5.magic15); if (len < sizeof(res->packet._5.serverport)) return NULL; memcpy(&res->packet._5.serverport, mem, sizeof(res->packet._5.serverport)); mem += sizeof(res->packet._5.serverport); len -= sizeof(res->packet._5.serverport); if (len < sizeof(res->packet._5.srcport)) return NULL; memcpy(&res->packet._5.srcport, mem, sizeof(res->packet._5.srcport)); mem += sizeof(res->packet._5.srcport); len -= sizeof(res->packet._5.srcport); if (len < sizeof(res->packet._5.boundport)) return NULL; memcpy(&res->packet._5.boundport, mem, sizeof(res->packet._5.boundport)); mem += sizeof(res->packet._5.boundport); len -= sizeof(res->packet._5.boundport); if (len < sizeof(res->packet._5.boundaddr)) return NULL; memcpy(&res->packet._5.boundaddr, mem, sizeof(res->packet._5.boundaddr)); mem += sizeof(res->packet._5.boundaddr); len -= sizeof(res->packet._5.boundaddr); if (len < sizeof(res->packet._5.pad10)) return NULL; memcpy(res->packet._5.pad10, mem, sizeof(res->packet._5.pad10)); mem += sizeof(res->packet._5.pad10); len -= sizeof(res->packet._5.pad10); break; case MSPROXY_CONNECT_AUTHFAILED: case MSPROXY_BIND_AUTHFAILED: break; default: if (ntohs(res->command) >> 8 == MSPROXY_CONNREFUSED || ntohs(res->command) >> 12 == MSPROXY_CONNREFUSED) ; else slog(LOG_DEBUG, "%s: unknown command in msproxy reply: 0x%x", function, ntohs(res->command)); } return mem; } static char * request2mem(req, mem) const struct msproxy_request_t *req; char *mem; { memcpy(mem, &req->clientid, sizeof(req->clientid)); mem += sizeof(req->clientid); memcpy(mem, &req->magic25, sizeof(req->magic25)); mem += sizeof(req->magic25); memcpy(mem, &req->serverid, sizeof(req->serverid)); mem += sizeof(req->serverid); memcpy(mem, &req->serverack, sizeof(req->serverack)); mem += sizeof(req->serverack); memcpy(mem, &req->pad10, sizeof(req->pad10)); mem += sizeof(req->pad10); memcpy(mem, &req->sequence, sizeof(req->sequence)); mem += sizeof(req->sequence); memcpy(mem, &req->pad11, sizeof(req->pad11)); mem += sizeof(req->pad11); memcpy(mem, &req->RWSP, sizeof(req->RWSP)); mem += sizeof(req->RWSP); memcpy(mem, &req->pad15, sizeof(req->pad15)); mem += sizeof(req->pad15); memcpy(mem, &req->command, sizeof(req->command)); mem += sizeof(req->command); switch (ntohs(req->command)) { case MSPROXY_HELLO: memcpy(mem, &req->packet._1.pad1, sizeof(req->packet._1.pad1)); mem += sizeof(req->packet._1.pad1); memcpy(mem, &req->packet._1.magic3, sizeof(req->packet._1.magic3)); mem += sizeof(req->packet._1.magic3); memcpy(mem, &req->packet._1.pad3, sizeof(req->packet._1.pad3)); mem += sizeof(req->packet._1.pad3); memcpy(mem, &req->packet._1.magic5, sizeof(req->packet._1.magic5)); mem += sizeof(req->packet._1.magic5); memcpy(mem, &req->packet._1.pad5, sizeof(req->packet._1.pad5)); mem += sizeof(req->packet._1.pad5); memcpy(mem, &req->packet._1.magic10, sizeof(req->packet._1.magic10)); mem += sizeof(req->packet._1.magic10); memcpy(mem, &req->packet._1.pad6, sizeof(req->packet._1.pad6)); mem += sizeof(req->packet._1.pad6); memcpy(mem, &req->packet._1.magic15, sizeof(req->packet._1.magic15)); mem += sizeof(req->packet._1.magic15); memcpy(mem, &req->packet._1.pad10, sizeof(req->packet._1.pad10)); mem += sizeof(req->packet._1.pad10); memcpy(mem, &req->packet._1.magic20, sizeof(req->packet._1.magic20)); mem += sizeof(req->packet._1.magic20); memcpy(mem, &req->packet._1.magic25, sizeof(req->packet._1.magic25)); mem += sizeof(req->packet._1.magic25); memcpy(mem, &req->packet._1.magic30, sizeof(req->packet._1.magic30)); mem += sizeof(req->packet._1.magic30); memcpy(mem, &req->packet._1.pad20, sizeof(req->packet._1.pad20)); mem += sizeof(req->packet._1.pad20); memcpy(mem, &req->packet._1.magic35, sizeof(req->packet._1.magic35)); mem += sizeof(req->packet._1.magic35); memcpy(mem, &req->packet._1.pad30, sizeof(req->packet._1.pad30)); mem += sizeof(req->packet._1.pad30); memcpy(mem, &req->packet._1.magic40, sizeof(req->packet._1.magic40)); mem += sizeof(req->packet._1.magic40); memcpy(mem, &req->packet._1.pad40, sizeof(req->packet._1.pad40)); mem += sizeof(req->packet._1.pad40); memcpy(mem, &req->packet._1.magic45, sizeof(req->packet._1.magic45)); mem += sizeof(req->packet._1.magic45); memcpy(mem, &req->packet._1.pad45, sizeof(req->packet._1.pad45)); mem += sizeof(req->packet._1.pad45); memcpy(mem, &req->packet._1.magic50, sizeof(req->packet._1.magic50)); mem += sizeof(req->packet._1.magic50); memcpy(mem, &req->packet._1.pad50, sizeof(req->packet._1.pad50)); mem += sizeof(req->packet._1.pad50); strcpy(mem, req->username); mem += strlen(req->username) + 1; strcpy(mem, req->unknown); mem += strlen(req->unknown) + 1; strcpy(mem, req->executable); mem += strlen(req->executable) + 1; strcpy(mem, req->clienthost); mem += strlen(req->clienthost) + 1; break; case MSPROXY_USERINFO: memcpy(mem, &req->packet._2.pad1, sizeof(req->packet._2.pad1)); mem += sizeof(req->packet._2.pad1); memcpy(mem, &req->packet._2.magic3, sizeof(req->packet._2.magic3)); mem += sizeof(req->packet._2.magic3); memcpy(mem, &req->packet._2.pad3, sizeof(req->packet._2.pad3)); mem += sizeof(req->packet._2.pad3); memcpy(mem, &req->packet._2.magic5, sizeof(req->packet._2.magic5)); mem += sizeof(req->packet._2.magic5); memcpy(mem, &req->packet._2.pad5, sizeof(req->packet._2.pad5)); mem += sizeof(req->packet._2.pad5); memcpy(mem, &req->packet._2.magic10, sizeof(req->packet._2.magic10)); mem += sizeof(req->packet._2.magic10); memcpy(mem, &req->packet._2.pad10, sizeof(req->packet._2.pad10)); mem += sizeof(req->packet._2.pad10); memcpy(mem, &req->packet._2.magic15, sizeof(req->packet._2.magic15)); mem += sizeof(req->packet._2.magic15); memcpy(mem, &req->packet._2.pad15, sizeof(req->packet._2.pad15)); mem += sizeof(req->packet._2.pad15); memcpy(mem, &req->packet._2.magic20, sizeof(req->packet._2.magic20)); mem += sizeof(req->packet._2.magic20); memcpy(mem, &req->packet._2.magic25, sizeof(req->packet._2.magic25)); mem += sizeof(req->packet._2.magic25); memcpy(mem, &req->packet._2.magic30, sizeof(req->packet._2.magic30)); mem += sizeof(req->packet._2.magic30); memcpy(mem, &req->packet._2.pad20, sizeof(req->packet._2.pad20)); mem += sizeof(req->packet._2.pad20); memcpy(mem, &req->packet._2.magic35, sizeof(req->packet._2.magic35)); mem += sizeof(req->packet._2.magic35); memcpy(mem, &req->packet._2.pad25, sizeof(req->packet._2.pad25)); mem += sizeof(req->packet._2.pad25); memcpy(mem, &req->packet._2.magic35, sizeof(req->packet._2.magic35)); mem += sizeof(req->packet._2.magic35); memcpy(mem, &req->packet._2.pad25, sizeof(req->packet._2.pad25)); mem += sizeof(req->packet._2.pad25); memcpy(mem, &req->packet._2.magic50, sizeof(req->packet._2.magic50)); mem += sizeof(req->packet._2.magic50); memcpy(mem, &req->packet._2.pad50, sizeof(req->packet._2.pad50)); mem += sizeof(req->packet._2.pad50); memcpy(mem, &req->packet._2.magic55, sizeof(req->packet._2.magic55)); mem += sizeof(req->packet._2.magic55); memcpy(mem, &req->packet._2.pad55, sizeof(req->packet._2.pad55)); mem += sizeof(req->packet._2.pad55); memcpy(mem, &req->packet._2.magic60, sizeof(req->packet._2.magic60)); mem += sizeof(req->packet._2.magic60); strcpy(mem, req->username); mem += strlen(req->username) + 1; strcpy(mem, req->unknown); mem += strlen(req->unknown) + 1; strcpy(mem, req->executable); mem += strlen(req->executable) + 1; strcpy(mem, req->clienthost); mem += strlen(req->clienthost) + 1; break; case MSPROXY_BIND: case MSPROXY_SOMETHING: memcpy(mem, &req->packet._3.pad1, sizeof(req->packet._3.pad1)); mem += sizeof(req->packet._3.pad1); memcpy(mem, &req->packet._3.magic2, sizeof(req->packet._3.magic2)); mem += sizeof(req->packet._3.magic2); memcpy(mem, &req->packet._3.pad10, sizeof(req->packet._3.pad10)); mem += sizeof(req->packet._3.pad10); memcpy(mem, &req->packet._3.bindaddr, sizeof(req->packet._3.bindaddr)); mem += sizeof(req->packet._3.bindaddr); memcpy(mem, &req->packet._3.bindport, sizeof(req->packet._3.bindport)); mem += sizeof(req->packet._3.bindport); memcpy(mem, &req->packet._3.pad15, sizeof(req->packet._3.pad15)); mem += sizeof(req->packet._3.pad15); memcpy(mem, &req->packet._3.magic3, sizeof(req->packet._3.magic3)); mem += sizeof(req->packet._3.magic3); memcpy(mem, &req->packet._3.boundport, sizeof(req->packet._3.boundport)); mem += sizeof(req->packet._3.boundport); memcpy(mem, &req->packet._3.pad20, sizeof(req->packet._3.pad20)); mem += sizeof(req->packet._3.pad20); memcpy(mem, &req->packet._3.NTLMSSP, sizeof(req->packet._3.NTLMSSP)); mem += sizeof(req->packet._3.NTLMSSP); memcpy(mem, &req->packet._3.magic5, sizeof(req->packet._3.magic5)); mem += sizeof(req->packet._3.magic5); memcpy(mem, &req->packet._3.pad25, sizeof(req->packet._3.pad25)); mem += sizeof(req->packet._3.pad25); memcpy(mem, &req->packet._3.magic10, sizeof(req->packet._3.magic10)); mem += sizeof(req->packet._3.magic10); memcpy(mem, &req->packet._3.magic15, sizeof(req->packet._3.magic15)); mem += sizeof(req->packet._3.magic15); memcpy(mem, &req->packet._3.magic20, sizeof(req->packet._3.magic20)); mem += sizeof(req->packet._3.magic20); memcpy(mem, &req->packet._3.pad30, sizeof(req->packet._3.pad30)); mem += sizeof(req->packet._3.pad30); memcpy(mem, &req->packet._3.magic25, sizeof(req->packet._3.magic25)); mem += sizeof(req->packet._3.magic25); memcpy(mem, &req->packet._3.magic30, sizeof(req->packet._3.magic30)); mem += sizeof(req->packet._3.magic30); memcpy(mem, &req->packet._3.pad40, sizeof(req->packet._3.pad40)); mem += sizeof(req->packet._3.pad40); memcpy(mem, &req->packet._3.magic50, sizeof(req->packet._3.magic50)); mem += sizeof(req->packet._3.magic50); memcpy(mem, &req->packet._3.pad50, sizeof(req->packet._3.pad50)); mem += sizeof(req->packet._3.pad50); memcpy(mem, &req->packet._3.magic55, sizeof(req->packet._3.magic55)); mem += sizeof(req->packet._3.magic55); memcpy(mem, &req->packet._3.pad55, sizeof(req->packet._3.pad55)); mem += sizeof(req->packet._3.pad55); break; case MSPROXY_BIND2: case MSPROXY_SOMETHING_2: memcpy(mem, &req->packet._4.pad1, sizeof(req->packet._4.pad1)); mem += sizeof(req->packet._4.pad1); memcpy(mem, &req->packet._4.magic1, sizeof(req->packet._4.magic1)); mem += sizeof(req->packet._4.magic1); memcpy(mem, &req->packet._4.magic2, sizeof(req->packet._4.magic2)); mem += sizeof(req->packet._4.magic2); memcpy(mem, &req->packet._4.pad2, sizeof(req->packet._4.pad2)); mem += sizeof(req->packet._4.pad2); memcpy(mem, &req->packet._4.magic3, sizeof(req->packet._4.magic3)); mem += sizeof(req->packet._4.magic3); memcpy(mem, &req->packet._4.pad3, sizeof(req->packet._4.pad3)); mem += sizeof(req->packet._4.pad3); memcpy(mem, &req->packet._4.magic4, sizeof(req->packet._4.magic4)); mem += sizeof(req->packet._4.magic4); memcpy(mem, &req->packet._4.boundport, sizeof(req->packet._4.boundport)); mem += sizeof(req->packet._4.boundport); memcpy(mem, &req->packet._4.pad4, sizeof(req->packet._4.pad4)); mem += sizeof(req->packet._4.pad4); memcpy(mem, &req->packet._4.NTLMSSP, sizeof(req->packet._4.NTLMSSP)); mem += sizeof(req->packet._4.NTLMSSP); memcpy(mem, &req->packet._4.magic5, sizeof(req->packet._4.magic5)); mem += sizeof(req->packet._4.magic5); memcpy(mem, &req->packet._4.pad5, sizeof(req->packet._4.pad5)); mem += sizeof(req->packet._4.pad5); memcpy(mem, &req->packet._4.magic10, sizeof(req->packet._4.magic10)); mem += sizeof(req->packet._4.magic10); memcpy(mem, &req->packet._4.magic10, sizeof(req->packet._4.magic10)); mem += sizeof(req->packet._4.magic10); memcpy(mem, &req->packet._4.magic20, sizeof(req->packet._4.magic20)); mem += sizeof(req->packet._4.magic20); memcpy(mem, &req->packet._4.pad10, sizeof(req->packet._4.pad10)); mem += sizeof(req->packet._4.pad10); memcpy(mem, &req->packet._4.magic30, sizeof(req->packet._4.magic30)); mem += sizeof(req->packet._4.magic30); memcpy(mem, &req->packet._4.pad15, sizeof(req->packet._4.pad15)); mem += sizeof(req->packet._4.pad15); memcpy(mem, &req->packet._4.magic35, sizeof(req->packet._4.magic35)); mem += sizeof(req->packet._4.magic35); memcpy(mem, &req->packet._4.magic40, sizeof(req->packet._4.magic40)); mem += sizeof(req->packet._4.magic40); memcpy(mem, &req->packet._4.magic45, sizeof(req->packet._4.magic45)); mem += sizeof(req->packet._4.magic45); memcpy(mem, &req->packet._4.pad20, sizeof(req->packet._4.pad20)); mem += sizeof(req->packet._4.pad20); memcpy(mem, &req->packet._4.magic50, sizeof(req->packet._4.magic50)); mem += sizeof(req->packet._4.magic50); memcpy(mem, &req->packet._4.magic55, sizeof(req->packet._4.magic55)); mem += sizeof(req->packet._4.magic55); memcpy(mem, &req->packet._4.magic60, sizeof(req->packet._4.magic60)); mem += sizeof(req->packet._4.magic60); memcpy(mem, &req->packet._4.pad25, sizeof(req->packet._4.pad25)); mem += sizeof(req->packet._4.pad25); memcpy(mem, &req->packet._4.magic65, sizeof(req->packet._4.magic65)); mem += sizeof(req->packet._4.magic65); memcpy(mem, &req->packet._4.magic70, sizeof(req->packet._4.magic70)); mem += sizeof(req->packet._4.magic70); memcpy(mem, &req->packet._4.magic75, sizeof(req->packet._4.magic75)); mem += sizeof(req->packet._4.magic75); break; case MSPROXY_RESOLVE: memcpy(mem, &req->packet.resolve.hostlength, sizeof(req->packet.resolve.hostlength)); mem += sizeof(req->packet.resolve.hostlength); memcpy(mem, &req->packet.resolve.pad1, sizeof(req->packet.resolve.pad1)); mem += sizeof(req->packet.resolve.pad1); memcpy(mem, &req->packet.resolve.host, (size_t)req->packet.resolve.hostlength); mem += req->packet.resolve.hostlength; break; case MSPROXY_LISTEN: case MSPROXY_CONNECT: memcpy(mem, &req->packet._5.magic1, sizeof(req->packet._5.magic1)); mem += sizeof(req->packet._5.magic1); memcpy(mem, &req->packet._5.pad1, sizeof(req->packet._5.pad1)); mem += sizeof(req->packet._5.pad1); memcpy(mem, &req->packet._5.magic3, sizeof(req->packet._5.magic3)); mem += sizeof(req->packet._5.magic3); memcpy(mem, &req->packet._5.pad5, sizeof(req->packet._5.pad5)); mem += sizeof(req->packet._5.pad5); memcpy(mem, &req->packet._5.magic6, sizeof(req->packet._5.magic6)); mem += sizeof(req->packet._5.magic6); memcpy(mem, &req->packet._5.destport, sizeof(req->packet._5.destport)); mem += sizeof(req->packet._5.destport); memcpy(mem, &req->packet._5.destaddr, sizeof(req->packet._5.destaddr)); mem += sizeof(req->packet._5.destaddr); memcpy(mem, &req->packet._5.pad10, sizeof(req->packet._5.pad10)); mem += sizeof(req->packet._5.pad10); memcpy(mem, &req->packet._5.magic10, sizeof(req->packet._5.magic10)); mem += sizeof(req->packet._5.magic10); memcpy(mem, &req->packet._5.pad15, sizeof(req->packet._5.pad15)); mem += sizeof(req->packet._5.pad15); memcpy(mem, &req->packet._5.srcport, sizeof(req->packet._5.srcport)); mem += sizeof(req->packet._5.srcport); memcpy(mem, &req->packet._5.pad20, sizeof(req->packet._5.pad20)); mem += sizeof(req->packet._5.pad20); strcpy(mem, req->executable); break; case MSPROXY_BINDINFO_ACK: case MSPROXY_CONNECTED: memcpy(mem, &req->packet._6.magic1, sizeof(req->packet._6.magic1)); mem += sizeof(req->packet._6.magic1); memcpy(mem, req->packet._6.pad5, sizeof(req->packet._6.pad5)); mem += sizeof(req->packet._6.pad5); memcpy(mem, &req->packet._6.magic5, sizeof(req->packet._6.magic5)); mem += sizeof(req->packet._6.magic5); memcpy(mem, &req->packet._6.magic10, sizeof(req->packet._6.magic10)); mem += sizeof(req->packet._6.magic10); memcpy(mem, req->packet._6.pad10, sizeof(req->packet._6.pad10)); mem += sizeof(req->packet._6.pad10); memcpy(mem, &req->packet._6.magic15, sizeof(req->packet._6.magic15)); mem += sizeof(req->packet._6.magic15); memcpy(mem, &req->packet._6.magic16, sizeof(req->packet._6.magic16)); mem += sizeof(req->packet._6.magic16); memcpy(mem, &req->packet._6.magic20, sizeof(req->packet._6.magic20)); mem += sizeof(req->packet._6.magic20); memcpy(mem, &req->packet._6.clientport, sizeof(req->packet._6.clientport)); mem += sizeof(req->packet._6.clientport); memcpy(mem, &req->packet._6.clientaddr, sizeof(req->packet._6.clientaddr)); mem += sizeof(req->packet._6.clientaddr); memcpy(mem, &req->packet._6.magic30, sizeof(req->packet._6.magic30)); mem += sizeof(req->packet._6.magic30); memcpy(mem, &req->packet._6.magic35, sizeof(req->packet._6.magic35)); mem += sizeof(req->packet._6.magic35); memcpy(mem, &req->packet._6.serverport, sizeof(req->packet._6.serverport)); mem += sizeof(req->packet._6.serverport); memcpy(mem, &req->packet._6.srcport, sizeof(req->packet._6.srcport)); mem += sizeof(req->packet._6.srcport); memcpy(mem, &req->packet._6.boundport, sizeof(req->packet._6.boundport)); mem += sizeof(req->packet._6.boundport); memcpy(mem, &req->packet._6.boundaddr, sizeof(req->packet._6.boundaddr)); mem += sizeof(req->packet._6.boundaddr); memcpy(mem, req->packet._6.pad30, sizeof(req->packet._6.pad30)); mem += sizeof(req->packet._6.pad30); break; case MSPROXY_SESSIONEND: break; default: SERRX(req->command); } return mem; } void msproxy_sessionsend(void) { const char *function = "msproxy_sessionsend()"; int i, max; struct socksfd_t *socksfd; slog(LOG_DEBUG, function); for (i = 0, max = getdtablesize(); i < max; ++i) { if ((socksfd = socks_getaddr((unsigned int)i)) == NULL) continue; if (socksfd->state.version != MSPROXY_V2) continue; msproxy_sessionend(socksfd->control, &socksfd->state.msproxy); } } static void msproxy_sessionend(s, msproxy) int s; struct msproxy_state_t *msproxy; { const char *function = "msproxy_sessionend()"; struct msproxy_request_t req; slog(LOG_DEBUG, function); bzero(&req, sizeof(req)); *req.username = NUL; *req.unknown = NUL; *req.executable = NUL; *req.clienthost = NUL; req.clientid = msproxy->clientid; req.serverid = msproxy->serverid; req.command = htons(MSPROXY_SESSIONEND); send_msprequest(s, msproxy, &req); } /* ARGSUSED */ static void msproxy_keepalive(sig) int sig; { const char *function = "msproxy_keepalive()"; struct msproxy_request_t req; struct msproxy_response_t res; struct socksfd_t *socksfd; int i, max; slog(LOG_DEBUG, function); for (i = 0, max = getdtablesize(); i < max; ++i) { if ((socksfd = socks_getaddr((unsigned int)i)) == NULL) continue; if (socksfd->state.version != MSPROXY_V2 || socksfd->state.inprogress) continue; slog(LOG_DEBUG, "%s: sending keepalive packet", function); bzero(&req, sizeof(req)); req.clientid = socksfd->state.msproxy.clientid; req.serverid = socksfd->state.msproxy.serverid; req.command = htons(MSPROXY_HELLO); if (send_msprequest(socksfd->control, &socksfd->state.msproxy, &req) == -1) return; if (recv_mspresponse(socksfd->control, &socksfd->state.msproxy, &res) == -1) return; } } dante-1.1.19.dfsg/lib/Makefile.am0000644000175000017500000000174510324735542015114 0ustar roamroamlib_LTLIBRARIES = libsocks.la libsocks_la_SOURCES = config_parse.y config_scan.l Raccept.c Rbind.c \ Rgetpeername.c Rgetsockname.c Rrresvport.c io.c \ address.c authneg.c client.c clientconfig.c clientprotocol.c \ udp.c userio.c connectchild.c config.c \ log.c protocol.c socket.c udp_util.c util.c Rbindresvport.c \ Rconnect.c Rgethostbyname.c debug.c Rcompat.c \ msproxy_clientprotocol.c hostcache.c broken.c serr.c httpproxy.c \ tostring.c addressmatch.c #libsocks version info, interfaceversion:revision:old interfaces supported #XXX SPEC/dante.spec.in must have the same value as version info libsocks_la_LDFLAGS = -version-info 1:0:1 libsocks_la_LIBADD = ../libscompat/libscompat.la noinst_HEADERS = config_parse.h MAINTAINERCLEANFILES = config_parse.h config_parse.c config_scan.c INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/libscompat #XXX AM_CFLAGS =-DSOCKS_CLIENT=1 -DSOCKS_SERVER=0 PREFIX = socks_yy AM_YFLAGS = -d -p${PREFIX} AM_LFLAGS = -P${PREFIX} -olex.yy.c dante-1.1.19.dfsg/lib/Makefile.in0000644000175000017500000004750610362704171015126 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in config_parse.c config_parse.h \ config_scan.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libsocks_la_DEPENDENCIES = ../libscompat/libscompat.la am_libsocks_la_OBJECTS = config_parse.lo config_scan.lo Raccept.lo \ Rbind.lo Rgetpeername.lo Rgetsockname.lo Rrresvport.lo io.lo \ address.lo authneg.lo client.lo clientconfig.lo \ clientprotocol.lo udp.lo userio.lo connectchild.lo config.lo \ log.lo protocol.lo socket.lo udp_util.lo util.lo \ Rbindresvport.lo Rconnect.lo Rgethostbyname.lo debug.lo \ Rcompat.lo msproxy_clientprotocol.lo hostcache.lo broken.lo \ serr.lo httpproxy.lo tostring.lo addressmatch.lo libsocks_la_OBJECTS = $(am_libsocks_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \ $(AM_YFLAGS) SOURCES = $(libsocks_la_SOURCES) DIST_SOURCES = $(libsocks_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libsocks.la libsocks_la_SOURCES = config_parse.y config_scan.l Raccept.c Rbind.c \ Rgetpeername.c Rgetsockname.c Rrresvport.c io.c \ address.c authneg.c client.c clientconfig.c clientprotocol.c \ udp.c userio.c connectchild.c config.c \ log.c protocol.c socket.c udp_util.c util.c Rbindresvport.c \ Rconnect.c Rgethostbyname.c debug.c Rcompat.c \ msproxy_clientprotocol.c hostcache.c broken.c serr.c httpproxy.c \ tostring.c addressmatch.c #libsocks version info, interfaceversion:revision:old interfaces supported #XXX SPEC/dante.spec.in must have the same value as version info libsocks_la_LDFLAGS = -version-info 1:0:1 libsocks_la_LIBADD = ../libscompat/libscompat.la noinst_HEADERS = config_parse.h MAINTAINERCLEANFILES = config_parse.h config_parse.c config_scan.c INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/libscompat #XXX AM_CFLAGS = -DSOCKS_CLIENT=1 -DSOCKS_SERVER=0 PREFIX = socks_yy AM_YFLAGS = -d -p${PREFIX} AM_LFLAGS = -P${PREFIX} -olex.yy.c all: all-am .SUFFIXES: .SUFFIXES: .c .l .lo .o .obj .y $(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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/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 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done config_parse.h: config_parse.c @if test ! -f $@; then \ rm -f config_parse.c; \ $(MAKE) config_parse.c; \ else :; fi libsocks.la: $(libsocks_la_OBJECTS) $(libsocks_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libsocks_la_LDFLAGS) $(libsocks_la_OBJECTS) $(libsocks_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Raccept.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rbind.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rbindresvport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rcompat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rconnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rgethostbyname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rgetpeername.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rgetsockname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rrresvport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/address.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addressmatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authneg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/broken.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clientconfig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clientprotocol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_scan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connectchild.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostcache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpproxy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msproxy_clientprotocol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tostring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udp_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .l.c: $(LEXCOMPILE) $< sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@ rm -f $(LEX_OUTPUT_ROOT).c .y.c: $(YACCCOMPILE) $< if test -f y.tab.h; then \ to=`echo "$*_H" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|$*.h|" \ y.tab.h >$*.ht; \ rm -f y.tab.h; \ if cmp -s $*.ht $*.h; then \ rm -f $*.ht ;\ else \ mv $*.ht $*.h; \ fi; \ fi if test -f y.output; then \ mv y.output $*.output; \ fi sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@ rm -f y.tab.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f config_parse.c -rm -f config_parse.h -rm -f config_scan.c -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libLTLIBRARIES # 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: dante-1.1.19.dfsg/lib/Rcompat.c0000755000175000017500000001607410175146325014634 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #define _NO_FUNCTION_REDIFINE #include "common.h" #if SOCKS_CLIENT && SOCKSLIBRARY_DYNAMIC #undef sendmsg #if HAVE_EXTRA_OSF_SYMBOLS #define sendmsg(s, msg, flags) sys_Esendmsg(s, msg, flags) #else #define sendmsg(s, msg, flags) sys_sendmsg(s, msg, flags) #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #undef recvmsg #if HAVE_EXTRA_OSF_SYMBOLS #define recvmsg(s, msg, flags) sys_Erecvmsg(s, msg, flags) #else #define recvmsg(s, msg, flags) sys_recvmsg(s, msg, flags) #endif /* HAVE_EXTRA_OSF_SYMBOLS */ /* XXX needed on AIX apparently */ #ifdef recvmsg_system #undef recvmsg #define recvmsg recvmsg_system #endif /* recvmsg_system */ #ifdef sendmsg_system #undef sendmsg #define sendmsg sendmsg_system #endif /* sendmsg_system */ #endif /* SOCKS_CLIENT && SOCKSLIBRARY_DYNAMIC */ static const char rcsid[] = "$Id: Rcompat.c,v 1.23 2005/01/24 10:24:21 karls Exp $"; int Rselect(nfds, readfds, writefds, exceptfds, timeout) int nfds; fd_set *readfds; fd_set *writefds; fd_set *exceptfds; struct timeval *timeout; { return select(nfds, readfds, writefds, exceptfds, timeout); } int Rlisten(s, backlog) int s; int backlog; { return listen(s, backlog); } ssize_t Rwrite(d, buf, nbytes) int d; const void *buf; size_t nbytes; { const char *function = "Rwrite()"; clientinit(); slog(LOG_DEBUG, "%s", function); return Rsend(d, buf, nbytes, 0); } ssize_t Rwritev(d, iov, iovcnt) int d; const struct iovec *iov; int iovcnt; { static const struct msghdr msginit; struct msghdr msg; const char *function = "Rwritev()"; clientinit(); slog(LOG_DEBUG, "%s", function); msg = msginit; /* LINTED operands have incompatible pointer types */ msg.msg_iov = (struct iovec *)iov; msg.msg_iovlen = iovcnt; return Rsendmsg(d, &msg, 0); } ssize_t Rsend(s, msg, len, flags) int s; const void *msg; size_t len; int flags; { static const struct msghdr msghdrinit; struct msghdr msghdr; struct iovec iov; const char *function = "Rsend()"; clientinit(); slog(LOG_DEBUG, "%s", function); /* LINTED operands have incompatible pointer types */ iov.iov_base = msg; iov.iov_len = len; msghdr = msghdrinit; msghdr.msg_iov = &iov; msghdr.msg_iovlen = 1; return Rsendmsg(s, &msghdr, flags); } ssize_t Rsendmsg(s, msg, flags) int s; const struct msghdr *msg; int flags; { size_t sent, ioc; ssize_t rc; struct sockaddr name; socklen_t namelen; const char *function = "Rsendmsg()"; clientinit(); slog(LOG_DEBUG, "%s", function); namelen = sizeof(name); if (getsockname(s, &name, &namelen) == -1) { errno = 0; return writev(s, msg->msg_iov, (int)msg->msg_iovlen); } switch (name.sa_family) { case AF_INET: break; #ifdef AF_INET6 case AF_INET6: break; #endif /* AF_INET6 */ default: return sendmsg(s, msg, flags); } for (sent = ioc = rc = 0; ioc < msg->msg_iovlen; ++ioc) { /* LINTED pointer casts may be troublesome */ if ((rc = Rsendto(s, msg->msg_iov[ioc].iov_base, msg->msg_iov[ioc].iov_len, flags, (struct sockaddr *)msg->msg_name, msg->msg_namelen)) == -1) break; sent += rc; if (rc != (ssize_t)msg->msg_iov[ioc].iov_len) break; } if (sent == 0) return rc; return sent; } ssize_t Rread(d, buf, nbytes) int d; void *buf; size_t nbytes; { const char *function = "Rread()"; clientinit(); slog(LOG_DEBUG, "%s", function); return Rrecv(d, buf, nbytes, 0); } ssize_t Rreadv(d, iov, iovcnt) int d; const struct iovec *iov; int iovcnt; { static const struct msghdr msghdrinit; struct msghdr msg; const char *function = "Rreadv()"; clientinit(); slog(LOG_DEBUG, "%s", function); msg = msghdrinit; /* LINTED operands have incompatible pointer types */ msg.msg_iov = (struct iovec *)iov; msg.msg_iovlen = iovcnt; return Rrecvmsg(d, &msg, 0); } ssize_t Rrecv(s, msg, len, flags) int s; void *msg; size_t len; int flags; { static const struct msghdr msghdrinit; struct msghdr msghdr; struct iovec iov; const char *function = "Rrecv()"; clientinit(); slog(LOG_DEBUG, "%s", function); /* LINTED cast discards 'const' from pointer target type */ iov.iov_base = (void *)msg; iov.iov_len = len; msghdr = msghdrinit; msghdr.msg_iov = &iov; msghdr.msg_iovlen = 1; return Rrecvmsg(s, &msghdr, flags); } ssize_t Rrecvmsg(s, msg, flags) int s; struct msghdr *msg; int flags; { size_t received, ioc; ssize_t rc; struct sockaddr name; socklen_t namelen; const char *function = "Rrecvmsg()"; clientinit(); slog(LOG_DEBUG, "%s", function); namelen = sizeof(name); if (getsockname(s, &name, &namelen) == -1) { errno = 0; return readv(s, msg->msg_iov, (int)msg->msg_iovlen); } switch (name.sa_family) { case AF_INET: break; #ifdef AF_INET6 case AF_INET6: break; #endif /* AF_INET6 */ default: return recvmsg(s, msg, flags); } for (received = ioc = rc = 0; ioc < msg->msg_iovlen; ++ioc) { /* LINTED pointer casts may be troublesome */ if ((rc = Rrecvfrom(s, msg->msg_iov[ioc].iov_base, msg->msg_iov[ioc].iov_len, flags, (struct sockaddr *)msg->msg_name, &msg->msg_namelen)) == -1) break; received += rc; if (rc != (ssize_t)msg->msg_iov[ioc].iov_len) break; } if (received == 0) return rc; return received; } dante-1.1.19.dfsg/lib/clientconfig.c0000644000175000017500000000421407700305326015657 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: clientconfig.c,v 1.17 2003/07/01 13:21:26 michaels Exp $"; struct config_t sockscf; const int socks_configtype = CONFIGTYPE_CLIENT; dante-1.1.19.dfsg/lib/serr.c0000644000175000017500000001030607700305333014163 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: serr.c,v 1.7 2003/07/01 13:21:31 michaels Exp $"; void #ifdef STDC_HEADERS serr(int eval, const char *fmt, ...) #else serr(eval, fmt, va_alist) int eval; const char *fmt; va_dcl #endif /* STDC_HEADERS */ { if (fmt != NULL) { va_list ap; char buf[2048]; size_t bufused; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, fmt); #else va_start(ap); #endif /* STDC_HEADERS */ bufused = vsnprintf(buf, sizeof(buf), fmt, ap); bufused += snprintfn(&buf[bufused], sizeof(buf) - bufused, ": %s (errno = %d)", strerror(errno), errno); slog(LOG_ERR, "%s", buf); /* LINTED expression has null effect */ va_end(ap); } #if SOCKS_SERVER sockdexit(-eval); #else exit(eval); #endif } void #ifdef STDC_HEADERS serrx(int eval, const char *fmt, ...) #else serrx(eval, fmt, va_alist) int eval; const char *fmt; va_dcl #endif /* STDC_HEADERS */ { if (fmt != NULL) { va_list ap; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, fmt); #else va_start(ap); #endif /* STDC_HEADERS */ vslog(LOG_ERR, fmt, ap); /* LINTED expression has null effect */ va_end(ap); } #if SOCKS_SERVER sockdexit(-eval); #else exit(eval); #endif } void #ifdef STDC_HEADERS swarn(const char *fmt, ...) #else swarn(fmt, va_alist) const char *fmt; va_dcl #endif /* STDC_HEADERS */ { if (fmt != NULL) { va_list ap; char buf[2048]; size_t bufused; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, fmt); #else va_start(ap); #endif /* STDC_HEADERS */ bufused = vsnprintf(buf, sizeof(buf), fmt, ap); bufused += snprintfn(&buf[bufused], sizeof(buf) - bufused, ": %s (errno = %d)", strerror(errno), errno); slog(LOG_ERR, "%s", buf); /* LINTED expression has null effect */ va_end(ap); } } void #ifdef STDC_HEADERS swarnx(const char *fmt, ...) #else swarnx(fmt, va_alist) const char *fmt; va_dcl #endif /* STDC_HEADERS */ { if (fmt != NULL) { va_list ap; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, fmt); #else va_start(ap); #endif /* STDC_HEADERS */ vslog(LOG_ERR, fmt, ap); /* LINTED expression has null effect */ va_end(ap); } } dante-1.1.19.dfsg/lib/authneg.c0000655000175000017500000001075210324735543014660 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: authneg.c,v 1.59 2005/10/13 12:17:17 michaels Exp $"; int negotiate_method(s, packet) int s; struct socks_t *packet; { const char *function = "negotiate_method()"; unsigned char *name = NULL, *password = NULL; int rc; unsigned char request[ 1 /* version */ + 1 /* number of methods. */ + AUTHMETHOD_MAX /* the methods. */ ]; size_t requestlen = 0; unsigned char response[ 1 /* version. */ + 1 /* selected method. */ ]; SASSERTX(packet->gw.state.methodc > 0); /* create request packet. */ request[requestlen++] = packet->req.version; if (packet->auth.method != AUTHMETHOD_NOTSET) { /* authmethod already fixed. */ request[requestlen++] = (unsigned char)1; request[requestlen++] = (unsigned char)packet->auth.method; switch (packet->auth.method) { case AUTHMETHOD_UNAME: name = packet->auth.mdata.uname.name; password = packet->auth.mdata.uname.password; break; } } else { request[requestlen++] = (unsigned char)packet->gw.state.methodc; for (rc = 0; rc < (int)packet->gw.state.methodc; ++rc) request[requestlen++] = (unsigned char)packet->gw.state.methodv[rc]; } /* send list over methods we support */ if (writen(s, request, requestlen, &packet->auth) != (ssize_t)requestlen) return -1; /* read servers response for method it wants to use */ if ((rc = readn(s, response, sizeof(response), &packet->auth)) != sizeof(response)){ swarn("%s: readn(), %d out of %d", function,rc, sizeof(response)); return -1; } if (request[AUTH_VERSION] != response[AUTH_VERSION]) { swarnx("%s: got replyversion %d, expected %d", function, response[AUTH_VERSION], request[AUTH_VERSION]); errno = ECONNREFUSED; return -1; } packet->version = request[AUTH_VERSION]; packet->auth.method = response[AUTH_METHOD]; switch (packet->auth.method) { case AUTHMETHOD_NONE: rc = 0; break; case AUTHMETHOD_UNAME: if (clientmethod_uname(s, &packet->gw.host, packet->req.version, name, password) == 0) rc = 0; else rc = -1; break; case AUTHMETHOD_NOACCEPT: swarnx("%s: server accepted no authentication method", function); rc = -1; break; default: swarnx("%s: server selected method not offered: %d", function, response[AUTH_METHOD]); rc = -1; } if (rc == 0) { slog(LOG_DEBUG, "%s: established socks v%d connection using authentication method %d", function, packet->version, packet->auth.method); } else errno = ECONNREFUSED; return rc; } dante-1.1.19.dfsg/lib/util.c0000644000175000017500000005224410355500545014176 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" /* XXX */ #if HAVE_STRVIS #include #else #include "compat.h" #endif /* HAVE_STRVIS */ static const char rcsid[] = "$Id: util.c,v 1.138 2005/11/01 14:26:20 michaels Exp $"; /* fake "ip address", for clients without DNS access. */ static char **ipv; static in_addr_t ipc; const char * strcheck(string) const char *string; { return string == NULL ? NOMEM : string; } unsigned char sockscode(version, code) int version; int code; { switch (version) { case SOCKS_V4: case SOCKS_V4REPLY_VERSION: switch (code) { case SOCKS_SUCCESS: return SOCKSV4_SUCCESS; default: return SOCKSV4_FAIL; /* v4 is not very specific. */ } /* NOTREACHED */ case SOCKS_V5: switch (code) { default: return (unsigned char)code; /* current codes are all V5. */ } /* NOTREACHED */ case MSPROXY_V2: switch (code) { case SOCKS_SUCCESS: return MSPROXY_SUCCESS; case SOCKS_FAILURE: return MSPROXY_FAILURE; default: SERRX(code); } /* NOTREACHED */ case HTTP_V1_0: switch (code) { case SOCKS_SUCCESS: return HTTP_SUCCESS; case SOCKS_FAILURE: /* LINTED constant argument to NOT */ return !HTTP_SUCCESS; default: SERRX(code); } /* NOTREACHED */ default: SERRX(version); } /* NOTREACHED */ } unsigned char errno2reply(errnum, version) int errnum; int version; { switch (errnum) { case ENETUNREACH: return sockscode(version, SOCKS_NETUNREACH); case EHOSTUNREACH: return sockscode(version, SOCKS_HOSTUNREACH); case ECONNREFUSED: return sockscode(version, SOCKS_CONNREFUSED); case ETIMEDOUT: return sockscode(version, SOCKS_TTLEXPIRED); } return sockscode(version, SOCKS_FAILURE); } struct sockaddr * sockshost2sockaddr(host, addr) const struct sockshost_t *host; struct sockaddr *addr; { const char *function = "sockshost2sockaddr()"; uint8_t sa_length; bzero(addr, sizeof(*addr)); switch (host->atype) { case SOCKS_ADDR_IPV4: addr->sa_family = AF_INET; sa_length = sizeof(struct sockaddr_in); /* LINTED pointer casts may be troublesome */ TOIN(addr)->sin_addr = host->addr.ipv4; break; case SOCKS_ADDR_DOMAIN: { struct hostent *hostent; addr->sa_family = AF_INET; sa_length = sizeof(struct sockaddr_in); if ((hostent = gethostbyname(host->addr.domain)) == NULL || hostent->h_addr_list == NULL) { /* LINTED pointer casts may be troublesome */ swarnx("%s: gethostbyname(%s): %s", function, host->addr.domain, hstrerror(h_errno)); /* LINTED pointer casts may be troublesome */ TOIN(addr)->sin_addr.s_addr = htonl(INADDR_ANY); break; } /* LINTED pointer casts may be troublesome */ TOIN(addr)->sin_addr = *(struct in_addr *)(*hostent->h_addr_list); break; } default: SERRX(host->atype); } #if HAVE_SOCKADDR_SA_LEN addr->sa_len = sa_length; #endif /* LINTED pointer casts may be troublesome */ TOIN(addr)->sin_port = host->port; return addr; } struct sockaddr * fakesockshost2sockaddr(host, addr) const struct sockshost_t *host; struct sockaddr *addr; { const char *function = "fakesockshost2sockaddr()"; char string[MAXSOCKSHOSTSTRING]; uint8_t sa_length; #if SOCKS_CLIENT /* may be called before normal init, log to right place. */ clientinit(); #endif slog(LOG_DEBUG, "%s: %s", function, sockshost2string(host, string, sizeof(string))); bzero(addr, sizeof(*addr)); switch (host->atype) { case SOCKS_ADDR_DOMAIN: addr->sa_family = AF_INET; sa_length = sizeof(struct sockaddr_in); /* LINTED pointer casts may be troublesome */ if (socks_getfakeip(host->addr.domain, &TOIN(addr)->sin_addr)) break; /* else; */ /* FALLTHROUGH */ default: return sockshost2sockaddr(host, addr); } #if HAVE_SOCKADDR_SA_LEN addr->sa_len = sa_length; #endif /* LINTED pointer casts may be troublesome */ TOIN(addr)->sin_port = host->port; return addr; } struct sockshost_t * sockaddr2sockshost(addr, host) const struct sockaddr *addr; struct sockshost_t *host; { switch (addr->sa_family) { case AF_INET: host->atype = SOCKS_ADDR_IPV4; /* LINTED pointer casts may be troublesome */ host->addr.ipv4 = TOCIN(addr)->sin_addr; /* LINTED pointer casts may be troublesome */ host->port = TOCIN(addr)->sin_port; break; default: SERRX(addr->sa_family); } return host; } struct sockshost_t * ruleaddress2sockshost(address, host, protocol) const struct ruleaddress_t *address; struct sockshost_t *host; int protocol; { switch (host->atype = address->atype) { case SOCKS_ADDR_IPV4: host->addr.ipv4 = address->addr.ipv4.ip; break; case SOCKS_ADDR_DOMAIN: SASSERTX(strlen(address->addr.domain) < sizeof(host->addr.domain)); strcpy(host->addr.domain, address->addr.domain); break; default: SERRX(address->atype); } switch (protocol) { case SOCKS_TCP: host->port = address->port.tcp; break; case SOCKS_UDP: host->port = address->port.udp; break; default: SERRX(protocol); } return host; } struct ruleaddress_t * sockshost2ruleaddress(host, addr) const struct sockshost_t *host; struct ruleaddress_t *addr; { switch (addr->atype = host->atype) { case SOCKS_ADDR_IPV4: addr->addr.ipv4.ip = host->addr.ipv4; addr->addr.ipv4.mask.s_addr = htonl(0xffffffff); break; case SOCKS_ADDR_DOMAIN: SASSERTX(strlen(host->addr.domain) < sizeof(addr->addr.domain)); strcpy(addr->addr.domain, host->addr.domain); break; default: SERRX(host->atype); } addr->port.tcp = host->port; addr->port.udp = host->port; addr->portend = host->port; if (host->port == htons(0)) addr->operator = none; else addr->operator = eq; return addr; } struct ruleaddress_t * sockaddr2ruleaddress(addr, ruleaddr) const struct sockaddr *addr; struct ruleaddress_t *ruleaddr; { struct sockshost_t host; sockaddr2sockshost(addr, &host); sockshost2ruleaddress(&host, ruleaddr); return ruleaddr; } struct sockaddr * hostname2sockaddr(name, index, addr) const char *name; int index; struct sockaddr *addr; { struct hostent *hostent; int i; if ((hostent = gethostbyname(name)) == NULL) return NULL; for (i = 0; hostent->h_addr_list[i] != NULL; ++i) if (i == index) { bzero(addr, sizeof(*addr)); addr->sa_family = (uint8_t)hostent->h_addrtype; #if HAVE_SOCKADDR_SA_LEN addr->sa_len = hostent->h_length; #endif /* HAVE_SOCKADDR_SA_LEN */ SASSERTX(addr->sa_family == AF_INET); /* LINTED pointer casts may be troublesome */ TOIN(addr)->sin_addr = *(struct in_addr *)hostent->h_addr_list[i]; /* LINTED pointer casts may be troublesome */ TOIN(addr)->sin_port = htons(0); return addr; } return NULL; } struct sockaddr * ifname2sockaddr(ifname, index, addr) const char *ifname; int index; struct sockaddr *addr; { int i; struct ifaddrs ifa, *ifap = &ifa, *iface; if (getifaddrs(&ifap) != 0) return NULL; for (iface = ifap, i = 0; i <= index && iface != NULL; iface = iface->ifa_next) if (strcmp(iface->ifa_name, ifname) == 0 && iface->ifa_addr != NULL && iface->ifa_addr->sa_family == AF_INET) { if (i++ != index) continue; *addr = *iface->ifa_addr; freeifaddrs(ifap); return addr; } freeifaddrs(ifap); return NULL; } in_addr_t socks_addfakeip(host) const char *host; { const char *function = "socks_addfakeip()"; char **tmpmem; struct in_addr addr; /* XXX mutex_lock */ if (socks_getfakeip(host, &addr) == 1) return addr.s_addr; #if FAKEIP_END < FAKEIP_START error "\"FAKEIP_END\" can't be smaller than \"FAKEIP_START\"" #endif if (ipc >= FAKEIP_END - FAKEIP_START) { swarnx("%s: fakeip range (%d - %d) exhausted", function, FAKEIP_START, FAKEIP_END); return INADDR_NONE; } if ((tmpmem = (char **)realloc(ipv, sizeof(*ipv) * (ipc + 1))) == NULL || (tmpmem[ipc] = (char *)malloc(sizeof(*tmpmem) * (strlen(host) + 1))) == NULL) { swarnx("%s: %s", function, NOMEM); return INADDR_NONE; } ipv = tmpmem; strcpy(ipv[ipc], host); /* XXX mutex_unlock */ return htonl(ipc++ + FAKEIP_START); } const char * socks_getfakehost(addr) in_addr_t addr; { if (ntohl(addr) - FAKEIP_START < ipc) return ipv[ntohl(addr) - FAKEIP_START]; return NULL; } int socks_getfakeip(host, addr) const char *host; struct in_addr *addr; { unsigned int i; for (i = 0; i < ipc; ++i) if (strcasecmp(host, ipv[i]) == 0) { addr->s_addr = htonl(i + FAKEIP_START); return 1; } return 0; } struct sockshost_t * fakesockaddr2sockshost(addr, host) const struct sockaddr *addr; struct sockshost_t *host; { const char *function = "fakesockaddr2sockshost()"; char string[MAXSOCKADDRSTRING]; #if SOCKS_CLIENT /* may be called before normal init, log to right place. */ clientinit(); #endif /* LINTED pointer casts may be troublesome */ slog(LOG_DEBUG, "%s: %s -> %s", function, sockaddr2string(addr, string, sizeof(string)), socks_getfakehost(TOCIN(addr)->sin_addr.s_addr) == NULL ? string : socks_getfakehost(TOCIN(addr)->sin_addr.s_addr)); /* LINTED pointer casts may be troublesome */ if (socks_getfakehost(TOCIN(addr)->sin_addr.s_addr) != NULL) { /* LINTED pointer casts may be troublesome */ const char *ipname = socks_getfakehost(TOCIN(addr)->sin_addr.s_addr); SASSERTX(ipname != NULL); host->atype = SOCKS_ADDR_DOMAIN; SASSERTX(strlen(ipname) < sizeof(host->addr.domain)); strcpy(host->addr.domain, ipname); /* LINTED pointer casts may be troublesome */ host->port = TOCIN(addr)->sin_port; } else sockaddr2sockshost(addr, host); return host; } int socks_logmatch(d, log) unsigned int d; const struct logtype_t *log; { size_t i; for (i = 0; i < log->fpc; ++i) if (d == (unsigned int)log->fplockv[i] || d == (unsigned int)fileno(log->fpv[i])) return 1; return 0; } int sockaddrareeq(a, b) const struct sockaddr *a; const struct sockaddr *b; { if (a->sa_family != b->sa_family) return 0; switch (a->sa_family) { case AF_INET: { /* LINTED pointer casts may be troublesome */ const struct sockaddr_in *in_a = TOCIN(a); /* LINTED pointer casts may be troublesome */ const struct sockaddr_in *in_b = TOCIN(b); if (in_a->sin_addr.s_addr != in_b->sin_addr.s_addr || in_a->sin_port != in_b->sin_port) return 0; return 1; } default: SERRX(a->sa_family); } /* NOTREACHED */ } int sockshostareeq(a, b) const struct sockshost_t *a; const struct sockshost_t *b; { if (a->atype != b->atype) return 0; switch (a->atype) { case SOCKS_ADDR_IPV4: if (memcmp(&a->addr.ipv4, &b->addr.ipv4, sizeof(a->addr.ipv4)) != 0) return 0; break; case SOCKS_ADDR_IPV6: if (memcmp(a->addr.ipv6, b->addr.ipv6, sizeof(a->addr.ipv6)) != 0) return 0; break; case SOCKS_ADDR_DOMAIN: if (strcmp(a->addr.domain, b->addr.domain) != 0) return 0; break; default: SERRX(a->atype); } if (a->port != b->port) return 0; return 1; } int fdsetop(nfds, op, a, b, result) int nfds; int op; const fd_set *a; const fd_set *b; fd_set *result; { int i, bits; FD_ZERO(result); bits = -1; switch (op) { case '&': for (i = 0; i < nfds; ++i) if (FD_ISSET(i, a) && FD_ISSET(i, b)) { FD_SET(i, result); bits = MAX(i, bits); } break; case '^': for (i = 0; i < nfds; ++i) if (FD_ISSET(i, a) != FD_ISSET(i, b)) { FD_SET(i, result); bits = MAX(i, bits); } break; default: SERRX(op); } return bits; } int methodisset(method, methodv, methodc) int method; const int *methodv; size_t methodc; { size_t i; for (i = 0; i < methodc; ++i) if (methodv[i] == method) return 1; return 0; } int socketoptdup(s) int s; { const char *function = "socketoptdup()"; unsigned int i; int flags, new_s, errno_s; socklen_t len; union { int int_val; struct linger linger_val; struct timeval timeval_val; struct in_addr in_addr_val; u_char u_char_val; struct sockaddr sockaddr_val; struct ipoption ipoption; } val; int levelname[][2] = { /* socket options */ #ifdef SO_BROADCAST { SOL_SOCKET, SO_BROADCAST }, #endif #ifdef SO_DEBUG { SOL_SOCKET, SO_DEBUG }, #endif #ifdef SO_DONTROUTE { SOL_SOCKET, SO_DONTROUTE }, #endif #ifdef SO_ERROR { SOL_SOCKET, SO_ERROR }, #endif #ifdef SO_KEEPALIVE { SOL_SOCKET, SO_KEEPALIVE }, #endif #ifdef SO_LINGER { SOL_SOCKET, SO_LINGER }, #endif #ifdef SO_OOBINLINE { SOL_SOCKET, SO_OOBINLINE }, #endif #ifdef SO_RCVBUF { SOL_SOCKET, SO_RCVBUF }, #endif #ifdef SO_SNDBUF { SOL_SOCKET, SO_SNDBUF }, #endif #if HAVE_SO_SNDLOWAT #ifdef SO_RCVLOWAT { SOL_SOCKET, SO_RCVLOWAT }, #endif #endif /* HAVE_SO_SNDLOWAT */ #if HAVE_SO_SNDLOWAT #ifdef SO_SNDLOWAT { SOL_SOCKET, SO_SNDLOWAT }, #endif #endif /* HAVE_SO_SNDLOWAT */ #ifdef SO_RCVTIMEO { SOL_SOCKET, SO_RCVTIMEO }, #endif #ifdef SO_SNDTIMEO { SOL_SOCKET, SO_SNDTIMEO }, #endif #ifdef SO_REUSEADDR { SOL_SOCKET, SO_REUSEADDR }, #endif #ifdef SO_REUSEPORT { SOL_SOCKET, SO_REUSEPORT }, #endif #ifdef SO_USELOOPBACK { SOL_SOCKET, SO_USELOOPBACK }, #endif /* IP options */ #ifdef IP_HDRINCL { IPPROTO_IP, IP_HDRINCL }, #endif #ifdef IP_OPTIONS { IPPROTO_IP, IP_OPTIONS }, #endif #ifdef IP_RECVDSTADDR { IPPROTO_IP, IP_RECVDSTADDR }, #endif #ifdef IP_RECVIF { IPPROTO_IP, IP_RECVIF }, #endif #ifdef IP_TOS { IPPROTO_IP, IP_TOS }, #endif #ifdef IP_TTL { IPPROTO_IP, IP_TTL }, #endif #ifdef IP_MULTICAST_IF { IPPROTO_IP, IP_MULTICAST_IF }, #endif #ifdef IP_MULTICAST_TTL { IPPROTO_IP, IP_MULTICAST_TTL }, #endif #ifdef IP_MULTICAST_LOOP { IPPROTO_IP, IP_MULTICAST_LOOP }, #endif /* TCP options */ #ifdef TCP_KEEPALIVE { IPPROTO_TCP, TCP_KEEPALIVE }, #endif #ifdef TCP_MAXRT { IPPROTO_TCP, TCP_MAXRT }, #endif #ifdef TCP_MAXSEG { IPPROTO_TCP, TCP_MAXSEG }, #endif #ifdef TCP_NODELAY { IPPROTO_TCP, TCP_NODELAY }, #endif #ifdef TCP_STDURG { IPPROTO_TCP, TCP_STDURG } #endif }; errno_s = errno; len = sizeof(val); if (getsockopt(s, SOL_SOCKET, SO_TYPE, &val, &len) == -1) { swarn("%s: getsockopt(SO_TYPE)", function); return -1; } if ((new_s = socket(AF_INET, val.int_val, 0)) == -1) { swarn("%s: socket(AF_INET, %d)", function, val.int_val); return -1; } for (i = 0; i < ELEMENTS(levelname); ++i) { len = sizeof(val); if (getsockopt(s, levelname[i][0], levelname[i][1], &val, &len) == -1) { if (errno != ENOPROTOOPT) swarn("%s: getsockopt(%d, %d)", function, levelname[i][0], levelname[i][1]); continue; } if (setsockopt(new_s, levelname[i][0], levelname[i][1], &val, len) == -1) if (errno != ENOPROTOOPT) swarn("%s: setsockopt(%d, %d)", function, levelname[i][0], levelname[i][1]); } if ((flags = fcntl(s, F_GETFL, 0)) == -1 || fcntl(new_s, F_SETFL, flags) == -1) swarn("%s: fcntl(F_GETFL/F_SETFL)", function); #if SOCKS_SERVER && HAVE_LIBWRAP if ((s = fcntl(new_s, F_GETFD, 0)) == -1 || fcntl(new_s, F_SETFD, s | FD_CLOEXEC) == -1) swarn("%s: fcntl(F_GETFD/F_SETFD)", function); #endif errno = errno_s; return new_s; } char * str2vis(string, len) const char *string; size_t len; { const int visflag = VIS_TAB | VIS_NL | VIS_CSTYLE | VIS_OCTAL; char *visstring; /* see vis(3) for "* 4" */ if ((visstring = (char *)malloc((sizeof(*visstring) * len * 4) + 1)) != NULL) strvisx(visstring, string, len, visflag); return visstring; } int socks_mklock(template) const char *template; { const char *function = "socks_mklock()"; char *prefix, *newtemplate; int s; size_t len; #if SOCKS_SERVER && HAVE_LIBWRAP int flag; #endif if ((prefix = getenv("TMPDIR")) != NULL) if (*prefix == NUL) prefix = NULL; if (prefix == NULL) prefix = "/tmp"; len = strlen(prefix) + strlen("/") + strlen(template) + 1; if ((newtemplate = (char *)malloc(sizeof(*newtemplate) * len)) == NULL) return -1; snprintfn(newtemplate, len, "%s/%s", prefix, template); if ((s = mkstemp(newtemplate)) == -1) { swarn("%s: mkstemp(%s)", function, newtemplate); free(newtemplate); return -1; } if (unlink(newtemplate) == -1) { swarn("%s: unlink(%s)", function, newtemplate); free(newtemplate); return -1; } free(newtemplate); #if SOCKS_SERVER && HAVE_LIBWRAP if ((flag = fcntl(s, F_GETFD, 0)) == -1 || fcntl(s, F_SETFD, flag | FD_CLOEXEC) == -1) swarn("%s: fcntl(F_GETFD/F_SETFD)", function); #endif return s; } int socks_lock(descriptor, type, timeout) int descriptor; int type; int timeout; { const char *function = "socks_lock()"; struct flock lock; int rc; /* slog(LOG_DEBUG, "%s: %d", function, descriptor); */ SASSERTX(timeout <= 0); lock.l_type = (short)type; lock.l_start = 0; lock.l_whence = SEEK_SET; lock.l_len = 0; #if 0 /* missing some bits here to handle racecondition. */ if (timeout > 0) { struct sigaction sigact; #if SOCKS_CLIENT if (sigaction(SIGALRM, NULL, &sigact) != 0) return -1; /* if handler already set for signal, don't override. */ if (sigact.sa_handler == SIG_DFL || sigact.sa_handler == SIG_IGN) { #else /* !SOCKS_CLIENT */ /* CONSTCOND */ if (1) { #endif /* !SOCKS_CLIENT */ sigemptyset(&sigact.sa_mask); sigact.sa_flags = 0; sigact.sa_handler = SIG_IGN; if (sigaction(SIGALRM, &sigact, NULL) != 0) return -1; } alarm((unsigned int)timeout); } #endif retry: do rc = fcntl(descriptor, timeout ? F_SETLKW : F_SETLK, &lock); while (rc == -1 && timeout == -1 && errno == EINTR); if (rc == -1) switch (errno) { case EACCES: case EAGAIN: case EINTR: break; case ENOLCK: swarn("%s: fcntl()", function); sleep(1); goto retry; /* don't exhaust the stack by calling socks_lock(). */ default: SERR(descriptor); } #if 0 if (timeout > 0) alarm(0); #endif if (rc != 0 && timeout == -1) abort(); return rc == -1 ? rc : 0; } void socks_unlock(d) int d; { const char *function = "socks_unlock()"; /* slog(LOG_DEBUG, "%s: %d", function, d); */ socks_lock(d, F_UNLCK, -1); } int socks_socketisbound(s) int s; { struct sockaddr_in addr; socklen_t len; len = sizeof(addr); /* LINTED pointer casts may be troublesome */ if (getsockname(s, (struct sockaddr *)&addr, &len) != 0) return -1; return ADDRISBOUND(addr); } int freedescriptors(message) const char *message; { const int errno_s = errno; int i, freed, max; /* LINTED expression has null effect */ for (freed = 0, i = 0, max = getdtablesize(); i < max; ++i) if (!fdisopen(i)) ++freed; if (message != NULL) slog(LOG_DEBUG, "freedescriptors(%s): %d/%d", message, freed, max); errno = errno_s; return freed; } int fdisopen(fd) int fd; { return fcntl(fd, F_GETFD, 0) != -1; } void closev(array, count) int *array; int count; { for (--count; count >= 0; --count) if (array[count] >= 0) if (close(array[count]) != 0) SERR(-1); } int #ifdef STDC_HEADERS snprintfn(char *str, size_t size, const char *format, ...) #else snprintfn(str, size, format, va_alist char *str; size_t size; const char *format; va_dcl #endif { va_list ap; int rc; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, format); #else va_start(ap); #endif /* STDC_HEADERS */ rc = vsnprintf(str, size, format, ap); /* LINTED expression has null effect */ va_end(ap); if (rc == -1) { *str = NUL; return 0; } return MIN(rc, (int)(size - 1)); } /* * Posted by Kien Ha (Kien_Ha@Mitel.COM) in comp.lang.c once upon a * time. */ int bitcount(number) unsigned long number; { int bitsset; for (bitsset = 0; number > 0; number >>= 1) if (number & 1) ++bitsset; return bitsset; } dante-1.1.19.dfsg/lib/Rrresvport.c0000754000175000017500000000522707700305324015410 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: Rrresvport.c,v 1.23 2003/07/01 13:21:24 michaels Exp $"; /* * Note that for this function to work the remote socksserver is required * to be using the bind extension. */ int Rrresvport(port) int *port; { const char *function = "Rrresvport()"; int s; struct sockaddr name; socklen_t namelen; clientinit(); slog(LOG_DEBUG, "%s", function); if ((s = rresvport(port)) == -1) return -1; namelen = sizeof(name); if (getsockname(s, &name, &namelen) != 0) { close(s); return -1; } /* Rbind() will accept failure at binding socket that is already bound. */ if (Rbind(s, &name, namelen) != 0) { close(s); return -1; } return s; } dante-1.1.19.dfsg/lib/hostcache.c0000755000175000017500000002337407700305331015163 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: hostcache.c,v 1.24 2003/07/01 13:21:29 michaels Exp $"; __BEGIN_DECLS #if SOCKS_SERVER #undef gethostbyaddr #undef gethostbyname #if SOCKSLIBRARY_DYNAMIC #define gethostbyaddr(addr, len, type) sys_gethostbyaddr(addr, len, type) #define gethostbyname(name) sys_gethostbyname(name) #endif /* SOCKSLIBRARY_DYNAMIC */ static struct hostent * hostentupdate __P((struct hostent *old, const struct hostent *new)); /* * Updates "old" with the contents of "new", freeing any * resources currently used by "old". * Returns: * On success: "old", updated. * On failure: NULL. */ static int hosthash __P((const char *name, size_t size)); /* * Calculates a hashvalue for "name" and returns it's value. * Size of hashtable is given by "size". */ static int addrhash __P((in_addr_t addr, size_t size)); /* * Calculates a hashvalue for "addr" and returns it's value. * Size of hashtable is given by "size". */ #endif /* SOCKS_SERVER */ static char ** listrealloc __P((char ***old, const char ***new, int length)); /* * Reallocates "old" and copies in the contents of "new". * The last element of both "old" and "new" must be NULL. * If "length" is less than 0, each element is assumed to * be NUL terminated, otherwise "length" gives the total length * of every string. * Returns: * On success: "**old", with the contents of "new". * On failure: NULL. */ __END_DECLS struct hostent * hostentdup(hostent) const struct hostent *hostent; { static struct hostent dupedinit; struct hostent *duped; if ((duped = (struct hostent *)malloc(sizeof(*duped))) == NULL) return NULL; *duped = dupedinit; if ((duped->h_name = strdup(hostent->h_name)) == NULL) { hostentfree(duped); return NULL; } if (listrealloc(&duped->h_aliases, (const char ***)&hostent->h_aliases, -1) == NULL) { hostentfree(duped); return NULL; } duped->h_addrtype = hostent->h_addrtype; duped->h_length = hostent->h_length; if (listrealloc(&duped->h_addr_list, (const char ***)&hostent->h_addr_list, hostent->h_length) == NULL) { hostentfree(duped); return NULL; } return duped; } void hostentfree(hostent) struct hostent *hostent; { char **p; if (hostent == NULL) return; free(hostent->h_name); hostent->h_name = NULL; if (hostent->h_aliases != NULL) for (p = hostent->h_aliases; *p != NULL; ++p) free(*p); free(hostent->h_aliases); hostent->h_aliases = NULL; if (hostent->h_addr_list != NULL) for (p = hostent->h_addr_list; *p != NULL; ++p) free(*p); free(hostent->h_addr_list); hostent->h_addr_list = NULL; free(hostent); } static char ** listrealloc(old, new, length) char ***old; const char ***new; int length; { int i, oldi, newi; /* entries we can reallocate, starting at 0. */ oldi = 0; if (*old != NULL) while ((*old)[oldi] != NULL) ++oldi; newi = 0; while ((*new)[newi] != NULL) ++newi; for (i = newi; i < oldi; ++i) free((*old)[i]); if ((*old = (char **)realloc(*old, sizeof(**new) * (newi + 1))) == NULL) return NULL; for (newi = 0; (*new)[newi] != NULL; ++newi, --oldi) { if (((*old)[newi] = (char *)realloc(oldi > 0 ? (*old)[newi] : NULL, length < 0 ? (strlen((*new)[newi]) + 1) : length)) == NULL) return NULL; if (length < 0) strcpy((*old)[newi], (*new)[newi]); else memcpy((*old)[newi], (*new)[newi], (size_t)length); } (*old)[newi] = NULL; return *old; } #if SOCKS_SERVER struct hostent * cgethostbyname(name) const char *name; { const char *function = "cgethostbyname()"; static struct { unsigned allocated:1; char host[MAXHOSTNAMELEN]; time_t written; struct hostent hostent; } table[SOCKD_HOSTCACHE], *freehost; static unsigned int hit, miss, count; const time_t timenow = time(NULL); const int hashi = hosthash(name, ELEMENTS(table)); size_t i; struct hostent *hostent; #if SOCKD_CACHESTAT if (++count % SOCKD_CACHESTAT == 0) slog(LOG_INFO, "%s: hit: %d, miss: %d", function, hit, miss); #endif /* SOCKD_CACHESTAT */ for (i = hashi, freehost = NULL; i < ELEMENTS(table); ++i) { if (!table[i].allocated) { if (freehost == NULL) freehost = &table[i]; continue; } if (strcasecmp(table[i].host, name) == 0) { if (difftime(timenow, table[i].written) >= SOCKD_CACHETIMEOUT) { freehost = &table[i]; break; } ++hit; return &table[i].hostent; } } ++miss; if ((hostent = gethostbyname(name)) == NULL) return NULL; if (freehost == NULL) for (i = hashi, freehost = &table[i]; i < ELEMENTS(table); ++i) { if (difftime(timenow, table[i].written) >= SOCKD_CACHETIMEOUT) { freehost = &table[i]; break; } if (freehost->written < table[i].written) { freehost = &table[i]; /* oldest. */ break; } } if (hostentupdate(&freehost->hostent, hostent) == NULL) { freehost->allocated = 0; slog(LOG_WARNING, "%s: %s", NOMEM, function); return NULL; } SASSERTX(strlen(name) < sizeof(freehost->host)); strcpy(freehost->host, name); time(&freehost->written); freehost->allocated = 1; return &freehost->hostent; } struct hostent * cgethostbyaddr(addr, len, type) const char *addr; int len; int type; { const char *function = "cgethostbyaddr()"; static struct { unsigned allocated:1; in_addr_t addr; time_t written; struct hostent hostent; } table[SOCKD_ADDRESSCACHE], *freehost; static unsigned long int hit, miss, count; const time_t timenow = time(NULL); /* LINTED pointer casts may be troublesome */ const int hashi = addrhash(((const struct in_addr *)addr)->s_addr, ELEMENTS(table)); size_t i; struct hostent *hostent; #if SOCKD_CACHESTAT if (++count % SOCKD_CACHESTAT == 0) slog(LOG_INFO, "%s: hit: %d, miss: %d", function, hit, miss); #endif /* SOCKD_CACHESTAT */ for (i = hashi, freehost = NULL; i < ELEMENTS(table); ++i) { if (!table[i].allocated) { if (freehost == NULL) freehost = &table[i]; continue; } /* LINTED pointer casts may be troublesome */ if (table[i].addr == ((const struct in_addr *)addr)->s_addr) { if (difftime(timenow, table[i].written) >= SOCKD_CACHETIMEOUT) { freehost = &table[i]; break; } ++hit; return &table[i].hostent; } } ++miss; if ((hostent = gethostbyaddr(addr, len, type)) == NULL) return NULL; if (freehost == NULL) for (i = hashi, freehost = &table[i]; i < ELEMENTS(table); ++i) { if (difftime(timenow, table[i].written) >= SOCKD_CACHETIMEOUT) { freehost = &table[i]; break; } if (freehost->written < table[i].written) { freehost = &table[i]; /* oldest. */ break; } } if (hostentupdate(&freehost->hostent, hostent) == NULL) { freehost->allocated = 0; slog(LOG_WARNING, "%s: %s", NOMEM, function); return NULL; } /* LINTED pointer casts may be troublesome */ freehost->addr = ((const struct in_addr *)addr)->s_addr; time(&freehost->written); freehost->allocated = 1; return &freehost->hostent; } static int hosthash(name, size) const char *name; size_t size; { char *end; unsigned int value; /* end at second dot. */ if ((end = strchr(name, '.')) != NULL) end = strchr(end, '.'); if (end == NULL) end = strchr(name, NUL); SASSERTX(name <= end); value = 0; while (name != end) value = (value << 5) + *name++; /* MAW - DS&A: Horner's rule. */ return value % size; } static int addrhash(addr, size) in_addr_t addr; size_t size; { return addr % size; } static struct hostent * hostentupdate(old, new) struct hostent *old; const struct hostent *new; { if ((old->h_name = (char *)realloc(old->h_name, strlen(new->h_name) + 1)) == NULL) return NULL; strcpy(old->h_name, new->h_name); if (listrealloc(&old->h_aliases, (const char ***)&new->h_aliases, -1) == NULL) return NULL; old->h_addrtype = new->h_addrtype; old->h_length = new->h_length; if (listrealloc(&old->h_addr_list, (const char ***)&new->h_addr_list, new->h_length) == NULL) return NULL; return old; } #endif /* SOCKS_SERVER */ dante-1.1.19.dfsg/lib/userio.c0000644000175000017500000000717007700305335014525 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: userio.c,v 1.23 2003/07/01 13:21:33 michaels Exp $"; /* ARGSUSED */ char * socks_getusername(host, buf, buflen) const struct sockshost_t *host; char *buf; size_t buflen; { const char *function = "socks_getusername()"; char *name; if ((name = getenv("SOCKS_USERNAME")) != NULL || (name = getenv("SOCKS_USER")) != NULL || (name = getenv("SOCKS5_USER")) != NULL) ; else if ((name = getlogin()) != NULL) ; else { struct passwd *pw; if ((pw = getpwuid(getuid())) != NULL) name = pw->pw_name; } if (name == NULL) return NULL; if (strlen(name) >= buflen) { swarnx("%s: socks username %d characters too long, truncated", function, (strlen(name) + 1) - buflen); name[buflen - 1] = NUL; } strcpy(buf, name); return buf; } char * socks_getpassword(host, user, buf, buflen) const struct sockshost_t *host; const char *user; char *buf; size_t buflen; { const char *function = "socks_getpassword()"; char *password; if ((password = getenv("SOCKS_PASSWORD")) != NULL || (password = getenv("SOCKS_PASSWD")) != NULL || (password = getenv("SOCKS5_PASSWD")) != NULL) ; else { char prompt[256 + MAXSOCKSHOSTSTRING]; char hstring[MAXSOCKSHOSTSTRING]; snprintfn(prompt, sizeof(prompt), "%s@%s sockspassword: ", user, sockshost2string(host, hstring, sizeof(hstring))); password = getpass(prompt); } if (password == NULL) return NULL; if (strlen(password) >= buflen) { swarnx("%s: socks password %d characters too long, truncated", function, (strlen(password) + 1) - buflen); password[buflen - 1] = NUL; } strcpy(buf, password); bzero(password, strlen(password)); return buf; } dante-1.1.19.dfsg/lib/clientprotocol.c0000644000175000017500000003632410354742704016266 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: clientprotocol.c,v 1.51 2005/12/28 18:22:41 michaels Exp $"; static int recv_sockshost __P((int s, struct sockshost_t *host, int version, struct authmethod_t *auth)); /* * Fills "host" based on data read from "s". "version" is the version * the remote peer is expected to send data in. * * Returns: * On success: 0 * On failure: -1 */ int socks_sendrequest(s, request) int s; const struct request_t *request; { const char *function = "socks_sendrequest()"; unsigned char requestmem[sizeof(*request)]; unsigned char *p = requestmem; switch (request->version) { case SOCKS_V4: /* * VN CD DSTPORT DSTIP USERID 0 * 1 + 1 + 2 + 4 + ? + 1 = 9 + USERID */ /* VN */ memcpy(p, &request->version, sizeof(request->version)); p += sizeof(request->version); /* CD */ memcpy(p, &request->command, sizeof(request->command)); p += sizeof(request->command); p = sockshost2mem(&request->host, p, request->version); *p++ = 0; /* not bothering to send any userid. Should we? */ break; /* SOCKS_V4 */ case SOCKS_V5: /* * rfc1928 request: * * +----+-----+-------+------+----------+----------+ * |VER | CMD | FLAG | ATYP | DST.ADDR | DST.PORT | * +----+-----+-------+------+----------+----------+ * | 1 | 1 | 1 | 1 | Variable | 2 | * +----+-----+-------+------+----------+----------+ * 1 1 1 1 > 0 2 * * Which gives a fixed size of minimum 7 octets. * The first octet of DST.ADDR when it is SOCKS_ADDR_DOMAINNAME * contains the length of DST.ADDR. */ /* VER */ memcpy(p, &request->version, sizeof(request->version)); p += sizeof(request->version); /* CMD */ memcpy(p, &request->command, sizeof(request->command)); p += sizeof(request->command); /* FLAG */ memcpy(p, &request->flag, sizeof(request->flag)); p += sizeof(request->flag); p = sockshost2mem(&request->host, p, request->version); break; default: SERRX(request->version); } slog(LOG_DEBUG, "%s: sending request: %s", function, socks_packet2string(request, SOCKS_REQUEST)); /* * Send the request to the server. */ if (writen(s, requestmem, (size_t)(p - requestmem), request->auth) != p - requestmem) { swarn("%s: writen()", function); return -1; } return 0; } int socks_recvresponse(s, response, version) int s; struct response_t *response; int version; { const char *function = "socks_recvresponse()"; /* get the versionspecific data. */ switch (version) { case SOCKS_V4: { /* * The socks V4 reply length is fixed: * VN CD DSTPORT DSTIP * 1 + 1 + 2 + 4 */ char responsemem[ sizeof(response->version) + sizeof(response->reply) ]; char *p = responsemem; if (readn(s, responsemem, sizeof(responsemem), response->auth) != sizeof(responsemem)) { swarn("%s: readn()", function); return -1; } /* VN */ memcpy(&response->version, p, sizeof(response->version)); p += sizeof(response->version); if (response->version != SOCKS_V4REPLY_VERSION) { swarnx("%s: unexpected version from server (%d != %d)", function, response->version, SOCKS_V4REPLY_VERSION); return -1; } /* CD */ memcpy(&response->reply, p, sizeof(response->reply)); p += sizeof(response->reply); break; } case SOCKS_V5: { /* * rfc1928 reply: * * +----+-----+-------+------+----------+----------+ * |VER | REP | FLAG | ATYP | BND.ADDR | BND.PORT | * +----+-----+-------+------+----------+----------+ * | 1 | 1 | 1 | 1 | > 0 | 2 | * +----+-----+-------+------+----------+----------+ * * Which gives a size of >= 7 octets. * */ char responsemem[sizeof(response->version) + sizeof(response->reply) + sizeof(response->flag) ]; char *p = responsemem; if (readn(s, responsemem, sizeof(responsemem), response->auth) != sizeof(responsemem)) { swarn("%s: readn()", function); return -1; } /* VER */ memcpy(&response->version, p, sizeof(response->version)); p += sizeof(response->version); if (version != response->version) { swarnx("%s: unexpected version from server (%d != %d)", function, version, response->version); return -1; } /* REP */ memcpy(&response->reply, p, sizeof(response->reply)); p += sizeof(response->reply); /* FLAG */ memcpy(&response->flag, p, sizeof(response->flag)); p += sizeof(response->flag); break; } default: SERRX(version); } if (recv_sockshost(s, &response->host, version, response->auth) != 0) return -1; slog(LOG_DEBUG, "%s: received response: %s", function, socks_packet2string(response, SOCKS_RESPONSE)); return 0; } /* ARGSUSED */ int socks_negotiate(s, control, packet, route) int s; int control; struct socks_t *packet; struct route_t *route; { switch (packet->req.version) { case SOCKS_V5: if (negotiate_method(control, packet) != 0) return -1; /* FALLTHROUGH */ /* rest is like v4, which doesn't have method. */ case SOCKS_V4: packet->req.auth = &packet->auth; packet->res.auth = &packet->auth; if (socks_sendrequest(control, &packet->req) != 0) return -1; if (socks_recvresponse(control, &packet->res, packet->req.version) != 0) return -1; break; #if SOCKS_CLIENT case MSPROXY_V2: if (msproxy_negotiate(s, control, packet) != 0) return -1; break; #endif case HTTP_V1_0: if (httpproxy_negotiate(control, packet) != 0) return -1; break; default: SERRX(packet->req.version); } if (!serverreplyisok(packet->res.version, packet->res.reply, route)) return -1; return 0; } static int recv_sockshost(s, host, version, auth) int s; struct sockshost_t *host; int version; struct authmethod_t *auth; { const char *function = "recv_sockshost()"; switch (version) { case SOCKS_V4: case SOCKS_V4REPLY_VERSION: { /* * DSTPORT DSTIP * 2 + 4 */ char hostmem[ sizeof(host->port) + sizeof(host->addr.ipv4) ]; char *p = hostmem; if (readn(s, hostmem, sizeof(hostmem), auth) != sizeof(hostmem)) { swarn("%s: readn()", function); return -1; } host->atype = SOCKS_ADDR_IPV4; /* BND.PORT */ memcpy(&host->port, p, sizeof(host->port)); p += sizeof(host->port); /* BND.ADDR */ memcpy(&host->addr.ipv4, p, sizeof(host->addr.ipv4)); p += sizeof(host->addr.ipv4); break; } case SOCKS_V5: /* * +------+----------+----------+ * | ATYP | BND.ADDR | BND.PORT | * +------+----------+----------+ * | 1 | > 0 | 2 | * +------+----------+----------+ */ /* ATYP */ if (readn(s, &host->atype, sizeof(host->atype), auth) != sizeof(host->atype)) return -1; switch(host->atype) { case SOCKS_ADDR_IPV4: if (readn(s, &host->addr.ipv4, sizeof(host->addr.ipv4), auth) != sizeof(host->addr.ipv4)) { swarn("%s: readn()", function); return -1; } break; case SOCKS_ADDR_IPV6: if (readn(s, host->addr.ipv6, sizeof(host->addr.ipv6), auth) != sizeof(host->addr.ipv6)) { swarn("%s: readn()", function); return -1; } break; case SOCKS_ADDR_DOMAIN: { unsigned char alen; /* read length of domainname. */ if (readn(s, &alen, sizeof(alen), auth) < (ssize_t)sizeof(alen)) return -1; OCTETIFY(alen); #if MAXHOSTNAMELEN < 0xff SASSERTX(alen < sizeof(host->addr.domain)); #endif /* BND.ADDR, alen octets */ if (readn(s, host->addr.domain, (size_t)alen, auth) != (ssize_t)alen) { swarn("%s: readn()", function); return -1; } host->addr.domain[alen] = NUL; break; } default: swarnx("%s: unsupported address format %d in reply", function, host->atype); return -1; } /* BND.PORT */ if (readn(s, &host->port, sizeof(host->port), auth) != sizeof(host->port)) return -1; break; } return 0; } int serverreplyisok(version, reply, route) int version; int reply; struct route_t *route; { const char *function = "serverreplyisok()"; slog(LOG_DEBUG, "%s: version %d, reply %d", function, version, reply); switch (version) { case SOCKS_V4REPLY_VERSION: switch (reply) { case SOCKSV4_SUCCESS: return 1; case SOCKSV4_FAIL: errno = ECONNREFUSED; break; case SOCKSV4_NO_IDENTD: swarnx("%s: proxyserver failed to get your identd response", function); errno = ECONNREFUSED; return 0; case SOCKSV4_BAD_ID: swarnx("%s: proxyserver claims username/ident mismatch", function); errno = ECONNREFUSED; return 0; default: swarnx("%s: unknown v%d reply from proxyserver: %d", function, version, reply); errno = ECONNREFUSED; break; } break; case SOCKS_V5: switch (reply) { case SOCKS_SUCCESS: return 1; case SOCKS_FAILURE: swarnx("%s: unknown proxyserver failure", function); errno = ECONNREFUSED; break; case SOCKS_NOTALLOWED: swarnx("%s: connection denied by proxyserver", function); errno = ECONNREFUSED; return 0; case SOCKS_NETUNREACH: errno = ENETUNREACH; return 0; case SOCKS_HOSTUNREACH: errno = EHOSTUNREACH; return 0; case SOCKS_CONNREFUSED: errno = ECONNREFUSED; return 0; case SOCKS_TTLEXPIRED: errno = ETIMEDOUT; return 0; case SOCKS_CMD_UNSUPP: swarnx("%s: command not supported by proxyserver", function); errno = ECONNREFUSED; break; case SOCKS_ADDR_UNSUPP: swarnx("%s: address type not supported by proxyserver", function); errno = ECONNREFUSED; break; default: swarnx("%s: unknown v%d reply from proxyserver: %d", function, version, reply); errno = ECONNREFUSED; break; } break; case MSPROXY_V2: switch (reply) { case MSPROXY_SUCCESS: return 1; case MSPROXY_FAILURE: case MSPROXY_CONNREFUSED: errno = ECONNREFUSED; return 0; case MSPROXY_NOTALLOWED: swarnx("%s: connection denied by proxyserver: authenticated?", function); errno = ECONNREFUSED; return 0; default: swarnx("%s: unknown v%d reply from proxyserver: %d", function, version, reply); errno = ECONNREFUSED; return 0; } case HTTP_V1_0: switch (reply) { case HTTP_SUCCESS: return 1; default: errno = ECONNREFUSED; return 0; } /* NOTREACHED */ break; default: SERRX(version); } if (route != NULL) socks_badroute(route); return 0; } /* ARGSUSED */ int clientmethod_uname(s, host, version, name, password) int s; const struct sockshost_t *host; int version; unsigned char *name, *password; { const char *function = "clientmethod_uname()"; static struct authmethod_uname_t uname; /* cached userinfo. */ #if SOCKS_CLIENT static struct sockshost_t unamehost; /* host cache was gotten for. */ #endif static int unameisok; /* cached data is ok? */ unsigned char *offset; unsigned char request[ 1 /* version. */ + 1 /* username length. */ + MAXNAMELEN /* username. */ + 1 /* password length. */ + MAXPWLEN /* password. */ ]; unsigned char response[ 1 /* version. */ + 1 /* status. */ ]; switch (version) { case SOCKS_V5: break; default: SERRX(version); } #if SOCKS_CLIENT if (memcmp(&unamehost, host, sizeof(unamehost)) != 0) unameisok = 0; /* not same host as cache was gotten for. */ #endif /* fill in request. */ offset = request; *offset++ = (unsigned char)SOCKS_UNAMEVERSION; if (!unameisok) { #if SOCKS_CLIENT if (name == NULL && (name = (unsigned char *)socks_getusername(host, (char *)offset + 1, MAXNAMELEN)) == NULL) { swarn("%s: could not determine username of client", function); return -1; } #endif SASSERTX(strlen((char *)name) < sizeof(uname.name)); strcpy((char *)uname.name, (char *)name); } else name = uname.name; /* first byte gives length. */ *offset = (unsigned char)strlen((char *)name); OCTETIFY(*offset); strcpy((char *)offset + 1, (char *)name); offset += *offset + 1; if (!unameisok) { #if SOCKS_CLIENT if (password == NULL && (password = (unsigned char *)socks_getpassword(host, (char *)name, (char *)offset + 1, MAXPWLEN)) == NULL) { swarn("%s: could not determine password of client", function); return -1; } #endif SASSERTX(strlen((char *)password) < sizeof(uname.password)); strcpy((char *)uname.password, (char *)password); } else password = uname.password; /* first byte gives length. */ *offset = (unsigned char)strlen((char *)password); OCTETIFY(*offset); strcpy((char *)offset + 1, (char *)password); offset += *offset + 1; if (writen(s, request, (size_t)(offset - request), NULL) != offset - request) { swarn("%s: writen()", function); return -1; } if (readn(s, response, sizeof(response), NULL) != sizeof(response)) { swarn("%s: readn()", function); return -1; } if (request[UNAME_VERSION] != response[UNAME_VERSION]) { swarnx("%s: sent v%d, got v%d", function, request[UNAME_VERSION], response[UNAME_VERSION]); return -1; } if (response[UNAME_STATUS] == 0) { /* server accepted. */ #if SOCKS_CLIENT unamehost = *host; unameisok = 1; #endif } return response[UNAME_STATUS]; } dante-1.1.19.dfsg/lib/client.c0000644000175000017500000000537110324735543014502 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: client.c,v 1.57 2005/10/07 12:31:47 michaels Exp $"; #if !HAVE_PROGNAME char *__progname = "danteclient"; #endif int SOCKSinit(progname) char *progname; { __progname = progname; return 0; } void clientinit(void) { /* const char *function = "clientinit()"; */ static int initing; if (sockscf.state.init) return; if (initing) return; initing = 1; if (issetugid()) sockscf.option.configfile = SOCKS_CONFIGFILE; else if ((sockscf.option.configfile = getenv("SOCKS_CONF")) == NULL) sockscf.option.configfile = SOCKS_CONFIGFILE; /* * initialize misc. options to sensible default. */ sockscf.resolveprotocol = RESOLVEPROTOCOL_UDP; genericinit(); slog(LOG_INFO, "%s/client v%s running", PACKAGE, VERSION); initing = 0; } dante-1.1.19.dfsg/lib/tostring.c0000644000175000017500000004636210356724075015105 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" #include "config_parse.h" static const char rcsid[] = "$Id: tostring.c,v 1.15 2006/01/01 16:45:02 michaels Exp $"; char * proxyprotocols2string(proxyprotocols, str, strsize) const struct proxyprotocol_t *proxyprotocols; char *str; size_t strsize; { size_t strused; if (strsize) *str = NUL; /* make sure we return a NUL terminated string. */ else return str; strused = 0; if (proxyprotocols->socks_v4) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE(SOCKS_V4s)); if (proxyprotocols->socks_v5) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE(SOCKS_V5s)); if (proxyprotocols->msproxy_v2) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE(MSPROXY_V2s)); if (proxyprotocols->http_v1_0) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE(HTTP_V1_0s)); return str; } char * protocols2string(protocols, str, strsize) const struct protocol_t *protocols; char *str; size_t strsize; { size_t strused; if (strsize) *str = NUL; /* make sure we return a NUL terminated string. */ else return str; strused = 0; if (protocols->tcp) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE(PROTOCOL_TCPs)); if (protocols->udp) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE(PROTOCOL_UDPs)); return str; } const char * socks_packet2string(packet, type) const void *packet; int type; { static char buf[1024]; char hstring[MAXSOCKSHOSTSTRING]; unsigned char version; const struct request_t *request = NULL; const struct response_t *response = NULL; switch (type) { case SOCKS_REQUEST: request = (const struct request_t *)packet; version = request->version; break; case SOCKS_RESPONSE: response = (const struct response_t *)packet; version = response->version; break; default: SERRX(type); } switch (version) { case SOCKS_V4: case SOCKS_V4REPLY_VERSION: switch (type) { case SOCKS_REQUEST: snprintfn(buf, sizeof(buf), "(V4) VN: %d CD: %d address: %s", request->version, request->command, sockshost2string(&request->host, hstring, sizeof(hstring))); break; case SOCKS_RESPONSE: snprintfn(buf, sizeof(buf), "(V4) VN: %d CD: %d address: %s", response->version, response->reply, sockshost2string(&response->host, hstring, sizeof(hstring))); break; } break; case SOCKS_V5: switch (type) { case SOCKS_REQUEST: snprintfn(buf, sizeof(buf), "VER: %d CMD: %d FLAG: %d ATYP: %d address: %s", request->version, request->command, request->flag, request->host.atype, sockshost2string(&request->host, hstring, sizeof(hstring))); break; case SOCKS_RESPONSE: snprintfn(buf, sizeof(buf), "VER: %d REP: %d FLAG: %d ATYP: %d address: %s", response->version, response->reply, response->flag, response->host.atype, sockshost2string(&response->host, hstring, sizeof(hstring))); break; } break; default: SERRX(version); } return buf; } enum operator_t string2operator(string) const char *string; { if (strcmp(string, "eq") == 0 || strcmp(string, "=") == 0) return eq; if (strcmp(string, "neq") == 0 || strcmp(string, "!=") == 0) return neq; if (strcmp(string, "ge") == 0 || strcmp(string, ">=") == 0) return ge; if (strcmp(string, "le") == 0 || strcmp(string, "<=") == 0) return le; if (strcmp(string, "gt") == 0 || strcmp(string, ">") == 0) return gt; if (strcmp(string, "lt") == 0 || strcmp(string, "<") == 0) return lt; /* parser should make sure this never happens. */ SERRX(string); /* NOTREACHED */ } const char * operator2string(operator) enum operator_t operator; { switch (operator) { case none: return QUOTE("none"); case eq: return QUOTE("eq"); case neq: return QUOTE("neq"); case ge: return QUOTE("ge"); case le: return QUOTE("le"); case gt: return QUOTE("gt"); case lt: return QUOTE("lt"); case range: return QUOTE("range"); default: SERRX(operator); } /* NOTREACHED */ } const char * ruleaddress2string(address, string, len) const struct ruleaddress_t *address; char *string; size_t len; { /* for debugging. */ if (string == NULL) { static char addrstring[MAXRULEADDRSTRING]; string = addrstring; len = sizeof(addrstring); } switch (address->atype) { case SOCKS_ADDR_IPV4: { char *a; snprintfn(string, len, "%s/%d%s, %s: %s%d%s, %s: %s%d%s, %s: %s, %s: %s%d", strcheck(a = strdup(inet_ntoa(address->addr.ipv4.ip))), bitcount((unsigned long)address->addr.ipv4.mask.s_addr), QUOTE0(), QUOTE("tcp"), QUOTE0(), ntohs(address->port.tcp), QUOTE0(), QUOTE("udp"), QUOTE0(), ntohs(address->port.udp), QUOTE0(), QUOTE("op"), operator2string(address->operator), QUOTE("end"), QUOTE0(), ntohs(address->portend)); free(a); break; } case SOCKS_ADDR_DOMAIN: snprintfn(string, len, "%s%s, %s: %s%d%s, %s: %s%d%s, %s: %s, %s: %s%d", address->addr.domain, QUOTE0(), QUOTE("tcp"), QUOTE0(), ntohs(address->port.tcp), QUOTE0(), QUOTE("udp"), QUOTE0(), ntohs(address->port.udp), QUOTE0(), QUOTE("op"), operator2string(address->operator), QUOTE("end"), QUOTE0(), ntohs(address->portend)); break; case SOCKS_ADDR_IFNAME: snprintfn(string, len, "%s%s, %s: %s%d%s, %s : %s%d%s, %s: %s, %s: %s%d", address->addr.ifname, QUOTE0(), QUOTE("tcp"), QUOTE0(), ntohs(address->port.tcp), QUOTE0(), QUOTE("udp"), QUOTE0(), ntohs(address->port.udp), QUOTE0(), QUOTE("op"), operator2string(address->operator), QUOTE("end"), QUOTE0(), ntohs(address->portend)); break; default: SERRX(address->atype); } return string; } const char * protocol2string(protocol) int protocol; { switch (protocol) { case SOCKS_TCP: return QUOTE(PROTOCOL_TCPs); case SOCKS_UDP: return QUOTE(PROTOCOL_UDPs); default: SERRX(protocol); } /* NOTREACHED */ } const char * resolveprotocol2string(resolveprotocol) int resolveprotocol; { switch (resolveprotocol) { case RESOLVEPROTOCOL_TCP: return QUOTE(PROTOCOL_TCPs); case RESOLVEPROTOCOL_UDP: return QUOTE(PROTOCOL_UDPs); case RESOLVEPROTOCOL_FAKE: return QUOTE("fake"); default: SERRX(resolveprotocol); } /* NOTREACHED */ } const char * command2string(command) int command; { switch (command) { case SOCKS_BIND: return QUOTE(SOCKS_BINDs); case SOCKS_CONNECT: return QUOTE(SOCKS_CONNECTs); case SOCKS_UDPASSOCIATE: return QUOTE(SOCKS_UDPASSOCIATEs); /* pseudo commands. */ case SOCKS_ACCEPT: return QUOTE(SOCKS_ACCEPTs); case SOCKS_BINDREPLY: return QUOTE(SOCKS_BINDREPLYs); case SOCKS_UDPREPLY: return QUOTE(SOCKS_UDPREPLYs); case SOCKS_DISCONNECT: return QUOTE(SOCKS_DISCONNECTs); case SOCKS_UNKNOWN: return QUOTE(SOCKS_UNKNOWNs); default: SERRX(command); } /* NOTREACHED */ } char * commands2string(command, str, strsize) const struct command_t *command; char *str; size_t strsize; { size_t strused; if (strsize) *str = NUL; /* make sure we return a NUL terminated string. */ else return str; strused = 0; if (command->bind) strused += snprintfn(&str[strused], strsize - strused, "%s, ", command2string(SOCKS_BIND)); if (command->bindreply) strused += snprintfn(&str[strused], strsize - strused, "%s, ", command2string(SOCKS_BINDREPLY)); if (command->connect) strused += snprintfn(&str[strused], strsize - strused, "%s, ", command2string(SOCKS_CONNECT)); if (command->udpassociate) strused += snprintfn(&str[strused], strsize - strused, "%s, ", command2string(SOCKS_UDPASSOCIATE)); if (command->udpreply) strused += snprintfn(&str[strused], strsize - strused, "%s, ", command2string(SOCKS_UDPREPLY)); return str; } const char * method2string(method) int method; { switch (method) { case AUTHMETHOD_NOTSET: return QUOTE(AUTHMETHOD_NOTSETs); case AUTHMETHOD_NONE: return QUOTE(AUTHMETHOD_NONEs); case AUTHMETHOD_GSSAPI: return QUOTE(AUTHMETHOD_GSSAPIs); case AUTHMETHOD_UNAME: return QUOTE(AUTHMETHOD_UNAMEs); case AUTHMETHOD_NOACCEPT: return QUOTE(AUTHMETHOD_NOACCEPTs); case AUTHMETHOD_RFC931: return QUOTE(AUTHMETHOD_RFC931s); case AUTHMETHOD_PAM: return QUOTE(AUTHMETHOD_PAMs); default: SERRX(method); } /* NOTREACHED */ } char * methods2string(methodc, methodv, str, strsize) size_t methodc; const int *methodv; char *str; size_t strsize; { size_t strused; size_t i; if (strsize) *str = NUL; /* make sure we return a NUL terminated string. */ else return str; strused = 0; for (i = 0; i < methodc; ++i) strused += snprintfn(&str[strused], strsize - strused, "%s, ", method2string(methodv[i])); return str; } int string2method(methodname) const char *methodname; { struct { char *methodname; int method; } method[] = { { AUTHMETHOD_NONEs, AUTHMETHOD_NONE }, { AUTHMETHOD_UNAMEs, AUTHMETHOD_UNAME }, { AUTHMETHOD_RFC931s, AUTHMETHOD_RFC931 }, { AUTHMETHOD_PAMs, AUTHMETHOD_PAM } }; size_t i; for (i = 0; i < ELEMENTS(method); ++i) if (strcmp(method[i].methodname, methodname) == 0) return method[i].method; return -1; } char * sockshost2string(host, string, len) const struct sockshost_t *host; char *string; size_t len; { if (string == NULL) { /* to ease debugging. */ static char hstring[MAXSOCKSHOSTSTRING]; string = hstring; len = sizeof(hstring); } switch (host->atype) { case SOCKS_ADDR_IPV4: snprintfn(string, len, "%s.%d", inet_ntoa(host->addr.ipv4), ntohs(host->port)); break; case SOCKS_ADDR_IPV6: snprintfn(string, len, "%s.%d", "", ntohs(host->port)); break; case SOCKS_ADDR_DOMAIN: { snprintfn(string, len, "%s.%d", host->addr.domain, ntohs(host->port)); break; } default: SERRX(host->atype); } return string; } char * sockaddr2string(address, string, len) const struct sockaddr *address; char *string; size_t len; { /* for debugging. */ if (string == NULL) { static char addrstring[MAXSOCKADDRSTRING]; string = addrstring; len = sizeof(addrstring); } switch (address->sa_family) { case AF_UNIX: { /* LINTED pointer casts may be troublesome */ const struct sockaddr_un *addr = (const struct sockaddr_un *)address; strncpy(string, addr->sun_path, len - 1); string[len - 1] = NUL; break; } case AF_INET: { /* LINTED pointer casts may be troublesome */ const struct sockaddr_in *addr = TOCIN(address); snprintfn(string, len, "%s.%d", inet_ntoa(addr->sin_addr), ntohs(addr->sin_port)); break; } default: SERRX(address->sa_family); } return string; } struct udpheader_t * string2udpheader(data, len, header) const char *data; size_t len; struct udpheader_t *header; { bzero(header, sizeof(*header)); if (len < sizeof(header->flag)) return NULL; memcpy(&header->flag, data, sizeof(header->flag)); data += sizeof(header->flag); len -= sizeof(header->flag); if (len < sizeof(header->frag)) return NULL; memcpy(&header->frag, data, sizeof(header->frag)); data += sizeof(header->frag); len -= sizeof(header->frag); if ((data = (const char *)mem2sockshost(&header->host, (const unsigned char *)data, len, SOCKS_V5)) == NULL) return NULL; return header; } char * extensions2string(extensions, str, strsize) const struct extension_t *extensions; char *str; size_t strsize; { size_t strused; if (strsize) *str = NUL; /* make sure we return a NUL terminated string. */ else return str; strused = 0; if (extensions->bind) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE("bind")); return str; } #if SOCKS_SERVER char * logtypes2string(logtypes, str, strsize) const struct logtype_t *logtypes; char *str; size_t strsize; { size_t strused; size_t i; if (strsize) *str = NUL; /* make sure we return a NUL terminated string. */ else return str; strused = 0; if (logtypes->type & LOGTYPE_SYSLOG) strused += snprintfn(&str[strused], strsize - strused, "\"syslog.%s\", ", logtypes->facilityname); if (logtypes->type & LOGTYPE_FILE) for (i = 0; i < logtypes->fpc; ++i) strused += snprintfn(&str[strused], strsize - strused, "\"%s\", ", logtypes->fnamev[i]); return str; } char * options2string(options, prefix, str, strsize) const struct option_t *options; const char *prefix; char *str; size_t strsize; { size_t strused; if (strsize) *str = NUL; /* make sure we return a NUL terminated string. */ else return str; strused = 0; strused += snprintfn(&str[strused], strsize - strused, "\"%sconfigfile\": \"%s\",\n", prefix, options->configfile == NULL ? SOCKD_CONFIGFILE : options->configfile); strused += snprintfn(&str[strused], strsize - strused, "\"%sdaemon\": \"%d\",\n", prefix, options->daemon); strused += snprintfn(&str[strused], strsize - strused, "\"%sdebug\": \"%d\",\n", prefix, options->debug); strused += snprintfn(&str[strused], strsize - strused, "\"%skeepalive\": \"%d\",\n", prefix, options->keepalive); strused += snprintfn(&str[strused], strsize - strused, "\"%slinebuffer\": \"%d\",\n", prefix, options->debug); strused += snprintfn(&str[strused], strsize - strused, "\"%sservercount\": \"%d\",\n", prefix, options->serverc); return str; } char * logs2string(logs, str, strsize) const struct log_t *logs; char *str; size_t strsize; { size_t strused; if (strsize) *str = NUL; /* make sure we return a NUL terminated string. */ else return str; strused = 0; if (logs->connect) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE(LOG_CONNECTs)); if (logs->disconnect) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE(LOG_DISCONNECTs)); if (logs->data) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE(LOG_DATAs)); if (logs->error) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE(LOG_ERRORs)); if (logs->iooperation) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE(LOG_IOOPERATIONs)); return str; } const char * childtype2string(type) int type; { switch (type) { case CHILD_IO: return "io"; case CHILD_MOTHER: return "mother"; case CHILD_NEGOTIATE: return "negotiator"; case CHILD_REQUEST: return "request"; default: SERRX(type); } /* NOTREACHED */ } const char * verdict2string(verdict) int verdict; { return verdict == VERDICT_PASS ? QUOTE(VERDICT_PASSs) : QUOTE(VERDICT_BLOCKs); } char * users2string(user, str, strsize) const struct linkedname_t *user; char *str; size_t strsize; { size_t strused; if (strsize) *str = NUL; /* make sure we return a NUL terminated string. */ else return str; strused = 0; for (; user != NULL; user = user->next) strused += snprintfn(&str[strused], strsize - strused, "\"%s\", ", user->name); return str; } char * compats2string(compats, str, strsize) const struct compat_t *compats; char *str; size_t strsize; { size_t strused; if (strsize) *str = NUL; /* make sure we return a NUL terminated string. */ else return str; strused = 0; if (compats->reuseaddr) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE("reuseaddr")); if (compats->sameport) strused += snprintfn(&str[strused], strsize - strused, "%s, ", QUOTE("sameport")); return str; } char * srchosts2string(srchost, prefix, str, strsize) const struct srchost_t *srchost; const char *prefix; char *str; size_t strsize; { size_t strused; if (strsize) *str = NUL; /* make sure we return a NUL terminated string. */ else return str; strused = 0; if (srchost->nomismatch) strused += snprintfn(&str[strused], strsize - strused, "\"%snomismatch\", ", prefix); if (srchost->nounknown) strused += snprintfn(&str[strused], strsize - strused, "\"%snounknown\",", prefix); return str; } const char * uid2name(uid) uid_t uid; { struct passwd *pw; if ((pw = getpwuid(uid)) == NULL) return NULL; return pw->pw_name; } char * userids2string(userids, prefix, str, strsize) const struct userid_t *userids; const char *prefix; char *str; size_t strsize; { size_t strused; if (strsize) *str = NUL; /* make sure we return a NUL terminated string. */ else return str; strused = 0; strused += snprintfn(&str[strused], strsize - strused, "\"%sprivileged\": \"%s\",\n", prefix, uid2name(userids->privileged)); strused += snprintfn(&str[strused], strsize - strused, "\"%snotprivileged\": \"%s\",\n", prefix, uid2name(userids->unprivileged)); strused += snprintfn(&str[strused], strsize - strused, "\"%slibwrap\": \"%s\",\n", prefix, uid2name(userids->libwrap)); return str; } char * timeouts2string(timeouts, prefix, str, strsize) const struct timeout_t *timeouts; const char *prefix; char *str; size_t strsize; { size_t strused; if (strsize) *str = NUL; /* make sure we return a NUL terminated string. */ else return str; strused = 0; strused += snprintfn(&str[strused], strsize - strused, "\"%sconnecttimeout\": \"%ld\",\n", prefix, (long)timeouts->negotiate); strused += snprintfn(&str[strused], strsize - strused, "\"%siotimeout\": \"%ld\",\n", prefix, (long)timeouts->io); return str; } const char * rotation2string(rotation) int rotation; { switch (rotation) { case ROTATION_NONE: return "none"; case ROTATION_ROUTE: return "route"; default: SERRX(rotation); } /* NOTREACHED */ } #endif /* SOCKS_SERVER */ dante-1.1.19.dfsg/lib/socket.c0000644000175000017500000001160110345565444014511 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: socket.c,v 1.32 2005/11/08 15:58:03 michaels Exp $"; int socks_connect(s, host) int s; const struct sockshost_t *host; { const char *function = "socks_connect()"; int failed; struct hostent *hostent; struct sockaddr_in address; char **ip; bzero(&address, sizeof(address)); address.sin_family = AF_INET; address.sin_port = host->port; switch (host->atype) { case SOCKS_ADDR_IPV4: address.sin_addr = host->addr.ipv4; /* LINTED pointer casts may be troublesome */ return connect(s, (struct sockaddr *)&address, sizeof(address)); case SOCKS_ADDR_DOMAIN: if ((hostent = gethostbyname(host->addr.domain)) == NULL) slog(LOG_DEBUG, "%s: gethostbyname(%s): %s", function, host->addr.domain, hstrerror(h_errno)); break; default: SERRX(host->atype); } if (hostent == NULL || (ip = hostent->h_addr_list) == NULL) return -1; failed = 0; do { if (failed) { /* previously failed, need to create a new socket. */ struct sockaddr name; socklen_t namelen; int new_s; /* will also try to get the same portbinding. */ namelen = sizeof(name); if (getsockname(s, &name, &namelen) != 0) return -1; if ((new_s = socketoptdup(s)) == -1) return -1; if (dup2(new_s, s) == -1) { close(new_s); return -1; } close(new_s); /* s is now a new socket but keeps the same index. */ #if SOCKS_SERVER if (sockd_bind(s, &name, 1) != 0) return -1; #else /* SOCKS_SERVER */ if (bind(s, &name, namelen) != 0) return -1; #endif /* !SOCKS_SERVER */ } /* LINTED pointer casts may be troublesome */ address.sin_addr = *((struct in_addr *)*ip); /* LINTED pointer casts may be troublesome */ if (connect(s, (struct sockaddr *)&address, sizeof(address)) == 0) break; else { char buf[MAXSOCKADDRSTRING]; /* LINTED pointer casts may be troublesome */ slog(LOG_DEBUG, "%s, failed: %s: %s", function, sockaddr2string((struct sockaddr *)&address, buf, sizeof(buf)), strerror(errno)); } #if SOCKS_SERVER /* clients may have set up alarms to interrupt. */ if (errno == EINTR) { fd_set rset; FD_ZERO(&rset); FD_SET(s, &rset); if (selectn(s + 1, &rset, NULL, NULL, NULL) != 1) SERR(0); if (read(s, NULL, 0) == 0) break; /* * else; errno gets set and we can handle it as there was no * interrupt. */ } #endif /* SOCKS_SERVER */ /* * Only retry/try next address if errno indicates server/network error. */ switch (errno) { case ETIMEDOUT: case EINVAL: case ECONNREFUSED: case ENETUNREACH: case EHOSTUNREACH: failed = 1; break; default: return -1; } } while (*++ip != NULL); if (*ip == NULL) return -1; /* list exhausted, no successful connect. */ return 0; } int acceptn(s, addr, addrlen) int s; struct sockaddr *addr; socklen_t *addrlen; { int rc; while ((rc = accept(s, addr, addrlen)) == -1 && errno == EINTR) ; return rc; } dante-1.1.19.dfsg/BUGS0000644000175000017500000000056410167154366012777 0ustar roamroam# $Id: BUGS,v 1.32 2004/12/24 15:47:27 michaels Exp $ To report a new bug, mail dante-bugs@inet.no. Make sure you read the FAQ (http://www.inet.no/dante/FAQ/) first. Generic: - 'libtool' is broken on OS X. Client part: - The clientlibrary is not threadsafe. This can cause problems when trying to socksify programs that use threads. Server part: None known. dante-1.1.19.dfsg/NEWS0000644000175000017500000006033110364161021012772 0ustar roamroam@(#)$Id: NEWS,v 1.53 2006/01/20 13:05:17 michaels Exp $ (NOTE: The contents of this file is only updated for releases.) *** Monday, January 16, 2006 -- Dante v1.1.19 o Disabled code for shutting down idle sockd processes, appears to need more testing. Thanks to Rene Burkhardt . o Upgrade to Automake 1.9.6. o Use __libc_enable_secure if it exists and issetugid() doesn't. Should allow the SOCKS_CONF environment variable to be used on Linux. o Check if large files need special support; logfiles can grow large. Problem reported by Tom Vandenbelt . o Drop trying to optimize away unnecessary PAM calls, creates obscure problems on some PAM-Linux implementations. Based on good work by Mr E_T , many thanks. o Fixed bug introduced as part of additions to better preserve TCP semantics across connections. Thanks to Rene Burkhardt o New module available: session. This gives control over how many sessions different clients can create. See the module page "http://www.inet.no/dante/module.html" and doc/module for more information. o In order to share some code, there were some api changes made to the bandwidth module, requiring users to upgrade. Users of the bandwidth module can contact sales for a free upgrade. o Fix bug preventing immediate-error on wrong password to take effect for servers configured to use PAM. Thanks for help to Rene Burkhardt . o Update usage of 'head'. Problem first reported by "William Adams" . o Support server-chaining. Currently only the tcp connect command is supported. It might be possible to add support for udp and tcp bind if requested. o Fix PAM-related bug introduced in version 1.1.16. Reported by Jacob Toxværd . *** Friday, September 9, 2005 -- Dante v1.1.18 o Fix bug involving syslog. Problem report from Nicola o Fix bug related to socks header split across multiple segments. Thanks to Patrick LeBoutillier . *** Thursdag, July 14, 2005 -- Dante v1.1.17 o Fix bug involving setting "pam.servicename". *** Monday, July 4, 2005 -- Dante v1.1.16 o Enabled code for shutting down idle sockd processes. o Some additions to better preserve TCP semantics across connections. o Allow PAM tests to be disabled. Thanks to Daniel for patch. o Conflict between socks.h and netinet/in.h fixed. Thanks to Daniel for patch. o Error in capi/socks.h fixed. Thanks to Alin Nastac for patch solving problem. o Fix res_9_init related compilation problems on OS X. Problem reported by Changshin Lee . o Return immediate error if username/password is wrong in the common case, rather than delaying it for later. Helps avoid the case where socks-clients cache the wrong username/password. Reworked rule-checking code a little too. o In one rare case, such as triggered in some LVS health-checker installations, a bug could make us leak descriptors. Thanks to Antonio Paulo Salgado Forster and Pete Harvey for help with debugging. o Fix a bug where server could hang while waiting for input from client during negotiation. Thanks to Robert Marcano . o Fix formating of some warning messages. Thanks to James Carlson . *** Monday, January 31, 2005 -- Dante v1.1.15 o Limit the maximum number of available descriptors if necessary, avoiding a possible overflow of fd_sets. o Added absolute timestamp to logformat, in preparation for new module. o Fixed problem involving non-blocking connects in socks clients on Linux. o Prototype related tests during configure are rewritten. Might require prototypes for some platforms to be readded. o Compilation fixes for AIX 5.1-ML03 with IBM Visual Age C/C++ V5. Based on patch from Kieron Curtis2 . o A 'an macro' version of the sockd.8 manual page. Submitted by Tony Leneis . o Upgrade to autoconf 2.59, libtool 1.5.10 and automake 1.9.3. o Patch to code for shutting down idle sockd processes, from William Adams . NOT ENABLED. o Add test for setegid(), use replacement if not found. Replacement code based on patch by . o Do not warn at runtime about SO_{SND,RCV}LOWAT socket options if not supported by OS. Based on patch from William Adams . o enable setegid() call after moving it to correct place; William Adams . o Support for socksification of getipnodebyname(), contributed by Lennart Dahlström . o Support for socksification of getaddrinfo(), contributed by Motoyuki Kasahara . o Fix some problems with descriptor passing on platforms without cmsghdr. o AIX 5.1 ML-03 compilation fixes for IBM Visual Age C/C++ compiler version 5 by Kieron Curtis2 . o Remove usage of SO_BSDCOMPAT, obsolete and causes warnings with version 2.6 Linux kernels. Noted by Adrian Bridgett . *** Monday, July 28, 2002 -- Dante v1.1.14 o Fix some problems involving use of bindresvport() when running the server on a privileged port. Problem brought up by Anton A Golubev and Silvio Macedo . o Avoid nameclash with sa_len define on IRIX, patch from Herb Lewis o Startup item for Dante on Mac OS X. From Gerben Wierda . o Fix bug that prevented rfc931 auth (ident) from working, patch from "Meno Abels" . o Fixes for 'configure' under AIX 5. Problem reported by "Scott Rickard" . o Workaround for 'bswap_32' header bug on linux. o CMSG alignment fix. Problem reported by Ibrahim Khalifa . *** Monday, June 24, 2002 -- Dante v1.1.13 o AIX needs n{recv,send}msg when calling system functions. Reported by Tom Chan . o Fix some bugs in bandwidth module. Users using a version older than "bandwidth.c,v 1.18" can contact sales for a upgrade. o Fix a bug in logprinting, reported by Borsenkow Andrej . o Reset buffering after sighup. Also, always linebuffer logoutput. Fixes some problems with loglineoverlap, problem found by Borsenkow Andrej . This deprecates the "-l" option to sockd. o Move daemon() call to later so more errors can be reported, suggested by Borsenkow Andrej . o fix problem when linking with libsocks; NISHIMURA Daisuke . o fix some problems when socksifying, making certain programs hang forever (e.g. certain versions/installations of "ssh -X"). Thanks to NISHIMURA Daisuke for diagnosis, help and testing. *** Thursday, April 11, 2002 -- Dante v1.1.12 o Don't mark the rule as good either if sockscf.state.unfixedpamdata, fixes bug reported by Jerry Murdock" . o fix a bug preventing the list given in a 'user:' keyword from being checked correctly. Reported by Oleg Bulavsky . o support interfacenames containing ':', e.g eth0:1, supposedly on linux 2.4.x. From Rob Fowler . o new --disable-pidfile option to configure; disables pidfile creation. o upgrade to libtool-1.4.2, automake-1.5 and autoconf-2.52. o "-h" prints out configfile used, based on suggestion from dh_tsc_10@ugcs.net. o fix bugs that reset some defaults at the wrong time, reported by dh_tsc_10@ugcs.net. o prototype script for generation of graphs with usage information included (bin/sockd-graphgen). Contact us if you run a socks server with significant usage, and you are willing to help with testing. o status info printed at the end of configure. *** Friday, Dec 7, 2001 -- Dante v1.1.11 o Fixes for libdsocks on HP-UX 11.00. Thanks to 'albert chin (china@thewrittenword.com)' for testing. o Some minor optimisations in server i/o code, at the cost of some timer accuracy concerning bandwidth limiting/client expiration. o prefix "socks" to some global variables to avoid collisions during socksify. Reported by Don Reid . o capi/socks.h needs Rxxx prototypes to work with a c++ compiler. Noted by Alex Morozov . o Fix compilation problems on Compaq Tru64 UNIX V5.0A (and V5.1 and V5.1A). Mainly based on patch from "Peter Derr" , who also provided access to a machine for testing. o Fix bug that logged to stdout on startup sometimes, confusing some programs. First reported by Vitor Choi Feitosa o If Rgetsockname() is called on a socket that a previous uncompleted Rconnect() has been done on, try to sleep until Rconnect() has finished instead of returning ENOBUFS. Hoped to help compatibility with some applications. o Modified httpproxy code a little, based on patch from dh_tsc_10@ugcs.net. o Code for selecting which of multiple external ipaddresses to use on a global basis based on routing. Code contributed by Tom Chan . o Re-open logfiles on SIGHUP. o Rename "pamservicename" to "pam.servicename". o Fix memory overrun problem in Rgethostbyname*(). Found and diagnosed by dme@dme.org, thanks. o Warn if "logoutput:" changes to something we don't handle after SIGHUP. o Try to log presumably harmless client-related errors with LOG_DEBUG instead of LOG_ERR, by popular request. o New module available: redirect, gives control over both where clients requests and replies will end up, aswell as what addresses and portranges the Dante server will use. Can also be used to limit the number of concurrent sessions from each client. See the module page "http://www.inet.no/dante/module.html" and doc/module for more information. o New module available: bandwidth, gives control over how much bandwidth the Dante server uses on behalf of the different clients. See the module page "http://www.inet.no/dante/module.html" and doc/module for more information. o upgraded to autoconf-2.50, libtool-1.4 and automake-1.4-p4 *** Tuesday, May 29, 2001 -- Dante v1.1.10 o new method added: "pam". Code contributed by Patrick Bihan-Faou, MindStep Corporation, patrick@mindstep.com. o let client-rules have their own global methodline, "clientmethod", default value set to "none". The global "method" is only used for socks-rules now. o delay checking of password/etc til we have received the socks request (rather than during negotiation, as was the case). Required for supporting passwordbased authentication via non-socks methods, e.g. pam. o socklen_t definition updated for NetBSD 1.5U. Problem report and patch submitted by Janne Snabb . o Output from 'config.guess' is not sufficient to determine use of elf on NetBSD. Problem report and patch submitted by Janne Snabb o BSDI 4.1 doesn't have freeifaddrs(), but uses free() Problem reported by "Zand, Nooshin" *** Tuesday, March 13, 2001 -- Dante v1.1.9 o fix big bug in rulespermit(). Problem reported by Stephan Eisvogel . *** Tuesday, February 20, 2001 -- Dante v1.1.8 o contrib directory actually added to distributed archive *** Tuesday, February 20, 2001 -- Dante v1.1.7 o contrib/sockd-stat.awk, provides statistics based on sockd logfiles. Contributed by Stephan Eisvogel . o If gethostbyname() fails, treat it as if resolveprotocol was set to fake, meaning we hope the socksserver will be able to resolve it. Will presumably make certain dns configurations work better for client. o When showing rule (debug mode), print out linenumber too. loosely based on suggestion from "N. Kremla" (kremlanh@aramco.com.sa). o contrib/ directory added. o Support for giving interfacenames as internal/external address. o osf host test in configure did not match all alpha based machines; Dobrica Pavlinusic . o -V flag added to sockd, which causes the server to exit after parsing the configuration file. o Header file (socks.h) with socks function prototypes added. By default installed in /usr/local/include. *** Tuesday, November 21, 2000 -- Dante v1.1.6 o fix a bug related to hostnamelength parsing in server. Thanks to "Thomas Jarosch" . *** Monday, October 16, 2000 -- Dante v1.1.5 o New prototype for gethostbyaddr in RedHat 7.0 added. First reported by Paul R Streitman . o RedHat needs libnsl for tcpwrappers to work. *** Thursday, October 5, 2000 -- Dante v1.1.4 o fix bug affecting clients going through socks v4 servers. Reported and nicely diagnosed by Jack Keane (jkeane@OpenReach.com). o increase default listen backlog to 511, based on request by Doug Hardie (bc979@lafn.org). *** Monday, September 25, 2000 -- Dante v1.1.3 o some fixes/additions to example/ files. o HP-UX 11.00 should now work. Thanks to Malte Cornils for testing. o httpproxysupport in client (meaning "socksify" can work when going through webproxies too). o expire badmarking on bad/non-working routes/proxyservers after configured time. Default to never expiring, as in previous versions. See BADROUTE_EXPIRE in config.h. o say what address we expected the bindreply to come from in "unexpected bindreply ..." o don't close controlconnection if another socket is using it. Fixes a bug triggered when using the bindextension in certain cases. Problem reported by Jacques A. Vidrine (n@nectar.com). o compilation outside source directory fixed, based on patch from NISHIMURA Daisuke o bsdi uses elf; NISHIMURA Daisuke o dlib/hostcache.c now compiled again. First reported by "Jacques A. Vidrine" *** Monday, Jun 26, 2000 -- Dante v1.1.2 o minor additions and standardization to logformat. o slightly smarter about what descriptors we leave open when forking of connectchild in client for non-blocking connect. Also don't setsid() in connectchild. o work around linux/sysv bug involving getpwnam() preventing password authentication from working in some cases. hp-ux may need similar workaround but not yet verified. o Prefer the result of getlogin() to getpwuid(getuid()). o HP-UX port. Many thanks to Malte Cornils for help with the port. HP-UX 10.20 should work, HP-UX 11.00 currently doesn't. o AIX port. Many thanks to M. Everett Hinckley (everett@lsli.com) and Tommy Chan for doing the port. Great work. AIX 4.2.1 should work. o share some of the client interposition code with the server; lets libwrap (and any other external library) use the hostname/hostaddress cache too, making things faster for those using libwrap. o always call gettimedout() regardless of select(), fixes an theoretically possible problem. Brought up by Per Hedeland (per@erix.ericsson.se). o assume the globally allowed methods are already set when parsing the rules. Allows more checking/warning about "strange" rules. o fix a bug so portranges get parsed again, instead of reporting syntax error. o some cleanup/generalization in preparation for cryptography support. o in the case of the commands "bindreply" and "udpreply", "method" based itself on the controlconnection rather than the remote "reply". Corrected to base itself on the remote reply. o when printing authinfo, include what the name of authmethod used is. o removed the "feature" that a user listed with the same name as a method would be considered special; too complex for practical use. No more magic names. o clientrules now also take a method field, only non-socks method can be listed there of course; currently that's "none" and "rfc931". o call gethostbyname2() internally instead of gethostbyname(); fixes a client problem present in some environments. Problem described by Per Hedeland (per@erix.ericsson.se). Special compatibility notes for users upgrading from previous versions of Dante: Server part: - In the previous versions the "method" field in the rules specifying bind/udp-replies wasn't used entirely correct; it used the socksclient as the source when matching the method field, rather than the source of the reply, a non-socks connection. The correct usage should be that the method field is relative to the sourceaddress, and the sourceaddress for replies is a "non-socks" connection. Special care might have to be taken to not accidently block the replies since most of them can only be using method "none" (the only other alternative is "rfc931"). - The "feature" that a "user" listed with the same name as a "method" would be considered special has been removed. Instead "client-rules" now take a "method" specification on the same form as the "socks-rules". They also use the global method line in the same way as socks-rules. - The feature that "libwrap: rfc931" would include the rfc931 (ident) name in logging has been removed. This functionality should instead be provided by adding a additional rule, almost identical to the rule with "libwrap: rfc931", before the "libwrap: rfc931" rule. The only difference is that the added rule should have "method: rfc931" specified instead of "libwrap: rfc931". "libwrap: rfc931" should also be removed from the old rule. The first rule will try to do send a rfc931 query to the client address. If that fails, Dante moves on to the next rule, which in this case does not require a successful rfc931 lookup. Refer to example/sockd.conf for more information. *** Wednesday, January 5, 2000 -- Dante v1.1.1 o Can't do rulespermit() that early, move to after connect(). Fixes a hang that could occur when using libwrap, thanks to Marc G. Fournier (marc.fournier@acadiau.ca) for help and testing. o socksify on elf-based FreeBSD systems should hopefully work now; thanks to Andre Albsmeier for testing. o Allow specifying what facility to use for syslog output. Code mostly from Per Hedeland (per@erix.ericsson.se). o Fix bug preventing one of the serverchilds from dying when the server is killed. Reported by Per Hedeland (per@erix.ericsson.se). o config.c: increment pointed to area, not pointer. Patch from Per Hedeland (per@erix.ericsson.se). *** Monday, Sep 27, 1999 -- Dante v1.1 o Obscure bug on osf causing problems for /usr/bin/ftp fixed. o new command for socks-rules added: "udpreply". This is analogous to the "bindreply" command and replaces the old way of saying what addresses udppacket "replies" shall be allowed from. o starting the server with debugging on will automatically enable more logging rather than requiring user to set it manually for each rule. o misc minor fixes; more consistent and correct logoutput, handle more temporary errors, some bugs fixed too. o fixed some of the finer details of the main i/o loop. o pretend Rgetsockname() works on udp sockets; might help some programs. o tuned some things for better i/o performance though also greater resource usage. o better support for profiling. o The name and location of the configuration files can now be changed via arguments to ./configure too. Requested by Albert Chin-A-Young (china@thewrittenword.com). o Problems with glibc-2.1 diagnosed. See the FAQ for details. o libtool-1.3.3 o Building of dlib/interposition.c cleaned up. o try to throttle childcreation if it looks like there is a problem. Suggested by Robert Loomans (robertl@jinx.silas.unsw.edu.au). o added a new method: "rfc931"; matches users against rfc931/ident lookup. Requested by Per Hedeland (per@erix.ericsson.se). o added a new keyword: "user:"; limits the acceptable users on a rule-by-rule basis. o rewrote addressmatch(). This sort of reverses the logic and is also no longer recursive. Much Thanks to Per Hedeland (per@erix.ericsson.se) for pointing out some problems here and helping with making this hopefully more correct. Any mistakes are obviously our own. o SIGINFO signal is now broadcast to children too. o always set default socks serverport so server doesn't complain if using default on sighup; Fix from Per Hedeland (per@erix.ericsson.se). o make server write out correct pid when started with -D. Problem reported by Per Hedeland (per@erix.ericsson.se). o depending on how one configured the userid's used by the server, it could sometimes fail. Problem described by Per Hedeland (per@erix.ericsson.se). *** Monday, Jun 7, 1999 -- Dante v1.0.1 o fixes bug preventing "iotimeout" variable in sockd.conf from working correctly. o minor improvements to sockd.conf.5 manpage. *** Monday, May 31, 1999 -- Dante v1.0.0 o support for sun/dec/sgi cc. o osf4.0a port. Thanks to Jay Weber (jweb@accessus.net) for help with the port and an account to test it on. o Set subnegotiationversion in username method correctly. Thanks to Marc Haber (Marc.Haber@gmx.de) and Olaf Titz (olaf@bigred.inka.de). o Caches resolved hostnames/addresses. Problem of not having it first brought up by Devin Nate (devin.nate@bridgecomm.net), thanks. Several new variables were added to config.h for tuning the cache. o srchost flags settable in configfile, see sockd.conf(8) for more info. o Addressmatching much improved and should now be "complete". o libtool-1.3 o Try to locate newest libc on linux, allow manual specification in worst case. o irix 6.2 port. o Update to autoconf 2.13 and automake 1.4. o New keyword in client configfile: "resolveprotocol". Must be set to "fake" on clients that can not resolve hostnames. o Support resolving hostnames for socks v4 clients too (requires the Dante client but should work with any socks server). o Compilation problems on Solaris 7 fixed. Reported by and fixed with the help of Stephen C. Hailey . o Library conflict on linux systems with several libc versions (gnu/non-gnu?) resolved, reported by Martin Piskernig . o Configparsing reworked, should no longer care much about the order of things. o The library with dlopen should be correctly found for socksify. o Let user know if we failed due to authentication on at msproxy server. o "protocolversion" renamed to "proxyprotocol" in clientconfig, also changed the value names. o version in reply for socksv4 is not same as in request, reported by Stefan Reiner (stefanr@segue.at). o added experimental support for msproxy v2, supports tcp. o better support for clients that can't resolve hostnames. o nonblocking connects have a chance of working on linux too now. *** Monday, December 14, 1998 -- Dante v0.91.1. o a nasty typo. *** Monday, December 14, 1998 -- Dante v0.91.0. o all reported bugs and compilation problems fixed. o much improved UDP support, using calls other than sendto()/recvfrom() on UDP sockets should now work. o spread SO_KEEPALIVE to all appropriate sockets, added option "-n" to switch SO_KEEPALIVE off. Old "-n" became "-N". o nonblocking connect stuff redesigned, should now handle all cases and also makes ftp client in lynx work. o more documentation available. o --enable-diagnostic option added to configure o cache's username/password, does not prompt twice. o Server is no longer tested on Solaris 2.5.1, we have switched to 2.6 due to all the 2.5.1 specific problems. Much of the bandaid necessary for Solaris 2.5.1 is still present in this version but will probably be removed in next version. o Socksify program now also works on SunOS and Linux. *** Monday, November 16, 1998 -- Dante v0.90.0. o A socks client and server implementation for UNIX. dante-1.1.19.dfsg/TODO0000644000175000017500000000115010345565440012771 0ustar roamroam# $Id: TODO,v 1.168 2005/11/08 16:04:05 michaels Exp $ * change _t struct's to typedef. * share host/addr cache across processes. * get and send all argument to old signalhandler when necessary. * clean up namespace. * make requestchildren support multiple clients too. * shrink io_t, too big. * Solaris cc needs -misalign due to alignment problems with sockaddr/ sockaddr_in casts. causes coredump with ftp (passive ls) in client, in sockshost2sockaddr (util.c, line 271, version 1.94). * match configure/manual config/pid location * port code for interface/route info retrieval to OSF * IPV6 support dante-1.1.19.dfsg/VERSION.in0000644000175000017500000000002006745341706013757 0ustar roamroamDante @VERSION@ dante-1.1.19.dfsg/capi/0000755000175000017500000000000011037370225013212 5ustar roamroamdante-1.1.19.dfsg/capi/socks.h0000644000175000017500000001143610251510610014501 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ /* $Id: socks.h,v 1.12 2005/06/01 13:46:35 karls Exp $ */ #include #include /* * The definition of bindresvport below might conflict with * ... best workaround seems to be to make sure the * file is included prior to the #define */ #include #include #define accept Raccept #define bind Rbind #define bindresvport Rbindresvport #define connect Rconnect #define gethostbyname Rgethostbyname #define gethostbyname2 Rgethostbyname2 #define getaddrinfo Rgetaddrinfo #define getipnodebyname Rgetipnodebyname #define getpeername Rgetpeername #define getsockname Rgetsockname #define read Rread #define readv Rreadv #define recv Rrecv #define recvfrom Rrecvfrom #define recvfrom Rrecvfrom #define recvmsg Rrecvmsg #define rresvport Rrresvport #define send Rsend #define sendmsg Rsendmsg #define sendto Rsendto #define write Rwrite #define writev Rwritev int SOCKSinit(char *progname); /* * If you want to, call this function with "progname" as the name of * your program. For systems that do not have __progname. * Returns: * On success: 0. */ #undef __P #if defined (__STDC__) || defined (_AIX) \ || (defined (__mips) && defined (_SYSTYPE_SVR4)) \ || defined(WIN32) || defined(__cplusplus) # define __P(protos) protos #else # define __P(protos) () #endif int Raccept __P((int, struct sockaddr *, socklen_t *)); int Rconnect __P((int, const struct sockaddr *, socklen_t)); int Rgetsockname __P((int, struct sockaddr *, socklen_t *)); int Rgetpeername __P((int, struct sockaddr *, socklen_t *)); ssize_t Rsendto __P((int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)); ssize_t Rrecvfrom __P((int s, void *buf, size_t len, int flags, struct sockaddr * from, socklen_t *fromlen)); ssize_t Rsendmsg __P((int s, const struct msghdr *msg, int flags)); ssize_t Rrecvmsg __P((int s, struct msghdr *msg, int flags)); int Rbind __P((int, const struct sockaddr *, socklen_t)); int Rbindresvport __P((int, struct sockaddr_in *)); int Rrresvport __P((int *)); struct hostent *Rgethostbyname __P((const char *)); struct hostent *Rgethostbyname2 __P((const char *, int af)); int Rgetaddrinfo __P((const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res)); struct hostent *Rgetipnodebyname __P((const char *name, int af, int flags, int *error_num)); ssize_t Rwrite __P((int d, const void *buf, size_t nbytes)); ssize_t Rwritev __P((int d, const struct iovec *iov, int iovcnt)); ssize_t Rsend __P((int s, const void *msg, size_t len, int flags)); ssize_t Rread __P((int d, void *buf, size_t nbytes)); ssize_t Rreadv __P((int d, const struct iovec *iov, int iovcnt)); ssize_t Rrecv __P((int s, void *msg, size_t len, int flags)); int Rlisten __P((int, int)); int Rselect __P((int, fd_set *, fd_set *, fd_set *, struct timeval *)); dante-1.1.19.dfsg/capi/Makefile.am0000644000175000017500000000003107235620635015250 0ustar roamroaminclude_HEADERS = socks.hdante-1.1.19.dfsg/capi/Makefile.in0000644000175000017500000002773010362704162015271 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = capi DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(includedir)" includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ include_HEADERS = socks.h 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu capi/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu capi/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 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ rm -f "$(DESTDIR)$(includedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(HEADERS) installdirs: for dir in "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-includeHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am \ install-includeHEADERS install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-info-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: dante-1.1.19.dfsg/dlib/0000755000175000017500000000000011037370225013210 5ustar roamroamdante-1.1.19.dfsg/dlib/int_osf1.c0000644000175000017500000001450207700305310015073 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" #if HAVE_EXTRA_OSF_SYMBOLS #if SOCKSLIBRARY_DYNAMIC static const char rcsid[] = "$Id: int_osf1.c,v 1.12 2003/07/01 13:21:12 michaels Exp $"; #undef accept #undef getpeername #undef getsockname #undef readv #undef recvfrom #undef recvmsg #undef sendmsg #undef writev /* the system calls. */ int sys_Eaccept(s, addr, addrlen) int s; struct sockaddr * addr; socklen_t *addrlen; { int rc; int (*function)(int s, struct sockaddr * addr, socklen_t *addrlen); SYSCALL_START(s); function = symbolfunction(SYMBOL_EACCEPT); rc = function(s, addr, addrlen); SYSCALL_END(s); return rc; } int sys_Egetpeername(s, name, namelen) int s; struct sockaddr * name; socklen_t *namelen; { int rc; int (*function)(int s, const struct sockaddr * name, socklen_t *namelen); SYSCALL_START(s); function = symbolfunction(SYMBOL_EGETPEERNAME); rc = function(s, name, namelen); SYSCALL_END(s); return rc; } int sys_Egetsockname(s, name, namelen) int s; struct sockaddr * name; socklen_t *namelen; { int rc; int (*function)(int s, const struct sockaddr * name, socklen_t *namelen); SYSCALL_START(s); function = symbolfunction(SYMBOL_EGETSOCKNAME); rc = function(s, name, namelen); SYSCALL_END(s); return rc; } ssize_t sys_Ereadv(d, iov, iovcnt) int d; const struct iovec *iov; int iovcnt; { ssize_t rc; int (*function)(int d, const struct iovec *iov, int iovcnt); SYSCALL_START(d); function = symbolfunction(SYMBOL_EREADV); rc = function(d, iov, iovcnt); SYSCALL_END(d); return rc; } int sys_Erecvfrom(s, buf, len, flags, from, fromlen) int s; void *buf; size_t len; int flags; struct sockaddr * from; size_t *fromlen; { int rc; int (*function)(int s, void *buf, size_t len, int flags, struct sockaddr * from, socklen_t *fromlen); SYSCALL_START(s); function = symbolfunction(SYMBOL_ERECVFROM); rc = function(s, buf, len, flags, from, fromlen); SYSCALL_END(s); return rc; } ssize_t sys_Erecvmsg(s, msg, flags) int s; struct msghdr *msg; int flags; { ssize_t rc; int (*function)(int s, struct msghdr *msg, int flags); SYSCALL_START(s); function = symbolfunction(SYMBOL_ERECVMSG); rc = function(s, msg, flags); SYSCALL_END(s); return rc; } ssize_t sys_Esendmsg(s, msg, flags) int s; const struct msghdr *msg; int flags; { ssize_t rc; int (*function)(int s, const struct msghdr *msg, int flags); SYSCALL_START(s); function = symbolfunction(SYMBOL_ESENDMSG); rc = function(s, msg, flags); SYSCALL_END(s); return rc; } ssize_t sys_Ewritev(d, iov, iovcnt) int d; const struct iovec *iov; int iovcnt; { ssize_t rc; int (*function)(int d, const struct iovec *buf, int iovcnt); SYSCALL_START(d); function = symbolfunction(SYMBOL_EWRITEV); rc = function(d, iov, iovcnt); SYSCALL_END(d); return rc; } /* * the interpositioned functions. */ int _Eaccept(s, addr, addrlen) int s; struct sockaddr * addr; socklen_t *addrlen; { if (ISSYSCALL(s)) return sys_Eaccept(s, addr, addrlen); return Raccept(s, addr, addrlen); } int _Egetpeername(s, name, namelen) int s; struct sockaddr * name; socklen_t *namelen; { if (ISSYSCALL(s)) return sys_Egetpeername(s, name, namelen); return Rgetpeername(s, name, namelen); } int _Egetsockname(s, name, namelen) int s; struct sockaddr * name; socklen_t *namelen; { if (ISSYSCALL(s)) return sys_Egetsockname(s, name, namelen); return Rgetsockname(s, name, namelen); } ssize_t _Ereadv(d, iov, iovcnt) int d; const struct iovec *iov; int iovcnt; { if (ISSYSCALL(d)) return sys_Ereadv(d, iov, iovcnt); return Rreadv(d, iov, iovcnt); } ssize_t _Erecvfrom(s, buf, len, flags, from, fromlen) int s; void *buf; size_t len; int flags; struct sockaddr * from; size_t *fromlen; { if (ISSYSCALL(s)) return sys_Erecvfrom(s, buf, len, flags, from, fromlen); return Rrecvfrom(s, buf, len, flags, from, fromlen); } ssize_t _Erecvmsg(s, msg, flags) int s; struct msghdr *msg; int flags; { if (ISSYSCALL(s)) return sys_Erecvmsg(s, msg, flags); return Rrecvmsg(s, msg, flags); } ssize_t _Ewritev(d, iov, iovcnt) int d; const struct iovec *iov; int iovcnt; { if (ISSYSCALL(d)) return sys_Ewritev(d, iov, iovcnt); return Rwritev(d, iov, iovcnt); } ssize_t _Esendmsg(s, msg, flags) int s; const struct msghdr *msg; int flags; { if (ISSYSCALL(s)) return sys_Esendmsg(s, msg, flags); return Rsendmsg(s, msg, flags); } #endif /* SOCKSLIBRARY_DYNAMIC */ #endif /* HAVE_EXTRA_OSF_SYMBOLS */ dante-1.1.19.dfsg/dlib/int_osf2.c0000644000175000017500000001263607700305310015102 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" #if HAVE_EXTRA_OSF_SYMBOLS #if SOCKSLIBRARY_DYNAMIC static const char rcsid[] = "$Id: int_osf2.c,v 1.11 2003/07/01 13:21:12 michaels Exp $"; #undef accept #undef getpeername #undef getsockname #undef recvfrom #undef recvmsg #undef sendmsg /* nfoo versions (with sockaddr len) of the system calls. */ int sys_naccept(s, addr, addrlen) int s; struct sockaddr *addr; socklen_t *addrlen; { int rc; int (*function)(int s, struct sockaddr *addr, socklen_t *addrlen); SYSCALL_START(s); function = symbolfunction(SYMBOL_NACCEPT); rc = function(s, addr, addrlen); SYSCALL_END(s); return rc; } int sys_ngetpeername(s, name, namelen) int s; struct sockaddr *name; socklen_t *namelen; { int rc; int (*function)(int s, const struct sockaddr *name, socklen_t *namelen); SYSCALL_START(s); function = symbolfunction(SYMBOL_NGETPEERNAME); rc = function(s, name, namelen); SYSCALL_END(s); return rc; } int sys_ngetsockname(s, name, namelen) int s; struct sockaddr *name; socklen_t *namelen; { int rc; int (*function)(int s, const struct sockaddr *name, socklen_t *namelen); SYSCALL_START(s); function = symbolfunction(SYMBOL_NGETSOCKNAME); rc = function(s, name, namelen); SYSCALL_END(s); return rc; } int sys_nrecvfrom(s, buf, len, flags, from, fromlen) int s; void *buf; size_t len; int flags; struct sockaddr *from; size_t *fromlen; { int rc; int (*function)(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); SYSCALL_START(s); function = symbolfunction(SYMBOL_NRECVFROM); rc = function(s, buf, len, flags, from, fromlen); SYSCALL_END(s); return rc; } ssize_t sys_nrecvmsg(s, msg, flags) int s; struct msghdr *msg; int flags; { ssize_t rc; int (*function)(int s, struct msghdr *msg, int flags); SYSCALL_START(s); function = symbolfunction(SYMBOL_NRECVMSG); rc = function(s, msg, flags); SYSCALL_END(s); return rc; } ssize_t sys_nsendmsg(s, msg, flags) int s; const struct msghdr *msg; int flags; { ssize_t rc; int (*function)(int s, const struct msghdr *msg, int flags); SYSCALL_START(s); function = symbolfunction(SYMBOL_NSENDMSG); rc = function(s, msg, flags); SYSCALL_END(s); return rc; } /* * the interpositioned functions. */ int naccept(s, addr, addrlen) int s; struct sockaddr *addr; socklen_t *addrlen; { if (ISSYSCALL(s)) return sys_naccept(s, addr, addrlen); return Raccept(s, addr, addrlen); } int ngetpeername(s, name, namelen) int s; struct sockaddr *name; socklen_t *namelen; { if (ISSYSCALL(s)) return sys_ngetpeername(s, name, namelen); return Rgetpeername(s, name, namelen); } int ngetsockname(s, name, namelen) int s; struct sockaddr *name; socklen_t *namelen; { if (ISSYSCALL(s)) return sys_ngetpeername(s, name, namelen); return Rgetsockname(s, name, namelen); } ssize_t nrecvfrom(s, buf, len, flags, from, fromlen) int s; void *buf; size_t len; int flags; struct sockaddr *from; size_t *fromlen; { if (ISSYSCALL(s)) return sys_nrecvfrom(s, buf, len, flags, from, fromlen); return Rrecvfrom(s, buf, len, flags, from, fromlen); } ssize_t nrecvmsg(s, msg, flags) int s; struct msghdr *msg; int flags; { if (ISSYSCALL(s)) return sys_nrecvmsg(s, msg, flags); return Rrecvmsg(s, msg, flags); } ssize_t nsendmsg(s, msg, flags) int s; const struct msghdr *msg; int flags; { if (ISSYSCALL(s)) return sys_nsendmsg(s, msg, flags); return Rsendmsg(s, msg, flags); } #endif /* SOCKSLIBRARY_DYNAMIC */ #endif /* HAVE_EXTRA_OSF_SYMBOLS */ dante-1.1.19.dfsg/dlib/int_osf3.c0000644000175000017500000003221507700305311015077 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "autoconf.h" #if HAVE_EXTRA_OSF_SYMBOLS #if SOCKSLIBRARY_DYNAMIC #undef _XOPEN_SOURCE_EXTENDED #undef _SOCKADDR_LEN #define HAVE_OSF_OLDSTYLE 1 /* * use of bzero in SYSCALL_START produces vast amounts of warnings * when compiling int_osf3.c (on OSF) */ #define bzero(a, b) (memset(a, 0, b)) #define SOCKS_DLIB_OSF /* XXX prevents DEC cc from redefining these to _Ereadv/_Ewritev */ #define readv XXX #define writev XXX #include "common.h" static const char rcsid[] = "$Id: int_osf3.c,v 1.25 2003/07/01 13:21:13 michaels Exp $"; #undef accept #undef bind #undef getpeername #undef getsockname #undef recvfrom #undef recvmsg #undef sendmsg #undef connect #undef readv #undef writev #undef sendto /* XXX Attempt to support old library calls, which use old version of sockaddr and msghdr struct. Other parts of libdsocks are compiled using the new versions. */ /* sockaddr struct, with sa_len */ struct n_sockaddr { unsigned char sa_len; /* total length */ sa_family_t sa_family; /* address family */ char sa_data[14]; /* actually longer; address value */ }; struct n_msghdr { void *msg_name; /* optional address */ size_t msg_namelen; /* size of address */ struct iovec *msg_iov;/* scatter/gather array */ int msg_iovlen; /* # elements in msg_iov */ void *msg_control; /* ancillary data, see below */ size_t msg_controllen;/* ancillary data buffer len */ int msg_flags; /* flags on received message */ }; __BEGIN_DECLS ssize_t Rsendto __P((int, const void *, size_t, int, const struct n_sockaddr *, socklen_t)); int Rconnect __P((int, const struct n_sockaddr *, socklen_t)); ssize_t Rsendmsg __P((int, const struct n_msghdr *, int)); ssize_t Rrecvfrom __P((int, void *, int, int, struct n_sockaddr *, socklen_t *)); int Rgetsockname __P((int, struct n_sockaddr *, socklen_t *)); int Rgetpeername __P((int, struct n_sockaddr *, socklen_t *)); int Raccept __P((int, struct n_sockaddr *, socklen_t *)); ssize_t Rrecvmsg __P((int s, struct n_msghdr *msg, int flags)); int Rbind __P((int, const struct n_sockaddr *, socklen_t)); __END_DECLS /* 'old' versions (with sockaddr len) of the system calls. */ int sys_accept(s, addr, addrlen) int s; struct sockaddr *addr; int *addrlen; { int rc; int (*function)(int s, struct sockaddr * addr, socklen_t *addrlen); SYSCALL_START(s); function = symbolfunction(SYMBOL_ACCEPT); rc = function(s, addr, (socklen_t *) addrlen); SYSCALL_END(s); return rc; } int sys_getpeername(s, name, namelen) int s; struct sockaddr *name; int *namelen; { int rc; int (*function)(int s, const struct sockaddr * name, socklen_t *namelen); SYSCALL_START(s); function = symbolfunction(SYMBOL_GETPEERNAME); rc = function(s, name, (socklen_t *) namelen); SYSCALL_END(s); return rc; } int sys_getsockname(s, name, namelen) int s; struct sockaddr *name; int *namelen; { int rc; int (*function)(int s, const struct sockaddr * name, socklen_t *namelen); SYSCALL_START(s); function = symbolfunction(SYMBOL_GETSOCKNAME); rc = function(s, name, (socklen_t *) namelen); SYSCALL_END(s); return rc; } int sys_recvfrom(s, buf, len, flags, from, fromlen) int s; void *buf; int len; int flags; struct sockaddr *from; int *fromlen; { int rc; int (*function)(int s, void *buf, size_t len, int flags, struct sockaddr * from, socklen_t *fromlen); SYSCALL_START(s); function = symbolfunction(SYMBOL_RECVFROM); rc = function(s, buf, len, flags, from, (socklen_t *) fromlen); SYSCALL_END(s); return rc; } ssize_t sys_recvmsg(s, msg, flags) int s; struct msghdr *msg; int flags; { ssize_t rc; int (*function)(int s, struct msghdr *msg, int flags); SYSCALL_START(s); function = symbolfunction(SYMBOL_RECVMSG); rc = function(s, msg, flags); SYSCALL_END(s); return rc; } ssize_t sys_sendmsg(s, msg, flags) int s; struct msghdr *msg; int flags; { ssize_t rc; int (*function)(int s, const struct msghdr *msg, int flags); SYSCALL_START(s); function = symbolfunction(SYMBOL_SENDMSG); rc = function(s, msg, flags); SYSCALL_END(s); return rc; } ssize_t sys_readv(d, iov, iovcnt) int d; const struct iovec *iov; int iovcnt; { ssize_t rc; int (*function)(int d, const struct iovec *iov, int iovcnt); SYSCALL_START(d); function = symbolfunction(SYMBOL_READV); rc = function(d, iov, iovcnt); SYSCALL_END(d); return rc; } ssize_t sys_writev(d, iov, iovcnt) int d; const struct iovec *iov; int iovcnt; { ssize_t rc; int (*function)(int d, const struct iovec *buf, int iovcnt); SYSCALL_START(d); function = symbolfunction(SYMBOL_WRITEV); rc = function(d, iov, iovcnt); SYSCALL_END(d); return rc; } int sys_connect(s, name, namelen) int s; const struct sockaddr *name; int namelen; { int rc; int (*function)(int s, const struct sockaddr * name, socklen_t namelen); SYSCALL_START(s); function = symbolfunction(SYMBOL_CONNECT); rc = function(s, name, namelen); SYSCALL_END(s); return rc; } int sys_bind(s, name, namelen) int s; const struct sockaddr *name; int namelen; { int rc; int (*function)(int s, const struct sockaddr *name, socklen_t namelen); SYSCALL_START(s); function = symbolfunction(SYMBOL_BIND); rc = function(s, name, namelen); SYSCALL_END(s); return rc; } int sys_sendto(s, msg, len, flags, to, tolen) int s; const void *msg; int len; int flags; const struct sockaddr *to; socklen_t tolen; { ssize_t rc; int (*function)(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); SYSCALL_START(s); function = symbolfunction(SYMBOL_SENDTO); rc = function(s, msg, len, flags, to, tolen); SYSCALL_END(s); return rc; } /* * the interpositioned functions. */ /* sockaddr *, new len */ #define ADDRLEN_SET(a,b) (((a) == NULL) ? 0 : (b)) #ifdef lint extern const int lintnoloop_int_osf3_c; #else #define lintnoloop_int_osf3_c 0 #endif /* source sockaddr, len, dest sockaddr, len */ #define SOCKADDR_COPYRES(a,b,c,d) \ do { if (((c) != NULL) && (*(d) > 0) && (*(b) > 0)) { \ struct n_sockaddr n = *(a); \ int tmplen = *(d); \ \ if (tmplen >= sizeof(n.sa_family)) \ (c)->sa_family = (unsigned short)n.sa_family; \ tmplen -= sizeof((c)->sa_family); \ tmplen = MAX(0, tmplen); \ memcpy((c)->sa_data, n.sa_data, (size_t)tmplen); \ *(d) = MIN(*d, sizeof(struct sockaddr)); \ } \ } while (lintnoloop_int_osf3_c) /* source sockaddr, len, dest sockaddr, len */ #define SOCKADDR_COPYPARAM(a,b,c,d) \ do { if (((a) != NULL) && (*(b) > 0)) { \ struct n_sockaddr n; \ int tmplen = *(b); \ \ bzero((char *)&n, sizeof(n)); \ /* struct sockaddr -> sa_family == unsigned short */ \ if (tmplen >= sizeof(unsigned short)) \ n.sa_family = (sa_family_t)(a)->sa_family; \ tmplen -= sizeof(n.sa_family); \ tmplen = MAX(0, tmplen); \ memcpy(n.sa_data, (a)->sa_data, (size_t)tmplen); \ *(d) = sizeof(n); \ *c = n; \ } else { \ *(d) = *(b); \ } \ } while (lintnoloop_int_osf3_c) int accept(s, addr, addrlen) int s; struct sockaddr *addr; int *addrlen; { struct n_sockaddr n_addr; socklen_t n_addrlen; int rc; if (ISSYSCALL(s)) return sys_accept(s, addr, addrlen); n_addrlen = ADDRLEN_SET(addr, sizeof(n_addr)); rc = Raccept(s, &n_addr, &n_addrlen); if (rc != -1) SOCKADDR_COPYRES(&n_addr, &n_addrlen, addr, addrlen); return rc; } int getpeername(s, name, namelen) int s; struct sockaddr *name; int *namelen; { struct n_sockaddr n_name; socklen_t n_namelen; int rc; if (ISSYSCALL(s)) return sys_getpeername(s, name, namelen); n_namelen = ADDRLEN_SET(name, sizeof(n_name)); rc = Rgetpeername(s, &n_name, &n_namelen); if (rc != -1) SOCKADDR_COPYRES(&n_name, &n_namelen, name, namelen); return rc; } int getsockname(s, name, namelen) int s; struct sockaddr *name; int *namelen; { struct n_sockaddr n_name; socklen_t n_namelen; int rc; if (ISSYSCALL(s)) return sys_getsockname(s, name, namelen); n_namelen = ADDRLEN_SET(name, sizeof(n_name)); rc = Rgetsockname(s, &n_name, &n_namelen); if (rc != -1) SOCKADDR_COPYRES(&n_name, &n_namelen, name, namelen); return rc; } int recvfrom(s, buf, len, flags, from, fromlen) int s; void *buf; int len; int flags; struct sockaddr *from; int *fromlen; { struct n_sockaddr n_from; socklen_t n_fromlen; ssize_t rc; if (ISSYSCALL(s)) return sys_recvfrom(s, buf, len, flags, from, fromlen); n_fromlen = ADDRLEN_SET(from, sizeof(n_from)); rc = Rrecvfrom(s, buf, len, flags, (struct n_sockaddr *)&n_from, &n_fromlen); if (rc != -1) SOCKADDR_COPYRES(&n_from, &n_fromlen, from, fromlen); return rc; } int recvmsg(s, msg, flags) int s; struct msghdr *msg; int flags; { struct n_msghdr n_msg; ssize_t rc; if (ISSYSCALL(s)) return sys_recvmsg(s, msg, flags); bzero((char *)&n_msg, sizeof(struct n_msghdr)); n_msg.msg_name = msg->msg_name; n_msg.msg_namelen = msg->msg_namelen; n_msg.msg_iov = msg->msg_iov; n_msg.msg_iovlen = msg->msg_iovlen; /* XXX msg_control/msg_accrights */ rc = Rrecvmsg(s, &n_msg, flags); if (rc != -1) { msg->msg_name = n_msg.msg_name; msg->msg_namelen = n_msg.msg_namelen; msg->msg_iov = n_msg.msg_iov; msg->msg_iovlen = n_msg.msg_iovlen; /* XXX msg_control / msg_accrights */ if (n_msg.msg_controllen != 0) swarn("warning: msg_accrights/controllen conversion not supported"); } return rc; } int sendmsg(s, msg, flags) int s; struct msghdr *msg; int flags; { struct n_msghdr n_msg; ssize_t rc; if (ISSYSCALL(s)) return sys_sendmsg(s, msg, flags); bzero((char *)&n_msg, sizeof(struct n_msghdr)); n_msg.msg_name = msg->msg_name; n_msg.msg_namelen = msg->msg_namelen; n_msg.msg_iov = msg->msg_iov; n_msg.msg_iovlen = msg->msg_iovlen; /* XXX msg_control/msg_accrights */ if (msg->msg_accrightslen != 0) swarn("warning: msg_accrights/controllen conversion not supported"); rc = Rsendmsg(s, (struct n_msghdr *)&n_msg, flags); if (rc != -1) { msg->msg_name = n_msg.msg_name; msg->msg_namelen = n_msg.msg_namelen; msg->msg_iov = n_msg.msg_iov; msg->msg_iovlen = n_msg.msg_iovlen; /* XXX msg_control / msg_accrights */ } return rc; } int connect(s, name, namelen) int s; const struct sockaddr *name; int namelen; { struct n_sockaddr n_name; int n_namelen; if (ISSYSCALL(s)) return sys_connect(s, name, namelen); SOCKADDR_COPYPARAM(name, &namelen, &n_name, &n_namelen); return Rconnect(s, &n_name, n_namelen); } int bind(s, name, namelen) int s; const struct sockaddr *name; int namelen; { struct n_sockaddr n_name; int n_namelen; if (ISSYSCALL(s)) return sys_bind(s, name, namelen); SOCKADDR_COPYPARAM(name, &namelen, &n_name, &n_namelen); return Rbind(s, &n_name, n_namelen); } int sendto(s, msg, len, flags, to, tolen) int s; const void *msg; int len; int flags; const struct sockaddr *to; int tolen; { struct n_sockaddr n_to; int n_tolen; if (ISSYSCALL(s)) return sys_sendto(s, msg, len, flags, to, tolen); SOCKADDR_COPYPARAM(to, &tolen, &n_to, &n_tolen); return Rsendto(s, msg, len, flags, &n_to, n_tolen); } ssize_t writev(d, iov, iovcnt) int d; const struct iovec *iov; int iovcnt; { if (ISSYSCALL(d)) return sys_writev(d, iov, iovcnt); return Rwritev(d, iov, iovcnt); } ssize_t readv(d, iov, iovcnt) int d; const struct iovec *iov; int iovcnt; { if (ISSYSCALL(d)) return sys_readv(d, iov, iovcnt); return Rreadv(d, iov, iovcnt); } #endif /* SOCKSLIBRARY_DYNAMIC */ #endif /* HAVE_EXTRA_OSF_SYMBOLS */ dante-1.1.19.dfsg/dlib/config_scan.c0000644000175000017500000033077610351604021015635 0ustar roamroam#define yy_create_buffer socks_yy_create_buffer #define yy_delete_buffer socks_yy_delete_buffer #define yy_scan_buffer socks_yy_scan_buffer #define yy_scan_string socks_yy_scan_string #define yy_scan_bytes socks_yy_scan_bytes #define yy_flex_debug socks_yy_flex_debug #define yy_init_buffer socks_yy_init_buffer #define yy_flush_buffer socks_yy_flush_buffer #define yy_load_buffer_state socks_yy_load_buffer_state #define yy_switch_to_buffer socks_yy_switch_to_buffer #define yyin socks_yyin #define yyleng socks_yyleng #define yylex socks_yylex #define yyout socks_yyout #define yyrestart socks_yyrestart #define yytext socks_yytext #define yylineno socks_yylineno #line 20 "config_scan.c" /* $OpenBSD: flex.skl,v 1.8 2004/02/09 11:38:31 espie Exp $ */ /* A lexical scanner generated by flex */ /* Scanner skeleton version: * $Header: /cvs/src/usr.bin/lex/flex.skl,v 1.8 2004/02/09 11:38:31 espie Exp $ */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #include #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include #include /* Use prototypes in function declarations. */ #define YY_USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ #ifdef __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch #pragma warn -use #include #include #define YY_USE_CONST #define YY_USE_PROTOS #endif #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define YY_BUF_SIZE 16384 typedef struct yy_buffer_state *YY_BUFFER_STATE; extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yyless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int yy_size_t; struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define YY_CURRENT_BUFFER yy_current_buffer /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) #define YY_USES_REJECT #define yywrap() 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yytext_ptr = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_NUM_RULES 84 #define YY_END_OF_BUFFER 85 static yyconst short int yy_acclist[750] = { 0, 26, 26, 85, 83, 84, 79, 83, 84, 81, 84, 80, 83, 84, 78, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 21, 83, 84, 78, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 83, 84, 25, 83, 84, 83, 84, 83, 84, 83, 84, 26, 83, 84, 26, 79, 83, 84, 26, 80, 83, 84, 26, 78, 83, 84, 26, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 23, 83, 84, 23, 80, 83, 84, 23, 78, 83, 84, 23, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 19, 78, 83, 84, 12, 83, 84, 12, 83, 84, 12, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 24, 83, 84, 24, 80, 83, 84, 24, 78, 83, 84, 24, 83, 84, 20, 78, 83, 84, 18, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 79, 80, 80, 78, 82, 44, 21, 78, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 44, 22, 22, 26, 26, 79, 26, 80, 26, 80, 26, 26, 78, 23, 23, 80, 23, 23, 78, 12, 19, 78, 24, 24, 80, 24, 24, 78, 20, 78, 18, 18, 78, 73, 45, 21, 21, 21, 78, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 73, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 45, 26, 26, 78, 23, 23, 78, 70, 19, 78, 24, 24, 78, 20, 78, 29, 30, 78, 62, 43, 49, 72, 52, 21, 21, 78, 22, 22, 62, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 43, 22, 22, 22, 22, 22, 22, 22, 22, 49, 22, 22, 72, 22, 22, 22, 22, 22, 22, 22, 22, 22, 52, 11, 5, 26, 26, 26, 78, 14, 23, 23, 23, 78, 66, 19, 78, 24, 24, 24, 78, 20, 78, 31, 71, 32, 33, 48, 21, 22, 22, 71, 22, 22, 22, 22, 22, 22, 32, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 21, 22, 22, 22, 22, 22, 22, 22, 33, 48, 22, 22, 26, 26, 16, 23, 23, 19, 78, 24, 24, 20, 78, 63, 64, 22, 22, 63, 22, 22, 22, 10, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 64, 21, 22, 22, 22, 22, 22, 22, 22, 22, 21, 21, 21, 26, 26, 23, 23, 67, 69, 24, 24, 77, 39, 74, 35, 22, 21, 22, 22, 39, 22, 22, 22, 22, 22, 22, 22, 74, 22, 22, 22, 21, 22, 22, 22, 22, 22, 22, 22, 22, 35, 21, 21, 21, 6, 26, 77, 26, 13, 23, 77, 23, 24, 77, 24, 77, 50, 46, 38, 40, 59, 22, 21, 22, 22, 22, 22, 22, 50, 22, 46, 22, 22, 22, 22, 21, 22, 22, 38, 22, 22, 40, 22, 22, 22, 59, 21, 21, 21, 9, 26, 77, 23, 77, 68, 1, 2, 24, 77, 77, 41, 61, 56, 37, 58, 22, 41, 21, 22, 22, 22, 22, 61, 22, 22, 22, 22, 56, 22, 22, 37, 22, 21, 22, 22, 22, 22, 58, 21, 21, 21, 8, 26, 77, 23, 77, 4, 24, 77, 28, 21, 22, 22, 22, 21, 22, 22, 22, 21, 22, 22, 22, 21, 21, 21, 15, 3, 27, 42, 21, 22, 22, 22, 21, 22, 22, 22, 42, 21, 22, 22, 22, 21, 21, 21, 17, 65, 76, 55, 21, 22, 65, 22, 22, 21, 22, 22, 22, 76, 22, 21, 22, 22, 22, 21, 55, 21, 21, 7, 51, 57, 76, 76, 36, 21, 51, 22, 57, 22, 21, 22, 21, 22, 76, 22, 76, 21, 22, 22, 36, 22, 21, 21, 60, 75, 22, 60, 21, 22, 21, 21, 21, 22, 75, 22, 21, 21, 34, 53, 21, 22, 21, 75, 22, 34, 21, 21, 53, 21, 22, 21, 47, 47, 21, 47, 22, 47, 21, 54, 21, 54 } ; static yyconst short int yy_accept[948] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 6, 9, 11, 14, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 107, 110, 112, 114, 116, 119, 123, 127, 131, 134, 136, 138, 140, 142, 145, 149, 153, 156, 158, 160, 162, 164, 166, 168, 172, 175, 178, 181, 183, 185, 187, 189, 191, 193, 195, 198, 202, 206, 209, 213, 216, 218, 220, 222, 224, 225, 226, 227, 227, 228, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 230, 230, 230, 230, 230, 231, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 260, 261, 262, 262, 262, 262, 262, 263, 265, 267, 269, 270, 272, 272, 272, 272, 272, 272, 273, 275, 276, 278, 278, 278, 278, 278, 278, 279, 281, 281, 281, 281, 281, 282, 284, 285, 287, 289, 290, 291, 291, 291, 291, 291, 291, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 330, 330, 330, 330, 330, 331, 333, 333, 333, 333, 333, 333, 334, 336, 336, 336, 337, 337, 337, 339, 339, 339, 339, 340, 342, 344, 344, 344, 344, 345, 346, 346, 346, 347, 347, 348, 348, 348, 348, 348, 348, 348, 348, 348, 349, 349, 349, 349, 349, 349, 349, 349, 350, 350, 350, 351, 351, 351, 351, 351, 351, 351, 351, 351, 352, 353, 354, 355, 356, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 369, 370, 371, 372, 373, 374, 375, 376, 378, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 391, 392, 393, 393, 393, 393, 394, 395, 397, 397, 398, 398, 398, 398, 399, 400, 402, 402, 403, 403, 403, 405, 405, 405, 405, 406, 407, 409, 411, 411, 411, 412, 412, 412, 412, 413, 413, 413, 413, 413, 413, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 416, 416, 416, 416, 417, 418, 420, 421, 422, 423, 424, 425, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 447, 448, 449, 449, 449, 449, 449, 449, 450, 451, 451, 451, 452, 452, 453, 454, 454, 454, 454, 456, 456, 456, 456, 457, 458, 460, 460, 460, 460, 460, 460, 460, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 463, 463, 465, 466, 467, 468, 470, 471, 472, 473, 474, 475, 476, 477, 478, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 492, 492, 492, 492, 493, 494, 494, 494, 494, 495, 496, 497, 498, 498, 498, 498, 498, 499, 500, 500, 500, 501, 501, 501, 501, 501, 502, 502, 502, 502, 502, 502, 502, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 504, 504, 504, 504, 505, 506, 507, 509, 510, 511, 512, 513, 514, 515, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 530, 531, 532, 533, 533, 534, 534, 534, 536, 537, 538, 538, 538, 540, 541, 541, 541, 541, 541, 543, 544, 544, 544, 545, 545, 545, 545, 545, 545, 545, 546, 547, 547, 547, 547, 547, 547, 547, 548, 548, 549, 549, 549, 550, 550, 550, 550, 551, 552, 553, 554, 555, 556, 558, 560, 561, 562, 563, 564, 565, 566, 568, 569, 571, 572, 573, 575, 576, 577, 578, 578, 578, 579, 581, 581, 581, 583, 584, 584, 584, 585, 586, 588, 588, 588, 589, 590, 590, 590, 590, 590, 591, 591, 592, 592, 593, 593, 593, 593, 593, 593, 594, 594, 594, 594, 596, 597, 598, 599, 600, 602, 602, 602, 603, 604, 605, 607, 608, 610, 611, 612, 613, 614, 615, 617, 618, 619, 620, 621, 621, 623, 623, 623, 625, 626, 626, 628, 628, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 630, 631, 632, 633, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 644, 645, 645, 646, 647, 647, 647, 647, 647, 647, 647, 648, 648, 648, 648, 648, 648, 648, 648, 649, 650, 651, 652, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 664, 664, 665, 665, 666, 666, 666, 666, 666, 667, 667, 667, 667, 667, 668, 668, 668, 669, 671, 672, 673, 673, 674, 675, 675, 675, 676, 678, 679, 680, 681, 682, 683, 685, 686, 687, 688, 689, 690, 690, 690, 691, 692, 692, 692, 693, 693, 693, 693, 695, 697, 698, 698, 699, 700, 701, 703, 705, 706, 707, 709, 710, 711, 712, 713, 713, 713, 714, 714, 714, 714, 716, 716, 717, 718, 719, 720, 721, 723, 724, 725, 726, 726, 727, 727, 728, 728, 729, 730, 732, 734, 735, 737, 737, 737, 737, 738, 739, 740, 741, 741, 742, 744, 746, 747, 748, 750, 750 } ; static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 16, 17, 1, 18, 19, 20, 1, 1, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 1, 22, 1, 1, 23, 1, 24, 25, 26, 27, 28, 29, 30, 31, 32, 21, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 21, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst int yy_meta[48] = { 0, 1, 2, 3, 1, 1, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 1, 1, 1, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 4, 4, 4, 4, 4, 4, 4 } ; static yyconst short int yy_base[991] = { 0, 0, 0, 47, 0, 2685, 2684, 78, 0, 83, 98, 2704, 2703, 140, 161, 108, 152, 183, 204, 193, 194, 234, 0, 2702, 2701, 224, 225, 269, 290, 312, 0, 81, 94, 115, 246, 351, 359, 2717, 2724, 94, 2724, 0, 2709, 2712, 105, 191, 2686, 2667, 2672, 65, 96, 103, 2674, 141, 110, 163, 2673, 2668, 2676, 2700, 0, 369, 380, 392, 386, 387, 398, 401, 413, 414, 428, 429, 433, 440, 446, 447, 451, 463, 403, 2724, 2674, 2668, 2677, 0, 199, 0, 491, 2700, 2665, 135, 2661, 2663, 0, 144, 501, 2696, 2657, 2660, 2672, 2666, 2653, 2674, 2685, 2672, 2724, 2671, 2650, 140, 245, 2660, 2645, 2645, 2648, 0, 210, 511, 2681, 2676, 527, 2645, 2657, 2654, 2652, 256, 0, 0, 0, 2671, 2724, 2641, 2640, 2638, 2642, 2641, 154, 2647, 2629, 2633, 2627, 2626, 2642, 209, 2620, 2623, 2628, 167, 2626, 267, 2619, 2626, 2634, 2724, 2631, 2634, 2650, 0, 568, 576, 584, 594, 0, 588, 589, 592, 595, 606, 607, 610, 623, 619, 626, 630, 637, 641, 652, 648, 657, 663, 664, 675, 680, 691, 687, 703, 707, 712, 719, 716, 2616, 2619, 2618, 2615, 0, 426, 0, 0, 745, 755, 2616, 2609, 2609, 2609, 2611, 0, 294, 763, 771, 2606, 2610, 2610, 2618, 2615, 2724, 2635, 2602, 2598, 2601, 2612, 0, 412, 779, 787, 2630, 0, 0, 234, 2603, 2597, 2596, 2626, 2625, 2604, 2603, 2603, 2594, 2599, 401, 2590, 2582, 2596, 2588, 2594, 2589, 2575, 2595, 2581, 2576, 2585, 2587, 393, 2573, 412, 2581, 2575, 2570, 2568, 2581, 2577, 2567, 2724, 797, 0, 807, 815, 808, 809, 813, 814, 825, 820, 832, 837, 849, 850, 855, 864, 838, 861, 867, 870, 876, 881, 890, 896, 895, 899, 908, 914, 915, 920, 929, 934, 935, 940, 2564, 2578, 2568, 469, 969, 979, 2567, 2578, 2575, 2563, 2555, 989, 997, 2560, 2547, 2724, 2550, 2514, 2538, 2503, 2498, 2502, 1007, 1015, 2525, 2497, 2490, 2497, 2724, 2724, 0, 2517, 2513, 2472, 2724, 2481, 2485, 2473, 2484, 2481, 2474, 2467, 419, 2724, 2455, 2456, 2448, 2446, 2433, 2443, 2433, 2724, 2426, 2431, 2724, 2418, 2403, 2409, 2407, 2404, 2398, 2384, 2383, 2412, 1023, 1031, 2409, 1024, 1025, 1028, 1039, 1040, 1043, 1046, 1055, 1058, 1067, 1062, 1071, 1076, 1080, 1085, 1089, 1094, 1106, 1107, 1111, 2373, 1118, 1123, 1124, 1130, 1135, 1136, 1148, 1155, 1154, 1161, 1167, 2724, 2370, 2374, 2327, 2338, 1193, 1203, 1211, 2337, 2724, 2327, 2323, 2333, 1219, 1227, 1235, 2312, 2724, 2337, 2310, 0, 2322, 2261, 2253, 1243, 1251, 1259, 0, 2251, 2258, 2724, 2283, 2282, 2248, 2724, 2272, 2234, 2239, 2168, 2180, 2724, 2164, 2167, 2166, 2173, 2168, 2164, 2146, 2132, 2131, 2127, 2110, 2118, 2103, 2111, 2094, 2103, 2724, 2085, 2080, 599, 2111, 1139, 1252, 1270, 1255, 1256, 1259, 1274, 1271, 1275, 1286, 1287, 1290, 1301, 1304, 1307, 1308, 1313, 1319, 2088, 1324, 1331, 1328, 1343, 1344, 1348, 1349, 1355, 1361, 656, 2087, 2086, 2064, 2066, 1396, 2095, 2075, 2064, 2724, 2059, 1406, 2090, 2063, 2080, 2062, 2067, 2029, 2025, 2047, 1416, 2062, 2015, 1983, 1981, 0, 2008, 1985, 1967, 1958, 1964, 1941, 1928, 1937, 1943, 1942, 1920, 1916, 1897, 1895, 1891, 2724, 1879, 1874, 1880, 1876, 1889, 1886, 1877, 1863, 1858, 1867, 1851, 1845, 1367, 1848, 1409, 1413, 1366, 1414, 1418, 1425, 1429, 1430, 1434, 1441, 1446, 1450, 1453, 1457, 1842, 1466, 1469, 1473, 1485, 1480, 1491, 1492, 1496, 1849, 1841, 1827, 1828, 1821, 1825, 1827, 1530, 1540, 1792, 1794, 1804, 1548, 1556, 2724, 2724, 1786, 1808, 1767, 1765, 1564, 1572, 1773, 1753, 0, 1782, 1745, 1762, 1711, 2724, 1706, 1688, 1692, 1694, 1692, 1671, 2724, 1676, 1667, 1650, 1635, 1646, 1643, 1638, 1622, 1625, 1634, 1610, 2724, 1622, 1601, 1608, 1565, 1614, 1503, 1566, 1569, 1572, 1578, 1584, 1585, 1589, 1596, 1601, 1605, 1610, 1587, 1617, 1621, 1622, 1626, 1633, 1642, 1638, 1649, 1602, 1584, 1592, 1588, 2724, 1585, 1558, 1675, 1588, 2724, 1564, 1549, 1683, 1541, 1508, 0, 1511, 284, 1691, 1526, 1487, 1477, 0, 1490, 1456, 1457, 1464, 1463, 1456, 0, 2724, 1444, 1452, 1430, 1432, 1435, 1434, 2724, 1413, 2724, 1411, 1399, 2724, 1391, 1397, 1390, 1684, 1378, 1685, 1688, 1689, 1700, 1736, 1701, 1760, 1761, 1764, 1767, 1382, 1779, 1776, 1783, 1788, 1792, 1795, 1799, 1359, 1359, 1352, 1339, 1352, 2724, 1827, 1348, 1338, 1835, 2724, 1360, 1317, 2724, 2724, 1843, 1333, 1313, 2724, 2724, 1312, 1299, 1282, 1280, 2724, 1273, 2724, 1280, 2724, 1260, 1259, 1254, 1244, 1241, 2724, 1171, 1160, 1165, 1836, 1164, 1840, 1841, 1845, 1852, 1880, 1154, 1912, 1150, 1873, 1874, 1877, 1878, 1906, 1158, 1907, 1912, 1913, 1919, 1141, 1126, 1133, 2724, 1129, 0, 1109, 1112, 0, 2724, 1125, 0, 1102, 2724, 1105, 1092, 1095, 1096, 1085, 1084, 1070, 1079, 1070, 1071, 1043, 1060, 1049, 1034, 1038, 1924, 1928, 1931, 451, 1018, 1940, 1944, 1947, 1026, 1951, 1958, 1962, 1029, 1019, 1016, 973, 2724, 961, 2724, 2724, 953, 950, 931, 934, 928, 943, 2724, 919, 926, 906, 898, 896, 882, 897, 887, 1971, 1965, 1976, 454, 874, 1977, 2019, 1982, 875, 2043, 2044, 2048, 871, 853, 858, 848, 2724, 847, 2724, 820, 822, 839, 843, 834, 826, 799, 781, 779, 2724, 731, 722, 721, 2055, 2059, 2060, 495, 721, 2064, 2106, 2129, 2152, 2167, 0, 718, 2085, 2108, 2161, 0, 697, 698, 2724, 2724, 2724, 684, 682, 705, 703, 678, 680, 2724, 669, 668, 673, 0, 2111, 2162, 575, 651, 2165, 2207, 2246, 2255, 650, 2249, 2166, 2250, 636, 638, 2724, 631, 628, 2724, 602, 574, 549, 2254, 450, 512, 2261, 0, 2295, 502, 2319, 2320, 501, 472, 452, 2724, 446, 2724, 612, 432, 2323, 0, 2324, 412, 0, 377, 384, 578, 352, 2335, 349, 2724, 282, 250, 0, 2338, 249, 2724, 0, 2724, 2372, 2381, 2390, 2399, 2404, 2408, 2414, 2420, 2429, 2438, 2447, 2456, 2461, 2468, 2477, 2482, 260, 2485, 2489, 2492, 2496, 2499, 2506, 2511, 2514, 2518, 2523, 2526, 250, 2529, 233, 184, 2532, 153, 2535, 141, 2542, 90, 2551, 2554, 2563, 2572, 2581, 2590 } ; static yyconst short int yy_def[991] = { 0, 946, 1, 946, 3, 1, 1, 1, 7, 7, 7, 7, 7, 947, 947, 7, 7, 948, 948, 7, 7, 7, 21, 7, 7, 7, 7, 949, 949, 946, 29, 7, 7, 7, 7, 29, 29, 946, 946, 946, 946, 950, 951, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 952, 953, 952, 954, 954, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 946, 946, 946, 946, 946, 955, 955, 956, 955, 955, 946, 946, 946, 946, 957, 958, 957, 957, 946, 946, 946, 946, 946, 946, 959, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 960, 961, 960, 960, 962, 946, 946, 946, 946, 946, 946, 950, 950, 963, 964, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 952, 953, 965, 953, 61, 61, 966, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 946, 946, 946, 946, 955, 955, 956, 956, 955, 955, 946, 946, 946, 946, 946, 957, 958, 957, 94, 946, 946, 946, 946, 946, 946, 967, 946, 946, 946, 946, 960, 961, 960, 115, 968, 969, 118, 946, 946, 946, 946, 970, 971, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 965, 972, 965, 61, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 946, 946, 946, 946, 955, 955, 946, 946, 946, 946, 946, 94, 94, 946, 946, 946, 946, 946, 973, 946, 946, 946, 115, 115, 974, 946, 946, 946, 946, 946, 975, 976, 971, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 972, 262, 263, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 953, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 946, 946, 946, 946, 946, 955, 955, 955, 946, 946, 946, 946, 946, 957, 305, 957, 946, 946, 946, 946, 977, 946, 946, 946, 960, 316, 960, 978, 946, 946, 946, 979, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 260, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 63, 63, 63, 63, 63, 953, 946, 946, 946, 946, 955, 955, 946, 946, 946, 946, 957, 957, 946, 946, 946, 971, 946, 946, 946, 960, 960, 971, 946, 946, 980, 981, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 63, 953, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 63, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 955, 955, 946, 946, 946, 957, 494, 946, 946, 946, 946, 946, 946, 960, 503, 946, 946, 982, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 63, 260, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 63, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 955, 955, 946, 946, 946, 957, 957, 946, 983, 946, 946, 960, 960, 946, 946, 984, 946, 946, 946, 946, 946, 946, 985, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 63, 260, 63, 63, 63, 63, 946, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 63, 63, 63, 260, 260, 260, 946, 946, 946, 955, 946, 946, 957, 946, 946, 946, 946, 946, 960, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 63, 260, 63, 63, 63, 63, 263, 953, 747, 986, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 260, 260, 260, 946, 946, 955, 946, 946, 957, 946, 946, 960, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 260, 63, 63, 63, 747, 260, 63, 63, 63, 260, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 987, 946, 946, 946, 946, 946, 946, 946, 946, 260, 63, 63, 63, 747, 260, 63, 946, 63, 260, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 946, 946, 946, 987, 988, 946, 946, 946, 946, 946, 946, 946, 260, 63, 63, 63, 747, 260, 63, 989, 990, 989, 988, 831, 260, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 946, 988, 988, 946, 946, 946, 946, 946, 946, 260, 63, 63, 747, 260, 63, 946, 988, 988, 260, 63, 63, 63, 260, 260, 946, 946, 946, 946, 946, 946, 946, 63, 747, 260, 63, 894, 946, 260, 63, 63, 260, 260, 946, 946, 946, 946, 747, 260, 63, 260, 63, 260, 260, 946, 946, 747, 260, 63, 260, 946, 946, 747, 260, 63, 260, 946, 260, 0, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946 } ; static yyconst short int yy_nxt[2772] = { 0, 38, 39, 40, 38, 41, 38, 38, 38, 42, 42, 42, 42, 42, 42, 42, 42, 38, 38, 38, 38, 38, 43, 38, 38, 44, 45, 46, 47, 48, 38, 38, 49, 38, 50, 51, 52, 38, 53, 38, 54, 55, 56, 57, 58, 38, 38, 38, 38, 39, 40, 38, 41, 59, 60, 38, 61, 61, 61, 61, 61, 61, 61, 61, 38, 38, 38, 38, 62, 43, 38, 62, 63, 64, 65, 66, 67, 62, 62, 68, 62, 69, 70, 71, 62, 72, 62, 73, 74, 75, 76, 77, 62, 62, 62, 79, 123, 721, 38, 124, 38, 138, 139, 38, 38, 38, 38, 38, 80, 81, 38, 38, 38, 38, 38, 38, 38, 119, 38, 38, 38, 38, 38, 80, 81, 38, 82, 142, 140, 129, 119, 143, 38, 141, 88, 89, 90, 130, 147, 131, 91, 82, 84, 40, 120, 85, 125, 148, 659, 86, 86, 86, 86, 86, 86, 86, 86, 121, 122, 199, 586, 125, 87, 84, 40, 145, 85, 200, 212, 38, 86, 86, 86, 86, 86, 86, 86, 86, 88, 89, 90, 146, 212, 87, 91, 39, 40, 149, 93, 236, 237, 505, 94, 94, 94, 94, 94, 94, 94, 94, 38, 193, 249, 150, 194, 95, 39, 40, 250, 93, 38, 38, 125, 94, 94, 94, 94, 94, 94, 94, 94, 38, 132, 96, 96, 133, 95, 125, 134, 97, 97, 98, 98, 99, 99, 244, 100, 100, 101, 245, 499, 38, 38, 102, 102, 102, 102, 102, 102, 102, 102, 38, 103, 104, 105, 110, 110, 424, 123, 111, 111, 124, 106, 38, 107, 112, 112, 229, 108, 319, 109, 39, 40, 212, 114, 120, 945, 320, 115, 115, 115, 115, 115, 115, 115, 115, 38, 212, 121, 122, 154, 116, 39, 40, 252, 114, 125, 716, 717, 115, 115, 115, 115, 115, 115, 115, 115, 38, 253, 944, 254, 125, 116, 38, 39, 40, 38, 41, 38, 38, 38, 117, 117, 117, 117, 117, 117, 117, 117, 38, 38, 38, 38, 118, 43, 38, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 157, 943, 158, 158, 158, 158, 158, 158, 158, 158, 154, 155, 941, 159, 159, 159, 159, 159, 159, 159, 159, 160, 154, 155, 346, 159, 159, 159, 159, 159, 159, 159, 159, 160, 161, 161, 939, 938, 125, 168, 162, 165, 161, 169, 166, 161, 161, 167, 163, 161, 164, 145, 193, 125, 161, 194, 161, 161, 347, 161, 332, 161, 161, 333, 188, 171, 937, 146, 170, 161, 174, 161, 161, 172, 173, 175, 176, 161, 349, 434, 177, 179, 350, 435, 161, 161, 161, 161, 161, 161, 178, 161, 181, 935, 183, 161, 161, 180, 161, 161, 933, 182, 161, 161, 161, 161, 925, 161, 185, 161, 184, 161, 828, 932, 154, 154, 186, 396, 154, 187, 860, 161, 196, 931, 197, 197, 197, 197, 197, 197, 197, 197, 205, 397, 206, 206, 206, 206, 206, 206, 206, 206, 220, 891, 221, 221, 221, 221, 221, 221, 221, 221, 223, 930, 928, 223, 223, 223, 223, 154, 223, 223, 223, 223, 223, 223, 223, 223, 926, 223, 223, 223, 224, 223, 223, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 261, 924, 156, 156, 156, 156, 156, 156, 156, 156, 262, 262, 262, 262, 262, 262, 262, 262, 263, 263, 263, 263, 263, 263, 263, 263, 155, 923, 159, 159, 159, 159, 159, 159, 159, 159, 160, 161, 161, 940, 154, 161, 911, 154, 161, 161, 161, 161, 161, 161, 264, 161, 161, 265, 161, 161, 161, 266, 534, 161, 535, 922, 536, 267, 268, 161, 161, 161, 161, 161, 269, 270, 161, 271, 934, 161, 161, 154, 161, 161, 161, 906, 161, 161, 272, 161, 161, 161, 921, 161, 161, 920, 274, 273, 161, 919, 161, 161, 161, 278, 161, 161, 277, 279, 275, 161, 161, 161, 276, 161, 916, 161, 161, 161, 161, 562, 161, 563, 912, 564, 161, 161, 161, 161, 161, 282, 909, 908, 280, 161, 281, 907, 161, 906, 161, 283, 161, 161, 905, 161, 161, 284, 285, 286, 161, 881, 161, 881, 161, 904, 161, 903, 161, 902, 901, 289, 161, 287, 291, 288, 161, 161, 161, 290, 161, 293, 161, 897, 161, 161, 892, 161, 292, 161, 888, 161, 161, 887, 161, 298, 298, 298, 298, 298, 298, 298, 298, 196, 886, 299, 299, 299, 299, 299, 299, 299, 299, 305, 305, 305, 305, 305, 305, 305, 305, 306, 306, 306, 306, 306, 306, 306, 306, 316, 316, 316, 316, 316, 316, 316, 316, 317, 317, 317, 317, 317, 317, 317, 317, 261, 885, 156, 156, 156, 156, 156, 156, 156, 156, 358, 884, 359, 359, 359, 359, 359, 359, 359, 359, 360, 360, 360, 360, 360, 360, 360, 360, 161, 161, 883, 361, 362, 161, 161, 363, 161, 161, 161, 161, 161, 161, 161, 161, 364, 161, 882, 881, 161, 365, 161, 366, 161, 161, 367, 161, 848, 161, 161, 879, 161, 878, 161, 877, 368, 161, 374, 161, 161, 161, 161, 876, 875, 370, 371, 161, 369, 161, 161, 161, 161, 161, 874, 161, 161, 161, 372, 376, 373, 161, 161, 161, 161, 873, 161, 161, 161, 161, 161, 381, 161, 161, 375, 377, 161, 872, 161, 868, 379, 161, 161, 161, 861, 378, 380, 161, 161, 856, 161, 161, 161, 855, 854, 161, 161, 161, 161, 161, 161, 161, 853, 852, 383, 382, 161, 161, 386, 384, 161, 851, 161, 385, 161, 161, 161, 161, 850, 387, 161, 161, 161, 849, 388, 390, 161, 161, 848, 161, 389, 161, 161, 391, 161, 161, 161, 161, 846, 845, 161, 844, 161, 392, 398, 843, 399, 399, 399, 399, 399, 399, 399, 399, 196, 842, 400, 400, 400, 400, 400, 400, 400, 400, 406, 841, 407, 407, 407, 407, 407, 407, 407, 407, 408, 408, 408, 408, 408, 408, 408, 408, 417, 840, 418, 418, 418, 418, 418, 418, 418, 418, 419, 419, 419, 419, 419, 419, 419, 419, 424, 424, 424, 424, 424, 424, 424, 424, 454, 454, 454, 454, 454, 454, 454, 454, 161, 161, 839, 838, 161, 837, 833, 829, 161, 161, 161, 161, 161, 456, 161, 161, 161, 824, 457, 459, 823, 455, 460, 161, 161, 161, 161, 161, 458, 161, 161, 161, 161, 822, 161, 461, 821, 820, 161, 161, 462, 161, 161, 161, 161, 463, 161, 161, 161, 819, 464, 161, 161, 161, 465, 161, 161, 161, 818, 817, 161, 161, 161, 816, 161, 161, 161, 467, 466, 161, 161, 161, 815, 161, 814, 469, 813, 468, 161, 812, 161, 811, 161, 161, 810, 809, 471, 161, 808, 470, 161, 161, 161, 161, 161, 161, 472, 161, 474, 161, 161, 807, 161, 806, 161, 805, 161, 161, 161, 161, 161, 161, 161, 475, 161, 161, 161, 804, 803, 161, 161, 161, 478, 537, 161, 161, 483, 477, 479, 476, 161, 161, 161, 802, 161, 480, 798, 161, 161, 161, 161, 161, 779, 161, 481, 161, 794, 161, 789, 788, 482, 161, 787, 161, 488, 488, 488, 488, 488, 488, 488, 488, 398, 786, 489, 489, 489, 489, 489, 489, 489, 489, 400, 400, 400, 400, 400, 400, 400, 400, 494, 494, 494, 494, 494, 494, 494, 494, 495, 495, 495, 495, 495, 495, 495, 495, 408, 408, 408, 408, 408, 408, 408, 408, 503, 503, 503, 503, 503, 503, 503, 503, 504, 504, 504, 504, 504, 504, 504, 504, 419, 419, 419, 419, 419, 419, 419, 419, 161, 538, 785, 161, 161, 784, 783, 161, 161, 782, 161, 161, 161, 161, 161, 161, 540, 161, 161, 161, 781, 539, 161, 161, 542, 541, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 780, 779, 161, 778, 777, 543, 161, 161, 161, 161, 161, 545, 161, 161, 546, 544, 548, 547, 776, 161, 161, 161, 549, 161, 161, 161, 161, 161, 161, 161, 161, 161, 775, 161, 552, 161, 161, 774, 550, 161, 161, 161, 551, 161, 161, 555, 161, 773, 161, 771, 161, 161, 554, 161, 556, 161, 161, 770, 768, 557, 559, 161, 767, 161, 161, 161, 161, 161, 161, 161, 161, 161, 765, 161, 764, 161, 558, 161, 161, 161, 560, 161, 614, 161, 763, 762, 618, 161, 161, 161, 561, 569, 761, 570, 570, 570, 570, 570, 570, 570, 570, 574, 756, 575, 575, 575, 575, 575, 575, 575, 575, 582, 742, 583, 583, 583, 583, 583, 583, 583, 583, 161, 740, 739, 738, 161, 161, 737, 617, 161, 161, 161, 616, 161, 161, 161, 161, 161, 161, 736, 161, 621, 622, 735, 619, 620, 161, 161, 734, 161, 161, 161, 161, 161, 161, 733, 161, 732, 161, 623, 731, 161, 161, 161, 730, 161, 161, 624, 161, 161, 161, 625, 161, 161, 729, 161, 626, 161, 161, 161, 727, 161, 627, 726, 725, 161, 161, 724, 161, 161, 723, 161, 161, 161, 630, 161, 633, 161, 629, 632, 161, 631, 161, 161, 161, 161, 634, 161, 161, 722, 720, 161, 161, 161, 161, 161, 161, 719, 161, 685, 635, 582, 715, 161, 713, 161, 636, 644, 644, 644, 644, 644, 644, 644, 644, 569, 574, 645, 645, 645, 645, 645, 645, 645, 645, 649, 649, 649, 649, 649, 649, 649, 649, 650, 650, 650, 650, 650, 650, 650, 650, 655, 655, 655, 655, 655, 655, 655, 655, 656, 656, 656, 656, 656, 656, 656, 656, 161, 161, 711, 710, 161, 686, 569, 161, 161, 161, 161, 161, 161, 161, 161, 161, 708, 161, 683, 161, 161, 161, 707, 161, 161, 687, 688, 161, 161, 689, 690, 161, 161, 706, 161, 705, 161, 704, 703, 161, 161, 161, 695, 691, 161, 161, 161, 692, 161, 684, 161, 682, 161, 694, 681, 161, 161, 161, 680, 693, 696, 161, 161, 679, 161, 161, 697, 161, 161, 161, 698, 161, 678, 161, 677, 676, 161, 161, 161, 699, 701, 161, 700, 161, 161, 161, 675, 161, 674, 673, 672, 702, 161, 671, 161, 709, 709, 709, 709, 709, 709, 709, 709, 712, 712, 712, 712, 712, 712, 712, 712, 718, 718, 718, 718, 718, 718, 718, 718, 161, 161, 670, 669, 161, 161, 668, 741, 161, 161, 161, 161, 744, 745, 161, 161, 161, 161, 667, 743, 666, 665, 664, 663, 161, 161, 161, 161, 746, 728, 728, 662, 728, 728, 747, 748, 728, 749, 749, 749, 749, 749, 749, 749, 749, 750, 728, 728, 728, 751, 728, 728, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 161, 753, 661, 660, 161, 508, 658, 161, 161, 161, 161, 161, 161, 657, 161, 161, 161, 161, 752, 161, 755, 757, 754, 161, 161, 654, 161, 161, 161, 161, 653, 161, 161, 161, 652, 161, 161, 651, 161, 161, 161, 758, 161, 161, 648, 161, 647, 161, 759, 161, 646, 760, 766, 766, 766, 766, 766, 766, 766, 766, 769, 769, 769, 769, 769, 769, 769, 769, 772, 772, 772, 772, 772, 772, 772, 772, 161, 643, 642, 641, 161, 161, 640, 639, 161, 161, 161, 790, 161, 161, 161, 791, 161, 161, 638, 161, 792, 637, 628, 615, 161, 613, 161, 155, 612, 154, 154, 154, 154, 154, 154, 154, 154, 161, 161, 611, 610, 161, 161, 609, 608, 161, 161, 161, 161, 796, 161, 161, 161, 795, 607, 606, 605, 604, 603, 602, 793, 159, 159, 159, 159, 159, 159, 159, 159, 160, 161, 161, 601, 600, 599, 799, 161, 161, 161, 161, 161, 161, 797, 161, 161, 161, 161, 161, 161, 800, 801, 161, 161, 161, 598, 161, 161, 597, 161, 827, 826, 825, 161, 161, 161, 161, 596, 595, 161, 594, 593, 161, 161, 592, 161, 161, 161, 830, 161, 161, 831, 161, 161, 161, 835, 161, 161, 834, 832, 161, 161, 591, 161, 590, 161, 161, 161, 161, 857, 161, 161, 161, 589, 161, 836, 161, 161, 858, 161, 161, 161, 161, 588, 859, 161, 508, 161, 585, 584, 862, 847, 847, 946, 847, 847, 863, 864, 847, 865, 865, 865, 865, 865, 865, 865, 865, 866, 847, 847, 847, 867, 847, 847, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 869, 161, 417, 581, 580, 161, 579, 946, 161, 161, 161, 161, 161, 161, 870, 161, 161, 161, 871, 578, 161, 893, 161, 577, 161, 161, 161, 161, 576, 161, 406, 161, 573, 572, 571, 398, 890, 568, 567, 889, 847, 847, 161, 847, 847, 566, 864, 847, 565, 553, 161, 358, 161, 898, 533, 532, 848, 847, 847, 847, 531, 847, 847, 847, 847, 161, 847, 847, 161, 847, 847, 530, 529, 161, 528, 899, 161, 527, 161, 848, 847, 847, 847, 526, 847, 847, 847, 847, 525, 847, 847, 524, 864, 847, 865, 865, 865, 865, 865, 865, 865, 865, 866, 847, 847, 847, 523, 847, 847, 895, 895, 895, 895, 895, 895, 895, 895, 896, 161, 161, 900, 522, 161, 161, 521, 520, 161, 161, 161, 161, 161, 161, 161, 161, 519, 518, 517, 910, 516, 515, 913, 847, 847, 514, 847, 847, 914, 915, 847, 894, 894, 894, 894, 894, 894, 894, 894, 848, 847, 847, 847, 914, 847, 847, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 895, 895, 895, 895, 895, 895, 895, 895, 896, 895, 895, 895, 895, 895, 895, 895, 895, 896, 161, 161, 513, 512, 917, 161, 511, 510, 161, 161, 161, 161, 161, 161, 918, 161, 324, 508, 507, 506, 927, 502, 161, 847, 847, 501, 847, 847, 915, 915, 847, 847, 847, 847, 847, 847, 847, 847, 847, 848, 847, 847, 847, 915, 847, 847, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 161, 161, 500, 498, 161, 161, 497, 496, 161, 161, 161, 929, 161, 161, 161, 161, 161, 936, 493, 161, 492, 491, 490, 487, 161, 486, 161, 161, 942, 161, 83, 83, 83, 83, 83, 83, 83, 83, 83, 92, 92, 92, 92, 92, 92, 92, 92, 92, 113, 113, 113, 113, 113, 113, 113, 113, 113, 125, 125, 485, 125, 125, 125, 125, 125, 125, 127, 484, 127, 154, 154, 473, 154, 155, 154, 156, 453, 452, 156, 451, 156, 161, 161, 450, 161, 161, 161, 192, 192, 449, 192, 192, 192, 192, 192, 192, 195, 195, 448, 195, 195, 195, 195, 195, 195, 203, 447, 446, 203, 203, 203, 203, 445, 203, 204, 204, 444, 204, 204, 204, 204, 204, 204, 213, 443, 213, 218, 442, 441, 218, 218, 218, 218, 440, 218, 219, 219, 439, 219, 219, 219, 219, 219, 219, 222, 438, 222, 230, 437, 230, 260, 260, 436, 260, 433, 260, 160, 160, 312, 432, 312, 318, 431, 318, 223, 430, 429, 223, 223, 428, 223, 427, 223, 325, 426, 325, 326, 946, 326, 261, 261, 324, 423, 422, 261, 413, 421, 413, 420, 126, 420, 425, 416, 425, 509, 415, 509, 587, 414, 587, 714, 714, 126, 714, 714, 714, 714, 714, 714, 728, 728, 412, 728, 728, 728, 728, 728, 728, 160, 160, 160, 847, 847, 411, 847, 847, 847, 847, 847, 847, 880, 880, 410, 880, 880, 880, 880, 880, 880, 863, 863, 409, 863, 863, 863, 863, 863, 863, 894, 894, 405, 894, 894, 894, 894, 894, 894, 404, 403, 402, 401, 395, 394, 393, 357, 356, 355, 354, 353, 352, 351, 348, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 331, 330, 329, 328, 327, 126, 324, 323, 322, 321, 126, 315, 314, 313, 212, 126, 311, 310, 309, 308, 307, 304, 303, 302, 301, 300, 297, 296, 295, 294, 155, 259, 258, 257, 256, 255, 251, 248, 247, 246, 243, 242, 241, 240, 239, 238, 235, 234, 233, 232, 231, 126, 228, 227, 226, 225, 126, 128, 217, 216, 215, 214, 212, 212, 212, 126, 212, 211, 210, 209, 208, 207, 128, 202, 201, 198, 128, 191, 190, 189, 155, 153, 152, 151, 144, 137, 136, 135, 128, 126, 946, 38, 38, 38, 38, 78, 78, 37, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946 } ; static yyconst short int yy_chk[2772] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 39, 984, 31, 39, 9, 49, 49, 7, 7, 7, 7, 7, 9, 9, 7, 32, 7, 7, 7, 10, 7, 31, 7, 7, 7, 7, 7, 10, 10, 15, 9, 51, 50, 44, 32, 51, 33, 50, 15, 15, 15, 44, 54, 44, 15, 10, 13, 13, 33, 13, 93, 54, 982, 13, 13, 13, 13, 13, 13, 13, 13, 33, 33, 89, 980, 93, 13, 14, 14, 53, 14, 89, 107, 16, 14, 14, 14, 14, 14, 14, 14, 14, 16, 16, 16, 53, 107, 14, 16, 17, 17, 55, 17, 134, 134, 978, 17, 17, 17, 17, 17, 17, 17, 17, 17, 84, 145, 55, 84, 17, 18, 18, 145, 18, 19, 20, 114, 18, 18, 18, 18, 18, 18, 18, 18, 18, 45, 19, 20, 45, 18, 114, 45, 19, 20, 19, 20, 19, 20, 141, 19, 20, 21, 141, 977, 25, 26, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 25, 26, 975, 123, 25, 26, 123, 21, 34, 21, 25, 26, 963, 21, 225, 21, 27, 27, 108, 27, 34, 943, 225, 27, 27, 27, 27, 27, 27, 27, 27, 27, 108, 34, 34, 940, 27, 28, 28, 147, 28, 204, 654, 654, 28, 28, 28, 28, 28, 28, 28, 28, 28, 147, 939, 147, 204, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36, 61, 937, 61, 61, 61, 61, 61, 61, 61, 61, 62, 62, 935, 62, 62, 62, 62, 62, 62, 62, 62, 62, 63, 63, 249, 63, 63, 63, 63, 63, 63, 63, 63, 63, 64, 65, 933, 932, 219, 65, 63, 64, 64, 65, 64, 65, 66, 64, 63, 67, 63, 78, 193, 219, 66, 193, 66, 67, 249, 67, 236, 68, 69, 236, 78, 67, 930, 78, 66, 68, 69, 68, 69, 68, 68, 69, 70, 71, 251, 336, 70, 72, 251, 336, 70, 71, 70, 71, 73, 72, 71, 72, 73, 926, 74, 75, 73, 72, 73, 76, 923, 73, 74, 75, 74, 75, 911, 76, 75, 76, 74, 77, 793, 921, 911, 793, 76, 297, 828, 77, 828, 77, 86, 920, 86, 86, 86, 86, 86, 86, 86, 86, 94, 297, 94, 94, 94, 94, 94, 94, 94, 94, 115, 860, 115, 115, 115, 115, 115, 115, 115, 115, 118, 919, 916, 118, 118, 118, 118, 860, 118, 118, 118, 118, 118, 118, 118, 118, 912, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 156, 909, 156, 156, 156, 156, 156, 156, 156, 156, 157, 157, 157, 157, 157, 157, 157, 157, 158, 158, 158, 158, 158, 158, 158, 158, 159, 908, 159, 159, 159, 159, 159, 159, 159, 159, 159, 161, 162, 934, 891, 163, 891, 934, 164, 161, 162, 161, 162, 163, 162, 163, 164, 163, 164, 165, 166, 164, 453, 167, 453, 907, 453, 165, 166, 165, 166, 167, 169, 167, 167, 167, 168, 168, 925, 170, 169, 925, 169, 171, 168, 905, 168, 170, 169, 170, 172, 171, 904, 171, 173, 902, 171, 170, 172, 901, 172, 175, 173, 175, 173, 174, 174, 175, 172, 175, 176, 175, 173, 174, 897, 174, 177, 178, 176, 483, 176, 483, 892, 483, 177, 178, 177, 178, 179, 178, 887, 886, 176, 180, 177, 885, 179, 883, 179, 179, 182, 180, 882, 180, 181, 179, 180, 181, 182, 881, 182, 880, 181, 879, 181, 878, 183, 874, 873, 182, 184, 181, 184, 181, 183, 185, 183, 183, 184, 187, 184, 868, 186, 185, 861, 185, 186, 187, 856, 187, 186, 855, 186, 196, 196, 196, 196, 196, 196, 196, 196, 197, 854, 197, 197, 197, 197, 197, 197, 197, 197, 205, 205, 205, 205, 205, 205, 205, 205, 206, 206, 206, 206, 206, 206, 206, 206, 220, 220, 220, 220, 220, 220, 220, 220, 221, 221, 221, 221, 221, 221, 221, 221, 260, 852, 260, 260, 260, 260, 260, 260, 260, 260, 262, 851, 262, 262, 262, 262, 262, 262, 262, 262, 263, 263, 263, 263, 263, 263, 263, 263, 264, 265, 850, 264, 265, 266, 267, 266, 264, 265, 264, 265, 269, 266, 267, 266, 267, 268, 849, 848, 269, 268, 269, 269, 270, 268, 269, 268, 847, 271, 276, 846, 270, 845, 270, 844, 270, 271, 276, 271, 276, 272, 273, 842, 840, 272, 273, 274, 271, 272, 273, 272, 273, 277, 839, 274, 275, 274, 274, 278, 275, 277, 279, 277, 275, 838, 275, 278, 280, 278, 279, 283, 279, 281, 277, 279, 280, 837, 280, 833, 281, 281, 282, 281, 829, 280, 282, 284, 283, 824, 282, 285, 282, 823, 822, 284, 283, 284, 283, 285, 286, 285, 821, 820, 284, 283, 287, 288, 286, 285, 286, 819, 289, 285, 287, 288, 287, 288, 818, 287, 289, 290, 289, 817, 288, 290, 291, 292, 815, 290, 289, 290, 293, 291, 291, 292, 291, 292, 814, 813, 293, 812, 293, 292, 298, 811, 298, 298, 298, 298, 298, 298, 298, 298, 299, 810, 299, 299, 299, 299, 299, 299, 299, 299, 305, 807, 305, 305, 305, 305, 305, 305, 305, 305, 306, 306, 306, 306, 306, 306, 306, 306, 316, 805, 316, 316, 316, 316, 316, 316, 316, 316, 317, 317, 317, 317, 317, 317, 317, 317, 358, 358, 358, 358, 358, 358, 358, 358, 359, 359, 359, 359, 359, 359, 359, 359, 361, 362, 804, 803, 363, 802, 798, 794, 361, 362, 361, 362, 363, 363, 363, 364, 365, 789, 364, 366, 788, 361, 367, 364, 365, 364, 365, 366, 365, 366, 367, 368, 367, 787, 369, 368, 786, 785, 371, 368, 369, 368, 369, 370, 369, 370, 371, 372, 371, 784, 371, 370, 373, 370, 371, 372, 374, 372, 783, 782, 373, 375, 373, 781, 374, 376, 374, 374, 373, 375, 377, 375, 780, 376, 779, 376, 778, 375, 377, 777, 377, 776, 378, 379, 775, 773, 378, 380, 771, 377, 378, 379, 378, 379, 382, 380, 379, 380, 382, 383, 384, 768, 382, 767, 382, 765, 385, 383, 384, 383, 384, 386, 387, 384, 385, 455, 385, 763, 762, 386, 387, 386, 387, 455, 388, 455, 392, 386, 388, 385, 390, 389, 388, 761, 388, 389, 756, 391, 390, 389, 390, 389, 750, 392, 390, 391, 748, 391, 742, 740, 391, 392, 739, 392, 398, 398, 398, 398, 398, 398, 398, 398, 399, 738, 399, 399, 399, 399, 399, 399, 399, 399, 400, 400, 400, 400, 400, 400, 400, 400, 406, 406, 406, 406, 406, 406, 406, 406, 407, 407, 407, 407, 407, 407, 407, 407, 408, 408, 408, 408, 408, 408, 408, 408, 417, 417, 417, 417, 417, 417, 417, 417, 418, 418, 418, 418, 418, 418, 418, 418, 419, 419, 419, 419, 419, 419, 419, 419, 456, 457, 736, 458, 459, 735, 734, 460, 456, 733, 456, 458, 459, 458, 459, 460, 459, 460, 457, 462, 732, 458, 461, 463, 461, 460, 457, 462, 457, 462, 461, 463, 461, 463, 464, 465, 730, 728, 466, 726, 725, 463, 464, 465, 464, 465, 466, 465, 466, 467, 466, 464, 468, 467, 724, 469, 470, 467, 469, 467, 468, 471, 468, 469, 470, 469, 470, 472, 723, 471, 472, 471, 474, 720, 470, 472, 476, 472, 471, 475, 474, 475, 474, 719, 476, 715, 476, 475, 474, 475, 476, 477, 478, 714, 711, 477, 479, 480, 710, 477, 478, 477, 478, 481, 479, 480, 479, 480, 707, 482, 706, 481, 478, 481, 541, 537, 481, 482, 537, 482, 705, 704, 541, 537, 541, 537, 482, 488, 703, 488, 488, 488, 488, 488, 488, 488, 488, 494, 695, 494, 494, 494, 494, 494, 494, 494, 494, 503, 684, 503, 503, 503, 503, 503, 503, 503, 503, 539, 682, 681, 680, 540, 542, 678, 540, 539, 543, 539, 539, 540, 542, 540, 542, 544, 543, 677, 543, 545, 546, 675, 542, 544, 547, 544, 673, 545, 546, 545, 546, 548, 547, 672, 547, 671, 549, 547, 670, 548, 550, 548, 669, 551, 549, 548, 549, 552, 550, 549, 550, 551, 668, 551, 550, 552, 554, 552, 665, 555, 551, 664, 663, 556, 554, 662, 554, 555, 661, 555, 558, 556, 555, 556, 558, 557, 554, 557, 558, 556, 558, 559, 560, 557, 559, 557, 561, 660, 658, 559, 560, 559, 560, 616, 561, 657, 561, 616, 560, 656, 653, 616, 651, 616, 561, 569, 569, 569, 569, 569, 569, 569, 569, 570, 650, 570, 570, 570, 570, 570, 570, 570, 570, 574, 574, 574, 574, 574, 574, 574, 574, 575, 575, 575, 575, 575, 575, 575, 575, 582, 582, 582, 582, 582, 582, 582, 582, 583, 583, 583, 583, 583, 583, 583, 583, 614, 617, 648, 647, 618, 618, 645, 619, 614, 617, 614, 617, 618, 620, 618, 619, 643, 619, 614, 621, 622, 620, 642, 620, 623, 619, 620, 621, 622, 621, 622, 624, 623, 640, 623, 639, 625, 638, 637, 624, 626, 624, 628, 623, 625, 627, 625, 625, 626, 615, 626, 613, 629, 627, 612, 627, 630, 631, 611, 626, 629, 632, 629, 609, 630, 631, 630, 631, 633, 632, 631, 632, 608, 635, 607, 606, 633, 634, 633, 632, 634, 635, 633, 635, 636, 634, 605, 634, 604, 603, 602, 635, 636, 601, 636, 644, 644, 644, 644, 644, 644, 644, 644, 649, 649, 649, 649, 649, 649, 649, 649, 655, 655, 655, 655, 655, 655, 655, 655, 683, 685, 600, 599, 686, 687, 597, 683, 683, 685, 683, 685, 686, 687, 686, 687, 688, 690, 596, 685, 595, 594, 593, 592, 688, 690, 688, 690, 688, 689, 689, 590, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 691, 692, 589, 588, 693, 587, 585, 694, 691, 692, 691, 692, 693, 584, 693, 694, 697, 694, 691, 696, 694, 696, 693, 698, 697, 581, 697, 696, 699, 696, 580, 698, 700, 698, 579, 701, 699, 578, 699, 702, 700, 698, 700, 701, 573, 701, 572, 702, 700, 702, 571, 701, 709, 709, 709, 709, 709, 709, 709, 709, 712, 712, 712, 712, 712, 712, 712, 712, 718, 718, 718, 718, 718, 718, 718, 718, 741, 568, 567, 566, 743, 744, 565, 564, 741, 745, 741, 743, 743, 744, 743, 744, 746, 745, 563, 745, 745, 562, 553, 538, 746, 536, 746, 747, 535, 747, 747, 747, 747, 747, 747, 747, 747, 751, 752, 534, 533, 753, 754, 532, 531, 751, 752, 751, 752, 753, 754, 753, 754, 751, 530, 529, 528, 527, 526, 525, 747, 749, 749, 749, 749, 749, 749, 749, 749, 749, 755, 757, 523, 522, 521, 757, 758, 759, 755, 757, 755, 757, 755, 760, 758, 759, 758, 759, 790, 758, 759, 760, 791, 760, 520, 792, 790, 519, 790, 792, 791, 790, 791, 792, 795, 792, 518, 517, 796, 516, 515, 797, 795, 514, 795, 799, 796, 795, 796, 797, 796, 797, 800, 799, 800, 799, 801, 799, 797, 826, 800, 513, 800, 512, 801, 825, 801, 826, 825, 826, 827, 830, 511, 825, 801, 825, 832, 826, 827, 830, 827, 830, 510, 827, 832, 509, 832, 507, 506, 830, 831, 831, 505, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 834, 835, 504, 502, 501, 836, 500, 499, 834, 835, 834, 835, 857, 836, 835, 836, 858, 859, 836, 498, 857, 862, 857, 497, 858, 859, 858, 859, 496, 862, 495, 862, 493, 491, 490, 489, 859, 487, 486, 858, 863, 863, 869, 863, 863, 485, 863, 863, 484, 473, 869, 454, 869, 869, 452, 451, 863, 863, 863, 863, 449, 863, 863, 864, 864, 870, 864, 864, 889, 864, 864, 448, 447, 870, 446, 870, 889, 445, 889, 864, 864, 864, 864, 444, 864, 864, 865, 865, 443, 865, 865, 442, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 441, 865, 865, 866, 866, 866, 866, 866, 866, 866, 866, 866, 871, 890, 871, 440, 893, 899, 439, 438, 871, 890, 871, 890, 893, 899, 893, 899, 437, 436, 435, 890, 434, 432, 893, 894, 894, 431, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 895, 895, 895, 895, 895, 895, 895, 895, 895, 896, 896, 896, 896, 896, 896, 896, 896, 896, 898, 900, 430, 429, 898, 910, 428, 426, 898, 900, 898, 900, 913, 910, 900, 910, 425, 424, 422, 421, 913, 416, 913, 915, 915, 415, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 917, 918, 414, 412, 927, 929, 411, 409, 917, 918, 917, 918, 927, 929, 927, 929, 936, 927, 405, 942, 404, 403, 401, 397, 936, 396, 936, 942, 936, 942, 947, 947, 947, 947, 947, 947, 947, 947, 947, 948, 948, 948, 948, 948, 948, 948, 948, 948, 949, 949, 949, 949, 949, 949, 949, 949, 949, 950, 950, 395, 950, 950, 950, 950, 950, 950, 951, 394, 951, 952, 952, 381, 952, 360, 952, 953, 357, 356, 953, 355, 953, 954, 954, 354, 954, 954, 954, 955, 955, 353, 955, 955, 955, 955, 955, 955, 956, 956, 352, 956, 956, 956, 956, 956, 956, 957, 351, 350, 957, 957, 957, 957, 349, 957, 958, 958, 347, 958, 958, 958, 958, 958, 958, 959, 346, 959, 960, 344, 343, 960, 960, 960, 960, 342, 960, 961, 961, 341, 961, 961, 961, 961, 961, 961, 962, 340, 962, 964, 339, 964, 965, 965, 338, 965, 335, 965, 966, 966, 967, 334, 967, 968, 333, 968, 969, 332, 331, 969, 969, 330, 969, 329, 969, 970, 327, 970, 971, 326, 971, 972, 972, 325, 321, 320, 972, 973, 319, 973, 974, 318, 974, 976, 315, 976, 979, 314, 979, 981, 313, 981, 983, 983, 312, 983, 983, 983, 983, 983, 983, 985, 985, 311, 985, 985, 985, 985, 985, 985, 986, 986, 986, 987, 987, 310, 987, 987, 987, 987, 987, 987, 988, 988, 308, 988, 988, 988, 988, 988, 988, 989, 989, 307, 989, 989, 989, 989, 989, 989, 990, 990, 304, 990, 990, 990, 990, 990, 990, 303, 302, 301, 300, 296, 295, 294, 258, 257, 256, 255, 254, 253, 252, 250, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 222, 217, 216, 215, 214, 213, 211, 210, 209, 208, 207, 202, 201, 200, 199, 198, 191, 190, 189, 188, 154, 153, 152, 150, 149, 148, 146, 144, 143, 142, 140, 139, 138, 137, 136, 135, 133, 132, 131, 130, 129, 127, 122, 121, 120, 119, 117, 116, 112, 111, 110, 109, 106, 105, 103, 102, 101, 100, 99, 98, 97, 96, 95, 91, 90, 88, 87, 82, 81, 80, 59, 58, 57, 56, 52, 48, 47, 46, 43, 42, 37, 24, 23, 12, 11, 6, 5, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946 } ; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; static char *yy_full_match; static int yy_lp; #define REJECT \ { \ *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ yy_cp = yy_full_match; /* restore poss. backed-over text */ \ ++yy_lp; \ goto find_rule; \ } #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "../lib/config_scan.l" #define INITIAL 0 /* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #line 45 "../lib/config_scan.l" #include "common.h" #include "yacconfig.h" #include "config_parse.h" extern int socks_parseinit; extern const int socks_configtype; static const char rcsid[] = "$Id: config_scan.l,v 1.76 2005/12/19 14:22:13 michaels Exp $"; #define YY_STACK_USED 0 #define YY_ALWAYS_INTERACTIVE 0 #define YY_NEVER_INTERACTIVE 1 #define YY_MAIN 0 /*%option debug */ /* non-exclusive startconditions. */ #define start_address 1 #define start_port 2 /* exclusive startconditions */ #define lineprefix 3 #define start_command 4 #define start_compatibility 5 #define start_line 6 #define start_log 7 #define start_logoutput 8 #define start_method 9 #define start_operator 10 #define start_option 11 #define start_proxyprotocol 12 #define start_username 13 #define start_portnumber 14 #define start_srchost 15 #define start_protocol 16 #define start_servicename 17 #line 1507 "config_scan.c" /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap YY_PROTO(( void )); #else extern int yywrap YY_PROTO(( void )); #endif #endif #ifndef YY_NO_UNPUT static void yyunput YY_PROTO(( int c, char *buf_ptr )); #endif #ifndef yytext_ptr static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen YY_PROTO(( yyconst char * )); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif #endif #if YY_STACK_USED static int yy_start_stack_ptr = 0; static int yy_start_stack_depth = 0; static int *yy_start_stack = 0; #ifndef YY_NO_PUSH_STATE static void yy_push_state YY_PROTO(( int new_state )); #endif #ifndef YY_NO_POP_STATE static void yy_pop_state YY_PROTO(( void )); #endif #ifndef YY_NO_TOP_STATE static int yy_top_state YY_PROTO(( void )); #endif #else #define YY_NO_PUSH_STATE 1 #define YY_NO_POP_STATE 1 #define YY_NO_TOP_STATE 1 #endif #ifdef YY_MALLOC_DECL YY_MALLOC_DECL #else #ifdef __STDC__ #ifndef __cplusplus #include #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( yy_current_buffer->yy_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL int yylex YY_PROTO(( void )) #endif /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 91 "../lib/config_scan.l" /* * we can operate in more than one mode, find out which it is and * let the parser know. */ if (!socks_parseinit) { socks_parseinit = 1; switch (socks_configtype) { case CONFIGTYPE_SERVER: return SERVERCONFIG; case CONFIGTYPE_CLIENT: return CLIENTCONFIG; default: SERRX(socks_configtype); } } /* start-condition dependent stuff. */ #line 1688 "config_scan.c" if ( yy_init ) { yy_init = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yy_c_buf_p; /* Support of yytext. */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_state_ptr = yy_state_buf; *yy_state_ptr++ = yy_current_state; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 947 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yy_state_ptr++ = yy_current_state; ++yy_cp; } while ( yy_base[yy_current_state] != 2724 ); yy_find_action: yy_current_state = *--yy_state_ptr; yy_lp = yy_accept[yy_current_state]; find_rule: /* we branch to this label when backing up */ for ( ; ; ) /* until we find what rule we matched */ { if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) { yy_act = yy_acclist[yy_lp]; { yy_full_match = yy_cp; break; } } --yy_cp; yy_current_state = *--yy_state_ptr; yy_lp = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; if ( yy_act != YY_END_OF_BUFFER ) { int yyl; for ( yyl = 0; yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) ++yylineno; } do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 1: YY_RULE_SETUP #line 120 "../lib/config_scan.l" { yylval.string = yytext; return PROXYPROTOCOL_SOCKS_V4; } YY_BREAK case 2: YY_RULE_SETUP #line 125 "../lib/config_scan.l" { yylval.string = yytext; return PROXYPROTOCOL_SOCKS_V5; } YY_BREAK case 3: YY_RULE_SETUP #line 130 "../lib/config_scan.l" { yylval.string = yytext; return DEPRECATED; } YY_BREAK case 4: YY_RULE_SETUP #line 135 "../lib/config_scan.l" { yylval.string = yytext; return PROXYPROTOCOL_HTTP_V1_0; } YY_BREAK case 5: YY_RULE_SETUP #line 140 "../lib/config_scan.l" { yylval.string = yytext; return COMMAND_BIND; } YY_BREAK case 6: YY_RULE_SETUP #line 145 "../lib/config_scan.l" { yylval.string = yytext; return COMMAND_CONNECT; } YY_BREAK case 7: YY_RULE_SETUP #line 150 "../lib/config_scan.l" { yylval.string = yytext; return COMMAND_UDPASSOCIATE; } YY_BREAK case 8: YY_RULE_SETUP #line 155 "../lib/config_scan.l" { yylval.string = yytext; return COMMAND_BINDREPLY; } YY_BREAK case 9: YY_RULE_SETUP #line 160 "../lib/config_scan.l" { yylval.string = yytext; return COMMAND_UDPREPLY; } YY_BREAK case 10: YY_RULE_SETUP #line 166 "../lib/config_scan.l" { yylval.string = yytext; return DIRECT; } YY_BREAK case 11: YY_RULE_SETUP #line 172 "../lib/config_scan.l" { BEGIN(start_operator); yylval.string = yytext; return PORT; } YY_BREAK case 12: YY_RULE_SETUP #line 179 "../lib/config_scan.l" { BEGIN(start_portnumber); yylval.string = yytext; return OPERATOR; } YY_BREAK case 13: YY_RULE_SETUP #line 187 "../lib/config_scan.l" { yylval.string = yytext; return LOG_CONNECT; } YY_BREAK case 14: YY_RULE_SETUP #line 192 "../lib/config_scan.l" { yylval.string = yytext; return LOG_DATA; } YY_BREAK case 15: YY_RULE_SETUP #line 197 "../lib/config_scan.l" { yylval.string = yytext; return LOG_DISCONNECT; } YY_BREAK case 16: YY_RULE_SETUP #line 202 "../lib/config_scan.l" { yylval.string = yytext; return LOG_ERROR; } YY_BREAK case 17: YY_RULE_SETUP #line 207 "../lib/config_scan.l" { yylval.string = yytext; return LOG_IOOPERATION; } YY_BREAK case 18: YY_RULE_SETUP #line 212 "../lib/config_scan.l" { BEGIN(INITIAL); yylval.string = yytext; return SERVICENAME; } YY_BREAK case 19: YY_RULE_SETUP #line 219 "../lib/config_scan.l" { BEGIN(start_portnumber); /* no operator, first port in range then. */ yylval.string = yytext; return PORTNUMBER; } YY_BREAK case 20: YY_RULE_SETUP #line 226 "../lib/config_scan.l" { BEGIN(INITIAL); yylval.string = yytext; return PORTNUMBER; } YY_BREAK case 21: YY_RULE_SETUP #line 233 "../lib/config_scan.l" { BEGIN(start_port); yylval.string = yytext; return DOMAINNAME; } YY_BREAK case 22: YY_RULE_SETUP #line 240 "../lib/config_scan.l" { BEGIN(start_port); yylval.string = yytext; return IFNAME; } YY_BREAK case 23: YY_RULE_SETUP #line 247 "../lib/config_scan.l" { yylval.string = yytext; return LOGFILE; } YY_BREAK case 24: YY_RULE_SETUP #line 252 "../lib/config_scan.l" { yylval.string = yytext; return USERNAME; } YY_BREAK case 25: YY_RULE_SETUP #line 257 "../lib/config_scan.l" { BEGIN(start_line); yylval.string = yytext; return *yytext; } YY_BREAK case 26: YY_RULE_SETUP #line 264 "../lib/config_scan.l" { BEGIN(INITIAL); yylval.string = yytext; return LINE; } YY_BREAK case 27: YY_RULE_SETUP #line 271 "../lib/config_scan.l" { yylval.string = yytext; return NOMISMATCH; } YY_BREAK case 28: YY_RULE_SETUP #line 276 "../lib/config_scan.l" { yylval.string = yytext; return NOUNKNOWN; } YY_BREAK case 29: YY_RULE_SETUP #line 281 "../lib/config_scan.l" { yylval.string = yytext; return PROTOCOL_TCP; } YY_BREAK case 30: YY_RULE_SETUP #line 286 "../lib/config_scan.l" { yylval.string = yytext; return PROTOCOL_UDP; } YY_BREAK case 31: YY_RULE_SETUP #line 291 "../lib/config_scan.l" { yylval.string = yytext; return PROTOCOL_FAKE; } YY_BREAK /* non-startcondition dependents. */ case 32: YY_RULE_SETUP #line 299 "../lib/config_scan.l" { yylval.string = yytext; return DEBUGING; } YY_BREAK case 33: YY_RULE_SETUP #line 304 "../lib/config_scan.l" { yylval.string = yytext; return ROUTE; } YY_BREAK case 34: YY_RULE_SETUP #line 309 "../lib/config_scan.l" { BEGIN(start_protocol); yylval.string = yytext; return RESOLVEPROTOCOL; } YY_BREAK case 35: YY_RULE_SETUP #line 316 "../lib/config_scan.l" { BEGIN(start_srchost); yylval.string = yytext; return SRCHOST; } YY_BREAK case 36: YY_RULE_SETUP #line 323 "../lib/config_scan.l" { BEGIN(start_proxyprotocol); yylval.string = yytext; return PROXYPROTOCOL; } YY_BREAK case 37: YY_RULE_SETUP #line 330 "../lib/config_scan.l" { BEGIN(start_logoutput); yylval.string = yytext; return LOGOUTPUT; } YY_BREAK case 38: YY_RULE_SETUP #line 337 "../lib/config_scan.l" { BEGIN(start_protocol); yylval.string = yytext; return PROTOCOL; } YY_BREAK case 39: YY_RULE_SETUP #line 344 "../lib/config_scan.l" { BEGIN(start_command); yylval.string = yytext; return COMMAND; } YY_BREAK case 40: YY_RULE_SETUP #line 351 "../lib/config_scan.l" { yylval.string = yytext; return REDIRECT; } YY_BREAK case 41: YY_RULE_SETUP #line 356 "../lib/config_scan.l" { yylval.string = yytext; return BANDWIDTH; } YY_BREAK case 42: YY_RULE_SETUP #line 361 "../lib/config_scan.l" { yylval.string = yytext; return MAXSESSIONS; } YY_BREAK case 43: YY_RULE_SETUP #line 366 "../lib/config_scan.l" { BEGIN(start_address); yylval.string = yytext; return FROM; } YY_BREAK case 44: YY_RULE_SETUP #line 373 "../lib/config_scan.l" { BEGIN(start_address); yylval.string = yytext; return TO; } YY_BREAK case 45: YY_RULE_SETUP #line 380 "../lib/config_scan.l" { BEGIN(start_address); yylval.string = yytext; return VIA; } YY_BREAK /* server configstuff */ case 46: YY_RULE_SETUP #line 388 "../lib/config_scan.l" { BEGIN(start_address); yylval.string = yytext; return INTERNAL; } YY_BREAK case 47: YY_RULE_SETUP #line 395 "../lib/config_scan.l" { yylval.string = yytext; return EXTERNAL_ROTATION; } YY_BREAK case 48: YY_RULE_SETUP #line 400 "../lib/config_scan.l" { yylval.string = yytext; return ROUTE; } YY_BREAK case 49: YY_RULE_SETUP #line 405 "../lib/config_scan.l" { yylval.string = yytext; return NONE; } YY_BREAK case 50: YY_RULE_SETUP #line 411 "../lib/config_scan.l" { BEGIN(start_address); yylval.string = yytext; return EXTERNAL; } YY_BREAK case 51: YY_RULE_SETUP #line 418 "../lib/config_scan.l" { yylval.string = yytext; return CHILD_MAXIDLE; } YY_BREAK case 52: YY_RULE_SETUP #line 423 "../lib/config_scan.l" { BEGIN(start_username); yylval.string = yytext; return USER; } YY_BREAK case 53: YY_RULE_SETUP #line 430 "../lib/config_scan.l" { BEGIN(start_username); yylval.string = yytext; return USER_PRIVILEGED; } YY_BREAK case 54: YY_RULE_SETUP #line 437 "../lib/config_scan.l" { BEGIN(start_username); yylval.string = yytext; return USER_UNPRIVILEGED; } YY_BREAK case 55: YY_RULE_SETUP #line 444 "../lib/config_scan.l" { BEGIN(start_username); yylval.string = yytext; return USER_LIBWRAP; } YY_BREAK case 56: YY_RULE_SETUP #line 451 "../lib/config_scan.l" { yylval.string = yytext; return IOTIMEOUT; } YY_BREAK case 57: YY_RULE_SETUP #line 456 "../lib/config_scan.l" { yylval.string = yytext; return COMPATIBILITY; } YY_BREAK case 58: YY_RULE_SETUP #line 461 "../lib/config_scan.l" { yylval.string = yytext; return REUSEADDR; } YY_BREAK case 59: YY_RULE_SETUP #line 466 "../lib/config_scan.l" { yylval.string = yytext; return SAMEPORT; } YY_BREAK case 60: YY_RULE_SETUP #line 472 "../lib/config_scan.l" { yylval.string = yytext; return CONNECTTIMEOUT; } YY_BREAK case 61: YY_RULE_SETUP #line 477 "../lib/config_scan.l" { yylval.string = yytext; return EXTENSION; } YY_BREAK case 62: YY_RULE_SETUP #line 482 "../lib/config_scan.l" { yylval.string = yytext; return BIND; } YY_BREAK case 63: YY_RULE_SETUP #line 489 "../lib/config_scan.l" { yylval.string = yytext; return CLIENTRULE; } YY_BREAK case 64: YY_RULE_SETUP #line 495 "../lib/config_scan.l" { BEGIN(start_method); yylval.string = yytext; return METHOD; } YY_BREAK case 65: YY_RULE_SETUP #line 502 "../lib/config_scan.l" { BEGIN(start_method); yylval.string = yytext; return CLIENTMETHOD; } YY_BREAK case 66: YY_RULE_SETUP #line 509 "../lib/config_scan.l" { yylval.string = yytext; return NONE; } YY_BREAK case 67: YY_RULE_SETUP #line 514 "../lib/config_scan.l" { yylval.string = yytext; return GSSAPI; } YY_BREAK case 68: YY_RULE_SETUP #line 519 "../lib/config_scan.l" { yylval.string = yytext; return UNAME; } YY_BREAK case 69: YY_RULE_SETUP #line 524 "../lib/config_scan.l" { yylval.string = yytext; return RFC931; } YY_BREAK case 70: YY_RULE_SETUP #line 529 "../lib/config_scan.l" { yylval.string = yytext; return PAM; } YY_BREAK /* filterrules */ /* * verdicts */ case 71: YY_RULE_SETUP #line 541 "../lib/config_scan.l" { yylval.string = yytext; return VERDICT_BLOCK; } YY_BREAK case 72: YY_RULE_SETUP #line 546 "../lib/config_scan.l" { yylval.string = yytext; return VERDICT_PASS; } YY_BREAK /* * logging */ case 73: YY_RULE_SETUP #line 557 "../lib/config_scan.l" { BEGIN(start_log); yylval.string = yytext; return LOG; } YY_BREAK case 74: YY_RULE_SETUP #line 565 "../lib/config_scan.l" { BEGIN(lineprefix); yylval.string = yytext; return LIBWRAPSTART; } YY_BREAK case 75: YY_RULE_SETUP #line 572 "../lib/config_scan.l" { BEGIN(start_servicename); yylval.string = yytext; return PAMSERVICENAME; } YY_BREAK /* * Old keywords that are no longer used. */ case 76: YY_RULE_SETUP #line 584 "../lib/config_scan.l" { yylval.string = yytext; return DEPRECATED; } YY_BREAK /* misc. generic stuff. */ case 77: YY_RULE_SETUP #line 593 "../lib/config_scan.l" { BEGIN(start_port); yylval.string = yytext; return IPADDRESS; } YY_BREAK case 78: YY_RULE_SETUP #line 601 "../lib/config_scan.l" { yylval.string = yytext; return NUMBER; } YY_BREAK /* ignored */ case 79: YY_RULE_SETUP #line 608 "../lib/config_scan.l" { ; } YY_BREAK /* shell style comment */ case 80: YY_RULE_SETUP #line 613 "../lib/config_scan.l" { ; } YY_BREAK /* state always ends at eol. */ case 81: YY_RULE_SETUP #line 618 "../lib/config_scan.l" { BEGIN(INITIAL); } YY_BREAK /* unless it's escaped. */ case 82: YY_RULE_SETUP #line 623 "../lib/config_scan.l" { ; } YY_BREAK case 83: YY_RULE_SETUP #line 627 "../lib/config_scan.l" { return *yytext; } YY_BREAK case 84: YY_RULE_SETUP #line 630 "../lib/config_scan.l" ECHO; YY_BREAK #line 2520 "config_scan.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(start_address): case YY_STATE_EOF(start_port): case YY_STATE_EOF(lineprefix): case YY_STATE_EOF(start_command): case YY_STATE_EOF(start_compatibility): case YY_STATE_EOF(start_line): case YY_STATE_EOF(start_log): case YY_STATE_EOF(start_logoutput): case YY_STATE_EOF(start_method): case YY_STATE_EOF(start_operator): case YY_STATE_EOF(start_option): case YY_STATE_EOF(start_proxyprotocol): case YY_STATE_EOF(start_username): case YY_STATE_EOF(start_portnumber): case YY_STATE_EOF(start_srchost): case YY_STATE_EOF(start_protocol): case YY_STATE_EOF(start_servicename): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_c_buf_p; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer() { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr; register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf, b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); yy_current_buffer->yy_n_chars = yy_n_chars; } if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state() { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; yy_state_ptr = yy_state_buf; *yy_state_ptr++ = yy_current_state; for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 947 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yy_state_ptr++ = yy_current_state; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { register int yy_is_jam; register YY_CHAR yy_c = 1; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 947 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 946); if ( ! yy_is_jam ) *yy_state_ptr++ = yy_current_state; return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; register char *yy_bp; #endif { register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_n_chars + 2; register char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); yy_current_buffer->yy_n_chars = yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; if ( c == '\n' ) --yylineno; yytext_ptr = yy_bp; yy_hold_char = *yy_cp; yy_c_buf_p = yy_cp; } #endif /* ifndef YY_NO_UNPUT */ #ifdef __cplusplus static int yyinput() #else static int input() #endif { int c; *yy_c_buf_p = yy_hold_char; if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ *yy_c_buf_p = '\0'; else { /* need more input */ int offset = yy_c_buf_p - yytext_ptr; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( yywrap() ) return EOF; if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + offset; break; } } } c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ *yy_c_buf_p = '\0'; /* preserve yytext */ yy_hold_char = *++yy_c_buf_p; if ( c == '\n' ) ++yylineno; return c; } #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) #else void yyrestart( input_file ) FILE *input_file; #endif { if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_init_buffer( yy_current_buffer, input_file ); yy_load_buffer_state(); } #ifdef YY_USE_PROTOS void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) #else void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { if ( yy_current_buffer == new_buffer ) return; if ( yy_current_buffer ) { /* Flush out information for old buffer. */ *yy_c_buf_p = yy_hold_char; yy_current_buffer->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = new_buffer; yy_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ yy_did_buffer_switch_on_eof = 1; } #ifdef YY_USE_PROTOS void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yyin = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) #else YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } #ifdef YY_USE_PROTOS void yy_delete_buffer( YY_BUFFER_STATE b ) #else void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yy_flex_free( (void *) b->yy_ch_buf ); yy_flex_free( (void *) b ); } #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE #include #endif #endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif { int oerrno = errno; yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; #if YY_ALWAYS_INTERACTIVE b->yy_is_interactive = 1; #else #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif errno = oerrno; } #ifdef YY_USE_PROTOS void yy_flush_buffer( YY_BUFFER_STATE b ) #else void yy_flush_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == yy_current_buffer ) yy_load_buffer_state(); } #ifndef YY_NO_SCAN_BUFFER #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) #else YY_BUFFER_STATE yy_scan_buffer( base, size ) char *base; yy_size_t size; #endif { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } #endif #ifndef YY_NO_SCAN_STRING #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) #else YY_BUFFER_STATE yy_scan_string( yy_str ) yyconst char *yy_str; #endif { int len; for ( len = 0; yy_str[len]; ++len ) ; return yy_scan_bytes( yy_str, len ); } #endif #ifndef YY_NO_SCAN_BYTES #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) #else YY_BUFFER_STATE yy_scan_bytes( bytes, len ) yyconst char *bytes; int len; #endif { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) yy_flex_alloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #endif #ifndef YY_NO_PUSH_STATE #ifdef YY_USE_PROTOS static void yy_push_state( int new_state ) #else static void yy_push_state( new_state ) int new_state; #endif { if ( yy_start_stack_ptr >= yy_start_stack_depth ) { yy_size_t new_size; yy_start_stack_depth += YY_START_STACK_INCR; new_size = yy_start_stack_depth * sizeof( int ); if ( ! yy_start_stack ) yy_start_stack = (int *) yy_flex_alloc( new_size ); else yy_start_stack = (int *) yy_flex_realloc( (void *) yy_start_stack, new_size ); if ( ! yy_start_stack ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } yy_start_stack[yy_start_stack_ptr++] = YY_START; BEGIN(new_state); } #endif #ifndef YY_NO_POP_STATE static void yy_pop_state() { if ( --yy_start_stack_ptr < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(yy_start_stack[yy_start_stack_ptr]); } #endif #ifndef YY_NO_TOP_STATE static int yy_top_state() { return yy_start_stack[yy_start_stack_ptr - 1]; } #endif #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif #ifdef YY_USE_PROTOS static void yy_fatal_error( yyconst char msg[] ) #else static void yy_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ yytext[yyleng] = yy_hold_char; \ yy_c_buf_p = yytext + n; \ yy_hold_char = *yy_c_buf_p; \ *yy_c_buf_p = '\0'; \ yyleng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef yytext_ptr #ifdef YY_USE_PROTOS static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) #else static void yy_flex_strncpy( s1, s2, n ) char *s1; yyconst char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN #ifdef YY_USE_PROTOS static int yy_flex_strlen( yyconst char *s ) #else static int yy_flex_strlen( s ) yyconst char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef YY_USE_PROTOS static void *yy_flex_alloc( yy_size_t size ) #else static void *yy_flex_alloc( size ) yy_size_t size; #endif { return (void *) malloc( size ); } #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, yy_size_t size ) #else static void *yy_flex_realloc( ptr, size ) void *ptr; yy_size_t size; #endif { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr ) #else static void yy_flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if YY_MAIN int main() { yylex(); return 0; } #endif #line 630 "../lib/config_scan.l" dante-1.1.19.dfsg/dlib/config_parse.c0000644000175000017500000017115410364161265016030 0ustar roamroam#ifndef lint /*static char yysccsid[] = "from: @(#)yaccpar 1.9 (Berkeley) 02/21/93";*/ static char yyrcsid[] #if __GNUC__ >= 2 __attribute__ ((unused)) #endif /* __GNUC__ >= 2 */ = "$OpenBSD: skeleton.c,v 1.23 2004/03/12 13:39:50 henning Exp $"; #endif #include #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 #define YYLEX yylex() #define YYEMPTY -1 #define yyclearin (yychar=(YYEMPTY)) #define yyerrok (yyerrflag=0) #define YYRECOVERING() (yyerrflag!=0) #define yyparse socks_yyparse #define yylex socks_yylex #define yyerror socks_yyerror #define yychar socks_yychar #define yyval socks_yyval #define yylval socks_yylval #define yydebug socks_yydebug #define yynerrs socks_yynerrs #define yyerrflag socks_yyerrflag #define yyss socks_yyss #define yysslim socks_yysslim #define yyssp socks_yyssp #define yyvs socks_yyvs #define yyvsp socks_yyvsp #define yystacksize socks_yystacksize #define yylhs socks_yylhs #define yylen socks_yylen #define yydefred socks_yydefred #define yydgoto socks_yydgoto #define yysindex socks_yysindex #define yyrindex socks_yyrindex #define yygindex socks_yygindex #define yytable socks_yytable #define yycheck socks_yycheck #define yyname socks_yyname #define yyrule socks_yyrule #define YYPREFIX "socks_yy" #line 45 "../lib/config_parse.y" #include "common.h" #include "yacconfig.h" static const char rcsid[] = "$Id: config_parse.y,v 1.199 2006/01/20 12:59:06 michaels Exp $"; __BEGIN_DECLS #if HAVE_LIBWRAP && SOCKS_SERVER extern jmp_buf tcpd_buf; #endif /* HAVE_LIBWRAP && SOCKS_SERVER */ static void addressinit __P((struct ruleaddress_t *address)); #if SOCKS_SERVER static void ruleinit __P((struct rule_t *rule)); static void fixconfig __P((void)); #endif __END_DECLS extern int yylineno; extern char *yytext; #if SOCKS_SERVER static struct rule_t ruleinitmem; static struct rule_t rule; /* new rule. */ static struct protocol_t protocolmem; /* new protocolmem. */ #endif static struct serverstate_t state; static struct route_t route; /* new route. */ static struct ruleaddress_t gw; /* new gateway. */ static struct ruleaddress_t src; /* new src. */ static struct ruleaddress_t dst; /* new dst. */ static struct ruleaddress_t rdr_from; static struct ruleaddress_t rdr_to; static struct ruleaddress_t *ruleaddress; /* current ruleaddress */ static struct extension_t *extension; /* new extensions */ static struct proxyprotocol_t *proxyprotocol;/* proxy protocol. */ static char *atype; /* atype of new address. */ static struct in_addr *ipaddr; /* new ipaddress */ static struct in_addr *netmask; /* new netmask */ static char *domain; /* new domain. */ static char *ifname; /* new ifname. */ static in_port_t *port_tcp; /* new TCP portnumber. */ static in_port_t *port_udp; /* new UDP portnumber. */ static int *methodv; /* new authmethods. */ static size_t *methodc; /* number of them. */ static struct protocol_t *protocol; /* new protocol. */ static struct command_t *command; /* new command. */ static enum operator_t *operator; /* new operator. */ static const struct { const char *name; const int value; } syslogfacilityv[] = { #ifdef LOG_AUTH { "auth", LOG_AUTH }, #endif /* LOG_AUTH */ #ifdef LOG_AUTHPRIV { "authpriv", LOG_AUTHPRIV }, #endif /* LOG_AUTHPRIV */ #ifdef LOG_DAEMON { "daemon", LOG_DAEMON }, #endif /* LOG_DAEMON */ #ifdef LOG_USER { "user", LOG_USER }, #endif /* LOG_USER */ #ifdef LOG_LOCAL0 { "local0", LOG_LOCAL0 }, #endif /* LOG_LOCAL0 */ #ifdef LOG_LOCAL1 { "local1", LOG_LOCAL1 }, #endif /* LOG_LOCAL1 */ #ifdef LOG_LOCAL2 { "local2", LOG_LOCAL2 }, #endif /* LOG_LOCAL2 */ #ifdef LOG_LOCAL3 { "local3", LOG_LOCAL3 }, #endif /* LOG_LOCAL3 */ #ifdef LOG_LOCAL4 { "local4", LOG_LOCAL4 }, #endif /* LOG_LOCAL4 */ #ifdef LOG_LOCAL5 { "local5", LOG_LOCAL5 }, #endif /* LOG_LOCAL5 */ #ifdef LOG_LOCAL6 { "local6", LOG_LOCAL6 }, #endif /* LOG_LOCAL6 */ #ifdef LOG_LOCAL7 { "local7", LOG_LOCAL7 } #endif /* LOG_LOCAL7 */ }; #define YYDEBUG 1 #define ADDMETHOD(method) \ do { \ if (methodisset(method, methodv, *methodc)) \ yywarn("duplicate method: %s", method2string(method)); \ else { \ if (*methodc >= MAXMETHOD) \ yyerror("internal error, (%d >= %d)", *methodc, MAXMETHOD); \ methodv[(*methodc)++] = method; \ } \ } while (0) #line 167 "../lib/config_parse.y" #ifndef YYSTYPE_DEFINED #define YYSTYPE_DEFINED typedef union { char *string; uid_t uid; } YYSTYPE; #endif /* YYSTYPE_DEFINED */ #line 175 "config_parse.c" #define SERVERCONFIG 257 #define CLIENTCONFIG 258 #define DEPRECATED 259 #define CLIENTRULE 260 #define INTERNAL 261 #define EXTERNAL 262 #define EXTERNAL_ROTATION 263 #define DEBUGING 264 #define RESOLVEPROTOCOL 265 #define SRCHOST 266 #define NOMISMATCH 267 #define NOUNKNOWN 268 #define EXTENSION 269 #define BIND 270 #define PRIVILEGED 271 #define IOTIMEOUT 272 #define CONNECTTIMEOUT 273 #define METHOD 274 #define CLIENTMETHOD 275 #define NONE 276 #define GSSAPI 277 #define UNAME 278 #define RFC931 279 #define PAM 280 #define COMPATIBILITY 281 #define REUSEADDR 282 #define SAMEPORT 283 #define USERNAME 284 #define USER_PRIVILEGED 285 #define USER_UNPRIVILEGED 286 #define USER_LIBWRAP 287 #define LOGOUTPUT 288 #define LOGFILE 289 #define CHILD_MAXIDLE 290 #define ROUTE 291 #define VIA 292 #define VERDICT_BLOCK 293 #define VERDICT_PASS 294 #define PAMSERVICENAME 295 #define PROTOCOL 296 #define PROTOCOL_TCP 297 #define PROTOCOL_UDP 298 #define PROTOCOL_FAKE 299 #define PROXYPROTOCOL 300 #define PROXYPROTOCOL_SOCKS_V4 301 #define PROXYPROTOCOL_SOCKS_V5 302 #define PROXYPROTOCOL_MSPROXY_V2 303 #define PROXYPROTOCOL_HTTP_V1_0 304 #define USER 305 #define COMMAND 306 #define COMMAND_BIND 307 #define COMMAND_CONNECT 308 #define COMMAND_UDPASSOCIATE 309 #define COMMAND_BINDREPLY 310 #define COMMAND_UDPREPLY 311 #define ACTION 312 #define LINE 313 #define LIBWRAPSTART 314 #define OPERATOR 315 #define LOG 316 #define LOG_CONNECT 317 #define LOG_DATA 318 #define LOG_DISCONNECT 319 #define LOG_ERROR 320 #define LOG_IOOPERATION 321 #define IPADDRESS 322 #define DOMAINNAME 323 #define DIRECT 324 #define IFNAME 325 #define PORT 326 #define PORTNUMBER 327 #define SERVICENAME 328 #define NUMBER 329 #define FROM 330 #define TO 331 #define REDIRECT 332 #define BANDWIDTH 333 #define MAXSESSIONS 334 #define YYERRCODE 256 #if defined(__cplusplus) || defined(__STDC__) const short socks_yylhs[] = #else short socks_yylhs[] = #endif { -1, 0, 0, 53, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 27, 28, 28, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 52, 52, 52, 52, 52, 52, 3, 61, 26, 7, 8, 8, 8, 8, 8, 9, 9, 10, 11, 12, 12, 33, 34, 35, 35, 36, 37, 38, 39, 40, 40, 29, 29, 29, 41, 42, 43, 43, 60, 55, 55, 55, 56, 57, 58, 59, 31, 32, 30, 44, 45, 45, 46, 46, 14, 15, 15, 15, 16, 17, 17, 18, 18, 49, 98, 47, 99, 48, 51, 51, 51, 51, 51, 50, 50, 69, 70, 71, 71, 66, 67, 67, 67, 67, 67, 67, 68, 68, 72, 72, 72, 72, 72, 72, 73, 73, 19, 21, 21, 21, 21, 21, 20, 20, 4, 6, 6, 5, 5, 74, 22, 22, 24, 25, 23, 75, 77, 77, 77, 77, 77, 76, 76, 13, 78, 79, 80, 100, 101, 63, 64, 64, 64, 64, 64, 65, 65, 89, 90, 102, 103, 62, 81, 81, 81, 82, 82, 82, 83, 83, 83, 85, 85, 85, 84, 91, 91, 86, 87, 88, 92, 92, 92, 96, 96, 93, 94, 104, 97, 95, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yylen[] = #else short socks_yylen[] = #endif { 2, 2, 2, 1, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 4, 0, 4, 0, 3, 3, 1, 1, 1, 3, 1, 1, 2, 3, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, 2, 3, 1, 1, 1, 3, 1, 1, 1, 2, 3, 0, 4, 0, 4, 1, 1, 1, 1, 1, 1, 2, 7, 1, 0, 2, 6, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 2, 1, 3, 3, 3, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 4, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 3, 2, 1, 1, 3, 1, 1, 1, 1, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yydefred[] = #else short socks_yydefred[] = #endif { 0, 3, 14, 0, 10, 4, 0, 0, 33, 0, 0, 0, 35, 11, 16, 60, 12, 15, 59, 58, 13, 0, 53, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 122, 5, 19, 31, 32, 30, 28, 29, 20, 21, 22, 23, 27, 17, 18, 24, 6, 25, 66, 67, 68, 26, 9, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 93, 0, 0, 0, 0, 0, 0, 75, 83, 84, 82, 81, 62, 0, 61, 0, 0, 0, 0, 56, 57, 86, 87, 0, 85, 49, 0, 48, 73, 74, 0, 0, 77, 78, 0, 76, 72, 69, 70, 71, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 111, 119, 118, 109, 112, 108, 120, 139, 115, 0, 0, 107, 117, 116, 64, 159, 160, 157, 158, 161, 0, 0, 0, 0, 103, 181, 184, 185, 52, 0, 0, 0, 54, 172, 173, 174, 89, 51, 95, 96, 97, 98, 99, 92, 0, 94, 80, 0, 0, 0, 0, 0, 0, 0, 0, 166, 167, 137, 138, 0, 0, 0, 0, 114, 164, 0, 0, 0, 163, 0, 105, 0, 0, 169, 170, 171, 101, 90, 150, 132, 133, 131, 0, 37, 38, 39, 40, 41, 0, 36, 45, 0, 44, 124, 125, 126, 127, 128, 123, 0, 151, 143, 144, 145, 146, 147, 142, 0, 0, 0, 141, 140, 0, 165, 136, 0, 0, 168, 0, 0, 0, 196, 193, 189, 0, 0, 135, 43, 47, 130, 149, 154, 0, 0, 0, 155, 106, 0, 152, 0, 0, 102, 0, 195, 191, 188, 190, 0, 176, 177, 153, 186, 0, 156, 0, 180, 34, 194, 192, 183, 182, 0, 178, 179, 175, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yydgoto[] = #else short socks_yydgoto[] = #endif { 3, 7, 6, 216, 128, 210, 211, 129, 217, 218, 130, 220, 221, 131, 15, 87, 41, 99, 100, 132, 227, 228, 133, 134, 135, 136, 66, 4, 16, 17, 18, 42, 43, 147, 102, 103, 45, 68, 46, 69, 47, 19, 89, 90, 49, 110, 111, 50, 51, 137, 172, 173, 52, 5, 53, 54, 55, 56, 57, 113, 58, 20, 247, 248, 149, 150, 60, 138, 139, 61, 151, 152, 140, 62, 194, 141, 235, 236, 142, 195, 243, 157, 161, 260, 261, 282, 262, 263, 284, 196, 244, 290, 202, 252, 253, 254, 274, 275, 106, 107, 186, 187, 188, 189, 287, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yysindex[] = #else short socks_yysindex[] = #endif { -199, 0, 0, 0, 0, 0, -10, 269, 0, -28, -22, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, -227, 0, 0, 10, 17, 26, 28, 51, 63, 66, 75, 76, 78, 79, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, -187, -264, -146, 21, 22, 88, 90, -254, -185, -121, -179, -178, 0, 0, -175, -131, -131, -131, -174, -243, 0, 0, 0, 0, 0, 0, -146, 0, -200, -235, -277, -277, 0, 0, 0, 0, -185, 0, 0, -121, 0, 0, 0, -236, -236, 0, 0, -175, 0, 0, 0, 0, 0, 0, 98, 99, 100, 102, 104, 107, 108, 109, -233, 110, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -243, -158, 0, 0, 0, 0, 0, 0, 0, 0, 0, -200, -158, -235, -158, 0, 0, 0, 0, 0, -150, -150, -150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -236, 0, 0, -236, -142, -186, -209, -102, -206, -125, -203, 0, 0, 0, 0, 131, 135, -133, -126, 0, 0, -243, -127, 140, 0, -87, 0, -235, -289, 0, 0, 0, 0, 0, 0, 0, 0, 0, -186, 0, 0, 0, 0, 0, -209, 0, 0, -102, 0, 0, 0, 0, 0, 0, 0, -206, 0, 0, 0, 0, 0, 0, 0, -203, -277, -277, 0, 0, 91, 0, 0, 148, -277, 0, 163, -200, 103, 0, 0, 0, 178, -205, 0, 0, 0, 0, 0, 0, 177, -150, -150, 0, 0, -277, 0, -268, 105, 0, -100, 0, 0, 0, 0, -297, 0, 0, 0, 0, -150, 0, -150, 0, 0, 0, 0, 0, 0, -150, 0, 0, 0,}; #if defined(__cplusplus) || defined(__STDC__) const short socks_yyrindex[] = #else short socks_yyrindex[] = #endif { 0, 0, 0, 0, 0, 0, 225, 229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -99, 0, 0, 0, 0, 0, 0, 125, 0, -96, -95, 0, 0, 0, 0, 0, 0, 161, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -116, 0, -110, 0, 0, 0, 0, 0, 0, 233, 233, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -115, 0, 0, 0, 0, 0, 271, 0, 0, 319, 0, 0, 0, 0, 0, 0, 0, 278, 0, 0, 0, 0, 0, 0, 0, 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -122, -122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -74, 0, -74, 0, 0, 0, 0, 0, 0, -122, 0, 0, 0,}; #if defined(__cplusplus) || defined(__STDC__) const short socks_yygindex[] = #else short socks_yygindex[] = #endif { 0, 0, 0, 121, -85, 25, 0, -84, 0, 23, 0, 0, 24, 0, 234, 0, 0, 0, 143, -73, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 238, 0, 144, 0, 0, 0, 0, 0, 241, 0, 162, 0, 0, 142, 0, 0, -71, -88, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 243, 0, 0, 0, -135, 0, 0, -114, 0, 0, -128, -90, 232, -123, 0, 20, 0, 0, 0, 0, 0, 0, -217, -89, 0, -81, 38, 0, 0, 0, 0, -143, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; #define YYTABLESIZE 676 #if defined(__cplusplus) || defined(__STDC__) const short socks_yytable[] = #else short socks_yytable[] = #endif { 13, 100, 153, 187, 158, 162, 144, 145, 113, 162, 134, 100, 159, 163, 197, 104, 203, 204, 146, 174, 148, 264, 95, 199, 192, 288, 250, 198, 267, 200, 63, 117, 289, 84, 85, 86, 64, 96, 251, 117, 167, 168, 169, 170, 171, 154, 155, 65, 156, 279, 8, 187, 118, 119, 154, 155, 280, 120, 1, 2, 118, 153, 121, 122, 144, 145, 36, 37, 70, 26, 121, 123, 249, 124, 117, 71, 146, 50, 148, 123, 241, 124, 97, 98, 72, 205, 73, 50, 206, 125, 126, 127, 212, 213, 214, 215, 119, 184, 185, 127, 120, 222, 223, 224, 225, 226, 122, 108, 109, 74, 153, 208, 209, 269, 230, 231, 232, 233, 234, 277, 278, 75, 251, 272, 76, 63, 100, 14, 39, 114, 115, 160, 164, 77, 78, 63, 79, 80, 291, 81, 292, 82, 83, 88, 91, 92, 93, 293, 94, 101, 104, 105, 187, 112, 134, 116, 176, 177, 178, 134, 179, 88, 180, 144, 145, 181, 182, 183, 190, 191, 187, 88, 193, 187, 187, 146, 201, 148, 187, 281, 134, 134, 219, 187, 187, 134, 207, 283, 229, 237, 134, 134, 187, 238, 187, 187, 239, 79, 245, 134, 187, 134, 50, 240, 242, 246, 266, 79, 187, 187, 187, 187, 187, 113, 162, 134, 265, 134, 134, 134, 104, 268, 187, 271, 276, 2, 187, 286, 270, 1, 285, 113, 187, 187, 162, 104, 255, 113, 104, 162, 256, 40, 165, 187, 257, 44, 166, 258, 48, 8, 59, 143, 175, 67, 9, 10, 259, 273, 0, 0, 100, 100, 100, 100, 100, 0, 100, 100, 0, 0, 100, 0, 0, 100, 100, 100, 100, 0, 11, 38, 0, 12, 100, 0, 0, 0, 100, 100, 100, 100, 0, 100, 100, 0, 100, 100, 100, 100, 0, 0, 0, 100, 0, 0, 0, 0, 100, 100, 0, 0, 0, 0, 0, 0, 0, 100, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 100, 100, 100, 50, 50, 50, 50, 50, 0, 50, 50, 0, 0, 50, 0, 0, 50, 50, 50, 50, 0, 0, 0, 0, 0, 50, 0, 0, 0, 50, 50, 50, 50, 0, 50, 50, 0, 50, 50, 0, 50, 0, 0, 0, 50, 0, 0, 0, 0, 0, 50, 63, 63, 63, 63, 63, 63, 63, 63, 0, 0, 63, 0, 42, 63, 63, 63, 63, 0, 0, 129, 0, 0, 63, 50, 0, 0, 63, 63, 63, 63, 0, 63, 63, 0, 63, 63, 88, 88, 88, 88, 88, 0, 88, 88, 0, 0, 88, 0, 0, 88, 88, 88, 88, 0, 0, 0, 0, 0, 88, 0, 46, 0, 88, 88, 88, 88, 0, 88, 88, 0, 88, 88, 79, 79, 79, 79, 79, 0, 79, 79, 0, 0, 79, 148, 0, 79, 79, 79, 79, 0, 0, 0, 0, 0, 79, 0, 0, 0, 79, 79, 79, 79, 0, 79, 79, 0, 79, 79, 187, 187, 187, 187, 187, 0, 187, 187, 0, 0, 187, 0, 0, 187, 187, 187, 187, 0, 0, 0, 0, 0, 187, 0, 0, 0, 187, 187, 187, 187, 0, 187, 187, 0, 187, 187, 8, 21, 22, 23, 24, 0, 10, 25, 0, 0, 26, 0, 42, 27, 28, 29, 30, 42, 0, 129, 0, 0, 31, 0, 129, 0, 32, 33, 34, 11, 0, 35, 12, 0, 36, 37, 0, 0, 42, 42, 0, 0, 0, 42, 0, 129, 129, 0, 42, 42, 129, 0, 0, 0, 0, 129, 129, 42, 0, 42, 0, 0, 0, 0, 129, 46, 129, 0, 0, 0, 0, 0, 0, 42, 0, 42, 42, 42, 0, 0, 129, 0, 129, 129, 129, 0, 46, 46, 148, 0, 0, 46, 0, 0, 0, 0, 46, 46, 0, 0, 0, 0, 0, 0, 0, 46, 0, 46, 0, 148, 148, 0, 0, 0, 148, 0, 0, 0, 0, 148, 148, 46, 0, 46, 46, 46, 0, 0, 148, 0, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, 0, 148, 148, 148, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yycheck[] = #else short socks_yycheck[] = #endif { 10, 0, 92, 125, 93, 94, 91, 91, 125, 125, 125, 10, 93, 94, 149, 125, 159, 160, 91, 107, 91, 238, 276, 151, 138, 322, 315, 150, 245, 152, 58, 274, 329, 297, 298, 299, 58, 291, 327, 274, 276, 277, 278, 279, 280, 322, 323, 58, 325, 266, 259, 125, 295, 296, 322, 323, 324, 300, 257, 258, 295, 151, 305, 306, 149, 149, 293, 294, 58, 269, 305, 314, 200, 316, 274, 58, 149, 0, 149, 314, 194, 316, 267, 268, 58, 173, 58, 10, 176, 332, 333, 334, 301, 302, 303, 304, 296, 330, 331, 334, 300, 307, 308, 309, 310, 311, 306, 282, 283, 58, 200, 297, 298, 248, 317, 318, 319, 320, 321, 262, 263, 58, 327, 328, 58, 0, 125, 6, 7, 79, 80, 93, 94, 58, 58, 10, 58, 58, 281, 58, 283, 123, 329, 289, 123, 123, 58, 290, 58, 270, 329, 329, 274, 284, 269, 329, 58, 58, 58, 274, 58, 0, 58, 248, 248, 58, 58, 58, 58, 58, 292, 10, 330, 295, 296, 248, 326, 248, 300, 268, 295, 296, 284, 305, 306, 300, 328, 268, 313, 58, 305, 306, 314, 58, 316, 269, 329, 0, 58, 314, 274, 316, 125, 329, 331, 292, 58, 10, 330, 331, 332, 333, 334, 330, 330, 330, 125, 332, 333, 334, 330, 58, 296, 45, 47, 0, 300, 327, 125, 0, 125, 330, 306, 0, 330, 330, 211, 125, 125, 125, 217, 7, 99, 10, 220, 7, 102, 228, 7, 259, 7, 89, 110, 21, 264, 265, 236, 254, -1, -1, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, -1, 272, 273, 274, 275, -1, 288, 10, -1, 291, 281, -1, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 295, 296, -1, -1, -1, 300, -1, -1, -1, -1, 305, 306, -1, -1, -1, -1, -1, -1, -1, 314, -1, 316, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 330, -1, 332, 333, 334, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, -1, 272, 273, 274, 275, -1, -1, -1, -1, -1, 281, -1, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, -1, 296, -1, -1, -1, 300, -1, -1, -1, -1, -1, 306, 259, 260, 261, 262, 263, 264, 265, 266, -1, -1, 269, -1, 125, 272, 273, 274, 275, -1, -1, 125, -1, -1, 281, 330, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, -1, 272, 273, 274, 275, -1, -1, -1, -1, -1, 281, -1, 125, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, 125, -1, 272, 273, 274, 275, -1, -1, -1, -1, -1, 281, -1, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, -1, 272, 273, 274, 275, -1, -1, -1, -1, -1, 281, -1, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, 269, 272, 273, 274, 275, 274, -1, 269, -1, -1, 281, -1, 274, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, -1, -1, 295, 296, -1, -1, -1, 300, -1, 295, 296, -1, 305, 306, 300, -1, -1, -1, -1, 305, 306, 314, -1, 316, -1, -1, -1, -1, 314, 274, 316, -1, -1, -1, -1, -1, -1, 330, -1, 332, 333, 334, -1, -1, 330, -1, 332, 333, 334, -1, 295, 296, 274, -1, -1, 300, -1, -1, -1, -1, 305, 306, -1, -1, -1, -1, -1, -1, -1, 314, -1, 316, -1, 295, 296, -1, -1, -1, 300, -1, -1, -1, -1, 305, 306, 330, -1, 332, 333, 334, -1, -1, 314, -1, 316, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 330, -1, 332, 333, 334, }; #define YYFINAL 3 #ifndef YYDEBUG #define YYDEBUG 0 #endif #define YYMAXTOKEN 334 #if YYDEBUG #if defined(__cplusplus) || defined(__STDC__) const char * const socks_yyname[] = #else char *socks_yyname[] = #endif { "end-of-file",0,0,0,0,0,0,0,0,0,"'\\n'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'-'",0,"'/'",0,0,0,0,0,0,0,0,0,0,"':'",0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'",0,"'}'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, "SERVERCONFIG","CLIENTCONFIG","DEPRECATED","CLIENTRULE","INTERNAL","EXTERNAL", "EXTERNAL_ROTATION","DEBUGING","RESOLVEPROTOCOL","SRCHOST","NOMISMATCH", "NOUNKNOWN","EXTENSION","BIND","PRIVILEGED","IOTIMEOUT","CONNECTTIMEOUT", "METHOD","CLIENTMETHOD","NONE","GSSAPI","UNAME","RFC931","PAM","COMPATIBILITY", "REUSEADDR","SAMEPORT","USERNAME","USER_PRIVILEGED","USER_UNPRIVILEGED", "USER_LIBWRAP","LOGOUTPUT","LOGFILE","CHILD_MAXIDLE","ROUTE","VIA", "VERDICT_BLOCK","VERDICT_PASS","PAMSERVICENAME","PROTOCOL","PROTOCOL_TCP", "PROTOCOL_UDP","PROTOCOL_FAKE","PROXYPROTOCOL","PROXYPROTOCOL_SOCKS_V4", "PROXYPROTOCOL_SOCKS_V5","PROXYPROTOCOL_MSPROXY_V2","PROXYPROTOCOL_HTTP_V1_0", "USER","COMMAND","COMMAND_BIND","COMMAND_CONNECT","COMMAND_UDPASSOCIATE", "COMMAND_BINDREPLY","COMMAND_UDPREPLY","ACTION","LINE","LIBWRAPSTART", "OPERATOR","LOG","LOG_CONNECT","LOG_DATA","LOG_DISCONNECT","LOG_ERROR", "LOG_IOOPERATION","IPADDRESS","DOMAINNAME","DIRECT","IFNAME","PORT", "PORTNUMBER","SERVICENAME","NUMBER","FROM","TO","REDIRECT","BANDWIDTH", "MAXSESSIONS", }; #if defined(__cplusplus) || defined(__STDC__) const char * const socks_yyrule[] = #else char *socks_yyrule[] = #endif {"$accept : configtype", "configtype : serverinit serverline", "configtype : clientinit clientline", "serverinit : SERVERCONFIG", "serverline :", "serverline : serverline '\\n'", "serverline : serverline serverconfig", "serverline : serverline clientrule", "serverline : serverline rule", "serverline : serverline route", "clientline :", "clientline : clientline '\\n'", "clientline : clientline clientconfig", "clientline : clientline route", "clientinit : CLIENTCONFIG", "clientconfig : clientoption", "clientconfig : deprecated", "serverconfig : global_authmethod", "serverconfig : global_clientauthmethod", "serverconfig : deprecated", "serverconfig : internal", "serverconfig : external", "serverconfig : external_rotation", "serverconfig : logoutput", "serverconfig : serveroption", "serverconfig : userids", "serverconfig : childstate", "serveroption : compatibility", "serveroption : connecttimeout", "serveroption : extension", "serveroption : iotimeout", "serveroption : resolveprotocol", "serveroption : srchost", "deprecated : DEPRECATED", "route : ROUTE routeinit '{' routeoptions fromto gateway routeoptions '}'", "routeinit :", "proxyprotocol : PROXYPROTOCOL ':' proxyprotocols", "proxyprotocolname : PROXYPROTOCOL_SOCKS_V4", "proxyprotocolname : PROXYPROTOCOL_SOCKS_V5", "proxyprotocolname : PROXYPROTOCOL_MSPROXY_V2", "proxyprotocolname : PROXYPROTOCOL_HTTP_V1_0", "proxyprotocolname : deprecated", "proxyprotocols : proxyprotocolname", "proxyprotocols : proxyprotocolname proxyprotocols", "user : USER ':' usernames", "username : USERNAME", "usernames : username", "usernames : username usernames", "extension : EXTENSION ':' extensions", "extensionname : BIND", "extensions : extensionname", "extensions : extensionname extensions", "internal : INTERNAL internalinit ':' internaladdress", "internalinit :", "external : EXTERNAL externalinit ':' externaladdress", "externalinit :", "external_rotation : EXTERNAL_ROTATION ':' NONE", "external_rotation : EXTERNAL_ROTATION ':' ROUTE", "clientoption : logoutput", "clientoption : debuging", "clientoption : resolveprotocol", "logoutput : LOGOUTPUT ':' logoutputdevices", "logoutputdevice : LOGFILE", "logoutputdevices : logoutputdevice", "logoutputdevices : logoutputdevice logoutputdevices", "childstate : CHILD_MAXIDLE ':' NUMBER", "userids : user_privileged", "userids : user_unprivileged", "userids : user_libwrap", "user_privileged : USER_PRIVILEGED ':' userid", "user_unprivileged : USER_UNPRIVILEGED ':' userid", "user_libwrap : USER_LIBWRAP ':' userid", "userid : USERNAME", "iotimeout : IOTIMEOUT ':' NUMBER", "connecttimeout : CONNECTTIMEOUT ':' NUMBER", "debuging : DEBUGING ':' NUMBER", "compatibility : COMPATIBILITY ':' compatibilitys", "compatibilityname : REUSEADDR", "compatibilityname : SAMEPORT", "compatibilitys : compatibilityname", "compatibilitys : compatibilityname compatibilitys", "resolveprotocol : RESOLVEPROTOCOL ':' resolveprotocolname", "resolveprotocolname : PROTOCOL_FAKE", "resolveprotocolname : PROTOCOL_TCP", "resolveprotocolname : PROTOCOL_UDP", "srchost : SRCHOST ':' srchostoptions", "srchostoption : NOMISMATCH", "srchostoption : NOUNKNOWN", "srchostoptions : srchostoption", "srchostoptions : srchostoption srchostoptions", "authmethod : METHOD ':' authmethods", "$$1 :", "global_authmethod : METHOD ':' $$1 authmethods", "$$2 :", "global_clientauthmethod : CLIENTMETHOD ':' $$2 authmethods", "authmethodname : NONE", "authmethodname : GSSAPI", "authmethodname : UNAME", "authmethodname : RFC931", "authmethodname : PAM", "authmethods : authmethodname", "authmethods : authmethodname authmethods", "clientrule : CLIENTRULE verdict '{' clientruleoptions fromto clientruleoptions '}'", "clientruleoption : option", "clientruleoptions :", "clientruleoptions : clientruleoption clientruleoptions", "rule : verdict '{' ruleoptions fromto ruleoptions '}'", "ruleoption : option", "ruleoption : bandwidth", "ruleoption : command", "ruleoption : protocol", "ruleoption : proxyprotocol", "ruleoption : redirect", "ruleoptions :", "ruleoptions : ruleoption ruleoptions", "option : authmethod", "option : libwrap", "option : log", "option : pamservicename", "option : user", "option : session", "verdict : VERDICT_BLOCK", "verdict : VERDICT_PASS", "command : COMMAND ':' commands", "commandname : COMMAND_BIND", "commandname : COMMAND_CONNECT", "commandname : COMMAND_UDPASSOCIATE", "commandname : COMMAND_BINDREPLY", "commandname : COMMAND_UDPREPLY", "commands : commandname", "commands : commandname commands", "protocol : PROTOCOL ':' protocols", "protocolname : PROTOCOL_TCP", "protocolname : PROTOCOL_UDP", "protocols : protocolname", "protocols : protocolname protocols", "fromto : srcaddress dstaddress", "redirect : REDIRECT rdr_fromaddress", "redirect : REDIRECT rdr_toaddress", "session : maxsessions", "maxsessions : MAXSESSIONS ':' NUMBER", "bandwidth : BANDWIDTH ':' NUMBER", "log : LOG ':' logs", "logname : LOG_CONNECT", "logname : LOG_DATA", "logname : LOG_DISCONNECT", "logname : LOG_ERROR", "logname : LOG_IOOPERATION", "logs : logname", "logs : logname logs", "pamservicename : PAMSERVICENAME ':' SERVICENAME", "libwrap : LIBWRAPSTART ':' LINE", "srcaddress : from ':' address", "dstaddress : to ':' address", "rdr_fromaddress : rdr_from ':' address", "rdr_toaddress : rdr_to ':' address", "gateway : via ':' gwaddress", "routeoption : command", "routeoption : extension", "routeoption : protocol", "routeoption : proxyprotocol", "routeoption : authmethod", "routeoptions :", "routeoptions : routeoption routeoptions", "from : FROM", "to : TO", "rdr_from : FROM", "rdr_to : TO", "via : VIA", "internaladdress : ipaddress port", "internaladdress : domain port", "internaladdress : ifname port", "externaladdress : ipaddress", "externaladdress : domain", "externaladdress : ifname", "address : ipaddress '/' netmask port", "address : domain port", "address : ifname port", "gwaddress : ipaddress port", "gwaddress : domain port", "gwaddress : direct", "ipaddress : IPADDRESS", "netmask : NUMBER", "netmask : IPADDRESS", "domain : DOMAINNAME", "ifname : IFNAME", "direct : DIRECT", "port :", "port : PORT portoperator portnumber", "port : PORT portrange", "portnumber : portservice", "portnumber : portstart", "portrange : portstart '-' portend", "portstart : PORTNUMBER", "portend : PORTNUMBER", "portservice : SERVICENAME", "portoperator : OPERATOR", }; #endif #ifdef YYSTACKSIZE #undef YYMAXDEPTH #define YYMAXDEPTH YYSTACKSIZE #else #ifdef YYMAXDEPTH #define YYSTACKSIZE YYMAXDEPTH #else #define YYSTACKSIZE 10000 #define YYMAXDEPTH 10000 #endif #endif #define YYINITSTACKSIZE 200 int yydebug; int yynerrs; int yyerrflag; int yychar; short *yyssp; YYSTYPE *yyvsp; YYSTYPE yyval; YYSTYPE yylval; short *yyss; short *yysslim; YYSTYPE *yyvs; int yystacksize; #line 1182 "../lib/config_parse.y" #define INTERACTIVE 0 extern FILE *yyin; int socks_parseinit; int readconfig(filename) const char *filename; { const char *function = "readconfig()"; /* yydebug = 1; */ yylineno = 1; socks_parseinit = 0; if ((yyin = fopen(filename, "r")) == NULL) { swarn("%s: %s", function, filename); return -1; } errno = 0; /* don't report old errors in yyparse(). */ yyparse(); fclose(yyin); #if SOCKS_SERVER fixconfig(); #endif /* SOCKS_SERVER */ errno = 0; return 0; } void #ifdef STDC_HEADERS yyerror(const char *fmt, ...) #else yyerror(fmt, va_alist) const char *fmt; va_dcl #endif /* STDC_HEADERS */ { va_list ap; char buf[2048]; size_t bufused; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, fmt); #else va_start(ap); #endif /* STDC_HEADERS */ bufused = snprintfn(buf, sizeof(buf), "%s: error on line %d, near '%.10s': ", sockscf.option.configfile, yylineno, (yytext == NULL || *yytext == NUL) ? "'start of line'" : yytext); vsnprintf(&buf[bufused], sizeof(buf) - bufused, fmt, ap); /* LINTED expression has null effect */ va_end(ap); if (errno) serr(EXIT_FAILURE, buf); serrx(EXIT_FAILURE, buf); } void #ifdef STDC_HEADERS yywarn(const char *fmt, ...) #else yywarn(fmt, va_alist) const char *fmt; va_dcl #endif /* STDC_HEADERS */ { va_list ap; char buf[2048]; size_t bufused; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, fmt); #else va_start(ap); #endif /* STDC_HEADERS */ bufused = snprintfn(buf, sizeof(buf), "%s: warning on line %d, near '%.10s': ", sockscf.option.configfile, yylineno, (yytext == NULL || *yytext == NUL) ? "'start of line'" : yytext); vsnprintf(&buf[bufused], sizeof(buf) - bufused, fmt, ap); /* LINTED expression has null effect */ va_end(ap); if (errno) swarn(buf); swarnx(buf); } static void addressinit(address) struct ruleaddress_t *address; { ruleaddress = address; atype = &ruleaddress->atype; ipaddr = &ruleaddress->addr.ipv4.ip; netmask = &ruleaddress->addr.ipv4.mask; domain = ruleaddress->addr.domain; ifname = ruleaddress->addr.ifname; port_tcp = &ruleaddress->port.tcp; port_udp = &ruleaddress->port.udp; operator = &ruleaddress->operator; } #if SOCKS_SERVER static void ruleinit(rule) struct rule_t *rule; { rule->linenumber = yylineno; command = &rule->state.command; methodv = rule->state.methodv; methodc = &rule->state.methodc; protocol = &rule->state.protocol; proxyprotocol = &rule->state.proxyprotocol; bzero(&src, sizeof(src)); bzero(&dst, sizeof(dst)); *rule = ruleinitmem; src.atype = SOCKS_ADDR_IPV4; src.addr.ipv4.ip.s_addr = htonl(INADDR_ANY); src.port.tcp = src.port.udp = src.portend = htons(0); dst = rdr_from = rdr_to = src; } static void fixconfig(void) { const char *function = "fixsettings()"; int i; uid_t euid; /* * Check arguments and settings, do they make sense? */ if (sockscf.clientmethodc == 0) sockscf.clientmethodv[sockscf.clientmethodc++] = AUTHMETHOD_NONE; #if !HAVE_DUMPCONF if (!sockscf.uid.privileged_isset) sockscf.uid.privileged = sockscf.state.euid; else { socks_seteuid(&euid, sockscf.uid.privileged); socks_reseteuid(sockscf.uid.privileged, euid); } if (!sockscf.uid.unprivileged_isset) sockscf.uid.unprivileged = sockscf.state.euid; else { socks_seteuid(&euid, sockscf.uid.unprivileged); socks_reseteuid(sockscf.uid.unprivileged, euid); } #if HAVE_LIBWRAP if (!sockscf.uid.libwrap_isset) sockscf.uid.libwrap = sockscf.state.euid; else { socks_seteuid(&euid, sockscf.uid.libwrap); socks_reseteuid(sockscf.uid.libwrap, euid); } #endif /* HAVE_LIBWRAP */ #endif /* !HAVE_DUMPCONF */ if (sockscf.internalc == 0) serrx(EXIT_FAILURE, "%s: no internal address given", function); /* values will be used once and checked there. */ if (sockscf.external.addrc == 0) serrx(EXIT_FAILURE, "%s: no external address given", function); #if !HAVE_DUMPCONF for (i = 0; i < sockscf.external.addrc; ++i) if (!addressisbindable(&sockscf.external.addrv[i])) serrx(EXIT_FAILURE, NULL); #endif /* !HAVE_DUMPCONF */ #if !HAVE_DUMPCONF if (sockscf.methodc == 0) swarnx("%s: no methods enabled (total block)", function); if (sockscf.uid.unprivileged == 0) swarnx("%s: setting the unprivileged uid to %d is not recommended", function, sockscf.uid.unprivileged); #if HAVE_LIBWRAP if (sockscf.uid.libwrap == 0) swarnx("%s: setting the libwrap uid to %d is not recommended", function, sockscf.uid.libwrap); #endif /* HAVE_LIBWRAP */ #endif /* !HAVE_DUMPCONF */ } #endif /* SOCKS_SERVER */ #line 1032 "config_parse.c" /* allocate initial stack or double stack size, up to YYMAXDEPTH */ #if defined(__cplusplus) || defined(__STDC__) static int yygrowstack(void) #else static int yygrowstack() #endif { int newsize, i; short *newss; YYSTYPE *newvs; if ((newsize = yystacksize) == 0) newsize = YYINITSTACKSIZE; else if (newsize >= YYMAXDEPTH) return -1; else if ((newsize *= 2) > YYMAXDEPTH) newsize = YYMAXDEPTH; i = yyssp - yyss; newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) : (short *)malloc(newsize * sizeof *newss); if (newss == NULL) goto bail; yyss = newss; yyssp = newss + i; newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) : (YYSTYPE *)malloc(newsize * sizeof *newvs); if (newvs == NULL) goto bail; yyvs = newvs; yyvsp = newvs + i; yystacksize = newsize; yysslim = yyss + newsize - 1; return 0; bail: if (yyss) free(yyss); if (yyvs) free(yyvs); yyss = yyssp = NULL; yyvs = yyvsp = NULL; yystacksize = 0; return -1; } #define YYABORT goto yyabort #define YYREJECT goto yyabort #define YYACCEPT goto yyaccept #define YYERROR goto yyerrlab int #if defined(__cplusplus) || defined(__STDC__) yyparse(void) #else yyparse() #endif { int yym, yyn, yystate; #if YYDEBUG #if defined(__cplusplus) || defined(__STDC__) const char *yys; #else /* !(defined(__cplusplus) || defined(__STDC__)) */ char *yys; #endif /* !(defined(__cplusplus) || defined(__STDC__)) */ if ((yys = getenv("YYDEBUG"))) { yyn = *yys; if (yyn >= '0' && yyn <= '9') yydebug = yyn - '0'; } #endif /* YYDEBUG */ yynerrs = 0; yyerrflag = 0; yychar = (-1); if (yyss == NULL && yygrowstack()) goto yyoverflow; yyssp = yyss; yyvsp = yyvs; *yyssp = yystate = 0; yyloop: if ((yyn = yydefred[yystate]) != 0) goto yyreduce; if (yychar < 0) { if ((yychar = yylex()) < 0) yychar = 0; #if YYDEBUG if (yydebug) { yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, yystate, yychar, yys); } #endif } if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yychar) { #if YYDEBUG if (yydebug) printf("%sdebug: state %d, shifting to state %d\n", YYPREFIX, yystate, yytable[yyn]); #endif if (yyssp >= yysslim && yygrowstack()) { goto yyoverflow; } *++yyssp = yystate = yytable[yyn]; *++yyvsp = yylval; yychar = (-1); if (yyerrflag > 0) --yyerrflag; goto yyloop; } if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yychar) { yyn = yytable[yyn]; goto yyreduce; } if (yyerrflag) goto yyinrecovery; #if defined(lint) || defined(__GNUC__) goto yynewerror; #endif yynewerror: yyerror("syntax error"); #if defined(lint) || defined(__GNUC__) goto yyerrlab; #endif yyerrlab: ++yynerrs; yyinrecovery: if (yyerrflag < 3) { yyerrflag = 3; for (;;) { if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) { #if YYDEBUG if (yydebug) printf("%sdebug: state %d, error recovery shifting\ to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); #endif if (yyssp >= yysslim && yygrowstack()) { goto yyoverflow; } *++yyssp = yystate = yytable[yyn]; *++yyvsp = yylval; goto yyloop; } else { #if YYDEBUG if (yydebug) printf("%sdebug: error recovery discarding state %d\n", YYPREFIX, *yyssp); #endif if (yyssp <= yyss) goto yyabort; --yyssp; --yyvsp; } } } else { if (yychar == 0) goto yyabort; #if YYDEBUG if (yydebug) { yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; printf("%sdebug: state %d, error recovery discards token %d (%s)\n", YYPREFIX, yystate, yychar, yys); } #endif yychar = (-1); goto yyloop; } yyreduce: #if YYDEBUG if (yydebug) printf("%sdebug: state %d, reducing by rule %d (%s)\n", YYPREFIX, yystate, yyn, yyrule[yyn]); #endif yym = yylen[yyn]; yyval = yyvsp[1-yym]; switch (yyn) { case 3: #line 275 "../lib/config_parse.y" { #if SOCKS_SERVER protocol = &protocolmem; extension = &sockscf.extension; #endif } break; case 4: #line 284 "../lib/config_parse.y" { yyval.string = NULL; } break; case 10: #line 292 "../lib/config_parse.y" { yyval.string = NULL; } break; case 14: #line 299 "../lib/config_parse.y" { } break; case 33: #line 328 "../lib/config_parse.y" { yywarn("given keyword is deprecated"); } break; case 34: #line 332 "../lib/config_parse.y" { route.src = src; route.dst = dst; ruleaddress2sockshost(&gw, &route.gw.host, SOCKS_TCP); route.gw.state = state; addroute(&route); } break; case 35: #line 342 "../lib/config_parse.y" { command = &state.command; extension = &state.extension; methodv = state.methodv; methodc = &state.methodc; protocol = &state.protocol; proxyprotocol = &state.proxyprotocol; bzero(&state, sizeof(state)); bzero(&route, sizeof(route)); bzero(&gw, sizeof(gw)); bzero(&src, sizeof(src)); bzero(&dst, sizeof(dst)); src.atype = SOCKS_ADDR_IPV4; dst.atype = SOCKS_ADDR_IPV4; } break; case 37: #line 364 "../lib/config_parse.y" { proxyprotocol->socks_v4 = 1; } break; case 38: #line 367 "../lib/config_parse.y" { proxyprotocol->socks_v5 = 1; } break; case 39: #line 370 "../lib/config_parse.y" { proxyprotocol->msproxy_v2 = 1; } break; case 40: #line 373 "../lib/config_parse.y" { proxyprotocol->http_v1_0 = 1; } break; case 45: #line 386 "../lib/config_parse.y" { #if SOCKS_SERVER #if !HAVE_LIBWRAP if (strcmp(yyvsp[0].string, method2string(AUTHMETHOD_RFC931)) == 0) yyerror("method %s requires libwrap", AUTHMETHOD_RFC931s); #endif /* !HAVE_LIBWRAP */ if (adduser(&rule.user, yyvsp[0].string) == NULL) yyerror(NOMEM); #endif /* SOCKS_SERVER */ } break; case 49: #line 405 "../lib/config_parse.y" { extension->bind = 1; } break; case 52: #line 415 "../lib/config_parse.y" { #if SOCKS_SERVER addinternal(ruleaddress); #endif } break; case 53: #line 422 "../lib/config_parse.y" { #if SOCKS_SERVER static struct ruleaddress_t mem; struct servent *service; addressinit(&mem); /* set default port. */ if ((service = getservbyname("socks", "tcp")) == NULL) *port_tcp = htons(SOCKD_PORT); else *port_tcp = (in_port_t)service->s_port; #endif } break; case 54: #line 438 "../lib/config_parse.y" { #if SOCKS_SERVER addexternal(ruleaddress); #endif } break; case 55: #line 445 "../lib/config_parse.y" { #if SOCKS_SERVER static struct ruleaddress_t mem; addressinit(&mem); #endif } break; case 56: #line 454 "../lib/config_parse.y" { #if SOCKS_SERVER sockscf.external.rotation = ROTATION_NONE; } break; case 57: #line 458 "../lib/config_parse.y" { #if !HAVE_ROUTE_SOURCE yyerror("don't have code to discover route/address source on platform"); #else /* !HAVE_ROUTE_SOURCE */ sockscf.external.rotation = ROTATION_ROUTE; #endif /* HAVE_ROUTE_SOURCE */ #endif /* SOCKS_SERVER */ } break; case 62: #line 476 "../lib/config_parse.y" { const char *syslogname = "syslog"; if (strncmp(yyvsp[0].string, syslogname, strlen(syslogname)) == 0 && (yyvsp[0].string[strlen(syslogname)] == NUL || yyvsp[0].string[strlen(syslogname)] == '/')) { char *sl; sockscf.log.type |= LOGTYPE_SYSLOG; if (*(sl = &(yyvsp[0].string[strlen(syslogname)])) == '/') { /* facility. */ size_t i; for (i = 0, ++sl; i < ELEMENTS(syslogfacilityv); ++i) if (strcmp(sl, syslogfacilityv[i].name) == 0) break; if (i == ELEMENTS(syslogfacilityv)) yyerror("unknown syslog facility \"%s\"", sl); sockscf.log.facility = syslogfacilityv[i].value; sockscf.log.facilityname = syslogfacilityv[i].name; } else { sockscf.log.facility = LOG_DAEMON; /* default. */ sockscf.log.facilityname = "daemon"; } } else /* adding/changing filename. */ if (!sockscf.state.init) { int flag; sockscf.log.type |= LOGTYPE_FILE; if ((sockscf.log.fpv = (FILE **)realloc(sockscf.log.fpv, sizeof(*sockscf.log.fpv) * (sockscf.log.fpc + 1))) == NULL || (sockscf.log.fplockv = (int *)realloc(sockscf.log.fplockv, sizeof(*sockscf.log.fplockv) * (sockscf.log.fpc + 1))) == NULL || (sockscf.log.fnamev = (char **)realloc(sockscf.log.fnamev, sizeof(*sockscf.log.fnamev) * (sockscf.log.fpc + 1))) == NULL) serrx(EXIT_FAILURE, NOMEM); if ((sockscf.log.fplockv[sockscf.log.fpc] = socks_mklock(SOCKS_LOCKFILE)) == -1) serr(EXIT_FAILURE, "socks_mklock()"); if (strcmp(yyvsp[0].string, "stdout") == 0) sockscf.log.fpv[sockscf.log.fpc] = stdout; else if (strcmp(yyvsp[0].string, "stderr") == 0) sockscf.log.fpv[sockscf.log.fpc] = stderr; else if ((sockscf.log.fpv[sockscf.log.fpc] = fopen(yyvsp[0].string, "a")) == NULL) yyerror("fopen(%s)", yyvsp[0].string); if ((flag = fcntl(fileno(sockscf.log.fpv[sockscf.log.fpc]), F_GETFD, 0)) == -1 || fcntl(fileno(sockscf.log.fpv[sockscf.log.fpc]), F_SETFD, flag | FD_CLOEXEC) == -1) serr(EXIT_FAILURE, "fcntl(F_GETFD/F_SETFD)"); if ((sockscf.log.fnamev[sockscf.log.fpc] = strdup(yyvsp[0].string)) == NULL) serr(EXIT_FAILURE, NOMEM); ++sockscf.log.fpc; } else { /* * Can't change filenames we log to after startup (well, * to be exact, we can't add new filenames, but we complain * about changing too for now since it's easier. */ size_t i; for (i = 0; i < sockscf.log.fpc; ++i) if (strcmp(sockscf.log.fnamev[i], yyvsp[0].string) == 0) { /* same name. */ FILE *fp; if (strcmp(sockscf.log.fnamev[i], "stdout") == 0 || strcmp(sockscf.log.fnamev[i], "stderr") == 0) continue; /* don't need to close these, hard to reopen. */ /* reopen logfiles. */ if ((fp = fopen(sockscf.log.fnamev[i], "a")) == NULL) yyerror("fopen(%s)", yyvsp[0].string); fclose(sockscf.log.fpv[i]); sockscf.log.fpv[i] = fp; break; } if (i == sockscf.log.fpc) /* no match found. */ yywarn("can't change logoutput after startup"); } } break; case 65: #line 578 "../lib/config_parse.y" { #if SOCKS_SERVER yyerror("Sorry, child.maxidle is disabled due to a suspected bug"); if (atoi(yyvsp[0].string) != 0 && atoi(yyvsp[0].string) < SOCKD_FREESLOTS) yyerror("%s (%s) can't be less than SOCKD_FREESLOTS (%d)", yyvsp[-2].string, yyvsp[0].string, SOCKD_FREESLOTS); sockscf.child.maxidle = atoi(yyvsp[0].string); #endif } break; case 69: #line 595 "../lib/config_parse.y" { #if SOCKS_SERVER sockscf.uid.privileged = yyvsp[0].uid; sockscf.uid.privileged_isset = 1; #endif } break; case 70: #line 603 "../lib/config_parse.y" { #if SOCKS_SERVER sockscf.uid.unprivileged = yyvsp[0].uid; sockscf.uid.unprivileged_isset = 1; #endif } break; case 71: #line 611 "../lib/config_parse.y" { #if HAVE_LIBWRAP && SOCKS_SERVER sockscf.uid.libwrap = yyvsp[0].uid; sockscf.uid.libwrap_isset = 1; #else /* HAVE_LIBWRAP */ yyerror("libwrapsupport not compiled in"); #endif /* !HAVE_LIBWRAP */ } break; case 72: #line 622 "../lib/config_parse.y" { struct passwd *pw; if ((pw = getpwnam(yyvsp[0].string)) == NULL) serrx(EXIT_FAILURE, "no such user \"%s\"", yyvsp[0].string); else yyval.uid = pw->pw_uid; } break; case 73: #line 632 "../lib/config_parse.y" { #if SOCKS_SERVER sockscf.timeout.io = (time_t)atol(yyvsp[0].string); #endif } break; case 74: #line 639 "../lib/config_parse.y" { #if SOCKS_SERVER sockscf.timeout.negotiate = (time_t)atol(yyvsp[0].string); #endif } break; case 75: #line 646 "../lib/config_parse.y" { sockscf.option.debug = atoi(yyvsp[0].string); } break; case 77: #line 654 "../lib/config_parse.y" { #if SOCKS_SERVER sockscf.compat.reuseaddr = 1; } break; case 78: #line 658 "../lib/config_parse.y" { sockscf.compat.sameport = 1; #endif } break; case 82: #line 671 "../lib/config_parse.y" { sockscf.resolveprotocol = RESOLVEPROTOCOL_FAKE; } break; case 83: #line 674 "../lib/config_parse.y" { #if HAVE_NO_RESOLVESTUFF yyerror("resolveprotocol keyword not supported on this installation"); #else /* HAVE_NO_RESOLVESTUFF */ sockscf.resolveprotocol = RESOLVEPROTOCOL_TCP; #endif /* !HAVE_NO_RESOLVESTUFF */ } break; case 84: #line 681 "../lib/config_parse.y" { sockscf.resolveprotocol = RESOLVEPROTOCOL_UDP; } break; case 86: #line 689 "../lib/config_parse.y" { #if HAVE_LIBWRAP && SOCKS_SERVER sockscf.srchost.nomismatch = 1; } break; case 87: #line 693 "../lib/config_parse.y" { sockscf.srchost.nounknown = 1; #else yyerror("srchostoption requires libwrap"); #endif } break; case 91: #line 709 "../lib/config_parse.y" { #if SOCKS_SERVER methodv = sockscf.methodv; methodc = &sockscf.methodc; *methodc = 0; /* reset. */ #endif } break; case 93: #line 718 "../lib/config_parse.y" { #if SOCKS_SERVER methodv = sockscf.clientmethodv; methodc = &sockscf.clientmethodc; *methodc = 0; /* reset. */ #endif } break; case 95: #line 727 "../lib/config_parse.y" { ADDMETHOD(AUTHMETHOD_NONE); } break; case 96: #line 730 "../lib/config_parse.y" { yyerror("%s not supported", AUTHMETHOD_GSSAPIs); } break; case 97: #line 733 "../lib/config_parse.y" { ADDMETHOD(AUTHMETHOD_UNAME); } break; case 98: #line 736 "../lib/config_parse.y" { #if HAVE_LIBWRAP && SOCKS_SERVER ADDMETHOD(AUTHMETHOD_RFC931); #else /* !HAVE_LIBWRAP */ yyerror("method %s requires libwraplibrary", AUTHMETHOD_RFC931s); #endif /* !HAVE_LIBWRAP */ } break; case 99: #line 743 "../lib/config_parse.y" { #if !HAVE_PAM yyerror("method %s requires pamlibrary", AUTHMETHOD_PAMs); #else /* HAVE_PAM */ ADDMETHOD(AUTHMETHOD_PAM); #endif /* !HAVE_PAM */ } break; case 102: #line 759 "../lib/config_parse.y" { #if SOCKS_SERVER rule.src = src; rule.dst = dst; rule.rdr_from = rdr_from; rule.rdr_to = rdr_to; addclientrule(&rule); #endif } break; case 104: #line 775 "../lib/config_parse.y" { yyval.string = NULL; } break; case 106: #line 779 "../lib/config_parse.y" { #if SOCKS_SERVER rule.src = src; rule.dst = dst; rule.rdr_from = rdr_from; rule.rdr_to = rdr_to; addsocksrule(&rule); #endif } break; case 108: #line 793 "../lib/config_parse.y" { #if SOCKS_SERVER checkmodule("bandwidth"); #endif } break; case 112: #line 801 "../lib/config_parse.y" { #if SOCKS_SERVER checkmodule("redirect"); #endif } break; case 113: #line 808 "../lib/config_parse.y" { yyval.string = NULL; } break; case 120: #line 817 "../lib/config_parse.y" { #if SOCKS_SERVER checkmodule("session"); #endif } break; case 121: #line 824 "../lib/config_parse.y" { #if SOCKS_SERVER ruleinit(&rule); rule.verdict = VERDICT_BLOCK; } break; case 122: #line 829 "../lib/config_parse.y" { ruleinit(&rule); rule.verdict = VERDICT_PASS; #endif } break; case 124: #line 840 "../lib/config_parse.y" { command->bind = 1; } break; case 125: #line 843 "../lib/config_parse.y" { command->connect = 1; } break; case 126: #line 846 "../lib/config_parse.y" { command->udpassociate = 1; } break; case 127: #line 852 "../lib/config_parse.y" { command->bindreply = 1; } break; case 128: #line 856 "../lib/config_parse.y" { command->udpreply = 1; } break; case 132: #line 868 "../lib/config_parse.y" { protocol->tcp = 1; } break; case 133: #line 871 "../lib/config_parse.y" { protocol->udp = 1; } break; case 140: #line 891 "../lib/config_parse.y" { #if SOCKS_SERVER static session_t ssinit; /* * temporarily allocate ordinary memory, later on point it to * the correct shared mem. */ if ((rule.ss = malloc(sizeof(*rule.ss))) == NULL) serr(EXIT_FAILURE, NOMEM); *rule.ss = ssinit; if ((rule.ss->maxsessions = atoi(yyvsp[0].string)) < 0) yyerror("session value can not be less than 0"); #endif /* SOCKS_SERVER */ } break; case 141: #line 908 "../lib/config_parse.y" { #if SOCKS_SERVER static bw_t bwmeminit; /* * temporarily allocate ordinary memory, later on point it to * the correct index in sockscf.bwv. */ if ((rule.bw = (bw_t *)malloc(sizeof(*rule.bw))) == NULL) serr(EXIT_FAILURE, NOMEM); *rule.bw = bwmeminit; if ((rule.bw->maxbps = atoi(yyvsp[0].string)) <= 0) yyerror("bandwidth value must be greater than 0"); #endif /* SOCKS_SERVER */ } break; case 143: #line 929 "../lib/config_parse.y" { #if SOCKS_SERVER rule.log.connect = 1; } break; case 144: #line 933 "../lib/config_parse.y" { rule.log.data = 1; } break; case 145: #line 936 "../lib/config_parse.y" { rule.log.disconnect = 1; } break; case 146: #line 939 "../lib/config_parse.y" { rule.log.error = 1; } break; case 147: #line 942 "../lib/config_parse.y" { rule.log.iooperation = 1; #endif } break; case 150: #line 953 "../lib/config_parse.y" { #if HAVE_PAM && SOCKS_SERVER if (strlen(yyvsp[0].string) >= sizeof(rule.pamservicename)) yyerror("servicename too long"); strcpy(rule.pamservicename, yyvsp[0].string); #else /* !HAVE_PAM */ yyerror("pamsupport not compiled in"); #endif /* HAVE_PAM */ } break; case 151: #line 964 "../lib/config_parse.y" { #if HAVE_LIBWRAP && SOCKS_SERVER struct request_info request; char libwrap[LIBWRAPBUF]; if (strlen(yyvsp[0].string) >= sizeof(rule.libwrap)) yyerror("libwrapline too long, make LIBWRAPBUF bigger"); strcpy(rule.libwrap, yyvsp[0].string); /* libwrap modifies the passed buffer. */ SASSERTX(strlen(rule.libwrap) < sizeof(libwrap)); strcpy(libwrap, rule.libwrap); ++dry_run; request_init(&request, RQ_FILE, -1, RQ_DAEMON, __progname, 0); if (setjmp(tcpd_buf) != 0) yyerror("bad libwrap line"); process_options(libwrap, &request); --dry_run; #else /* !HAVE_LIBWRAP */ yyerror("libwrapsupport not compiled in"); #endif } break; case 162: #line 1014 "../lib/config_parse.y" { yyval.string = NULL; } break; case 164: #line 1018 "../lib/config_parse.y" { addressinit(&src); } break; case 165: #line 1023 "../lib/config_parse.y" { addressinit(&dst); } break; case 166: #line 1028 "../lib/config_parse.y" { addressinit(&rdr_from); } break; case 167: #line 1033 "../lib/config_parse.y" { addressinit(&rdr_to); } break; case 168: #line 1040 "../lib/config_parse.y" { addressinit(&gw); } break; case 181: #line 1068 "../lib/config_parse.y" { *atype = SOCKS_ADDR_IPV4; if (inet_aton(yyvsp[0].string, ipaddr) != 1) yyerror("bad address: %s", yyvsp[0].string); } break; case 182: #line 1077 "../lib/config_parse.y" { if (atoi(yyvsp[0].string) < 0 || atoi(yyvsp[0].string) > 32) yyerror("bad netmask: %s", yyvsp[0].string); netmask->s_addr = atoi(yyvsp[0].string) == 0 ? 0 : htonl(0xffffffff << (32 - atoi(yyvsp[0].string))); } break; case 183: #line 1084 "../lib/config_parse.y" { if (!inet_aton(yyvsp[0].string, netmask)) yyerror("bad netmask: %s", yyvsp[0].string); } break; case 184: #line 1090 "../lib/config_parse.y" { *atype = SOCKS_ADDR_DOMAIN; if (strlen(yyvsp[0].string) >= MAXHOSTNAMELEN) yyerror("domainname too long"); strcpy(domain, yyvsp[0].string); } break; case 185: #line 1099 "../lib/config_parse.y" { *atype = SOCKS_ADDR_IFNAME; if (strlen(yyvsp[0].string) >= MAXIFNAMELEN) yyerror("interfacename too long"); strcpy(ifname, yyvsp[0].string); } break; case 186: #line 1109 "../lib/config_parse.y" { *atype = SOCKS_ADDR_DOMAIN; if (strlen(yyvsp[0].string) >= MAXHOSTNAMELEN) yyerror("domainname too long"); strcpy(domain, yyvsp[0].string); route.state.direct = 1; } break; case 187: #line 1120 "../lib/config_parse.y" { yyval.string = NULL; } break; case 193: #line 1133 "../lib/config_parse.y" { *port_tcp = htons((in_port_t)atoi(yyvsp[0].string)); *port_udp = htons((in_port_t)atoi(yyvsp[0].string)); } break; case 194: #line 1139 "../lib/config_parse.y" { ruleaddress->portend = htons((in_port_t)atoi(yyvsp[0].string)); ruleaddress->operator = range; } break; case 195: #line 1145 "../lib/config_parse.y" { struct servent *service; if ((service = getservbyname(yyvsp[0].string, "tcp")) == NULL) { if (protocol->tcp) yyerror("unknown tcp protocol: %s", yyvsp[0].string); *port_tcp = htons(0); } else *port_tcp = (in_port_t)service->s_port; if ((service = getservbyname(yyvsp[0].string, "udp")) == NULL) { if (protocol->udp) yyerror("unknown udp protocol: %s", yyvsp[0].string); *port_udp = htons(0); } else *port_udp = (in_port_t)service->s_port; if (*port_tcp == htons(0) && *port_udp == htons(0)) yyerror("unknown tcp/udp protocol"); /* if one protocol is unset, set to same as the other. */ if (*port_tcp == htons(0)) *port_tcp = *port_udp; else if (*port_udp == htons(0)) *port_udp = *port_tcp; } break; case 196: #line 1176 "../lib/config_parse.y" { *operator = string2operator(yyvsp[0].string); } break; #line 2040 "config_parse.c" } yyssp -= yym; yystate = *yyssp; yyvsp -= yym; yym = yylhs[yyn]; if (yystate == 0 && yym == 0) { #if YYDEBUG if (yydebug) printf("%sdebug: after reduction, shifting from state 0 to\ state %d\n", YYPREFIX, YYFINAL); #endif yystate = YYFINAL; *++yyssp = YYFINAL; *++yyvsp = yyval; if (yychar < 0) { if ((yychar = yylex()) < 0) yychar = 0; #if YYDEBUG if (yydebug) { yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, YYFINAL, yychar, yys); } #endif } if (yychar == 0) goto yyaccept; goto yyloop; } if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yystate) yystate = yytable[yyn]; else yystate = yydgoto[yym]; #if YYDEBUG if (yydebug) printf("%sdebug: after reduction, shifting from state %d \ to state %d\n", YYPREFIX, *yyssp, yystate); #endif if (yyssp >= yysslim && yygrowstack()) { goto yyoverflow; } *++yyssp = yystate; *++yyvsp = yyval; goto yyloop; yyoverflow: yyerror("yacc stack overflow"); yyabort: if (yyss) free(yyss); if (yyvs) free(yyvs); yyss = yyssp = NULL; yyvs = yyvsp = NULL; yystacksize = 0; return (1); yyaccept: if (yyss) free(yyss); if (yyvs) free(yyvs); yyss = yyssp = NULL; yyvs = yyvsp = NULL; yystacksize = 0; return (0); } dante-1.1.19.dfsg/dlib/config_parse.h0000644000175000017500000000366410333442601016025 0ustar roamroam#define SERVERCONFIG 257 #define CLIENTCONFIG 258 #define DEPRECATED 259 #define CLIENTRULE 260 #define INTERNAL 261 #define EXTERNAL 262 #define EXTERNAL_ROTATION 263 #define DEBUGING 264 #define RESOLVEPROTOCOL 265 #define SRCHOST 266 #define NOMISMATCH 267 #define NOUNKNOWN 268 #define EXTENSION 269 #define BIND 270 #define PRIVILEGED 271 #define IOTIMEOUT 272 #define CONNECTTIMEOUT 273 #define METHOD 274 #define CLIENTMETHOD 275 #define NONE 276 #define GSSAPI 277 #define UNAME 278 #define RFC931 279 #define PAM 280 #define COMPATIBILITY 281 #define REUSEADDR 282 #define SAMEPORT 283 #define USERNAME 284 #define USER_PRIVILEGED 285 #define USER_UNPRIVILEGED 286 #define USER_LIBWRAP 287 #define LOGOUTPUT 288 #define LOGFILE 289 #define CHILD_MAXIDLE 290 #define ROUTE 291 #define VIA 292 #define VERDICT_BLOCK 293 #define VERDICT_PASS 294 #define PAMSERVICENAME 295 #define PROTOCOL 296 #define PROTOCOL_TCP 297 #define PROTOCOL_UDP 298 #define PROTOCOL_FAKE 299 #define PROXYPROTOCOL 300 #define PROXYPROTOCOL_SOCKS_V4 301 #define PROXYPROTOCOL_SOCKS_V5 302 #define PROXYPROTOCOL_MSPROXY_V2 303 #define PROXYPROTOCOL_HTTP_V1_0 304 #define USER 305 #define COMMAND 306 #define COMMAND_BIND 307 #define COMMAND_CONNECT 308 #define COMMAND_UDPASSOCIATE 309 #define COMMAND_BINDREPLY 310 #define COMMAND_UDPREPLY 311 #define ACTION 312 #define LINE 313 #define LIBWRAPSTART 314 #define OPERATOR 315 #define LOG 316 #define LOG_CONNECT 317 #define LOG_DATA 318 #define LOG_DISCONNECT 319 #define LOG_ERROR 320 #define LOG_IOOPERATION 321 #define IPADDRESS 322 #define DOMAINNAME 323 #define DIRECT 324 #define IFNAME 325 #define PORT 326 #define PORTNUMBER 327 #define SERVICENAME 328 #define NUMBER 329 #define FROM 330 #define TO 331 #define REDIRECT 332 #define BANDWIDTH 333 #define MAXSESSIONS 334 #ifndef YYSTYPE_DEFINED #define YYSTYPE_DEFINED typedef union { char *string; uid_t uid; } YYSTYPE; #endif /* YYSTYPE_DEFINED */ extern YYSTYPE socks_yylval; dante-1.1.19.dfsg/dlib/interposition.c0000644000175000017500000005453310175146323016276 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadallllléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" #if SOCKSLIBRARY_DYNAMIC static const char rcsid[] = "$Id: interposition.c,v 1.79 2005/01/24 10:24:19 karls Exp $"; #undef accept #undef bind #undef bindresvport #undef connect #undef gethostbyaddr #undef gethostbyname #undef gethostbyname2 #undef getaddrinfo #undef getipnodebyname #undef freehostent #undef getpeername #undef getsockname #undef read #undef readv #undef recv #undef recvfrom #undef recvmsg #undef rresvport #undef send #undef sendmsg #undef sendto #undef write #undef writev #if NEED_DYNA_RTLD #define DL_LAZY RTLD_LAZY #endif /* NEED_DYNA_RTLD */ static struct libsymbol_t libsymbolv[] = { #if SOCKS_CLIENT { SYMBOL_ACCEPT, LIBRARY_ACCEPT, NULL, NULL }, { SYMBOL_BIND, LIBRARY_BIND, NULL, NULL }, { SYMBOL_BINDRESVPORT, LIBRARY_BINDRESVPORT, NULL, NULL }, { SYMBOL_CONNECT, LIBRARY_CONNECT, NULL, NULL }, { SYMBOL_GETPEERNAME, LIBRARY_GETPEERNAME, NULL, NULL }, { SYMBOL_GETSOCKNAME, LIBRARY_GETSOCKNAME, NULL, NULL }, { SYMBOL_READ, LIBRARY_READ, NULL, NULL }, { SYMBOL_READV, LIBRARY_READV, NULL, NULL }, { SYMBOL_RECV, LIBRARY_RECV, NULL, NULL }, { SYMBOL_RECVMSG, LIBRARY_RECVMSG, NULL, NULL }, { SYMBOL_RECVFROM, LIBRARY_RECVFROM, NULL, NULL }, { SYMBOL_RRESVPORT, LIBRARY_RRESVPORT, NULL, NULL }, { SYMBOL_SEND, LIBRARY_SEND, NULL, NULL }, { SYMBOL_SENDMSG, LIBRARY_SENDMSG, NULL, NULL }, { SYMBOL_SENDTO, LIBRARY_SENDTO, NULL, NULL }, { SYMBOL_WRITE, LIBRARY_WRITE, NULL, NULL }, { SYMBOL_WRITEV, LIBRARY_WRITEV, NULL, NULL }, #if HAVE_GETHOSTBYNAME2 { SYMBOL_GETHOSTBYNAME2, LIBRARY_GETHOSTBYNAME2, NULL, NULL }, #endif /* HAVE_GETHOSTBYNAME2 */ #if HAVE_GETADDRINFO { SYMBOL_GETADDRINFO, LIBRARY_GETADDRINFO, NULL, NULL }, #endif /* HAVE_GETADDRINFO */ #if HAVE_GETIPNODEBYNAME { SYMBOL_GETIPNODEBYNAME, LIBRARY_GETIPNODEBYNAME, NULL, NULL }, { SYMBOL_FREEHOSTENT, LIBRARY_FREEHOSTENT, NULL, NULL }, #endif /* HAVE_GETIPNODEBYNAME */ #endif /* SOCKS_CLIENT */ { SYMBOL_GETHOSTBYNAME, LIBRARY_GETHOSTBYNAME, NULL, NULL }, #if SOCKS_SERVER { SYMBOL_GETHOSTBYADDR, LIBRARY_GETHOSTBYADDR, NULL, NULL }, #endif #if SOCKS_CLIENT #if HAVE_EXTRA_OSF_SYMBOLS { SYMBOL_EACCEPT, LIBRARY_EACCEPT, NULL, NULL }, { SYMBOL_EGETPEERNAME, LIBRARY_EGETPEERNAME, NULL, NULL }, { SYMBOL_EGETSOCKNAME, LIBRARY_EGETSOCKNAME, NULL, NULL }, { SYMBOL_EREADV, LIBRARY_EREADV, NULL, NULL }, { SYMBOL_ERECVFROM, LIBRARY_ERECVFROM, NULL, NULL }, { SYMBOL_ERECVMSG, LIBRARY_ERECVMSG, NULL, NULL }, { SYMBOL_ESENDMSG, LIBRARY_ESENDMSG, NULL, NULL }, { SYMBOL_EWRITEV, LIBRARY_EWRITEV, NULL, NULL }, { SYMBOL_NACCEPT, LIBRARY_EACCEPT, NULL, NULL }, { SYMBOL_NGETPEERNAME, LIBRARY_NGETPEERNAME, NULL, NULL }, { SYMBOL_NGETSOCKNAME, LIBRARY_NGETSOCKNAME, NULL, NULL }, { SYMBOL_NRECVFROM, LIBRARY_NRECVFROM, NULL, NULL }, { SYMBOL_NRECVMSG, LIBRARY_NRECVMSG, NULL, NULL }, { SYMBOL_NSENDMSG, LIBRARY_NSENDMSG, NULL, NULL }, #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #endif /* SOCKS_CLIENT */ }; __BEGIN_DECLS static struct libsymbol_t * libsymbol __P((const char *symbol)); /* * Finds the libsymbol_t that "symbol" is defined in. */ __END_DECLS void symbolcheck(void) { size_t i; for (i = 0; i < ELEMENTS(libsymbolv); ++i) symbolfunction(libsymbolv[i].symbol); } void * symbolfunction(symbol) const char *symbol; { const char *function = "symbolfunction()"; struct libsymbol_t *lib; lib = libsymbol(symbol); SASSERTX(lib != NULL); SASSERTX(lib->library != NULL); SASSERTX(strcmp(lib->symbol, symbol) == 0); if (lib->handle == NULL) if ((lib->handle = dlopen(lib->library, DL_LAZY)) == NULL) serrx(EXIT_FAILURE, "%s: compiletime configuration error? " "Failed to open \"%s\": %s", function, lib->library, dlerror()); if (lib->function == NULL) if ((lib->function = dlsym(lib->handle, symbol)) == NULL) serrx(EXIT_FAILURE, "%s: compiletime configuration error? " "Failed to find \"%s\" in \"%s\": %s", function, symbol, lib->library, dlerror()); #if 0 if (strcmp(symbol, SYMBOL_WRITE) != 0) slog(LOG_DEBUG, "found symbol %s in library %s", lib->symbol, lib->library); #endif return lib->function; } static struct libsymbol_t * libsymbol(symbol) const char *symbol; { /* const char *function = "libsymbol()"; */ size_t i; for (i = 0; i < ELEMENTS(libsymbolv); ++i) if (strcmp(libsymbolv[i].symbol, symbol) == 0) return &libsymbolv[i]; /* CONSTCOND */ SASSERTX(0); /* should never happen. */ /* NOTREACHED */ return NULL; /* please compiler. */ } /* the real system calls. */ #if SOCKS_CLIENT #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_ACCEPT_0 sys_accept(s, addr, addrlen) HAVE_PROT_ACCEPT_1 s; HAVE_PROT_ACCEPT_2 addr; HAVE_PROT_ACCEPT_3 addrlen; { int rc; typedef HAVE_PROT_ACCEPT_0 (*ACCEPT_FUNC_T)(HAVE_PROT_ACCEPT_1, HAVE_PROT_ACCEPT_2, HAVE_PROT_ACCEPT_3); ACCEPT_FUNC_T function; SYSCALL_START(s); function = (ACCEPT_FUNC_T)symbolfunction(SYMBOL_ACCEPT); rc = function(s, addr, addrlen); SYSCALL_END(s); return rc; } #endif /* !HAVE_EXTRA_OSF_SYMBOLS */ #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_BIND_0 sys_bind(s, name, namelen) HAVE_PROT_BIND_1 s; HAVE_PROT_BIND_2 name; HAVE_PROT_BIND_3 namelen; { int rc; typedef HAVE_PROT_BIND_0 (*BIND_FUNC_T)(HAVE_PROT_BIND_1, HAVE_PROT_BIND_2, HAVE_PROT_BIND_3); BIND_FUNC_T function; SYSCALL_START(s); function = (BIND_FUNC_T)symbolfunction(SYMBOL_BIND); rc = function(s, name, namelen); SYSCALL_END(s); return rc; } #endif /* !HAVE_EXTRA_OSF_SYMBOLS */ int sys_bindresvport(sd, sin) int sd; struct sockaddr_in *sin; { int rc; typedef int (*BINDRESVPORT_FUNC_T)(int, struct sockaddr_in *); BINDRESVPORT_FUNC_T function; SYSCALL_START(sd); function = (BINDRESVPORT_FUNC_T)symbolfunction(SYMBOL_BINDRESVPORT); rc = function(sd, sin); SYSCALL_END(sd); return rc; } #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_CONNECT_0 sys_connect(s, name, namelen) HAVE_PROT_CONNECT_1 s; HAVE_PROT_CONNECT_2 name; HAVE_PROT_CONNECT_3 namelen; { int rc; typedef HAVE_PROT_CONNECT_0 (*CONNECT_FUNC_T)(HAVE_PROT_CONNECT_1, HAVE_PROT_CONNECT_2, HAVE_PROT_CONNECT_3); CONNECT_FUNC_T function; SYSCALL_START(s); function = (CONNECT_FUNC_T)symbolfunction(SYMBOL_CONNECT); rc = function(s, name, namelen); SYSCALL_END(s); return rc; } #endif /* !HAVE_EXTRA_OSF_SYMBOLS */ #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_GETPEERNAME_0 sys_getpeername(s, name, namelen) HAVE_PROT_GETPEERNAME_1 s; HAVE_PROT_GETPEERNAME_2 name; HAVE_PROT_GETPEERNAME_3 namelen; { int rc; typedef HAVE_PROT_GETPEERNAME_0 (*GETPEERNAME_FUNC_T)(HAVE_PROT_GETPEERNAME_1, HAVE_PROT_GETPEERNAME_2, HAVE_PROT_GETPEERNAME_3); GETPEERNAME_FUNC_T function; SYSCALL_START(s); function = (GETPEERNAME_FUNC_T)symbolfunction(SYMBOL_GETPEERNAME); rc = function(s, name, namelen); SYSCALL_END(s); return rc; } #endif /* ! HAVE_EXTRA_OSF_SYMBOLS */ #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_GETSOCKNAME_0 sys_getsockname(s, name, namelen) HAVE_PROT_GETSOCKNAME_1 s; HAVE_PROT_GETSOCKNAME_2 name; HAVE_PROT_GETSOCKNAME_3 namelen; { int rc; typedef HAVE_PROT_GETSOCKNAME_0 (*GETSOCKNAME_FUNC_T)(HAVE_PROT_GETSOCKNAME_1, HAVE_PROT_GETSOCKNAME_2, HAVE_PROT_GETSOCKNAME_3); GETSOCKNAME_FUNC_T function; SYSCALL_START(s); function = (GETSOCKNAME_FUNC_T)symbolfunction(SYMBOL_GETSOCKNAME); rc = function(s, name, namelen); SYSCALL_END(s); return rc; } #endif /* !HAVE_EXTRA_OSF_SYMBOLS */ HAVE_PROT_READ_0 sys_read(d, buf, nbytes) HAVE_PROT_READ_1 d; HAVE_PROT_READ_2 buf; HAVE_PROT_READ_3 nbytes; { ssize_t rc; typedef HAVE_PROT_READ_0 (*READ_FUNC_T)(HAVE_PROT_READ_1, HAVE_PROT_READ_2, HAVE_PROT_READ_3); READ_FUNC_T function; SYSCALL_START(d); function = (READ_FUNC_T)symbolfunction(SYMBOL_READ); rc = function(d, buf, nbytes); SYSCALL_END(d); return rc; } #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_READV_0 sys_readv(d, iov, iovcnt) HAVE_PROT_READV_1 d; HAVE_PROT_READV_2 iov; HAVE_PROT_READV_3 iovcnt; { ssize_t rc; typedef HAVE_PROT_READV_0 (*READV_FUNC_T)(HAVE_PROT_READV_1, HAVE_PROT_READV_2, HAVE_PROT_READV_3); READV_FUNC_T function; SYSCALL_START(d); function = (READV_FUNC_T)symbolfunction(SYMBOL_READV); rc = function(d, iov, iovcnt); SYSCALL_END(d); return rc; } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ HAVE_PROT_RECV_0 sys_recv(s, buf, len, flags) HAVE_PROT_RECV_1 s; HAVE_PROT_RECV_2 buf; HAVE_PROT_RECV_3 len; HAVE_PROT_RECV_4 flags; { ssize_t rc; typedef HAVE_PROT_RECV_0 (*RECV_FUNC_T)(HAVE_PROT_RECV_1, HAVE_PROT_RECV_2, HAVE_PROT_RECV_3, HAVE_PROT_RECV_4); RECV_FUNC_T function; SYSCALL_START(s); function = (RECV_FUNC_T)symbolfunction(SYMBOL_RECV); rc = function(s, buf, len, flags); SYSCALL_END(s); return rc; } #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_RECVFROM_0 sys_recvfrom(s, buf, len, flags, from, fromlen) HAVE_PROT_RECVFROM_1 s; HAVE_PROT_RECVFROM_2 buf; HAVE_PROT_RECVFROM_3 len; HAVE_PROT_RECVFROM_4 flags; HAVE_PROT_RECVFROM_5 from; HAVE_PROT_RECVFROM_6 fromlen; { int rc; typedef HAVE_PROT_RECVFROM_0 (*RECVFROM_FUNC_T)(HAVE_PROT_RECVFROM_1, HAVE_PROT_RECVFROM_2, HAVE_PROT_RECVFROM_3, HAVE_PROT_RECVFROM_4, HAVE_PROT_RECVFROM_5, HAVE_PROT_RECVFROM_6); RECVFROM_FUNC_T function; SYSCALL_START(s); function = (RECVFROM_FUNC_T)symbolfunction(SYMBOL_RECVFROM); rc = function(s, buf, len, flags, from, fromlen); SYSCALL_END(s); return rc; } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_RECVMSG_0 sys_recvmsg(s, msg, flags) HAVE_PROT_RECVMSG_1 s; HAVE_PROT_RECVMSG_2 msg; HAVE_PROT_RECVMSG_3 flags; { ssize_t rc; typedef HAVE_PROT_RECVMSG_0 (*RECVMSG_FUNC_T)(HAVE_PROT_RECVMSG_1, HAVE_PROT_RECVMSG_2, HAVE_PROT_RECVMSG_3); RECVMSG_FUNC_T function; SYSCALL_START(s); function = (RECVMSG_FUNC_T)symbolfunction(SYMBOL_RECVMSG); rc = function(s, msg, flags); SYSCALL_END(s); return rc; } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ int sys_rresvport(port) int *port; { typedef int (*RRESVPORT_FUNC_T)(int *); RRESVPORT_FUNC_T function; function = (RRESVPORT_FUNC_T)symbolfunction(SYMBOL_RRESVPORT); return function(port); } HAVE_PROT_SEND_0 sys_send(s, msg, len, flags) HAVE_PROT_SEND_1 s; HAVE_PROT_SEND_2 msg; HAVE_PROT_SEND_3 len; HAVE_PROT_SEND_4 flags; { ssize_t rc; typedef HAVE_PROT_SEND_0 (*SEND_FUNC_T)(HAVE_PROT_SEND_1, HAVE_PROT_SEND_2, HAVE_PROT_SEND_3, HAVE_PROT_SEND_4); SEND_FUNC_T function; SYSCALL_START(s); function = (SEND_FUNC_T)symbolfunction(SYMBOL_SEND); rc = function(s, msg, len, flags); SYSCALL_END(s); return rc; } #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_SENDMSG_0 sys_sendmsg(s, msg, flags) HAVE_PROT_SENDMSG_1 s; HAVE_PROT_SENDMSG_2 msg; HAVE_PROT_SENDMSG_3 flags; { ssize_t rc; typedef HAVE_PROT_SENDMSG_0 (*SENDMSG_FUNC_T)(HAVE_PROT_SENDMSG_1, HAVE_PROT_SENDMSG_2, HAVE_PROT_SENDMSG_3); SENDMSG_FUNC_T function; SYSCALL_START(s); function = (SENDMSG_FUNC_T)symbolfunction(SYMBOL_SENDMSG); rc = function(s, msg, flags); SYSCALL_END(s); return rc; } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_SENDTO_0 sys_sendto(s, msg, len, flags, to, tolen) HAVE_PROT_SENDTO_1 s; HAVE_PROT_SENDTO_2 msg; HAVE_PROT_SENDTO_3 len; HAVE_PROT_SENDTO_4 flags; HAVE_PROT_SENDTO_5 to; HAVE_PROT_SENDTO_6 tolen; { ssize_t rc; typedef HAVE_PROT_SENDTO_0 (*SENDTO_FUNC_T)(HAVE_PROT_SENDTO_1, HAVE_PROT_SENDTO_2, HAVE_PROT_SENDTO_3, HAVE_PROT_SENDTO_4, HAVE_PROT_SENDTO_5, HAVE_PROT_SENDTO_6); SENDTO_FUNC_T function; SYSCALL_START(s); function = (SENDTO_FUNC_T)symbolfunction(SYMBOL_SENDTO); rc = function(s, msg, len, flags, to, tolen); SYSCALL_END(s); return rc; } #endif /* !HAVE_EXTRA_OSF_SYMBOLS */ HAVE_PROT_WRITE_0 sys_write(d, buf, nbytes) HAVE_PROT_WRITE_1 d; HAVE_PROT_WRITE_2 buf; HAVE_PROT_WRITE_3 nbytes; { ssize_t rc; typedef HAVE_PROT_WRITE_0 (*WRITE_FUNC_T)(HAVE_PROT_WRITE_1, HAVE_PROT_WRITE_2, HAVE_PROT_WRITE_3); WRITE_FUNC_T function; SYSCALL_START(d); function = (WRITE_FUNC_T)symbolfunction(SYMBOL_WRITE); rc = function(d, buf, nbytes); SYSCALL_END(d); return rc; } #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_WRITEV_0 sys_writev(d, iov, iovcnt) HAVE_PROT_WRITEV_1 d; HAVE_PROT_WRITEV_2 iov; HAVE_PROT_WRITEV_3 iovcnt; { ssize_t rc; typedef HAVE_PROT_WRITEV_0 (*WRITEV_FUNC_T)(HAVE_PROT_WRITEV_1, HAVE_PROT_WRITEV_2, HAVE_PROT_WRITEV_3); WRITEV_FUNC_T function; SYSCALL_START(d); function = (WRITEV_FUNC_T)symbolfunction(SYMBOL_WRITEV); rc = function(d, iov, iovcnt); SYSCALL_END(d); return rc; } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ /* * the interpositioned functions. */ #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_ACCEPT_0 accept(s, addr, addrlen) HAVE_PROT_ACCEPT_1 s; HAVE_PROT_ACCEPT_2 addr; HAVE_PROT_ACCEPT_3 addrlen; { if (ISSYSCALL(s)) return sys_accept(s, addr, addrlen); return Raccept(s, addr, (socklen_t *)addrlen); } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_BIND_0 bind(s, name, namelen) HAVE_PROT_BIND_1 s; HAVE_PROT_BIND_2 name; HAVE_PROT_BIND_3 namelen; { if (ISSYSCALL(s)) return sys_bind(s, name, namelen); return Rbind(s, name, namelen); } #endif /* !HAVE_EXTRA_OSF_SYMBOLS */ int bindresvport(sd, sin) int sd; struct sockaddr_in *sin; { if (ISSYSCALL(sd)) return sys_bindresvport(sd, sin); return Rbindresvport(sd, sin); } #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_CONNECT_0 connect(s, name, namelen) HAVE_PROT_CONNECT_1 s; HAVE_PROT_CONNECT_2 name; HAVE_PROT_CONNECT_3 namelen; { if (ISSYSCALL(s)) return sys_connect(s, name, namelen); return Rconnect(s, name, namelen); } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_GETPEERNAME_0 getpeername(s, name, namelen) HAVE_PROT_GETPEERNAME_1 s; HAVE_PROT_GETPEERNAME_2 name; HAVE_PROT_GETPEERNAME_3 namelen; { if (ISSYSCALL(s)) return sys_getpeername(s, name, namelen); return Rgetpeername(s, name, namelen); } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_GETSOCKNAME_0 getsockname(s, name, namelen) HAVE_PROT_GETSOCKNAME_1 s; HAVE_PROT_GETSOCKNAME_2 name; HAVE_PROT_GETSOCKNAME_3 namelen; { if (ISSYSCALL(s)) return sys_getsockname(s, name, namelen); return Rgetsockname(s, name, namelen); } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ HAVE_PROT_READ_0 read(d, buf, nbytes) HAVE_PROT_READ_1 d; HAVE_PROT_READ_2 buf; HAVE_PROT_READ_3 nbytes; { if (ISSYSCALL(d)) return sys_read(d, buf, nbytes); return Rread(d, buf, nbytes); } #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_READV_0 readv(d, iov, iovcnt) HAVE_PROT_READV_1 d; HAVE_PROT_READV_2 iov; HAVE_PROT_READV_3 iovcnt; { if (ISSYSCALL(d)) return sys_readv(d, iov, iovcnt); return Rreadv(d, iov, iovcnt); } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ HAVE_PROT_RECV_0 recv(s, msg, len, flags) HAVE_PROT_RECV_1 s; HAVE_PROT_RECV_2 msg; HAVE_PROT_RECV_3 len; HAVE_PROT_RECV_4 flags; { if (ISSYSCALL(s)) return sys_recv(s, msg, len, flags); return Rrecv(s, msg, len, flags); } #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_RECVFROM_0 recvfrom(s, buf, len, flags, from, fromlen) HAVE_PROT_RECVFROM_1 s; HAVE_PROT_RECVFROM_2 buf; HAVE_PROT_RECVFROM_3 len; HAVE_PROT_RECVFROM_4 flags; HAVE_PROT_RECVFROM_5 from; HAVE_PROT_RECVFROM_6 fromlen; { if (ISSYSCALL(s)) return sys_recvfrom(s, buf, len, flags, from, fromlen); return Rrecvfrom(s, buf, len, flags, from, fromlen); } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_RECVMSG_0 recvmsg(s, msg, flags) HAVE_PROT_RECVMSG_1 s; HAVE_PROT_RECVMSG_2 msg; HAVE_PROT_RECVMSG_3 flags; { if (ISSYSCALL(s)) return sys_recvmsg(s, msg, flags); return Rrecvmsg(s, msg, flags); } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ int rresvport(port) int *port; { return Rrresvport(port); } HAVE_PROT_WRITE_0 write(d, buf, nbytes) HAVE_PROT_WRITE_1 d; HAVE_PROT_WRITE_2 buf; HAVE_PROT_WRITE_3 nbytes; { if (ISSYSCALL(d)) return sys_write(d, buf, nbytes); return Rwrite(d, buf, nbytes); } #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_WRITEV_0 writev(d, iov, iovcnt) HAVE_PROT_WRITEV_1 d; HAVE_PROT_WRITEV_2 iov; HAVE_PROT_WRITEV_3 iovcnt; { if (ISSYSCALL(d)) return sys_writev(d, iov, iovcnt); return Rwritev(d, iov, iovcnt); } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ HAVE_PROT_SEND_0 send(s, msg, len, flags) HAVE_PROT_SEND_1 s; HAVE_PROT_SEND_2 msg; HAVE_PROT_SEND_3 len; HAVE_PROT_SEND_4 flags; { if (ISSYSCALL(s)) return sys_send(s, msg, len, flags); return Rsend(s, msg, len, flags); } #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_SENDMSG_0 sendmsg(s, msg, flags) HAVE_PROT_SENDMSG_1 s; HAVE_PROT_SENDMSG_2 msg; HAVE_PROT_SENDMSG_3 flags; { if (ISSYSCALL(s)) return sys_sendmsg(s, msg, flags); return Rsendmsg(s, msg, flags); } #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #if !HAVE_EXTRA_OSF_SYMBOLS HAVE_PROT_SENDTO_0 sendto(s, msg, len, flags, to, tolen) HAVE_PROT_SENDTO_1 s; HAVE_PROT_SENDTO_2 msg; HAVE_PROT_SENDTO_3 len; HAVE_PROT_SENDTO_4 flags; HAVE_PROT_SENDTO_5 to; HAVE_PROT_SENDTO_6 tolen; { if (ISSYSCALL(s)) return sys_sendto(s, msg, len, flags, to, tolen); return Rsendto(s, msg, len, flags, to, tolen); } #endif /* !HAVE_EXTRA_OSF_SYMBOLS */ #endif /* SOCKS_CLIENT */ #if SOCKS_SERVER struct hostent * sys_gethostbyaddr(addr, len, af) const char *addr; int len; int af; { typedef struct hostent *(*GETHOSTBYADDR_FUNC_T)(const char *, int, int); GETHOSTBYADDR_FUNC_T function; function = (GETHOSTBYADDR_FUNC_T)symbolfunction(SYMBOL_GETHOSTBYADDR); return function(addr, len, af); } HAVE_PROT_GETHOSTBYADDR_0 gethostbyaddr(addr, len, af) HAVE_PROT_GETHOSTBYADDR_1 addr; HAVE_PROT_GETHOSTBYADDR_2 len; HAVE_PROT_GETHOSTBYADDR_3 af; { return cgethostbyaddr(addr, len, af); } #endif /* SOCKS_SERVER */ struct hostent * sys_gethostbyname(name) const char *name; { typedef struct hostent *(*GETHOSTBYNAME_FUNC_T)(const char *); GETHOSTBYNAME_FUNC_T function; function = (GETHOSTBYNAME_FUNC_T)symbolfunction(SYMBOL_GETHOSTBYNAME); return function(name); } struct hostent * gethostbyname(name) const char *name; { #if SOCKS_SERVER return cgethostbyname(name); #else return Rgethostbyname(name); #endif } #if SOCKS_CLIENT struct hostent * sys_gethostbyname2(name, af) const char *name; int af; { typedef struct hostent *(*GETHOSTBYNAME2_FUNC_T)(const char *, int); GETHOSTBYNAME2_FUNC_T function; function = (GETHOSTBYNAME2_FUNC_T)symbolfunction(SYMBOL_GETHOSTBYNAME2); return function(name, af); } struct hostent * gethostbyname2(name, af) const char *name; int af; { return Rgethostbyname2(name, af); } #if HAVE_GETADDRINFO int sys_getaddrinfo(nodename, servname, hints, res) const char *nodename; const char *servname; const struct addrinfo *hints; struct addrinfo **res; { typedef int (*GETADDRINFO_FUNC_T)(const char *, const char *, const struct addrinfo *, struct addrinfo **); GETADDRINFO_FUNC_T function; function = (GETADDRINFO_FUNC_T)symbolfunction(SYMBOL_GETADDRINFO); return function(nodename, servname, hints, res); } int getaddrinfo(nodename, servname, hints, res) const char *nodename; const char *servname; const struct addrinfo *hints; struct addrinfo **res; { return Rgetaddrinfo(nodename, servname, hints, res); } #endif /* HAVE_GETADDRINFO */ #if HAVE_GETIPNODEBYNAME struct hostent * sys_getipnodebyname(name, af, flags, error_num) const char *name; int af; int flags; int *error_num; { typedef struct hostent *(*GETIPNODEBYNAME_FUNC_T)(const char *, int, int, int *); GETIPNODEBYNAME_FUNC_T function; function = (GETIPNODEBYNAME_FUNC_T)symbolfunction(SYMBOL_GETIPNODEBYNAME); return function(name, af, flags, error_num); } struct hostent * getipnodebyname(name, af, flags, error_num) const char *name; int af; int flags; int *error_num; { return Rgetipnodebyname(name, af, flags, error_num); } void sys_freehostent(ptr) struct hostent *ptr; { typedef struct hostent *(*FREEHOSTENT_FUNC_T)(struct hostent *); FREEHOSTENT_FUNC_T function; function = (FREEHOSTENT_FUNC_T)symbolfunction(SYMBOL_FREEHOSTENT); function(ptr); } void freehostent(ptr) struct hostent *ptr; { Rfreehostent(ptr); } #endif /* HAVE_GETIPNODEBYNAME */ #endif /* SOCKS_CLIENT */ #endif /* SOCKSLIBRARY_DYNAMIC */ dante-1.1.19.dfsg/dlib/Makefile.am0000644000175000017500000000225510324735540015253 0ustar roamroamlib_LTLIBRARIES = libdsocks.la libdsocks_la_SOURCES = interposition.c int_osf1.c int_osf2.c int_osf3.c \ ../lib/config_parse.y ../lib/io.c ../lib/debug.c ../lib/udp.c \ ../lib/Rgetpeername.c ../lib/Rgetsockname.c \ ../lib/Rrresvport.c ../lib/Rbind.c ../lib/config_scan.l \ ../lib/address.c ../lib/authneg.c ../lib/client.c \ ../lib/clientconfig.c ../lib/clientprotocol.c ../lib/Raccept.c \ ../lib/userio.c ../lib/connectchild.c \ ../lib/config.c ../lib/log.c ../lib/protocol.c ../lib/socket.c \ ../lib/udp_util.c ../lib/Rbindresvport.c ../lib/Rconnect.c \ ../lib/util.c ../lib/Rgethostbyname.c ../lib/Rcompat.c \ ../lib/msproxy_clientprotocol.c ../lib/broken.c ../lib/hostcache.c \ ../lib/serr.c ../lib/httpproxy.c ../lib/tostring.c \ ../lib/addressmatch.c libdsocks_la_LDFLAGS = -version-info 1:0:1 -all-dynamic libdsocks_la_LIBADD = ../libscompat/libscompat.la noinst_HEADERS = config_parse.h MAINTAINERCLEANFILES = config_parse.h config_parse.c config_scan.c INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/libscompat #XXX AM_CFLAGS = -DSOCKS_CLIENT=1 -DSOCKS_SERVER=0 -DSOCKSLIBRARY_DYNAMIC=1 PREFIX = socks_yy AM_YFLAGS = -d -p${PREFIX} AM_LFLAGS = -P${PREFIX} -olex.yy.c dante-1.1.19.dfsg/dlib/Makefile.in0000644000175000017500000014343110362704165015267 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = dlib DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in config_parse.c config_parse.h \ config_scan.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libdsocks_la_DEPENDENCIES = ../libscompat/libscompat.la am_libdsocks_la_OBJECTS = interposition.lo int_osf1.lo int_osf2.lo \ int_osf3.lo config_parse.lo io.lo debug.lo udp.lo \ Rgetpeername.lo Rgetsockname.lo Rrresvport.lo Rbind.lo \ config_scan.lo address.lo authneg.lo client.lo clientconfig.lo \ clientprotocol.lo Raccept.lo userio.lo connectchild.lo \ config.lo log.lo protocol.lo socket.lo udp_util.lo \ Rbindresvport.lo Rconnect.lo util.lo Rgethostbyname.lo \ Rcompat.lo msproxy_clientprotocol.lo broken.lo hostcache.lo \ serr.lo httpproxy.lo tostring.lo addressmatch.lo libdsocks_la_OBJECTS = $(am_libdsocks_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \ $(AM_YFLAGS) SOURCES = $(libdsocks_la_SOURCES) DIST_SOURCES = $(libdsocks_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = libdsocks.la libdsocks_la_SOURCES = interposition.c int_osf1.c int_osf2.c int_osf3.c \ ../lib/config_parse.y ../lib/io.c ../lib/debug.c ../lib/udp.c \ ../lib/Rgetpeername.c ../lib/Rgetsockname.c \ ../lib/Rrresvport.c ../lib/Rbind.c ../lib/config_scan.l \ ../lib/address.c ../lib/authneg.c ../lib/client.c \ ../lib/clientconfig.c ../lib/clientprotocol.c ../lib/Raccept.c \ ../lib/userio.c ../lib/connectchild.c \ ../lib/config.c ../lib/log.c ../lib/protocol.c ../lib/socket.c \ ../lib/udp_util.c ../lib/Rbindresvport.c ../lib/Rconnect.c \ ../lib/util.c ../lib/Rgethostbyname.c ../lib/Rcompat.c \ ../lib/msproxy_clientprotocol.c ../lib/broken.c ../lib/hostcache.c \ ../lib/serr.c ../lib/httpproxy.c ../lib/tostring.c \ ../lib/addressmatch.c libdsocks_la_LDFLAGS = -version-info 1:0:1 -all-dynamic libdsocks_la_LIBADD = ../libscompat/libscompat.la noinst_HEADERS = config_parse.h MAINTAINERCLEANFILES = config_parse.h config_parse.c config_scan.c INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/libscompat #XXX AM_CFLAGS = -DSOCKS_CLIENT=1 -DSOCKS_SERVER=0 -DSOCKSLIBRARY_DYNAMIC=1 PREFIX = socks_yy AM_YFLAGS = -d -p${PREFIX} AM_LFLAGS = -P${PREFIX} -olex.yy.c all: all-am .SUFFIXES: .SUFFIXES: .c .l .lo .o .obj .y $(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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dlib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu dlib/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 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done config_parse.h: config_parse.c @if test ! -f $@; then \ rm -f config_parse.c; \ $(MAKE) config_parse.c; \ else :; fi libdsocks.la: $(libdsocks_la_OBJECTS) $(libdsocks_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libdsocks_la_LDFLAGS) $(libdsocks_la_OBJECTS) $(libdsocks_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Raccept.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rbind.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rbindresvport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rcompat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rconnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rgethostbyname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rgetpeername.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rgetsockname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rrresvport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/address.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addressmatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authneg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/broken.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clientconfig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clientprotocol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_scan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connectchild.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostcache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpproxy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/int_osf1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/int_osf2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/int_osf3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interposition.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msproxy_clientprotocol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tostring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udp_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< io.lo: ../lib/io.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT io.lo -MD -MP -MF "$(DEPDIR)/io.Tpo" -c -o io.lo `test -f '../lib/io.c' || echo '$(srcdir)/'`../lib/io.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/io.Tpo" "$(DEPDIR)/io.Plo"; else rm -f "$(DEPDIR)/io.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/io.c' object='io.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o io.lo `test -f '../lib/io.c' || echo '$(srcdir)/'`../lib/io.c debug.lo: ../lib/debug.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debug.lo -MD -MP -MF "$(DEPDIR)/debug.Tpo" -c -o debug.lo `test -f '../lib/debug.c' || echo '$(srcdir)/'`../lib/debug.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/debug.Tpo" "$(DEPDIR)/debug.Plo"; else rm -f "$(DEPDIR)/debug.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/debug.c' object='debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debug.lo `test -f '../lib/debug.c' || echo '$(srcdir)/'`../lib/debug.c udp.lo: ../lib/udp.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT udp.lo -MD -MP -MF "$(DEPDIR)/udp.Tpo" -c -o udp.lo `test -f '../lib/udp.c' || echo '$(srcdir)/'`../lib/udp.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/udp.Tpo" "$(DEPDIR)/udp.Plo"; else rm -f "$(DEPDIR)/udp.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/udp.c' object='udp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o udp.lo `test -f '../lib/udp.c' || echo '$(srcdir)/'`../lib/udp.c Rgetpeername.lo: ../lib/Rgetpeername.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT Rgetpeername.lo -MD -MP -MF "$(DEPDIR)/Rgetpeername.Tpo" -c -o Rgetpeername.lo `test -f '../lib/Rgetpeername.c' || echo '$(srcdir)/'`../lib/Rgetpeername.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/Rgetpeername.Tpo" "$(DEPDIR)/Rgetpeername.Plo"; else rm -f "$(DEPDIR)/Rgetpeername.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/Rgetpeername.c' object='Rgetpeername.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o Rgetpeername.lo `test -f '../lib/Rgetpeername.c' || echo '$(srcdir)/'`../lib/Rgetpeername.c Rgetsockname.lo: ../lib/Rgetsockname.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT Rgetsockname.lo -MD -MP -MF "$(DEPDIR)/Rgetsockname.Tpo" -c -o Rgetsockname.lo `test -f '../lib/Rgetsockname.c' || echo '$(srcdir)/'`../lib/Rgetsockname.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/Rgetsockname.Tpo" "$(DEPDIR)/Rgetsockname.Plo"; else rm -f "$(DEPDIR)/Rgetsockname.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/Rgetsockname.c' object='Rgetsockname.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o Rgetsockname.lo `test -f '../lib/Rgetsockname.c' || echo '$(srcdir)/'`../lib/Rgetsockname.c Rrresvport.lo: ../lib/Rrresvport.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT Rrresvport.lo -MD -MP -MF "$(DEPDIR)/Rrresvport.Tpo" -c -o Rrresvport.lo `test -f '../lib/Rrresvport.c' || echo '$(srcdir)/'`../lib/Rrresvport.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/Rrresvport.Tpo" "$(DEPDIR)/Rrresvport.Plo"; else rm -f "$(DEPDIR)/Rrresvport.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/Rrresvport.c' object='Rrresvport.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o Rrresvport.lo `test -f '../lib/Rrresvport.c' || echo '$(srcdir)/'`../lib/Rrresvport.c Rbind.lo: ../lib/Rbind.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT Rbind.lo -MD -MP -MF "$(DEPDIR)/Rbind.Tpo" -c -o Rbind.lo `test -f '../lib/Rbind.c' || echo '$(srcdir)/'`../lib/Rbind.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/Rbind.Tpo" "$(DEPDIR)/Rbind.Plo"; else rm -f "$(DEPDIR)/Rbind.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/Rbind.c' object='Rbind.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o Rbind.lo `test -f '../lib/Rbind.c' || echo '$(srcdir)/'`../lib/Rbind.c address.lo: ../lib/address.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT address.lo -MD -MP -MF "$(DEPDIR)/address.Tpo" -c -o address.lo `test -f '../lib/address.c' || echo '$(srcdir)/'`../lib/address.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/address.Tpo" "$(DEPDIR)/address.Plo"; else rm -f "$(DEPDIR)/address.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/address.c' object='address.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o address.lo `test -f '../lib/address.c' || echo '$(srcdir)/'`../lib/address.c authneg.lo: ../lib/authneg.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT authneg.lo -MD -MP -MF "$(DEPDIR)/authneg.Tpo" -c -o authneg.lo `test -f '../lib/authneg.c' || echo '$(srcdir)/'`../lib/authneg.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/authneg.Tpo" "$(DEPDIR)/authneg.Plo"; else rm -f "$(DEPDIR)/authneg.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/authneg.c' object='authneg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o authneg.lo `test -f '../lib/authneg.c' || echo '$(srcdir)/'`../lib/authneg.c client.lo: ../lib/client.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT client.lo -MD -MP -MF "$(DEPDIR)/client.Tpo" -c -o client.lo `test -f '../lib/client.c' || echo '$(srcdir)/'`../lib/client.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/client.Tpo" "$(DEPDIR)/client.Plo"; else rm -f "$(DEPDIR)/client.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/client.c' object='client.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o client.lo `test -f '../lib/client.c' || echo '$(srcdir)/'`../lib/client.c clientconfig.lo: ../lib/clientconfig.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT clientconfig.lo -MD -MP -MF "$(DEPDIR)/clientconfig.Tpo" -c -o clientconfig.lo `test -f '../lib/clientconfig.c' || echo '$(srcdir)/'`../lib/clientconfig.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/clientconfig.Tpo" "$(DEPDIR)/clientconfig.Plo"; else rm -f "$(DEPDIR)/clientconfig.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/clientconfig.c' object='clientconfig.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o clientconfig.lo `test -f '../lib/clientconfig.c' || echo '$(srcdir)/'`../lib/clientconfig.c clientprotocol.lo: ../lib/clientprotocol.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT clientprotocol.lo -MD -MP -MF "$(DEPDIR)/clientprotocol.Tpo" -c -o clientprotocol.lo `test -f '../lib/clientprotocol.c' || echo '$(srcdir)/'`../lib/clientprotocol.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/clientprotocol.Tpo" "$(DEPDIR)/clientprotocol.Plo"; else rm -f "$(DEPDIR)/clientprotocol.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/clientprotocol.c' object='clientprotocol.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o clientprotocol.lo `test -f '../lib/clientprotocol.c' || echo '$(srcdir)/'`../lib/clientprotocol.c Raccept.lo: ../lib/Raccept.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT Raccept.lo -MD -MP -MF "$(DEPDIR)/Raccept.Tpo" -c -o Raccept.lo `test -f '../lib/Raccept.c' || echo '$(srcdir)/'`../lib/Raccept.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/Raccept.Tpo" "$(DEPDIR)/Raccept.Plo"; else rm -f "$(DEPDIR)/Raccept.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/Raccept.c' object='Raccept.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o Raccept.lo `test -f '../lib/Raccept.c' || echo '$(srcdir)/'`../lib/Raccept.c userio.lo: ../lib/userio.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT userio.lo -MD -MP -MF "$(DEPDIR)/userio.Tpo" -c -o userio.lo `test -f '../lib/userio.c' || echo '$(srcdir)/'`../lib/userio.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/userio.Tpo" "$(DEPDIR)/userio.Plo"; else rm -f "$(DEPDIR)/userio.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/userio.c' object='userio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o userio.lo `test -f '../lib/userio.c' || echo '$(srcdir)/'`../lib/userio.c connectchild.lo: ../lib/connectchild.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT connectchild.lo -MD -MP -MF "$(DEPDIR)/connectchild.Tpo" -c -o connectchild.lo `test -f '../lib/connectchild.c' || echo '$(srcdir)/'`../lib/connectchild.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/connectchild.Tpo" "$(DEPDIR)/connectchild.Plo"; else rm -f "$(DEPDIR)/connectchild.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/connectchild.c' object='connectchild.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o connectchild.lo `test -f '../lib/connectchild.c' || echo '$(srcdir)/'`../lib/connectchild.c config.lo: ../lib/config.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT config.lo -MD -MP -MF "$(DEPDIR)/config.Tpo" -c -o config.lo `test -f '../lib/config.c' || echo '$(srcdir)/'`../lib/config.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/config.Tpo" "$(DEPDIR)/config.Plo"; else rm -f "$(DEPDIR)/config.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/config.c' object='config.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o config.lo `test -f '../lib/config.c' || echo '$(srcdir)/'`../lib/config.c log.lo: ../lib/log.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT log.lo -MD -MP -MF "$(DEPDIR)/log.Tpo" -c -o log.lo `test -f '../lib/log.c' || echo '$(srcdir)/'`../lib/log.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/log.Tpo" "$(DEPDIR)/log.Plo"; else rm -f "$(DEPDIR)/log.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/log.c' object='log.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o log.lo `test -f '../lib/log.c' || echo '$(srcdir)/'`../lib/log.c protocol.lo: ../lib/protocol.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT protocol.lo -MD -MP -MF "$(DEPDIR)/protocol.Tpo" -c -o protocol.lo `test -f '../lib/protocol.c' || echo '$(srcdir)/'`../lib/protocol.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/protocol.Tpo" "$(DEPDIR)/protocol.Plo"; else rm -f "$(DEPDIR)/protocol.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/protocol.c' object='protocol.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o protocol.lo `test -f '../lib/protocol.c' || echo '$(srcdir)/'`../lib/protocol.c socket.lo: ../lib/socket.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT socket.lo -MD -MP -MF "$(DEPDIR)/socket.Tpo" -c -o socket.lo `test -f '../lib/socket.c' || echo '$(srcdir)/'`../lib/socket.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/socket.Tpo" "$(DEPDIR)/socket.Plo"; else rm -f "$(DEPDIR)/socket.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/socket.c' object='socket.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o socket.lo `test -f '../lib/socket.c' || echo '$(srcdir)/'`../lib/socket.c udp_util.lo: ../lib/udp_util.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT udp_util.lo -MD -MP -MF "$(DEPDIR)/udp_util.Tpo" -c -o udp_util.lo `test -f '../lib/udp_util.c' || echo '$(srcdir)/'`../lib/udp_util.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/udp_util.Tpo" "$(DEPDIR)/udp_util.Plo"; else rm -f "$(DEPDIR)/udp_util.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/udp_util.c' object='udp_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o udp_util.lo `test -f '../lib/udp_util.c' || echo '$(srcdir)/'`../lib/udp_util.c Rbindresvport.lo: ../lib/Rbindresvport.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT Rbindresvport.lo -MD -MP -MF "$(DEPDIR)/Rbindresvport.Tpo" -c -o Rbindresvport.lo `test -f '../lib/Rbindresvport.c' || echo '$(srcdir)/'`../lib/Rbindresvport.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/Rbindresvport.Tpo" "$(DEPDIR)/Rbindresvport.Plo"; else rm -f "$(DEPDIR)/Rbindresvport.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/Rbindresvport.c' object='Rbindresvport.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o Rbindresvport.lo `test -f '../lib/Rbindresvport.c' || echo '$(srcdir)/'`../lib/Rbindresvport.c Rconnect.lo: ../lib/Rconnect.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT Rconnect.lo -MD -MP -MF "$(DEPDIR)/Rconnect.Tpo" -c -o Rconnect.lo `test -f '../lib/Rconnect.c' || echo '$(srcdir)/'`../lib/Rconnect.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/Rconnect.Tpo" "$(DEPDIR)/Rconnect.Plo"; else rm -f "$(DEPDIR)/Rconnect.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/Rconnect.c' object='Rconnect.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o Rconnect.lo `test -f '../lib/Rconnect.c' || echo '$(srcdir)/'`../lib/Rconnect.c util.lo: ../lib/util.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util.lo -MD -MP -MF "$(DEPDIR)/util.Tpo" -c -o util.lo `test -f '../lib/util.c' || echo '$(srcdir)/'`../lib/util.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/util.Tpo" "$(DEPDIR)/util.Plo"; else rm -f "$(DEPDIR)/util.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/util.c' object='util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util.lo `test -f '../lib/util.c' || echo '$(srcdir)/'`../lib/util.c Rgethostbyname.lo: ../lib/Rgethostbyname.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT Rgethostbyname.lo -MD -MP -MF "$(DEPDIR)/Rgethostbyname.Tpo" -c -o Rgethostbyname.lo `test -f '../lib/Rgethostbyname.c' || echo '$(srcdir)/'`../lib/Rgethostbyname.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/Rgethostbyname.Tpo" "$(DEPDIR)/Rgethostbyname.Plo"; else rm -f "$(DEPDIR)/Rgethostbyname.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/Rgethostbyname.c' object='Rgethostbyname.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o Rgethostbyname.lo `test -f '../lib/Rgethostbyname.c' || echo '$(srcdir)/'`../lib/Rgethostbyname.c Rcompat.lo: ../lib/Rcompat.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT Rcompat.lo -MD -MP -MF "$(DEPDIR)/Rcompat.Tpo" -c -o Rcompat.lo `test -f '../lib/Rcompat.c' || echo '$(srcdir)/'`../lib/Rcompat.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/Rcompat.Tpo" "$(DEPDIR)/Rcompat.Plo"; else rm -f "$(DEPDIR)/Rcompat.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/Rcompat.c' object='Rcompat.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o Rcompat.lo `test -f '../lib/Rcompat.c' || echo '$(srcdir)/'`../lib/Rcompat.c msproxy_clientprotocol.lo: ../lib/msproxy_clientprotocol.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msproxy_clientprotocol.lo -MD -MP -MF "$(DEPDIR)/msproxy_clientprotocol.Tpo" -c -o msproxy_clientprotocol.lo `test -f '../lib/msproxy_clientprotocol.c' || echo '$(srcdir)/'`../lib/msproxy_clientprotocol.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/msproxy_clientprotocol.Tpo" "$(DEPDIR)/msproxy_clientprotocol.Plo"; else rm -f "$(DEPDIR)/msproxy_clientprotocol.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/msproxy_clientprotocol.c' object='msproxy_clientprotocol.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msproxy_clientprotocol.lo `test -f '../lib/msproxy_clientprotocol.c' || echo '$(srcdir)/'`../lib/msproxy_clientprotocol.c broken.lo: ../lib/broken.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT broken.lo -MD -MP -MF "$(DEPDIR)/broken.Tpo" -c -o broken.lo `test -f '../lib/broken.c' || echo '$(srcdir)/'`../lib/broken.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/broken.Tpo" "$(DEPDIR)/broken.Plo"; else rm -f "$(DEPDIR)/broken.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/broken.c' object='broken.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o broken.lo `test -f '../lib/broken.c' || echo '$(srcdir)/'`../lib/broken.c hostcache.lo: ../lib/hostcache.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hostcache.lo -MD -MP -MF "$(DEPDIR)/hostcache.Tpo" -c -o hostcache.lo `test -f '../lib/hostcache.c' || echo '$(srcdir)/'`../lib/hostcache.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/hostcache.Tpo" "$(DEPDIR)/hostcache.Plo"; else rm -f "$(DEPDIR)/hostcache.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/hostcache.c' object='hostcache.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hostcache.lo `test -f '../lib/hostcache.c' || echo '$(srcdir)/'`../lib/hostcache.c serr.lo: ../lib/serr.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT serr.lo -MD -MP -MF "$(DEPDIR)/serr.Tpo" -c -o serr.lo `test -f '../lib/serr.c' || echo '$(srcdir)/'`../lib/serr.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/serr.Tpo" "$(DEPDIR)/serr.Plo"; else rm -f "$(DEPDIR)/serr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/serr.c' object='serr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o serr.lo `test -f '../lib/serr.c' || echo '$(srcdir)/'`../lib/serr.c httpproxy.lo: ../lib/httpproxy.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT httpproxy.lo -MD -MP -MF "$(DEPDIR)/httpproxy.Tpo" -c -o httpproxy.lo `test -f '../lib/httpproxy.c' || echo '$(srcdir)/'`../lib/httpproxy.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/httpproxy.Tpo" "$(DEPDIR)/httpproxy.Plo"; else rm -f "$(DEPDIR)/httpproxy.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/httpproxy.c' object='httpproxy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o httpproxy.lo `test -f '../lib/httpproxy.c' || echo '$(srcdir)/'`../lib/httpproxy.c tostring.lo: ../lib/tostring.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tostring.lo -MD -MP -MF "$(DEPDIR)/tostring.Tpo" -c -o tostring.lo `test -f '../lib/tostring.c' || echo '$(srcdir)/'`../lib/tostring.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tostring.Tpo" "$(DEPDIR)/tostring.Plo"; else rm -f "$(DEPDIR)/tostring.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/tostring.c' object='tostring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tostring.lo `test -f '../lib/tostring.c' || echo '$(srcdir)/'`../lib/tostring.c addressmatch.lo: ../lib/addressmatch.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT addressmatch.lo -MD -MP -MF "$(DEPDIR)/addressmatch.Tpo" -c -o addressmatch.lo `test -f '../lib/addressmatch.c' || echo '$(srcdir)/'`../lib/addressmatch.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/addressmatch.Tpo" "$(DEPDIR)/addressmatch.Plo"; else rm -f "$(DEPDIR)/addressmatch.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/addressmatch.c' object='addressmatch.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o addressmatch.lo `test -f '../lib/addressmatch.c' || echo '$(srcdir)/'`../lib/addressmatch.c .l.c: $(LEXCOMPILE) $< sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@ rm -f $(LEX_OUTPUT_ROOT).c config_scan.c: ../lib/config_scan.l $(LEX) $(LFLAGS) $(AM_LFLAGS) `test -f ../lib/config_scan.l || echo '$(srcdir)/'`../lib/config_scan.l sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|config_scan.c|' $(LEX_OUTPUT_ROOT).c >config_scan.c rm -f $(LEX_OUTPUT_ROOT).c .y.c: $(YACCCOMPILE) $< if test -f y.tab.h; then \ to=`echo "$*_H" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|$*.h|" \ y.tab.h >$*.ht; \ rm -f y.tab.h; \ if cmp -s $*.ht $*.h; then \ rm -f $*.ht ;\ else \ mv $*.ht $*.h; \ fi; \ fi if test -f y.output; then \ mv y.output $*.output; \ fi sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@ rm -f y.tab.c config_parse.c: ../lib/config_parse.y $(YACC) $(YFLAGS) $(AM_YFLAGS) `test -f '../lib/config_parse.y' || echo '$(srcdir)/'`../lib/config_parse.y if test -f y.tab.h; then \ to=`echo "config_parse_H" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|config_parse.h|" \ y.tab.h >config_parse.ht; \ rm -f y.tab.h; \ if cmp -s config_parse.ht config_parse.h; then \ rm -f config_parse.ht ;\ else \ mv config_parse.ht config_parse.h; \ fi; \ fi if test -f y.output; then \ mv y.output config_parse.output; \ fi sed '/^#/ s|y\.tab\.c|config_parse.c|' y.tab.c >config_parse.ct && mv config_parse.ct config_parse.c rm -f y.tab.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f config_parse.c -rm -f config_parse.h -rm -f config_scan.c -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libLTLIBRARIES # 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: dante-1.1.19.dfsg/contrib/0000755000175000017500000000000011037370225013736 5ustar roamroamdante-1.1.19.dfsg/contrib/README0000644000175000017500000000124407521207544014625 0ustar roamroam This directory contains contributed files that are not supported or maintained by Inferno Nettverk A/S. They are included here in the hope that they may be useful to someone. Inferno Nettverk takes no responsibility for any of these files, use them at your own risk (as always). If any of these are no longer working, please send a bug-report so they can be removed. If you have suggestions for improvements, please contact the author of the contributed file, not Inferno Nettverk. Filename Description sockd-stat.awk provides statistics based on sockd logfiles Startup* startupitems for Mac OS X dante-1.1.19.dfsg/contrib/StartupParameters.plist0000644000175000017500000000120607521207545020507 0ustar roamroam Author Gerben Wierda <Gerben.Wierda@rna.nl> Description Dante Messages start Starting Dante SOCKS server stop Stopping Dante SOCKS server OrderPreference Last Provides Dante Requires Resolver dante-1.1.19.dfsg/contrib/Makefile.am0000644000175000017500000000011610144373455015776 0ustar roamroamEXTRA_DIST = README sockd-stat.awk StartupItems.Dante StartupParameters.plist dante-1.1.19.dfsg/contrib/Makefile.in0000644000175000017500000002244010362704163016007 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = contrib DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = README sockd-stat.awk StartupItems.Dante StartupParameters.plist 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu contrib/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 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-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: dante-1.1.19.dfsg/contrib/StartupItems.Dante0000755000175000017500000000241407521207545017372 0ustar roamroam#!/bin/sh # This StartupItem has been created by Gerben Wierda, Gerben.Wierda@rna.nl # on July 22, 2002. Install this directory in /Library/StartupItems on # Mac OS X . /etc/rc.common ## # Start Dante SOCKS server ## PIDFILE=/var/run/sockd.pid # Currently, sockd does not always remove sockd.pid when it dies (e.g. on # kill -TERM) so its existence is not very well coupled to sockd running with # that particular pid (and you might kill something unrelated...) # So we use ps output DANTELEADER=`ps axww | grep /usr/local/sbin/sockd | grep -v grep | \ awk '{print $3$1}' | grep '^[SRDI]s' | sed 's/^[SRDI]s//'` 2>/dev/null DANTEPID=`cat ${PIDFILE}` 2>/dev/null if [ "$1" == "start" ] then if [ "${DANTELEADER}" != "" ] then ConsoleMessage "Dante already running (pid = ${DANTELEADER})" else ConsoleMessage "Starting Dante SOCKS server" /usr/local/sbin/sockd -D fi elif [ "$1" == "stop" ] then if [ "${DANTELEADER}" != "" ] then ConsoleMessage "Stopping Dante SOCKS server" kill -TERM "${DANTELEADER}" rm -f ${PIDFILE} fi elif [ "$1" == "restart" ] then if [ "${DANTELEADER}" != "" ] then ConsoleMessage "Stopping Dante SOCKS server" kill -TERM "${DANTELEADER}" rm -f ${PIDFILE} fi ConsoleMessage "Starting Dante SOCKS server" /usr/local/sbin/sockd -D fi dante-1.1.19.dfsg/contrib/sockd-stat.awk0000644000175000017500000002151010360012651016507 0ustar roamroam# # sockd-stat.awk for the DANTE socks 4/5 daemon # Copyleft 2001 Stephan Eisvogel # This code is licensed under GPL v2 # # If you use this regularly, help boost my ego ;) and do a: # uname -a | mail -s "I use sockd-stat!" eisvogel@hawo.stw.uni-erlangen.de # # If you make any fixes or improvements, please do send do them to me! # All testing was done with DANTE version 1.1.6 on RedHat(tm) Linux. # If there are updates you can probably grab them from: # http://www.hawo.stw.uni-erlangen.de/~eisvogel/sockd # # # HOW TO USE # # Find out how your system rotates its logs and run this script # post-rotating, e.g. by doing a # # zcat /var/log/sockd.1.gz | awk -f /root/bin/sockd-stat.awk | \ # mail -s "Weekly SOCKD usage" root # # If you have a directory called /etc/logrotate.d then take a look # at the files in there for some run-post-rotate examples. Note that # this script uses some basic GNU-tools to get things done, namely # "sort", "head", and "rm", if you want reverse IP lookups you need # the "nslookup" utility as well. # # This is my last big AWK script, I am going Perl. # # # RELEASE NOTES # # v1.0 @ 01.01.2001 # NEC's socks daemon keeps crashing on Linux with 200+ users no # matter what I do, so we switched to DANTE for the time being. # Didn't like the last remote exploit too much either, maybe NEC # needs more DJB-type developers? # v1.1 @ 02.01.2001 # + fixed issue with different syslog daemons (Michael Shuldman) # + added request count output for the port statistics # + blocked UDP requests were not counted # + changed regexp that matches lines with statistics # + rmfile() function # + code cleanups, renamed some variables for clarity # + beautified output IMO # + added request types to general statistics BEGIN { # # Configurable items # (0 means all) # SHOW_PORTS=30; SHOW_CLIENTS=0; SHOW_DESTINATIONS=50; LOOKUP_IPS=1; # # no need to change anything below # IGNORECASE=1; MEG=1024*1024; lastdns="(unknown)"; lines=0; passed=0; denied=0; total_to_client_bytes=0; total_from_client_bytes=0; total_to_target_bytes=0; total_from_target_bytes=0; } # # Sort 'filename' contents numerically in 'field' # and display the 'count' largest lines, optionally # treat first field as IP address and append it # resolved into a hostname to the end of the line # function sorted_output (filename, field, count, rev_dns, curhost,a,b) { # sort and stuff all lines it into a temp file if (count==0) system("sort -nr +"field" "filename" 2>/dev/null >"filename".1"); else system("sort -nr +"field" "filename" 2>/dev/null | head -n "count" >"filename".1"); # read temp file back in, print it out and rev-dns if needed b=filename".1"; while ((getline curhost < b)>0) { printf "%s",curhost; if (rev_dns==1) { split(curhost,a); dns_lookup(a[1],filename".2"); printf "%s",lastdns; } printf "\n"; } close(b); rmfile(b); } # # Wade through /etc/services and grab the descriptive service name of a port # function get_service (port, myline,a,s) { split(port,s,/\//); curr_service=s[1]; while ((getline myline < "/etc/services")>0) { split(myline,a); if (a[2]==port) { curr_service=a[1]; break; } } close ("/etc/services"); } # # Somewhere we just have to draw a line # function draw_line (n, i) { for (i=0; i show IP system("nslookup "ip" 2>/dev/null >"tmpfile); while ((getline name < tmpfile)>0) { split(name,host); if (index(host[1],"Name:")!=0) { lastdns=host[2]; break; } } close(tmpfile) rmfile(tmpfile); } # # Remove file sans output # function rmfile (filename) { system("rm "filename" 2>/dev/null >/dev/null"); } # # Matches all lines, count them # /.*/ { lines++; } # # Count blocked requests # / sockd\[[0-9]+\]: block\([0-9]+\): / { denied++; # # compensate for different syslog daemons # field_ofs=0; split($0,curr_line); for (i=1; i<=NF; i++) if (match(curr_line[i],/sockd\[[0-9]+\]:/)) { field_ofs=i; break; } # # count BLOCK item # m_block[curr_line[field_ofs+2]] += 1; next; } # # Matches lines with statistical information # / sockd\[[0-9]+\]: pass\([0-9]+\): .* \]: .* -> .* -> .* -> .* -> / { passed++; # # compensate for different syslog daemons # field_ofs=0; split($0,curr_line); for (i=1; i<=NF; i++) if (match(curr_line[i],/sockd\[[0-9]+\]:/)) { field_ofs=i; break; } # # count PASS item # m_pass[curr_line[field_ofs+2]] += 1; # # clean up fields # gsub(/,/,"",curr_line[field_ofs+8]); gsub(/:/,"",curr_line[field_ofs+13]); split(curr_line[field_ofs+6],a,/\./); c_ip=a[1]"."a[2]"."a[3]"."a[4]; if (match(curr_line[field_ofs+11],/^`world'$/)) curr_line[field_ofs+11]="0.0.0.0."a[5]; split(curr_line[field_ofs+11],a,/\./); t_ip=a[1]"."a[2]"."a[3]"."a[4]; t_port=a[5]; # # add to totals # total_to_client_bytes += curr_line[field_ofs+4]; total_from_client_bytes += curr_line[field_ofs+8]; total_to_target_bytes += curr_line[field_ofs+9]; total_from_target_bytes += curr_line[field_ofs+13]; # # update client # (but exclude broken socksified Half-Life requests) # if (match(c_ip,/0\.0\.0\.0/)==0) { client[c_ip]=1; to_client[c_ip] += curr_line[field_ofs+4]; from_client[c_ip] += curr_line[field_ofs+8]; } # # update target # target[t_ip]=1; to_target[t_ip] += curr_line[field_ofs+9]; from_target[t_ip] += curr_line[field_ofs+13]; # # update port # if (match(curr_line[field_ofs+2],/tcp/)) { tcp_port[t_port]=1; tcp_port_to[t_port] += curr_line[field_ofs+9]; tcp_port_from[t_port] += curr_line[field_ofs+13]; tcp_port_used[t_port] += 1; } else { udp_port[t_port]=1; udp_port_to[t_port] += curr_line[field_ofs+9]; udp_port_from[t_port] += curr_line[field_ofs+13]; udp_port_used[t_port] += 1; } } # # After all lines are done, sort and print the statistics # END { # create a random filename for sorting srand(); CONVFMT="%d" r=rand()*999999999; tmpfile="/tmp/tmp.sockd-stat."r; printf "SOCKD statistics version 1.1\n"; printf "Copyleft 2001 Stephan Eisvogel \n"; total_clients=0; total_targets=0; for (c in client) total_clients++; for (t in target) total_targets++; printf "\nGeneral statistics\n"; draw_line(41); printf "Lines parsed : %12d\n", lines; printf "Unique clients : %12d\n", total_clients; printf "Unique targets : %12d\n", total_targets; printf "Passed requests : %12d\n", passed; for (m in m_pass) printf " %-22s : %12d\n", m, m_pass[m] >> tmpfile close(tmpfile); sorted_output(tmpfile,2,0,0); rmfile(tmpfile); printf "Blocked requests : %12d\n", denied; for (m in m_block) printf " %-22s : %12d\n", m, m_block[m] >> tmpfile close(tmpfile); sorted_output(tmpfile,2,0,0); rmfile(tmpfile); draw_line(41); printf "\nVolume totals\n"; draw_line(28); printf "Clients <-- %10.1f MB\n",total_to_client_bytes/MEG; printf "Clients --> %10.1f MB\n",total_from_client_bytes/MEG; printf "Targets <-- %10.1f MB\n",total_to_target_bytes/MEG; printf "Targets --> %10.1f MB\n",total_from_target_bytes/MEG; draw_line(28); # # TCP/UDP port stats # printf "\nPort Service "; printf "To From Total Requests\n"; draw_line(77); for (p in tcp_port) { printf "%-6s ",p >> tmpfile; get_service(p"/tcp"); outline="("curr_service"/tcp)"; printf "%-23s",outline >>tmpfile; printf "%8.1f MB %8.1f MB %8.1f MB %8d\n", tcp_port_to[p]/MEG, tcp_port_from[p]/MEG, (tcp_port_from[p]+tcp_port_to[p])/MEG, tcp_port_used[p] >> tmpfile; } for (p in udp_port) { printf "%-6s ",p >> tmpfile; get_service(p"/udp"); outline="("curr_service"/udp)"; printf "%-23s",outline >>tmpfile; printf "%8.1f MB %8.1f MB %8.1f MB %8d\n", udp_port_to[p]/MEG, udp_port_from[p]/MEG, (udp_port_from[p]+udp_port_to[p])/MEG, udp_port_used[p] >> tmpfile; } close(tmpfile); sorted_output(tmpfile,6,SHOW_PORTS,0); rmfile(tmpfile); draw_line(77); # # Client stats # print "\nClient IP To From Total FQDN"; draw_line(77); for (c in client) { printf "%-16s %8.1f MB %8.1f MB %8.1f MB \n", c, to_client[c]/MEG, from_client[c]/MEG, (from_client[c]+to_client[c])/MEG >> tmpfile; } close(tmpfile); sorted_output(tmpfile,5,SHOW_CLIENTS,LOOKUP_IPS); rmfile(tmpfile); draw_line(77); # # Destination stats # print "\nDestination IP To From Total FQDN"; draw_line(77); for (t in target) { printf "%-16s %8.1f MB %8.1f MB %8.1f MB \n", t, to_target[t]/MEG, from_target[t]/MEG, (from_target[t]+to_target[t])/MEG >> tmpfile; } close(tmpfile); sorted_output(tmpfile,5,SHOW_DESTINATIONS,LOOKUP_IPS); rmfile(tmpfile); draw_line(77); printf "\n"; } dante-1.1.19.dfsg/depcomp0000755000175000017500000002752507405634012013667 0ustar roamroam#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; tru64) # The Tru64 AIX compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. tmpdepfile1="$object.d" tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'` if test "$libtool" = yes; then "$@" -Wc,-MD else "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. test -z "$dashmflag" && dashmflag=-M ( IFS=" " case " $* " in *" --mode=compile "*) # this is libtool, let us make it quiet for arg do # cycle over the arguments case "$arg" in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) # X makedepend ( shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift;; -*) ;; *) set fnord "$@" "$arg"; shift;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tail +3 "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 dante-1.1.19.dfsg/SPECS/0000755000175000017500000000000011037370225013153 5ustar roamroamdante-1.1.19.dfsg/SPECS/Makefile.am0000644000175000017500000000012406677715016015223 0ustar roamroam#includes dante.spec which is generated when configure is run EXTRA_DIST=dante.spec dante-1.1.19.dfsg/SPECS/Makefile.in0000644000175000017500000002270110362704161015222 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = SPECS DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/dante.spec.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = dante.spec SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ #includes dante.spec which is generated when configure is run EXTRA_DIST = dante.spec 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu SPECS/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu SPECS/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 dante.spec: $(top_builddir)/config.status $(srcdir)/dante.spec.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-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: dante-1.1.19.dfsg/SPECS/dante.spec0000644000175000017500000001074710364161207015133 0ustar roamroamSummary: A free Socks v4/v5 client implementation Name: dante %define version 1.1.19 %define prefix /usr Version: %{version} Release: 1 Copyright: BSD-type Group: Networking/Utilities URL: http://www.inet.no/dante/ Vendor: Inferno Nettverk A/S Source: ftp://ftp.inet.no/pub/socks/dante-%{version}.tar.gz Buildroot: %{_tmppath}/dante-root %if %{?rh62:1}%{!?rh62:0} BuildRequires: pam %else BuildRequires: pam-devel %endif %description Dante is a free implementation of the proxy protocols socks version 4, socks version 5 (rfc1928) and msproxy. It can be used as a firewall between networks. It is being developed by Inferno Nettverk A/S, a Norwegian consulting company. Commercial support is available. This package contains the dynamic libraries required to "socksify" existing applications to become socks clients. %package server Summary: A free Socks v4/v5 server implementation Group: Networking/Daemons Requires: dante %description server This package contains the socks proxy daemon and its documentation. The sockd is the server part of the Dante socks proxy package and allows socks clients to connect through it to the network. %package devel Summary: development libraries for socks Group: Development/Libraries Requires: dante %description devel Additional libraries required to compile programs that use socks. %prep %setup # This file is embedded here instead of being another source in order # to the prefix directory cat >sockd.init < -Integrated changes from spec file by , located at . * Thu Oct 12 2000 Karl-Andre' Skevik -use of macros for directory locations/paths -explicitly name documentation files -run chkconfig --del before files are deleted on uninstall * Wed Mar 10 1999 Karl-Andre' Skevik - Integrated into CVS - socksify patch no longer needed * Thu Mar 04 1999 Oren Tirosh - configurable %{prefix}, fixed daemon init script - added /lib/libdl.so to socksify * Wed Mar 03 1999 Oren Tirosh - First spec file for Dante dante-1.1.19.dfsg/SPECS/dante.spec.in0000644000175000017500000001075210173134707015537 0ustar roamroamSummary: A free Socks v4/v5 client implementation Name: dante %define version @VERSION@ %define prefix /usr Version: %{version} Release: 1 Copyright: BSD-type Group: Networking/Utilities URL: http://www.inet.no/dante/ Vendor: Inferno Nettverk A/S Source: ftp://ftp.inet.no/pub/socks/dante-%{version}.tar.gz Buildroot: %{_tmppath}/dante-root %if %{?rh62:1}%{!?rh62:0} BuildRequires: pam %else BuildRequires: pam-devel %endif %description Dante is a free implementation of the proxy protocols socks version 4, socks version 5 (rfc1928) and msproxy. It can be used as a firewall between networks. It is being developed by Inferno Nettverk A/S, a Norwegian consulting company. Commercial support is available. This package contains the dynamic libraries required to "socksify" existing applications to become socks clients. %package server Summary: A free Socks v4/v5 server implementation Group: Networking/Daemons Requires: dante %description server This package contains the socks proxy daemon and its documentation. The sockd is the server part of the Dante socks proxy package and allows socks clients to connect through it to the network. %package devel Summary: development libraries for socks Group: Development/Libraries Requires: dante %description devel Additional libraries required to compile programs that use socks. %prep %setup # This file is embedded here instead of being another source in order # to the prefix directory cat >sockd.init < -Integrated changes from spec file by , located at . * Thu Oct 12 2000 Karl-Andre' Skevik -use of macros for directory locations/paths -explicitly name documentation files -run chkconfig --del before files are deleted on uninstall * Wed Mar 10 1999 Karl-Andre' Skevik - Integrated into CVS - socksify patch no longer needed * Thu Mar 04 1999 Oren Tirosh - configurable %{prefix}, fixed daemon init script - added /lib/libdl.so to socksify * Wed Mar 03 1999 Oren Tirosh - First spec file for Dante dante-1.1.19.dfsg/README.latest0000644000175000017500000000000010173133032014430 0ustar roamroamdante-1.1.19.dfsg/LICENSE0000644000175000017500000000403310360254237013305 0ustar roamroam/* * $Id: LICENSE,v 1.18 2006/01/08 18:23:27 karls Exp $ * * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ dante-1.1.19.dfsg/aclocal.m40000644000175000017500000077713210362703722014161 0ustar roamroam# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 48 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_LINKER_BOILERPLATE # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix3*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_MSG_RESULT([$SED]) ]) # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # 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 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # 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 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_PROG_LEX # ----------- # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a # "missing" invocation, for better error output. AC_DEFUN([AM_PROG_LEX], [AC_PREREQ(2.50)dnl AC_REQUIRE([AM_MISSING_HAS_RUN])dnl AC_REQUIRE([AC_PROG_LEX])dnl if test "$LEX" = :; then LEX=${am_missing_run}flex fi]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acinclude.m4]) dante-1.1.19.dfsg/sockd/0000755000175000017500000000000011037370225013401 5ustar roamroamdante-1.1.19.dfsg/sockd/sockd_child.c0000644000175000017500000006003610354742710016023 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: sockd_child.c,v 1.146 2005/12/25 17:22:17 michaels Exp $"; #define MOTHER 0 /* descriptor mother reads/writes on. */ #define CHILD 1 /* descriptor child reads/writes on. */ __BEGIN_DECLS static int setchildtype __P((int type, struct sockd_child_t ***childv, int **childc, void (**function)(struct sockd_mother_t *mother))); /* * Sets "childv", "childc" and "function" to the correct value depending * on "type". */ static int findchild __P((pid_t pid, int childc, const struct sockd_child_t *childv)); /* * Finds the child with pid "pid" in the array "childv". Searching * Elements in "childv" is given by "childc". * Returns: * On success: the index of the child in "childv". * On failure: -1. */ __END_DECLS static struct sockd_child_t *iochildv; /* all our iochildren */ static int iochildc; static struct sockd_child_t *negchildv; /* all our negotiatorchildren */ static int negchildc; static struct sockd_child_t *reqchildv; /* all our requestchildren */ static int reqchildc; struct sockd_child_t * addchild(type) int type; { const char *function = "addchild()"; /* * It is better to reserve some descriptors for temporary use * than to get errors when passing them and thus lose clients. */ const int reserved = FDPASS_MAX /* max descriptors we pass. */ + 1 /* need a descriptor for accept(). */ + 2; /* for each new child. */ struct sockd_mother_t mother; struct sockd_child_t **childv; int *childc; void (*childfunction)(struct sockd_mother_t *mother); pid_t pid; const pid_t ourpid = sockscf.state.pid; int optval, flags; int pipev[] = { -1, -1 }; int ackpipev[] = { -1, -1 }; /* * XXX This is a expensive test which shouldn't be hard to optimize * away. It only happens when we are running low on slots though, * so assume it's "good enough" until I get the time to fix it. */ if (freedescriptors(NULL) < reserved) { errno = EMFILE; swarn(function); return NULL; } /* create datapipe. */ if (socketpair(AF_LOCAL, SOCK_STREAM, 0, pipev) != 0) { swarn("%s: socketpair(AF_LOCAL, SOCK_STREAM)", function); return NULL; } /* and ackpipe. */ if (pipe(ackpipev) != 0) { swarn("%s: pipe()", function); closev(pipev, ELEMENTS(pipev)); return NULL; } /* * Try to set socketbuffer and watermarks to a optimal size. */ switch (type = setchildtype(type, &childv, &childc, &childfunction)) { case CHILD_NEGOTIATE: /* * A negotiator child receives only descriptors, so mothers * send buffer can be small, and so can the child's receive buffer. * The child sends a sockd_request_t struct back to mother, so * mothers recv buffer has to be considerably bigger, as does * childs send buffer. */ /* negotiator shouldn't block on sending to mother. */ if ((flags = fcntl(pipev[CHILD], F_GETFL, 0)) == -1 || fcntl(pipev[CHILD], F_SETFL, flags | O_NONBLOCK) == -1) swarn("%s: fcntl()", function); #if HAVE_SENDMSG_DEADLOCK if ((mother.lock = socks_mklock(SOCKS_LOCKFILE)) == -1) { swarn("%s: socks_mklock()", function); closev(pipev, ELEMENTS(pipev)); closev(ackpipev, ELEMENTS(ackpipev)); return NULL; } #endif /* HAVE_SENDMSG_DEADLOCK */ optval = sizeof(struct sockd_request_t) * (SOCKD_NEGOTIATEMAX + 1); if (setsockopt(pipev[MOTHER], SOL_SOCKET, SO_RCVBUF, &optval, sizeof(optval)) != 0 || setsockopt(pipev[CHILD], SOL_SOCKET, SO_SNDBUF, &optval, sizeof(optval)) != 0) swarn("%s: setsockopt(SO_RCVBUF/SO_SNDBUF)", function); #if HAVE_SO_SNDLOWAT optval = sizeof(struct sockd_request_t) * LOWATSKEW; if (setsockopt(pipev[CHILD], SOL_SOCKET, SO_SNDLOWAT, &optval, sizeof(optval)) != 0 || setsockopt(pipev[MOTHER], SOL_SOCKET, SO_RCVLOWAT, &optval, sizeof(optval)) != 0) swarn("%s: setsockopt(SO_SNDLOWAT/SO_RCVLOWAT)", function); #endif break; case CHILD_REQUEST: /* * A request child receives a sockd_request_t structure, * it sends back a sockd_io_t structure. */ #if HAVE_SENDMSG_DEADLOCK mother.lock = -1; /* doesn't need lock. */ #endif /* HAVE_SENDMSG_DEADLOCK */ optval = sizeof(struct sockd_request_t) * (SOCKD_REQUESTMAX + 1); if (setsockopt(pipev[MOTHER], SOL_SOCKET, SO_SNDBUF, &optval, sizeof(optval)) != 0 || setsockopt(pipev[CHILD], SOL_SOCKET, SO_RCVBUF, &optval, sizeof(optval)) != 0) swarn("%s: setsockopt()", function); optval = sizeof(struct sockd_io_t) * (SOCKD_REQUESTMAX + 1); if (setsockopt(pipev[MOTHER], SOL_SOCKET, SO_RCVBUF, &optval, sizeof(optval)) != 0 || setsockopt(pipev[CHILD], SOL_SOCKET, SO_SNDBUF, &optval, sizeof(optval)) != 0) swarn("%s: setsockopt()", function); #if HAVE_SO_SNDLOWAT optval = sizeof(struct sockd_request_t) * LOWATSKEW; if (setsockopt(pipev[CHILD], SOL_SOCKET, SO_RCVLOWAT, &optval, sizeof(optval)) != 0 || setsockopt(pipev[MOTHER], SOL_SOCKET, SO_SNDLOWAT, &optval, sizeof(optval)) != 0) swarn("%s: setsockopt(SO_RCVLOWAT)", function); optval = sizeof(struct sockd_io_t) * LOWATSKEW; if (setsockopt(pipev[CHILD], SOL_SOCKET, SO_SNDLOWAT, &optval, sizeof(optval)) != 0 || setsockopt(pipev[MOTHER], SOL_SOCKET, SO_RCVLOWAT, &optval, sizeof(optval)) != 0) swarn("%s: setsockopt(SO_RCVLOWAT/SO_SNDLOWAT)", function); #endif break; case CHILD_IO: /* * A io child receives a sockd_io_t structure, * it sends back only a ack. */ #if HAVE_SENDMSG_DEADLOCK mother.lock = -1; /* doesn't need lock. */ #endif /* HAVE_SENDMSG_DEADLOCK */ optval = sizeof(struct sockd_io_t) * (SOCKD_IOMAX + 1); if (setsockopt(pipev[MOTHER], SOL_SOCKET, SO_SNDBUF, &optval, sizeof(optval)) != 0 || setsockopt(pipev[CHILD], SOL_SOCKET, SO_RCVBUF, &optval, sizeof(optval)) != 0) swarn("%s: setsockopt(SO_SNDBUF/SO_RCVBUF)", function); optval = sizeof(int) * (SOCKD_IOMAX + 1); if (setsockopt(pipev[MOTHER], SOL_SOCKET, SO_RCVBUF, &optval, sizeof(optval)) != 0 || setsockopt(pipev[CHILD], SOL_SOCKET, SO_SNDBUF, &optval, sizeof(optval)) != 0) swarn("%s: setsockopt(SO_RCVBUF/SO_SNDBUF)", function); #if HAVE_SO_SNDLOWAT optval = sizeof(struct sockd_io_t) * LOWATSKEW; if (setsockopt(pipev[CHILD], SOL_SOCKET, SO_RCVLOWAT, &optval, sizeof(optval)) != 0 || setsockopt(pipev[MOTHER], SOL_SOCKET, SO_SNDLOWAT, &optval, sizeof(optval)) != 0) swarn("%s: setsockopt(SO_RCVLOWAT)", function); #endif break; default: SERRX(type); } /* so slog() doesn't log wrong pid if we termintate here. */ sockscf.state.pid = 0; switch ((pid = fork())) { case -1: sockscf.state.pid = ourpid; swarn("%s: fork()", function); closev(pipev, ELEMENTS(pipev)); closev(ackpipev, ELEMENTS(ackpipev)); #if HAVE_SENDMSG_DEADLOCK if (mother.lock != -1) close(mother.lock); #endif /* HAVE_SENDMSG_DEADLOCK */ return NULL; case 0: { size_t i, maxfd; struct sigaction sigact; newprocinit(); sockscf.state.type = type; slog(LOG_INFO, "created new %schild", childtype2string(type)); #if 0 slog(LOG_DEBUG, "sleeping..."); sleep(20); #endif mother.s = pipev[CHILD]; mother.ack = ackpipev[CHILD]; /* * It would be nice to be able to lose all privileges here * but unfortunately we can't, yet. * * negotiation children: * could need privileges to check password. * * request children: * could need privileges to bind port. * * io children: * could need privileges to bind port if using redirect() * module, also SIGHUP performs misc. seteuid() tests that * could fail if we lose privileges. */ switch (type) { case CHILD_NEGOTIATE: #if HAVE_LIBWRAP #if SOCKD_NEGOTIATEMAX > 1 resident = 1; #endif /* SOCKD_NEGOTIATEMAX > 1 */ #endif /* HAVE_LIBWRAP */ break; case CHILD_REQUEST: #if HAVE_LIBWRAP #if SOCKD_REQUESTMAX > 1 resident = 1; #endif /* SOCKD_REQUESTMAX > 1 */ #endif /* HAVE_LIBWRAP */ break; case CHILD_IO: #if HAVE_LIBWRAP #if SOCKD_IOMAX > 1 resident = 1; #endif /* SOCKD_IOMAX > 1 */ #endif /* HAVE_LIBWRAP */ break; default: SERRX(type); } sigemptyset(&sigact.sa_mask); sigact.sa_flags = 0; /* signals mother has set up but which we ignore at this point. */ sigact.sa_handler = SIG_IGN; #if HAVE_SIGNAL_SIGINFO if (sigaction(SIGINFO, &sigact, NULL) != 0) swarn("%s: sigaction(SIGINFO)", function); #endif /* HAVE_SIGNAL_SIGINFO */ if (sigaction(SIGUSR1, &sigact, NULL) != 0) swarn("%s: sigaction(USR1)", function); /* delete everything we got from parent. */ for (i = 0, maxfd = getdtablesize(); i < maxfd; ++i) { /* exceptions */ if (i == (size_t)mother.s #if HAVE_SENDMSG_DEADLOCK || i == (size_t)mother.lock #endif /* HAVE_SENDMSG_DEADLOCK */ || i == (size_t)mother.ack) continue; if (descriptorisreserved((int)i)) continue; close((int)i); } errno = 0; newprocinit(); /* called after closing, since it may open it's own. */ childfunction(&mother); /* NOTREACHED */ } default: { struct sockd_child_t *newchildv; sockscf.state.pid = ourpid; if ((newchildv = (struct sockd_child_t *)realloc(*childv, sizeof(**childv) * (*childc + 1))) == NULL) { slog(LOG_WARNING, "%s: %s", function, NOMEM); closev(pipev, ELEMENTS(pipev)); closev(ackpipev, ELEMENTS(ackpipev)); return NULL; } *childv = newchildv; (*childv)[*childc].type = type; (*childv)[*childc].pid = pid; (*childv)[*childc].s = pipev[MOTHER]; #if HAVE_SENDMSG_DEADLOCK (*childv)[*childc].lock = mother.lock; #endif /* HAVE_SENDMSG_DEADLOCK */ (*childv)[*childc].ack = ackpipev[MOTHER]; close(pipev[CHILD]); close(ackpipev[CHILD]); switch ((*childv)[*childc].type) { case CHILD_NEGOTIATE: (*childv)[*childc].freec = SOCKD_NEGOTIATEMAX; break; case CHILD_REQUEST: (*childv)[*childc].freec = SOCKD_REQUESTMAX; break; case CHILD_IO: (*childv)[*childc].freec = SOCKD_IOMAX; break; default: SERRX((*childv)[*childc].type); } return &(*childv)[(*childc)++]; } } } int childcheck(type) int type; { int child, proxyc; int min, max, idle; struct sockd_child_t **childv; int *childc; switch (type) { case -CHILD_NEGOTIATE: case CHILD_NEGOTIATE: childc = &negchildc; childv = &negchildv; min = SOCKD_FREESLOTS; max = SOCKD_NEGOTIATEMAX; break; case -CHILD_REQUEST: case CHILD_REQUEST: childc = &reqchildc; childv = &reqchildv; min = SOCKD_FREESLOTS; max = SOCKD_REQUESTMAX; break; case -CHILD_IO: case CHILD_IO: childc = &iochildc; childv = &iochildv; /* attempt to keep in a state where we can accept all requests. */ min = MAX(SOCKD_FREESLOTS, childcheck(-CHILD_REQUEST)); max = SOCKD_IOMAX; break; default: SERRX(type); } /* * get a estimate over how many (new) clients our children are able to * accept in total. */ for (child = idle = proxyc = 0; child < *childc; ++child) { SASSERTX((*childv)[child].freec <= max); proxyc += type < 0 ? max : (*childv)[child].freec; if ((*childv)[child].freec == max) { ++idle; if (sockscf.child.maxidle > 0 && idle > sockscf.child.maxidle) { /* will remove this next, no longer part of free slots pool. */ proxyc -= type < 0 ? max : (*childv)[child].freec; removechild((*childv)[child].pid); --idle; --child; /* everything was shifted once to the left. */ } } } if (type >= 0) if (proxyc < min && sockscf.child.addchild) if (addchild(type) != NULL) return childcheck(type); else sockscf.child.addchild = 0; /* don't retry until a child dies. */ return proxyc; } int fillset(set) fd_set *set; { const char *function = "fillset()"; int negc, reqc, ioc; int i, dbits; /* * There is no point in setting data descriptor of child N unless * child N+1 is able to accept the data from child N. So find * out if we have slots of the various types available . */ ioc = childcheck(CHILD_IO); reqc = childcheck(CHILD_REQUEST); negc = childcheck(CHILD_NEGOTIATE); FD_ZERO(set); dbits = -1; /* new clients we accept. */ if (negc > 0) for (i = 0; i < sockscf.internalc; ++i) { SASSERTX(sockscf.internalv[i].s >= 0); FD_SET(sockscf.internalv[i].s, set); dbits = MAX(dbits, sockscf.internalv[i].s); } else swarn("can't accept new clients, no free negotiate slots"); /* negotiator children. */ for (i = 0; i < negchildc; ++i) { if (reqc > 0) { SASSERTX(negchildv[i].s >= 0); FD_SET(negchildv[i].s, set); dbits = MAX(dbits, negchildv[i].s); } /* we can always accept an ack ofcourse. */ SASSERTX(negchildv[i].ack >= 0); FD_SET(negchildv[i].ack, set); dbits = MAX(dbits, negchildv[i].ack); } /* request children. */ for (i = 0; i < reqchildc; ++i) { if (ioc > 0) { SASSERTX(reqchildv[i].s >= 0); FD_SET(reqchildv[i].s, set); dbits = MAX(dbits, reqchildv[i].s); } /* we can always accept an ack ofcourse. */ SASSERTX(reqchildv[i].ack >= 0); FD_SET(reqchildv[i].ack, set); dbits = MAX(dbits, reqchildv[i].ack); } /* io children, last in chain. */ for (i = 0; i < iochildc; ++i) { SASSERTX(iochildv[i].s >= 0); FD_SET(iochildv[i].s, set); dbits = MAX(dbits, iochildv[i].s); SASSERTX(iochildv[i].ack >= 0); FD_SET(iochildv[i].ack, set); dbits = MAX(dbits, iochildv[i].ack); } return dbits; } void clearset(type, child, set) int type; const struct sockd_child_t *child; fd_set *set; { switch (type) { case SOCKD_FREESLOT: FD_CLR(child->ack, set); break; case SOCKD_NEWREQUEST: FD_CLR(child->s, set); break; default: SERRX(type); } } struct sockd_child_t * getset(type, set) int type; fd_set *set; { int i; /* check negotiator children for match. */ for (i = 0; i < negchildc; ++i) switch (type) { case SOCKD_NEWREQUEST: if (FD_ISSET(negchildv[i].s, set)) return &negchildv[i]; break; case SOCKD_FREESLOT: if (FD_ISSET(negchildv[i].ack, set)) return &negchildv[i]; break; } /* check request children for match. */ for (i = 0; i < reqchildc; ++i) switch (type) { case SOCKD_NEWREQUEST: if (FD_ISSET(reqchildv[i].s, set)) return &reqchildv[i]; break; case SOCKD_FREESLOT: if (FD_ISSET(reqchildv[i].ack, set)) return &reqchildv[i]; break; } /* check io children for match. */ for (i = 0; i < iochildc; ++i) switch (type) { case SOCKD_NEWREQUEST: if (FD_ISSET(iochildv[i].s, set)) return &iochildv[i]; break; case SOCKD_FREESLOT: if (FD_ISSET(iochildv[i].ack, set)) return &iochildv[i]; break; } return NULL; } int removechild(pid) pid_t pid; { const char *function = "removechild()"; struct sockd_child_t **childv; struct sockd_child_t *newchildv; int *childc; int child; slog(LOG_DEBUG, "%s: %d", function, (int)pid); setchildtype(childtype(pid), &childv, &childc, NULL); child = findchild(pid, *childc, *childv); SASSERTX(child >= 0); close((*childv)[child].s); close((*childv)[child].ack); /* shift all following one down */ while (child < *childc - 1) { (*childv)[child] = (*childv)[child + 1]; ++child; } --*childc; if ((newchildv = (struct sockd_child_t *)realloc(*childv, sizeof(**childv) * (*childc + 1))) == NULL) { slog(LOG_WARNING, NOMEM); return -1; } *childv = newchildv; return 0; } struct sockd_child_t * nextchild(type) int type; { const char *function = "nextchild()"; struct timeval timeout; struct sockd_child_t **childv; int *childc; int i, maxd; fd_set wset; setchildtype(type, &childv, &childc, NULL); FD_ZERO(&wset); for (i = 0, maxd = -1; i < *childc; ++i) if ((*childv)[i].freec > 0) { FD_SET((*childv)[i].s, &wset); maxd = MAX(maxd, (*childv)[i].s); } if (maxd < 0) return NULL; ++maxd; timeout.tv_sec = 0; timeout.tv_usec = 0; switch (selectn(maxd, NULL, &wset, NULL, &timeout)) { case -1: SERR(-1); /* NOTREACHED */ case 0: slog(LOG_DEBUG, "%s: no child writable", function); return NULL; } return getset(SOCKD_NEWREQUEST, &wset); } static int setchildtype(type, childv, childc, function) int type; struct sockd_child_t ***childv; int **childc; void (**function)(struct sockd_mother_t *mother); { switch (type) { case CHILD_IO: if (childv != NULL) *childv = &iochildv; if (childc != NULL) *childc = &iochildc; if (function != NULL) *function = &run_io; break; case CHILD_NEGOTIATE: if (childv != NULL) *childv = &negchildv; if (childc != NULL) *childc = &negchildc; if (function != NULL) *function = &run_negotiate; break; case CHILD_REQUEST: if (childv != NULL) *childv = &reqchildv; if (childc != NULL) *childc = &reqchildc; if (function != NULL) *function = &run_request; break; default: SASSERTX(type); } return type; } int childtype(pid) pid_t pid; { if (findchild(pid, iochildc, iochildv) != -1) return CHILD_IO; if (findchild(pid, negchildc, negchildv) != -1) return CHILD_NEGOTIATE; if (findchild(pid, reqchildc, reqchildv) != -1) return CHILD_REQUEST; if (pidismother(pid)) return CHILD_MOTHER; SERRX(pid); /* NOTREACHED */ } static int findchild(pid, childc, childv) pid_t pid; int childc; const struct sockd_child_t *childv; { int i; for (i = 0; i < childc; ++i) if (childv[i].pid == pid) return i; return -1; } struct sockd_child_t * getchild(pid) pid_t pid; { int child, type; int *childc; struct sockd_child_t **childv; switch (type = childtype(pid)) { case CHILD_IO: case CHILD_NEGOTIATE: case CHILD_REQUEST: break; case CHILD_MOTHER: return NULL; default: SERRX(type); } setchildtype(type, &childv, &childc, NULL); if ((child = findchild(pid, *childc, *childv)) != -1) return &(*childv)[child]; return NULL; } int send_io(s, io) int s; const struct sockd_io_t *io; { const char *function = "send_io()"; struct iovec iovec[1]; struct msghdr msg; int w, fdsent, length; CMSG_AALLOC(cmsg, sizeof(int) * FDPASS_MAX); length = 0; /* LINTED operands have incompatible pointer types */ iovec[0].iov_base = (void *)io; iovec[0].iov_len = sizeof(*io); length += iovec[0].iov_len; fdsent = 0; CMSG_ADDOBJECT(io->src.s, cmsg, sizeof(io->src.s) * fdsent++); CMSG_ADDOBJECT(io->dst.s, cmsg, sizeof(io->dst.s) * fdsent++); switch (io->state.command) { case SOCKS_BIND: case SOCKS_BINDREPLY: if (!io->state.extension.bind) break; /* else: */ /* FALLTHROUGH */ case SOCKS_UDPASSOCIATE: CMSG_ADDOBJECT(io->control.s, cmsg, sizeof(io->control.s) * fdsent++); break; case SOCKS_CONNECT: break; default: SERRX(io->state.command); } msg.msg_iov = iovec; msg.msg_iovlen = ELEMENTS(iovec); msg.msg_name = NULL; msg.msg_namelen = 0; CMSG_SETHDR_SEND(msg, cmsg, sizeof(int) * fdsent); if ((w = sendmsg(s, &msg, 0)) != length) { swarn("%s: sendmsg(): %d of %d", function, w, length); return -1; } #if HARDCORE_DEBUG printfd(io, "sent"); #endif return 0; } int send_client(s, client) int s; int client; { const char *function = "send_client()"; const char command = SOCKD_NEWREQUEST; struct iovec iovec[1]; struct msghdr msg; CMSG_AALLOC(cmsg, sizeof(int)); int fdsent; /* LINTED operands have incompatible pointer types */ iovec[0].iov_base = (void *)&command; iovec[0].iov_len = sizeof(command); fdsent = 0; CMSG_ADDOBJECT(client, cmsg, sizeof(client) * fdsent++); msg.msg_iov = iovec; msg.msg_iovlen = ELEMENTS(iovec); msg.msg_name = NULL; msg.msg_namelen = 0; CMSG_SETHDR_SEND(msg, cmsg, sizeof(int) * fdsent); if (sendmsg(s, &msg, 0) != sizeof(command)) { swarn("%s: sendmsg()", function); return -1; } return 0; } int send_req(s, req) int s; const struct sockd_request_t *req; { const char *function = "send_req()"; struct iovec iovec[1]; struct msghdr msg; int fdsent; CMSG_AALLOC(cmsg, sizeof(int)); /* LINTED operands have incompatible pointer types */ iovec[0].iov_base = (void *)req; iovec[0].iov_len = sizeof(*req); fdsent = 0; CMSG_ADDOBJECT(req->s, cmsg, sizeof(req->s) * fdsent++); msg.msg_iov = iovec; msg.msg_iovlen = ELEMENTS(iovec); msg.msg_name = NULL; msg.msg_namelen = 0; CMSG_SETHDR_SEND(msg, cmsg, sizeof(int) * fdsent); if (sendmsg(s, &msg, 0) != sizeof(*req)) { swarn("%s: sendmsg()", function); return -1; } return 0; } void sigchildbroadcast(sig, childtype) int sig; int childtype; { int i; if (childtype & CHILD_NEGOTIATE) for (i = 0; i < negchildc; ++i) kill(negchildv[i].pid, sig); if (childtype & CHILD_REQUEST) for (i = 0; i < reqchildc; ++i) kill(reqchildv[i].pid, sig); if (childtype & CHILD_IO) for (i = 0; i < iochildc; ++i) kill(iochildv[i].pid, sig); } #if DEBUG void printfd(io, prefix) const struct sockd_io_t *io; const char *prefix; { const char *function = "printfd()"; struct sockaddr name; socklen_t namelen; char namestring[MAXSOCKADDRSTRING]; bzero(&name, sizeof(name)); namelen = sizeof(name); /* LINTED pointer casts may be troublesome */ if (getsockname(io->src.s, &name, &namelen) != 0) swarn("%s: getsockname(io->src)", function); else slog(LOG_DEBUG, "%s: io->src (%d), name: %s", prefix, io->src.s, sockaddr2string(&name, namestring, sizeof(namestring))); bzero(&name, sizeof(name)); namelen = sizeof(name); /* LINTED pointer casts may be troublesome */ if (getsockname(io->dst.s, &name, &namelen) != 0) swarn("%s: getsockname(io->dst)", function); else slog(LOG_DEBUG, "%s: io->dst (%d), name: %s", prefix, io->dst.s, sockaddr2string(&name, namestring, sizeof(namestring))); switch (io->state.command) { case SOCKS_BIND: case SOCKS_BINDREPLY: if (!io->state.extension.bind) break; /* else: */ /* FALLTHROUGH */ case SOCKS_UDPASSOCIATE: bzero(&name, sizeof(name)); namelen = sizeof(name); /* LINTED pointer casts may be troublesome */ if (getpeername(io->control.s, &name, &namelen) != 0) swarn("%s: getpeername(io->control)", function); else { if (namelen == 0) slog(LOG_DEBUG, "%s: io->control (%d), name: ", prefix, io->control.s); else slog(LOG_DEBUG, "%s: io->control (%d), name: %s", prefix, io->control.s, sockaddr2string(&name, namestring, sizeof(namestring))); } break; case SOCKS_CONNECT: break; default: SERRX(io->state.command); } } #endif dante-1.1.19.dfsg/sockd/bandwidth_key.c0000644000175000017500000000057007700305361016364 0ustar roamroam/* * $Id: bandwidth_key.c,v 1.3 2003/07/01 13:21:53 michaels Exp $ * * Copyright (c) 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. */ #include "common.h" static const char rcsid[] = "$Id: bandwidth_key.c,v 1.3 2003/07/01 13:21:53 michaels Exp $"; const char *module_bandwidth_ipaddrv[] = { NULL }; const int module_bandwidth_ipaddrc = 0; dante-1.1.19.dfsg/sockd/serverconfig.c0000644000175000017500000010764310333437512016255 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" #include "config_parse.h" static const char rcsid[] = "$Id: serverconfig.c,v 1.205 2005/11/01 16:40:10 michaels Exp $"; __BEGIN_DECLS static void showuser __P((const struct linkedname_t *user)); /* * shows usernames in "user". */ static void showlog __P((const struct log_t *log)); /* * shows what type of logging is specified in "log". */ #if HAVE_LIBWRAP extern jmp_buf tcpd_buf; static void libwrapinit __P((int s, struct request_info *request)); /* * Initializes "request" for later usage via libwrap. */ static int connectisok __P((struct request_info *request, const struct rule_t *rule)); #else /* !HAVE_LIBWRAP */ static int connectisok __P((void *request, const struct rule_t *rule)); #endif /* !HAVE_LIBWRAP */ /* * Checks the connection on "s". * "rule" is the rule that matched the connection. * This function should be called after each rulecheck for a new * connection/packet. * * Returns: * If connection is acceptable: true * If connection is not acceptable: false */ static struct rule_t * addrule __P((const struct rule_t *newrule, struct rule_t **rulebase, int client)); /* * Appends a copy of "newrule" to "rulebase". * If "client" is true, "newrule" is a clientrule. * Returns a pointer to the added rule (not "newrule"). */ static void checkrule __P((const struct rule_t *rule)); /* * Check that the rule "rule" makes sense. */ __END_DECLS struct config_t sockscf; const int socks_configtype = CONFIGTYPE_SERVER; #if HAVE_LIBWRAP int allow_severity, deny_severity; #endif /* HAVE_LIBWRAP */ /* expand array by one, increment argc. */ #define NEWINTERNAL_EXTERNAL(argc, argv) \ do { \ if ((argv = realloc(argv, sizeof(*argv) * ++argc)) == NULL) \ yyerror(NOMEM); \ bzero(&argv[argc - 1], sizeof(*argv)); \ } while (lintnoloop_common_h) void addinternal(addr) const struct ruleaddress_t *addr; { if (sockscf.state.init) { #if 0 /* XXX don't know how to do this now, seems like too much work. */ int i; for (i = 0; i < sockscf.internalc; ++i) if (memcmp(&sockscf.internalv[i], addr, sizeof(addr)) == 0) break; if (i == sockscf.internalc) swarnx("can't change internal addresses once running"); #endif } else switch (addr->atype) { case SOCKS_ADDR_IPV4: { struct sockshost_t host; NEWINTERNAL_EXTERNAL(sockscf.internalc, sockscf.internalv); sockshost2sockaddr(ruleaddress2sockshost(addr, &host, SOCKS_TCP), &sockscf.internalv[sockscf.internalc - 1].addr); break; } case SOCKS_ADDR_DOMAIN: { struct sockaddr sa; int i; i = 0; while (hostname2sockaddr(addr->addr.domain, i, &sa) != NULL) { NEWINTERNAL_EXTERNAL(sockscf.internalc, sockscf.internalv); /* LINTED pointer casts may be troublesome */ TOIN(&sa)->sin_port = addr->port.tcp; sockscf.internalv[sockscf.internalc - 1].addr = sa; ++i; } if (i == 0) yyerror("could not resolve name %s: %s", addr->addr.domain, hstrerror(h_errno)); break; } case SOCKS_ADDR_IFNAME: { struct ifaddrs ifa, *ifap = &ifa, *iface; int m; if (getifaddrs(&ifap) != 0) serr(EXIT_FAILURE, "getifaddrs()"); for (m = 0, iface = ifap; iface != NULL; iface = iface->ifa_next) if (strcmp(iface->ifa_name, addr->addr.ifname) == 0 && iface->ifa_addr != NULL && iface->ifa_addr->sa_family == AF_INET) { NEWINTERNAL_EXTERNAL(sockscf.internalc, sockscf.internalv); /* LINTED pointer casts may be troublesome */ TOIN(iface->ifa_addr)->sin_port = addr->port.tcp; sockscf.internalv[sockscf.internalc - 1].addr = *iface->ifa_addr; m = 1; } freeifaddrs(ifap); if (!m) yyerror("can't find interface/address: %s", addr->addr.ifname); break; } default: SERRX(addr->atype); } } void addexternal(addr) const struct ruleaddress_t *addr; { switch (addr->atype) { case SOCKS_ADDR_DOMAIN: { struct sockaddr sa; int i; i = 0; while (hostname2sockaddr(addr->addr.domain, i, &sa) != NULL) { NEWINTERNAL_EXTERNAL(sockscf.external.addrc, sockscf.external.addrv); /* LINTED pointer casts may be troublesome */ TOIN(&sa)->sin_port = addr->port.tcp; sockaddr2ruleaddress(&sa, &sockscf.external.addrv[sockscf.external.addrc - 1]); ++i; } if (i == 0) yyerror("could not resolve name %s: %s", addr->addr.domain, hstrerror(h_errno)); break; } case SOCKS_ADDR_IPV4: { if (addr->addr.ipv4.ip.s_addr == htonl(INADDR_ANY)) yyerror("external address can't be a wildcard address"); NEWINTERNAL_EXTERNAL(sockscf.external.addrc, sockscf.external.addrv); sockscf.external.addrv[sockscf.external.addrc - 1] = *addr; sockscf.external.addrv[sockscf.external.addrc - 1].addr.ipv4.mask.s_addr = htonl(0xffffffff); break; case SOCKS_ADDR_IFNAME: NEWINTERNAL_EXTERNAL(sockscf.external.addrc, sockscf.external.addrv); sockscf.external.addrv[sockscf.external.addrc - 1] = *addr; break; } default: SERRX(addr->atype); } } struct rule_t * addclientrule(newrule) const struct rule_t *newrule; { struct rule_t *rule, ruletoadd; size_t i; ruletoadd = *newrule; /* for const. */ rule = addrule(&ruletoadd, &sockscf.crule, 1); if (rule->state.methodc == 0) if (rule->user == NULL) rule->state.methodv[rule->state.methodc++] = AUTHMETHOD_NONE; for (i = 0; i < rule->state.methodc; ++i) switch (rule->state.methodv[i]) { case AUTHMETHOD_NONE: case AUTHMETHOD_RFC931: case AUTHMETHOD_PAM: break; default: yyerror("method %s is not valid for clientrules", method2string(rule->state.methodv[i])); } checkrule(rule); /* LINTED cast discards 'const' from pointer target type */ return (struct rule_t *)rule; } struct rule_t * addsocksrule(newrule) const struct rule_t *newrule; { struct rule_t *rule; rule = addrule(newrule, &sockscf.srule, 0); checkrule(rule); /* LINTED cast discards 'const' from pointer target type */ return (struct rule_t *)rule; } struct linkedname_t * adduser(ruleuser, name) struct linkedname_t **ruleuser; const char *name; { struct linkedname_t *user, *last; for (user = *ruleuser, last = NULL; user != NULL; user = user->next) last = user; if ((user = (struct linkedname_t *)malloc(sizeof(*user))) == NULL) return NULL; if ((user->name = strdup(name)) == NULL) return NULL; user->next = NULL; if (*ruleuser == NULL) *ruleuser = user; else last->next = user; return *ruleuser; } void showrule(rule) const struct rule_t *rule; { char addr[MAXRULEADDRSTRING]; slog(LOG_INFO, "socks-rule #%u, line #%lu", rule->number, rule->linenumber); slog(LOG_INFO, "verdict: %s", verdict2string(rule->verdict)); slog(LOG_INFO, "src: %s", ruleaddress2string(&rule->src, addr, sizeof(addr))); slog(LOG_INFO, "dst: %s", ruleaddress2string(&rule->dst, addr, sizeof(addr))); slog(LOG_INFO, "redirect from: %s", ruleaddress2string(&rule->rdr_from, addr, sizeof(addr))); slog(LOG_INFO, "redirect to: %s", ruleaddress2string(&rule->rdr_to, addr, sizeof(addr))); if (rule->bw != NULL) slog(LOG_INFO, "max bandwidth to use: %ld B/s", rule->bw->maxbps); if (rule->ss != NULL) slog(LOG_INFO, "max sessions: %d", rule->ss->maxsessions); showuser(rule->user); #if HAVE_PAM if (*rule->pamservicename != NUL) slog(LOG_INFO, "pam.servicename: %s", rule->pamservicename); #endif /* HAVE_PAM */ showstate(&rule->state); showlog(&rule->log); #if HAVE_LIBWRAP if (*rule->libwrap != NUL) slog(LOG_INFO, "libwrap: %s", rule->libwrap); #endif /* HAVE_LIBWRAP */ } void showclient(rule) const struct rule_t *rule; { char addr[MAXRULEADDRSTRING]; slog(LOG_INFO, "client-rule #%u, line #%lu", rule->number, rule->linenumber); slog(LOG_INFO, "verdict: %s", verdict2string(rule->verdict)); slog(LOG_INFO, "src: %s", ruleaddress2string(&rule->src, addr, sizeof(addr))); slog(LOG_INFO, "dst: %s", ruleaddress2string(&rule->dst, addr, sizeof(addr))); showmethod(rule->state.methodc, rule->state.methodv); showuser(rule->user); #if HAVE_PAM if (*rule->pamservicename != NUL) slog(LOG_INFO, "pamservicename: %s", rule->pamservicename); #endif /* HAVE_PAM */ if (rule->bw != NULL) slog(LOG_INFO, "max bandwidth to use: %ld B/s", rule->bw->maxbps); if (rule->ss != NULL) slog(LOG_INFO, "max sessions: %d", rule->ss->maxsessions); showlog(&rule->log); #if HAVE_LIBWRAP if (*rule->libwrap != NUL) slog(LOG_INFO, "libwrap: %s", rule->libwrap); #endif /* HAVE_LIBWRAP */ } void showconfig(sockscf) const struct config_t *sockscf; { int i; char address[MAXRULEADDRSTRING], buf[1024]; size_t bufused; slog(LOG_DEBUG, "internal addresses (%d):", sockscf->internalc); for (i = 0; i < sockscf->internalc; ++i) slog(LOG_DEBUG, "\t%s", sockaddr2string(&sockscf->internalv[i].addr, address, sizeof(address))); slog(LOG_DEBUG, "external addresses (%d):", sockscf->external.addrc); for (i = 0; i < sockscf->external.addrc; ++i) { ruleaddress2string(&sockscf->external.addrv[i], address, sizeof(address)); slog(LOG_DEBUG, "\t%s", address); } slog(LOG_DEBUG, "external address rotation: %s", rotation2string(sockscf->external.rotation)); slog(LOG_DEBUG, "compatibility options: %s", compats2string(&sockscf->compat, buf, sizeof(buf))); slog(LOG_DEBUG, "extensions enabled: %s", extensions2string(&sockscf->extension, buf, sizeof(buf))); slog(LOG_DEBUG, "logoutput goes to: %s", logtypes2string(&sockscf->log, buf, sizeof(buf))); slog(LOG_DEBUG, "cmdline options:\n%s", options2string(&sockscf->option, "", buf, sizeof(buf))); slog(LOG_DEBUG, "resolveprotocol: %s", resolveprotocol2string(sockscf->resolveprotocol)); slog(LOG_DEBUG, "srchost:\n%s", srchosts2string(&sockscf->srchost, "", buf, sizeof(buf))); slog(LOG_DEBUG, "negotiate timeout: %lds", (long)sockscf->timeout.negotiate); slog(LOG_DEBUG, "i/o timeout: %lds", (long)sockscf->timeout.io); slog(LOG_DEBUG, "euid: %d", sockscf->state.euid); slog(LOG_DEBUG, "userid:\n%s", userids2string(&sockscf->uid, "", buf, sizeof(buf))); slog(LOG_DEBUG, "child.maxidle: %d", sockscf->child.maxidle); bufused = snprintfn(buf, sizeof(buf), "method(s): "); for (i = 0; (size_t)i < sockscf->methodc; ++i) bufused += snprintfn(&buf[bufused], sizeof(buf) - bufused, "%s%s", i > 0 ? ", " : "", method2string(sockscf->methodv[i])); slog(LOG_DEBUG, buf); bufused = snprintfn(buf, sizeof(buf), "clientmethod(s): "); for (i = 0; (size_t)i < sockscf->clientmethodc; ++i) bufused += snprintfn(&buf[bufused], sizeof(buf) - bufused, "%s%s", i > 0 ? ", " : "", method2string(sockscf->clientmethodv[i])); slog(LOG_DEBUG, buf); if (sockscf->option.debug) { struct rule_t *rule; struct route_t *route; int count; for (count = 0, rule = sockscf->crule; rule != NULL; rule = rule->next) ++count; slog(LOG_DEBUG, "client-rules (%d): ", count); for (rule = sockscf->crule; rule != NULL; rule = rule->next) showclient(rule); for (count = 0, rule = sockscf->srule; rule != NULL; rule = rule->next) ++count; slog(LOG_DEBUG, "socks-rules (%d): ", count); for (rule = sockscf->srule; rule != NULL; rule = rule->next) showrule(rule); for (count = 0, route = sockscf->route; route != NULL; route = route->next) ++count; slog(LOG_DEBUG, "routes (%d): ", count); for (route = sockscf->route; route != NULL; route = route->next) showroute(route); } } void resetconfig(void) { struct rule_t *rule; struct route_t *route; /* * internal; don't touch, only settable at start. */ /* external addresses can be changed. */ free(sockscf.external.addrv); sockscf.external.addrv = NULL; sockscf.external.addrc = 0; /* delete all old socks rules */ rule = sockscf.srule; while (rule != NULL) { struct rule_t *next = rule->next; struct linkedname_t *user, *nextuser; user = rule->user; while (user != NULL) { nextuser = user->next; free(user); user = nextuser; } free(rule); rule = next; } sockscf.srule = NULL; /* clientrules too. */ rule = sockscf.crule; while (rule != NULL) { struct rule_t *next = rule->next; struct linkedname_t *user, *nextuser; user = rule->user; while (user != NULL) { nextuser = user->next; free(user); user = nextuser; } free(rule); rule = next; } sockscf.crule = NULL; /* and routes. */ route = sockscf.route; while (route != NULL) { struct route_t *next = route->next; free(route); route = next; } sockscf.route = NULL; /* compat, read from configfile. */ bzero(&sockscf.compat, sizeof(sockscf.compat)); /* extensions, read from configfile. */ bzero(&sockscf.extension, sizeof(sockscf.extension)); /* log; only settable at start. */ /* option; only settable at commandline. */ /* resolveprotocol, read from configfile. */ bzero(&sockscf.resolveprotocol, sizeof(sockscf.resolveprotocol)); /* srchost, read from configfile. */ bzero(&sockscf.srchost, sizeof(sockscf.srchost)); /* stat: keep it. */ /* state; keep most of it. */ #if HAVE_PAM sockscf.state.pamservicename = DEFAULT_PAMSERVICENAME; #endif /* methods, read from configfile. */ bzero(sockscf.methodv, sizeof(sockscf.methodv)); sockscf.methodc = 0; bzero(sockscf.clientmethodv, sizeof(sockscf.clientmethodv)); sockscf.clientmethodc = 0; /* timeout, read from configfile. */ bzero(&sockscf.timeout, sizeof(sockscf.timeout)); /* uid, read from configfile. */ bzero(&sockscf.uid, sizeof(sockscf.uid)); /* childstate, most read from configfile, but some not. */ sockscf.child.maxidle = 0; } void iolog(rule, state, operation, src, srcauth, dst, dstauth, data, count) struct rule_t *rule; const struct connectionstate_t *state; int operation; const struct sockshost_t *src; const struct authmethod_t *srcauth; const struct sockshost_t *dst; const struct authmethod_t *dstauth; const char *data; size_t count; { /* CONSTCOND */ char srcstring[MAXSOCKSHOSTSTRING + MAXAUTHINFOLEN]; char dststring[sizeof(srcstring)]; char rulecommand[256]; int p; authinfo(srcauth, srcstring, sizeof(srcstring)); p = strlen(srcstring); sockshost2string(src, &srcstring[p], sizeof(srcstring) - p); authinfo(dstauth, dststring, sizeof(dststring)); p = strlen(dststring); sockshost2string(dst, &dststring[p], sizeof(dststring) - p); snprintfn(rulecommand, sizeof(rulecommand), "%s(%d): %s/%s", verdict2string(rule->verdict), rule->number, protocol2string(state->protocol), command2string(state->command)); switch (operation) { case OPERATION_ACCEPT: case OPERATION_CONNECT: if (rule->log.connect) slog(LOG_INFO, "%s [: %s -> %s%s%s", rulecommand, srcstring, dststring, (data == NULL || *data == NUL) ? "" : ": ", (data == NULL || *data == NUL) ? "" : data); break; case OPERATION_ABORT: if (rule->log.disconnect || rule->log.error) slog(LOG_INFO, "%s ]: %s -> %s: %s", rulecommand, srcstring, dststring, (data == NULL || *data == NUL) ? strerror(errno) : data); break; case OPERATION_ERROR: if (rule->log.error) slog(LOG_INFO, "%s ]: %s -> %s: %s", rulecommand, srcstring, dststring, (data == NULL || *data == NUL) ? strerror(errno) : data); break; case OPERATION_IO: if (rule->log.data) { char *visdata; SASSERTX(data != NULL); slog(LOG_INFO, "%s -: %s -> %s (%lu): %s", rulecommand, srcstring, dststring, (unsigned long)count, strcheck(visdata = str2vis(data, count))); free(visdata); break; } if (rule->log.iooperation) slog(LOG_INFO, "%s -: %s -> %s (%lu)", rulecommand, srcstring, dststring, (unsigned long)count); break; default: SERRX(operation); } } int rulespermit(s, peer, local, match, state, src, dst, msg, msgsize) int s; const struct sockaddr *peer, *local; struct rule_t *match; struct connectionstate_t *state; const struct sockshost_t *src; const struct sockshost_t *dst; char *msg; size_t msgsize; { const char *function = "rulespermit()"; static int init; static struct rule_t defrule; struct rule_t *rule; struct connectionstate_t ostate; int *methodv; int methodc; #if HAVE_LIBWRAP struct request_info libwraprequest; libwrapinit(s, &libwraprequest); #else /* !HAVE_LIBWRAP */ void *libwraprequest = NULL; #endif /* make a somewhat sensible default rule for entries with no match. */ if (!init) { defrule.verdict = VERDICT_BLOCK; defrule.number = 0; defrule.src.atype = SOCKS_ADDR_IPV4; defrule.src.addr.ipv4.ip.s_addr = htonl(INADDR_ANY); defrule.src.addr.ipv4.mask.s_addr = htonl(0); defrule.src.port.tcp = htons(0); defrule.src.port.udp = htons(0); defrule.src.portend = htons(0); defrule.src.operator = none; defrule.dst = defrule.src; memset(&defrule.log, 0, sizeof(defrule.log)); defrule.log.connect = 1; defrule.log.iooperation = 1; /* blocked iooperations. */ if (sockscf.option.debug) { defrule.log.disconnect = 1; defrule.log.error = 1; } memset(&defrule.state.command, UCHAR_MAX, sizeof(defrule.state.command)); defrule.state.methodc = 0; memset(&defrule.state.protocol, UCHAR_MAX, sizeof(defrule.state.protocol)); memset(&defrule.state.proxyprotocol, UCHAR_MAX, sizeof(defrule.state.proxyprotocol)); #if HAVE_LIBWRAP *defrule.libwrap = NUL; #endif /* HAVE_LIBWRAP */ init = 1; } if (msgsize > 0) *msg = NUL; /* what rulebase to use. */ switch (state->command) { case SOCKS_ACCEPT: /* only set by negotiate children so must be clientrule. */ rule = sockscf.crule; methodv = sockscf.clientmethodv; methodc = sockscf.clientmethodc; break; default: /* everyone else, socksrules. */ rule = sockscf.srule; methodv = sockscf.methodv; methodc = sockscf.methodc; break; } /* * let "state" be unchanged from original unless we actually get a match. * The exception to this is state->auth.methodv and state->auth.badmethodv, * we change them so we can "cache" it, and callee could in theory * use it to see which methods we tried. */ for (ostate = *state; rule != NULL; rule = rule->next, *state = ostate) { int i; /* current rule covers desired command? */ switch (state->command) { /* client-rule commands. */ case SOCKS_ACCEPT: break; /* socks-rule commands. */ case SOCKS_BIND: if (!rule->state.command.bind) continue; break; case SOCKS_CONNECT: if (!rule->state.command.connect) continue; break; case SOCKS_UDPASSOCIATE: if (!rule->state.command.udpassociate) continue; break; /* pseudo commands. */ case SOCKS_BINDREPLY: if (!rule->state.command.bindreply) continue; break; case SOCKS_UDPREPLY: if (!rule->state.command.udpreply) continue; break; default: SERRX(state->command); } /* current rule covers desired protocol? */ switch (state->protocol) { case SOCKS_TCP: if (!rule->state.protocol.tcp) continue; break; case SOCKS_UDP: if (!rule->state.protocol.udp) continue; break; default: SERRX(state->protocol); } /* current rule covers desired version? */ switch (state->version) { case SOCKS_V4: if (!rule->state.proxyprotocol.socks_v4) continue; break; case SOCKS_V5: if (!rule->state.proxyprotocol.socks_v5) continue; break; default: SERRX(state->version); } /* * This is a little tricky. For some commands we may not * have all info at time of (preliminary) rulechecks. * What we want to do if there is no (complete) address given is * to see if there's any chance at all the rules will permit this * request when the address (later) becomes available. * We therefore continue to scan the rules until we either get * a pass (ignoring peer with missing info), or the default block * is triggered. * * This is the case for e.g. bindreply and udp, where we will * have to call this function again when we get the addresses * in question. */ if (src != NULL) { if (!addressmatch(&rule->src, src, state->protocol, 0)) continue; } else if (rule->verdict == VERDICT_BLOCK) continue; /* continue scan. It's possible we will get a pass. */ if (dst != NULL) { if (!addressmatch(&rule->dst, dst, state->protocol, 0)) continue; } else if (rule->verdict == VERDICT_BLOCK) continue; /* continue scan. It's possible we will get a pass. */ /* current rule authentication matches selected authentication? */ if (!methodisset(state->auth.method, rule->state.methodv, rule->state.methodc)) { /* * There are some "extra" (non-standard) methods that are * independent of socks protocol negotiation, and it's possible * to get a match on them, even if above check failed. I.e. * it's possible to change the method. E.g. PAM is based * on UNAME; if we have UNAME, we can also get PAM. * * We therefor look at what methods this rule wants and see * if can match it with what the client _can_ provide, if we * do some extra work to get the information. * Currently these methods are: rfc931 and pam. */ /* * This variable only says if current client has provided the * neccessary information to to check it's access with * one of the methods required by the current rule. * * XXX would be nice to cache this, so we don't have to * copy memory around each time. */ size_t methodischeckable = 0; for (i = 0; i < methodc; ++i) { if (methodisset(methodv[i], rule->state.methodv, rule->state.methodc)) { switch (methodv[i]) { #if HAVE_LIBWRAP case AUTHMETHOD_RFC931: strncpy((char *)state->auth.mdata.rfc931.name, eval_user(&libwraprequest), sizeof(state->auth.mdata.rfc931.name) - 1); /* libwrap sets it to unknown if no identreply. */ if (strcmp((char *)state->auth.mdata.rfc931.name, STRING_UNKNOWN) == 0) *state->auth.mdata.rfc931.name = NUL; else if (state->auth.mdata.rfc931.name[ sizeof(state->auth.mdata.rfc931.name) - 1] != NUL) { state->auth.mdata.rfc931.name[ sizeof(state->auth.mdata.rfc931.name) - 1] = NUL; swarnx("%s: rfc931 name \"%s\" truncated", function, state->auth.mdata.rfc931.name); *state->auth.mdata.rfc931.name = NUL; } if (*state->auth.mdata.rfc931.name != NUL) methodischeckable = 1; break; #endif /* HAVE_LIBWRAP */ #if HAVE_PAM case AUTHMETHOD_PAM: /* * PAM can support username/password, just username, * or neither username nor password. */ slog(LOG_DEBUG, "%s: trying to find match for pam ...", function); switch (state->auth.method) { case AUTHMETHOD_UNAME: { /* it's a union, make a copy first. */ const struct authmethod_uname_t uname = state->auth.mdata.uname; /* similar enough, just copy name/password. */ strcpy((char *)state->auth.mdata.pam.name, (const char *)uname.name); strcpy((char *)state->auth.mdata.pam.password, (const char *)uname.password); methodischeckable = 1; break; } case AUTHMETHOD_RFC931: { /* it's a union, make a copy first. */ const struct authmethod_rfc931_t rfc931 = state->auth.mdata.rfc931; /* * no password, but we can check for the username * we got from ident, with an empty password. */ strcpy((char *)state->auth.mdata.pam.name, (const char *)rfc931.name); *state->auth.mdata.pam.password = NUL; methodischeckable = 1; break; } case AUTHMETHOD_NONE: /* * PAM can also support no username/password. */ *state->auth.mdata.pam.name = NUL; *state->auth.mdata.pam.password = NUL; methodischeckable = 1; break; } strcpy(state->auth.mdata.pam.servicename, rule->pamservicename); #endif /* HAVE_PAM */ } if (methodischeckable) { state->auth.method = methodv[i]; /* chainging method. */ break; } } } if (i == methodc) /* * current rules methods differs from what client can * provide us with. Go to next rule. */ continue; /* else; XXX should try other methods if acccess fails on this. */ } SASSERTX(methodisset(state->auth.method, rule->state.methodv, rule->state.methodc)); /* rule requires a user, and covers current user? */ if (rule->user != NULL) if (!usermatch(&state->auth, rule->user)) continue; /* no match. */ /* last step. Does the authentication match? */ i = accesscheck(s, &state->auth, peer, local, msg, msgsize); /* * two fields we want to copy. This is to speed things up so * we don't re-check the same method. */ memcpy(ostate.auth.methodv, state->auth.methodv, state->auth.methodc * sizeof(*state->auth.methodv)); ostate.auth.methodc = state->auth.methodc; memcpy(ostate.auth.badmethodv, state->auth.badmethodv, state->auth.badmethodc * sizeof(*state->auth.badmethodv)); ostate.auth.badmethodc = state->auth.badmethodc; if (!i) { match->verdict = VERDICT_BLOCK; return 0; } break; } if (rule == NULL) /* no rules matched; match default rule. */ rule = &defrule; *match = *rule; /* * got our rule, now check connection. Connectioncheck * requires the rule matched so needs to be delayed til here. */ if (!connectisok(&libwraprequest, match)) match->verdict = VERDICT_BLOCK; /* * specialcases that we delay til here to get correct addr/rule match, * even if we could have decided on the final answer before. */ switch (state->command) { case SOCKS_BIND: if (dst->atype == SOCKS_ADDR_IPV4 && dst->addr.ipv4.s_addr == htonl(0)) if (!sockscf.extension.bind) { slog(LOG_DEBUG, "%s: client requested disabled extension: bind", function); match->verdict = VERDICT_BLOCK; } break; } return match->verdict == VERDICT_PASS; } const char * authinfo(auth, info, infolen) const struct authmethod_t *auth; char *info; size_t infolen; { const char *authname, *methodname; if (auth != NULL) { methodname = method2string(auth->method); switch (auth->method) { case AUTHMETHOD_NONE: case AUTHMETHOD_NOACCEPT: /* closing connection next presumably. */ authname = methodname = NULL; break; case AUTHMETHOD_UNAME: authname = (const char *)auth->mdata.uname.name; break; case AUTHMETHOD_RFC931: authname = (const char *)auth->mdata.rfc931.name; break; #if HAVE_PAM case AUTHMETHOD_PAM: authname = (const char *)auth->mdata.pam.name; break; #endif default: SERRX(auth->method); } } else authname = methodname = NULL; if (authname == NULL || *authname == NUL) *info = NUL; else snprintfn(info, infolen, "%s%%%s@", methodname, authname); return info; } int addressisbindable(addr) const struct ruleaddress_t *addr; { const char *function = "addressisbindable()"; struct sockaddr saddr; /* CONSTCOND */ char saddrs[MAX(MAXSOCKSHOSTSTRING, MAXSOCKADDRSTRING)]; int s; if ((s = socket(AF_INET, SOCK_STREAM, 0)) == -1) { swarn("%s: socket(SOCK_STREAM)", function); return 0; } switch (addr->atype) { case SOCKS_ADDR_IPV4: { struct sockshost_t host; sockshost2sockaddr(ruleaddress2sockshost(addr, &host, SOCKS_TCP), &saddr); if (bind(s, &saddr, sizeof(saddr)) != 0) { swarn("%s: can't bind address: %s", function, sockaddr2string(&saddr, saddrs, sizeof(saddrs))); close(s); return 0; } break; } case SOCKS_ADDR_IFNAME: if (ifname2sockaddr(addr->addr.ifname, 0, &saddr) == NULL) { swarn("%s: can't find interface: %s", function, addr->addr.ifname); close(s); return 0; } if (bind(s, &saddr, sizeof(saddr)) != 0) { swarn("%s: can't bind address %s of interface %s", function, sockaddr2string(&saddr, saddrs, sizeof(saddrs)), addr->addr.ifname); close(s); return 0; } break; default: SERRX(addr->atype); } close(s); return 1; } static struct rule_t * addrule(newrule, rulebase, client) const struct rule_t *newrule; struct rule_t **rulebase; int client; { static const struct serverstate_t state; const char *function = "addrule()"; struct rule_t *rule; size_t i; int *methodv; size_t methodc; if (client) { methodv = sockscf.clientmethodv; methodc = sockscf.clientmethodc; } else { methodv = sockscf.methodv; methodc = sockscf.methodc; } if ((rule = malloc(sizeof(*rule))) == NULL) serrx(EXIT_FAILURE, "%s: %s", function, NOMEM); *rule = *newrule; /* try to set values not set to a sensible default. */ if (sockscf.option.debug) { rule->log.connect = 1; rule->log.disconnect = 1; rule->log.error = 1; rule->log.iooperation = 1; } /* else; don't touch logging, no logging is ok. */ /* if no command set, set all. */ if (memcmp(&state.command, &rule->state.command, sizeof(state.command)) == 0) memset(&rule->state.command, UCHAR_MAX, sizeof(rule->state.command)); /* * If no method set, set all set from global methodline that make sense. */ if (rule->state.methodc == 0) { for (i = 0; i < methodc; ++i) switch (methodv[i]) { case AUTHMETHOD_NONE: if (rule->user != NULL) break; /* else; */ /* FALLTHROUGH */ default: rule->state.methodv[rule->state.methodc++] = methodv[i]; } } /* warn about methods not set in the global method? May not be an error. */ for (i = 0; i < rule->state.methodc; ++i) if (!methodisset(rule->state.methodv[i], methodv, methodc)) yywarn("method \"%s\" set in rule but not in global methodline", method2string(rule->state.methodv[i])); /* if no protocol set, set all for socks-rules, tcp for client-rules. */ if (memcmp(&state.protocol, &rule->state.protocol, sizeof(state.protocol)) == 0) if (client) rule->state.protocol.tcp = 1; else memset(&rule->state.protocol, UCHAR_MAX, sizeof(rule->state.protocol)); /* if no proxyprotocol set, set all socks protocols. */ if (memcmp(&state.proxyprotocol, &rule->state.proxyprotocol, sizeof(state.proxyprotocol)) == 0) { rule->state.proxyprotocol.socks_v4 = 1; rule->state.proxyprotocol.socks_v5 = 1; } if (*rulebase == NULL) { *rulebase = rule; (*rulebase)->number = 1; } else { struct rule_t *lastrule; /* append this rule to the end of our list. */ lastrule = *rulebase; while (lastrule->next != NULL) lastrule = lastrule->next; rule->number = lastrule->number + 1; lastrule->next = rule; } rule->next = NULL; return rule; } static void checkrule(rule) const struct rule_t *rule; { size_t i; struct ruleaddress_t ruleaddr; const char *function = "checkrule()"; if (rule->state.methodc == 0) yywarn("rule allows no methods"); if (rule->user != NULL) { /* check that all methods given provide usernames. */ for (i = 0; i < rule->state.methodc; ++i) switch (rule->state.methodv[i]) { case AUTHMETHOD_UNAME: case AUTHMETHOD_RFC931: case AUTHMETHOD_PAM: break; default: yyerror("method \"%s\" can not provide usernames", method2string(rule->state.methodv[i])); } } if (rule->src.atype == SOCKS_ADDR_IFNAME || rule->dst.atype == SOCKS_ADDR_IFNAME) yyerror("src/dst address in rules can't use interfacenames"); /* any port is good for testing. */ ruleaddr = rule->rdr_from; ruleaddr.port.tcp = htons(0); if (!addressisbindable(&ruleaddr)) { char addr[MAXRULEADDRSTRING]; yyerror("%s is not bindable", ruleaddress2string(&ruleaddr, addr, sizeof(addr))); } if (rule->rdr_to.atype == SOCKS_ADDR_IFNAME) yyerror("redirect to an interface (%s) is not supported (or meaningful?)", rule->rdr_to.addr.ifname); #if HAVE_PAM if (*rule->pamservicename != NUL) if (!methodisset(AUTHMETHOD_PAM, rule->state.methodv, rule->state.methodc)) yyerror("pamservicename set for rule but not method pam"); else if (sockscf.state.pamservicename != NULL && strcmp(rule->pamservicename, sockscf.state.pamservicename) != 0) { slog(LOG_DEBUG, "%s: %s ne %s", function, rule->pamservicename, sockscf.state.pamservicename); sockscf.state.pamservicename = NULL; /* pamservicename varies. */ } #endif /* HAVE_PAM */ } static void showuser(user) const struct linkedname_t *user; { char buf[10240]; users2string(user, buf, sizeof(buf)); if (strlen(buf) > 0) slog(LOG_INFO, "user: %s", buf); } static void showlog(log) const struct log_t *log; { char buf[1024]; slog(LOG_INFO, "log: %s", logs2string(log, buf, sizeof(buf))); } #if HAVE_LIBWRAP static void libwrapinit(s, request) int s; struct request_info *request; { const int errno_s = errno; request_init(request, RQ_FILE, s, RQ_DAEMON, __progname, 0); fromhost(request); errno = errno_s; } #endif /* HAVE_LIBWRAP */ static int connectisok(request, rule) #if HAVE_LIBWRAP struct request_info *request; #else void *request; #endif const struct rule_t *rule; { #if HAVE_LIBWRAP /* do we need to involve libwrap for this rule? */ if (*rule->libwrap != NUL || sockscf.srchost.nomismatch || sockscf.srchost.nounknown) { const char *function = "connectisok()"; char libwrap[LIBWRAPBUF]; uid_t euid; socks_seteuid(&euid, sockscf.uid.libwrap); /* libwrap modifies the passed buffer. */ SASSERTX(strlen(rule->libwrap) < sizeof(libwrap)); strcpy(libwrap, rule->libwrap); /* Wietse Venema says something along the lines of: */ if (setjmp(tcpd_buf) != 0) { socks_reseteuid(sockscf.uid.libwrap, euid); swarnx("%s: failed libwrap line: %s", function, libwrap); return 0; /* something got screwed up. */ } process_options(libwrap, request); if (sockscf.srchost.nounknown) if (strcmp(eval_hostname(request->client), STRING_UNKNOWN) == 0) { slog(LOG_INFO, "%s: srchost unknown", eval_hostaddr(request->client)); socks_reseteuid(sockscf.uid.libwrap, euid); return 0; } if (sockscf.srchost.nomismatch) if (strcmp(eval_hostname(request->client), STRING_PARANOID) == 0) { slog(LOG_INFO, "%s: srchost ip/host mismatch", eval_hostaddr(request->client)); socks_reseteuid(sockscf.uid.libwrap, euid); return 0; } socks_reseteuid(sockscf.uid.libwrap, euid); } #else /* !HAVE_LIBWRAP */ #endif /* !HAVE_LIBWRAP */ return 1; } dante-1.1.19.dfsg/sockd/sockd_request.c0000644000175000017500000012757010360007167016434 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" #include "config_parse.h" static const char rcsid[] = "$Id: sockd_request.c,v 1.176 2006/01/07 18:54:07 michaels Exp $"; /* * Since it only handles one client at a time there is no possibility * for the mother to send a new client before we have got rid of the * old one and thus no need for locking even on broken systems. * (#ifdef HAVE_SENDMSG_DEADLOCK) * XXX I have started to work on fixing this, so this process too * can support multiple clients, perhaps for a later release I will * have time to complete it. Will also fix the terrible fact * that we just sit around and wait if the command is bind, wasting * the whole process on practically nothing. */ __BEGIN_DECLS static void dorequest __P((int mother, const struct sockd_request_t *request)); /* * When a complete request has been read, this function can be * called. It will perform the request "request->req" and send the * result to "mother". */ static int flushio __P((int mother, int clientcontrol, const struct response_t *response, struct sockd_io_t *io)); /* * "flushes" a complete io object and free's any state/resources held by it. * "mother" is connection to mother for sending the io. * "clientcontrol" is the client connection. * "response" is the response to be sent the client. * "io" is the io object sent mother. * Returns: 0, unless fatal error. */ static void proctitleupdate __P((const struct sockaddr *from)); /* * Updates the title of this process. */ static struct sockd_io_t * io_add __P((struct sockd_io_t *iolist, const struct sockd_io_t *newio)); /* * Adds _a copy_ of the object "newio" to the list "iolist". * Returns a pointer to the (new) iolist. */ static struct sockd_io_t * io_remove __P((struct sockd_io_t *iolist, struct sockd_io_t *rmio)); /* * Removes the object "rmio" from the list "iolist". * Returns a pointer to the (new) iolist. */ static struct sockd_io_t * io_find __P((struct sockd_io_t *iolist, const struct sockaddr *addr)); /* * Scans "iolist" for a object that contains "addr" as a local address. * If "addr" is NULL, returns "iolist". * Returns: * On success: pointer to the matching io object. * On failure: NULL. */ static int serverchain __P((int s, const struct request_t *req, struct response_t *res, struct sockd_io_direction_t *src, struct sockd_io_direction_t *dst)); /* * Checks if we should create a serverchain on socket "s" for the request * "req". * Returns: * 0 : serverchain established successfully. * -1: No serverchain established. If errno set, it indicates the reason. * If errno is not set, no route exists to handle this connection, * and it should be direct. */ static void send_failure __P((int s, const struct response_t *response, int failure)); /* * Sends a failure message to the client at "s". "response" is the packet * we send, "failure" is the reason for failure and "auth" is the agreed on * authentication. */ #define SHMEM_UNUSE(rule) \ do { \ bw_unuse((rule)->bw); \ session_unuse((rule)->ss); \ } while (lintnoloop_sockd_h) __END_DECLS void run_request(mother) struct sockd_mother_t *mother; { const char *function = "run_request()"; struct sockd_request_t req; #if DIAGNOSTIC const int freec = freedescriptors(sockscf.option.debug ? "start" : NULL); #endif /* DIAGNOSTIC */ proctitleupdate(NULL); /* CONSTCOND */ while (1) { /* * Get request from mother, perform it, get next request. */ const char command = SOCKD_FREESLOT; proctitleupdate(NULL); if (recv_req(mother->s, &req) == -1) sockdexit(-EXIT_FAILURE); dorequest(mother->s, &req); if (writen(mother->ack, &command, sizeof(command), NULL) != sizeof(command)) serr(EXIT_FAILURE, "%s: sending ack to mother failed", function); #if DIAGNOSTIC SASSERTX(freec == freedescriptors(sockscf.option.debug ? "end" : NULL)); #endif /* DIAGNOSTIC */ } } int recv_req(s, req) int s; struct sockd_request_t *req; { const char *function = "recv_req()"; int fdexpect, fdreceived, r; struct iovec iovec[1]; struct msghdr msg; CMSG_AALLOC(cmsg, sizeof(int)); iovec[0].iov_base = req; iovec[0].iov_len = sizeof(*req); msg.msg_iov = iovec; msg.msg_iovlen = ELEMENTS(iovec); msg.msg_name = NULL; msg.msg_namelen = 0; /* LINTED pointer casts may be troublesome */ CMSG_SETHDR_RECV(msg, cmsg, CMSG_MEMSIZE(cmsg)); if ((r = recvmsgn(s, &msg, 0)) != sizeof(*req)) { switch (r) { case -1: swarn("%s: recvmsg() from mother", function); break; case 0: slog(LOG_DEBUG, "%s: recvmsg(): mother closed connection", function); break; default: swarnx("%s: recvmsg(): unexpected %d/%d bytes from mother", function, r, sizeof(*req)); } return -1; } fdexpect = 1; #if !HAVE_DEFECT_RECVMSG SASSERT(CMSG_TOTLEN(msg) == CMSG_SPACE(sizeof(int) * fdexpect)); #endif fdreceived = 0; /* LINTED pointer casts may be troublesome */ CMSG_GETOBJECT(req->s, cmsg, sizeof(req->s) * fdreceived++); /* pointer fixup */ req->req.auth = &req->state.auth; return 0; } static void dorequest(mother, request) int mother; const struct sockd_request_t *request; { const char *function = "dorequest()"; static const struct sockd_io_t ioinit; struct sockaddr bound; struct sockd_io_t io; struct response_t response; char a[MAXSOCKSHOSTSTRING]; char msg[256]; int failed, p, permit, out, failurecode = SOCKS_NOTALLOWED; slog(LOG_DEBUG, "received request: %s", socks_packet2string(&request->req, SOCKS_REQUEST)); proctitleupdate(&request->from); bzero(&response, sizeof(response)); response.host = request->req.host; response.auth = request->req.auth; io = ioinit; io.state = request->state; io.state.extension = sockscf.extension; io.crule = request->rule; /* so we can call iolog() before rulespermit() on errors. */ io.rule = io.crule; io.rule.verdict = VERDICT_BLOCK; io.rule.number = 0; sockaddr2sockshost(&request->from, &io.src.host); sockaddr2sockshost(&request->to, &io.dst.host); if (io.crule.log.error) /* if we log before rulespermit() it's due to an error. */ io.rule.log.connect = 1; /* * examine client request. */ /* supported version? */ switch (request->req.version) { case SOCKS_V4: response.version = SOCKS_V4REPLY_VERSION; /* recognized command for this version? */ switch (request->req.command) { case SOCKS_BIND: case SOCKS_CONNECT: io.state.protocol = SOCKS_TCP; break; default: snprintf(msg, sizeof(msg), "%s: unrecognized v%d command: %d", sockaddr2string(&request->from, a, sizeof(a)), request->req.version, request->req.command); io.state.command = SOCKS_UNKNOWN; iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); send_failure(request->s, &response, SOCKS_CMD_UNSUPP); close(request->s); return; } /* supported address format for this version? */ switch (request->req.host.atype) { case SOCKS_ADDR_IPV4: break; default: snprintf(msg, sizeof(msg), "%s: unrecognized v%d atype: %d", sockaddr2string(&request->from, a, sizeof(a)), request->req.version, request->req.host.atype); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); send_failure(request->s, &response, SOCKS_ADDR_UNSUPP); close(request->s); return; } break; /* SOCKS_V4 */ case SOCKS_V5: response.version = request->req.version; /* recognized command for this version? */ switch (request->req.command) { case SOCKS_BIND: case SOCKS_CONNECT: io.state.protocol = SOCKS_TCP; break; case SOCKS_UDPASSOCIATE: io.state.protocol = SOCKS_UDP; break; default: snprintf(msg, sizeof(msg), "%s: unrecognized v%d command: %d", sockaddr2string(&request->from, a, sizeof(a)), request->req.version, request->req.command); io.state.command = SOCKS_UNKNOWN; iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); send_failure(request->s, &response, SOCKS_CMD_UNSUPP); close(request->s); return; } /* supported address format for this version? */ switch (request->req.host.atype) { case SOCKS_ADDR_IPV4: case SOCKS_ADDR_DOMAIN: break; default: snprintf(msg, sizeof(msg), "%s: unrecognized v%d atype: %d", sockaddr2string(&request->from, a, sizeof(a)), request->req.version, request->req.host.atype); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); send_failure(request->s, &response, SOCKS_ADDR_UNSUPP); close(request->s); return; } break; /* SOCKS_V5 */ default: SERRX(request->req.version); } /* * packet looks ok, fill in remaining bits and check rules. */ /* LINTED pointer casts may be troublesome */ sockaddr2sockshost(&request->from, &io.control.host); io.control.s = request->s; io.control.laddr = request->to; io.control.raddr = request->from; switch (request->req.command) { case SOCKS_BIND: /* * bind is a bit funky. We first check if the bind request * is allowed, and then we transform io.dst to something * completly different to check if the bindreply is alloswed. */ io.src.host = io.control.host; io.dst.host = request->req.host; if (io.dst.host.atype != SOCKS_ADDR_IPV4 || io.dst.host.addr.ipv4.s_addr != htonl(0) || io.dst.host.port == htons(0)) io.state.extension.bind = 0; /* not requesting bind extension. */ break; case SOCKS_CONNECT: io.src.host = io.control.host; io.dst.host = request->req.host; break; case SOCKS_UDPASSOCIATE: /* * for UDP_ASSOCIATE we are getting clients UDP address, * not destination in request. * Destination address will be checked in the i/o loop for * each destination, for now just set it to INADDR_ANY. */ io.src.host = request->req.host; io.dst.host.atype = SOCKS_ADDR_IPV4; io.dst.host.addr.ipv4.s_addr = htonl(INADDR_ANY); io.dst.host.port = htons(0); break; default: SERRX(request->req.command); } bzero(&bound, sizeof(bound)); /* * Find address to bind on clients behalf. * First get the IP address. */ switch (request->req.command) { case SOCKS_BIND: /* either 0.0.0.0 or previous connectionaddress, ok. */ case SOCKS_CONNECT: case SOCKS_UDPASSOCIATE: { /* dst is 0.0.0.0. */ struct sockaddr dst; sockshost2sockaddr(&io.dst.host, &dst); /* LINTED possible pointer alignment problem */ if ((request->req.command == SOCKS_CONNECT && (TOIN(&dst)->sin_addr.s_addr == htonl(INADDR_ANY))) || ((TOIN(&bound)->sin_addr = getifa(TOIN(&dst)->sin_addr)).s_addr == htonl(INADDR_NONE))) { snprintf(msg, sizeof(msg), "invalid address: %s", sockaddr2string(&dst, a, sizeof(a))); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); send_failure(request->s, &response, SOCKS_ADDR_UNSUPP); close(request->s); return; } break; } default: SERRX(request->req.command); } /* ... and now the port. */ switch (request->req.command) { case SOCKS_BIND: /* find out what port to bind; v4/v5 semantics? bind extension? */ switch (request->req.version) { case SOCKS_V4: if (io.state.extension.bind) /* LINTED pointer casts may be troublesome */ TOIN(&bound)->sin_port = io.dst.host.port; else /* best we can try for is to use same port as source. */ /* LINTED pointer casts may be troublesome */ TOIN(&bound)->sin_port = TOCIN(&request->from)->sin_port; break; case SOCKS_V5: /* LINTED pointer casts may be troublesome */ TOIN(&bound)->sin_port = io.dst.host.port; break; default: SERRX(request->req.version); } break; case SOCKS_CONNECT: /* LINTED pointer casts may be troublesome */ TOIN(&bound)->sin_port = TOCIN(&request->from)->sin_port; break; case SOCKS_UDPASSOCIATE: /* LINTED pointer casts may be troublesome */ TOIN(&bound)->sin_port = request->req.host.port; break; default: SERRX(request->req.command); } /* create outgoing socket. */ switch (io.state.protocol) { case SOCKS_TCP: out = socket(AF_INET, SOCK_STREAM, 0); break; case SOCKS_UDP: out = socket(AF_INET, SOCK_DGRAM, 0); break; default: SERRX(io.state.protocol); } if (out == -1) { iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, strerror(errno), 0); send_failure(request->s, &response, SOCKS_FAILURE); close(request->s); return; } setsockoptions(out); /* bind it. */ /* LINTED possible pointer alignment problem */ TOIN(&bound)->sin_family = AF_INET; if (sockscf.compat.reuseaddr) {/* XXX and not rebinding in redirect(). */ p = 1; if (setsockopt(out, SOL_SOCKET, SO_REUSEADDR, &p, sizeof(p)) != 0) swarn("%s: setsockopt(SO_REUSEADDR)", function); } /* need to bind address so rulespermit() has an address to compare against.*/ if ((p = sockd_bind(out, &bound, 1)) != 0) { /* no such luck, bind any port and let client decide if ok. */ /* LINTED pointer casts may be troublesome */ TOIN(&bound)->sin_port = htons(0); p = bind(out, &bound, sizeof(bound)); } if (p != 0) { iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, strerror(errno), 0); send_failure(request->s, &response, errno2reply(errno, response.version)); close(request->s); close(out); return; } /* rules permit? */ shmem_lockall(); switch (request->req.command) { case SOCKS_BIND: permit = rulespermit(request->s, &request->from, &request->to, &io.rule, &io.state, &io.src.host, &io.dst.host, msg, sizeof(msg)); break; case SOCKS_CONNECT: permit = rulespermit(request->s, &request->from, &request->to, &io.rule, &io.state, &io.src.host, &io.dst.host, msg, sizeof(msg)); break; case SOCKS_UDPASSOCIATE: { struct sockshost_t *src; struct connectionstate_t replystate; /* * Client is allowed to send a "incomplete" address. */ if (io.src.host.atype == SOCKS_ADDR_IPV4 && (io.src.host.addr.ipv4.s_addr == htonl(0) || io.src.host.port == htons(0))) src = NULL; else src = &io.src.host; /* make a temp to check for i/o both ways. */ replystate = io.state; replystate.command = SOCKS_UDPREPLY; /* one direction is atleast in theory good enough. */ permit = rulespermit(request->s, &request->from, &request->to, &io.rule, &io.state, src, NULL, msg, sizeof(msg)) || rulespermit(request->s, &request->from, &request->to, &io.rule, &replystate, NULL, src, msg, sizeof(msg)); break; } default: SERRX(request->req.command); } if (permit && io.rule.ss != NULL) /* don't bother if rules deny anyway. */ if (!session_use(io.rule.ss)) { permit = 0; io.rule.verdict = VERDICT_BLOCK; snprintf(msg, sizeof(msg), DENY_SESSIONLIMITs); failurecode = SOCKS_FAILURE; io.rule.ss = NULL; } io.src.auth = io.control.auth = io.state.auth; iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); if (!permit) { shmem_unlockall(); send_failure(request->s, &response, failurecode); close(request->s); close(out); return; } switch (request->req.command) { case SOCKS_UDPASSOCIATE: break; /* does a rulecheck for each packet. */ default: if (io.rule.bw != NULL) bw_use(io.rule.bw); } shmem_unlockall(); if (redirect(out, &bound, &io.dst.host, request->req.command, &io.rule.rdr_from, &io.rule.rdr_to) != 0) { if (io.rule.log.error) { snprintf(msg, sizeof(msg), "redirect(): %s", strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(request->s, &response, errno2reply(errno, response.version)); close(request->s); close(out); SHMEM_UNUSE(&io.rule); return; } if (serverchain(out, &request->req, &response, &io.src, &io.dst) == 0) { switch (io.state.command) { case SOCKS_BIND: SERRX(request->req.command); /* NOTREACHED */ case SOCKS_CONNECT: { socklen_t sinlen; io.src = io.control; io.dst.s = out; sinlen = sizeof(io.dst.raddr); if (getpeername(io.dst.s, &io.dst.raddr, &sinlen) != 0) { if (io.rule.log.error) { snprintf(msg, sizeof(msg), "getpeername(io.dst.s): %s", strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(request->s, &response, SOCKS_FAILURE); close(request->s); break; } sinlen = sizeof(io.dst.laddr); if (getsockname(io.dst.s, &io.dst.laddr, &sinlen) != 0) { if (io.rule.log.error) { snprintf(msg, sizeof(msg), "getsockname(io.dst.s): %s", strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(request->s, &response, SOCKS_FAILURE); close(request->s); break; } flushio(mother, request->s, &response, &io); break; } case SOCKS_UDPASSOCIATE: default: SERRX(request->req.command); } close(out); SHMEM_UNUSE(&io.rule); return; } else /* no chain. Error, or no route? */ if (errno != 0) { /* error. */ if (io.rule.log.error) { snprintf(msg, sizeof(msg), "serverchain failed: %s", strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(request->s, &response, errno2reply(errno, response.version)); close(request->s); close(out); SHMEM_UNUSE(&io.rule); return; } /* else; no route, so go direct. */ /* * Set up missing bits of io and send it to mother. */ failed = 1; /* default. Set to 0 on success. */ io.dst.auth.method = AUTHMETHOD_NONE; /* no remote auth so far. */ switch (io.state.command) { case SOCKS_BIND: { struct sockd_io_t *iolist; struct sockd_io_t bindio; /* send this to proxyrelayer. */ struct sockaddr boundaddr; /* address we listen on. */ socklen_t len; int flags, emfile; enum socketindex { client, childpipe, ourpipe, reply, remote }; /* array of sockets, indexed by above enums, -1 if not open. */ int sv[(int)(remote) + 1] = { -1, -1, -1, -1, -1 }; SASSERTX(sv[ELEMENTS(sv) - 1] == -1); sv[client] = request->s; if (listen(out, SOCKD_MAXCLIENTQUE) != 0) { if (io.rule.log.error) { snprintf(msg, sizeof(msg), "listen(out): %s", strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(sv[client], &response, SOCKS_FAILURE); closev(sv, ELEMENTS(sv)); break; } /* for accept(). */ if ((flags = fcntl(out, F_GETFL, 0)) == -1 || fcntl(out, F_SETFL, flags | O_NONBLOCK) == -1) { if (io.rule.log.error) { snprintf(msg, sizeof(msg), "fcntl(): %s", strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(sv[client], &response, SOCKS_FAILURE); closev(sv, ELEMENTS(sv)); break; } len = sizeof(boundaddr); if (getsockname(out, &boundaddr, &len) != 0) { if (io.rule.log.error) { snprintf(msg, sizeof(msg), "getsockname(out): %s", strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(sv[client], &response, SOCKS_FAILURE); closev(sv, ELEMENTS(sv)); break; } sockaddr2sockshost(&boundaddr, &response.host); response.reply = (char)sockscode(response.version, SOCKS_SUCCESS); if (io.state.extension.bind) { int pipev[2]; /* * The problem is that both we and the process which receives * the io packet needs to know when the client closes it's * connection, but _we_ need to receive a query from the * client on the connection aswell, and the io process would * get confused about that. We try to hack around that * by making a "dummy" descriptor that the io process can * check as all other controlconnections and which we * can close when the client closes the real controlconnection, * so the io process can detect it. Not very nice, no. */ if (socketpair(AF_LOCAL, SOCK_STREAM, 0, pipev) != 0) { if (io.rule.log.error) { snprintf(msg, sizeof(msg), "socketpair(): %s", strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(sv[client], &response, SOCKS_FAILURE); closev(sv, ELEMENTS(sv)); break; } sv[childpipe] = pipev[0]; sv[ourpipe] = pipev[1]; } /* let client know what address we bound to on it's behalf. */ if (send_response(sv[client], &response) != 0) { iolog(&io.rule, &io.state, OPERATION_ABORT, &io.src.host, &io.src.auth, &response.host, &io.dst.auth, NULL, 0); closev(sv, ELEMENTS(sv)); break; } /* * convert io.dst to the dst for bindreply. src will be * the remote address we accept(2) the bindreply from. */ if (io.state.extension.bind) { /* LINTED possible pointer alignment problem */ io.dst.host.addr.ipv4 = TOCIN(&request->from)->sin_addr; io.dst.auth = io.src.auth; } else { struct sockd_io_direction_t tmp; /* bindreply reverses src/dst. */ tmp = io.dst; io.dst = io.src; io.src = tmp; } emfile = 0; iolist = NULL; /* CONSTCOND */ /* keep accepting connections until * a) we get a remote address that matches what client asked for. * b) til client closes if we are using bind extension. */ while (1) { struct ruleaddress_t ruleaddr; struct sockaddr remoteaddr; /* remote address we accepted. */ struct sockshost_t dsthost; /* host to send reply to. */ struct sockaddr replyaddr; /* address of bindreply socket. */ int replyredirect; int fdbits = -1; fd_set rset; /* some sockets change, most remain the same. */ sv[reply] = -1; sv[remote] = -1; FD_ZERO(&rset); FD_SET(sv[client], &rset); fdbits = MAX(fdbits, sv[client]); if (!emfile) { FD_SET(out, &rset); fdbits = MAX(fdbits, out); } ++fdbits; if ((p = selectn(fdbits, &rset, NULL, NULL, NULL)) <= 0) SERR(p); if (FD_ISSET(sv[client], &rset)) { /* * nothing is normally expected on controlconnection so * assume it's a bind extension query or eof. */ struct request_t query; struct response_t queryresponse; struct negotiate_state_t state; struct sockaddr queryaddr; bzero(&state, sizeof(state)); bzero(&query, sizeof(query)); bzero(&queryresponse, sizeof(queryresponse)); query.auth = request->req.auth; switch (p = recv_sockspacket(sv[client], &query, &state)) { case -1: iolog(&io.rule, &io.state, OPERATION_ABORT, &io.control.host, &io.control.auth, &response.host, &io.dst.auth, NULL, 0); break; case 0: { char *emsg = "client closed"; iolog(&io.rule, &io.state, OPERATION_ABORT, &io.control.host, &io.control.auth, &response.host, &io.dst.auth, emsg, 0); p = -1; /* session ended. */ break; } default: { struct sockd_io_t *fio; slog(LOG_DEBUG, "received request: %s", socks_packet2string(&query, SOCKS_REQUEST)); switch (query.version) { case SOCKS_V4: queryresponse.version = SOCKS_V4REPLY_VERSION; break; case SOCKS_V5: queryresponse.version = query.version; break; default: SERRX(query.version); } sockshost2sockaddr(&query.host, &queryaddr); if ((fio = io_find(iolist, &queryaddr)) == NULL) { queryresponse.host.atype = SOCKS_ADDR_IPV4; queryresponse.host.addr.ipv4.s_addr = htonl(0); queryresponse.host.port = htons(0); } else { SASSERTX(fio->state.command = SOCKS_BINDREPLY); SASSERTX(sockaddrareeq(&fio->dst.laddr, &queryaddr)); sockaddr2sockshost(&fio->src.raddr, &queryresponse.host); } if (fio != NULL) { flushio(mother, sv[client], &queryresponse, fio); emfile = MAX(0, emfile - 3); /* flushio() closes 3. */ iolist = io_remove(iolist, fio); p = 0; } else if ((p = send_response(sv[client], &queryresponse)) != 0) iolog(&io.rule, &io.state, OPERATION_ABORT, &io.control.host, &io.control.auth, &response.host, &io.dst.auth, NULL, 0); } } if (p != 0) break; } if (!FD_ISSET(out, &rset)) continue; len = sizeof(remoteaddr); if ((sv[remote] = acceptn(out, &remoteaddr, &len)) == -1) { if (io.rule.log.error) swarn("%s: accept(out)", function); switch (errno) { #ifdef EPROTO case EPROTO: /* overloaded SVR4 error */ #endif case EWOULDBLOCK: /* BSD */ case ECONNABORTED: /* POSIX */ /* rest appears to be Linux stuff according to apache src. */ #ifdef ECONNRESET case ECONNRESET: #endif #ifdef ETIMEDOUT case ETIMEDOUT: #endif #ifdef EHOSTUNREACH case EHOSTUNREACH: #endif #ifdef ENETUNREACH case ENETUNREACH: #endif continue; case EMFILE: case ENFILE: ++emfile; continue; } break; /* errno is not ok. */ } bindio = io; /* quick init of most stuff. */ bindio.state.command = SOCKS_BINDREPLY; /* no auth at the moment. */ bindio.state.auth.method = AUTHMETHOD_NONE; sockaddr2sockshost(&remoteaddr, &bindio.src.host); /* accepted connection. Does remote address match requested? */ if (io.state.extension.bind || addressmatch(sockshost2ruleaddress(&io.src.host, &ruleaddr), &bindio.src.host, SOCKS_TCP, 1)) { permit = rulespermit(sv[remote], &request->from, &request->to, &bindio.rule, &bindio.state, &bindio.src.host, &bindio.dst.host, msg, sizeof(msg)); bindio.src.auth = bindio.state.auth; } else { bindio.rule.number = 0; bindio.rule.verdict = VERDICT_BLOCK; snprintfn(msg, sizeof(msg), "expected reply from %s", sockshost2string(&io.src.host, a, sizeof(a))); permit = 0; } if (permit && bindio.rule.ss != NULL) if (!session_use(bindio.rule.ss)) { permit = 0; bindio.rule.verdict = VERDICT_BLOCK; snprintf(msg, sizeof(msg), DENY_SESSIONLIMITs); failurecode = SOCKS_FAILURE; bindio.rule.ss = NULL; } iolog(&bindio.rule, &bindio.state, OPERATION_CONNECT, &bindio.src.host, &bindio.src.auth, &bindio.dst.host, &bindio.dst.auth, msg, 0); if (!permit) { close(sv[remote]); continue; /* wait for next connect, but will there be one? */ } if (bindio.rule.bw != NULL) bw_use(bindio.rule.bw); dsthost = io.dst.host; if (redirect(sv[reply], &remoteaddr, &dsthost, SOCKS_BINDREPLY, &bindio.rule.rdr_from, &bindio.rule.rdr_to) != 0) { if (io.rule.log.error) swarn("%s: redirect(sv[reply])", function); close(sv[remote]); close(sv[reply]); SHMEM_UNUSE(&bindio.rule); continue; } /* * Someone connected to socket we listen to on behalf of client. * If we are using the bind extension, or are redirecting * the reply, connect to address client is listening on. * Otherwise, send the data on the connection we already have. */ if (sockshostareeq(&dsthost, &io.dst.host)) replyredirect = 0; else replyredirect = 1; if (bindio.state.extension.bind || replyredirect) { if ((sv[reply] = socket(AF_INET, SOCK_STREAM, 0)) == -1) { if (io.rule.log.error) swarn("%s: socket(SOCK_STREAM)", function); switch (errno) { case EMFILE: case ENFILE: ++emfile; /* FALLTHROUGH */ case ENOBUFS: close(sv[remote]); SHMEM_UNUSE(&bindio.rule); continue; } break; /* errno is not ok. */ } setsockoptions(sv[reply]); replyaddr = boundaddr; /* LINTED pointer casts may be troublesome */ TOIN(&replyaddr)->sin_port = htons(0); if (bind(sv[reply], &replyaddr, sizeof(replyaddr)) != 0) { if (bindio.rule.log.error) swarn("%s: bind(%s)", function, sockaddr2string(&replyaddr, a, sizeof(a))); break; } len = sizeof(replyaddr); /* LINTED pointer casts may be troublesome */ if (getsockname(sv[reply], &replyaddr, &len) != 0) { if (bindio.rule.log.error) swarn("%s: getsockname(sv[reply])", function); if (errno == ENOBUFS) { close(sv[remote]); close(sv[reply]); SHMEM_UNUSE(&bindio.rule); continue; } break; } slog(LOG_DEBUG, "%s: connecting to %s", function, sockshost2string(&dsthost, a, sizeof(a))); if (socks_connect(sv[reply], &dsthost) != 0) { iolog(&bindio.rule, &bindio.state, OPERATION_ABORT, &bindio.src.host, &bindio.src.auth, &dsthost, &bindio.dst.auth, NULL, 0); break; } if (replyredirect) { close(sv[client]); sv[client] = sv[reply]; sv[reply] = -1; } } if (bindio.state.extension.bind) { /* * flushio() will close all descriptors set in io packet, * so dup what we need to keep going. */ if ((bindio.control.s = dup(sv[childpipe])) == -1) { switch (errno) { case EMFILE: case ENFILE: if (bindio.rule.log.error) swarn("%s: dup()", function); ++emfile; close(sv[remote]); continue; default: SERR(bindio.control.s); } } } else bindio.control.s = sv[client]; /* back to blocking. */ if (fcntl(sv[remote], F_SETFL, flags) == -1) { if (bindio.rule.log.error) swarn("%s: fcntl()", function); break; } if (bindio.state.extension.bind || replyredirect) { if (bindio.state.extension.bind) bindio.dst.s = sv[reply]; else /* replyredirect */ bindio.dst.s = sv[client]; bindio.dst.laddr = replyaddr; } else { bindio.dst = bindio.control; bindio.dst.laddr = request->from; } sockshost2sockaddr(&bindio.dst.host, &bindio.dst.raddr); bindio.src.s = sv[remote]; bindio.src.laddr = boundaddr; bindio.src.raddr = remoteaddr; if (bindio.state.extension.bind) /* add to list, client will query. */ iolist = io_add(iolist, &bindio); else { response.host = bindio.dst.host; failed = flushio(mother, sv[client], &response, &bindio); /* flushio() closes these, not closev(). */ sv[client] = sv[remote] = -1; break; /* only one connection to relay and that is done. */ } } close(out); /* not accepting any more connections on this socket. */ if (bindio.state.extension.bind) { struct sockd_io_t *rmio; /* delete any connections we have queued. */ while ((rmio = io_find(iolist, NULL)) != NULL) { close_iodescriptors(rmio); iolist = io_remove(iolist, rmio); } } closev(sv, ELEMENTS(sv)); break; } case SOCKS_CONNECT: { socklen_t sinlen; if (socks_connect(out, &io.dst.host) != 0) { iolog(&io.rule, &io.state, OPERATION_ABORT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, NULL, 0); send_failure(request->s, &response, errno2reply(errno, response.version)); close(request->s); break; } io.src = io.control; io.dst.s = out; sinlen = sizeof(io.dst.raddr); if (getpeername(io.dst.s, &io.dst.raddr, &sinlen) != 0) { if (io.rule.log.error) { snprintf(msg, sizeof(msg), "getpeername(io.dst.s): %s", strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(request->s, &response, SOCKS_FAILURE); close(request->s); break; } sinlen = sizeof(io.dst.laddr); if (getsockname(io.dst.s, &io.dst.laddr, &sinlen) != 0) { if (io.rule.log.error) { snprintf(msg, sizeof(msg), "getsockname(io.dst.s): %s", strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(request->s, &response, SOCKS_FAILURE); close(request->s); break; } sockaddr2sockshost(&io.dst.laddr, &response.host); response.reply = sockscode(response.version, SOCKS_SUCCESS); failed = flushio(mother, request->s, &response, &io); break; } case SOCKS_UDPASSOCIATE: { struct sockaddr client; socklen_t boundlen; int clientfd; /* socket we receive datagram's from client on */ if ((clientfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { if (io.rule.log.error) { snprintf(msg, sizeof(msg), "socket(): %s", strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(request->s, &response, SOCKS_FAILURE); close(request->s); break; } setsockoptions(clientfd); sockshost2sockaddr(&request->req.host, &client); io.src.s = clientfd; io.src.raddr = client; io.src.laddr = request->to; /* LINTED pointer casts may be troublesome */ TOIN(&io.src.laddr)->sin_port = htons(0); /* * bind address for receiving UDP packets so we can tell client * where to send it's packets. */ if (bind(clientfd, &io.src.laddr, sizeof(io.src.laddr)) != 0) { if (io.rule.log.error) { snprintf(msg, sizeof(msg), "bind(%s): %s", sockaddr2string(&io.src.laddr, a, sizeof(a)), strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(request->s, &response, SOCKS_FAILURE); close(request->s); close(clientfd); break; } boundlen = sizeof(io.src.laddr); if (getsockname(clientfd, &io.src.laddr, &boundlen) != 0) { if (io.rule.log.error) { snprintf(msg, sizeof(msg), "getsockname(): %s", strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(request->s, &response, SOCKS_FAILURE); close(request->s); close(clientfd); break; } io.dst.s = out; boundlen = sizeof(io.dst.laddr); if (getsockname(out, &io.dst.laddr, &boundlen) != 0) { if (io.rule.log.error) { snprintf(msg, sizeof(msg), "getsockname(): %s", strerror(errno)); iolog(&io.rule, &io.state, OPERATION_CONNECT, &io.src.host, &io.src.auth, &io.dst.host, &io.dst.auth, msg, 0); } send_failure(request->s, &response, SOCKS_FAILURE); close(request->s); close(clientfd); break; } /* remote out can change each time, set to INADDR_ANY for now. */ bzero(&io.dst.raddr, sizeof(io.dst.raddr)); /* LINTED pointer casts may be troublesome */ TOIN(&io.dst.raddr)->sin_family = AF_INET; /* LINTED pointer casts may be troublesome */ TOIN(&io.dst.raddr)->sin_addr.s_addr = htonl(INADDR_ANY); /* LINTED pointer casts may be troublesome */ TOIN(&io.dst.raddr)->sin_port = htons(0); if (request->req.flag & SOCKS_USECLIENTPORT) /* LINTED pointer casts may be troublesome */ if (TOIN(&client)->sin_port == TOIN(&io.dst.laddr)->sin_port) response.flag |= SOCKS_USECLIENTPORT; sockaddr2sockshost(&io.src.laddr, &response.host); response.reply = (char)sockscode(response.version, SOCKS_SUCCESS); failed = flushio(mother, request->s, &response, &io); break; } default: SERRX(request->req.command); } if (failed) { SHMEM_UNUSE(&io.rule); close(out); } #if DIAGNOSTIC else SASSERT(close(out) == -1 && errno == EBADF); #endif } static int flushio(mother, clientcontrol, response, io) int mother; int clientcontrol; const struct response_t *response; struct sockd_io_t *io; { const char *function = "flushio()"; socklen_t len; int sndlowat, value; float skew; switch (io->state.command) { case SOCKS_UDPASSOCIATE: sndlowat = SOCKD_BUFSIZEUDP; skew = 1.0; /* no skew. */ break; default: sndlowat = SOCKD_BUFSIZETCP; skew = LOWATSKEW; } /* set socket options for relay process. */ #if SOCKD_IOMAX == 1 /* only one client per process; doesn't matter much whether we block. */ io->src.sndlowat = sndlowat; io->dst.sndlowat = sndlowat; #elif HAVE_SO_SNDLOWAT len = sizeof(value); if (getsockopt(io->src.s, SOL_SOCKET, SO_SNDBUF, &value, &len) != 0) swarn("%s: getsockopt(io->src.s, SO_SNDBUF)", function); sndlowat = MIN(sndlowat, value * skew); if (setsockopt(io->src.s, SOL_SOCKET, SO_SNDLOWAT, &sndlowat, sizeof(sndlowat)) != 0) swarn("%s: setsockopt(in, SO_SNDLOWAT)", function); len = sizeof(io->src.sndlowat); if (getsockopt(io->src.s, SOL_SOCKET, SO_SNDLOWAT, &io->src.sndlowat, &len) != 0) swarn("%s: getsockopt(io-.src.s, SO_SNDLOWAT)", function); len = sizeof(value); if (getsockopt(io->dst.s, SOL_SOCKET, SO_SNDBUF, &value, &len) != 0) swarn("%s: getsockopt(io->dst.s, SO_SNDBUF)", function); sndlowat = MIN(sndlowat, value * skew); if (setsockopt(io->dst.s, SOL_SOCKET, SO_SNDLOWAT, &sndlowat, sizeof(sndlowat)) != 0) swarn("%s: setsockopt(io->dst.s, SO_SNDLOWAT", function); len = sizeof(io->dst.sndlowat); if (getsockopt(io->src.s, SOL_SOCKET, SO_SNDLOWAT, &io->dst.sndlowat, &len) != 0) swarn("%s: getsockopt(io->src.s, SO_SNDLOWAT)", function); #else /* SOCKD_IOMAX > 1 && !HAVE_SO_SNDLOWAT. */ switch (io->state.command) { case SOCKS_UDPASSOCIATE: len = sizeof(sndlowat); if (getsockopt(io->src.s, SOL_SOCKET, SO_SNDBUF, &sndlowat, &len) != 0) { swarn("%s: getsockopt(io->src.s, SO_SNDBUF)", function); io->src.sndlowat = SOCKD_BUFSIZEUDP; } else if (sndlowat == 0) io->src.sndlowat = SOCKD_BUFSIZEUDP; else io->src.sndlowat = sndlowat; len = sizeof(sndlowat); if (getsockopt(io->dst.s, SOL_SOCKET, SO_SNDBUF, &sndlowat, &len) != 0) { swarn("%s: getsockopt(io->dst.s, SO_SNDBUF)", function); io->dst.sndlowat = SOCKD_BUFSIZEUDP; } else if (sndlowat == 0) io->dst.sndlowat = SOCKD_BUFSIZEUDP; else io->dst.sndlowat = sndlowat; break; default: /* TCP; use minimum guess. */ io->src.sndlowat = SO_SNDLOWAT_SIZE; io->dst.sndlowat = SO_SNDLOWAT_SIZE; } #endif /* SOCKD_IOMAX > 1 && !HAVE_SO_SNDLOWAT */ SASSERTX(io->src.sndlowat > 0 && io->dst.sndlowat >= sizeof(struct udpheader_t)); if (send_response(clientcontrol, response) == 0) if (send_io(mother, io) != 0) serr(EXIT_FAILURE, "%s: sending io to mother failed", function); close_iodescriptors(io); return 0; } static void proctitleupdate(from) const struct sockaddr *from; { setproctitle("requestcompleter: %s", from == NULL ? "0/1" : "1/1"); } static struct sockd_io_t * io_add(iolist, newio) struct sockd_io_t *iolist; const struct sockd_io_t *newio; { const char *function = "io_add()"; struct sockd_io_t *io, *previo; SASSERTX(newio->next == NULL); previo = io = iolist; while (io != NULL) { previo = io; io = io->next; } if ((io = (struct sockd_io_t *)malloc(sizeof(*newio))) == NULL) swarnx("%s: %s", function, NOMEM); else { *io = *newio; if (previo == NULL) previo = io; else previo->next = io; } return iolist == NULL ? previo : iolist; } static struct sockd_io_t * io_remove(iolist, rmio) struct sockd_io_t *iolist; struct sockd_io_t *rmio; { struct sockd_io_t *io, *previo; SASSERTX(iolist != NULL); if (iolist == rmio) { iolist = rmio->next; free(rmio); return iolist; } previo = iolist; io = iolist->next; while (io != NULL) { if (io == rmio) { previo->next = rmio->next; free(rmio); break; } previo = io; io = io->next; } return iolist; } static struct sockd_io_t * io_find(iolist, addr) struct sockd_io_t *iolist; const struct sockaddr *addr; { struct sockd_io_t *io; if (addr == NULL) return iolist; io = iolist; while (io != NULL) if (sockaddrareeq(&io->src.laddr, addr) || sockaddrareeq(&io->dst.laddr, addr) || sockaddrareeq(&io->control.laddr, addr)) return io; else io = io->next; /* XXX should actually check that the io is still "active". */ return NULL; } static int serverchain(s, req, res, src, dst) int s; const struct request_t *req; struct response_t *res; struct sockd_io_direction_t *src, *dst; { struct route_t *route; struct socks_t packet; packet.req = *req; packet.auth = src->auth; /* * If it's a non-standard method, convert to the closest standard method * and offer that to the remote server. Keep the original method * though, since that's what the client authenticated to us via. */ switch (packet.auth.method) { case AUTHMETHOD_NONE: case AUTHMETHOD_UNAME: break; case AUTHMETHOD_PAM: { /* same as uname, just copy name/password. */ /* it's a union, make a copy first. */ const struct authmethod_pam_t pam = packet.auth.mdata.pam; strcpy((char *)packet.auth.mdata.uname.name, (const char *)pam.name); strcpy((char *)packet.auth.mdata.uname.password, (const char *)pam.password); packet.auth.method = AUTHMETHOD_UNAME; break; } case AUTHMETHOD_RFC931: /* has to beceome AUTHMETHOD_NONE. */ packet.auth.method = AUTHMETHOD_NONE; break; default: SERRX(packet.auth.method); } errno = 0; if ((route = socks_connectroute(s, &packet, &src->host, &dst->host)) == NULL) return -1; if (socks_negotiate(s, s, &packet, route) != 0) return -1; *res = packet.res; /* when we reply, we have to use our clients auth ... */ res->auth = &src->auth; /* ... but when we talk to remote, we have to use remotes auth. */ dst->auth = packet.auth; return 0; } static void send_failure(s, response, failure) int s; const struct response_t *response; int failure; { struct response_t newresponse; /* keep const. */ newresponse = *response; newresponse.reply = (char)sockscode(newresponse.version, failure); send_response(s, &newresponse); } dante-1.1.19.dfsg/sockd/redirect.c0000644000175000017500000000456607700305361015362 0ustar roamroam/* * Copyright (c) 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: redirect.c,v 1.4 2003/07/01 13:21:53 michaels Exp $"; const char module_redirect_version[] = "$Id: redirect.c,v 1.4 2003/07/01 13:21:53 michaels Exp $"; void redirectsetup(void) { } int redirect(s, addr, host, command, from, to) int s; struct sockaddr *addr; struct sockshost_t *host; int command; const struct ruleaddress_t *from; const struct ruleaddress_t *to; { return 0; } dante-1.1.19.dfsg/sockd/redirect_key.c0000644000175000017500000000056407700305361016224 0ustar roamroam/* * $Id: redirect_key.c,v 1.3 2003/07/01 13:21:53 michaels Exp $ * * Copyright (c) 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. */ #include "common.h" static const char rcsid[] = "$Id: redirect_key.c,v 1.3 2003/07/01 13:21:53 michaels Exp $"; const char *module_redirect_ipaddrv[] = { NULL }; const int module_redirect_ipaddrc = 0; dante-1.1.19.dfsg/sockd/config_scan.c0000644000175000017500000033077610351604247016040 0ustar roamroam#define yy_create_buffer socks_yy_create_buffer #define yy_delete_buffer socks_yy_delete_buffer #define yy_scan_buffer socks_yy_scan_buffer #define yy_scan_string socks_yy_scan_string #define yy_scan_bytes socks_yy_scan_bytes #define yy_flex_debug socks_yy_flex_debug #define yy_init_buffer socks_yy_init_buffer #define yy_flush_buffer socks_yy_flush_buffer #define yy_load_buffer_state socks_yy_load_buffer_state #define yy_switch_to_buffer socks_yy_switch_to_buffer #define yyin socks_yyin #define yyleng socks_yyleng #define yylex socks_yylex #define yyout socks_yyout #define yyrestart socks_yyrestart #define yytext socks_yytext #define yylineno socks_yylineno #line 20 "config_scan.c" /* $OpenBSD: flex.skl,v 1.8 2004/02/09 11:38:31 espie Exp $ */ /* A lexical scanner generated by flex */ /* Scanner skeleton version: * $Header: /cvs/src/usr.bin/lex/flex.skl,v 1.8 2004/02/09 11:38:31 espie Exp $ */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #include #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include #include /* Use prototypes in function declarations. */ #define YY_USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ #ifdef __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch #pragma warn -use #include #include #define YY_USE_CONST #define YY_USE_PROTOS #endif #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define YY_BUF_SIZE 16384 typedef struct yy_buffer_state *YY_BUFFER_STATE; extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yyless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int yy_size_t; struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define YY_CURRENT_BUFFER yy_current_buffer /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) #define YY_USES_REJECT #define yywrap() 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yytext_ptr = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_NUM_RULES 84 #define YY_END_OF_BUFFER 85 static yyconst short int yy_acclist[750] = { 0, 26, 26, 85, 83, 84, 79, 83, 84, 81, 84, 80, 83, 84, 78, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 21, 83, 84, 78, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 22, 83, 84, 83, 84, 25, 83, 84, 83, 84, 83, 84, 83, 84, 26, 83, 84, 26, 79, 83, 84, 26, 80, 83, 84, 26, 78, 83, 84, 26, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 23, 83, 84, 23, 80, 83, 84, 23, 78, 83, 84, 23, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 19, 78, 83, 84, 12, 83, 84, 12, 83, 84, 12, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 24, 83, 84, 24, 80, 83, 84, 24, 78, 83, 84, 24, 83, 84, 20, 78, 83, 84, 18, 83, 84, 83, 84, 83, 84, 83, 84, 83, 84, 79, 80, 80, 78, 82, 44, 21, 78, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 44, 22, 22, 26, 26, 79, 26, 80, 26, 80, 26, 26, 78, 23, 23, 80, 23, 23, 78, 12, 19, 78, 24, 24, 80, 24, 24, 78, 20, 78, 18, 18, 78, 73, 45, 21, 21, 21, 78, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 73, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 45, 26, 26, 78, 23, 23, 78, 70, 19, 78, 24, 24, 78, 20, 78, 29, 30, 78, 62, 43, 49, 72, 52, 21, 21, 78, 22, 22, 62, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 43, 22, 22, 22, 22, 22, 22, 22, 22, 49, 22, 22, 72, 22, 22, 22, 22, 22, 22, 22, 22, 22, 52, 11, 5, 26, 26, 26, 78, 14, 23, 23, 23, 78, 66, 19, 78, 24, 24, 24, 78, 20, 78, 31, 71, 32, 33, 48, 21, 22, 22, 71, 22, 22, 22, 22, 22, 22, 32, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 21, 22, 22, 22, 22, 22, 22, 22, 33, 48, 22, 22, 26, 26, 16, 23, 23, 19, 78, 24, 24, 20, 78, 63, 64, 22, 22, 63, 22, 22, 22, 10, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 64, 21, 22, 22, 22, 22, 22, 22, 22, 22, 21, 21, 21, 26, 26, 23, 23, 67, 69, 24, 24, 77, 39, 74, 35, 22, 21, 22, 22, 39, 22, 22, 22, 22, 22, 22, 22, 74, 22, 22, 22, 21, 22, 22, 22, 22, 22, 22, 22, 22, 35, 21, 21, 21, 6, 26, 77, 26, 13, 23, 77, 23, 24, 77, 24, 77, 50, 46, 38, 40, 59, 22, 21, 22, 22, 22, 22, 22, 50, 22, 46, 22, 22, 22, 22, 21, 22, 22, 38, 22, 22, 40, 22, 22, 22, 59, 21, 21, 21, 9, 26, 77, 23, 77, 68, 1, 2, 24, 77, 77, 41, 61, 56, 37, 58, 22, 41, 21, 22, 22, 22, 22, 61, 22, 22, 22, 22, 56, 22, 22, 37, 22, 21, 22, 22, 22, 22, 58, 21, 21, 21, 8, 26, 77, 23, 77, 4, 24, 77, 28, 21, 22, 22, 22, 21, 22, 22, 22, 21, 22, 22, 22, 21, 21, 21, 15, 3, 27, 42, 21, 22, 22, 22, 21, 22, 22, 22, 42, 21, 22, 22, 22, 21, 21, 21, 17, 65, 76, 55, 21, 22, 65, 22, 22, 21, 22, 22, 22, 76, 22, 21, 22, 22, 22, 21, 55, 21, 21, 7, 51, 57, 76, 76, 36, 21, 51, 22, 57, 22, 21, 22, 21, 22, 76, 22, 76, 21, 22, 22, 36, 22, 21, 21, 60, 75, 22, 60, 21, 22, 21, 21, 21, 22, 75, 22, 21, 21, 34, 53, 21, 22, 21, 75, 22, 34, 21, 21, 53, 21, 22, 21, 47, 47, 21, 47, 22, 47, 21, 54, 21, 54 } ; static yyconst short int yy_accept[948] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 6, 9, 11, 14, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 107, 110, 112, 114, 116, 119, 123, 127, 131, 134, 136, 138, 140, 142, 145, 149, 153, 156, 158, 160, 162, 164, 166, 168, 172, 175, 178, 181, 183, 185, 187, 189, 191, 193, 195, 198, 202, 206, 209, 213, 216, 218, 220, 222, 224, 225, 226, 227, 227, 228, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 230, 230, 230, 230, 230, 231, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 260, 261, 262, 262, 262, 262, 262, 263, 265, 267, 269, 270, 272, 272, 272, 272, 272, 272, 273, 275, 276, 278, 278, 278, 278, 278, 278, 279, 281, 281, 281, 281, 281, 282, 284, 285, 287, 289, 290, 291, 291, 291, 291, 291, 291, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 330, 330, 330, 330, 330, 331, 333, 333, 333, 333, 333, 333, 334, 336, 336, 336, 337, 337, 337, 339, 339, 339, 339, 340, 342, 344, 344, 344, 344, 345, 346, 346, 346, 347, 347, 348, 348, 348, 348, 348, 348, 348, 348, 348, 349, 349, 349, 349, 349, 349, 349, 349, 350, 350, 350, 351, 351, 351, 351, 351, 351, 351, 351, 351, 352, 353, 354, 355, 356, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 369, 370, 371, 372, 373, 374, 375, 376, 378, 378, 379, 381, 382, 383, 384, 385, 386, 387, 388, 389, 391, 392, 393, 393, 393, 393, 394, 395, 397, 397, 398, 398, 398, 398, 399, 400, 402, 402, 403, 403, 403, 405, 405, 405, 405, 406, 407, 409, 411, 411, 411, 412, 412, 412, 412, 413, 413, 413, 413, 413, 413, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 414, 416, 416, 416, 416, 417, 418, 420, 421, 422, 423, 424, 425, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 447, 448, 449, 449, 449, 449, 449, 449, 450, 451, 451, 451, 452, 452, 453, 454, 454, 454, 454, 456, 456, 456, 456, 457, 458, 460, 460, 460, 460, 460, 460, 460, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 463, 463, 465, 466, 467, 468, 470, 471, 472, 473, 474, 475, 476, 477, 478, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 492, 492, 492, 492, 493, 494, 494, 494, 494, 495, 496, 497, 498, 498, 498, 498, 498, 499, 500, 500, 500, 501, 501, 501, 501, 501, 502, 502, 502, 502, 502, 502, 502, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 504, 504, 504, 504, 505, 506, 507, 509, 510, 511, 512, 513, 514, 515, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 530, 531, 532, 533, 533, 534, 534, 534, 536, 537, 538, 538, 538, 540, 541, 541, 541, 541, 541, 543, 544, 544, 544, 545, 545, 545, 545, 545, 545, 545, 546, 547, 547, 547, 547, 547, 547, 547, 548, 548, 549, 549, 549, 550, 550, 550, 550, 551, 552, 553, 554, 555, 556, 558, 560, 561, 562, 563, 564, 565, 566, 568, 569, 571, 572, 573, 575, 576, 577, 578, 578, 578, 579, 581, 581, 581, 583, 584, 584, 584, 585, 586, 588, 588, 588, 589, 590, 590, 590, 590, 590, 591, 591, 592, 592, 593, 593, 593, 593, 593, 593, 594, 594, 594, 594, 596, 597, 598, 599, 600, 602, 602, 602, 603, 604, 605, 607, 608, 610, 611, 612, 613, 614, 615, 617, 618, 619, 620, 621, 621, 623, 623, 623, 625, 626, 626, 628, 628, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 630, 631, 632, 633, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 644, 645, 645, 646, 647, 647, 647, 647, 647, 647, 647, 648, 648, 648, 648, 648, 648, 648, 648, 649, 650, 651, 652, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 664, 664, 665, 665, 666, 666, 666, 666, 666, 667, 667, 667, 667, 667, 668, 668, 668, 669, 671, 672, 673, 673, 674, 675, 675, 675, 676, 678, 679, 680, 681, 682, 683, 685, 686, 687, 688, 689, 690, 690, 690, 691, 692, 692, 692, 693, 693, 693, 693, 695, 697, 698, 698, 699, 700, 701, 703, 705, 706, 707, 709, 710, 711, 712, 713, 713, 713, 714, 714, 714, 714, 716, 716, 717, 718, 719, 720, 721, 723, 724, 725, 726, 726, 727, 727, 728, 728, 729, 730, 732, 734, 735, 737, 737, 737, 737, 738, 739, 740, 741, 741, 742, 744, 746, 747, 748, 750, 750 } ; static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 16, 17, 1, 18, 19, 20, 1, 1, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 1, 22, 1, 1, 23, 1, 24, 25, 26, 27, 28, 29, 30, 31, 32, 21, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 21, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst int yy_meta[48] = { 0, 1, 2, 3, 1, 1, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 1, 1, 1, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 4, 4, 4, 4, 4, 4, 4 } ; static yyconst short int yy_base[991] = { 0, 0, 0, 47, 0, 2685, 2684, 78, 0, 83, 98, 2704, 2703, 140, 161, 108, 152, 183, 204, 193, 194, 234, 0, 2702, 2701, 224, 225, 269, 290, 312, 0, 81, 94, 115, 246, 351, 359, 2717, 2724, 94, 2724, 0, 2709, 2712, 105, 191, 2686, 2667, 2672, 65, 96, 103, 2674, 141, 110, 163, 2673, 2668, 2676, 2700, 0, 369, 380, 392, 386, 387, 398, 401, 413, 414, 428, 429, 433, 440, 446, 447, 451, 463, 403, 2724, 2674, 2668, 2677, 0, 199, 0, 491, 2700, 2665, 135, 2661, 2663, 0, 144, 501, 2696, 2657, 2660, 2672, 2666, 2653, 2674, 2685, 2672, 2724, 2671, 2650, 140, 245, 2660, 2645, 2645, 2648, 0, 210, 511, 2681, 2676, 527, 2645, 2657, 2654, 2652, 256, 0, 0, 0, 2671, 2724, 2641, 2640, 2638, 2642, 2641, 154, 2647, 2629, 2633, 2627, 2626, 2642, 209, 2620, 2623, 2628, 167, 2626, 267, 2619, 2626, 2634, 2724, 2631, 2634, 2650, 0, 568, 576, 584, 594, 0, 588, 589, 592, 595, 606, 607, 610, 623, 619, 626, 630, 637, 641, 652, 648, 657, 663, 664, 675, 680, 691, 687, 703, 707, 712, 719, 716, 2616, 2619, 2618, 2615, 0, 426, 0, 0, 745, 755, 2616, 2609, 2609, 2609, 2611, 0, 294, 763, 771, 2606, 2610, 2610, 2618, 2615, 2724, 2635, 2602, 2598, 2601, 2612, 0, 412, 779, 787, 2630, 0, 0, 234, 2603, 2597, 2596, 2626, 2625, 2604, 2603, 2603, 2594, 2599, 401, 2590, 2582, 2596, 2588, 2594, 2589, 2575, 2595, 2581, 2576, 2585, 2587, 393, 2573, 412, 2581, 2575, 2570, 2568, 2581, 2577, 2567, 2724, 797, 0, 807, 815, 808, 809, 813, 814, 825, 820, 832, 837, 849, 850, 855, 864, 838, 861, 867, 870, 876, 881, 890, 896, 895, 899, 908, 914, 915, 920, 929, 934, 935, 940, 2564, 2578, 2568, 469, 969, 979, 2567, 2578, 2575, 2563, 2555, 989, 997, 2560, 2547, 2724, 2550, 2514, 2538, 2503, 2498, 2502, 1007, 1015, 2525, 2497, 2490, 2497, 2724, 2724, 0, 2517, 2513, 2472, 2724, 2481, 2485, 2473, 2484, 2481, 2474, 2467, 419, 2724, 2455, 2456, 2448, 2446, 2433, 2443, 2433, 2724, 2426, 2431, 2724, 2418, 2403, 2409, 2407, 2404, 2398, 2384, 2383, 2412, 1023, 1031, 2409, 1024, 1025, 1028, 1039, 1040, 1043, 1046, 1055, 1058, 1067, 1062, 1071, 1076, 1080, 1085, 1089, 1094, 1106, 1107, 1111, 2373, 1118, 1123, 1124, 1130, 1135, 1136, 1148, 1155, 1154, 1161, 1167, 2724, 2370, 2374, 2327, 2338, 1193, 1203, 1211, 2337, 2724, 2327, 2323, 2333, 1219, 1227, 1235, 2312, 2724, 2337, 2310, 0, 2322, 2261, 2253, 1243, 1251, 1259, 0, 2251, 2258, 2724, 2283, 2282, 2248, 2724, 2272, 2234, 2239, 2168, 2180, 2724, 2164, 2167, 2166, 2173, 2168, 2164, 2146, 2132, 2131, 2127, 2110, 2118, 2103, 2111, 2094, 2103, 2724, 2085, 2080, 599, 2111, 1139, 1252, 1270, 1255, 1256, 1259, 1274, 1271, 1275, 1286, 1287, 1290, 1301, 1304, 1307, 1308, 1313, 1319, 2088, 1324, 1331, 1328, 1343, 1344, 1348, 1349, 1355, 1361, 656, 2087, 2086, 2064, 2066, 1396, 2095, 2075, 2064, 2724, 2059, 1406, 2090, 2063, 2080, 2062, 2067, 2029, 2025, 2047, 1416, 2062, 2015, 1983, 1981, 0, 2008, 1985, 1967, 1958, 1964, 1941, 1928, 1937, 1943, 1942, 1920, 1916, 1897, 1895, 1891, 2724, 1879, 1874, 1880, 1876, 1889, 1886, 1877, 1863, 1858, 1867, 1851, 1845, 1367, 1848, 1409, 1413, 1366, 1414, 1418, 1425, 1429, 1430, 1434, 1441, 1446, 1450, 1453, 1457, 1842, 1466, 1469, 1473, 1485, 1480, 1491, 1492, 1496, 1849, 1841, 1827, 1828, 1821, 1825, 1827, 1530, 1540, 1792, 1794, 1804, 1548, 1556, 2724, 2724, 1786, 1808, 1767, 1765, 1564, 1572, 1773, 1753, 0, 1782, 1745, 1762, 1711, 2724, 1706, 1688, 1692, 1694, 1692, 1671, 2724, 1676, 1667, 1650, 1635, 1646, 1643, 1638, 1622, 1625, 1634, 1610, 2724, 1622, 1601, 1608, 1565, 1614, 1503, 1566, 1569, 1572, 1578, 1584, 1585, 1589, 1596, 1601, 1605, 1610, 1587, 1617, 1621, 1622, 1626, 1633, 1642, 1638, 1649, 1602, 1584, 1592, 1588, 2724, 1585, 1558, 1675, 1588, 2724, 1564, 1549, 1683, 1541, 1508, 0, 1511, 284, 1691, 1526, 1487, 1477, 0, 1490, 1456, 1457, 1464, 1463, 1456, 0, 2724, 1444, 1452, 1430, 1432, 1435, 1434, 2724, 1413, 2724, 1411, 1399, 2724, 1391, 1397, 1390, 1684, 1378, 1685, 1688, 1689, 1700, 1736, 1701, 1760, 1761, 1764, 1767, 1382, 1779, 1776, 1783, 1788, 1792, 1795, 1799, 1359, 1359, 1352, 1339, 1352, 2724, 1827, 1348, 1338, 1835, 2724, 1360, 1317, 2724, 2724, 1843, 1333, 1313, 2724, 2724, 1312, 1299, 1282, 1280, 2724, 1273, 2724, 1280, 2724, 1260, 1259, 1254, 1244, 1241, 2724, 1171, 1160, 1165, 1836, 1164, 1840, 1841, 1845, 1852, 1880, 1154, 1912, 1150, 1873, 1874, 1877, 1878, 1906, 1158, 1907, 1912, 1913, 1919, 1141, 1126, 1133, 2724, 1129, 0, 1109, 1112, 0, 2724, 1125, 0, 1102, 2724, 1105, 1092, 1095, 1096, 1085, 1084, 1070, 1079, 1070, 1071, 1043, 1060, 1049, 1034, 1038, 1924, 1928, 1931, 451, 1018, 1940, 1944, 1947, 1026, 1951, 1958, 1962, 1029, 1019, 1016, 973, 2724, 961, 2724, 2724, 953, 950, 931, 934, 928, 943, 2724, 919, 926, 906, 898, 896, 882, 897, 887, 1971, 1965, 1976, 454, 874, 1977, 2019, 1982, 875, 2043, 2044, 2048, 871, 853, 858, 848, 2724, 847, 2724, 820, 822, 839, 843, 834, 826, 799, 781, 779, 2724, 731, 722, 721, 2055, 2059, 2060, 495, 721, 2064, 2106, 2129, 2152, 2167, 0, 718, 2085, 2108, 2161, 0, 697, 698, 2724, 2724, 2724, 684, 682, 705, 703, 678, 680, 2724, 669, 668, 673, 0, 2111, 2162, 575, 651, 2165, 2207, 2246, 2255, 650, 2249, 2166, 2250, 636, 638, 2724, 631, 628, 2724, 602, 574, 549, 2254, 450, 512, 2261, 0, 2295, 502, 2319, 2320, 501, 472, 452, 2724, 446, 2724, 612, 432, 2323, 0, 2324, 412, 0, 377, 384, 578, 352, 2335, 349, 2724, 282, 250, 0, 2338, 249, 2724, 0, 2724, 2372, 2381, 2390, 2399, 2404, 2408, 2414, 2420, 2429, 2438, 2447, 2456, 2461, 2468, 2477, 2482, 260, 2485, 2489, 2492, 2496, 2499, 2506, 2511, 2514, 2518, 2523, 2526, 250, 2529, 233, 184, 2532, 153, 2535, 141, 2542, 90, 2551, 2554, 2563, 2572, 2581, 2590 } ; static yyconst short int yy_def[991] = { 0, 946, 1, 946, 3, 1, 1, 1, 7, 7, 7, 7, 7, 947, 947, 7, 7, 948, 948, 7, 7, 7, 21, 7, 7, 7, 7, 949, 949, 946, 29, 7, 7, 7, 7, 29, 29, 946, 946, 946, 946, 950, 951, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 952, 953, 952, 954, 954, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 946, 946, 946, 946, 946, 955, 955, 956, 955, 955, 946, 946, 946, 946, 957, 958, 957, 957, 946, 946, 946, 946, 946, 946, 959, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 960, 961, 960, 960, 962, 946, 946, 946, 946, 946, 946, 950, 950, 963, 964, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 952, 953, 965, 953, 61, 61, 966, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 946, 946, 946, 946, 955, 955, 956, 956, 955, 955, 946, 946, 946, 946, 946, 957, 958, 957, 94, 946, 946, 946, 946, 946, 946, 967, 946, 946, 946, 946, 960, 961, 960, 115, 968, 969, 118, 946, 946, 946, 946, 970, 971, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 965, 972, 965, 61, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 946, 946, 946, 946, 955, 955, 946, 946, 946, 946, 946, 94, 94, 946, 946, 946, 946, 946, 973, 946, 946, 946, 115, 115, 974, 946, 946, 946, 946, 946, 975, 976, 971, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 972, 262, 263, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 953, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 946, 946, 946, 946, 946, 955, 955, 955, 946, 946, 946, 946, 946, 957, 305, 957, 946, 946, 946, 946, 977, 946, 946, 946, 960, 316, 960, 978, 946, 946, 946, 979, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 260, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 63, 63, 63, 63, 63, 953, 946, 946, 946, 946, 955, 955, 946, 946, 946, 946, 957, 957, 946, 946, 946, 971, 946, 946, 946, 960, 960, 971, 946, 946, 980, 981, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 63, 953, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 63, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 955, 955, 946, 946, 946, 957, 494, 946, 946, 946, 946, 946, 946, 960, 503, 946, 946, 982, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 63, 260, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 63, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 955, 955, 946, 946, 946, 957, 957, 946, 983, 946, 946, 960, 960, 946, 946, 984, 946, 946, 946, 946, 946, 946, 985, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 63, 260, 63, 63, 63, 63, 946, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 63, 63, 63, 260, 260, 260, 946, 946, 946, 955, 946, 946, 957, 946, 946, 946, 946, 946, 960, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 63, 260, 63, 63, 63, 63, 263, 953, 747, 986, 63, 63, 63, 63, 63, 260, 63, 63, 63, 63, 260, 260, 260, 946, 946, 955, 946, 946, 957, 946, 946, 960, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 260, 63, 63, 63, 747, 260, 63, 63, 63, 260, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 987, 946, 946, 946, 946, 946, 946, 946, 946, 260, 63, 63, 63, 747, 260, 63, 946, 63, 260, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 946, 946, 946, 987, 988, 946, 946, 946, 946, 946, 946, 946, 260, 63, 63, 63, 747, 260, 63, 989, 990, 989, 988, 831, 260, 63, 63, 63, 260, 260, 260, 946, 946, 946, 946, 946, 988, 988, 946, 946, 946, 946, 946, 946, 260, 63, 63, 747, 260, 63, 946, 988, 988, 260, 63, 63, 63, 260, 260, 946, 946, 946, 946, 946, 946, 946, 63, 747, 260, 63, 894, 946, 260, 63, 63, 260, 260, 946, 946, 946, 946, 747, 260, 63, 260, 63, 260, 260, 946, 946, 747, 260, 63, 260, 946, 946, 747, 260, 63, 260, 946, 260, 0, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946 } ; static yyconst short int yy_nxt[2772] = { 0, 38, 39, 40, 38, 41, 38, 38, 38, 42, 42, 42, 42, 42, 42, 42, 42, 38, 38, 38, 38, 38, 43, 38, 38, 44, 45, 46, 47, 48, 38, 38, 49, 38, 50, 51, 52, 38, 53, 38, 54, 55, 56, 57, 58, 38, 38, 38, 38, 39, 40, 38, 41, 59, 60, 38, 61, 61, 61, 61, 61, 61, 61, 61, 38, 38, 38, 38, 62, 43, 38, 62, 63, 64, 65, 66, 67, 62, 62, 68, 62, 69, 70, 71, 62, 72, 62, 73, 74, 75, 76, 77, 62, 62, 62, 79, 123, 721, 38, 124, 38, 138, 139, 38, 38, 38, 38, 38, 80, 81, 38, 38, 38, 38, 38, 38, 38, 119, 38, 38, 38, 38, 38, 80, 81, 38, 82, 142, 140, 129, 119, 143, 38, 141, 88, 89, 90, 130, 147, 131, 91, 82, 84, 40, 120, 85, 125, 148, 659, 86, 86, 86, 86, 86, 86, 86, 86, 121, 122, 199, 586, 125, 87, 84, 40, 145, 85, 200, 212, 38, 86, 86, 86, 86, 86, 86, 86, 86, 88, 89, 90, 146, 212, 87, 91, 39, 40, 149, 93, 236, 237, 505, 94, 94, 94, 94, 94, 94, 94, 94, 38, 193, 249, 150, 194, 95, 39, 40, 250, 93, 38, 38, 125, 94, 94, 94, 94, 94, 94, 94, 94, 38, 132, 96, 96, 133, 95, 125, 134, 97, 97, 98, 98, 99, 99, 244, 100, 100, 101, 245, 499, 38, 38, 102, 102, 102, 102, 102, 102, 102, 102, 38, 103, 104, 105, 110, 110, 424, 123, 111, 111, 124, 106, 38, 107, 112, 112, 229, 108, 319, 109, 39, 40, 212, 114, 120, 945, 320, 115, 115, 115, 115, 115, 115, 115, 115, 38, 212, 121, 122, 154, 116, 39, 40, 252, 114, 125, 716, 717, 115, 115, 115, 115, 115, 115, 115, 115, 38, 253, 944, 254, 125, 116, 38, 39, 40, 38, 41, 38, 38, 38, 117, 117, 117, 117, 117, 117, 117, 117, 38, 38, 38, 38, 118, 43, 38, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 157, 943, 158, 158, 158, 158, 158, 158, 158, 158, 154, 155, 941, 159, 159, 159, 159, 159, 159, 159, 159, 160, 154, 155, 346, 159, 159, 159, 159, 159, 159, 159, 159, 160, 161, 161, 939, 938, 125, 168, 162, 165, 161, 169, 166, 161, 161, 167, 163, 161, 164, 145, 193, 125, 161, 194, 161, 161, 347, 161, 332, 161, 161, 333, 188, 171, 937, 146, 170, 161, 174, 161, 161, 172, 173, 175, 176, 161, 349, 434, 177, 179, 350, 435, 161, 161, 161, 161, 161, 161, 178, 161, 181, 935, 183, 161, 161, 180, 161, 161, 933, 182, 161, 161, 161, 161, 925, 161, 185, 161, 184, 161, 828, 932, 154, 154, 186, 396, 154, 187, 860, 161, 196, 931, 197, 197, 197, 197, 197, 197, 197, 197, 205, 397, 206, 206, 206, 206, 206, 206, 206, 206, 220, 891, 221, 221, 221, 221, 221, 221, 221, 221, 223, 930, 928, 223, 223, 223, 223, 154, 223, 223, 223, 223, 223, 223, 223, 223, 926, 223, 223, 223, 224, 223, 223, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 261, 924, 156, 156, 156, 156, 156, 156, 156, 156, 262, 262, 262, 262, 262, 262, 262, 262, 263, 263, 263, 263, 263, 263, 263, 263, 155, 923, 159, 159, 159, 159, 159, 159, 159, 159, 160, 161, 161, 940, 154, 161, 911, 154, 161, 161, 161, 161, 161, 161, 264, 161, 161, 265, 161, 161, 161, 266, 534, 161, 535, 922, 536, 267, 268, 161, 161, 161, 161, 161, 269, 270, 161, 271, 934, 161, 161, 154, 161, 161, 161, 906, 161, 161, 272, 161, 161, 161, 921, 161, 161, 920, 274, 273, 161, 919, 161, 161, 161, 278, 161, 161, 277, 279, 275, 161, 161, 161, 276, 161, 916, 161, 161, 161, 161, 562, 161, 563, 912, 564, 161, 161, 161, 161, 161, 282, 909, 908, 280, 161, 281, 907, 161, 906, 161, 283, 161, 161, 905, 161, 161, 284, 285, 286, 161, 881, 161, 881, 161, 904, 161, 903, 161, 902, 901, 289, 161, 287, 291, 288, 161, 161, 161, 290, 161, 293, 161, 897, 161, 161, 892, 161, 292, 161, 888, 161, 161, 887, 161, 298, 298, 298, 298, 298, 298, 298, 298, 196, 886, 299, 299, 299, 299, 299, 299, 299, 299, 305, 305, 305, 305, 305, 305, 305, 305, 306, 306, 306, 306, 306, 306, 306, 306, 316, 316, 316, 316, 316, 316, 316, 316, 317, 317, 317, 317, 317, 317, 317, 317, 261, 885, 156, 156, 156, 156, 156, 156, 156, 156, 358, 884, 359, 359, 359, 359, 359, 359, 359, 359, 360, 360, 360, 360, 360, 360, 360, 360, 161, 161, 883, 361, 362, 161, 161, 363, 161, 161, 161, 161, 161, 161, 161, 161, 364, 161, 882, 881, 161, 365, 161, 366, 161, 161, 367, 161, 848, 161, 161, 879, 161, 878, 161, 877, 368, 161, 374, 161, 161, 161, 161, 876, 875, 370, 371, 161, 369, 161, 161, 161, 161, 161, 874, 161, 161, 161, 372, 376, 373, 161, 161, 161, 161, 873, 161, 161, 161, 161, 161, 381, 161, 161, 375, 377, 161, 872, 161, 868, 379, 161, 161, 161, 861, 378, 380, 161, 161, 856, 161, 161, 161, 855, 854, 161, 161, 161, 161, 161, 161, 161, 853, 852, 383, 382, 161, 161, 386, 384, 161, 851, 161, 385, 161, 161, 161, 161, 850, 387, 161, 161, 161, 849, 388, 390, 161, 161, 848, 161, 389, 161, 161, 391, 161, 161, 161, 161, 846, 845, 161, 844, 161, 392, 398, 843, 399, 399, 399, 399, 399, 399, 399, 399, 196, 842, 400, 400, 400, 400, 400, 400, 400, 400, 406, 841, 407, 407, 407, 407, 407, 407, 407, 407, 408, 408, 408, 408, 408, 408, 408, 408, 417, 840, 418, 418, 418, 418, 418, 418, 418, 418, 419, 419, 419, 419, 419, 419, 419, 419, 424, 424, 424, 424, 424, 424, 424, 424, 454, 454, 454, 454, 454, 454, 454, 454, 161, 161, 839, 838, 161, 837, 833, 829, 161, 161, 161, 161, 161, 456, 161, 161, 161, 824, 457, 459, 823, 455, 460, 161, 161, 161, 161, 161, 458, 161, 161, 161, 161, 822, 161, 461, 821, 820, 161, 161, 462, 161, 161, 161, 161, 463, 161, 161, 161, 819, 464, 161, 161, 161, 465, 161, 161, 161, 818, 817, 161, 161, 161, 816, 161, 161, 161, 467, 466, 161, 161, 161, 815, 161, 814, 469, 813, 468, 161, 812, 161, 811, 161, 161, 810, 809, 471, 161, 808, 470, 161, 161, 161, 161, 161, 161, 472, 161, 474, 161, 161, 807, 161, 806, 161, 805, 161, 161, 161, 161, 161, 161, 161, 475, 161, 161, 161, 804, 803, 161, 161, 161, 478, 537, 161, 161, 483, 477, 479, 476, 161, 161, 161, 802, 161, 480, 798, 161, 161, 161, 161, 161, 779, 161, 481, 161, 794, 161, 789, 788, 482, 161, 787, 161, 488, 488, 488, 488, 488, 488, 488, 488, 398, 786, 489, 489, 489, 489, 489, 489, 489, 489, 400, 400, 400, 400, 400, 400, 400, 400, 494, 494, 494, 494, 494, 494, 494, 494, 495, 495, 495, 495, 495, 495, 495, 495, 408, 408, 408, 408, 408, 408, 408, 408, 503, 503, 503, 503, 503, 503, 503, 503, 504, 504, 504, 504, 504, 504, 504, 504, 419, 419, 419, 419, 419, 419, 419, 419, 161, 538, 785, 161, 161, 784, 783, 161, 161, 782, 161, 161, 161, 161, 161, 161, 540, 161, 161, 161, 781, 539, 161, 161, 542, 541, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 780, 779, 161, 778, 777, 543, 161, 161, 161, 161, 161, 545, 161, 161, 546, 544, 548, 547, 776, 161, 161, 161, 549, 161, 161, 161, 161, 161, 161, 161, 161, 161, 775, 161, 552, 161, 161, 774, 550, 161, 161, 161, 551, 161, 161, 555, 161, 773, 161, 771, 161, 161, 554, 161, 556, 161, 161, 770, 768, 557, 559, 161, 767, 161, 161, 161, 161, 161, 161, 161, 161, 161, 765, 161, 764, 161, 558, 161, 161, 161, 560, 161, 614, 161, 763, 762, 618, 161, 161, 161, 561, 569, 761, 570, 570, 570, 570, 570, 570, 570, 570, 574, 756, 575, 575, 575, 575, 575, 575, 575, 575, 582, 742, 583, 583, 583, 583, 583, 583, 583, 583, 161, 740, 739, 738, 161, 161, 737, 617, 161, 161, 161, 616, 161, 161, 161, 161, 161, 161, 736, 161, 621, 622, 735, 619, 620, 161, 161, 734, 161, 161, 161, 161, 161, 161, 733, 161, 732, 161, 623, 731, 161, 161, 161, 730, 161, 161, 624, 161, 161, 161, 625, 161, 161, 729, 161, 626, 161, 161, 161, 727, 161, 627, 726, 725, 161, 161, 724, 161, 161, 723, 161, 161, 161, 630, 161, 633, 161, 629, 632, 161, 631, 161, 161, 161, 161, 634, 161, 161, 722, 720, 161, 161, 161, 161, 161, 161, 719, 161, 685, 635, 582, 715, 161, 713, 161, 636, 644, 644, 644, 644, 644, 644, 644, 644, 569, 574, 645, 645, 645, 645, 645, 645, 645, 645, 649, 649, 649, 649, 649, 649, 649, 649, 650, 650, 650, 650, 650, 650, 650, 650, 655, 655, 655, 655, 655, 655, 655, 655, 656, 656, 656, 656, 656, 656, 656, 656, 161, 161, 711, 710, 161, 686, 569, 161, 161, 161, 161, 161, 161, 161, 161, 161, 708, 161, 683, 161, 161, 161, 707, 161, 161, 687, 688, 161, 161, 689, 690, 161, 161, 706, 161, 705, 161, 704, 703, 161, 161, 161, 695, 691, 161, 161, 161, 692, 161, 684, 161, 682, 161, 694, 681, 161, 161, 161, 680, 693, 696, 161, 161, 679, 161, 161, 697, 161, 161, 161, 698, 161, 678, 161, 677, 676, 161, 161, 161, 699, 701, 161, 700, 161, 161, 161, 675, 161, 674, 673, 672, 702, 161, 671, 161, 709, 709, 709, 709, 709, 709, 709, 709, 712, 712, 712, 712, 712, 712, 712, 712, 718, 718, 718, 718, 718, 718, 718, 718, 161, 161, 670, 669, 161, 161, 668, 741, 161, 161, 161, 161, 744, 745, 161, 161, 161, 161, 667, 743, 666, 665, 664, 663, 161, 161, 161, 161, 746, 728, 728, 662, 728, 728, 747, 748, 728, 749, 749, 749, 749, 749, 749, 749, 749, 750, 728, 728, 728, 751, 728, 728, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 161, 753, 661, 660, 161, 508, 658, 161, 161, 161, 161, 161, 161, 657, 161, 161, 161, 161, 752, 161, 755, 757, 754, 161, 161, 654, 161, 161, 161, 161, 653, 161, 161, 161, 652, 161, 161, 651, 161, 161, 161, 758, 161, 161, 648, 161, 647, 161, 759, 161, 646, 760, 766, 766, 766, 766, 766, 766, 766, 766, 769, 769, 769, 769, 769, 769, 769, 769, 772, 772, 772, 772, 772, 772, 772, 772, 161, 643, 642, 641, 161, 161, 640, 639, 161, 161, 161, 790, 161, 161, 161, 791, 161, 161, 638, 161, 792, 637, 628, 615, 161, 613, 161, 155, 612, 154, 154, 154, 154, 154, 154, 154, 154, 161, 161, 611, 610, 161, 161, 609, 608, 161, 161, 161, 161, 796, 161, 161, 161, 795, 607, 606, 605, 604, 603, 602, 793, 159, 159, 159, 159, 159, 159, 159, 159, 160, 161, 161, 601, 600, 599, 799, 161, 161, 161, 161, 161, 161, 797, 161, 161, 161, 161, 161, 161, 800, 801, 161, 161, 161, 598, 161, 161, 597, 161, 827, 826, 825, 161, 161, 161, 161, 596, 595, 161, 594, 593, 161, 161, 592, 161, 161, 161, 830, 161, 161, 831, 161, 161, 161, 835, 161, 161, 834, 832, 161, 161, 591, 161, 590, 161, 161, 161, 161, 857, 161, 161, 161, 589, 161, 836, 161, 161, 858, 161, 161, 161, 161, 588, 859, 161, 508, 161, 585, 584, 862, 847, 847, 946, 847, 847, 863, 864, 847, 865, 865, 865, 865, 865, 865, 865, 865, 866, 847, 847, 847, 867, 847, 847, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, 869, 161, 417, 581, 580, 161, 579, 946, 161, 161, 161, 161, 161, 161, 870, 161, 161, 161, 871, 578, 161, 893, 161, 577, 161, 161, 161, 161, 576, 161, 406, 161, 573, 572, 571, 398, 890, 568, 567, 889, 847, 847, 161, 847, 847, 566, 864, 847, 565, 553, 161, 358, 161, 898, 533, 532, 848, 847, 847, 847, 531, 847, 847, 847, 847, 161, 847, 847, 161, 847, 847, 530, 529, 161, 528, 899, 161, 527, 161, 848, 847, 847, 847, 526, 847, 847, 847, 847, 525, 847, 847, 524, 864, 847, 865, 865, 865, 865, 865, 865, 865, 865, 866, 847, 847, 847, 523, 847, 847, 895, 895, 895, 895, 895, 895, 895, 895, 896, 161, 161, 900, 522, 161, 161, 521, 520, 161, 161, 161, 161, 161, 161, 161, 161, 519, 518, 517, 910, 516, 515, 913, 847, 847, 514, 847, 847, 914, 915, 847, 894, 894, 894, 894, 894, 894, 894, 894, 848, 847, 847, 847, 914, 847, 847, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, 895, 895, 895, 895, 895, 895, 895, 895, 896, 895, 895, 895, 895, 895, 895, 895, 895, 896, 161, 161, 513, 512, 917, 161, 511, 510, 161, 161, 161, 161, 161, 161, 918, 161, 324, 508, 507, 506, 927, 502, 161, 847, 847, 501, 847, 847, 915, 915, 847, 847, 847, 847, 847, 847, 847, 847, 847, 848, 847, 847, 847, 915, 847, 847, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 161, 161, 500, 498, 161, 161, 497, 496, 161, 161, 161, 929, 161, 161, 161, 161, 161, 936, 493, 161, 492, 491, 490, 487, 161, 486, 161, 161, 942, 161, 83, 83, 83, 83, 83, 83, 83, 83, 83, 92, 92, 92, 92, 92, 92, 92, 92, 92, 113, 113, 113, 113, 113, 113, 113, 113, 113, 125, 125, 485, 125, 125, 125, 125, 125, 125, 127, 484, 127, 154, 154, 473, 154, 155, 154, 156, 453, 452, 156, 451, 156, 161, 161, 450, 161, 161, 161, 192, 192, 449, 192, 192, 192, 192, 192, 192, 195, 195, 448, 195, 195, 195, 195, 195, 195, 203, 447, 446, 203, 203, 203, 203, 445, 203, 204, 204, 444, 204, 204, 204, 204, 204, 204, 213, 443, 213, 218, 442, 441, 218, 218, 218, 218, 440, 218, 219, 219, 439, 219, 219, 219, 219, 219, 219, 222, 438, 222, 230, 437, 230, 260, 260, 436, 260, 433, 260, 160, 160, 312, 432, 312, 318, 431, 318, 223, 430, 429, 223, 223, 428, 223, 427, 223, 325, 426, 325, 326, 946, 326, 261, 261, 324, 423, 422, 261, 413, 421, 413, 420, 126, 420, 425, 416, 425, 509, 415, 509, 587, 414, 587, 714, 714, 126, 714, 714, 714, 714, 714, 714, 728, 728, 412, 728, 728, 728, 728, 728, 728, 160, 160, 160, 847, 847, 411, 847, 847, 847, 847, 847, 847, 880, 880, 410, 880, 880, 880, 880, 880, 880, 863, 863, 409, 863, 863, 863, 863, 863, 863, 894, 894, 405, 894, 894, 894, 894, 894, 894, 404, 403, 402, 401, 395, 394, 393, 357, 356, 355, 354, 353, 352, 351, 348, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 331, 330, 329, 328, 327, 126, 324, 323, 322, 321, 126, 315, 314, 313, 212, 126, 311, 310, 309, 308, 307, 304, 303, 302, 301, 300, 297, 296, 295, 294, 155, 259, 258, 257, 256, 255, 251, 248, 247, 246, 243, 242, 241, 240, 239, 238, 235, 234, 233, 232, 231, 126, 228, 227, 226, 225, 126, 128, 217, 216, 215, 214, 212, 212, 212, 126, 212, 211, 210, 209, 208, 207, 128, 202, 201, 198, 128, 191, 190, 189, 155, 153, 152, 151, 144, 137, 136, 135, 128, 126, 946, 38, 38, 38, 38, 78, 78, 37, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946 } ; static yyconst short int yy_chk[2772] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 39, 984, 31, 39, 9, 49, 49, 7, 7, 7, 7, 7, 9, 9, 7, 32, 7, 7, 7, 10, 7, 31, 7, 7, 7, 7, 7, 10, 10, 15, 9, 51, 50, 44, 32, 51, 33, 50, 15, 15, 15, 44, 54, 44, 15, 10, 13, 13, 33, 13, 93, 54, 982, 13, 13, 13, 13, 13, 13, 13, 13, 33, 33, 89, 980, 93, 13, 14, 14, 53, 14, 89, 107, 16, 14, 14, 14, 14, 14, 14, 14, 14, 16, 16, 16, 53, 107, 14, 16, 17, 17, 55, 17, 134, 134, 978, 17, 17, 17, 17, 17, 17, 17, 17, 17, 84, 145, 55, 84, 17, 18, 18, 145, 18, 19, 20, 114, 18, 18, 18, 18, 18, 18, 18, 18, 18, 45, 19, 20, 45, 18, 114, 45, 19, 20, 19, 20, 19, 20, 141, 19, 20, 21, 141, 977, 25, 26, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 25, 26, 975, 123, 25, 26, 123, 21, 34, 21, 25, 26, 963, 21, 225, 21, 27, 27, 108, 27, 34, 943, 225, 27, 27, 27, 27, 27, 27, 27, 27, 27, 108, 34, 34, 940, 27, 28, 28, 147, 28, 204, 654, 654, 28, 28, 28, 28, 28, 28, 28, 28, 28, 147, 939, 147, 204, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36, 61, 937, 61, 61, 61, 61, 61, 61, 61, 61, 62, 62, 935, 62, 62, 62, 62, 62, 62, 62, 62, 62, 63, 63, 249, 63, 63, 63, 63, 63, 63, 63, 63, 63, 64, 65, 933, 932, 219, 65, 63, 64, 64, 65, 64, 65, 66, 64, 63, 67, 63, 78, 193, 219, 66, 193, 66, 67, 249, 67, 236, 68, 69, 236, 78, 67, 930, 78, 66, 68, 69, 68, 69, 68, 68, 69, 70, 71, 251, 336, 70, 72, 251, 336, 70, 71, 70, 71, 73, 72, 71, 72, 73, 926, 74, 75, 73, 72, 73, 76, 923, 73, 74, 75, 74, 75, 911, 76, 75, 76, 74, 77, 793, 921, 911, 793, 76, 297, 828, 77, 828, 77, 86, 920, 86, 86, 86, 86, 86, 86, 86, 86, 94, 297, 94, 94, 94, 94, 94, 94, 94, 94, 115, 860, 115, 115, 115, 115, 115, 115, 115, 115, 118, 919, 916, 118, 118, 118, 118, 860, 118, 118, 118, 118, 118, 118, 118, 118, 912, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 156, 909, 156, 156, 156, 156, 156, 156, 156, 156, 157, 157, 157, 157, 157, 157, 157, 157, 158, 158, 158, 158, 158, 158, 158, 158, 159, 908, 159, 159, 159, 159, 159, 159, 159, 159, 159, 161, 162, 934, 891, 163, 891, 934, 164, 161, 162, 161, 162, 163, 162, 163, 164, 163, 164, 165, 166, 164, 453, 167, 453, 907, 453, 165, 166, 165, 166, 167, 169, 167, 167, 167, 168, 168, 925, 170, 169, 925, 169, 171, 168, 905, 168, 170, 169, 170, 172, 171, 904, 171, 173, 902, 171, 170, 172, 901, 172, 175, 173, 175, 173, 174, 174, 175, 172, 175, 176, 175, 173, 174, 897, 174, 177, 178, 176, 483, 176, 483, 892, 483, 177, 178, 177, 178, 179, 178, 887, 886, 176, 180, 177, 885, 179, 883, 179, 179, 182, 180, 882, 180, 181, 179, 180, 181, 182, 881, 182, 880, 181, 879, 181, 878, 183, 874, 873, 182, 184, 181, 184, 181, 183, 185, 183, 183, 184, 187, 184, 868, 186, 185, 861, 185, 186, 187, 856, 187, 186, 855, 186, 196, 196, 196, 196, 196, 196, 196, 196, 197, 854, 197, 197, 197, 197, 197, 197, 197, 197, 205, 205, 205, 205, 205, 205, 205, 205, 206, 206, 206, 206, 206, 206, 206, 206, 220, 220, 220, 220, 220, 220, 220, 220, 221, 221, 221, 221, 221, 221, 221, 221, 260, 852, 260, 260, 260, 260, 260, 260, 260, 260, 262, 851, 262, 262, 262, 262, 262, 262, 262, 262, 263, 263, 263, 263, 263, 263, 263, 263, 264, 265, 850, 264, 265, 266, 267, 266, 264, 265, 264, 265, 269, 266, 267, 266, 267, 268, 849, 848, 269, 268, 269, 269, 270, 268, 269, 268, 847, 271, 276, 846, 270, 845, 270, 844, 270, 271, 276, 271, 276, 272, 273, 842, 840, 272, 273, 274, 271, 272, 273, 272, 273, 277, 839, 274, 275, 274, 274, 278, 275, 277, 279, 277, 275, 838, 275, 278, 280, 278, 279, 283, 279, 281, 277, 279, 280, 837, 280, 833, 281, 281, 282, 281, 829, 280, 282, 284, 283, 824, 282, 285, 282, 823, 822, 284, 283, 284, 283, 285, 286, 285, 821, 820, 284, 283, 287, 288, 286, 285, 286, 819, 289, 285, 287, 288, 287, 288, 818, 287, 289, 290, 289, 817, 288, 290, 291, 292, 815, 290, 289, 290, 293, 291, 291, 292, 291, 292, 814, 813, 293, 812, 293, 292, 298, 811, 298, 298, 298, 298, 298, 298, 298, 298, 299, 810, 299, 299, 299, 299, 299, 299, 299, 299, 305, 807, 305, 305, 305, 305, 305, 305, 305, 305, 306, 306, 306, 306, 306, 306, 306, 306, 316, 805, 316, 316, 316, 316, 316, 316, 316, 316, 317, 317, 317, 317, 317, 317, 317, 317, 358, 358, 358, 358, 358, 358, 358, 358, 359, 359, 359, 359, 359, 359, 359, 359, 361, 362, 804, 803, 363, 802, 798, 794, 361, 362, 361, 362, 363, 363, 363, 364, 365, 789, 364, 366, 788, 361, 367, 364, 365, 364, 365, 366, 365, 366, 367, 368, 367, 787, 369, 368, 786, 785, 371, 368, 369, 368, 369, 370, 369, 370, 371, 372, 371, 784, 371, 370, 373, 370, 371, 372, 374, 372, 783, 782, 373, 375, 373, 781, 374, 376, 374, 374, 373, 375, 377, 375, 780, 376, 779, 376, 778, 375, 377, 777, 377, 776, 378, 379, 775, 773, 378, 380, 771, 377, 378, 379, 378, 379, 382, 380, 379, 380, 382, 383, 384, 768, 382, 767, 382, 765, 385, 383, 384, 383, 384, 386, 387, 384, 385, 455, 385, 763, 762, 386, 387, 386, 387, 455, 388, 455, 392, 386, 388, 385, 390, 389, 388, 761, 388, 389, 756, 391, 390, 389, 390, 389, 750, 392, 390, 391, 748, 391, 742, 740, 391, 392, 739, 392, 398, 398, 398, 398, 398, 398, 398, 398, 399, 738, 399, 399, 399, 399, 399, 399, 399, 399, 400, 400, 400, 400, 400, 400, 400, 400, 406, 406, 406, 406, 406, 406, 406, 406, 407, 407, 407, 407, 407, 407, 407, 407, 408, 408, 408, 408, 408, 408, 408, 408, 417, 417, 417, 417, 417, 417, 417, 417, 418, 418, 418, 418, 418, 418, 418, 418, 419, 419, 419, 419, 419, 419, 419, 419, 456, 457, 736, 458, 459, 735, 734, 460, 456, 733, 456, 458, 459, 458, 459, 460, 459, 460, 457, 462, 732, 458, 461, 463, 461, 460, 457, 462, 457, 462, 461, 463, 461, 463, 464, 465, 730, 728, 466, 726, 725, 463, 464, 465, 464, 465, 466, 465, 466, 467, 466, 464, 468, 467, 724, 469, 470, 467, 469, 467, 468, 471, 468, 469, 470, 469, 470, 472, 723, 471, 472, 471, 474, 720, 470, 472, 476, 472, 471, 475, 474, 475, 474, 719, 476, 715, 476, 475, 474, 475, 476, 477, 478, 714, 711, 477, 479, 480, 710, 477, 478, 477, 478, 481, 479, 480, 479, 480, 707, 482, 706, 481, 478, 481, 541, 537, 481, 482, 537, 482, 705, 704, 541, 537, 541, 537, 482, 488, 703, 488, 488, 488, 488, 488, 488, 488, 488, 494, 695, 494, 494, 494, 494, 494, 494, 494, 494, 503, 684, 503, 503, 503, 503, 503, 503, 503, 503, 539, 682, 681, 680, 540, 542, 678, 540, 539, 543, 539, 539, 540, 542, 540, 542, 544, 543, 677, 543, 545, 546, 675, 542, 544, 547, 544, 673, 545, 546, 545, 546, 548, 547, 672, 547, 671, 549, 547, 670, 548, 550, 548, 669, 551, 549, 548, 549, 552, 550, 549, 550, 551, 668, 551, 550, 552, 554, 552, 665, 555, 551, 664, 663, 556, 554, 662, 554, 555, 661, 555, 558, 556, 555, 556, 558, 557, 554, 557, 558, 556, 558, 559, 560, 557, 559, 557, 561, 660, 658, 559, 560, 559, 560, 616, 561, 657, 561, 616, 560, 656, 653, 616, 651, 616, 561, 569, 569, 569, 569, 569, 569, 569, 569, 570, 650, 570, 570, 570, 570, 570, 570, 570, 570, 574, 574, 574, 574, 574, 574, 574, 574, 575, 575, 575, 575, 575, 575, 575, 575, 582, 582, 582, 582, 582, 582, 582, 582, 583, 583, 583, 583, 583, 583, 583, 583, 614, 617, 648, 647, 618, 618, 645, 619, 614, 617, 614, 617, 618, 620, 618, 619, 643, 619, 614, 621, 622, 620, 642, 620, 623, 619, 620, 621, 622, 621, 622, 624, 623, 640, 623, 639, 625, 638, 637, 624, 626, 624, 628, 623, 625, 627, 625, 625, 626, 615, 626, 613, 629, 627, 612, 627, 630, 631, 611, 626, 629, 632, 629, 609, 630, 631, 630, 631, 633, 632, 631, 632, 608, 635, 607, 606, 633, 634, 633, 632, 634, 635, 633, 635, 636, 634, 605, 634, 604, 603, 602, 635, 636, 601, 636, 644, 644, 644, 644, 644, 644, 644, 644, 649, 649, 649, 649, 649, 649, 649, 649, 655, 655, 655, 655, 655, 655, 655, 655, 683, 685, 600, 599, 686, 687, 597, 683, 683, 685, 683, 685, 686, 687, 686, 687, 688, 690, 596, 685, 595, 594, 593, 592, 688, 690, 688, 690, 688, 689, 689, 590, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, 691, 692, 589, 588, 693, 587, 585, 694, 691, 692, 691, 692, 693, 584, 693, 694, 697, 694, 691, 696, 694, 696, 693, 698, 697, 581, 697, 696, 699, 696, 580, 698, 700, 698, 579, 701, 699, 578, 699, 702, 700, 698, 700, 701, 573, 701, 572, 702, 700, 702, 571, 701, 709, 709, 709, 709, 709, 709, 709, 709, 712, 712, 712, 712, 712, 712, 712, 712, 718, 718, 718, 718, 718, 718, 718, 718, 741, 568, 567, 566, 743, 744, 565, 564, 741, 745, 741, 743, 743, 744, 743, 744, 746, 745, 563, 745, 745, 562, 553, 538, 746, 536, 746, 747, 535, 747, 747, 747, 747, 747, 747, 747, 747, 751, 752, 534, 533, 753, 754, 532, 531, 751, 752, 751, 752, 753, 754, 753, 754, 751, 530, 529, 528, 527, 526, 525, 747, 749, 749, 749, 749, 749, 749, 749, 749, 749, 755, 757, 523, 522, 521, 757, 758, 759, 755, 757, 755, 757, 755, 760, 758, 759, 758, 759, 790, 758, 759, 760, 791, 760, 520, 792, 790, 519, 790, 792, 791, 790, 791, 792, 795, 792, 518, 517, 796, 516, 515, 797, 795, 514, 795, 799, 796, 795, 796, 797, 796, 797, 800, 799, 800, 799, 801, 799, 797, 826, 800, 513, 800, 512, 801, 825, 801, 826, 825, 826, 827, 830, 511, 825, 801, 825, 832, 826, 827, 830, 827, 830, 510, 827, 832, 509, 832, 507, 506, 830, 831, 831, 505, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, 834, 835, 504, 502, 501, 836, 500, 499, 834, 835, 834, 835, 857, 836, 835, 836, 858, 859, 836, 498, 857, 862, 857, 497, 858, 859, 858, 859, 496, 862, 495, 862, 493, 491, 490, 489, 859, 487, 486, 858, 863, 863, 869, 863, 863, 485, 863, 863, 484, 473, 869, 454, 869, 869, 452, 451, 863, 863, 863, 863, 449, 863, 863, 864, 864, 870, 864, 864, 889, 864, 864, 448, 447, 870, 446, 870, 889, 445, 889, 864, 864, 864, 864, 444, 864, 864, 865, 865, 443, 865, 865, 442, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 441, 865, 865, 866, 866, 866, 866, 866, 866, 866, 866, 866, 871, 890, 871, 440, 893, 899, 439, 438, 871, 890, 871, 890, 893, 899, 893, 899, 437, 436, 435, 890, 434, 432, 893, 894, 894, 431, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 894, 895, 895, 895, 895, 895, 895, 895, 895, 895, 896, 896, 896, 896, 896, 896, 896, 896, 896, 898, 900, 430, 429, 898, 910, 428, 426, 898, 900, 898, 900, 913, 910, 900, 910, 425, 424, 422, 421, 913, 416, 913, 915, 915, 415, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 917, 918, 414, 412, 927, 929, 411, 409, 917, 918, 917, 918, 927, 929, 927, 929, 936, 927, 405, 942, 404, 403, 401, 397, 936, 396, 936, 942, 936, 942, 947, 947, 947, 947, 947, 947, 947, 947, 947, 948, 948, 948, 948, 948, 948, 948, 948, 948, 949, 949, 949, 949, 949, 949, 949, 949, 949, 950, 950, 395, 950, 950, 950, 950, 950, 950, 951, 394, 951, 952, 952, 381, 952, 360, 952, 953, 357, 356, 953, 355, 953, 954, 954, 354, 954, 954, 954, 955, 955, 353, 955, 955, 955, 955, 955, 955, 956, 956, 352, 956, 956, 956, 956, 956, 956, 957, 351, 350, 957, 957, 957, 957, 349, 957, 958, 958, 347, 958, 958, 958, 958, 958, 958, 959, 346, 959, 960, 344, 343, 960, 960, 960, 960, 342, 960, 961, 961, 341, 961, 961, 961, 961, 961, 961, 962, 340, 962, 964, 339, 964, 965, 965, 338, 965, 335, 965, 966, 966, 967, 334, 967, 968, 333, 968, 969, 332, 331, 969, 969, 330, 969, 329, 969, 970, 327, 970, 971, 326, 971, 972, 972, 325, 321, 320, 972, 973, 319, 973, 974, 318, 974, 976, 315, 976, 979, 314, 979, 981, 313, 981, 983, 983, 312, 983, 983, 983, 983, 983, 983, 985, 985, 311, 985, 985, 985, 985, 985, 985, 986, 986, 986, 987, 987, 310, 987, 987, 987, 987, 987, 987, 988, 988, 308, 988, 988, 988, 988, 988, 988, 989, 989, 307, 989, 989, 989, 989, 989, 989, 990, 990, 304, 990, 990, 990, 990, 990, 990, 303, 302, 301, 300, 296, 295, 294, 258, 257, 256, 255, 254, 253, 252, 250, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 222, 217, 216, 215, 214, 213, 211, 210, 209, 208, 207, 202, 201, 200, 199, 198, 191, 190, 189, 188, 154, 153, 152, 150, 149, 148, 146, 144, 143, 142, 140, 139, 138, 137, 136, 135, 133, 132, 131, 130, 129, 127, 122, 121, 120, 119, 117, 116, 112, 111, 110, 109, 106, 105, 103, 102, 101, 100, 99, 98, 97, 96, 95, 91, 90, 88, 87, 82, 81, 80, 59, 58, 57, 56, 52, 48, 47, 46, 43, 42, 37, 24, 23, 12, 11, 6, 5, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946, 946 } ; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; static char *yy_full_match; static int yy_lp; #define REJECT \ { \ *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ yy_cp = yy_full_match; /* restore poss. backed-over text */ \ ++yy_lp; \ goto find_rule; \ } #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "../lib/config_scan.l" #define INITIAL 0 /* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #line 45 "../lib/config_scan.l" #include "common.h" #include "yacconfig.h" #include "config_parse.h" extern int socks_parseinit; extern const int socks_configtype; static const char rcsid[] = "$Id: config_scan.l,v 1.76 2005/12/19 14:22:13 michaels Exp $"; #define YY_STACK_USED 0 #define YY_ALWAYS_INTERACTIVE 0 #define YY_NEVER_INTERACTIVE 1 #define YY_MAIN 0 /*%option debug */ /* non-exclusive startconditions. */ #define start_address 1 #define start_port 2 /* exclusive startconditions */ #define lineprefix 3 #define start_command 4 #define start_compatibility 5 #define start_line 6 #define start_log 7 #define start_logoutput 8 #define start_method 9 #define start_operator 10 #define start_option 11 #define start_proxyprotocol 12 #define start_username 13 #define start_portnumber 14 #define start_srchost 15 #define start_protocol 16 #define start_servicename 17 #line 1507 "config_scan.c" /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap YY_PROTO(( void )); #else extern int yywrap YY_PROTO(( void )); #endif #endif #ifndef YY_NO_UNPUT static void yyunput YY_PROTO(( int c, char *buf_ptr )); #endif #ifndef yytext_ptr static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen YY_PROTO(( yyconst char * )); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif #endif #if YY_STACK_USED static int yy_start_stack_ptr = 0; static int yy_start_stack_depth = 0; static int *yy_start_stack = 0; #ifndef YY_NO_PUSH_STATE static void yy_push_state YY_PROTO(( int new_state )); #endif #ifndef YY_NO_POP_STATE static void yy_pop_state YY_PROTO(( void )); #endif #ifndef YY_NO_TOP_STATE static int yy_top_state YY_PROTO(( void )); #endif #else #define YY_NO_PUSH_STATE 1 #define YY_NO_POP_STATE 1 #define YY_NO_TOP_STATE 1 #endif #ifdef YY_MALLOC_DECL YY_MALLOC_DECL #else #ifdef __STDC__ #ifndef __cplusplus #include #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( yy_current_buffer->yy_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL int yylex YY_PROTO(( void )) #endif /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 91 "../lib/config_scan.l" /* * we can operate in more than one mode, find out which it is and * let the parser know. */ if (!socks_parseinit) { socks_parseinit = 1; switch (socks_configtype) { case CONFIGTYPE_SERVER: return SERVERCONFIG; case CONFIGTYPE_CLIENT: return CLIENTCONFIG; default: SERRX(socks_configtype); } } /* start-condition dependent stuff. */ #line 1688 "config_scan.c" if ( yy_init ) { yy_init = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yy_c_buf_p; /* Support of yytext. */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_state_ptr = yy_state_buf; *yy_state_ptr++ = yy_current_state; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 947 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yy_state_ptr++ = yy_current_state; ++yy_cp; } while ( yy_base[yy_current_state] != 2724 ); yy_find_action: yy_current_state = *--yy_state_ptr; yy_lp = yy_accept[yy_current_state]; find_rule: /* we branch to this label when backing up */ for ( ; ; ) /* until we find what rule we matched */ { if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) { yy_act = yy_acclist[yy_lp]; { yy_full_match = yy_cp; break; } } --yy_cp; yy_current_state = *--yy_state_ptr; yy_lp = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; if ( yy_act != YY_END_OF_BUFFER ) { int yyl; for ( yyl = 0; yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) ++yylineno; } do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 1: YY_RULE_SETUP #line 120 "../lib/config_scan.l" { yylval.string = yytext; return PROXYPROTOCOL_SOCKS_V4; } YY_BREAK case 2: YY_RULE_SETUP #line 125 "../lib/config_scan.l" { yylval.string = yytext; return PROXYPROTOCOL_SOCKS_V5; } YY_BREAK case 3: YY_RULE_SETUP #line 130 "../lib/config_scan.l" { yylval.string = yytext; return DEPRECATED; } YY_BREAK case 4: YY_RULE_SETUP #line 135 "../lib/config_scan.l" { yylval.string = yytext; return PROXYPROTOCOL_HTTP_V1_0; } YY_BREAK case 5: YY_RULE_SETUP #line 140 "../lib/config_scan.l" { yylval.string = yytext; return COMMAND_BIND; } YY_BREAK case 6: YY_RULE_SETUP #line 145 "../lib/config_scan.l" { yylval.string = yytext; return COMMAND_CONNECT; } YY_BREAK case 7: YY_RULE_SETUP #line 150 "../lib/config_scan.l" { yylval.string = yytext; return COMMAND_UDPASSOCIATE; } YY_BREAK case 8: YY_RULE_SETUP #line 155 "../lib/config_scan.l" { yylval.string = yytext; return COMMAND_BINDREPLY; } YY_BREAK case 9: YY_RULE_SETUP #line 160 "../lib/config_scan.l" { yylval.string = yytext; return COMMAND_UDPREPLY; } YY_BREAK case 10: YY_RULE_SETUP #line 166 "../lib/config_scan.l" { yylval.string = yytext; return DIRECT; } YY_BREAK case 11: YY_RULE_SETUP #line 172 "../lib/config_scan.l" { BEGIN(start_operator); yylval.string = yytext; return PORT; } YY_BREAK case 12: YY_RULE_SETUP #line 179 "../lib/config_scan.l" { BEGIN(start_portnumber); yylval.string = yytext; return OPERATOR; } YY_BREAK case 13: YY_RULE_SETUP #line 187 "../lib/config_scan.l" { yylval.string = yytext; return LOG_CONNECT; } YY_BREAK case 14: YY_RULE_SETUP #line 192 "../lib/config_scan.l" { yylval.string = yytext; return LOG_DATA; } YY_BREAK case 15: YY_RULE_SETUP #line 197 "../lib/config_scan.l" { yylval.string = yytext; return LOG_DISCONNECT; } YY_BREAK case 16: YY_RULE_SETUP #line 202 "../lib/config_scan.l" { yylval.string = yytext; return LOG_ERROR; } YY_BREAK case 17: YY_RULE_SETUP #line 207 "../lib/config_scan.l" { yylval.string = yytext; return LOG_IOOPERATION; } YY_BREAK case 18: YY_RULE_SETUP #line 212 "../lib/config_scan.l" { BEGIN(INITIAL); yylval.string = yytext; return SERVICENAME; } YY_BREAK case 19: YY_RULE_SETUP #line 219 "../lib/config_scan.l" { BEGIN(start_portnumber); /* no operator, first port in range then. */ yylval.string = yytext; return PORTNUMBER; } YY_BREAK case 20: YY_RULE_SETUP #line 226 "../lib/config_scan.l" { BEGIN(INITIAL); yylval.string = yytext; return PORTNUMBER; } YY_BREAK case 21: YY_RULE_SETUP #line 233 "../lib/config_scan.l" { BEGIN(start_port); yylval.string = yytext; return DOMAINNAME; } YY_BREAK case 22: YY_RULE_SETUP #line 240 "../lib/config_scan.l" { BEGIN(start_port); yylval.string = yytext; return IFNAME; } YY_BREAK case 23: YY_RULE_SETUP #line 247 "../lib/config_scan.l" { yylval.string = yytext; return LOGFILE; } YY_BREAK case 24: YY_RULE_SETUP #line 252 "../lib/config_scan.l" { yylval.string = yytext; return USERNAME; } YY_BREAK case 25: YY_RULE_SETUP #line 257 "../lib/config_scan.l" { BEGIN(start_line); yylval.string = yytext; return *yytext; } YY_BREAK case 26: YY_RULE_SETUP #line 264 "../lib/config_scan.l" { BEGIN(INITIAL); yylval.string = yytext; return LINE; } YY_BREAK case 27: YY_RULE_SETUP #line 271 "../lib/config_scan.l" { yylval.string = yytext; return NOMISMATCH; } YY_BREAK case 28: YY_RULE_SETUP #line 276 "../lib/config_scan.l" { yylval.string = yytext; return NOUNKNOWN; } YY_BREAK case 29: YY_RULE_SETUP #line 281 "../lib/config_scan.l" { yylval.string = yytext; return PROTOCOL_TCP; } YY_BREAK case 30: YY_RULE_SETUP #line 286 "../lib/config_scan.l" { yylval.string = yytext; return PROTOCOL_UDP; } YY_BREAK case 31: YY_RULE_SETUP #line 291 "../lib/config_scan.l" { yylval.string = yytext; return PROTOCOL_FAKE; } YY_BREAK /* non-startcondition dependents. */ case 32: YY_RULE_SETUP #line 299 "../lib/config_scan.l" { yylval.string = yytext; return DEBUGING; } YY_BREAK case 33: YY_RULE_SETUP #line 304 "../lib/config_scan.l" { yylval.string = yytext; return ROUTE; } YY_BREAK case 34: YY_RULE_SETUP #line 309 "../lib/config_scan.l" { BEGIN(start_protocol); yylval.string = yytext; return RESOLVEPROTOCOL; } YY_BREAK case 35: YY_RULE_SETUP #line 316 "../lib/config_scan.l" { BEGIN(start_srchost); yylval.string = yytext; return SRCHOST; } YY_BREAK case 36: YY_RULE_SETUP #line 323 "../lib/config_scan.l" { BEGIN(start_proxyprotocol); yylval.string = yytext; return PROXYPROTOCOL; } YY_BREAK case 37: YY_RULE_SETUP #line 330 "../lib/config_scan.l" { BEGIN(start_logoutput); yylval.string = yytext; return LOGOUTPUT; } YY_BREAK case 38: YY_RULE_SETUP #line 337 "../lib/config_scan.l" { BEGIN(start_protocol); yylval.string = yytext; return PROTOCOL; } YY_BREAK case 39: YY_RULE_SETUP #line 344 "../lib/config_scan.l" { BEGIN(start_command); yylval.string = yytext; return COMMAND; } YY_BREAK case 40: YY_RULE_SETUP #line 351 "../lib/config_scan.l" { yylval.string = yytext; return REDIRECT; } YY_BREAK case 41: YY_RULE_SETUP #line 356 "../lib/config_scan.l" { yylval.string = yytext; return BANDWIDTH; } YY_BREAK case 42: YY_RULE_SETUP #line 361 "../lib/config_scan.l" { yylval.string = yytext; return MAXSESSIONS; } YY_BREAK case 43: YY_RULE_SETUP #line 366 "../lib/config_scan.l" { BEGIN(start_address); yylval.string = yytext; return FROM; } YY_BREAK case 44: YY_RULE_SETUP #line 373 "../lib/config_scan.l" { BEGIN(start_address); yylval.string = yytext; return TO; } YY_BREAK case 45: YY_RULE_SETUP #line 380 "../lib/config_scan.l" { BEGIN(start_address); yylval.string = yytext; return VIA; } YY_BREAK /* server configstuff */ case 46: YY_RULE_SETUP #line 388 "../lib/config_scan.l" { BEGIN(start_address); yylval.string = yytext; return INTERNAL; } YY_BREAK case 47: YY_RULE_SETUP #line 395 "../lib/config_scan.l" { yylval.string = yytext; return EXTERNAL_ROTATION; } YY_BREAK case 48: YY_RULE_SETUP #line 400 "../lib/config_scan.l" { yylval.string = yytext; return ROUTE; } YY_BREAK case 49: YY_RULE_SETUP #line 405 "../lib/config_scan.l" { yylval.string = yytext; return NONE; } YY_BREAK case 50: YY_RULE_SETUP #line 411 "../lib/config_scan.l" { BEGIN(start_address); yylval.string = yytext; return EXTERNAL; } YY_BREAK case 51: YY_RULE_SETUP #line 418 "../lib/config_scan.l" { yylval.string = yytext; return CHILD_MAXIDLE; } YY_BREAK case 52: YY_RULE_SETUP #line 423 "../lib/config_scan.l" { BEGIN(start_username); yylval.string = yytext; return USER; } YY_BREAK case 53: YY_RULE_SETUP #line 430 "../lib/config_scan.l" { BEGIN(start_username); yylval.string = yytext; return USER_PRIVILEGED; } YY_BREAK case 54: YY_RULE_SETUP #line 437 "../lib/config_scan.l" { BEGIN(start_username); yylval.string = yytext; return USER_UNPRIVILEGED; } YY_BREAK case 55: YY_RULE_SETUP #line 444 "../lib/config_scan.l" { BEGIN(start_username); yylval.string = yytext; return USER_LIBWRAP; } YY_BREAK case 56: YY_RULE_SETUP #line 451 "../lib/config_scan.l" { yylval.string = yytext; return IOTIMEOUT; } YY_BREAK case 57: YY_RULE_SETUP #line 456 "../lib/config_scan.l" { yylval.string = yytext; return COMPATIBILITY; } YY_BREAK case 58: YY_RULE_SETUP #line 461 "../lib/config_scan.l" { yylval.string = yytext; return REUSEADDR; } YY_BREAK case 59: YY_RULE_SETUP #line 466 "../lib/config_scan.l" { yylval.string = yytext; return SAMEPORT; } YY_BREAK case 60: YY_RULE_SETUP #line 472 "../lib/config_scan.l" { yylval.string = yytext; return CONNECTTIMEOUT; } YY_BREAK case 61: YY_RULE_SETUP #line 477 "../lib/config_scan.l" { yylval.string = yytext; return EXTENSION; } YY_BREAK case 62: YY_RULE_SETUP #line 482 "../lib/config_scan.l" { yylval.string = yytext; return BIND; } YY_BREAK case 63: YY_RULE_SETUP #line 489 "../lib/config_scan.l" { yylval.string = yytext; return CLIENTRULE; } YY_BREAK case 64: YY_RULE_SETUP #line 495 "../lib/config_scan.l" { BEGIN(start_method); yylval.string = yytext; return METHOD; } YY_BREAK case 65: YY_RULE_SETUP #line 502 "../lib/config_scan.l" { BEGIN(start_method); yylval.string = yytext; return CLIENTMETHOD; } YY_BREAK case 66: YY_RULE_SETUP #line 509 "../lib/config_scan.l" { yylval.string = yytext; return NONE; } YY_BREAK case 67: YY_RULE_SETUP #line 514 "../lib/config_scan.l" { yylval.string = yytext; return GSSAPI; } YY_BREAK case 68: YY_RULE_SETUP #line 519 "../lib/config_scan.l" { yylval.string = yytext; return UNAME; } YY_BREAK case 69: YY_RULE_SETUP #line 524 "../lib/config_scan.l" { yylval.string = yytext; return RFC931; } YY_BREAK case 70: YY_RULE_SETUP #line 529 "../lib/config_scan.l" { yylval.string = yytext; return PAM; } YY_BREAK /* filterrules */ /* * verdicts */ case 71: YY_RULE_SETUP #line 541 "../lib/config_scan.l" { yylval.string = yytext; return VERDICT_BLOCK; } YY_BREAK case 72: YY_RULE_SETUP #line 546 "../lib/config_scan.l" { yylval.string = yytext; return VERDICT_PASS; } YY_BREAK /* * logging */ case 73: YY_RULE_SETUP #line 557 "../lib/config_scan.l" { BEGIN(start_log); yylval.string = yytext; return LOG; } YY_BREAK case 74: YY_RULE_SETUP #line 565 "../lib/config_scan.l" { BEGIN(lineprefix); yylval.string = yytext; return LIBWRAPSTART; } YY_BREAK case 75: YY_RULE_SETUP #line 572 "../lib/config_scan.l" { BEGIN(start_servicename); yylval.string = yytext; return PAMSERVICENAME; } YY_BREAK /* * Old keywords that are no longer used. */ case 76: YY_RULE_SETUP #line 584 "../lib/config_scan.l" { yylval.string = yytext; return DEPRECATED; } YY_BREAK /* misc. generic stuff. */ case 77: YY_RULE_SETUP #line 593 "../lib/config_scan.l" { BEGIN(start_port); yylval.string = yytext; return IPADDRESS; } YY_BREAK case 78: YY_RULE_SETUP #line 601 "../lib/config_scan.l" { yylval.string = yytext; return NUMBER; } YY_BREAK /* ignored */ case 79: YY_RULE_SETUP #line 608 "../lib/config_scan.l" { ; } YY_BREAK /* shell style comment */ case 80: YY_RULE_SETUP #line 613 "../lib/config_scan.l" { ; } YY_BREAK /* state always ends at eol. */ case 81: YY_RULE_SETUP #line 618 "../lib/config_scan.l" { BEGIN(INITIAL); } YY_BREAK /* unless it's escaped. */ case 82: YY_RULE_SETUP #line 623 "../lib/config_scan.l" { ; } YY_BREAK case 83: YY_RULE_SETUP #line 627 "../lib/config_scan.l" { return *yytext; } YY_BREAK case 84: YY_RULE_SETUP #line 630 "../lib/config_scan.l" ECHO; YY_BREAK #line 2520 "config_scan.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(start_address): case YY_STATE_EOF(start_port): case YY_STATE_EOF(lineprefix): case YY_STATE_EOF(start_command): case YY_STATE_EOF(start_compatibility): case YY_STATE_EOF(start_line): case YY_STATE_EOF(start_log): case YY_STATE_EOF(start_logoutput): case YY_STATE_EOF(start_method): case YY_STATE_EOF(start_operator): case YY_STATE_EOF(start_option): case YY_STATE_EOF(start_proxyprotocol): case YY_STATE_EOF(start_username): case YY_STATE_EOF(start_portnumber): case YY_STATE_EOF(start_srchost): case YY_STATE_EOF(start_protocol): case YY_STATE_EOF(start_servicename): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_c_buf_p; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer() { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr; register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf, b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); yy_current_buffer->yy_n_chars = yy_n_chars; } if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state() { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; yy_state_ptr = yy_state_buf; *yy_state_ptr++ = yy_current_state; for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 947 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yy_state_ptr++ = yy_current_state; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { register int yy_is_jam; register YY_CHAR yy_c = 1; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 947 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 946); if ( ! yy_is_jam ) *yy_state_ptr++ = yy_current_state; return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; register char *yy_bp; #endif { register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_n_chars + 2; register char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); yy_current_buffer->yy_n_chars = yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; if ( c == '\n' ) --yylineno; yytext_ptr = yy_bp; yy_hold_char = *yy_cp; yy_c_buf_p = yy_cp; } #endif /* ifndef YY_NO_UNPUT */ #ifdef __cplusplus static int yyinput() #else static int input() #endif { int c; *yy_c_buf_p = yy_hold_char; if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ *yy_c_buf_p = '\0'; else { /* need more input */ int offset = yy_c_buf_p - yytext_ptr; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( yywrap() ) return EOF; if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + offset; break; } } } c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ *yy_c_buf_p = '\0'; /* preserve yytext */ yy_hold_char = *++yy_c_buf_p; if ( c == '\n' ) ++yylineno; return c; } #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) #else void yyrestart( input_file ) FILE *input_file; #endif { if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_init_buffer( yy_current_buffer, input_file ); yy_load_buffer_state(); } #ifdef YY_USE_PROTOS void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) #else void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { if ( yy_current_buffer == new_buffer ) return; if ( yy_current_buffer ) { /* Flush out information for old buffer. */ *yy_c_buf_p = yy_hold_char; yy_current_buffer->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = new_buffer; yy_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ yy_did_buffer_switch_on_eof = 1; } #ifdef YY_USE_PROTOS void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yyin = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) #else YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } #ifdef YY_USE_PROTOS void yy_delete_buffer( YY_BUFFER_STATE b ) #else void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yy_flex_free( (void *) b->yy_ch_buf ); yy_flex_free( (void *) b ); } #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE #include #endif #endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif { int oerrno = errno; yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; #if YY_ALWAYS_INTERACTIVE b->yy_is_interactive = 1; #else #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif errno = oerrno; } #ifdef YY_USE_PROTOS void yy_flush_buffer( YY_BUFFER_STATE b ) #else void yy_flush_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == yy_current_buffer ) yy_load_buffer_state(); } #ifndef YY_NO_SCAN_BUFFER #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) #else YY_BUFFER_STATE yy_scan_buffer( base, size ) char *base; yy_size_t size; #endif { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } #endif #ifndef YY_NO_SCAN_STRING #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) #else YY_BUFFER_STATE yy_scan_string( yy_str ) yyconst char *yy_str; #endif { int len; for ( len = 0; yy_str[len]; ++len ) ; return yy_scan_bytes( yy_str, len ); } #endif #ifndef YY_NO_SCAN_BYTES #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) #else YY_BUFFER_STATE yy_scan_bytes( bytes, len ) yyconst char *bytes; int len; #endif { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) yy_flex_alloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #endif #ifndef YY_NO_PUSH_STATE #ifdef YY_USE_PROTOS static void yy_push_state( int new_state ) #else static void yy_push_state( new_state ) int new_state; #endif { if ( yy_start_stack_ptr >= yy_start_stack_depth ) { yy_size_t new_size; yy_start_stack_depth += YY_START_STACK_INCR; new_size = yy_start_stack_depth * sizeof( int ); if ( ! yy_start_stack ) yy_start_stack = (int *) yy_flex_alloc( new_size ); else yy_start_stack = (int *) yy_flex_realloc( (void *) yy_start_stack, new_size ); if ( ! yy_start_stack ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } yy_start_stack[yy_start_stack_ptr++] = YY_START; BEGIN(new_state); } #endif #ifndef YY_NO_POP_STATE static void yy_pop_state() { if ( --yy_start_stack_ptr < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(yy_start_stack[yy_start_stack_ptr]); } #endif #ifndef YY_NO_TOP_STATE static int yy_top_state() { return yy_start_stack[yy_start_stack_ptr - 1]; } #endif #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif #ifdef YY_USE_PROTOS static void yy_fatal_error( yyconst char msg[] ) #else static void yy_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ yytext[yyleng] = yy_hold_char; \ yy_c_buf_p = yytext + n; \ yy_hold_char = *yy_c_buf_p; \ *yy_c_buf_p = '\0'; \ yyleng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef yytext_ptr #ifdef YY_USE_PROTOS static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) #else static void yy_flex_strncpy( s1, s2, n ) char *s1; yyconst char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN #ifdef YY_USE_PROTOS static int yy_flex_strlen( yyconst char *s ) #else static int yy_flex_strlen( s ) yyconst char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef YY_USE_PROTOS static void *yy_flex_alloc( yy_size_t size ) #else static void *yy_flex_alloc( size ) yy_size_t size; #endif { return (void *) malloc( size ); } #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, yy_size_t size ) #else static void *yy_flex_realloc( ptr, size ) void *ptr; yy_size_t size; #endif { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr ) #else static void yy_flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if YY_MAIN int main() { yylex(); return 0; } #endif #line 630 "../lib/config_scan.l" dante-1.1.19.dfsg/sockd/auth_pam.c0000644000175000017500000001331010345565446015355 0ustar roamroam/* * Copyright (c) 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ /* * Based on code originaly from * Patrick Bihan-Faou, MindStep Corporation, patrick@mindstep.com. */ #include "common.h" #if HAVE_PAM static const char rcsid[] = "$Id: auth_pam.c,v 1.23 2005/11/23 13:23:26 michaels Exp $"; __BEGIN_DECLS static int _pam_conversation(int num_msg, const struct pam_message **msgs, struct pam_response **rsps, void *priv_data); typedef struct { const char *user; const char *password; } _pam_data_t; #ifdef HAVE_SOLARIS_PAM_BUG static _pam_data_t * _pam_priv_data; #endif /* HAVE_SOLARIS_PAM_BUG */ __END_DECLS int pam_passwordcheck(s, src, dst, auth, emsg, emsgsize) int s; const struct sockaddr *src, *dst; const struct authmethod_pam_t *auth; char *emsg; size_t emsgsize; { const char *function = "pam_passwordcheck()"; int rc; uid_t euid; pam_handle_t *pamh; _pam_data_t uinfo; struct pam_conv _pam_conv = { _pam_conversation, NULL }; #ifdef HAVE_SOLARIS_PAM_BUG _pam_priv_data = NULL; #endif /* HAVE_SOLARIS_PAM_BUG */ slog(LOG_DEBUG, function); socks_seteuid(&euid, sockscf.uid.privileged); /* * used to cache this and only call pam_start() once, but that created * obscure problems on some linux implementations. Maybe another day. */ if ((rc = pam_start(*auth->servicename == NUL ? DEFAULT_PAMSERVICENAME : auth->servicename, (const char *)auth->name, &_pam_conv, &pamh)) != PAM_SUCCESS) { snprintf(emsg, emsgsize, "pam_start(): %s", pam_strerror(pamh, rc)); pam_end(pamh, rc); socks_reseteuid(sockscf.uid.privileged, euid); return -1; } uinfo.user = (const char *)(auth->name); uinfo.password = (const char *)(auth->password); _pam_conv.appdata_ptr = (char *)&uinfo; #ifdef HAVE_SOLARIS_PAM_BUG _pam_priv_data = &uinfo; #endif /* HAVE_SOLARIS_PAM_BUG */ if ((rc = pam_set_item(pamh, PAM_CONV, &_pam_conv)) != PAM_SUCCESS) { socks_reseteuid(sockscf.uid.privileged, euid); snprintf(emsg, emsgsize, "pam_set_item(PAM_CONV): %s", pam_strerror(pamh, rc)); return -1; } if ((rc = pam_set_item(pamh, PAM_RHOST, inet_ntoa(TOCIN(src)->sin_addr))) != PAM_SUCCESS) { socks_reseteuid(sockscf.uid.privileged, euid); snprintf(emsg, emsgsize, "pam_set_item(PAM_RHOST): %s", pam_strerror(pamh, rc)); return -1; } if ((rc = pam_authenticate(pamh, 0)) != PAM_SUCCESS) { socks_reseteuid(sockscf.uid.privileged, euid); snprintf(emsg, emsgsize, "pam_authenticate(): %s", pam_strerror(pamh, rc)); return -1; } if ((rc = pam_acct_mgmt(pamh, 0)) != PAM_SUCCESS) { socks_reseteuid(sockscf.uid.privileged, euid); snprintf(emsg, emsgsize, "pam_acct_mgmt(): %s", pam_strerror(pamh, rc)); return -1; } if ((rc = pam_end(pamh, rc)) != PAM_SUCCESS) { socks_reseteuid(sockscf.uid.privileged, euid); snprintf(emsg, emsgsize, "pam_end(): %s", pam_strerror(pamh, rc)); return -1; } socks_reseteuid(sockscf.uid.privileged, euid); return 0; } static int _pam_conversation(num_msg, msgs, rsps, priv_data) int num_msg; const struct pam_message **msgs; struct pam_response **rsps; void * priv_data; { _pam_data_t *uinfo = (_pam_data_t *)priv_data; struct pam_response *rsp; int i; #ifdef HAVE_SOLARIS_PAM_BUG uinfo = _pam_priv_data; #endif /* HAVE_SOLARIS_PAM_BUG */ if (!rsps || !msgs || num_msg <= 0) return PAM_CONV_ERR; *rsps = NULL; if (!uinfo) return PAM_CONV_ERR; if ((rsp = malloc(num_msg * sizeof(struct pam_response))) == NULL) return PAM_CONV_ERR; bzero(rsp, num_msg * sizeof(struct pam_response)); for (i = 0; i < num_msg; i++) { rsp[i].resp_retcode = 0; rsp[i].resp = NULL; switch(msgs[i]->msg_style) { case PAM_PROMPT_ECHO_ON: rsp[i].resp = strdup(uinfo->user); break; case PAM_PROMPT_ECHO_OFF: rsp[i].resp = strdup(uinfo->password); break; default: free(rsp); return PAM_CONV_ERR; } } *rsps = rsp; return PAM_SUCCESS; } #endif /* HAVE_PAM */ dante-1.1.19.dfsg/sockd/shmem.c0000644000175000017500000000425610360254530014663 0ustar roamroam/* * $Id: shmem.c,v 1.4 2006/01/08 18:26:32 karls Exp $ * * Copyright (c) 2005, 2006 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: shmem.c,v 1.4 2006/01/08 18:26:32 karls Exp $"; void shmem_setup(void) { } void shmem_lockall(void) { } void shmem_unlockall(void) { } dante-1.1.19.dfsg/sockd/bandwidth.c0000644000175000017500000000523510333437523015521 0ustar roamroam/* * Copyright (c) 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" #include /* XXX */ static const char rcsid[] = "$Id: bandwidth.c,v 1.12 2005/11/02 12:11:28 michaels Exp $"; const char module_bandwidth_version[] = "$Id: bandwidth.c,v 1.12 2005/11/02 12:11:28 michaels Exp $"; int bw_use(bw) bw_t *bw; { return 1; } bw_t * bw_alloc(client, number) int client; int number; { return NULL; } void bw_unuse(bw) bw_t *bw; { } ssize_t bw_left(bw) const bw_t *bw; { return MAX(SOCKD_BUFSIZETCP, SOCKD_BUFSIZEUDP); } void bw_update(bw, bwused, bwusedtime) bw_t *bw; size_t bwused; const struct timeval *bwusedtime; { } struct timeval * bw_isoverflow(bw, timenow, overflow) bw_t *bw; const struct timeval *timenow; struct timeval *overflow; { return NULL; } dante-1.1.19.dfsg/sockd/session.c0000644000175000017500000000441610360254530015233 0ustar roamroam/* * $Id: session.c,v 1.2 2006/01/08 18:26:32 karls Exp $ * * Copyright (c) 2005, 2006 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: session.c,v 1.2 2006/01/08 18:26:32 karls Exp $"; extern const char *module_session_ipaddrv[]; extern const int module_session_ipaddrc; void session_unuse(ss) session_t *ss; { } int session_use(ss) session_t *ss; { return 1; } dante-1.1.19.dfsg/sockd/auth_password.c0000644000175000017500000000546410251510616016436 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: auth_password.c,v 1.9 2005/06/06 11:26:59 michaels Exp $"; int passwordcheck(name, clearpassword, emsg, emsglen) const char *name; const char *clearpassword; char *emsg; size_t emsglen; { /* const char *function = "passwordcheck()"; */ struct passwd *pw; char *salt, *password; uid_t euid; socks_seteuid(&euid, sockscf.uid.privileged); pw = socks_getpwnam(name); socks_reseteuid(sockscf.uid.privileged, euid); if (pw == NULL) { snprintfn(emsg, emsglen, "system username/password failed"); return -1; } if (clearpassword != NULL) { salt = pw->pw_passwd; password = pw->pw_passwd; if (strcmp(crypt(clearpassword, salt), password) == 0) return 0; else { snprintfn(emsg, emsglen, "system password userauthentication failed"); return -1; } } else return 0; return -1; } dante-1.1.19.dfsg/sockd/sockd.c0000754000175000017500000006427410364161030014661 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: sockd.c,v 1.311 2006/01/20 13:06:39 michaels Exp $"; /* * signal handlers */ __BEGIN_DECLS static void modulesetup __P((void)); static void siginfo __P((int sig)); static void sigchld __P((int sig)); static void sigalrm __P((int sig)); static void sighup __P((int sig)); static void sigserverbroadcast __P((int sig)); /* * Broadcasts "sig" to all other servers. * */ static void serverinit __P((int argc, char *argv[], char *envp[])); /* * Initialises options/sockscf. "argc" and "argv" should be * the arguments passed to main(). * Exits on failure. */ static void usage __P((int code)); /* * print usage. */ static void showversion __P((void)); /* * show versioninfo and exits. */ static void showlicense __P((void)); /* * shows license and exits. */ static void optioninit __P((void)); /* * sets unset options to a reasonable default. */ #if DIAGNOSTIC && HAVE_MALLOC_OPTIONS extern char *malloc_options; #endif /* DIAGNOSTIC && HAVE_MALLOC_OPTIONS */ #if HAVE_PROGNAME extern char *__progname; #else char *__progname = "sockd"; /* default. */ #endif /* HAVE_PROGNAME */ extern char *optarg; #define ELECTRICFENCE 0 #if ELECTRICFENCE extern int EF_PROTECT_FREE; extern int EF_ALLOW_MALLOC_0; extern int EF_ALIGNMENT; extern int EF_PROTECT_BELOW; #endif /* ELECTRICFENCE */ __END_DECLS int #if HAVE_SETPROCTITLE main(argc, argv) #else main(argc, argv, envp) #endif /* HAVE_SETPROCTITLE */ int argc; char *argv[]; #if !HAVE_SETPROCTITLE char *envp[]; #endif /* HAVE_SETPROCTITLE */ { struct sigaction sigact; int p, maxfd, dforchild; FILE *fp; #if HAVE_SETPROCTITLE char *envp[] = { NULL }; /* dummy. */ #endif /* HAVE_SETPROCTITLE */ const int exitsignalv[] = { SIGINT, SIGQUIT, SIGBUS, SIGSEGV, SIGTERM, SIGILL, SIGFPE #ifdef SIGSYS , SIGSYS #endif /* SIGSYS */ }; const size_t exitsignalc = ELEMENTS(exitsignalv); const int ignoresignalv[] = { SIGPIPE }; const size_t ignoresignalc = ELEMENTS(ignoresignalv); #if DIAGNOSTIC && HAVE_MALLOC_OPTIONS malloc_options = "AJ"; #endif /* DIAGNOSTIC && HAVE_MALLOC_OPTIONS */ #if ELECTRICFENCE EF_PROTECT_FREE = 1; EF_ALLOW_MALLOC_0 = 1; EF_ALIGNMENT = 0; EF_PROTECT_BELOW = 0; #endif /* ELECTRICFENCE */ serverinit(argc, argv, envp); showconfig(&sockscf); socks_seteuid(NULL, sockscf.uid.unprivileged); /* * for chroot and needing every descriptor we can get. */ /* syslog takes one */ dforchild = sockscf.log.type & LOGTYPE_SYSLOG ? -1 : 0; for (p = 0, maxfd = getdtablesize(); p < maxfd; ++p) { int i; if (descriptorisreserved(p)) continue; ++dforchild; /* descriptor will be usable by child. */ /* sockets we listen on. */ for (i = 0; i < sockscf.internalc; ++i) { if (p == sockscf.internalv[i].s) break; #if NEED_ACCEPTLOCK if (sockscf.option.serverc > 1) if (p == sockscf.internalv[i].lock) break; #endif } if (i < sockscf.internalc) /* p is socket we listen on. */ continue; close(p); } errno = 0; /* * Check system limits against what we need. * Enough descriptors for each childprocess? +2 for mother connections. */ /* CONSTCOND */ maxfd = MAX(SOCKD_NEGOTIATEMAX, MAX(SOCKD_REQUESTMAX, SOCKD_IOMAX * FDPASS_MAX)) + 2; if (dforchild < maxfd) { struct rlimit rlimit; rlimit.rlim_cur = rlimit.rlim_max = MIN(maxfd, FD_SETSIZE); if (setrlimit(RLIMIT_OFILE, &rlimit) != 0) { if (errno != EPERM) serr(EXIT_FAILURE, "setrlimit(RLIMIT_OFILE, %d)", (int)rlimit.rlim_max); else if (getdtablesize() < SOCKD_NEGOTIATEMAX + 2) serr(EXIT_FAILURE, "%d descriptors configured for negotiation, %d available", SOCKD_NEGOTIATEMAX + 2, getdtablesize()); else if (getdtablesize() < SOCKD_REQUESTMAX + 2) serr(EXIT_FAILURE, "%d descriptors configured for requestcompletion, %d available", SOCKD_REQUESTMAX + 2, getdtablesize()); else if (getdtablesize() < SOCKD_IOMAX * FDPASS_MAX + 2) serr(EXIT_FAILURE, "%d descriptors configured for i/o, %d available", SOCKD_IOMAX * FDPASS_MAX + 2, getdtablesize()); else SERRX(getdtablesize()); } } /* set up signalhandlers. */ sigemptyset(&sigact.sa_mask); sigact.sa_flags = SA_RESTART | SA_NOCLDSTOP; sigact.sa_handler = siginfo; #if HAVE_SIGNAL_SIGINFO if (sigaction(SIGINFO, &sigact, NULL) != 0) { swarn("sigaction(SIGINFO)"); return EXIT_FAILURE; } #endif /* HAVE_SIGNAL_SIGINFO */ /* same handler, for systems without SIGINFO. */ if (sigaction(SIGUSR1, &sigact, NULL) != 0) { swarn("sigaction(SIGUSR1)"); return EXIT_FAILURE; } sigact.sa_handler = sighup; if (sigaction(SIGHUP, &sigact, NULL) != 0) { swarn("sigaction(SIGHUP)"); return EXIT_FAILURE; } sigact.sa_handler = sigchld; if (sigaction(SIGCHLD, &sigact, NULL) != 0) { swarn("sigaction(SIGCHLD)"); return EXIT_FAILURE; } sigact.sa_handler = sockdexit; for (p = 0; (size_t)p < exitsignalc; ++p) if (sigaction(exitsignalv[p], &sigact, NULL) != 0) swarn("sigaction(%d)", exitsignalv[p]); sigact.sa_handler = SIG_IGN; for (p = 0; (size_t)p < ignoresignalc; ++p) if (sigaction(ignoresignalv[p], &sigact, NULL) != 0) swarn("sigaction(%d)", ignoresignalv[p]); sigact.sa_flags = 0; /* want to be interrupted. */ sigact.sa_handler = sigalrm; if (sigaction(SIGALRM, &sigact, NULL) != 0) { swarn("sigaction(SIGALRM)"); return EXIT_FAILURE; } /* * Would have liked to move the daemon() call to after the "running" * message below, but we want to know who our children are. */ if (sockscf.option.daemon) if (daemon(1, 0) != 0) serr(EXIT_FAILURE, "daemon()"); newprocinit(); #if !HAVE_DISABLED_PIDFILE socks_seteuid(NULL, sockscf.uid.privileged); if ((fp = fopen(SOCKD_PIDFILE, "w")) == NULL) { swarn("open(%s)", SOCKD_PIDFILE); errno = 0; } socks_seteuid(NULL, sockscf.uid.unprivileged); if (fp != NULL) { if (fprintf(fp, "%lu\n", (unsigned long)sockscf.state.pid) == EOF) swarn("fprintf(%s)", SOCKD_PIDFILE); fclose(fp); } #endif /* !HAVE_DISABLED_PIDFILE */ time(&sockscf.stat.boot); if ((sockscf.state.motherpidv = (pid_t *)malloc( sizeof(*sockscf.state.motherpidv) * sockscf.option.serverc)) == NULL) serrx(EXIT_FAILURE, "%s", NOMEM); *sockscf.state.motherpidv = sockscf.state.pid; /* main server. */ /* fork of requested number of servers. Start at one 'cause we are "it". */ for (p = 1; p < sockscf.option.serverc; ++p) { pid_t pid; if ((pid = fork()) == -1) swarn("fork()"); else if (pid == 0) { newprocinit(); break; } else sockscf.state.motherpidv[p] = pid; } if (childcheck(CHILD_NEGOTIATE) <= 0 || childcheck(CHILD_REQUEST) <= 0 || childcheck(CHILD_IO) <= 0) serr(EXIT_FAILURE, "childcheck() failed"); slog(LOG_INFO, "%s/server v%s running", PACKAGE, VERSION); /* * main loop; accept new connections and handle our children. */ /* CONSTCOND */ while (1) { int client; struct sockd_child_t *child; fd_set rset; int rbits; rbits = fillset(&rset); ++rbits; switch ((p = select(rbits, &rset, NULL, NULL, NULL))) { case 0: SERR(p); /* NOTREACHED */ case -1: if (errno == EINTR) continue; SERR(p); /* NOTREACHED */ } /* * handle our children. */ /* first, get ack of free slots. */ while ((child = getset(SOCKD_FREESLOT, &rset)) != NULL) { char command; int childisbad = 0; if ((p = readn(child->ack, &command, sizeof(command), NULL)) != sizeof(command)) { if (p == 0) swarnx("eof from %schild %lu", childtype2string(child->type), (unsigned long)child->pid); else swarn("readn(child->ack) from %schild %lu failed", childtype2string(child->type), (unsigned long)child->pid); childisbad = 1; } else { SASSERTX(command == SOCKD_FREESLOT); ++child->freec; } clearset(SOCKD_FREESLOT, child, &rset); if (childisbad) removechild(child->pid); } /* next, get new requests. */ while ((child = getset(SOCKD_NEWREQUEST, &rset)) != NULL) { int childisbad = 0; #if DIAGNOSTIC int freed = freedescriptors(sockscf.option.debug ? "start" : NULL); #endif switch (child->type) { /* * in the order a packet travels between children; * negotiate -> request -> io. */ case CHILD_NEGOTIATE: { int flags; struct sockd_request_t req; struct sockd_child_t *reqchild; if ((reqchild = nextchild(CHILD_REQUEST)) == NULL) break; /* no child to accept a new request. */ SASSERTX(reqchild->freec > 0); /* receive request from negotiator child... */ if ((p = recv_req(child->s, &req)) != 0) { childisbad = 1; break; } ++sockscf.stat.negotiate.received; /* set descriptor to blocking for request... */ if ((flags = fcntl(req.s, F_GETFL, 0)) == -1 || fcntl(req.s, F_SETFL, flags & ~O_NONBLOCK) == -1) swarn("fcntl()"); /* and send it to a request child. */ if ((p = send_req(reqchild->s, &req)) == 0) { --reqchild->freec; ++sockscf.stat.request.sendt; } else { clearset(SOCKD_NEWREQUEST, child, &rset); childisbad = 1; child = reqchild; } close(req.s); break; } case CHILD_REQUEST: { struct sockd_io_t io; struct sockd_child_t *iochild; if ((iochild = nextchild(CHILD_IO)) == NULL) break; /* no child to accept new io. */ SASSERTX(iochild->freec > 0); /* get io from request child ... */ if ((p = recv_io(child->s, &io)) != 0) { childisbad = 1; break; } ++sockscf.stat.request.received; /* and send it to a io child. */ if ((p = send_io(iochild->s, &io)) == 0) { --iochild->freec; ++sockscf.stat.io.sendt; } else { clearset(SOCKD_NEWREQUEST, child, &rset); childisbad = 1; child = iochild; } close_iodescriptors(&io); break; } case CHILD_IO: /* * the only thing a iochild should return is a ack each time * it finishes with a io, that is handled in loop above. */ break; } #if DIAGNOSTIC SASSERTX(freed == freedescriptors(sockscf.option.debug ? "end" : NULL)); #endif clearset(SOCKD_NEWREQUEST, child, &rset); if (childisbad) /* error/eof from child. */ switch (errno) { case EMFILE: case ENFILE: break; /* child is ok, we are not. */ default: removechild(child->pid); } } /* handled our children. Is there a new connection pending? */ for (p = 0; p < sockscf.internalc; ++p) { char accepted[MAXSOCKADDRSTRING]; if (FD_ISSET(sockscf.internalv[p].s, &rset)) { const struct listenaddress_t *l = &sockscf.internalv[p]; struct sockd_child_t *negchild; struct sockaddr from; socklen_t len; if ((negchild = nextchild(CHILD_NEGOTIATE)) == NULL) break; /* no free negotiator children, don't accept(). */ #if NEED_ACCEPTLOCK if (sockscf.option.serverc > 1) if (socks_lock(l->lock, F_WRLCK, 0) != 0) continue; #endif #if HAVE_SENDMSG_DEADLOCK if (socks_lock(negchild->lock, F_WRLCK, 0) != 0) { #if NEED_ACCEPTLOCK if (sockscf.option.serverc > 1) socks_unlock(l->lock); #endif /* NEED_ACCEPTLOCK */ continue; } #endif /* HAVE_SENDMSG_DEADLOCK */ len = sizeof(from); if ((client = acceptn(l->s, &from, &len)) == -1) switch (errno) { #ifdef EPROTO case EPROTO: /* overloaded SVR4 error */ #endif case EWOULDBLOCK: /* BSD */ case ECONNABORTED: /* POSIX */ /* rest appears to be Linux stuff according to apache src. */ #ifdef ECONNRESET case ECONNRESET: #endif #ifdef ETIMEDOUT case ETIMEDOUT: #endif #ifdef EHOSTUNREACH case EHOSTUNREACH: #endif #ifdef ENETUNREACH case ENETUNREACH: #endif #if NEED_ACCEPTLOCK if (sockscf.option.serverc > 1) socks_unlock(l->lock); #endif /* NEED_ACCEPTLOCK */ #if HAVE_SENDMSG_DEADLOCK socks_unlock(negchild->lock); #endif /* HAVE_SENDMSG_DEADLOCK */ slog(LOG_DEBUG, "accept(): %s", strerror(errno)); continue; /* connection aborted/failed. */ case ENFILE: continue; /* * this should never happen since childcheck(), if * initially successful, should make sure there is * always enough descriptors available. */ case EMFILE: /* FALLTHROUGH */ default: SERR(client); } #if HAVE_LINUX_BUGS /* * yes, Linux manages to lose the descriptor flags, workaround * might be insufficient. */ if (fcntl(client, F_SETFL, fcntl(l->s, F_GETFL, 0)) != 0) swarn("tried to work around Linux bug via fcntl()"); #endif /* HAVE_LINUX_BUGS */ ++sockscf.stat.accepted; #if NEED_ACCEPTLOCK if (sockscf.option.serverc > 1) socks_unlock(l->lock); #endif slog(LOG_DEBUG, "got accept(): %s", sockaddr2string(&from, accepted, sizeof(accepted))); if (send_client(negchild->s, client) == 0) { --negchild->freec; ++sockscf.stat.negotiate.sendt; } else switch (errno) { case EMFILE: case ENFILE: break; /* child is ok, we are not. */ default: removechild(negchild->pid); } #if HAVE_SENDMSG_DEADLOCK socks_unlock(negchild->lock); #endif /* HAVE_SENDMSG_DEADLOCK */ close(client); } } } /* NOTREACHED */ } static void sigserverbroadcast(sig) int sig; { int i; for (i = 1; i < sockscf.option.serverc; ++i) if (sockscf.state.motherpidv[i] != 0) kill(sockscf.state.motherpidv[i], sig); } static void usage(code) int code; { fprintf(code == 0 ? stdout : stderr, "%s: usage: %s [-DLNVdfhnv]\n" " -D : run in daemon mode\n" " -L : shows the license for this program\n" " -N : fork of servers [1]\n" " -V : verify configuration and exit\n" " -d : enable debugging\n" " -f : use as configuration file [%s]\n" " -h : print this information\n" " -n : disable TCP keep-alive\n" " -v : print version info\n", __progname, __progname, SOCKD_CONFIGFILE); exit(code); } static void showversion(void) { printf("%s: %s v%s\n", __progname, PACKAGE, VERSION); exit(EXIT_SUCCESS); } static void showlicense(void) { printf("%s: %s v%s\n%s\n", __progname, PACKAGE, VERSION, "\ /*\n\ * Copyright (c) 1997, 1998, 1999, 2000, 2001\n\ * Inferno Nettverk A/S, Norway. All rights reserved.\n\ *\n\ * Redistribution and use in source and binary forms, with or without\n\ * modification, are permitted provided that the following conditions\n\ * are met:\n\ * 1. The above copyright notice, this list of conditions and the following\n\ * disclaimer must appear in all copies of the software, derivative works\n\ * or modified versions, and any portions thereof, aswell as in all\n\ * supporting documentation.\n\ * 2. All advertising materials mentioning features or use of this software\n\ * must display the following acknowledgement:\n\ * This product includes software developed by\n\ * Inferno Nettverk A/S, Norway.\n\ * 3. The name of the author may not be used to endorse or promote products\n\ * derived from this software without specific prior written permission.\n\ *\n\ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n\ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n\ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \n\ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n\ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n\ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \n\ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n\ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\ *\n\ * Inferno Nettverk A/S requests users of this software to return to\n\ * \n\ * Software Distribution Coordinator or sdc@inet.no\n\ * Inferno Nettverk A/S\n\ * Oslo Research Park\n\ * Gaustadalléen 21\n\ * NO-0349 Oslo\n\ * Norway\n\ * \n\ * any improvements or extensions that they make and grant Inferno Nettverk A/S\n\ * the rights to redistribute these changes.\n\ *\n\ */"); exit(EXIT_SUCCESS); } /* ARGSUSED */ /* need envp if no HAVE_SETPROCTITLE */ static void serverinit(argc, argv, envp) int argc; char *argv[]; char *envp[]; { const char *function = "serverinit()"; uid_t euid; int ch, i; int verifyonly = 0; struct rlimit rlimit; #if !HAVE_PROGNAME if (argv[0] != NULL) if ((__progname = strrchr(argv[0], '/')) == NULL) __progname = argv[0]; else ++__progname; #endif /* !HAVE_PROGNAME */ #if !HAVE_SETPROCTITLE if (initsetproctitle(argc, argv, envp) == -1) serr(EXIT_FAILURE, "%s: malloc", function); #endif /* !HAVE_SETPROCTITLE*/ sockscf.child.addchild = 1; sockscf.state.euid = geteuid(); sockscf.state.type = CHILD_MOTHER; sockscf.option.serverc = 1; /* ourselves. ;-) */ sockscf.bwlock = -1; sockscf.sessionlock = -1; while ((ch = getopt(argc, argv, "DLN:Vdf:hlnvw:")) != -1) { switch (ch) { case 'D': sockscf.option.daemon = 1; break; case 'L': showlicense(); /* NOTREACHED */ case 'N': { char *endptr; if ((sockscf.option.serverc = (int)strtol(optarg, &endptr, 10)) < 1 || *endptr != NUL) serrx(EXIT_FAILURE, "%s: illegal value for -%c: %s", function, ch, optarg); break; } case 'V': verifyonly = 1; break; case 'd': ++sockscf.option.debug; break; case 'f': #if !HAVE_SETPROCTITLE /* let it point outside argv for replacement setproctitle(). */ if ((sockscf.option.configfile = strdup(optarg)) == NULL) serrx(EXIT_FAILURE, "%s: %s", function, NOMEM); #else sockscf.option.configfile = optarg; #endif /* !HAVE_SETPROCTITLE */ break; case 'h': usage(0); /* NOTREACHED */ case 'l': swarnx("option -%c is deprecated", ch); break; case 'n': sockscf.option.keepalive = 0; break; case 'v': showversion(); /* NOTREACHED */ case 'w': sockscf.option.sleep = atoi(optarg); break; default: usage(1); } } argc -= optind; argv += optind; if (argc > 0) serrx(EXIT_FAILURE, "%s: unknown argument %s", function, *argv); if (sockscf.option.configfile == NULL) sockscf.option.configfile = SOCKD_CONFIGFILE; optioninit(); genericinit(); modulesetup(); if (verifyonly) { showconfig(&sockscf); exit(EXIT_SUCCESS); } for (i = 0; i < sockscf.internalc; ++i) { int flags; struct listenaddress_t *l = &sockscf.internalv[i]; if ((l->s = socket(AF_INET, SOCK_STREAM, 0)) == -1) serr(EXIT_FAILURE, "%s: socket(SOCK_STREAM)", function); setsockoptions(l->s); ch = 1; if (setsockopt(l->s, SOL_SOCKET, SO_REUSEADDR, &ch, sizeof(ch)) != 0) swarn("%s: setsockopt(SO_REUSEADDR)", function); socks_seteuid(&euid, sockscf.uid.privileged); /* LINTED pointer casts may be troublesome */ if (bind(l->s, (struct sockaddr *)&l->addr, sizeof(l->addr)) != 0) { char badbind[MAXSOCKADDRSTRING]; /* LINTED pointer casts may be troublesome */ serr(EXIT_FAILURE, "%s: bind(%s)", function, sockaddr2string((struct sockaddr *)&l->addr, badbind, sizeof(badbind))); } socks_reseteuid(sockscf.uid.privileged, euid); if (listen(l->s, SOCKD_MAXCLIENTQUE) == -1) serr(EXIT_FAILURE, "%s: listen(%d)", function, SOCKD_MAXCLIENTQUE); if ((flags = fcntl(l->s, F_GETFL, 0)) == -1 || fcntl(l->s, F_SETFL, flags | O_NONBLOCK) == -1) serr(EXIT_FAILURE, "%s: fcntl()", function); #if NEED_ACCEPTLOCK if (sockscf.option.serverc > 1) if ((l->lock = socks_mklock(SOCKS_LOCKFILE)) == -1) serr(EXIT_FAILURE, "%s: socks_mklock()", function); #endif } /* avoid potentioal overflow of fd_set. */ if (getrlimit(RLIMIT_OFILE, &rlimit) != 0) serr(EXIT_FAILURE, "getrlimit(RLIMIT_OFILE)"); if (rlimit.rlim_cur > FD_SETSIZE) { rlimit.rlim_cur = rlimit.rlim_max = FD_SETSIZE; if (setrlimit(RLIMIT_OFILE, &rlimit) != 0) serr(EXIT_FAILURE, "setrlimit(RLIMIT_OFILE, %d)", (int)rlimit.rlim_cur); slog(LOG_DEBUG, "%s: reduced max descriptors to %d", function, (int)rlimit.rlim_cur); } } /* ARGSUSED */ static void siginfo(sig) int sig; { unsigned long seconds, days, hours, minutes; size_t clients; clients = 0; clients += childcheck(-CHILD_NEGOTIATE); clients += childcheck(-CHILD_REQUEST); clients += childcheck(-CHILD_IO); clients -= childcheck(CHILD_NEGOTIATE); clients -= childcheck(CHILD_REQUEST); clients -= childcheck(CHILD_IO); seconds = difftime(time(NULL), sockscf.stat.boot); if (seconds >= 3600 * 24) { days = seconds / (3600 * 24); seconds -= days * 3600 * 24; } else days = 0; if (seconds >= 3600) { hours = seconds / 3600; seconds -= hours * 3600; } else hours = 0; if (seconds >= 60) { minutes = seconds / 60; seconds -= minutes * 60; } else minutes = 0; slog(LOG_INFO, "%s v%s up %lu day%s, %lu:%.2lu, a: %lu, c: %lu", PACKAGE, VERSION, days, days == 1 ? "" : "s", hours, minutes, (unsigned long)sockscf.stat.accepted, (unsigned long)clients); slog(LOG_INFO, "negotiators (%d): a: %lu, h: %lu, c: %lu", childcheck(-CHILD_NEGOTIATE) / SOCKD_NEGOTIATEMAX, (unsigned long)sockscf.stat.negotiate.sendt, (unsigned long)sockscf.stat.negotiate.received, (unsigned long)childcheck(-CHILD_NEGOTIATE) - childcheck(CHILD_NEGOTIATE)); slog(LOG_INFO, "requests (%d): a: %lu, h: %lu, c: %lu", childcheck(-CHILD_REQUEST) / SOCKD_REQUESTMAX, (unsigned long)sockscf.stat.request.sendt, (unsigned long)sockscf.stat.request.received, (unsigned long)childcheck(-CHILD_REQUEST) - childcheck(CHILD_REQUEST)); slog(LOG_INFO, "iorelayers (%d): a: %lu, h: %lu, c: %lu", childcheck(-CHILD_IO) / SOCKD_IOMAX, (unsigned long)sockscf.stat.io.sendt, (unsigned long)sockscf.stat.io.sendt, (unsigned long)childcheck(-CHILD_IO) - childcheck(CHILD_IO)); if (pidismother(sockscf.state.pid) == 1) /* main mother */ sigserverbroadcast(sig); sigchildbroadcast(sig, CHILD_NEGOTIATE | CHILD_REQUEST | CHILD_IO); } /* ARGSUSED */ static void sighup(sig) int sig; { const char *function = "sighup()"; uid_t euid; int p; slog(LOG_INFO, function); resetconfig(); optioninit(); socks_seteuid(&euid, sockscf.state.euid); genericinit(); socks_reseteuid(sockscf.state.euid, euid); modulesetup(); /* LINTED assignment in conditional context */ if ((p = pidismother(sockscf.state.pid))) { if (p == 1) { /* main mother. */ showconfig(&sockscf); sigserverbroadcast(sig); } sigchildbroadcast(sig, CHILD_NEGOTIATE | CHILD_REQUEST | CHILD_IO); } } /* ARGSUSED */ static void sigchld(sig) int sig; { const char *function = "sigchld()"; static time_t deathtime; static int deaths; int status; pid_t pid; while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { int i; /* * No child should normally die, but try to cope with it happening. */ /* LINTED assignment in conditional context */ if ((i = pidismother(pid))) sockscf.state.motherpidv[i - 1] = 0; else ; /* assume relay child. */ ++deaths; } /* * If we get a lot of childdeaths in a short time, assume something * is wrong. */ if (deathtime == 0) time(&deathtime); if (difftime(time(NULL), deathtime) > 60) { /* enough time passed; reset. */ deaths = 0; time(&deathtime); } if (deaths >= 10) { if (deaths == 10) { /* log once. */ slog(LOG_ERR, "%s: %d childdeaths in %.0fs; locking count for a while", function, deaths, difftime(time(NULL), deathtime)); sockscf.child.addchild = 0; } time(&deathtime); /* once the ball starts rolling... */ alarm(60); } else sockscf.child.addchild = 1; /* can try to add a new one. */ } /* ARGSUSED */ static void sigalrm(sig) int sig; { sockscf.child.addchild = 1; } static void optioninit(void) { /* * initialize misc. options to sensible default. */ sockscf.resolveprotocol = RESOLVEPROTOCOL_UDP; sockscf.option.keepalive = 1; sockscf.timeout.negotiate = SOCKD_NEGOTIATETIMEOUT; sockscf.timeout.io = SOCKD_IOTIMEOUT; sockscf.external.rotation = ROTATION_NONE; #if HAVE_PAM sockscf.state.pamservicename = DEFAULT_PAMSERVICENAME; #endif #if DEBUG sockscf.child.maxidle = 0; /* XXX SOCKD_FREESLOTS;*/ #else sockscf.child.maxidle = 0; #endif } static void modulesetup(void) { shmem_lockall(); shmem_setup(); redirectsetup(); shmem_unlockall(); } dante-1.1.19.dfsg/sockd/sockd_negotiate.c0000644000175000017500000003554010345565447016733 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" #include "config_parse.h" static const char rcsid[] = "$Id: sockd_negotiate.c,v 1.90 2005/11/08 16:00:21 michaels Exp $"; __BEGIN_DECLS static int send_negotiate __P((const struct sockd_mother_t *mother, const struct sockd_negotiate_t *neg)); /* * Sends "neg" to "s". Also ack's that we have freed a slot to "s". * Returns: * On success: 0 * On failure: -1 * If some other problem prevented success: > 0 */ static int recv_negotiate __P((const struct sockd_mother_t *mother)); /* * Tries to receive a client from mother "s". * Returns: * On success: 0 * If a error happened to connection with "s": -1 * If some other problem prevented success: > 0 */ static void delete_negotiate __P((const struct sockd_mother_t *mother, struct sockd_negotiate_t *neg)); /* * Frees any state occupied by "neg", including closing any * descriptors and sending a ack that we have deleted a "negotiate" * object to "mother". */ static int neg_fillset __P((fd_set *set)); /* * Sets all descriptors in our list in the set "set". * Returns the highest descriptor in our list, or -1 if we don't * have any descriptors open currently. */ static void neg_clearset __P((struct sockd_negotiate_t *neg, fd_set *set)); /* * Clears all filedescriptors in "neg" from "set". */ static struct sockd_negotiate_t * neg_getset __P((fd_set *set)); /* * Goes through our list until it finds a negotiate object where atleast * one of the descriptors is set. * Returns: * On success: pointer to the found object. * On failure: NULL. */ static int allocated __P((void)); /* * Returns the number of allocated (active) objects. */ static int completed __P((void)); /* * Returns the number of objects completed and ready to be sent currently. */ static int allocated __P((void)); /* * Returns the number of objects currently allocated for use. */ static void proctitleupdate __P((void)); /* * Updates the title of this process. */ static struct timeval * neg_gettimeout __P((struct timeval *timeout)); /* * Fills in "timeout" with time til the first clients connection * expires. * Returns: * If there is a timeout: pointer to filled in "timeout". * If there is no timeout: NULL. */ static struct sockd_negotiate_t * neg_gettimedout __P((void)); /* * Scans all clients for one that has timed out according to sockscf * settings. * Returns: * If timed out client found: pointer to it. * Else: NULL. */ static void siginfo __P((int sig)); /* * Print information about our current connections. */ __END_DECLS static struct sockd_negotiate_t negv[SOCKD_NEGOTIATEMAX]; static int negc = ELEMENTS(negv); void run_negotiate(mother) struct sockd_mother_t *mother; { const char *function = "run_negotiate()"; struct sigaction sigact; sigemptyset(&sigact.sa_mask); sigact.sa_flags = SA_RESTART; sigact.sa_handler = siginfo; #if HAVE_SIGNAL_SIGINFO if (sigaction(SIGINFO, &sigact, NULL) != 0) serr(EXIT_FAILURE, "%s: sigaction(SIGINFO)", function); #endif /* HAVE_SIGNAL_SIGINFO */ /* same handler, for systems without SIGINFO. */ if (sigaction(SIGUSR1, &sigact, NULL) != 0) serr(EXIT_FAILURE, "%s: sigaction(SIGINFO)", function); proctitleupdate(); /* CONSTCOND */ while (1) { fd_set rset, wsetmem, *wset = NULL; int fdbits, p; struct sockd_negotiate_t *neg; struct timeval timeout; while ((neg = neg_gettimedout()) != NULL) { const char *reason = "negotiation timed out"; iolog(&neg->rule, &neg->state, OPERATION_ABORT, &neg->negstate.src, &neg->state.auth, &neg->negstate.dst, NULL, reason, 0); delete_negotiate(mother, neg); } fdbits = neg_fillset(&rset); FD_SET(mother->s, &rset); fdbits = MAX(fdbits, mother->s); /* if we have a completed request check whether we can send to mother. */ if (completed() > 0) { FD_ZERO(&wsetmem); FD_SET(mother->s, &wsetmem); wset = &wsetmem; } ++fdbits; switch (selectn(fdbits, &rset, wset, NULL, neg_gettimeout(&timeout))) { case -1: SERR(-1); /* NOTREACHED */ case 0: continue; } if (FD_ISSET(mother->s, &rset)) { if (recv_negotiate(mother) == -1) sockdexit(-EXIT_FAILURE); FD_CLR(mother->s, &rset); } while ((neg = neg_getset(&rset)) != NULL) { neg_clearset(neg, &rset); errno = 0; if ((p = recv_request(neg->s, &neg->req, &neg->negstate)) <= 0) { const char *reason = NULL; /* init or gcc complains. */ switch (p) { case 0: reason = "eof from client"; break; case -1: switch (errno) { case 0: reason = *neg->negstate.emsg == NUL ? "socks protocol error" : neg->negstate.emsg; break; case EINTR: case EAGAIN: #if EAGAIN != EWOULDBLOCK case EWOULDBLOCK: #endif continue; /* ok, retry. */ default: reason = strerror(errno); } } iolog(&neg->rule, &neg->state, OPERATION_ABORT, &neg->negstate.src, &neg->state.auth, &neg->negstate.dst, NULL, reason, 0); delete_negotiate(mother, neg); } else if (wset != NULL && FD_ISSET(mother->s, wset)) { /* read a complete request, send to mother. */ switch (send_negotiate(mother, neg)) { case -1: sockdexit(-EXIT_FAILURE); /* NOTREACHED */ case 0: delete_negotiate(mother, neg); /* sent to mother ok. */ break; } } } } } static int send_negotiate(mother, neg) const struct sockd_mother_t *mother; const struct sockd_negotiate_t *neg; { const char *function = "send_negotiate()"; struct iovec iovec[1]; struct sockd_request_t req; int fdsendt, w; struct msghdr msg; CMSG_AALLOC(cmsg, sizeof(int)); #if HAVE_SENDMSG_DEADLOCK if (socks_lock(mother->lock, F_WRLCK, 0) != 0) return 1; #endif /* HAVE_SENDMSG_DEADLOCK */ /* copy needed fields from negotiate */ /* LINTED pointer casts may be troublesome */ sockshost2sockaddr(&neg->negstate.src, (struct sockaddr *)&req.from); req.req = neg->req; req.rule = neg->rule; req.state = neg->state; req.state.command = req.req.command; req.state.version = req.req.version; /* LINTED pointer casts may be troublesome */ sockshost2sockaddr(&neg->negstate.dst, (struct sockaddr *)&req.to); iovec[0].iov_base = &req; iovec[0].iov_len = sizeof(req); fdsendt = 0; /* LINTED pointer casts may be troublesome */ CMSG_ADDOBJECT(neg->s, cmsg, sizeof(neg->s) * fdsendt++); msg.msg_iov = iovec; msg.msg_iovlen = ELEMENTS(iovec); msg.msg_name = NULL; msg.msg_namelen = 0; /* LINTED pointer casts may be troublesome */ CMSG_SETHDR_SEND(msg, cmsg, sizeof(int) * fdsendt); slog(LOG_DEBUG, "sending request to mother"); if ((w = sendmsg(mother->s, &msg, 0)) != sizeof(req)) switch (errno) { case EAGAIN: case ENOBUFS: w = 1; /* temporal error. */ break; default: swarn("%s: sendmsg(): %d of %d", function, w, sizeof(req)); } #if HAVE_SENDMSG_DEADLOCK socks_unlock(mother->lock); #endif /* HAVE_SENDMSG_DEADLOCK */ return w == sizeof(req) ? 0 : w; } static int recv_negotiate(mother) const struct sockd_mother_t *mother; { const char *function = "recv_negotiate()"; struct sockd_negotiate_t *neg; struct iovec iovec[1]; socklen_t len; unsigned char command; int permit, i, r, fdexpect, fdreceived; struct msghdr msg; char ruleinfo[256]; CMSG_AALLOC(cmsg, sizeof(int)); struct sockaddr src, dst; iovec[0].iov_base = &command; iovec[0].iov_len = sizeof(command); msg.msg_iov = iovec; msg.msg_iovlen = ELEMENTS(iovec); msg.msg_name = NULL; msg.msg_namelen = 0; /* LINTED pointer casts may be troublesome */ CMSG_SETHDR_RECV(msg, cmsg, CMSG_MEMSIZE(cmsg)); if ((r = recvmsg(mother->s, &msg, 0)) != sizeof(command)) { switch (r) { case -1: swarn("%s: recvmsg() from mother", function); break; case 0: slog(LOG_DEBUG, "%s: recvmsg(): mother closed connection", function); break; default: swarnx("%s: recvmsg(): unexpected %d/%d bytes from mother", function, r, sizeof(command)); } return -1; } fdexpect = 1; /* constant */ SASSERTX(command == SOCKD_NEWREQUEST); /* find a free slot. */ for (i = 0, neg = NULL; i < negc; ++i) if (!negv[i].allocated) { /* don't allocate it yet, so siginfo() doesn't print before ready. */ neg = &negv[i]; break; } if (neg == NULL) SERRX(allocated()); #if !HAVE_DEFECT_RECVMSG SASSERT(CMSG_TOTLEN(msg) == CMSG_SPACE(sizeof(int) * fdexpect)); #endif fdreceived = 0; /* LINTED pointer casts may be troublesome */ CMSG_GETOBJECT(neg->s, cmsg, sizeof(neg->s) * fdreceived++); /* get local and remote address. */ len = sizeof(src); if (getpeername(neg->s, &src, &len) != 0) { slog(LOG_DEBUG, "%s: getpeername(): %s", function, strerror(errno)); delete_negotiate(mother, neg); return 1; } sockaddr2sockshost(&src, &neg->negstate.src); len = sizeof(dst); if (getsockname(neg->s, &dst, &len) != 0) { slog(LOG_DEBUG, "%s: getsockname(): %s", function, strerror(errno)); delete_negotiate(mother, neg); return 1; } sockaddr2sockshost(&dst, &neg->negstate.dst); /* init state correctly for checking a connection to us. */ neg->state.command = SOCKS_ACCEPT; neg->state.protocol = SOCKS_TCP; neg->state.version = SOCKS_V5; /* anything valid. */ neg->state.auth.method = AUTHMETHOD_NONE; /* pointer fixup */ neg->req.auth = &neg->state.auth; if (sockscf.sessionlock != -1) socks_lock(sockscf.sessionlock, F_WRLCK, -1); permit = rulespermit(neg->s, &src, &dst, &neg->rule, &neg->state, &neg->negstate.src, &neg->negstate.dst, ruleinfo, sizeof(ruleinfo)); if (permit && neg->rule.ss != NULL) /* don't bother if rules deny anyway. */ if (!session_use(neg->rule.ss)) { permit = 0; neg->rule.verdict = VERDICT_BLOCK; snprintf(ruleinfo, sizeof(ruleinfo), DENY_SESSIONLIMITs); neg->rule.ss = NULL; /* don't want delete_io to unuse() it. */ } if (sockscf.sessionlock != -1) socks_unlock(sockscf.sessionlock); iolog(&neg->rule, &neg->state, OPERATION_ACCEPT, &neg->negstate.src, &neg->state.auth, &neg->negstate.dst, NULL, ruleinfo, 0); if (!permit) { delete_negotiate(mother, neg); return 0; } time(&neg->state.time.negotiate_start); neg->allocated = 1; proctitleupdate(); return 0; } static void delete_negotiate(mother, neg) const struct sockd_mother_t *mother; struct sockd_negotiate_t *neg; { const char *function = "delete_negotiate()"; static const struct sockd_negotiate_t neginit; const char command = SOCKD_FREESLOT; if (neg->rule.ss != NULL) session_unuse(neg->rule.ss); close(neg->s); *neg = neginit; /* ack we have freed a slot. */ if (writen(mother->ack, &command, sizeof(command), NULL) != sizeof(command)) swarn("%s: writen()", function); proctitleupdate(); } static int neg_fillset(set) fd_set *set; { int i, max; FD_ZERO(set); for (i = 0, max = -1; i < negc; ++i) if (negv[i].allocated) { negv[i].ignore = 0; FD_SET(negv[i].s, set); max = MAX(max, negv[i].s); } return max; } static void neg_clearset(neg, set) struct sockd_negotiate_t *neg; fd_set *set; { FD_CLR(neg->s, set); neg->ignore = 1; } static struct sockd_negotiate_t * neg_getset(set) fd_set *set; { int i; for (i = 0; i < negc; ++i) if (negv[i].allocated) { if (negv[i].ignore) continue; if (negv[i].negstate.complete) return &negv[i]; if (FD_ISSET(negv[i].s, set)) return &negv[i]; } return NULL; } static int allocated(void) { int i, alloc; for (i = 0, alloc = 0; i < negc; ++i) if (negv[i].allocated) ++alloc; return alloc; } static int completed(void) { int i, completec; for (i = 0, completec = 0; i < negc; ++i) if (negv[i].allocated && negv[i].negstate.complete) ++completec; return completec; } static void proctitleupdate(void) { setproctitle("negotiator: %d/%d", allocated(), SOCKD_NEGOTIATEMAX); } static struct timeval * neg_gettimeout(timeout) struct timeval *timeout; { time_t timenow; int i; if (sockscf.timeout.negotiate == 0 || (allocated() == completed())) return NULL; timeout->tv_sec = sockscf.timeout.negotiate; timeout->tv_usec = 0; time(&timenow); for (i = 0; i < negc; ++i) if (!negv[i].allocated) continue; else timeout->tv_sec = MAX(0, MIN(timeout->tv_sec, difftime(sockscf.timeout.negotiate, (time_t)difftime(timenow, negv[i].state.time.negotiate_start)))); return timeout; } static struct sockd_negotiate_t * neg_gettimedout(void) { int i; time_t timenow; if (sockscf.timeout.negotiate == 0) return NULL; time(&timenow); for (i = 0; i < negc; ++i) { if (!negv[i].allocated) continue; if (negv[i].ignore) continue; else if (difftime(timenow, negv[i].state.time.negotiate_start) >= sockscf.timeout.negotiate) return &negv[i]; } return NULL; } /* ARGSUSED */ static void siginfo(sig) int sig; { int i; time_t timenow; time(&timenow); for (i = 0; i < negc; ++i) if (!negv[i].allocated) continue; else { char srcstring[MAXSOCKSHOSTSTRING]; slog(LOG_INFO, "%s: negotiating for %.0fs", sockshost2string(&negv[i].negstate.src, srcstring, sizeof(srcstring)), difftime(timenow, negv[i].state.time.negotiate_start)); } } dante-1.1.19.dfsg/sockd/config_parse.c0000644000175000017500000017115410364161577016227 0ustar roamroam#ifndef lint /*static char yysccsid[] = "from: @(#)yaccpar 1.9 (Berkeley) 02/21/93";*/ static char yyrcsid[] #if __GNUC__ >= 2 __attribute__ ((unused)) #endif /* __GNUC__ >= 2 */ = "$OpenBSD: skeleton.c,v 1.23 2004/03/12 13:39:50 henning Exp $"; #endif #include #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 #define YYLEX yylex() #define YYEMPTY -1 #define yyclearin (yychar=(YYEMPTY)) #define yyerrok (yyerrflag=0) #define YYRECOVERING() (yyerrflag!=0) #define yyparse socks_yyparse #define yylex socks_yylex #define yyerror socks_yyerror #define yychar socks_yychar #define yyval socks_yyval #define yylval socks_yylval #define yydebug socks_yydebug #define yynerrs socks_yynerrs #define yyerrflag socks_yyerrflag #define yyss socks_yyss #define yysslim socks_yysslim #define yyssp socks_yyssp #define yyvs socks_yyvs #define yyvsp socks_yyvsp #define yystacksize socks_yystacksize #define yylhs socks_yylhs #define yylen socks_yylen #define yydefred socks_yydefred #define yydgoto socks_yydgoto #define yysindex socks_yysindex #define yyrindex socks_yyrindex #define yygindex socks_yygindex #define yytable socks_yytable #define yycheck socks_yycheck #define yyname socks_yyname #define yyrule socks_yyrule #define YYPREFIX "socks_yy" #line 45 "../lib/config_parse.y" #include "common.h" #include "yacconfig.h" static const char rcsid[] = "$Id: config_parse.y,v 1.199 2006/01/20 12:59:06 michaels Exp $"; __BEGIN_DECLS #if HAVE_LIBWRAP && SOCKS_SERVER extern jmp_buf tcpd_buf; #endif /* HAVE_LIBWRAP && SOCKS_SERVER */ static void addressinit __P((struct ruleaddress_t *address)); #if SOCKS_SERVER static void ruleinit __P((struct rule_t *rule)); static void fixconfig __P((void)); #endif __END_DECLS extern int yylineno; extern char *yytext; #if SOCKS_SERVER static struct rule_t ruleinitmem; static struct rule_t rule; /* new rule. */ static struct protocol_t protocolmem; /* new protocolmem. */ #endif static struct serverstate_t state; static struct route_t route; /* new route. */ static struct ruleaddress_t gw; /* new gateway. */ static struct ruleaddress_t src; /* new src. */ static struct ruleaddress_t dst; /* new dst. */ static struct ruleaddress_t rdr_from; static struct ruleaddress_t rdr_to; static struct ruleaddress_t *ruleaddress; /* current ruleaddress */ static struct extension_t *extension; /* new extensions */ static struct proxyprotocol_t *proxyprotocol;/* proxy protocol. */ static char *atype; /* atype of new address. */ static struct in_addr *ipaddr; /* new ipaddress */ static struct in_addr *netmask; /* new netmask */ static char *domain; /* new domain. */ static char *ifname; /* new ifname. */ static in_port_t *port_tcp; /* new TCP portnumber. */ static in_port_t *port_udp; /* new UDP portnumber. */ static int *methodv; /* new authmethods. */ static size_t *methodc; /* number of them. */ static struct protocol_t *protocol; /* new protocol. */ static struct command_t *command; /* new command. */ static enum operator_t *operator; /* new operator. */ static const struct { const char *name; const int value; } syslogfacilityv[] = { #ifdef LOG_AUTH { "auth", LOG_AUTH }, #endif /* LOG_AUTH */ #ifdef LOG_AUTHPRIV { "authpriv", LOG_AUTHPRIV }, #endif /* LOG_AUTHPRIV */ #ifdef LOG_DAEMON { "daemon", LOG_DAEMON }, #endif /* LOG_DAEMON */ #ifdef LOG_USER { "user", LOG_USER }, #endif /* LOG_USER */ #ifdef LOG_LOCAL0 { "local0", LOG_LOCAL0 }, #endif /* LOG_LOCAL0 */ #ifdef LOG_LOCAL1 { "local1", LOG_LOCAL1 }, #endif /* LOG_LOCAL1 */ #ifdef LOG_LOCAL2 { "local2", LOG_LOCAL2 }, #endif /* LOG_LOCAL2 */ #ifdef LOG_LOCAL3 { "local3", LOG_LOCAL3 }, #endif /* LOG_LOCAL3 */ #ifdef LOG_LOCAL4 { "local4", LOG_LOCAL4 }, #endif /* LOG_LOCAL4 */ #ifdef LOG_LOCAL5 { "local5", LOG_LOCAL5 }, #endif /* LOG_LOCAL5 */ #ifdef LOG_LOCAL6 { "local6", LOG_LOCAL6 }, #endif /* LOG_LOCAL6 */ #ifdef LOG_LOCAL7 { "local7", LOG_LOCAL7 } #endif /* LOG_LOCAL7 */ }; #define YYDEBUG 1 #define ADDMETHOD(method) \ do { \ if (methodisset(method, methodv, *methodc)) \ yywarn("duplicate method: %s", method2string(method)); \ else { \ if (*methodc >= MAXMETHOD) \ yyerror("internal error, (%d >= %d)", *methodc, MAXMETHOD); \ methodv[(*methodc)++] = method; \ } \ } while (0) #line 167 "../lib/config_parse.y" #ifndef YYSTYPE_DEFINED #define YYSTYPE_DEFINED typedef union { char *string; uid_t uid; } YYSTYPE; #endif /* YYSTYPE_DEFINED */ #line 175 "config_parse.c" #define SERVERCONFIG 257 #define CLIENTCONFIG 258 #define DEPRECATED 259 #define CLIENTRULE 260 #define INTERNAL 261 #define EXTERNAL 262 #define EXTERNAL_ROTATION 263 #define DEBUGING 264 #define RESOLVEPROTOCOL 265 #define SRCHOST 266 #define NOMISMATCH 267 #define NOUNKNOWN 268 #define EXTENSION 269 #define BIND 270 #define PRIVILEGED 271 #define IOTIMEOUT 272 #define CONNECTTIMEOUT 273 #define METHOD 274 #define CLIENTMETHOD 275 #define NONE 276 #define GSSAPI 277 #define UNAME 278 #define RFC931 279 #define PAM 280 #define COMPATIBILITY 281 #define REUSEADDR 282 #define SAMEPORT 283 #define USERNAME 284 #define USER_PRIVILEGED 285 #define USER_UNPRIVILEGED 286 #define USER_LIBWRAP 287 #define LOGOUTPUT 288 #define LOGFILE 289 #define CHILD_MAXIDLE 290 #define ROUTE 291 #define VIA 292 #define VERDICT_BLOCK 293 #define VERDICT_PASS 294 #define PAMSERVICENAME 295 #define PROTOCOL 296 #define PROTOCOL_TCP 297 #define PROTOCOL_UDP 298 #define PROTOCOL_FAKE 299 #define PROXYPROTOCOL 300 #define PROXYPROTOCOL_SOCKS_V4 301 #define PROXYPROTOCOL_SOCKS_V5 302 #define PROXYPROTOCOL_MSPROXY_V2 303 #define PROXYPROTOCOL_HTTP_V1_0 304 #define USER 305 #define COMMAND 306 #define COMMAND_BIND 307 #define COMMAND_CONNECT 308 #define COMMAND_UDPASSOCIATE 309 #define COMMAND_BINDREPLY 310 #define COMMAND_UDPREPLY 311 #define ACTION 312 #define LINE 313 #define LIBWRAPSTART 314 #define OPERATOR 315 #define LOG 316 #define LOG_CONNECT 317 #define LOG_DATA 318 #define LOG_DISCONNECT 319 #define LOG_ERROR 320 #define LOG_IOOPERATION 321 #define IPADDRESS 322 #define DOMAINNAME 323 #define DIRECT 324 #define IFNAME 325 #define PORT 326 #define PORTNUMBER 327 #define SERVICENAME 328 #define NUMBER 329 #define FROM 330 #define TO 331 #define REDIRECT 332 #define BANDWIDTH 333 #define MAXSESSIONS 334 #define YYERRCODE 256 #if defined(__cplusplus) || defined(__STDC__) const short socks_yylhs[] = #else short socks_yylhs[] = #endif { -1, 0, 0, 53, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 27, 28, 28, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 52, 52, 52, 52, 52, 52, 3, 61, 26, 7, 8, 8, 8, 8, 8, 9, 9, 10, 11, 12, 12, 33, 34, 35, 35, 36, 37, 38, 39, 40, 40, 29, 29, 29, 41, 42, 43, 43, 60, 55, 55, 55, 56, 57, 58, 59, 31, 32, 30, 44, 45, 45, 46, 46, 14, 15, 15, 15, 16, 17, 17, 18, 18, 49, 98, 47, 99, 48, 51, 51, 51, 51, 51, 50, 50, 69, 70, 71, 71, 66, 67, 67, 67, 67, 67, 67, 68, 68, 72, 72, 72, 72, 72, 72, 73, 73, 19, 21, 21, 21, 21, 21, 20, 20, 4, 6, 6, 5, 5, 74, 22, 22, 24, 25, 23, 75, 77, 77, 77, 77, 77, 76, 76, 13, 78, 79, 80, 100, 101, 63, 64, 64, 64, 64, 64, 65, 65, 89, 90, 102, 103, 62, 81, 81, 81, 82, 82, 82, 83, 83, 83, 85, 85, 85, 84, 91, 91, 86, 87, 88, 92, 92, 92, 96, 96, 93, 94, 104, 97, 95, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yylen[] = #else short socks_yylen[] = #endif { 2, 2, 2, 1, 0, 2, 2, 2, 2, 2, 0, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 0, 3, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 4, 0, 4, 0, 3, 3, 1, 1, 1, 3, 1, 1, 2, 3, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, 2, 3, 1, 1, 1, 3, 1, 1, 1, 2, 3, 0, 4, 0, 4, 1, 1, 1, 1, 1, 1, 2, 7, 1, 0, 2, 6, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 2, 1, 3, 3, 3, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 4, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 3, 2, 1, 1, 3, 1, 1, 1, 1, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yydefred[] = #else short socks_yydefred[] = #endif { 0, 3, 14, 0, 10, 4, 0, 0, 33, 0, 0, 0, 35, 11, 16, 60, 12, 15, 59, 58, 13, 0, 53, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 122, 5, 19, 31, 32, 30, 28, 29, 20, 21, 22, 23, 27, 17, 18, 24, 6, 25, 66, 67, 68, 26, 9, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 93, 0, 0, 0, 0, 0, 0, 75, 83, 84, 82, 81, 62, 0, 61, 0, 0, 0, 0, 56, 57, 86, 87, 0, 85, 49, 0, 48, 73, 74, 0, 0, 77, 78, 0, 76, 72, 69, 70, 71, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 111, 119, 118, 109, 112, 108, 120, 139, 115, 0, 0, 107, 117, 116, 64, 159, 160, 157, 158, 161, 0, 0, 0, 0, 103, 181, 184, 185, 52, 0, 0, 0, 54, 172, 173, 174, 89, 51, 95, 96, 97, 98, 99, 92, 0, 94, 80, 0, 0, 0, 0, 0, 0, 0, 0, 166, 167, 137, 138, 0, 0, 0, 0, 114, 164, 0, 0, 0, 163, 0, 105, 0, 0, 169, 170, 171, 101, 90, 150, 132, 133, 131, 0, 37, 38, 39, 40, 41, 0, 36, 45, 0, 44, 124, 125, 126, 127, 128, 123, 0, 151, 143, 144, 145, 146, 147, 142, 0, 0, 0, 141, 140, 0, 165, 136, 0, 0, 168, 0, 0, 0, 196, 193, 189, 0, 0, 135, 43, 47, 130, 149, 154, 0, 0, 0, 155, 106, 0, 152, 0, 0, 102, 0, 195, 191, 188, 190, 0, 176, 177, 153, 186, 0, 156, 0, 180, 34, 194, 192, 183, 182, 0, 178, 179, 175, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yydgoto[] = #else short socks_yydgoto[] = #endif { 3, 7, 6, 216, 128, 210, 211, 129, 217, 218, 130, 220, 221, 131, 15, 87, 41, 99, 100, 132, 227, 228, 133, 134, 135, 136, 66, 4, 16, 17, 18, 42, 43, 147, 102, 103, 45, 68, 46, 69, 47, 19, 89, 90, 49, 110, 111, 50, 51, 137, 172, 173, 52, 5, 53, 54, 55, 56, 57, 113, 58, 20, 247, 248, 149, 150, 60, 138, 139, 61, 151, 152, 140, 62, 194, 141, 235, 236, 142, 195, 243, 157, 161, 260, 261, 282, 262, 263, 284, 196, 244, 290, 202, 252, 253, 254, 274, 275, 106, 107, 186, 187, 188, 189, 287, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yysindex[] = #else short socks_yysindex[] = #endif { -199, 0, 0, 0, 0, 0, -10, 269, 0, -28, -22, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, -227, 0, 0, 10, 17, 26, 28, 51, 63, 66, 75, 76, 78, 79, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, -187, -264, -146, 21, 22, 88, 90, -254, -185, -121, -179, -178, 0, 0, -175, -131, -131, -131, -174, -243, 0, 0, 0, 0, 0, 0, -146, 0, -200, -235, -277, -277, 0, 0, 0, 0, -185, 0, 0, -121, 0, 0, 0, -236, -236, 0, 0, -175, 0, 0, 0, 0, 0, 0, 98, 99, 100, 102, 104, 107, 108, 109, -233, 110, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -243, -158, 0, 0, 0, 0, 0, 0, 0, 0, 0, -200, -158, -235, -158, 0, 0, 0, 0, 0, -150, -150, -150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -236, 0, 0, -236, -142, -186, -209, -102, -206, -125, -203, 0, 0, 0, 0, 131, 135, -133, -126, 0, 0, -243, -127, 140, 0, -87, 0, -235, -289, 0, 0, 0, 0, 0, 0, 0, 0, 0, -186, 0, 0, 0, 0, 0, -209, 0, 0, -102, 0, 0, 0, 0, 0, 0, 0, -206, 0, 0, 0, 0, 0, 0, 0, -203, -277, -277, 0, 0, 91, 0, 0, 148, -277, 0, 163, -200, 103, 0, 0, 0, 178, -205, 0, 0, 0, 0, 0, 0, 177, -150, -150, 0, 0, -277, 0, -268, 105, 0, -100, 0, 0, 0, 0, -297, 0, 0, 0, 0, -150, 0, -150, 0, 0, 0, 0, 0, 0, -150, 0, 0, 0,}; #if defined(__cplusplus) || defined(__STDC__) const short socks_yyrindex[] = #else short socks_yyrindex[] = #endif { 0, 0, 0, 0, 0, 0, 225, 229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -99, 0, 0, 0, 0, 0, 0, 125, 0, -96, -95, 0, 0, 0, 0, 0, 0, 161, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -116, 0, -110, 0, 0, 0, 0, 0, 0, 233, 233, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -115, 0, 0, 0, 0, 0, 271, 0, 0, 319, 0, 0, 0, 0, 0, 0, 0, 278, 0, 0, 0, 0, 0, 0, 0, 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -122, -122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -74, 0, -74, 0, 0, 0, 0, 0, 0, -122, 0, 0, 0,}; #if defined(__cplusplus) || defined(__STDC__) const short socks_yygindex[] = #else short socks_yygindex[] = #endif { 0, 0, 0, 121, -85, 25, 0, -84, 0, 23, 0, 0, 24, 0, 234, 0, 0, 0, 143, -73, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 238, 0, 144, 0, 0, 0, 0, 0, 241, 0, 162, 0, 0, 142, 0, 0, -71, -88, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 243, 0, 0, 0, -135, 0, 0, -114, 0, 0, -128, -90, 232, -123, 0, 20, 0, 0, 0, 0, 0, 0, -217, -89, 0, -81, 38, 0, 0, 0, 0, -143, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; #define YYTABLESIZE 676 #if defined(__cplusplus) || defined(__STDC__) const short socks_yytable[] = #else short socks_yytable[] = #endif { 13, 100, 153, 187, 158, 162, 144, 145, 113, 162, 134, 100, 159, 163, 197, 104, 203, 204, 146, 174, 148, 264, 95, 199, 192, 288, 250, 198, 267, 200, 63, 117, 289, 84, 85, 86, 64, 96, 251, 117, 167, 168, 169, 170, 171, 154, 155, 65, 156, 279, 8, 187, 118, 119, 154, 155, 280, 120, 1, 2, 118, 153, 121, 122, 144, 145, 36, 37, 70, 26, 121, 123, 249, 124, 117, 71, 146, 50, 148, 123, 241, 124, 97, 98, 72, 205, 73, 50, 206, 125, 126, 127, 212, 213, 214, 215, 119, 184, 185, 127, 120, 222, 223, 224, 225, 226, 122, 108, 109, 74, 153, 208, 209, 269, 230, 231, 232, 233, 234, 277, 278, 75, 251, 272, 76, 63, 100, 14, 39, 114, 115, 160, 164, 77, 78, 63, 79, 80, 291, 81, 292, 82, 83, 88, 91, 92, 93, 293, 94, 101, 104, 105, 187, 112, 134, 116, 176, 177, 178, 134, 179, 88, 180, 144, 145, 181, 182, 183, 190, 191, 187, 88, 193, 187, 187, 146, 201, 148, 187, 281, 134, 134, 219, 187, 187, 134, 207, 283, 229, 237, 134, 134, 187, 238, 187, 187, 239, 79, 245, 134, 187, 134, 50, 240, 242, 246, 266, 79, 187, 187, 187, 187, 187, 113, 162, 134, 265, 134, 134, 134, 104, 268, 187, 271, 276, 2, 187, 286, 270, 1, 285, 113, 187, 187, 162, 104, 255, 113, 104, 162, 256, 40, 165, 187, 257, 44, 166, 258, 48, 8, 59, 143, 175, 67, 9, 10, 259, 273, 0, 0, 100, 100, 100, 100, 100, 0, 100, 100, 0, 0, 100, 0, 0, 100, 100, 100, 100, 0, 11, 38, 0, 12, 100, 0, 0, 0, 100, 100, 100, 100, 0, 100, 100, 0, 100, 100, 100, 100, 0, 0, 0, 100, 0, 0, 0, 0, 100, 100, 0, 0, 0, 0, 0, 0, 0, 100, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 100, 100, 100, 50, 50, 50, 50, 50, 0, 50, 50, 0, 0, 50, 0, 0, 50, 50, 50, 50, 0, 0, 0, 0, 0, 50, 0, 0, 0, 50, 50, 50, 50, 0, 50, 50, 0, 50, 50, 0, 50, 0, 0, 0, 50, 0, 0, 0, 0, 0, 50, 63, 63, 63, 63, 63, 63, 63, 63, 0, 0, 63, 0, 42, 63, 63, 63, 63, 0, 0, 129, 0, 0, 63, 50, 0, 0, 63, 63, 63, 63, 0, 63, 63, 0, 63, 63, 88, 88, 88, 88, 88, 0, 88, 88, 0, 0, 88, 0, 0, 88, 88, 88, 88, 0, 0, 0, 0, 0, 88, 0, 46, 0, 88, 88, 88, 88, 0, 88, 88, 0, 88, 88, 79, 79, 79, 79, 79, 0, 79, 79, 0, 0, 79, 148, 0, 79, 79, 79, 79, 0, 0, 0, 0, 0, 79, 0, 0, 0, 79, 79, 79, 79, 0, 79, 79, 0, 79, 79, 187, 187, 187, 187, 187, 0, 187, 187, 0, 0, 187, 0, 0, 187, 187, 187, 187, 0, 0, 0, 0, 0, 187, 0, 0, 0, 187, 187, 187, 187, 0, 187, 187, 0, 187, 187, 8, 21, 22, 23, 24, 0, 10, 25, 0, 0, 26, 0, 42, 27, 28, 29, 30, 42, 0, 129, 0, 0, 31, 0, 129, 0, 32, 33, 34, 11, 0, 35, 12, 0, 36, 37, 0, 0, 42, 42, 0, 0, 0, 42, 0, 129, 129, 0, 42, 42, 129, 0, 0, 0, 0, 129, 129, 42, 0, 42, 0, 0, 0, 0, 129, 46, 129, 0, 0, 0, 0, 0, 0, 42, 0, 42, 42, 42, 0, 0, 129, 0, 129, 129, 129, 0, 46, 46, 148, 0, 0, 46, 0, 0, 0, 0, 46, 46, 0, 0, 0, 0, 0, 0, 0, 46, 0, 46, 0, 148, 148, 0, 0, 0, 148, 0, 0, 0, 0, 148, 148, 46, 0, 46, 46, 46, 0, 0, 148, 0, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, 0, 148, 148, 148, }; #if defined(__cplusplus) || defined(__STDC__) const short socks_yycheck[] = #else short socks_yycheck[] = #endif { 10, 0, 92, 125, 93, 94, 91, 91, 125, 125, 125, 10, 93, 94, 149, 125, 159, 160, 91, 107, 91, 238, 276, 151, 138, 322, 315, 150, 245, 152, 58, 274, 329, 297, 298, 299, 58, 291, 327, 274, 276, 277, 278, 279, 280, 322, 323, 58, 325, 266, 259, 125, 295, 296, 322, 323, 324, 300, 257, 258, 295, 151, 305, 306, 149, 149, 293, 294, 58, 269, 305, 314, 200, 316, 274, 58, 149, 0, 149, 314, 194, 316, 267, 268, 58, 173, 58, 10, 176, 332, 333, 334, 301, 302, 303, 304, 296, 330, 331, 334, 300, 307, 308, 309, 310, 311, 306, 282, 283, 58, 200, 297, 298, 248, 317, 318, 319, 320, 321, 262, 263, 58, 327, 328, 58, 0, 125, 6, 7, 79, 80, 93, 94, 58, 58, 10, 58, 58, 281, 58, 283, 123, 329, 289, 123, 123, 58, 290, 58, 270, 329, 329, 274, 284, 269, 329, 58, 58, 58, 274, 58, 0, 58, 248, 248, 58, 58, 58, 58, 58, 292, 10, 330, 295, 296, 248, 326, 248, 300, 268, 295, 296, 284, 305, 306, 300, 328, 268, 313, 58, 305, 306, 314, 58, 316, 269, 329, 0, 58, 314, 274, 316, 125, 329, 331, 292, 58, 10, 330, 331, 332, 333, 334, 330, 330, 330, 125, 332, 333, 334, 330, 58, 296, 45, 47, 0, 300, 327, 125, 0, 125, 330, 306, 0, 330, 330, 211, 125, 125, 125, 217, 7, 99, 10, 220, 7, 102, 228, 7, 259, 7, 89, 110, 21, 264, 265, 236, 254, -1, -1, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, -1, 272, 273, 274, 275, -1, 288, 10, -1, 291, 281, -1, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 295, 296, -1, -1, -1, 300, -1, -1, -1, -1, 305, 306, -1, -1, -1, -1, -1, -1, -1, 314, -1, 316, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 330, -1, 332, 333, 334, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, -1, 272, 273, 274, 275, -1, -1, -1, -1, -1, 281, -1, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, -1, 296, -1, -1, -1, 300, -1, -1, -1, -1, -1, 306, 259, 260, 261, 262, 263, 264, 265, 266, -1, -1, 269, -1, 125, 272, 273, 274, 275, -1, -1, 125, -1, -1, 281, 330, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, -1, 272, 273, 274, 275, -1, -1, -1, -1, -1, 281, -1, 125, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, 125, -1, 272, 273, 274, 275, -1, -1, -1, -1, -1, 281, -1, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, -1, 272, 273, 274, 275, -1, -1, -1, -1, -1, 281, -1, -1, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, 259, 260, 261, 262, 263, -1, 265, 266, -1, -1, 269, -1, 269, 272, 273, 274, 275, 274, -1, 269, -1, -1, 281, -1, 274, -1, 285, 286, 287, 288, -1, 290, 291, -1, 293, 294, -1, -1, 295, 296, -1, -1, -1, 300, -1, 295, 296, -1, 305, 306, 300, -1, -1, -1, -1, 305, 306, 314, -1, 316, -1, -1, -1, -1, 314, 274, 316, -1, -1, -1, -1, -1, -1, 330, -1, 332, 333, 334, -1, -1, 330, -1, 332, 333, 334, -1, 295, 296, 274, -1, -1, 300, -1, -1, -1, -1, 305, 306, -1, -1, -1, -1, -1, -1, -1, 314, -1, 316, -1, 295, 296, -1, -1, -1, 300, -1, -1, -1, -1, 305, 306, 330, -1, 332, 333, 334, -1, -1, 314, -1, 316, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 330, -1, 332, 333, 334, }; #define YYFINAL 3 #ifndef YYDEBUG #define YYDEBUG 0 #endif #define YYMAXTOKEN 334 #if YYDEBUG #if defined(__cplusplus) || defined(__STDC__) const char * const socks_yyname[] = #else char *socks_yyname[] = #endif { "end-of-file",0,0,0,0,0,0,0,0,0,"'\\n'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'-'",0,"'/'",0,0,0,0,0,0,0,0,0,0,"':'",0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'",0,"'}'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, "SERVERCONFIG","CLIENTCONFIG","DEPRECATED","CLIENTRULE","INTERNAL","EXTERNAL", "EXTERNAL_ROTATION","DEBUGING","RESOLVEPROTOCOL","SRCHOST","NOMISMATCH", "NOUNKNOWN","EXTENSION","BIND","PRIVILEGED","IOTIMEOUT","CONNECTTIMEOUT", "METHOD","CLIENTMETHOD","NONE","GSSAPI","UNAME","RFC931","PAM","COMPATIBILITY", "REUSEADDR","SAMEPORT","USERNAME","USER_PRIVILEGED","USER_UNPRIVILEGED", "USER_LIBWRAP","LOGOUTPUT","LOGFILE","CHILD_MAXIDLE","ROUTE","VIA", "VERDICT_BLOCK","VERDICT_PASS","PAMSERVICENAME","PROTOCOL","PROTOCOL_TCP", "PROTOCOL_UDP","PROTOCOL_FAKE","PROXYPROTOCOL","PROXYPROTOCOL_SOCKS_V4", "PROXYPROTOCOL_SOCKS_V5","PROXYPROTOCOL_MSPROXY_V2","PROXYPROTOCOL_HTTP_V1_0", "USER","COMMAND","COMMAND_BIND","COMMAND_CONNECT","COMMAND_UDPASSOCIATE", "COMMAND_BINDREPLY","COMMAND_UDPREPLY","ACTION","LINE","LIBWRAPSTART", "OPERATOR","LOG","LOG_CONNECT","LOG_DATA","LOG_DISCONNECT","LOG_ERROR", "LOG_IOOPERATION","IPADDRESS","DOMAINNAME","DIRECT","IFNAME","PORT", "PORTNUMBER","SERVICENAME","NUMBER","FROM","TO","REDIRECT","BANDWIDTH", "MAXSESSIONS", }; #if defined(__cplusplus) || defined(__STDC__) const char * const socks_yyrule[] = #else char *socks_yyrule[] = #endif {"$accept : configtype", "configtype : serverinit serverline", "configtype : clientinit clientline", "serverinit : SERVERCONFIG", "serverline :", "serverline : serverline '\\n'", "serverline : serverline serverconfig", "serverline : serverline clientrule", "serverline : serverline rule", "serverline : serverline route", "clientline :", "clientline : clientline '\\n'", "clientline : clientline clientconfig", "clientline : clientline route", "clientinit : CLIENTCONFIG", "clientconfig : clientoption", "clientconfig : deprecated", "serverconfig : global_authmethod", "serverconfig : global_clientauthmethod", "serverconfig : deprecated", "serverconfig : internal", "serverconfig : external", "serverconfig : external_rotation", "serverconfig : logoutput", "serverconfig : serveroption", "serverconfig : userids", "serverconfig : childstate", "serveroption : compatibility", "serveroption : connecttimeout", "serveroption : extension", "serveroption : iotimeout", "serveroption : resolveprotocol", "serveroption : srchost", "deprecated : DEPRECATED", "route : ROUTE routeinit '{' routeoptions fromto gateway routeoptions '}'", "routeinit :", "proxyprotocol : PROXYPROTOCOL ':' proxyprotocols", "proxyprotocolname : PROXYPROTOCOL_SOCKS_V4", "proxyprotocolname : PROXYPROTOCOL_SOCKS_V5", "proxyprotocolname : PROXYPROTOCOL_MSPROXY_V2", "proxyprotocolname : PROXYPROTOCOL_HTTP_V1_0", "proxyprotocolname : deprecated", "proxyprotocols : proxyprotocolname", "proxyprotocols : proxyprotocolname proxyprotocols", "user : USER ':' usernames", "username : USERNAME", "usernames : username", "usernames : username usernames", "extension : EXTENSION ':' extensions", "extensionname : BIND", "extensions : extensionname", "extensions : extensionname extensions", "internal : INTERNAL internalinit ':' internaladdress", "internalinit :", "external : EXTERNAL externalinit ':' externaladdress", "externalinit :", "external_rotation : EXTERNAL_ROTATION ':' NONE", "external_rotation : EXTERNAL_ROTATION ':' ROUTE", "clientoption : logoutput", "clientoption : debuging", "clientoption : resolveprotocol", "logoutput : LOGOUTPUT ':' logoutputdevices", "logoutputdevice : LOGFILE", "logoutputdevices : logoutputdevice", "logoutputdevices : logoutputdevice logoutputdevices", "childstate : CHILD_MAXIDLE ':' NUMBER", "userids : user_privileged", "userids : user_unprivileged", "userids : user_libwrap", "user_privileged : USER_PRIVILEGED ':' userid", "user_unprivileged : USER_UNPRIVILEGED ':' userid", "user_libwrap : USER_LIBWRAP ':' userid", "userid : USERNAME", "iotimeout : IOTIMEOUT ':' NUMBER", "connecttimeout : CONNECTTIMEOUT ':' NUMBER", "debuging : DEBUGING ':' NUMBER", "compatibility : COMPATIBILITY ':' compatibilitys", "compatibilityname : REUSEADDR", "compatibilityname : SAMEPORT", "compatibilitys : compatibilityname", "compatibilitys : compatibilityname compatibilitys", "resolveprotocol : RESOLVEPROTOCOL ':' resolveprotocolname", "resolveprotocolname : PROTOCOL_FAKE", "resolveprotocolname : PROTOCOL_TCP", "resolveprotocolname : PROTOCOL_UDP", "srchost : SRCHOST ':' srchostoptions", "srchostoption : NOMISMATCH", "srchostoption : NOUNKNOWN", "srchostoptions : srchostoption", "srchostoptions : srchostoption srchostoptions", "authmethod : METHOD ':' authmethods", "$$1 :", "global_authmethod : METHOD ':' $$1 authmethods", "$$2 :", "global_clientauthmethod : CLIENTMETHOD ':' $$2 authmethods", "authmethodname : NONE", "authmethodname : GSSAPI", "authmethodname : UNAME", "authmethodname : RFC931", "authmethodname : PAM", "authmethods : authmethodname", "authmethods : authmethodname authmethods", "clientrule : CLIENTRULE verdict '{' clientruleoptions fromto clientruleoptions '}'", "clientruleoption : option", "clientruleoptions :", "clientruleoptions : clientruleoption clientruleoptions", "rule : verdict '{' ruleoptions fromto ruleoptions '}'", "ruleoption : option", "ruleoption : bandwidth", "ruleoption : command", "ruleoption : protocol", "ruleoption : proxyprotocol", "ruleoption : redirect", "ruleoptions :", "ruleoptions : ruleoption ruleoptions", "option : authmethod", "option : libwrap", "option : log", "option : pamservicename", "option : user", "option : session", "verdict : VERDICT_BLOCK", "verdict : VERDICT_PASS", "command : COMMAND ':' commands", "commandname : COMMAND_BIND", "commandname : COMMAND_CONNECT", "commandname : COMMAND_UDPASSOCIATE", "commandname : COMMAND_BINDREPLY", "commandname : COMMAND_UDPREPLY", "commands : commandname", "commands : commandname commands", "protocol : PROTOCOL ':' protocols", "protocolname : PROTOCOL_TCP", "protocolname : PROTOCOL_UDP", "protocols : protocolname", "protocols : protocolname protocols", "fromto : srcaddress dstaddress", "redirect : REDIRECT rdr_fromaddress", "redirect : REDIRECT rdr_toaddress", "session : maxsessions", "maxsessions : MAXSESSIONS ':' NUMBER", "bandwidth : BANDWIDTH ':' NUMBER", "log : LOG ':' logs", "logname : LOG_CONNECT", "logname : LOG_DATA", "logname : LOG_DISCONNECT", "logname : LOG_ERROR", "logname : LOG_IOOPERATION", "logs : logname", "logs : logname logs", "pamservicename : PAMSERVICENAME ':' SERVICENAME", "libwrap : LIBWRAPSTART ':' LINE", "srcaddress : from ':' address", "dstaddress : to ':' address", "rdr_fromaddress : rdr_from ':' address", "rdr_toaddress : rdr_to ':' address", "gateway : via ':' gwaddress", "routeoption : command", "routeoption : extension", "routeoption : protocol", "routeoption : proxyprotocol", "routeoption : authmethod", "routeoptions :", "routeoptions : routeoption routeoptions", "from : FROM", "to : TO", "rdr_from : FROM", "rdr_to : TO", "via : VIA", "internaladdress : ipaddress port", "internaladdress : domain port", "internaladdress : ifname port", "externaladdress : ipaddress", "externaladdress : domain", "externaladdress : ifname", "address : ipaddress '/' netmask port", "address : domain port", "address : ifname port", "gwaddress : ipaddress port", "gwaddress : domain port", "gwaddress : direct", "ipaddress : IPADDRESS", "netmask : NUMBER", "netmask : IPADDRESS", "domain : DOMAINNAME", "ifname : IFNAME", "direct : DIRECT", "port :", "port : PORT portoperator portnumber", "port : PORT portrange", "portnumber : portservice", "portnumber : portstart", "portrange : portstart '-' portend", "portstart : PORTNUMBER", "portend : PORTNUMBER", "portservice : SERVICENAME", "portoperator : OPERATOR", }; #endif #ifdef YYSTACKSIZE #undef YYMAXDEPTH #define YYMAXDEPTH YYSTACKSIZE #else #ifdef YYMAXDEPTH #define YYSTACKSIZE YYMAXDEPTH #else #define YYSTACKSIZE 10000 #define YYMAXDEPTH 10000 #endif #endif #define YYINITSTACKSIZE 200 int yydebug; int yynerrs; int yyerrflag; int yychar; short *yyssp; YYSTYPE *yyvsp; YYSTYPE yyval; YYSTYPE yylval; short *yyss; short *yysslim; YYSTYPE *yyvs; int yystacksize; #line 1182 "../lib/config_parse.y" #define INTERACTIVE 0 extern FILE *yyin; int socks_parseinit; int readconfig(filename) const char *filename; { const char *function = "readconfig()"; /* yydebug = 1; */ yylineno = 1; socks_parseinit = 0; if ((yyin = fopen(filename, "r")) == NULL) { swarn("%s: %s", function, filename); return -1; } errno = 0; /* don't report old errors in yyparse(). */ yyparse(); fclose(yyin); #if SOCKS_SERVER fixconfig(); #endif /* SOCKS_SERVER */ errno = 0; return 0; } void #ifdef STDC_HEADERS yyerror(const char *fmt, ...) #else yyerror(fmt, va_alist) const char *fmt; va_dcl #endif /* STDC_HEADERS */ { va_list ap; char buf[2048]; size_t bufused; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, fmt); #else va_start(ap); #endif /* STDC_HEADERS */ bufused = snprintfn(buf, sizeof(buf), "%s: error on line %d, near '%.10s': ", sockscf.option.configfile, yylineno, (yytext == NULL || *yytext == NUL) ? "'start of line'" : yytext); vsnprintf(&buf[bufused], sizeof(buf) - bufused, fmt, ap); /* LINTED expression has null effect */ va_end(ap); if (errno) serr(EXIT_FAILURE, buf); serrx(EXIT_FAILURE, buf); } void #ifdef STDC_HEADERS yywarn(const char *fmt, ...) #else yywarn(fmt, va_alist) const char *fmt; va_dcl #endif /* STDC_HEADERS */ { va_list ap; char buf[2048]; size_t bufused; #ifdef STDC_HEADERS /* LINTED pointer casts may be troublesome */ va_start(ap, fmt); #else va_start(ap); #endif /* STDC_HEADERS */ bufused = snprintfn(buf, sizeof(buf), "%s: warning on line %d, near '%.10s': ", sockscf.option.configfile, yylineno, (yytext == NULL || *yytext == NUL) ? "'start of line'" : yytext); vsnprintf(&buf[bufused], sizeof(buf) - bufused, fmt, ap); /* LINTED expression has null effect */ va_end(ap); if (errno) swarn(buf); swarnx(buf); } static void addressinit(address) struct ruleaddress_t *address; { ruleaddress = address; atype = &ruleaddress->atype; ipaddr = &ruleaddress->addr.ipv4.ip; netmask = &ruleaddress->addr.ipv4.mask; domain = ruleaddress->addr.domain; ifname = ruleaddress->addr.ifname; port_tcp = &ruleaddress->port.tcp; port_udp = &ruleaddress->port.udp; operator = &ruleaddress->operator; } #if SOCKS_SERVER static void ruleinit(rule) struct rule_t *rule; { rule->linenumber = yylineno; command = &rule->state.command; methodv = rule->state.methodv; methodc = &rule->state.methodc; protocol = &rule->state.protocol; proxyprotocol = &rule->state.proxyprotocol; bzero(&src, sizeof(src)); bzero(&dst, sizeof(dst)); *rule = ruleinitmem; src.atype = SOCKS_ADDR_IPV4; src.addr.ipv4.ip.s_addr = htonl(INADDR_ANY); src.port.tcp = src.port.udp = src.portend = htons(0); dst = rdr_from = rdr_to = src; } static void fixconfig(void) { const char *function = "fixsettings()"; int i; uid_t euid; /* * Check arguments and settings, do they make sense? */ if (sockscf.clientmethodc == 0) sockscf.clientmethodv[sockscf.clientmethodc++] = AUTHMETHOD_NONE; #if !HAVE_DUMPCONF if (!sockscf.uid.privileged_isset) sockscf.uid.privileged = sockscf.state.euid; else { socks_seteuid(&euid, sockscf.uid.privileged); socks_reseteuid(sockscf.uid.privileged, euid); } if (!sockscf.uid.unprivileged_isset) sockscf.uid.unprivileged = sockscf.state.euid; else { socks_seteuid(&euid, sockscf.uid.unprivileged); socks_reseteuid(sockscf.uid.unprivileged, euid); } #if HAVE_LIBWRAP if (!sockscf.uid.libwrap_isset) sockscf.uid.libwrap = sockscf.state.euid; else { socks_seteuid(&euid, sockscf.uid.libwrap); socks_reseteuid(sockscf.uid.libwrap, euid); } #endif /* HAVE_LIBWRAP */ #endif /* !HAVE_DUMPCONF */ if (sockscf.internalc == 0) serrx(EXIT_FAILURE, "%s: no internal address given", function); /* values will be used once and checked there. */ if (sockscf.external.addrc == 0) serrx(EXIT_FAILURE, "%s: no external address given", function); #if !HAVE_DUMPCONF for (i = 0; i < sockscf.external.addrc; ++i) if (!addressisbindable(&sockscf.external.addrv[i])) serrx(EXIT_FAILURE, NULL); #endif /* !HAVE_DUMPCONF */ #if !HAVE_DUMPCONF if (sockscf.methodc == 0) swarnx("%s: no methods enabled (total block)", function); if (sockscf.uid.unprivileged == 0) swarnx("%s: setting the unprivileged uid to %d is not recommended", function, sockscf.uid.unprivileged); #if HAVE_LIBWRAP if (sockscf.uid.libwrap == 0) swarnx("%s: setting the libwrap uid to %d is not recommended", function, sockscf.uid.libwrap); #endif /* HAVE_LIBWRAP */ #endif /* !HAVE_DUMPCONF */ } #endif /* SOCKS_SERVER */ #line 1032 "config_parse.c" /* allocate initial stack or double stack size, up to YYMAXDEPTH */ #if defined(__cplusplus) || defined(__STDC__) static int yygrowstack(void) #else static int yygrowstack() #endif { int newsize, i; short *newss; YYSTYPE *newvs; if ((newsize = yystacksize) == 0) newsize = YYINITSTACKSIZE; else if (newsize >= YYMAXDEPTH) return -1; else if ((newsize *= 2) > YYMAXDEPTH) newsize = YYMAXDEPTH; i = yyssp - yyss; newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) : (short *)malloc(newsize * sizeof *newss); if (newss == NULL) goto bail; yyss = newss; yyssp = newss + i; newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) : (YYSTYPE *)malloc(newsize * sizeof *newvs); if (newvs == NULL) goto bail; yyvs = newvs; yyvsp = newvs + i; yystacksize = newsize; yysslim = yyss + newsize - 1; return 0; bail: if (yyss) free(yyss); if (yyvs) free(yyvs); yyss = yyssp = NULL; yyvs = yyvsp = NULL; yystacksize = 0; return -1; } #define YYABORT goto yyabort #define YYREJECT goto yyabort #define YYACCEPT goto yyaccept #define YYERROR goto yyerrlab int #if defined(__cplusplus) || defined(__STDC__) yyparse(void) #else yyparse() #endif { int yym, yyn, yystate; #if YYDEBUG #if defined(__cplusplus) || defined(__STDC__) const char *yys; #else /* !(defined(__cplusplus) || defined(__STDC__)) */ char *yys; #endif /* !(defined(__cplusplus) || defined(__STDC__)) */ if ((yys = getenv("YYDEBUG"))) { yyn = *yys; if (yyn >= '0' && yyn <= '9') yydebug = yyn - '0'; } #endif /* YYDEBUG */ yynerrs = 0; yyerrflag = 0; yychar = (-1); if (yyss == NULL && yygrowstack()) goto yyoverflow; yyssp = yyss; yyvsp = yyvs; *yyssp = yystate = 0; yyloop: if ((yyn = yydefred[yystate]) != 0) goto yyreduce; if (yychar < 0) { if ((yychar = yylex()) < 0) yychar = 0; #if YYDEBUG if (yydebug) { yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, yystate, yychar, yys); } #endif } if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yychar) { #if YYDEBUG if (yydebug) printf("%sdebug: state %d, shifting to state %d\n", YYPREFIX, yystate, yytable[yyn]); #endif if (yyssp >= yysslim && yygrowstack()) { goto yyoverflow; } *++yyssp = yystate = yytable[yyn]; *++yyvsp = yylval; yychar = (-1); if (yyerrflag > 0) --yyerrflag; goto yyloop; } if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yychar) { yyn = yytable[yyn]; goto yyreduce; } if (yyerrflag) goto yyinrecovery; #if defined(lint) || defined(__GNUC__) goto yynewerror; #endif yynewerror: yyerror("syntax error"); #if defined(lint) || defined(__GNUC__) goto yyerrlab; #endif yyerrlab: ++yynerrs; yyinrecovery: if (yyerrflag < 3) { yyerrflag = 3; for (;;) { if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) { #if YYDEBUG if (yydebug) printf("%sdebug: state %d, error recovery shifting\ to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); #endif if (yyssp >= yysslim && yygrowstack()) { goto yyoverflow; } *++yyssp = yystate = yytable[yyn]; *++yyvsp = yylval; goto yyloop; } else { #if YYDEBUG if (yydebug) printf("%sdebug: error recovery discarding state %d\n", YYPREFIX, *yyssp); #endif if (yyssp <= yyss) goto yyabort; --yyssp; --yyvsp; } } } else { if (yychar == 0) goto yyabort; #if YYDEBUG if (yydebug) { yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; printf("%sdebug: state %d, error recovery discards token %d (%s)\n", YYPREFIX, yystate, yychar, yys); } #endif yychar = (-1); goto yyloop; } yyreduce: #if YYDEBUG if (yydebug) printf("%sdebug: state %d, reducing by rule %d (%s)\n", YYPREFIX, yystate, yyn, yyrule[yyn]); #endif yym = yylen[yyn]; yyval = yyvsp[1-yym]; switch (yyn) { case 3: #line 275 "../lib/config_parse.y" { #if SOCKS_SERVER protocol = &protocolmem; extension = &sockscf.extension; #endif } break; case 4: #line 284 "../lib/config_parse.y" { yyval.string = NULL; } break; case 10: #line 292 "../lib/config_parse.y" { yyval.string = NULL; } break; case 14: #line 299 "../lib/config_parse.y" { } break; case 33: #line 328 "../lib/config_parse.y" { yywarn("given keyword is deprecated"); } break; case 34: #line 332 "../lib/config_parse.y" { route.src = src; route.dst = dst; ruleaddress2sockshost(&gw, &route.gw.host, SOCKS_TCP); route.gw.state = state; addroute(&route); } break; case 35: #line 342 "../lib/config_parse.y" { command = &state.command; extension = &state.extension; methodv = state.methodv; methodc = &state.methodc; protocol = &state.protocol; proxyprotocol = &state.proxyprotocol; bzero(&state, sizeof(state)); bzero(&route, sizeof(route)); bzero(&gw, sizeof(gw)); bzero(&src, sizeof(src)); bzero(&dst, sizeof(dst)); src.atype = SOCKS_ADDR_IPV4; dst.atype = SOCKS_ADDR_IPV4; } break; case 37: #line 364 "../lib/config_parse.y" { proxyprotocol->socks_v4 = 1; } break; case 38: #line 367 "../lib/config_parse.y" { proxyprotocol->socks_v5 = 1; } break; case 39: #line 370 "../lib/config_parse.y" { proxyprotocol->msproxy_v2 = 1; } break; case 40: #line 373 "../lib/config_parse.y" { proxyprotocol->http_v1_0 = 1; } break; case 45: #line 386 "../lib/config_parse.y" { #if SOCKS_SERVER #if !HAVE_LIBWRAP if (strcmp(yyvsp[0].string, method2string(AUTHMETHOD_RFC931)) == 0) yyerror("method %s requires libwrap", AUTHMETHOD_RFC931s); #endif /* !HAVE_LIBWRAP */ if (adduser(&rule.user, yyvsp[0].string) == NULL) yyerror(NOMEM); #endif /* SOCKS_SERVER */ } break; case 49: #line 405 "../lib/config_parse.y" { extension->bind = 1; } break; case 52: #line 415 "../lib/config_parse.y" { #if SOCKS_SERVER addinternal(ruleaddress); #endif } break; case 53: #line 422 "../lib/config_parse.y" { #if SOCKS_SERVER static struct ruleaddress_t mem; struct servent *service; addressinit(&mem); /* set default port. */ if ((service = getservbyname("socks", "tcp")) == NULL) *port_tcp = htons(SOCKD_PORT); else *port_tcp = (in_port_t)service->s_port; #endif } break; case 54: #line 438 "../lib/config_parse.y" { #if SOCKS_SERVER addexternal(ruleaddress); #endif } break; case 55: #line 445 "../lib/config_parse.y" { #if SOCKS_SERVER static struct ruleaddress_t mem; addressinit(&mem); #endif } break; case 56: #line 454 "../lib/config_parse.y" { #if SOCKS_SERVER sockscf.external.rotation = ROTATION_NONE; } break; case 57: #line 458 "../lib/config_parse.y" { #if !HAVE_ROUTE_SOURCE yyerror("don't have code to discover route/address source on platform"); #else /* !HAVE_ROUTE_SOURCE */ sockscf.external.rotation = ROTATION_ROUTE; #endif /* HAVE_ROUTE_SOURCE */ #endif /* SOCKS_SERVER */ } break; case 62: #line 476 "../lib/config_parse.y" { const char *syslogname = "syslog"; if (strncmp(yyvsp[0].string, syslogname, strlen(syslogname)) == 0 && (yyvsp[0].string[strlen(syslogname)] == NUL || yyvsp[0].string[strlen(syslogname)] == '/')) { char *sl; sockscf.log.type |= LOGTYPE_SYSLOG; if (*(sl = &(yyvsp[0].string[strlen(syslogname)])) == '/') { /* facility. */ size_t i; for (i = 0, ++sl; i < ELEMENTS(syslogfacilityv); ++i) if (strcmp(sl, syslogfacilityv[i].name) == 0) break; if (i == ELEMENTS(syslogfacilityv)) yyerror("unknown syslog facility \"%s\"", sl); sockscf.log.facility = syslogfacilityv[i].value; sockscf.log.facilityname = syslogfacilityv[i].name; } else { sockscf.log.facility = LOG_DAEMON; /* default. */ sockscf.log.facilityname = "daemon"; } } else /* adding/changing filename. */ if (!sockscf.state.init) { int flag; sockscf.log.type |= LOGTYPE_FILE; if ((sockscf.log.fpv = (FILE **)realloc(sockscf.log.fpv, sizeof(*sockscf.log.fpv) * (sockscf.log.fpc + 1))) == NULL || (sockscf.log.fplockv = (int *)realloc(sockscf.log.fplockv, sizeof(*sockscf.log.fplockv) * (sockscf.log.fpc + 1))) == NULL || (sockscf.log.fnamev = (char **)realloc(sockscf.log.fnamev, sizeof(*sockscf.log.fnamev) * (sockscf.log.fpc + 1))) == NULL) serrx(EXIT_FAILURE, NOMEM); if ((sockscf.log.fplockv[sockscf.log.fpc] = socks_mklock(SOCKS_LOCKFILE)) == -1) serr(EXIT_FAILURE, "socks_mklock()"); if (strcmp(yyvsp[0].string, "stdout") == 0) sockscf.log.fpv[sockscf.log.fpc] = stdout; else if (strcmp(yyvsp[0].string, "stderr") == 0) sockscf.log.fpv[sockscf.log.fpc] = stderr; else if ((sockscf.log.fpv[sockscf.log.fpc] = fopen(yyvsp[0].string, "a")) == NULL) yyerror("fopen(%s)", yyvsp[0].string); if ((flag = fcntl(fileno(sockscf.log.fpv[sockscf.log.fpc]), F_GETFD, 0)) == -1 || fcntl(fileno(sockscf.log.fpv[sockscf.log.fpc]), F_SETFD, flag | FD_CLOEXEC) == -1) serr(EXIT_FAILURE, "fcntl(F_GETFD/F_SETFD)"); if ((sockscf.log.fnamev[sockscf.log.fpc] = strdup(yyvsp[0].string)) == NULL) serr(EXIT_FAILURE, NOMEM); ++sockscf.log.fpc; } else { /* * Can't change filenames we log to after startup (well, * to be exact, we can't add new filenames, but we complain * about changing too for now since it's easier. */ size_t i; for (i = 0; i < sockscf.log.fpc; ++i) if (strcmp(sockscf.log.fnamev[i], yyvsp[0].string) == 0) { /* same name. */ FILE *fp; if (strcmp(sockscf.log.fnamev[i], "stdout") == 0 || strcmp(sockscf.log.fnamev[i], "stderr") == 0) continue; /* don't need to close these, hard to reopen. */ /* reopen logfiles. */ if ((fp = fopen(sockscf.log.fnamev[i], "a")) == NULL) yyerror("fopen(%s)", yyvsp[0].string); fclose(sockscf.log.fpv[i]); sockscf.log.fpv[i] = fp; break; } if (i == sockscf.log.fpc) /* no match found. */ yywarn("can't change logoutput after startup"); } } break; case 65: #line 578 "../lib/config_parse.y" { #if SOCKS_SERVER yyerror("Sorry, child.maxidle is disabled due to a suspected bug"); if (atoi(yyvsp[0].string) != 0 && atoi(yyvsp[0].string) < SOCKD_FREESLOTS) yyerror("%s (%s) can't be less than SOCKD_FREESLOTS (%d)", yyvsp[-2].string, yyvsp[0].string, SOCKD_FREESLOTS); sockscf.child.maxidle = atoi(yyvsp[0].string); #endif } break; case 69: #line 595 "../lib/config_parse.y" { #if SOCKS_SERVER sockscf.uid.privileged = yyvsp[0].uid; sockscf.uid.privileged_isset = 1; #endif } break; case 70: #line 603 "../lib/config_parse.y" { #if SOCKS_SERVER sockscf.uid.unprivileged = yyvsp[0].uid; sockscf.uid.unprivileged_isset = 1; #endif } break; case 71: #line 611 "../lib/config_parse.y" { #if HAVE_LIBWRAP && SOCKS_SERVER sockscf.uid.libwrap = yyvsp[0].uid; sockscf.uid.libwrap_isset = 1; #else /* HAVE_LIBWRAP */ yyerror("libwrapsupport not compiled in"); #endif /* !HAVE_LIBWRAP */ } break; case 72: #line 622 "../lib/config_parse.y" { struct passwd *pw; if ((pw = getpwnam(yyvsp[0].string)) == NULL) serrx(EXIT_FAILURE, "no such user \"%s\"", yyvsp[0].string); else yyval.uid = pw->pw_uid; } break; case 73: #line 632 "../lib/config_parse.y" { #if SOCKS_SERVER sockscf.timeout.io = (time_t)atol(yyvsp[0].string); #endif } break; case 74: #line 639 "../lib/config_parse.y" { #if SOCKS_SERVER sockscf.timeout.negotiate = (time_t)atol(yyvsp[0].string); #endif } break; case 75: #line 646 "../lib/config_parse.y" { sockscf.option.debug = atoi(yyvsp[0].string); } break; case 77: #line 654 "../lib/config_parse.y" { #if SOCKS_SERVER sockscf.compat.reuseaddr = 1; } break; case 78: #line 658 "../lib/config_parse.y" { sockscf.compat.sameport = 1; #endif } break; case 82: #line 671 "../lib/config_parse.y" { sockscf.resolveprotocol = RESOLVEPROTOCOL_FAKE; } break; case 83: #line 674 "../lib/config_parse.y" { #if HAVE_NO_RESOLVESTUFF yyerror("resolveprotocol keyword not supported on this installation"); #else /* HAVE_NO_RESOLVESTUFF */ sockscf.resolveprotocol = RESOLVEPROTOCOL_TCP; #endif /* !HAVE_NO_RESOLVESTUFF */ } break; case 84: #line 681 "../lib/config_parse.y" { sockscf.resolveprotocol = RESOLVEPROTOCOL_UDP; } break; case 86: #line 689 "../lib/config_parse.y" { #if HAVE_LIBWRAP && SOCKS_SERVER sockscf.srchost.nomismatch = 1; } break; case 87: #line 693 "../lib/config_parse.y" { sockscf.srchost.nounknown = 1; #else yyerror("srchostoption requires libwrap"); #endif } break; case 91: #line 709 "../lib/config_parse.y" { #if SOCKS_SERVER methodv = sockscf.methodv; methodc = &sockscf.methodc; *methodc = 0; /* reset. */ #endif } break; case 93: #line 718 "../lib/config_parse.y" { #if SOCKS_SERVER methodv = sockscf.clientmethodv; methodc = &sockscf.clientmethodc; *methodc = 0; /* reset. */ #endif } break; case 95: #line 727 "../lib/config_parse.y" { ADDMETHOD(AUTHMETHOD_NONE); } break; case 96: #line 730 "../lib/config_parse.y" { yyerror("%s not supported", AUTHMETHOD_GSSAPIs); } break; case 97: #line 733 "../lib/config_parse.y" { ADDMETHOD(AUTHMETHOD_UNAME); } break; case 98: #line 736 "../lib/config_parse.y" { #if HAVE_LIBWRAP && SOCKS_SERVER ADDMETHOD(AUTHMETHOD_RFC931); #else /* !HAVE_LIBWRAP */ yyerror("method %s requires libwraplibrary", AUTHMETHOD_RFC931s); #endif /* !HAVE_LIBWRAP */ } break; case 99: #line 743 "../lib/config_parse.y" { #if !HAVE_PAM yyerror("method %s requires pamlibrary", AUTHMETHOD_PAMs); #else /* HAVE_PAM */ ADDMETHOD(AUTHMETHOD_PAM); #endif /* !HAVE_PAM */ } break; case 102: #line 759 "../lib/config_parse.y" { #if SOCKS_SERVER rule.src = src; rule.dst = dst; rule.rdr_from = rdr_from; rule.rdr_to = rdr_to; addclientrule(&rule); #endif } break; case 104: #line 775 "../lib/config_parse.y" { yyval.string = NULL; } break; case 106: #line 779 "../lib/config_parse.y" { #if SOCKS_SERVER rule.src = src; rule.dst = dst; rule.rdr_from = rdr_from; rule.rdr_to = rdr_to; addsocksrule(&rule); #endif } break; case 108: #line 793 "../lib/config_parse.y" { #if SOCKS_SERVER checkmodule("bandwidth"); #endif } break; case 112: #line 801 "../lib/config_parse.y" { #if SOCKS_SERVER checkmodule("redirect"); #endif } break; case 113: #line 808 "../lib/config_parse.y" { yyval.string = NULL; } break; case 120: #line 817 "../lib/config_parse.y" { #if SOCKS_SERVER checkmodule("session"); #endif } break; case 121: #line 824 "../lib/config_parse.y" { #if SOCKS_SERVER ruleinit(&rule); rule.verdict = VERDICT_BLOCK; } break; case 122: #line 829 "../lib/config_parse.y" { ruleinit(&rule); rule.verdict = VERDICT_PASS; #endif } break; case 124: #line 840 "../lib/config_parse.y" { command->bind = 1; } break; case 125: #line 843 "../lib/config_parse.y" { command->connect = 1; } break; case 126: #line 846 "../lib/config_parse.y" { command->udpassociate = 1; } break; case 127: #line 852 "../lib/config_parse.y" { command->bindreply = 1; } break; case 128: #line 856 "../lib/config_parse.y" { command->udpreply = 1; } break; case 132: #line 868 "../lib/config_parse.y" { protocol->tcp = 1; } break; case 133: #line 871 "../lib/config_parse.y" { protocol->udp = 1; } break; case 140: #line 891 "../lib/config_parse.y" { #if SOCKS_SERVER static session_t ssinit; /* * temporarily allocate ordinary memory, later on point it to * the correct shared mem. */ if ((rule.ss = malloc(sizeof(*rule.ss))) == NULL) serr(EXIT_FAILURE, NOMEM); *rule.ss = ssinit; if ((rule.ss->maxsessions = atoi(yyvsp[0].string)) < 0) yyerror("session value can not be less than 0"); #endif /* SOCKS_SERVER */ } break; case 141: #line 908 "../lib/config_parse.y" { #if SOCKS_SERVER static bw_t bwmeminit; /* * temporarily allocate ordinary memory, later on point it to * the correct index in sockscf.bwv. */ if ((rule.bw = (bw_t *)malloc(sizeof(*rule.bw))) == NULL) serr(EXIT_FAILURE, NOMEM); *rule.bw = bwmeminit; if ((rule.bw->maxbps = atoi(yyvsp[0].string)) <= 0) yyerror("bandwidth value must be greater than 0"); #endif /* SOCKS_SERVER */ } break; case 143: #line 929 "../lib/config_parse.y" { #if SOCKS_SERVER rule.log.connect = 1; } break; case 144: #line 933 "../lib/config_parse.y" { rule.log.data = 1; } break; case 145: #line 936 "../lib/config_parse.y" { rule.log.disconnect = 1; } break; case 146: #line 939 "../lib/config_parse.y" { rule.log.error = 1; } break; case 147: #line 942 "../lib/config_parse.y" { rule.log.iooperation = 1; #endif } break; case 150: #line 953 "../lib/config_parse.y" { #if HAVE_PAM && SOCKS_SERVER if (strlen(yyvsp[0].string) >= sizeof(rule.pamservicename)) yyerror("servicename too long"); strcpy(rule.pamservicename, yyvsp[0].string); #else /* !HAVE_PAM */ yyerror("pamsupport not compiled in"); #endif /* HAVE_PAM */ } break; case 151: #line 964 "../lib/config_parse.y" { #if HAVE_LIBWRAP && SOCKS_SERVER struct request_info request; char libwrap[LIBWRAPBUF]; if (strlen(yyvsp[0].string) >= sizeof(rule.libwrap)) yyerror("libwrapline too long, make LIBWRAPBUF bigger"); strcpy(rule.libwrap, yyvsp[0].string); /* libwrap modifies the passed buffer. */ SASSERTX(strlen(rule.libwrap) < sizeof(libwrap)); strcpy(libwrap, rule.libwrap); ++dry_run; request_init(&request, RQ_FILE, -1, RQ_DAEMON, __progname, 0); if (setjmp(tcpd_buf) != 0) yyerror("bad libwrap line"); process_options(libwrap, &request); --dry_run; #else /* !HAVE_LIBWRAP */ yyerror("libwrapsupport not compiled in"); #endif } break; case 162: #line 1014 "../lib/config_parse.y" { yyval.string = NULL; } break; case 164: #line 1018 "../lib/config_parse.y" { addressinit(&src); } break; case 165: #line 1023 "../lib/config_parse.y" { addressinit(&dst); } break; case 166: #line 1028 "../lib/config_parse.y" { addressinit(&rdr_from); } break; case 167: #line 1033 "../lib/config_parse.y" { addressinit(&rdr_to); } break; case 168: #line 1040 "../lib/config_parse.y" { addressinit(&gw); } break; case 181: #line 1068 "../lib/config_parse.y" { *atype = SOCKS_ADDR_IPV4; if (inet_aton(yyvsp[0].string, ipaddr) != 1) yyerror("bad address: %s", yyvsp[0].string); } break; case 182: #line 1077 "../lib/config_parse.y" { if (atoi(yyvsp[0].string) < 0 || atoi(yyvsp[0].string) > 32) yyerror("bad netmask: %s", yyvsp[0].string); netmask->s_addr = atoi(yyvsp[0].string) == 0 ? 0 : htonl(0xffffffff << (32 - atoi(yyvsp[0].string))); } break; case 183: #line 1084 "../lib/config_parse.y" { if (!inet_aton(yyvsp[0].string, netmask)) yyerror("bad netmask: %s", yyvsp[0].string); } break; case 184: #line 1090 "../lib/config_parse.y" { *atype = SOCKS_ADDR_DOMAIN; if (strlen(yyvsp[0].string) >= MAXHOSTNAMELEN) yyerror("domainname too long"); strcpy(domain, yyvsp[0].string); } break; case 185: #line 1099 "../lib/config_parse.y" { *atype = SOCKS_ADDR_IFNAME; if (strlen(yyvsp[0].string) >= MAXIFNAMELEN) yyerror("interfacename too long"); strcpy(ifname, yyvsp[0].string); } break; case 186: #line 1109 "../lib/config_parse.y" { *atype = SOCKS_ADDR_DOMAIN; if (strlen(yyvsp[0].string) >= MAXHOSTNAMELEN) yyerror("domainname too long"); strcpy(domain, yyvsp[0].string); route.state.direct = 1; } break; case 187: #line 1120 "../lib/config_parse.y" { yyval.string = NULL; } break; case 193: #line 1133 "../lib/config_parse.y" { *port_tcp = htons((in_port_t)atoi(yyvsp[0].string)); *port_udp = htons((in_port_t)atoi(yyvsp[0].string)); } break; case 194: #line 1139 "../lib/config_parse.y" { ruleaddress->portend = htons((in_port_t)atoi(yyvsp[0].string)); ruleaddress->operator = range; } break; case 195: #line 1145 "../lib/config_parse.y" { struct servent *service; if ((service = getservbyname(yyvsp[0].string, "tcp")) == NULL) { if (protocol->tcp) yyerror("unknown tcp protocol: %s", yyvsp[0].string); *port_tcp = htons(0); } else *port_tcp = (in_port_t)service->s_port; if ((service = getservbyname(yyvsp[0].string, "udp")) == NULL) { if (protocol->udp) yyerror("unknown udp protocol: %s", yyvsp[0].string); *port_udp = htons(0); } else *port_udp = (in_port_t)service->s_port; if (*port_tcp == htons(0) && *port_udp == htons(0)) yyerror("unknown tcp/udp protocol"); /* if one protocol is unset, set to same as the other. */ if (*port_tcp == htons(0)) *port_tcp = *port_udp; else if (*port_udp == htons(0)) *port_udp = *port_tcp; } break; case 196: #line 1176 "../lib/config_parse.y" { *operator = string2operator(yyvsp[0].string); } break; #line 2040 "config_parse.c" } yyssp -= yym; yystate = *yyssp; yyvsp -= yym; yym = yylhs[yyn]; if (yystate == 0 && yym == 0) { #if YYDEBUG if (yydebug) printf("%sdebug: after reduction, shifting from state 0 to\ state %d\n", YYPREFIX, YYFINAL); #endif yystate = YYFINAL; *++yyssp = YYFINAL; *++yyvsp = yyval; if (yychar < 0) { if ((yychar = yylex()) < 0) yychar = 0; #if YYDEBUG if (yydebug) { yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, YYFINAL, yychar, yys); } #endif } if (yychar == 0) goto yyaccept; goto yyloop; } if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yystate) yystate = yytable[yyn]; else yystate = yydgoto[yym]; #if YYDEBUG if (yydebug) printf("%sdebug: after reduction, shifting from state %d \ to state %d\n", YYPREFIX, *yyssp, yystate); #endif if (yyssp >= yysslim && yygrowstack()) { goto yyoverflow; } *++yyssp = yystate; *++yyvsp = yyval; goto yyloop; yyoverflow: yyerror("yacc stack overflow"); yyabort: if (yyss) free(yyss); if (yyvs) free(yyvs); yyss = yyssp = NULL; yyvs = yyvsp = NULL; yystacksize = 0; return (1); yyaccept: if (yyss) free(yyss); if (yyvs) free(yyvs); yyss = yyssp = NULL; yyvs = yyvsp = NULL; yystacksize = 0; return (0); } dante-1.1.19.dfsg/sockd/config_parse.h0000644000175000017500000000366410333443455016226 0ustar roamroam#define SERVERCONFIG 257 #define CLIENTCONFIG 258 #define DEPRECATED 259 #define CLIENTRULE 260 #define INTERNAL 261 #define EXTERNAL 262 #define EXTERNAL_ROTATION 263 #define DEBUGING 264 #define RESOLVEPROTOCOL 265 #define SRCHOST 266 #define NOMISMATCH 267 #define NOUNKNOWN 268 #define EXTENSION 269 #define BIND 270 #define PRIVILEGED 271 #define IOTIMEOUT 272 #define CONNECTTIMEOUT 273 #define METHOD 274 #define CLIENTMETHOD 275 #define NONE 276 #define GSSAPI 277 #define UNAME 278 #define RFC931 279 #define PAM 280 #define COMPATIBILITY 281 #define REUSEADDR 282 #define SAMEPORT 283 #define USERNAME 284 #define USER_PRIVILEGED 285 #define USER_UNPRIVILEGED 286 #define USER_LIBWRAP 287 #define LOGOUTPUT 288 #define LOGFILE 289 #define CHILD_MAXIDLE 290 #define ROUTE 291 #define VIA 292 #define VERDICT_BLOCK 293 #define VERDICT_PASS 294 #define PAMSERVICENAME 295 #define PROTOCOL 296 #define PROTOCOL_TCP 297 #define PROTOCOL_UDP 298 #define PROTOCOL_FAKE 299 #define PROXYPROTOCOL 300 #define PROXYPROTOCOL_SOCKS_V4 301 #define PROXYPROTOCOL_SOCKS_V5 302 #define PROXYPROTOCOL_MSPROXY_V2 303 #define PROXYPROTOCOL_HTTP_V1_0 304 #define USER 305 #define COMMAND 306 #define COMMAND_BIND 307 #define COMMAND_CONNECT 308 #define COMMAND_UDPASSOCIATE 309 #define COMMAND_BINDREPLY 310 #define COMMAND_UDPREPLY 311 #define ACTION 312 #define LINE 313 #define LIBWRAPSTART 314 #define OPERATOR 315 #define LOG 316 #define LOG_CONNECT 317 #define LOG_DATA 318 #define LOG_DISCONNECT 319 #define LOG_ERROR 320 #define LOG_IOOPERATION 321 #define IPADDRESS 322 #define DOMAINNAME 323 #define DIRECT 324 #define IFNAME 325 #define PORT 326 #define PORTNUMBER 327 #define SERVICENAME 328 #define NUMBER 329 #define FROM 330 #define TO 331 #define REDIRECT 332 #define BANDWIDTH 333 #define MAXSESSIONS 334 #ifndef YYSTYPE_DEFINED #define YYSTYPE_DEFINED typedef union { char *string; uid_t uid; } YYSTYPE; #endif /* YYSTYPE_DEFINED */ extern YYSTYPE socks_yylval; dante-1.1.19.dfsg/sockd/getifa.c0000644000175000017500000003122307700305344015007 0ustar roamroam/* * $Id: getifa.c,v 1.30 2003/07/01 13:21:40 michaels Exp $ * * Copyright (c) 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ /* * This code originated from From Tom Chan . */ #include "common.h" static const char rcsid[] = "$Id: getifa.c,v 1.30 2003/07/01 13:21:40 michaels Exp $"; /*=========================================================================== * Given a destination address, getifa() returns the local source address * that will be selected by the OS to connect to that destination address. *==========================================================================*/ #include /* RTA_xxx constants */ #if HAVE_ROUTEINFO_LINUX #include #include #include #endif /* HAVE_ROUTEINFO_LINUX */ __BEGIN_DECLS static struct in_addr getdefaultexternal __P((void)); /* * Returns the default IP address to use for external connections. */ static int isonexternal __P((const struct sockaddr *addr)); /* * Returns true if "addr" is configured for the external interface, * otherwise false. */ __END_DECLS #if HAVE_ROUTEINFO_LINUX typedef unsigned char uchar_t; struct in_addr getifa(destaddr) struct in_addr destaddr; { const char *function = "getifa()"; struct { struct nlmsghdr nh; struct rtmsg rt; char attrbuf[512]; } req; struct rtattr *rta; char buf[BUFSIZ]; struct nlmsghdr *rhdr; struct rtmsg *rrt; struct rtattr *rrta; struct sockaddr raddr; int attrlen; int rtnetlink_sk; uid_t euid; struct in_addr inaddr_none; if (sockscf.external.addrc <= 1 || sockscf.external.rotation == ROTATION_NONE) return getdefaultexternal(); inaddr_none.s_addr = htonl(INADDR_NONE); /*=================================================================== * Get a NETLINK_ROUTE socket. *==================================================================*/ socks_seteuid(&euid, sockscf.uid.privileged); rtnetlink_sk = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); socks_reseteuid(sockscf.uid.privileged, euid); if (rtnetlink_sk == -1) { swarn("%s: socket(NETLINK_ROUTE)", function); close(rtnetlink_sk); return inaddr_none; } /*=================================================================== * Build the necessary data structures to get routing info. * The structures are: * nlmsghdr - message header for netlink requests * It specifies RTM_GETROUTE for get routing table info * rtmsg - for routing table requests * rtattr - Specifies RTA_DST indicating that the payload contains a * destination address * the payload - the destination address *==================================================================*/ bzero(&req, sizeof(req)); req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg)); req.nh.nlmsg_flags = NLM_F_REQUEST; req.nh.nlmsg_type = RTM_GETROUTE; req.rt.rtm_family = AF_INET; req.rt.rtm_dst_len = 0; req.rt.rtm_src_len = 0; req.rt.rtm_tos = 0; req.rt.rtm_table = RT_TABLE_UNSPEC; req.rt.rtm_protocol = RTPROT_UNSPEC; req.rt.rtm_scope = RT_SCOPE_UNIVERSE; req.rt.rtm_type = RTN_UNICAST; req.rt.rtm_flags = 0; rta = (struct rtattr *)(((char *) &req) + NLMSG_ALIGN(req.nh.nlmsg_len)); rta->rta_type = RTA_DST; rta->rta_len = RTA_LENGTH(sizeof(destaddr)); req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) + rta->rta_len; /*=================================================================== * Send the request and get the response. *==================================================================*/ memcpy(RTA_DATA(rta), &destaddr, sizeof(destaddr)); if (send(rtnetlink_sk, &req, req.nh.nlmsg_len, 0) != (ssize_t)req.nh.nlmsg_len) { swarn("%s: send() to netlink failed", function); close(rtnetlink_sk); return inaddr_none; } if (recv(rtnetlink_sk, &buf, sizeof(buf), 0) == -1) { swarn("%s: recv() from netlink failed", function); close(rtnetlink_sk); return inaddr_none; } /*==================================================================== * Walk the response structures to find the one that contains * RTA_PREFSRC in order to get the local source address to bind to. *===================================================================*/ rhdr = (struct nlmsghdr *)buf; rrt = (struct rtmsg *)NLMSG_DATA(rhdr); attrlen = sizeof(buf) - sizeof(struct nlmsghdr) - sizeof(struct rtmsg); bzero(&raddr, sizeof(raddr)); raddr.sa_family = AF_INET; for (rrta = (struct rtattr *)((char *)rrt + sizeof(struct rtmsg)); RTA_OK(rrta, attrlen); rrta = (struct rtattr *)RTA_NEXT(rrta, attrlen)) { if (rrta->rta_type == RTA_PREFSRC) { TOIN(&raddr)->sin_addr = *(struct in_addr *)RTA_DATA(rrta); if (!isonexternal(&raddr)) { char a[MAXSOCKADDRSTRING]; swarn("%s: address %s selected, but not set on external", function, sockaddr2string(&raddr, a, sizeof(a))); close(rtnetlink_sk); return getdefaultexternal(); } close(rtnetlink_sk); return TOIN(&raddr)->sin_addr; } } slog(LOG_DEBUG, "%s: can't find a gateway for %s, using defaultexternal", function, inet_ntoa(destaddr)); close(rtnetlink_sk); return getdefaultexternal(); } #else /* ifdef HAVE_ROUTEINFO_LINUX */ #if HAVE_ROUTEINFO_BSD #define BUFLEN (sizeof(struct rt_msghdr) + 512) /* 8 * sizeof(struct sockaddr_in6) = 192 */ #define SEQ 9999 #ifndef RTAX_GATEWAY #define RTAX_GATEWAY 1 /* XXX always correct? */ #endif /* !RTAX_GATEWAY */ struct in_addr getifa(destaddr) struct in_addr destaddr; { const char *function = "getifa()"; int sockfd; char buf[BUFLEN]; pid_t pid; struct rt_msghdr *rtm; struct sockaddr *sa; uid_t euid; struct in_addr inaddr_none; struct in_addr gwaddr; inaddr_none.s_addr = htonl(INADDR_NONE); if (sockscf.external.addrc <= 1 || sockscf.external.rotation == ROTATION_NONE) return getdefaultexternal(); /*=================================================================== * Get a socket. *==================================================================*/ socks_seteuid(&euid, sockscf.uid.privileged); sockfd = socket(AF_ROUTE, SOCK_RAW, 0); /* need superuser privileges */ socks_reseteuid(sockscf.uid.privileged, euid); if (sockfd == -1) { swarn("%s: socket(AF_ROUTE)", function); return inaddr_none; } /*=================================================================== * Do until 2 consecutive RTM_GET return the same gateway address. * The first calls may return router addresses in RTA_GATEWAY and * those will not match any local external address. *==================================================================*/ do { /*=========================================================== * Build the necessary data structures to get routing info. * The structures are: * rt_msghdr - Specifies RTM_GET for getting routing table * info * sockaddr - contains the destination address *==========================================================*/ bzero(buf, sizeof(buf)); rtm = (struct rt_msghdr *) buf; rtm->rtm_msglen = sizeof(struct rt_msghdr) + sizeof(struct sockaddr_in); rtm->rtm_version = RTM_VERSION; rtm->rtm_type = RTM_GET; rtm->rtm_addrs = RTA_DST; rtm->rtm_pid = pid = getpid(); rtm->rtm_seq = SEQ; sa = (struct sockaddr *) (rtm + 1); /* LINTED pointer casts may be troublesome */ TOIN(sa)->sin_family = AF_INET; /* LINTED pointer casts may be troublesome */ TOIN(sa)->sin_addr = destaddr; /* LINTED pointer casts may be troublesome */ TOIN(sa)->sin_port = htons(0); /*=========================================================== * Send the request and get the response. *==========================================================*/ if (write(sockfd, rtm, (size_t)rtm->rtm_msglen) != rtm->rtm_msglen) { swarn("%s: write() to AF_ROUTE failed", function); close(sockfd); return inaddr_none; } do { if (read(sockfd, rtm, sizeof(buf)) == -1) { swarn("%s: read from AF_ROUTE failed", function); close(sockfd); return inaddr_none; } } while (rtm->rtm_type != RTM_GET || rtm->rtm_seq != SEQ || rtm->rtm_pid != pid); /*============================================================ * Go straight to the RTA_GATEWAY entry for our info. *===========================================================*/ sa = (struct sockaddr *) (rtm + 1); if (!(rtm->rtm_addrs & RTA_GATEWAY) || (sa += RTAX_GATEWAY) == NULL || TOIN(sa)->sin_family != AF_INET) { slog(LOG_DEBUG, "%s: can't find gateway for %s, using defaultexternal", function, inet_ntoa(destaddr)); close(sockfd); return getdefaultexternal(); } gwaddr.s_addr = destaddr.s_addr; destaddr.s_addr = TOIN(sa)->sin_addr.s_addr; } while (destaddr.s_addr != gwaddr.s_addr); close(sockfd); if (!isonexternal(sa)) { char a[MAXSOCKADDRSTRING]; swarnx("%s: address %s selected, but not set for external interface", function, sockaddr2string(sa, a, sizeof(a))); return getdefaultexternal(); } /* LINTED pointer casts may be troublesome */ return TOIN(sa)->sin_addr; } #else /* HAVE_ROUTEINFO_BSD */ struct in_addr getifa(destaddr) struct in_addr destaddr; { return getdefaultexternal(); } #endif /* !HAVE_ROUTEINFO_BSD */ #endif /* !HAVE_ROUTEINFO_LINUX */ static struct in_addr getdefaultexternal(void) { const char *function = "getdefaultexternal()"; struct sockaddr bound; /* find address to bind on clients behalf. */ switch ((*sockscf.external.addrv).atype) { case SOCKS_ADDR_IFNAME: if (ifname2sockaddr((*sockscf.external.addrv).addr.ifname, 0, &bound) == NULL) { swarnx("%s: can't find external interface/address: %s", function, (*sockscf.external.addrv).addr.ifname); /* LINTED pointer casts may be troublesome */ TOIN(&bound)->sin_addr.s_addr = htonl(INADDR_NONE); } break; case SOCKS_ADDR_IPV4: { struct sockshost_t host; sockshost2sockaddr(ruleaddress2sockshost(&*sockscf.external.addrv, &host, SOCKS_TCP), &bound); break; } default: SERRX((*sockscf.external.addrv).atype); } /* LINTED pointer casts may be troublesome */ return TOIN(&bound)->sin_addr; } static int isonexternal(addr) const struct sockaddr *addr; { const char *function = "isonexternal()"; int i; for (i = 0; i < sockscf.external.addrc; ++i) { struct sockaddr check; int match = 0; switch ((*sockscf.external.addrv).atype) { case SOCKS_ADDR_IFNAME: { int ifi; ifi = 0; while (ifname2sockaddr(sockscf.external.addrv[i].addr.ifname, ifi++, &check) != NULL) /* LINTED pointer casts may be troublesome */ if (TOIN(&check)->sin_addr.s_addr == TOCIN(addr)->sin_addr.s_addr) { match = 1; break; } } break; case SOCKS_ADDR_IPV4: /* LINTED pointer casts may be troublesome */ if (sockscf.external.addrv[i].addr.ipv4.ip.s_addr == TOCIN(addr)->sin_addr.s_addr) match = 1; break; default: SERRX((*sockscf.external.addrv).atype); } if (match) break; } if (i == sockscf.external.addrc) return 0; return 1; } dante-1.1.19.dfsg/sockd/Makefile.am0000644000175000017500000000425410333437512015443 0ustar roamroamsbin_PROGRAMS = sockd sockd_SOURCES = ../lib/config_parse.y ../lib/config_scan.l \ sockd.c sockd_child.c ../lib/io.c sockd_negotiate.c sockd_request.c \ method_uname.c ../lib/debug.c ../lib/udp_util.c ../lib/util.c \ ../lib/log.c ../lib/socket.c sockd_socket.c ../lib/config.c \ sockd_util.c sockd_protocol.c serverconfig.c ../lib/protocol.c \ ../lib/hostcache.c ../dlib/interposition.c ../lib/broken.c \ ../lib/serr.c sockd_io.c accesscheck.c auth_password.c \ auth_pam.c ../lib/tostring.c redirect.c redirect_key.c \ ../lib/addressmatch.c checkmodule.c shmem.c bandwidth.c bandwidth_key.c \ getifa.c ../lib/clientprotocol.c ../lib/httpproxy.c ../lib/authneg.c \ session.c session_key.c noinst_HEADERS = config_parse.h MAINTAINERCLEANFILES = config_parse.h config_parse.c config_scan.c #use libwrap if it is available if WANT_LIBWRAP LIBWRAP=-lwrap #use preloading for libwrap if enabled and possible if SERVER_INTERPOSITION SERVDL = -DSOCKSLIBRARY_DYNAMIC=1 endif #SERVER_INTERPOSITION else #WANT_LIBWRAP #use preloading anyway? if SERVER_INTERPOSITION_ALWAYS SERVDL = -DSOCKSLIBRARY_DYNAMIC=1 endif #SERVER_INTERPOSITION_ALWAYS endif #WANT_LIBWRAP #XXXhack if STATIC_SOCKD sockd_LDADD = ../libscompat/sockatmark.o ${LIBWRAP} else sockd_LDADD = ../libscompat/libscompat.la ${LIBWRAP} endif INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/libscompat PREFIX = socks_yy AM_YFLAGS = -d -p${PREFIX} AM_LFLAGS = -P${PREFIX} -olex.yy.c if STATIC_SOCKD STATIC = -all-static endif if SPROFIL PROFIL = -pg -DPROFILING #XXX some systems do not appear to need this sockd_LDFLAGS = ${STATIC} else PROFIL = endif #XXX AM_CFLAGS = ${PROFIL} -DSOCKS_SERVER=1 -DSOCKS_CLIENT=0 ${SERVDL} #lint files SUFFIXES=.ln if LINT LINTFILES = sockd.ln sockd_child.ln sockd_io.ln io.ln udp_util.ln \ sockd_request.ln method_uname.ln debug.ln util.ln socket.ln \ log.ln sockd_socket.ln config_parse.ln config_scan.ln \ sockd_util.ln sockd_protocol.ln serverconfig.ln protocol.ln \ sockd_negotiate.ln config.ln interposition.ln sockd_DEPENDENCIES= $(LINTFILES) CLEANFILES=$(LINTFILES) LINT=lint LINTFLAGS=-abcebiprxz .c.ln: $(LINT) $(LINTFLAGS) $(DEFS) $(INCLUDES) $(CPPFLAGS) $< endif dante-1.1.19.dfsg/sockd/Makefile.in0000644000175000017500000015030410362704174015455 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ sbin_PROGRAMS = sockd$(EXEEXT) @LINT_FALSE@@STATIC_SOCKD_FALSE@sockd_DEPENDENCIES = \ @LINT_FALSE@@STATIC_SOCKD_FALSE@ ../libscompat/libscompat.la \ @LINT_FALSE@@STATIC_SOCKD_FALSE@ $(am__DEPENDENCIES_1) @LINT_FALSE@@STATIC_SOCKD_TRUE@sockd_DEPENDENCIES = \ @LINT_FALSE@@STATIC_SOCKD_TRUE@ ../libscompat/sockatmark.o \ @LINT_FALSE@@STATIC_SOCKD_TRUE@ $(am__DEPENDENCIES_1) subdir = sockd DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in config_parse.c config_parse.h \ config_scan.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(sbin_PROGRAMS) am_sockd_OBJECTS = config_parse.$(OBJEXT) config_scan.$(OBJEXT) \ sockd.$(OBJEXT) sockd_child.$(OBJEXT) io.$(OBJEXT) \ sockd_negotiate.$(OBJEXT) sockd_request.$(OBJEXT) \ method_uname.$(OBJEXT) debug.$(OBJEXT) udp_util.$(OBJEXT) \ util.$(OBJEXT) log.$(OBJEXT) socket.$(OBJEXT) \ sockd_socket.$(OBJEXT) config.$(OBJEXT) sockd_util.$(OBJEXT) \ sockd_protocol.$(OBJEXT) serverconfig.$(OBJEXT) \ protocol.$(OBJEXT) hostcache.$(OBJEXT) interposition.$(OBJEXT) \ broken.$(OBJEXT) serr.$(OBJEXT) sockd_io.$(OBJEXT) \ accesscheck.$(OBJEXT) auth_password.$(OBJEXT) \ auth_pam.$(OBJEXT) tostring.$(OBJEXT) redirect.$(OBJEXT) \ redirect_key.$(OBJEXT) addressmatch.$(OBJEXT) \ checkmodule.$(OBJEXT) shmem.$(OBJEXT) bandwidth.$(OBJEXT) \ bandwidth_key.$(OBJEXT) getifa.$(OBJEXT) \ clientprotocol.$(OBJEXT) httpproxy.$(OBJEXT) authneg.$(OBJEXT) \ session.$(OBJEXT) session_key.$(OBJEXT) sockd_OBJECTS = $(am_sockd_OBJECTS) am__DEPENDENCIES_1 = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \ $(AM_YFLAGS) SOURCES = $(sockd_SOURCES) DIST_SOURCES = $(sockd_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ sockd_SOURCES = ../lib/config_parse.y ../lib/config_scan.l \ sockd.c sockd_child.c ../lib/io.c sockd_negotiate.c sockd_request.c \ method_uname.c ../lib/debug.c ../lib/udp_util.c ../lib/util.c \ ../lib/log.c ../lib/socket.c sockd_socket.c ../lib/config.c \ sockd_util.c sockd_protocol.c serverconfig.c ../lib/protocol.c \ ../lib/hostcache.c ../dlib/interposition.c ../lib/broken.c \ ../lib/serr.c sockd_io.c accesscheck.c auth_password.c \ auth_pam.c ../lib/tostring.c redirect.c redirect_key.c \ ../lib/addressmatch.c checkmodule.c shmem.c bandwidth.c bandwidth_key.c \ getifa.c ../lib/clientprotocol.c ../lib/httpproxy.c ../lib/authneg.c \ session.c session_key.c noinst_HEADERS = config_parse.h MAINTAINERCLEANFILES = config_parse.h config_parse.c config_scan.c #use libwrap if it is available @WANT_LIBWRAP_TRUE@LIBWRAP = -lwrap #use preloading anyway? @SERVER_INTERPOSITION_ALWAYS_TRUE@@WANT_LIBWRAP_FALSE@SERVDL = -DSOCKSLIBRARY_DYNAMIC=1 #use preloading for libwrap if enabled and possible @SERVER_INTERPOSITION_TRUE@@WANT_LIBWRAP_TRUE@SERVDL = -DSOCKSLIBRARY_DYNAMIC=1 @STATIC_SOCKD_FALSE@sockd_LDADD = ../libscompat/libscompat.la ${LIBWRAP} #XXXhack @STATIC_SOCKD_TRUE@sockd_LDADD = ../libscompat/sockatmark.o ${LIBWRAP} INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/libscompat PREFIX = socks_yy AM_YFLAGS = -d -p${PREFIX} AM_LFLAGS = -P${PREFIX} -olex.yy.c @STATIC_SOCKD_TRUE@STATIC = -all-static @SPROFIL_FALSE@PROFIL = @SPROFIL_TRUE@PROFIL = -pg -DPROFILING #XXX some systems do not appear to need this @SPROFIL_TRUE@sockd_LDFLAGS = ${STATIC} #XXX AM_CFLAGS = ${PROFIL} -DSOCKS_SERVER=1 -DSOCKS_CLIENT=0 ${SERVDL} #lint files SUFFIXES = .ln @LINT_TRUE@LINTFILES = sockd.ln sockd_child.ln sockd_io.ln io.ln udp_util.ln \ @LINT_TRUE@ sockd_request.ln method_uname.ln debug.ln util.ln socket.ln \ @LINT_TRUE@ log.ln sockd_socket.ln config_parse.ln config_scan.ln \ @LINT_TRUE@ sockd_util.ln sockd_protocol.ln serverconfig.ln protocol.ln \ @LINT_TRUE@ sockd_negotiate.ln config.ln interposition.ln @LINT_TRUE@sockd_DEPENDENCIES = $(LINTFILES) @LINT_TRUE@CLEANFILES = $(LINTFILES) @LINT_TRUE@LINT = lint @LINT_TRUE@LINTFLAGS = -abcebiprxz all: all-am .SUFFIXES: .SUFFIXES: .ln .c .l .lo .o .obj .y $(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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sockd/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu sockd/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 install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ rm -f "$(DESTDIR)$(sbindir)/$$f"; \ done clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done config_parse.h: config_parse.c @if test ! -f $@; then \ rm -f config_parse.c; \ $(MAKE) config_parse.c; \ else :; fi sockd$(EXEEXT): $(sockd_OBJECTS) $(sockd_DEPENDENCIES) @rm -f sockd$(EXEEXT) $(LINK) $(sockd_LDFLAGS) $(sockd_OBJECTS) $(sockd_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accesscheck.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addressmatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_pam.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_password.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authneg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bandwidth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bandwidth_key.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/broken.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkmodule.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clientprotocol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_parse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_scan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getifa.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostcache.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpproxy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interposition.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/method_uname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/redirect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/redirect_key.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serverconfig.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/session.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/session_key.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shmem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockd_child.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockd_io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockd_negotiate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockd_protocol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockd_request.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockd_socket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockd_util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tostring.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udp_util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< io.o: ../lib/io.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT io.o -MD -MP -MF "$(DEPDIR)/io.Tpo" -c -o io.o `test -f '../lib/io.c' || echo '$(srcdir)/'`../lib/io.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/io.Tpo" "$(DEPDIR)/io.Po"; else rm -f "$(DEPDIR)/io.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/io.c' object='io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o io.o `test -f '../lib/io.c' || echo '$(srcdir)/'`../lib/io.c io.obj: ../lib/io.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT io.obj -MD -MP -MF "$(DEPDIR)/io.Tpo" -c -o io.obj `if test -f '../lib/io.c'; then $(CYGPATH_W) '../lib/io.c'; else $(CYGPATH_W) '$(srcdir)/../lib/io.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/io.Tpo" "$(DEPDIR)/io.Po"; else rm -f "$(DEPDIR)/io.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/io.c' object='io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o io.obj `if test -f '../lib/io.c'; then $(CYGPATH_W) '../lib/io.c'; else $(CYGPATH_W) '$(srcdir)/../lib/io.c'; fi` debug.o: ../lib/debug.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debug.o -MD -MP -MF "$(DEPDIR)/debug.Tpo" -c -o debug.o `test -f '../lib/debug.c' || echo '$(srcdir)/'`../lib/debug.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/debug.Tpo" "$(DEPDIR)/debug.Po"; else rm -f "$(DEPDIR)/debug.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/debug.c' object='debug.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debug.o `test -f '../lib/debug.c' || echo '$(srcdir)/'`../lib/debug.c debug.obj: ../lib/debug.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debug.obj -MD -MP -MF "$(DEPDIR)/debug.Tpo" -c -o debug.obj `if test -f '../lib/debug.c'; then $(CYGPATH_W) '../lib/debug.c'; else $(CYGPATH_W) '$(srcdir)/../lib/debug.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/debug.Tpo" "$(DEPDIR)/debug.Po"; else rm -f "$(DEPDIR)/debug.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/debug.c' object='debug.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debug.obj `if test -f '../lib/debug.c'; then $(CYGPATH_W) '../lib/debug.c'; else $(CYGPATH_W) '$(srcdir)/../lib/debug.c'; fi` udp_util.o: ../lib/udp_util.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT udp_util.o -MD -MP -MF "$(DEPDIR)/udp_util.Tpo" -c -o udp_util.o `test -f '../lib/udp_util.c' || echo '$(srcdir)/'`../lib/udp_util.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/udp_util.Tpo" "$(DEPDIR)/udp_util.Po"; else rm -f "$(DEPDIR)/udp_util.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/udp_util.c' object='udp_util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o udp_util.o `test -f '../lib/udp_util.c' || echo '$(srcdir)/'`../lib/udp_util.c udp_util.obj: ../lib/udp_util.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT udp_util.obj -MD -MP -MF "$(DEPDIR)/udp_util.Tpo" -c -o udp_util.obj `if test -f '../lib/udp_util.c'; then $(CYGPATH_W) '../lib/udp_util.c'; else $(CYGPATH_W) '$(srcdir)/../lib/udp_util.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/udp_util.Tpo" "$(DEPDIR)/udp_util.Po"; else rm -f "$(DEPDIR)/udp_util.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/udp_util.c' object='udp_util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o udp_util.obj `if test -f '../lib/udp_util.c'; then $(CYGPATH_W) '../lib/udp_util.c'; else $(CYGPATH_W) '$(srcdir)/../lib/udp_util.c'; fi` util.o: ../lib/util.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util.o -MD -MP -MF "$(DEPDIR)/util.Tpo" -c -o util.o `test -f '../lib/util.c' || echo '$(srcdir)/'`../lib/util.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/util.Tpo" "$(DEPDIR)/util.Po"; else rm -f "$(DEPDIR)/util.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/util.c' object='util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util.o `test -f '../lib/util.c' || echo '$(srcdir)/'`../lib/util.c util.obj: ../lib/util.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util.obj -MD -MP -MF "$(DEPDIR)/util.Tpo" -c -o util.obj `if test -f '../lib/util.c'; then $(CYGPATH_W) '../lib/util.c'; else $(CYGPATH_W) '$(srcdir)/../lib/util.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/util.Tpo" "$(DEPDIR)/util.Po"; else rm -f "$(DEPDIR)/util.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/util.c' object='util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util.obj `if test -f '../lib/util.c'; then $(CYGPATH_W) '../lib/util.c'; else $(CYGPATH_W) '$(srcdir)/../lib/util.c'; fi` log.o: ../lib/log.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT log.o -MD -MP -MF "$(DEPDIR)/log.Tpo" -c -o log.o `test -f '../lib/log.c' || echo '$(srcdir)/'`../lib/log.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/log.Tpo" "$(DEPDIR)/log.Po"; else rm -f "$(DEPDIR)/log.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/log.c' object='log.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o log.o `test -f '../lib/log.c' || echo '$(srcdir)/'`../lib/log.c log.obj: ../lib/log.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT log.obj -MD -MP -MF "$(DEPDIR)/log.Tpo" -c -o log.obj `if test -f '../lib/log.c'; then $(CYGPATH_W) '../lib/log.c'; else $(CYGPATH_W) '$(srcdir)/../lib/log.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/log.Tpo" "$(DEPDIR)/log.Po"; else rm -f "$(DEPDIR)/log.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/log.c' object='log.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o log.obj `if test -f '../lib/log.c'; then $(CYGPATH_W) '../lib/log.c'; else $(CYGPATH_W) '$(srcdir)/../lib/log.c'; fi` socket.o: ../lib/socket.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT socket.o -MD -MP -MF "$(DEPDIR)/socket.Tpo" -c -o socket.o `test -f '../lib/socket.c' || echo '$(srcdir)/'`../lib/socket.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/socket.Tpo" "$(DEPDIR)/socket.Po"; else rm -f "$(DEPDIR)/socket.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/socket.c' object='socket.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o socket.o `test -f '../lib/socket.c' || echo '$(srcdir)/'`../lib/socket.c socket.obj: ../lib/socket.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT socket.obj -MD -MP -MF "$(DEPDIR)/socket.Tpo" -c -o socket.obj `if test -f '../lib/socket.c'; then $(CYGPATH_W) '../lib/socket.c'; else $(CYGPATH_W) '$(srcdir)/../lib/socket.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/socket.Tpo" "$(DEPDIR)/socket.Po"; else rm -f "$(DEPDIR)/socket.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/socket.c' object='socket.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o socket.obj `if test -f '../lib/socket.c'; then $(CYGPATH_W) '../lib/socket.c'; else $(CYGPATH_W) '$(srcdir)/../lib/socket.c'; fi` config.o: ../lib/config.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT config.o -MD -MP -MF "$(DEPDIR)/config.Tpo" -c -o config.o `test -f '../lib/config.c' || echo '$(srcdir)/'`../lib/config.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/config.Tpo" "$(DEPDIR)/config.Po"; else rm -f "$(DEPDIR)/config.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/config.c' object='config.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o config.o `test -f '../lib/config.c' || echo '$(srcdir)/'`../lib/config.c config.obj: ../lib/config.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT config.obj -MD -MP -MF "$(DEPDIR)/config.Tpo" -c -o config.obj `if test -f '../lib/config.c'; then $(CYGPATH_W) '../lib/config.c'; else $(CYGPATH_W) '$(srcdir)/../lib/config.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/config.Tpo" "$(DEPDIR)/config.Po"; else rm -f "$(DEPDIR)/config.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/config.c' object='config.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o config.obj `if test -f '../lib/config.c'; then $(CYGPATH_W) '../lib/config.c'; else $(CYGPATH_W) '$(srcdir)/../lib/config.c'; fi` protocol.o: ../lib/protocol.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT protocol.o -MD -MP -MF "$(DEPDIR)/protocol.Tpo" -c -o protocol.o `test -f '../lib/protocol.c' || echo '$(srcdir)/'`../lib/protocol.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/protocol.Tpo" "$(DEPDIR)/protocol.Po"; else rm -f "$(DEPDIR)/protocol.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/protocol.c' object='protocol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o protocol.o `test -f '../lib/protocol.c' || echo '$(srcdir)/'`../lib/protocol.c protocol.obj: ../lib/protocol.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT protocol.obj -MD -MP -MF "$(DEPDIR)/protocol.Tpo" -c -o protocol.obj `if test -f '../lib/protocol.c'; then $(CYGPATH_W) '../lib/protocol.c'; else $(CYGPATH_W) '$(srcdir)/../lib/protocol.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/protocol.Tpo" "$(DEPDIR)/protocol.Po"; else rm -f "$(DEPDIR)/protocol.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/protocol.c' object='protocol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o protocol.obj `if test -f '../lib/protocol.c'; then $(CYGPATH_W) '../lib/protocol.c'; else $(CYGPATH_W) '$(srcdir)/../lib/protocol.c'; fi` hostcache.o: ../lib/hostcache.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hostcache.o -MD -MP -MF "$(DEPDIR)/hostcache.Tpo" -c -o hostcache.o `test -f '../lib/hostcache.c' || echo '$(srcdir)/'`../lib/hostcache.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/hostcache.Tpo" "$(DEPDIR)/hostcache.Po"; else rm -f "$(DEPDIR)/hostcache.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/hostcache.c' object='hostcache.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hostcache.o `test -f '../lib/hostcache.c' || echo '$(srcdir)/'`../lib/hostcache.c hostcache.obj: ../lib/hostcache.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hostcache.obj -MD -MP -MF "$(DEPDIR)/hostcache.Tpo" -c -o hostcache.obj `if test -f '../lib/hostcache.c'; then $(CYGPATH_W) '../lib/hostcache.c'; else $(CYGPATH_W) '$(srcdir)/../lib/hostcache.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/hostcache.Tpo" "$(DEPDIR)/hostcache.Po"; else rm -f "$(DEPDIR)/hostcache.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/hostcache.c' object='hostcache.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hostcache.obj `if test -f '../lib/hostcache.c'; then $(CYGPATH_W) '../lib/hostcache.c'; else $(CYGPATH_W) '$(srcdir)/../lib/hostcache.c'; fi` interposition.o: ../dlib/interposition.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interposition.o -MD -MP -MF "$(DEPDIR)/interposition.Tpo" -c -o interposition.o `test -f '../dlib/interposition.c' || echo '$(srcdir)/'`../dlib/interposition.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/interposition.Tpo" "$(DEPDIR)/interposition.Po"; else rm -f "$(DEPDIR)/interposition.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../dlib/interposition.c' object='interposition.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interposition.o `test -f '../dlib/interposition.c' || echo '$(srcdir)/'`../dlib/interposition.c interposition.obj: ../dlib/interposition.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interposition.obj -MD -MP -MF "$(DEPDIR)/interposition.Tpo" -c -o interposition.obj `if test -f '../dlib/interposition.c'; then $(CYGPATH_W) '../dlib/interposition.c'; else $(CYGPATH_W) '$(srcdir)/../dlib/interposition.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/interposition.Tpo" "$(DEPDIR)/interposition.Po"; else rm -f "$(DEPDIR)/interposition.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../dlib/interposition.c' object='interposition.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interposition.obj `if test -f '../dlib/interposition.c'; then $(CYGPATH_W) '../dlib/interposition.c'; else $(CYGPATH_W) '$(srcdir)/../dlib/interposition.c'; fi` broken.o: ../lib/broken.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT broken.o -MD -MP -MF "$(DEPDIR)/broken.Tpo" -c -o broken.o `test -f '../lib/broken.c' || echo '$(srcdir)/'`../lib/broken.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/broken.Tpo" "$(DEPDIR)/broken.Po"; else rm -f "$(DEPDIR)/broken.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/broken.c' object='broken.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o broken.o `test -f '../lib/broken.c' || echo '$(srcdir)/'`../lib/broken.c broken.obj: ../lib/broken.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT broken.obj -MD -MP -MF "$(DEPDIR)/broken.Tpo" -c -o broken.obj `if test -f '../lib/broken.c'; then $(CYGPATH_W) '../lib/broken.c'; else $(CYGPATH_W) '$(srcdir)/../lib/broken.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/broken.Tpo" "$(DEPDIR)/broken.Po"; else rm -f "$(DEPDIR)/broken.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/broken.c' object='broken.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o broken.obj `if test -f '../lib/broken.c'; then $(CYGPATH_W) '../lib/broken.c'; else $(CYGPATH_W) '$(srcdir)/../lib/broken.c'; fi` serr.o: ../lib/serr.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT serr.o -MD -MP -MF "$(DEPDIR)/serr.Tpo" -c -o serr.o `test -f '../lib/serr.c' || echo '$(srcdir)/'`../lib/serr.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/serr.Tpo" "$(DEPDIR)/serr.Po"; else rm -f "$(DEPDIR)/serr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/serr.c' object='serr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o serr.o `test -f '../lib/serr.c' || echo '$(srcdir)/'`../lib/serr.c serr.obj: ../lib/serr.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT serr.obj -MD -MP -MF "$(DEPDIR)/serr.Tpo" -c -o serr.obj `if test -f '../lib/serr.c'; then $(CYGPATH_W) '../lib/serr.c'; else $(CYGPATH_W) '$(srcdir)/../lib/serr.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/serr.Tpo" "$(DEPDIR)/serr.Po"; else rm -f "$(DEPDIR)/serr.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/serr.c' object='serr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o serr.obj `if test -f '../lib/serr.c'; then $(CYGPATH_W) '../lib/serr.c'; else $(CYGPATH_W) '$(srcdir)/../lib/serr.c'; fi` tostring.o: ../lib/tostring.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tostring.o -MD -MP -MF "$(DEPDIR)/tostring.Tpo" -c -o tostring.o `test -f '../lib/tostring.c' || echo '$(srcdir)/'`../lib/tostring.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tostring.Tpo" "$(DEPDIR)/tostring.Po"; else rm -f "$(DEPDIR)/tostring.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/tostring.c' object='tostring.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tostring.o `test -f '../lib/tostring.c' || echo '$(srcdir)/'`../lib/tostring.c tostring.obj: ../lib/tostring.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tostring.obj -MD -MP -MF "$(DEPDIR)/tostring.Tpo" -c -o tostring.obj `if test -f '../lib/tostring.c'; then $(CYGPATH_W) '../lib/tostring.c'; else $(CYGPATH_W) '$(srcdir)/../lib/tostring.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/tostring.Tpo" "$(DEPDIR)/tostring.Po"; else rm -f "$(DEPDIR)/tostring.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/tostring.c' object='tostring.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tostring.obj `if test -f '../lib/tostring.c'; then $(CYGPATH_W) '../lib/tostring.c'; else $(CYGPATH_W) '$(srcdir)/../lib/tostring.c'; fi` addressmatch.o: ../lib/addressmatch.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT addressmatch.o -MD -MP -MF "$(DEPDIR)/addressmatch.Tpo" -c -o addressmatch.o `test -f '../lib/addressmatch.c' || echo '$(srcdir)/'`../lib/addressmatch.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/addressmatch.Tpo" "$(DEPDIR)/addressmatch.Po"; else rm -f "$(DEPDIR)/addressmatch.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/addressmatch.c' object='addressmatch.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o addressmatch.o `test -f '../lib/addressmatch.c' || echo '$(srcdir)/'`../lib/addressmatch.c addressmatch.obj: ../lib/addressmatch.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT addressmatch.obj -MD -MP -MF "$(DEPDIR)/addressmatch.Tpo" -c -o addressmatch.obj `if test -f '../lib/addressmatch.c'; then $(CYGPATH_W) '../lib/addressmatch.c'; else $(CYGPATH_W) '$(srcdir)/../lib/addressmatch.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/addressmatch.Tpo" "$(DEPDIR)/addressmatch.Po"; else rm -f "$(DEPDIR)/addressmatch.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/addressmatch.c' object='addressmatch.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o addressmatch.obj `if test -f '../lib/addressmatch.c'; then $(CYGPATH_W) '../lib/addressmatch.c'; else $(CYGPATH_W) '$(srcdir)/../lib/addressmatch.c'; fi` clientprotocol.o: ../lib/clientprotocol.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT clientprotocol.o -MD -MP -MF "$(DEPDIR)/clientprotocol.Tpo" -c -o clientprotocol.o `test -f '../lib/clientprotocol.c' || echo '$(srcdir)/'`../lib/clientprotocol.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/clientprotocol.Tpo" "$(DEPDIR)/clientprotocol.Po"; else rm -f "$(DEPDIR)/clientprotocol.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/clientprotocol.c' object='clientprotocol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o clientprotocol.o `test -f '../lib/clientprotocol.c' || echo '$(srcdir)/'`../lib/clientprotocol.c clientprotocol.obj: ../lib/clientprotocol.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT clientprotocol.obj -MD -MP -MF "$(DEPDIR)/clientprotocol.Tpo" -c -o clientprotocol.obj `if test -f '../lib/clientprotocol.c'; then $(CYGPATH_W) '../lib/clientprotocol.c'; else $(CYGPATH_W) '$(srcdir)/../lib/clientprotocol.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/clientprotocol.Tpo" "$(DEPDIR)/clientprotocol.Po"; else rm -f "$(DEPDIR)/clientprotocol.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/clientprotocol.c' object='clientprotocol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o clientprotocol.obj `if test -f '../lib/clientprotocol.c'; then $(CYGPATH_W) '../lib/clientprotocol.c'; else $(CYGPATH_W) '$(srcdir)/../lib/clientprotocol.c'; fi` httpproxy.o: ../lib/httpproxy.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT httpproxy.o -MD -MP -MF "$(DEPDIR)/httpproxy.Tpo" -c -o httpproxy.o `test -f '../lib/httpproxy.c' || echo '$(srcdir)/'`../lib/httpproxy.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/httpproxy.Tpo" "$(DEPDIR)/httpproxy.Po"; else rm -f "$(DEPDIR)/httpproxy.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/httpproxy.c' object='httpproxy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o httpproxy.o `test -f '../lib/httpproxy.c' || echo '$(srcdir)/'`../lib/httpproxy.c httpproxy.obj: ../lib/httpproxy.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT httpproxy.obj -MD -MP -MF "$(DEPDIR)/httpproxy.Tpo" -c -o httpproxy.obj `if test -f '../lib/httpproxy.c'; then $(CYGPATH_W) '../lib/httpproxy.c'; else $(CYGPATH_W) '$(srcdir)/../lib/httpproxy.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/httpproxy.Tpo" "$(DEPDIR)/httpproxy.Po"; else rm -f "$(DEPDIR)/httpproxy.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/httpproxy.c' object='httpproxy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o httpproxy.obj `if test -f '../lib/httpproxy.c'; then $(CYGPATH_W) '../lib/httpproxy.c'; else $(CYGPATH_W) '$(srcdir)/../lib/httpproxy.c'; fi` authneg.o: ../lib/authneg.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT authneg.o -MD -MP -MF "$(DEPDIR)/authneg.Tpo" -c -o authneg.o `test -f '../lib/authneg.c' || echo '$(srcdir)/'`../lib/authneg.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/authneg.Tpo" "$(DEPDIR)/authneg.Po"; else rm -f "$(DEPDIR)/authneg.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/authneg.c' object='authneg.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o authneg.o `test -f '../lib/authneg.c' || echo '$(srcdir)/'`../lib/authneg.c authneg.obj: ../lib/authneg.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT authneg.obj -MD -MP -MF "$(DEPDIR)/authneg.Tpo" -c -o authneg.obj `if test -f '../lib/authneg.c'; then $(CYGPATH_W) '../lib/authneg.c'; else $(CYGPATH_W) '$(srcdir)/../lib/authneg.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/authneg.Tpo" "$(DEPDIR)/authneg.Po"; else rm -f "$(DEPDIR)/authneg.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/authneg.c' object='authneg.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o authneg.obj `if test -f '../lib/authneg.c'; then $(CYGPATH_W) '../lib/authneg.c'; else $(CYGPATH_W) '$(srcdir)/../lib/authneg.c'; fi` .l.c: $(LEXCOMPILE) $< sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@ rm -f $(LEX_OUTPUT_ROOT).c config_scan.c: ../lib/config_scan.l $(LEX) $(LFLAGS) $(AM_LFLAGS) `test -f ../lib/config_scan.l || echo '$(srcdir)/'`../lib/config_scan.l sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|config_scan.c|' $(LEX_OUTPUT_ROOT).c >config_scan.c rm -f $(LEX_OUTPUT_ROOT).c .y.c: $(YACCCOMPILE) $< if test -f y.tab.h; then \ to=`echo "$*_H" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|$*.h|" \ y.tab.h >$*.ht; \ rm -f y.tab.h; \ if cmp -s $*.ht $*.h; then \ rm -f $*.ht ;\ else \ mv $*.ht $*.h; \ fi; \ fi if test -f y.output; then \ mv y.output $*.output; \ fi sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@ rm -f y.tab.c config_parse.c: ../lib/config_parse.y $(YACC) $(YFLAGS) $(AM_YFLAGS) `test -f '../lib/config_parse.y' || echo '$(srcdir)/'`../lib/config_parse.y if test -f y.tab.h; then \ to=`echo "config_parse_H" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|config_parse.h|" \ y.tab.h >config_parse.ht; \ rm -f y.tab.h; \ if cmp -s config_parse.ht config_parse.h; then \ rm -f config_parse.ht ;\ else \ mv config_parse.ht config_parse.h; \ fi; \ fi if test -f y.output; then \ mv y.output config_parse.output; \ fi sed '/^#/ s|y\.tab\.c|config_parse.c|' y.tab.c >config_parse.ct && mv config_parse.ct config_parse.c rm -f y.tab.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f config_parse.c -rm -f config_parse.h -rm -f config_scan.c -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-sbinPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-sbinPROGRAMS install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-sbinPROGRAMS @LINT_TRUE@.c.ln: @LINT_TRUE@ $(LINT) $(LINTFLAGS) $(DEFS) $(INCLUDES) $(CPPFLAGS) $< # 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: dante-1.1.19.dfsg/sockd/sockd_util.c0000644000175000017500000002072110354742711015713 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: sockd_util.c,v 1.92 2005/12/28 18:27:14 michaels Exp $"; #define CM2IM(charmethodv, methodc, intmethodv) \ do { \ int cm2im = methodc; \ while (--cm2im >= 0) \ intmethodv[cm2im] = charmethodv[cm2im]; \ } while (lintnoloop_sockd_h) \ int selectmethod(methodv, methodc, offerdv, offeredc) const int *methodv; size_t methodc; const unsigned char *offerdv; size_t offeredc; { size_t i; size_t methodokc; const char *methodokv; /* can select any standard method. */ const char rfc931methodv[] = {AUTHMETHOD_NONE, AUTHMETHOD_UNAME}; /* * can select any standard method, some people want to use pam * without user/password. */ const char pammethodv[] = {AUTHMETHOD_UNAME, AUTHMETHOD_NONE}; for (i = 0; i < methodc; ++i) { if (methodv[i] > AUTHMETHOD_NOACCEPT) { /* non-socks method */ int intmethodv[MAXMETHOD]; size_t ii; CM2IM(offerdv, offeredc, intmethodv); /* find the correct array to use for trying to find a ok method. */ switch (methodv[i]) { case AUTHMETHOD_RFC931: methodokc = ELEMENTS(rfc931methodv); methodokv = rfc931methodv; break; case AUTHMETHOD_PAM: methodokc = ELEMENTS(pammethodv); methodokv = pammethodv; break; default: SERRX(methodv[i]); } for (ii = 0; ii < methodokc; ++ii) if (methodisset(methodokv[ii], intmethodv, offeredc)) return methodokv[ii]; continue; } if (memchr(offerdv, (unsigned char)methodv[i], offeredc) != NULL) return methodv[i]; } return AUTHMETHOD_NOACCEPT; } void setsockoptions(s) int s; { const char *function = "setsockoptions()"; socklen_t len; int type, val, bufsize; len = sizeof(type); if (getsockopt(s, SOL_SOCKET, SO_TYPE, &type, &len) != 0) { swarn("%s: getsockopt(SO_TYPE)", function); return; } switch (type) { case SOCK_STREAM: bufsize = SOCKD_BUFSIZETCP; val = 1; if (setsockopt(s, SOL_SOCKET, SO_OOBINLINE, &val, sizeof(val)) != 0) swarn("%s: setsockopt(SO_OOBINLINE)", function); if (sockscf.option.keepalive) { val = 1; if (setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val)) != 0) swarn("%s: setsockopt(SO_KEEPALIVE)", function); } break; case SOCK_DGRAM: bufsize = SOCKD_BUFSIZEUDP; val = 1; if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, &val, sizeof(val)) != 0) if (errno != ENOPROTOOPT) swarn("%s: setsockopt(SO_BROADCAST)", function); break; default: SERRX(type); } val = bufsize; if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &val, sizeof(val)) != 0 || setsockopt(s, SOL_SOCKET, SO_RCVBUF, &val, sizeof(val)) != 0) swarn("%s: setsockopt(SO_SNDBUF/SO_RCVBUF)", function); #if HAVE_LIBWRAP if ((val = fcntl(s, F_GETFD, 0)) == -1 || fcntl(s, F_SETFD, val | FD_CLOEXEC) == -1) swarn("%s: fcntl(F_GETFD/F_SETFD)", function); #endif } void sockdexit(sig) int sig; { const char *function = "sockdexit()"; size_t i; int mainmother; static int init; slog(LOG_DEBUG, function); /* * we are terminating, don't want to receive SIGTERM while terminating, * otherwise we might end up doing the same operation twice. */ if (signal(SIGTERM, SIG_IGN) == SIG_ERR) swarn("%s: signal(SIGCHLD, SIG_IGN)", function); if ((mainmother = pidismother(sockscf.state.pid)) == 1) { if (sig > 0) slog(LOG_ALERT, "%s: terminating on signal %d", function, sig); else slog(LOG_ALERT, "%s: terminating", function); /* don't want this while cleaning up, which is all that's left. */ if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) swarn("%s: signal(SIGCHLD, SIG_IGN)", function); } #if HAVE_PROFILING if (chdir(SOCKS_PROFILEDIR) != 0) swarn("%s: chdir(%s)", function, SOCKS_PROFILEDIR); else { char dir[80]; snprintfn(dir, sizeof(dir), "%s.%d", childtype2string(sockscf.state.type), getpid()); if (mkdir(dir, S_IRWXU) != 0) swarn("%s: mkdir(%s)", function, dir); else if (chdir(dir) != 0) swarn("%s: chdir(%s)", function, dir); } #endif /* HAVE_PROFILING */ for (i = 0; i < sockscf.log.fpc; ++i) { fflush(sockscf.log.fpv[i]); close(fileno(sockscf.log.fpv[i])); close(sockscf.log.fplockv[i]); } if (sig > 0) switch (sig) { /* ok signals. */ case SIGINT: case SIGQUIT: case SIGTERM: break; /* bad signals. */ default: abort(); } if (mainmother) exit(sig > 0 ? EXIT_FAILURE : -sig); else #if HAVE_PROFILING exit(sig > 0 ? EXIT_FAILURE : -sig); #else _exit(sig > 0 ? EXIT_FAILURE : -sig); #endif /* HAVE_PROFILING */ } void socks_seteuid(old, new) uid_t *old; uid_t new; { const char *function = "socks_seteuid()"; uid_t oldmem; struct passwd *pw; if (old == NULL) old = &oldmem; *old = geteuid(); slog(LOG_DEBUG, "%s: old: %lu, new: %lu", function, (unsigned long)*old, (unsigned long)new); if (*old == new) return; if (*old != sockscf.state.euid) /* need to revert back to original (presumably 0) euid before changing. */ if (seteuid(sockscf.state.euid) != 0) { slog(LOG_ERR, "running Linux are we?"); SERR(sockscf.state.euid); } if ((pw = getpwuid(new)) == NULL) serr(EXIT_FAILURE, "%s: getpwuid(%d)", function, new); /* groupid ... */ if (setegid(pw->pw_gid) != 0) serr(EXIT_FAILURE, "%s: setegid(%d)", function, pw->pw_gid); /* ... and uid. */ if (seteuid(new) != 0) serr(EXIT_FAILURE, "%s: seteuid(%d)", function, new); } void socks_reseteuid(current, new) uid_t current; uid_t new; { const char *function = "socks_reseteuid()"; struct passwd *pw; slog(LOG_DEBUG, "%s: current: %lu, new: %lu", function, (unsigned long)current, (unsigned long)new); #if DIAGNOSTIC SASSERTX(current == geteuid()); #endif if (current == new) return; if (new != sockscf.state.euid) /* need to revert back to original (presumably 0) euid before changing. */ if (seteuid(sockscf.state.euid) != 0) SERR(sockscf.state.euid); /* groupid ... */ if ((pw = getpwuid(new)) == NULL) serr(EXIT_FAILURE, "%s: getpwuid(%d)", function, new); if (setegid(pw->pw_gid) != 0) serr(EXIT_FAILURE, "%s: setegid(%d)", function, pw->pw_gid); /* ... and then userid. */ if (seteuid(new) != 0) SERR(new); } int pidismother(pid) pid_t pid; { int i; if (sockscf.state.motherpidv == NULL) return 1; /* so early we haven't even forked yet. */ for (i = 0; i < sockscf.option.serverc; ++i) if (sockscf.state.motherpidv[i] == pid) return i + 1; return 0; } int descriptorisreserved(d) int d; { if (d == sockscf.bwlock || d == sockscf.sessionlock) return 1; /* don't close sockscf/log files. */ if (socks_logmatch((size_t)d, &sockscf.log)) return 1; return 0; } dante-1.1.19.dfsg/sockd/accesscheck.c0000644000175000017500000001344410333437512016013 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: accesscheck.c,v 1.23 2005/10/28 13:33:04 michaels Exp $"; int usermatch(auth, userlist) const struct authmethod_t *auth; const struct linkedname_t *userlist; { /* const char *function = "usermatch()"; */ const char *name; switch (auth->method) { case AUTHMETHOD_UNAME: name = (const char *)auth->mdata.uname.name; break; case AUTHMETHOD_RFC931: name = (const char *)auth->mdata.rfc931.name; break; case AUTHMETHOD_PAM: name = (const char *)auth->mdata.pam.name; break; default: /* * adding non-username based methods to rules requiring usernames * should not be possible. */ SERRX(auth->method); } do if (strcmp(name, userlist->name) == 0) break; while ((userlist = userlist->next) != NULL); if (userlist == NULL) return 0; /* no match. */ return 1; } /* ARGSUSED */ int accesscheck(s, auth, src, dst, emsg, emsgsize) int s; struct authmethod_t *auth; const struct sockaddr *src, *dst; char *emsg; size_t emsgsize; { const char *function = "accesscheck()"; char srcstr[MAXSOCKADDRSTRING], dststr[sizeof(srcstr)]; int match; slog(LOG_DEBUG, "%s: method: %s, %s -> %s ", function, method2string(auth->method), src == NULL ? "" : sockaddr2string(src, srcstr, sizeof(srcstr)), dst == NULL ? "" : sockaddr2string(dst, dststr, sizeof(dststr))); /* * We don't want to re-check the same method. This could * happen in several cases: * - was checked as client-rule, is now checked as socks-rule. * - a different rule with the same method. */ if (methodisset(auth->method, auth->methodv, (size_t)auth->methodc)) return 1; /* already checked, matches. */ if (methodisset(auth->method, auth->badmethodv, (size_t)auth->badmethodc)) return 0; /* already checked, won't match. */ match = 0; switch (auth->method) { case AUTHMETHOD_NONE: match = 1; break; case AUTHMETHOD_UNAME: if (passwordcheck((const char *)auth->mdata.uname.name, (const char *)auth->mdata.uname.password, emsg, emsgsize) == 0) match = 1; break; case AUTHMETHOD_RFC931: if (passwordcheck((const char *)auth->mdata.rfc931.name, NULL, emsg, emsgsize) == 0) match = 1; break; #if HAVE_PAM case AUTHMETHOD_PAM: { #if DIAGNOSTIC const int freec = freedescriptors(sockscf.option.debug ? "start" : NULL); #endif /* DIAGNOSTIC */ if (pam_passwordcheck(s, src, dst, &auth->mdata.pam, emsg, emsgsize) == 0) match = 1; #if DIAGNOSTIC if (freec != freedescriptors(sockscf.option.debug ? "end" : NULL)) serrx(EXIT_FAILURE, "the PAM library/module code on your system seems to be messing " "with our descriptors, can't cope with that. Get the PAM code " "on your system fixed"); #endif /* DIAGNOSTIC */ break; } #endif /* HAVE_PAM */ default: SERRX(auth->method); } switch (auth->method) { /* * Some methods can be called with different values for the * same client, others can not. Mark those who can't as * "tried" so we don't waste time on re-trying them. */ #if HAVE_PAM case AUTHMETHOD_PAM: if (sockscf.state.pamservicename == NULL) /* varies. */ break; /* else; */ /* FALLTHROUGH */ #endif case AUTHMETHOD_NONE: case AUTHMETHOD_UNAME: case AUTHMETHOD_RFC931: if (match) { SASSERTX(auth->methodc + 1 <= sizeof(auth->methodv)); auth->methodv[auth->methodc++] = auth->method; } else { SASSERTX(auth->badmethodc + 1 <= sizeof(auth->badmethodv)); auth->badmethodv[auth->badmethodc++] = auth->method; } /* * We might have wanted to bzero() the password here, but * then we wouldn't be able to use the password if we * at a later point needed to check for access against * a different method. (For instance, PAM on setup, * UNAME on UDP packet. Strange, but in theory possible.) */ break; } return match; } dante-1.1.19.dfsg/sockd/sockd_protocol.c0000655000175000017500000003531010355543300016573 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: sockd_protocol.c,v 1.101 2005/12/31 17:42:45 michaels Exp $"; __BEGIN_DECLS static int recv_v4req __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_v5req __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_methods __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_ver __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_cmd __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_flag __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_sockshost __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_atyp __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_port __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_address __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_domain __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_username __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int methodnegotiate __P((int s, struct request_t *request, struct negotiate_state_t *state)); __END_DECLS int recv_request(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { int rc; if (state->complete) return 1; if (state->rcurrent != NULL) /* not first call on this client. */ rc = state->rcurrent(s, request, state); else { INIT(sizeof(request->version)); CHECK(&request->version, request->auth, NULL); switch (request->version) { case SOCKS_V4: state->rcurrent = recv_v4req; break; case SOCKS_V5: state->rcurrent = recv_v5req; break; default: slog(LOG_DEBUG, "unknown version %d in request", request->version); return -1; } rc = state->rcurrent(s, request, state); } state->complete = rc > 0; /* complete request read? */ return rc; } int recv_sockspacket(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { return recv_ver(s, request, state); } static int recv_v4req (s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { /* * v4 request: * VN CD DSTPORT DSTIP USERID NUL * 1 + 1 + 2 + 4 + ? + 1 * * so minimum length is 9. */ /* CD */ state->rcurrent = recv_cmd; return state->rcurrent(s, request, state); } static int recv_v5req (s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { /* * method negotiation; * client first sends method selection message: * * +----+----------+----------+ * |VER | NMETHODS | METHODS | * +----+----------+----------+ * | 1 | 1 | 1 to 255 | * +----+----------+----------+ */ /* * then the request: * * +----+-----+-------+------+----------+----------+ * |VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT | * +----+-----+-------+------+----------+----------+ * | 1 | 1 | X'00' | 1 | Variable | 2 | * +----+-----+-------+------+----------+----------+ * * 1 1 1 1 ? 2 * * Since the request can contain different address types * we do not know how long the request is before we have * read the address type (ATYP) field. * */ /* NMETHODS */ INIT(sizeof(char)); CHECK(&state->mem[start], request->auth, NULL); /* LINTED conversion from 'int' may lose accuracy */ OCTETIFY(state->mem[start]); state->rcurrent = recv_methods; return state->rcurrent(s, request, state); } static int recv_methods(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { const char *function = "recv_methods()"; const unsigned char methodc = state->mem[state->reqread - 1]; /* NMETHODS */ unsigned char reply[ 1 /* VERSION */ + 1 /* METHOD */ ]; INIT(methodc); CHECK(&state->mem[start], request->auth, NULL); request->auth->method = selectmethod(sockscf.methodv, sockscf.methodc, &state->mem[start], (size_t)methodc); /* send reply: * * +----+--------+ * |VER | METHOD | * +----+--------+ * | 1 | 1 | * +----+--------+ */ slog(LOG_DEBUG, "%s: sending authentication reply: VER: %d METHOD: %d", function, request->version, request->auth->method); reply[AUTH_VERSION] = request->version; reply[AUTH_METHOD] = (unsigned char)request->auth->method; if (writen(s, reply, sizeof(reply), request->auth) != sizeof(reply)) return -1; if (request->auth->method == AUTHMETHOD_NOACCEPT) { snprintf(state->emsg, sizeof(state->emsg), "client offered no acceptable authenticationmethod"); return -1; } state->rcurrent = methodnegotiate; return state->rcurrent(s, request, state); } static int methodnegotiate(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { /* authentication method dependent negotiation */ switch (request->auth->method) { case AUTHMETHOD_NONE: state->rcurrent = recv_sockspacket; break; case AUTHMETHOD_UNAME: state->rcurrent = method_uname; break; default: SERRX(request->auth->method); } return state->rcurrent(s, request, state); } static int recv_ver(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { /* VER */ { INIT(sizeof(request->version)); CHECK(&request->version, request->auth, NULL); switch (request->version) { case SOCKS_V4: case SOCKS_V5: break; default: slog(LOG_DEBUG, "unknown version %d in request", request->version); return -1; } } state->rcurrent = recv_cmd; return state->rcurrent(s, request, state); } static int recv_cmd(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { INIT(sizeof(request->command)); CHECK(&request->command, request->auth, NULL); switch (request->version) { case SOCKS_V4: state->rcurrent = recv_sockshost; break; case SOCKS_V5: state->rcurrent = recv_flag; break; default: SERRX(request->version); } return state->rcurrent(s, request, state); } static int recv_flag(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { INIT(sizeof(request->flag)); CHECK(&request->flag, request->auth, recv_sockshost); SERRX(0); /* NOTREACHED */ } static int recv_sockshost(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { switch (request->version) { case SOCKS_V4: state->rcurrent = recv_port; break; case SOCKS_V5: state->rcurrent = recv_atyp; break; default: SERRX(request->version); } return state->rcurrent(s, request, state); } static int recv_atyp(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { INIT(sizeof(request->host.atype)); CHECK(&request->host.atype, request->auth, recv_address); SERRX(0); /* NOTREACHED */ } static int recv_address(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { switch (request->version) { case SOCKS_V4: { INIT(sizeof(request->host.addr.ipv4)); request->host.atype = SOCKS_ADDR_IPV4; /* only one supported in v4. */ CHECK(&request->host.addr.ipv4, request->auth, recv_username); SERRX(0); /* NOTREACHED */ } case SOCKS_V5: switch(request->host.atype) { case SOCKS_ADDR_IPV4: { INIT(sizeof(request->host.addr.ipv4)); CHECK(&request->host.addr.ipv4, request->auth, recv_port); SERRX(0); /* NOTREACHED */ } case SOCKS_ADDR_IPV6: { INIT(sizeof(request->host.addr.ipv6)); CHECK(&request->host.addr.ipv6, request->auth, recv_port); SERRX(0); /* NOTREACHED */ } case SOCKS_ADDR_DOMAIN: { INIT(sizeof(*request->host.addr.domain)); CHECK(request->host.addr.domain, request->auth, NULL); /* LINTED conversion from 'int' may lose accuracy */ OCTETIFY(*request->host.addr.domain); state->rcurrent = recv_domain; return state->rcurrent(s, request, state); } default: slog(LOG_DEBUG, "unknown address format %d in reply", request->host.atype); return -1; } default: SERRX(request->version); } SERRX(0); /* NOTREACHED */ } static int recv_domain(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { unsigned char alen; /* first byte gives length. */ INIT((unsigned char)*request->host.addr.domain); CHECK(request->host.addr.domain + 1, request->auth, NULL); alen = *request->host.addr.domain; /* convert to C string. */ memmove(request->host.addr.domain, request->host.addr.domain + 1, (size_t)alen); request->host.addr.domain[alen] = NUL; state->rcurrent = recv_port; return state->rcurrent(s, request, state); } static int recv_port(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { INIT(sizeof(request->host.port)); CHECK(&request->host.port, request->auth, NULL); switch (request->version) { case SOCKS_V4: state->rcurrent = recv_address; /* in v4, address after port. */ return state->rcurrent(s, request, state); case SOCKS_V5: return 1; /* all done. */ default: SERRX(request->version); } SERRX(0); /* NOTREACHED */ } static int recv_username(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { const char *function = "recv_username()"; char *username = (char *)&state->mem[sizeof(request->version) + sizeof(request->command) + sizeof(request->host.port) + sizeof(request->host.addr.ipv4)]; /* read until 0. */ do { INIT(MIN(1, MEMLEFT())); if (MEMLEFT() == 0) { char *t; /* * Normally this would indicate an internal error and thus * be caught in CHECK(), but for the v4 case it could be * someone sending a really long username, which is strange * enough to log a warning about, but not an internal error. */ state->mem[state->reqread - 1] = NUL; swarnx("%s: username too long (> %d): \"%s\"", function, strlen(username), strcheck(t = str2vis(username, strlen(username)))); free(t); return -1; } CHECK(&state->mem[start], request->auth, NULL); /* * Since we don't know how long the username is, we can only read one * byte at a time. We don't want CHECK() to set state->rcurrent to * NULL after each successfull read of that one byte, since * recv_request() will then think we are starting from the begining * next time we call it. */ state->rcurrent = recv_username; } while (state->mem[state->reqread - 1] != 0); state->mem[state->reqread - 1] = NUL; /* style. */ slog(LOG_DEBUG, "%s: got socks v4 username: %s", function, username); state->rcurrent = NULL; return 1; /* end of request. */ } int send_response(s, response) int s; const struct response_t *response; { const char *function = "send_response()"; size_t length; unsigned char responsemem[sizeof(*response)]; unsigned char *p = responsemem; switch (response->version) { case SOCKS_V4REPLY_VERSION: /* * socks V4 reply packet: * * VN CD DSTPORT DSTIP * 1 + 1 + 2 + 4 * * Always 8 octets long. */ memcpy(p, &response->version, sizeof(response->version)); p += sizeof(response->version); /* CD (reply) */ memcpy(p, &response->reply, sizeof(response->reply)); p += sizeof(response->reply); break; case SOCKS_V5: /* * socks V5 reply: * * +----+-----+-------+------+----------+----------+ * |VER | REP | FLAG | ATYP | BND.ADDR | BND.PORT | * +----+-----+-------+------+----------+----------+ * | 1 | 1 | 1 | 1 | Variable | 2 | * +----+-----+-------+------+----------+----------+ * 1 1 1 1 2 * * Which gives a fixed size of atleast 6 octets. * The first octet of DST.ADDR when it is SOCKS_ADDR_DOMAINNAME * contains the length. * */ /* VER */ memcpy(p, &response->version, sizeof(response->version)); p += sizeof(response->version); /* REP */ memcpy(p, &response->reply, sizeof(response->reply)); p += sizeof(response->reply); /* FLAG */ memcpy(p, &response->flag, sizeof(response->flag)); p += sizeof(response->flag); break; default: SERRX(response->version); } p = sockshost2mem(&response->host, p, response->version); length = p - responsemem; slog(LOG_DEBUG, "%s: sending response: %s", function, socks_packet2string(response, SOCKS_RESPONSE)); if (writen(s, responsemem, length, response->auth) != (ssize_t)length) { slog(LOG_DEBUG, "%s: writen(): %s", function, strerror(errno)); return -1; } return 0; } dante-1.1.19.dfsg/sockd/sockd_io.c0000644000175000017500000012440310354742710015346 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" #include "config_parse.h" static const char rcsid[] = "$Id: sockd_io.c,v 1.231 2005/12/25 17:18:08 michaels Exp $"; /* * Accept io objects from mother and does io on them. We never * send back ancillary data, only ordinary data, so no need for * locking here even on broken systems (#ifdef HAVE_SENDMSG_DEADLOCK). */ __BEGIN_DECLS static int allocated __P((void)); /* * Returns the number of allocated (active) io's */ static struct sockd_io_t * io_getset __P((fd_set *set)); /* * Goes through our list until it finds a io object where atleast one of the * descriptors is set. * Returns NULL if none found. */ static struct sockd_io_t * io_finddescriptor __P((int d)); /* * Finds the io object where one of the descriptors matches "fd". */ static int io_fillset __P((fd_set *set, int antiflags, const struct timeval *timenow)); /* * Sets all descriptors from our list, in "set". If "antiflags" * is set, io's with any of the flags in "antiflags" set will be excluded. * IO's with state.fin set will also be excluded. * "timenow" is the time now. * Returns the highest descriptor in our list, or -1 if we don't * have any descriptors we want to select() on currently. */ static void io_clearset __P((const struct sockd_io_t *io, fd_set *set)); /* * Clears all filedescriptors in "io" from "set". */ static void doio __P((int mother, struct sockd_io_t *io, fd_set *rset, fd_set *wset, int flags)); /* * Does i/o over the descriptors in "io", in to out and out to in. * "mother" is write connection to mother if we need to send a ack. * "io" is the object to do i/o over, * "flags" is the flags to set on the actual i/o calls * (read()/write(), recvfrom()/sendto()), currently only MSG_OOB. * If any of the calls fails the "io" is deleted. */ static int io_rw __P((struct sockd_io_direction_t *in, struct sockd_io_direction_t *out, int *bad, void *buf, size_t bufsize, int flags)); /* * Transfers data from "in" to "out" using flag "flags". * "inauth" is the authentication used for reading from "in", * "outauth" is the authentication * used when writing to out. * The data transfered uses "buf" as a buffer, which is of size "bufsize". * The function never transfers more than the receive low watermark * of "out". * * Returns: * On success: bytes transfered or 0 for eof. * On failure: -1. "bad" is set to the value of the descriptor that * failure was first detected on. */ static void delete_io __P((int mother, struct sockd_io_t *io, int fd, int status)); /* * deletes the io object "io". "fd" is the descriptor on which "status" * was returned. If "fd" is negative, it's ignored. * If "mother" is >= 0 the deletion of "io" is ACK'ed to her. * "status" can have one of these values and is normally intended to be the * result from a io call (read/write/etc). * IO_ERRORUNKNOWN: unknown error. * IO_TIMEOUT : connection timed out. ("fd" argument is ignored). * IO_ERROR : error using "fd". * IO_CLOSE : socket was closed. * > 0 : short read/write */ static void proctitleupdate __P((void)); /* * Updates the title of this process. */ static struct timeval * io_gettimeout __P((struct timeval *timeout, const struct timeval *timenow)); /* * If there is a timeout on the current clients for how long to exist * without doing i/o, this function fills in "timeout" with the appropriate * timeout. * Returns: * If there is a timeout: pointer to filled in "timeout". * If there is no timeout: NULL. */ static struct sockd_io_t * io_gettimedout __P((const struct timeval *timenow)); /* * Scans all clients for one that has timed out according to sockscf * settings. "timenow" is the time now. * Returns: * If timed out client found: pointer to it. * Else: NULL. */ static void checkmother __P((struct sockd_mother_t *mother, fd_set *readset)); /* * Checks if "mother" is set in "readset" and if so receives * a io from "mother". Closes "mother" if there is an error. */ static void siginfo __P((int sig)); /* * Print information about our current connections. */ /* Solaris sometimes fails to return srcaddress in recvfrom(). */ #define UDPFROMLENCHECK(socket, fromlen) \ do { \ if (fromlen == 0) { \ static int failures; \ \ swarnx("%s: system error: did not get address in recvfrom()", \ function); \ \ if (++failures > 5) { \ swarnx("%s: running Solaris <= 2.5.1 are we? " \ "giving up after %d failures", function, failures); \ delete_io(mother, io, (socket), IO_ERROR); \ failures = 0; \ } \ return; \ } \ } while (lintnoloop_sockd_h) #define BWUPDATE(io, timenow, bwused) \ do { \ if (bwused) { \ io->time = timenow; \ \ if (io->rule.bw != NULL) { \ bw_update(io->rule.bw, bwused, &io->time); \ } \ } \ } while (lintnoloop_sockd_h) /* timersub macro from OpenBSD */ #define timersub_hack(tvp, uvp, vvp) \ do { \ (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ if ((vvp)->tv_usec < 0) { \ (vvp)->tv_sec--; \ (vvp)->tv_usec += 1000000; \ } \ } while (0) __END_DECLS static struct sockd_io_t iov[SOCKD_IOMAX]; /* each child has these io's. */ static int ioc = ELEMENTS(iov); static struct timeval bwoverflow; void run_io(mother) struct sockd_mother_t *mother; { const char *function = "run_io()"; struct sigaction sigact; int p; sigemptyset(&sigact.sa_mask); sigact.sa_flags = SA_RESTART; sigact.sa_handler = siginfo; #if HAVE_SIGNAL_SIGINFO if (sigaction(SIGINFO, &sigact, NULL) != 0) serr(EXIT_FAILURE, "%s: sigaction(SIGINFO)", function); #endif /* HAVE_SIGNAL_SIGINFO */ /* same handler, for systems without SIGINFO. */ if (sigaction(SIGUSR1, &sigact, NULL) != 0) serr(EXIT_FAILURE, "%s: sigaction(SIGUSR1)", function); proctitleupdate(); /* CONSTCOND */ while (1) { int rbits, bits; fd_set rset, wset, xset, newrset, controlset, tmpset; struct sockd_io_t *io; struct timeval timeout, timenow; gettimeofday(&timenow, NULL); /* look for timed-out clients. */ while ((io = io_gettimedout(&timenow)) != NULL) delete_io(mother->ack, io, -1, IO_TIMEOUT); /* starting a new run. */ timerclear(&bwoverflow); io_fillset(&xset, MSG_OOB, &timenow); rbits = io_fillset(&rset, 0, &timenow); if (mother->s != -1) { FD_SET(mother->s, &rset); rbits = MAX(rbits, mother->s); } else /* no mother. Do we have any other descriptors to work with? */ if (rbits == -1) { SASSERTX(allocated() == 0); slog(LOG_DEBUG, "%s: can't find mother and no io's", function); sockdexit(-EXIT_FAILURE); } /* * first find descriptors that are readable; we won't write if * we can't read. Also select for exceptions so we can tell * the i/o function if there's one pending later. */ ++rbits; switch (selectn(rbits, &rset, NULL, &xset, io_gettimeout(&timeout, &timenow))) { case -1: SERR(-1); /* NOTREACHED */ case 0: continue; } checkmother(mother, &rset); /* * This is tricky, but we need to check for write separately to * avoid busylooping. * The problem is that if the descriptor is ready for reading but * the corresponding descriptor to write out on is not ready we will * be busylooping; above select will keep returning descriptors set, * but we will not be able to write (and thus read) them. * We therefore only set in wset the descriptors that have the * corresponding read descriptor readable so that when the * below select() returns, the io objects we get from wset will * be both readable and writable. * * Another problem is that if while we wait for writability, a new * descriptor becomes readable, we thus can't block forever here. * We solve this by in the below select() also checking for * readability, but now only the descriptors that were not found * to be readable in the previous select(). * This means that a positive return from below select does not * necessarily indicate we have i/o to do, but it does mean we * either have it or a new descriptor became readable; in either * case, something has happened. * Reason we do not check for exceptions in this select is that * there is nothing we do about them until the descriptor becomes * readable too, thus any new exceptions will be in newrset before * we have reason to care about them. */ gettimeofday(&timenow, NULL); /* descriptors to check for readability; those not already set. */ bits = io_fillset(&tmpset, 0, &timenow); bits = fdsetop(bits + 1, '^', &rset, &tmpset, &newrset); if (mother->s != -1) { /* mother status may change too. */ FD_SET(mother->s, &newrset); bits = MAX(bits, mother->s); } /* * descriptors to check for writability aswell as * controldescriptors to check for readability. */ FD_ZERO(&wset); FD_ZERO(&controlset); for (p = 0; p < rbits; ++p) { if (!FD_ISSET(p, &rset)) { /* only write after read. */ FD_CLR(p, &xset); /* don't care about xset without rset */ continue; } io = io_finddescriptor(p); SASSERTX(io != NULL); if (io->src.s == p) { /* read from in requires out to be writable. */ FD_SET(io->dst.s, &wset); bits = MAX(bits, io->dst.s); } else if (io->dst.s == p) { /* read from out requires in to be writable. */ FD_SET(io->src.s, &wset); bits = MAX(bits, io->src.s); } else { SASSERTX(io->control.s == p); FD_SET(io->control.s, &controlset); /* also readable without matching writable. */ FD_SET(io->control.s, &newrset); bits = MAX(bits, io->control.s); } } if (bits++ < 0) { SASSERTX(allocated() == 0 && mother->s == mother->ack && mother->s < 0); continue; } switch (selectn(bits, &newrset, &wset, NULL, io_gettimeout(&timeout, &timenow))) { case -1: SERR(-1); /* NOTREACHED */ case 0: continue; } checkmother(mother, &rset); tmpset = controlset; fdsetop(bits, '&', &newrset, &tmpset, &controlset); /* * newrset; descriptors readable, all new apart from controldescriptors. * Don't do anything with them here, loop around and check for * writability first. * * controlset; subset of newrset containing control descriptors * that are readable. * * rset; descriptors readable, not necessarily with a match in wset. * * xset; subset of rset with exceptions pending. * * wset; descriptors writable with a matching in rset/xset, * what we can do i/o over. */ /* * First check all io's which have an exception pending. * Getting a io here does not mean we can do i/o over it * however. */ while ((io = io_getset(&xset)) != NULL) { slog(LOG_DEBUG, "select(): exception set"); doio(mother->ack, io, &xset, &wset, MSG_OOB); io_clearset(io, &xset); io_clearset(io, &wset); /* xset is subset of rset so clear rset too. */ io_clearset(io, &rset); } /* * Get all io's which are writable. They will have a matching * descriptor that is readable. */ while ((io = io_getset(&wset)) != NULL) { doio(mother->ack, io, &rset, &wset, 0); io_clearset(io, &rset); io_clearset(io, &wset); /* xset is subset of rset so clear xset too. */ io_clearset(io, &xset); } /* * Get all io's which have controldescriptors that are readable. */ while ((io = io_getset(&controlset)) != NULL) { fd_set nullset; FD_ZERO(&nullset); doio(mother->ack, io, &controlset, &nullset, 0); io_clearset(io, &controlset); /* controlset is subset of newrset so clear newrset too. */ io_clearset(io, &newrset); } /* possible future optimization: if newrset not empty, use it? */ } } static void delete_io(mother, io, fd, status) int mother; struct sockd_io_t *io; int fd; int status; { const char *function = "delete_io()"; const int errno_s = errno; struct rule_t *rulev[2]; size_t i; SASSERTX(io->allocated); if (io->state.protocol == SOCKS_TCP) { /* udp rules are temporary. */ /* request handled. */ bw_unuse(io->rule.bw); session_unuse(io->rule.ss); } /* log the disconnect if client-rule or socks-rule says so. */ rulev[0] = &io->crule; rulev[1] = &io->rule; for (i = 0; i < ELEMENTS(rulev); ++i) { /* LINTED constant in conditional context */ char in[MAXSOCKADDRSTRING + MAXAUTHINFOLEN]; char out[sizeof(in)]; char logmsg[sizeof(in) + sizeof(out) + 1024]; int p; const struct rule_t *rule = rulev[i]; if (!rule->log.disconnect) continue; if (rule == &io->crule) { /* client-rule */ authinfo(&io->control.auth, in, sizeof(in)); p = strlen(in); /* LINTED pointer casts may be troublesome */ sockaddr2string(&io->control.raddr, &in[p], sizeof(in) - p); authinfo(&io->control.auth, out, sizeof(out)); p = strlen(out); sockaddr2string(&io->control.laddr, &out[p], sizeof(out) - p); } else if (rule == &io->rule) { /* socks rule. */ authinfo(&io->src.auth, in, sizeof(in)); p = strlen(in); /* LINTED pointer casts may be troublesome */ sockaddr2string(&io->src.raddr, &in[p], sizeof(in) - p); authinfo(&io->dst.auth, out, sizeof(out)); p = strlen(out); switch (io->state.command) { case SOCKS_BIND: case SOCKS_BINDREPLY: /* LINTED pointer casts may be troublesome */ sockaddr2string(&io->dst.raddr, &out[p], sizeof(out) - p); break; case SOCKS_CONNECT: /* LINTED pointer casts may be troublesome */ sockshost2string(&io->dst.host, &out[p], sizeof(out) - p); break; case SOCKS_UDPASSOCIATE: snprintfn(&out[p], sizeof(out) - p, "`world'"); break; default: SERRX(io->state.command); } } else SERRX(0); snprintfn(logmsg, sizeof(logmsg), "%s(%d): %s/%s ]: %lu -> %s -> %lu, %lu -> %s -> %lu", rule->verdict == VERDICT_PASS ? VERDICT_PASSs : VERDICT_BLOCKs, rule->number, protocol2string(io->state.protocol), command2string(io->state.command), (unsigned long)io->src.written, in, (unsigned long)io->src.read, (unsigned long)io->dst.written, out, (unsigned long)io->dst.read); errno = errno_s; if (fd < 0) switch (status) { case IO_SRCBLOCK: slog(LOG_INFO, "%s: delayed sourceblock", logmsg); break; case IO_ERROR: swarn("%s: connection error", logmsg); break; case IO_CLOSE: slog(LOG_INFO, "%s: connection closed", logmsg); break; case IO_TIMEOUT: slog(LOG_INFO, "%s: connection i/o expired", logmsg); break; default: slog(LOG_INFO, "%s: short read/write", logmsg); } else if (fd == io->src.s || fd == io->control.s) { switch (status) { case IO_SRCBLOCK: slog(LOG_INFO, "%s: delayed sourceblock", logmsg); break; case IO_ERROR: { struct linger linger; swarn("%s: client error", logmsg); /* send rst to other end. */ linger.l_onoff = 1; linger.l_linger = 0; if (setsockopt(io->dst.s, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger)) != 0) swarn("%s: setsockopt(io->dst, SO_LINGER)", function); break; } case IO_CLOSE: slog(LOG_INFO, "%s: client closed", logmsg); break; case IO_TIMEOUT: slog(LOG_INFO, "%s: client i/o expired", logmsg); break; default: slog(LOG_INFO, "%s: client short read/write", logmsg); } } else if (fd == io->dst.s) { switch (status) { case IO_SRCBLOCK: slog(LOG_INFO, "%s: delayed sourceblock", logmsg); break; case IO_ERROR: { struct linger linger; swarn("%s: remote error", logmsg); /* send rst to other end. */ linger.l_onoff = 1; linger.l_linger = 0; if (setsockopt(io->src.s, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger)) != 0) swarn("%s: setsockopt(io->dst, SO_LINGER)", function); break; } case IO_CLOSE: slog(LOG_INFO, "%s: remote closed", logmsg); break; case IO_TIMEOUT: slog(LOG_INFO, "%s: remote i/o expired", logmsg); break; default: slog(LOG_INFO, "%s: remote short read/write", logmsg); } } else SERRX(fd); } close_iodescriptors(io); io->allocated = 0; if (mother != -1) { const char b = SOCKD_FREESLOT; /* ack io slot free. */ if (writen(mother, &b, sizeof(b), NULL) != sizeof(b)) swarn("%s: writen(): mother", function); } proctitleupdate(); } void close_iodescriptors(io) const struct sockd_io_t *io; { close(io->src.s); close(io->dst.s); switch (io->state.command) { case SOCKS_CONNECT: break; case SOCKS_BIND: case SOCKS_BINDREPLY: if (!io->state.extension.bind) break; /* else: */ /* FALLTHROUGH */ case SOCKS_UDPASSOCIATE: close(io->control.s); break; default: SERRX(io->state.command); } } int recv_io(s, io) int s; struct sockd_io_t *io; { const char *function = "recv_io()"; int i, fdexpect, fdreceived; size_t length = 0; struct iovec iovec[1]; struct msghdr msg; CMSG_AALLOC(cmsg, sizeof(int) * FDPASS_MAX); if (io == NULL) { /* child semantics; find a io ourselves. */ for (i = 0; i < ioc; ++i) if (!iov[i].allocated) { io = &iov[i]; break; } if (io == NULL) { /* * either mother died/closed connection, or there is another error. * Both cases should be rare so try to find out what the problem is. */ char buf; if (recv(s, &buf, sizeof(buf), MSG_PEEK) > 0) SERRX(allocated()); return -1; } } iovec[0].iov_base = io; iovec[0].iov_len = sizeof(*io); length += iovec[0].iov_len; msg.msg_iov = iovec; msg.msg_iovlen = ELEMENTS(iovec); msg.msg_name = NULL; msg.msg_namelen = 0; /* LINTED pointer casts may be troublesome */ CMSG_SETHDR_RECV(msg, cmsg, CMSG_MEMSIZE(cmsg)); if ((i = recvmsg(s, &msg, 0)) != (ssize_t)length) { if (i == 0) slog(LOG_DEBUG, "%s: recvmsg(): mother closed connection", function); else swarn("%s: recvmsg()", function); return -1; } /* figure out how many descriptors we are supposed to be passed. */ switch (io->state.command) { case SOCKS_BIND: case SOCKS_BINDREPLY: if (io->state.extension.bind) fdexpect = 3; /* in, out, control. */ else fdexpect = 2; /* in and out. */ break; case SOCKS_CONNECT: fdexpect = 2; /* in and out */ break; case SOCKS_UDPASSOCIATE: fdexpect = 3; /* in, out, and control */ break; default: SERRX(io->state.command); } /* calculate expected datalen */ #if !HAVE_DEFECT_RECVMSG SASSERT(CMSG_TOTLEN(msg) == CMSG_SPACE(sizeof(int) * fdexpect)); #endif /* * Get descriptors sent us. */ fdreceived = 0; /* LINTED pointer casts may be troublesome */ CMSG_GETOBJECT(io->src.s, cmsg, sizeof(io->src.s) * fdreceived++); /* LINTED pointer casts may be troublesome */ CMSG_GETOBJECT(io->dst.s, cmsg, sizeof(io->dst.s) * fdreceived++); switch (io->state.command) { case SOCKS_BIND: case SOCKS_BINDREPLY: if (io->state.extension.bind) /* LINTED pointer casts may be troublesome */ CMSG_GETOBJECT(io->control.s, cmsg, sizeof(io->control.s) * fdreceived++); else io->control.s = -1; break; case SOCKS_CONNECT: io->control.s = -1; break; case SOCKS_UDPASSOCIATE: /* LINTED pointer casts may be troublesome */ CMSG_GETOBJECT(io->control.s, cmsg, sizeof(io->control.s) * fdreceived++); break; default: SERRX(io->state.command); } gettimeofday(&io->time, NULL); io->allocated = 1; #if HARDCORE_DEBUG printfd(io, "received"); #endif return 0; } static void io_clearset(io, set) const struct sockd_io_t *io; fd_set *set; { FD_CLR(io->src.s, set); FD_CLR(io->dst.s, set); switch (io->state.command) { case SOCKS_CONNECT: break; case SOCKS_BIND: case SOCKS_BINDREPLY: if (!io->state.extension.bind) break; /* else: */ /* FALLTHROUGH */ case SOCKS_UDPASSOCIATE: FD_CLR(io->control.s, set); break; default: SERRX(io->state.command); } } static int allocated(void) { int i, alloc; for (i = 0, alloc = 0; i < ioc; ++i) if (iov[i].allocated) ++alloc; return alloc; } static void doio(mother, io, rset, wset, flags) int mother; struct sockd_io_t *io; fd_set *rset, *wset; int flags; { const char *function = "doio()"; /* CONSTCOND */ char buf[MAX(SOCKD_BUFSIZETCP, SOCKD_BUFSIZEUDP) + sizeof(struct udpheader_t)]; ssize_t r, w; struct timeval timenow; SASSERTX(io->allocated); SASSERTX((FD_ISSET(io->src.s, rset) && FD_ISSET(io->dst.s, wset)) || (FD_ISSET(io->src.s, wset) && FD_ISSET(io->dst.s, rset)) || (flags & MSG_OOB) || (io->control.s != -1 && FD_ISSET(io->control.s, rset))); /* * we are only called when we have i/o to do. * Could probably remove this gettimeofday() call to, but there are * platforms without SO_SNDLOWAT which prevents us. */ gettimeofday(&timenow, NULL); switch (io->state.protocol) { case SOCKS_TCP: { int bad; size_t bufsize, bwused; if (io->rule.bw != NULL) { ssize_t left; if ((left = bw_left(io->rule.bw)) <= 0) { /* * update data (new time) so next bw_left() presumably * has some left. * No harm in calling bw_update() without le 0 check, but * maybe this is smarter (avoids extra lock in gt 0 case). */ bw_update(io->rule.bw, 0, &timenow); left = bw_left(io->rule.bw); } if ((bufsize = MIN(sizeof(buf), (size_t)left)) == 0) break; } else bufsize = sizeof(buf); bwused = 0; /* from in to out ... */ if (FD_ISSET(io->src.s, rset) && FD_ISSET(io->dst.s, wset)) { bad = -1; r = io_rw(&io->src, &io->dst, &bad, buf, bufsize, flags); if (bad != -1) { delete_io(mother, io, bad, r); return; } iolog(&io->rule, &io->state, OPERATION_IO, &io->src.host, &io->src.auth, &io->dst.host, &io->dst.auth, buf, (size_t)r); bwused += r; } /* ... and out to in. */ #if 0 /* * This doesn't work too good since we can end up doing i/o * only in -> out for a long time. Also since we assume one * side is on the lan (where b/w isn't that critical) * and the other side is the net, assume some slack on * one side is ok. Same applies to udp case. * Another option would be to alternate which direction we * do i/o on first each time, but we instead do the simple * thing and just don't subtract bufsize. */ bufsize -= bwused; #endif if (bufsize == 0) { BWUPDATE(io, timenow, bwused); break; } if (FD_ISSET(io->dst.s, rset) && FD_ISSET(io->src.s, wset)) { bad = -1; r = io_rw(&io->dst, &io->src, &bad, buf, bufsize, flags); if (bad != -1) { delete_io(mother, io, bad, r); return; } iolog(&io->rule, &io->state, OPERATION_IO, &io->dst.host, &io->dst.auth, &io->src.host, &io->src.auth, buf, (size_t)r); bwused += r; } BWUPDATE(io, timenow, bwused); break; } case SOCKS_UDP: { struct udpheader_t header; socklen_t fromlen; int permit; /* * UDP is sadly considerably more complex than TCP; * need to check rules on each packet, need to check if it * was received from expected in.host, etc. */ /* * We are less strict about bandwidth in the udp case since we don't * want to truncate packets. */ /* UDP to relay from client to destination? */ if (FD_ISSET(io->src.s, rset) && FD_ISSET(io->dst.s, wset)) { const int lflags = flags & ~MSG_OOB; struct sockaddr from; size_t bwused; fromlen = sizeof(from); if ((r = socks_recvfrom(io->src.s, buf, io->dst.sndlowat, lflags, &from, &fromlen, &io->src.auth)) == -1) { delete_io(mother, io, io->src.s, r); return; } UDPFROMLENCHECK(io->src.s, fromlen); /* * If client hasn't sent us it's address yet we have to * assume the first packet is from it. * Client can only blame itself if not. */ /* LINTED pointer casts may be troublesome */ if (TOIN(&io->src.raddr)->sin_addr.s_addr == htonl(INADDR_ANY) || TOIN(&io->src.raddr)->sin_port == htons(0)) { /* LINTED pointer casts may be troublesome */ if (TOIN(&io->src.raddr)->sin_addr.s_addr == htonl(INADDR_ANY)) /* LINTED pointer casts may be troublesome */ TOIN(&io->src.raddr)->sin_addr.s_addr = TOIN(&from)->sin_addr.s_addr; /* LINTED pointer casts may be troublesome */ if (TOIN(&io->src.raddr)->sin_port == htons(0)) /* LINTED pointer casts may be troublesome */ TOIN(&io->src.raddr)->sin_port = TOIN(&from)->sin_port; sockaddr2sockshost(&io->src.raddr, &io->src.host); } /* * When we receive the first packet we also have a fixed source * so connect the socket, both for better performance and so * that getpeername() will work on it (libwrap in rulespermit()). */ if (io->src.read == 0) { /* could happen more than once, but ok. */ struct connectionstate_t rstate; if (!sockaddrareeq(&io->src.raddr, &from)) { char src[MAXSOCKADDRSTRING], dst[MAXSOCKADDRSTRING]; /* perhaps this should be LOG_DEBUG. */ slog(LOG_INFO, "%s(0): %s: expected from %s, got it from %s", VERDICT_BLOCKs, protocol2string(io->state.protocol), sockaddr2string(&io->src.raddr, src, sizeof(src)), sockaddr2string(&from, dst, sizeof(dst))); break; } if (connect(io->src.s, &from, sizeof(from)) != 0) { delete_io(mother, io, io->src.s, IO_ERROR); return; } rstate = io->state; rstate.command = SOCKS_UDPREPLY; if (!rulespermit(io->src.s, &io->control.raddr, &io->control.laddr, &io->rule, &io->state, &io->src.host, NULL, NULL, 0) && !rulespermit(io->src.s, &io->control.raddr, &io->control.laddr, &io->rule, &rstate, NULL, &io->src.host, NULL, 0)) { /* can't send, can't receive; drop it. */ delete_io(mother, io, io->src.s, IO_SRCBLOCK); return; } } io->src.read += r; /* got packet, pull out socks UDP header. */ if (string2udpheader(buf, (size_t)r, &header) == NULL) { char badfrom[MAXSOCKADDRSTRING]; /* LINTED pointer casts may be troublesome */ swarnx("%s: bad socks udppacket (length = %d) from %s", function, r, sockaddr2string(&io->src.raddr, badfrom, sizeof(badfrom))); break; } if (header.frag != 0) { char badfrom[MAXSOCKADDRSTRING]; /* LINTED pointer casts may be troublesome */ swarnx("%s: %s: fragmented packet from %s. Not supported", function, protocol2string(io->state.protocol), sockaddr2string(&io->src.raddr, badfrom, sizeof(badfrom))); break; } io->dst.host = header.host; if (sockscf.bwlock != -1) socks_lock(sockscf.bwlock, F_WRLCK, -1); /* is the packet to be permitted out? */ permit = rulespermit(io->src.s, &io->control.raddr, &io->control.laddr, &io->rule, &io->state, &io->src.host, &io->dst.host, NULL, 0); if (io->rule.bw != NULL) bw_use(io->rule.bw); if (sockscf.bwlock != -1) socks_unlock(sockscf.bwlock); /* set r to bytes sent by client sans socks UDP header. */ r -= PACKETSIZE_UDP(&header); iolog(&io->rule, &io->state, OPERATION_IO, &io->src.host, &io->src.auth, &io->dst.host, &io->dst.auth, &buf[PACKETSIZE_UDP(&header)], (size_t)r); if (!permit) { bw_unuse(io->rule.bw); break; } if (redirect(io->dst.s, &io->dst.laddr, &io->dst.host, io->state.command, &io->rule.rdr_from, &io->rule.rdr_to) != 0) { swarn("%s: redirect()", function); bw_unuse(io->rule.bw); break; } /* LINTED pointer casts may be troublesome */ sockshost2sockaddr(&io->dst.host, &io->dst.raddr); /* LINTED pointer casts may be troublesome */ if ((w = socks_sendto(io->dst.s, &buf[PACKETSIZE_UDP(&header)], (size_t)r, lflags, &io->dst.raddr, sizeof(io->dst.raddr), &io->dst.auth)) != r) iolog(&io->rule, &io->state, OPERATION_ERROR, &io->src.host, &io->src.auth, &io->dst.host, &io->dst.auth, NULL, 0); io->dst.written += MAX(0, w); bwused = MAX(0, w); BWUPDATE(io, timenow, bwused); /* for the lack of anything better, see bw_update(). */ bw_unuse(io->rule.bw); } /* * Datagram reply from remote present? * We first peek at it so we can find out what address it's from, * then we check rules and then we read the packet out of the buffer. * Reason why we first peek is that if the rule calls libwrap, * libwrap would hang since we'd already read the packet and it * wants to peek itself. * We only peek enough to get the source but this still involves * an extra systemcall. Can we find a better/faster way to do it? */ #if 0 /* see comment for tcp case. */ if (bwused >= io->rule.bw->maxbps) break; #endif if (FD_ISSET(io->dst.s, rset) && FD_ISSET(io->src.s, wset)) { const int lflags = flags & ~MSG_OOB; struct connectionstate_t state; struct sockaddr rfrom; struct sockshost_t rfromhost, replyto; char *newbuf; size_t bwused; int s = io->src.s; /* MSG_PEEK because of libwrap, see above. */ fromlen = sizeof(rfrom); if ((r = socks_recvfrom(io->dst.s, buf, 1, lflags | MSG_PEEK, &rfrom, &fromlen, &io->dst.auth)) == -1) { delete_io(mother, io, io->dst.s, r); return; } UDPFROMLENCHECK(io->dst.s, fromlen); /* * We can get some problems here in the case that * the client sends a hostname for destination. * If it does it probably means it can't resolve and if * we then send it a IP address as source, the client * wont be able to match our source as it's destination, * even if they are the same. * We check for this case specifically, though we only catch * the last case, which may not always be good enough. * We could expand the below check, using addressmatch() * instead, but that need not always be right. * Better safe than sorry for now. */ /* LINTED possible pointer alignment problem */ if (io->dst.host.atype == SOCKS_ADDR_DOMAIN && sockaddrareeq(&io->dst.raddr, &rfrom)) rfromhost = io->dst.host; else sockaddr2sockshost(&rfrom, &rfromhost); /* only set temporary here for one replypacket at a time. */ state = io->state; state.command = SOCKS_UDPREPLY; permit = rulespermit(io->dst.s, &io->control.raddr, &io->control.laddr, &io->rule, &state, &rfromhost, &io->src.host, NULL, 0); if (io->rule.bw != NULL) bw_use(io->rule.bw); io->dst.auth = io->state.auth; /* read the peeked packet out of the buffer. */ fromlen = sizeof(rfrom); if ((r = socks_recvfrom(io->dst.s, buf, io->src.sndlowat, lflags, &rfrom, &fromlen, &io->dst.auth)) == -1) { bw_unuse(io->rule.bw); delete_io(mother, io, io->dst.s, r); return; } io->dst.read += r; bwused = r; iolog(&io->rule, &state, OPERATION_IO, &rfromhost, &io->dst.auth, &io->src.host, &io->src.auth, buf, (size_t)r); if (!permit) { bw_unuse(io->rule.bw); break; } replyto = io->src.host; if (redirect(io->src.s, &rfrom, &replyto, state.command, &io->rule.rdr_from, &io->rule.rdr_to) != 0) { swarn("%s: redirect()", function); bw_unuse(io->rule.bw); break; } if (!sockshostareeq(&replyto, &io->src.host)) { /* need to redirect reply. */ if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { swarn("%s: socket()", function); bw_unuse(io->rule.bw); break; } if (socks_connect(s, &replyto) != 0) { swarn("%s: socks_connect()", function); bw_unuse(io->rule.bw); break; } } /* in case redirect() changed it . */ sockaddr2sockshost(&rfrom, &rfromhost); /* add socks UDP header. */ /* LINTED pointer casts may be troublesome */ newbuf = udpheader_add(&rfromhost, buf, (size_t *)&r, sizeof(buf)); SASSERTX(newbuf == buf); /* * XXX socket must be connected but that should always be the * case for now since binding UDP addresses is not supported. */ if ((w = socks_sendto(s, newbuf, (size_t)r, lflags, NULL, 0, &io->src.auth)) != r) iolog(&io->rule, &state, OPERATION_ERROR, &rfromhost, &io->dst.auth, &io->src.host, &io->src.auth, NULL, 0); io->src.written += MAX(0, w); if (s != io->src.s) /* socket temporarily created for redirect. */ close(s); BWUPDATE(io, timenow, bwused); /* for the lack of anything better, see bw_update(). */ bw_unuse(io->rule.bw); } break; } default: SERRX(io->state.protocol); } /* * Only thing we expect from client's control connection is a eof. * For commands that do not have a controlconnection, we * set descriptor to -1 when receiving others. */ if (io->control.s != -1 && FD_ISSET(io->control.s, rset)) { if ((r = read(io->control.s, buf, sizeof(buf))) <= 0) delete_io(mother, io, io->control.s, r); else { char *unexpected, hmmread[MAXSOCKADDRSTRING]; slog(LOG_NOTICE, "%s/control: %d unexpected bytes: %s", /* LINTED pointer casts may be troublesome */ sockaddr2string(&io->control.raddr, hmmread, sizeof(hmmread)), r, strcheck(unexpected = str2vis(buf, r))); free(unexpected); } } } static int io_rw(in, out, bad, buf, bufsize, flag) struct sockd_io_direction_t *in; struct sockd_io_direction_t *out; int *bad; void *buf; size_t bufsize; int flag; { const char *function = "io_rw()"; ssize_t r, w; size_t len; if (flag & MSG_OOB) if (sockatmark(in->s) != 1) flag &= ~MSG_OOB; /* we receive oob inline. */ len = MIN(bufsize, flag & MSG_OOB ? 1 : out->sndlowat); /* read data from in ... */ if ((r = socks_recvfrom(in->s, buf, len, flag & ~MSG_OOB, NULL, NULL, &in->auth)) <= 0) { if (r == 0) { /* * FIN from "in". It won't send us any more data, so * we shutdown "out" for writting to let it know. * When "out" has nothing more to send, it will * send an FIN too, and we will shutdown "in" for writting. * At that point, both "in" and "out" has sent an FIN, * meaning, none of them will send us any more data. * Only then can we close the socket. Since we may * clear state.fin however, state.shutdown should be used * for testing here. */ in->state.fin = 1; if (in->state.shutdown_wr) /* means we have received FIN from out. */ *bad = out->s; /* done with this socket, "out" closed first. */ if (!out->state.shutdown_wr) /* use shutdown() to forward FIN. */ if (shutdown(out->s, SHUT_WR) != 0) /* but continue reading. */ swarn("%s: shutdown()", function); else out->state.shutdown_wr = 1; } else *bad = in->s; return r; } in->read += r; slog(LOG_DEBUG, "%s: bufsize = %ld, r = %ld", function, (long)bufsize, (long)r); if (flag & MSG_OOB) in->flags |= MSG_OOB; /* read oob data. */ else in->flags &= ~MSG_OOB; /* did not read oob data. */ /* ... and send the data read to out. */ if ((w = socks_sendto(out->s, buf, (size_t)r, flag, NULL, 0, &out->auth)) != r) { *bad = out->s; return w; } out->written += w; /* * we want to select for read again on socket we sent data out on, * regardless of whether we have received a FIN from it, to get * write errors. * XXX * Unfortunatly, there's no way to make select() not keep * returning ready-for-read once the client has sent the FIN, * and we do not want to busy-loop around this. What we would want * to, is to only select for error on the socket after we receive * a FIN. * Best we can do is to let io_fillset() skip sockets that * have state.fin set, and reset state.fin if we send data on on the * socket, hoping to catch any pending errors on second go round. * This means some sessions can occupy space for a long time, until * tcp keep-alive check kicks in. */ out->state.fin = 0; return w; } static void proctitleupdate(void) { setproctitle("iorelayer: %d/%d", allocated(), SOCKD_IOMAX); } static struct sockd_io_t * io_getset(set) fd_set *set; { int i; struct sockd_io_t *best, *evaluating; for (i = 0, best = evaluating = NULL; i < ioc; ++i) if (iov[i].allocated) { if (FD_ISSET(iov[i].src.s, set)) evaluating = &iov[i]; if (FD_ISSET(iov[i].dst.s, set)) evaluating = &iov[i]; switch (iov[i].state.command) { case SOCKS_BIND: case SOCKS_BINDREPLY: if (!iov[i].state.extension.bind) break; /* else: */ /* FALLTHROUGH */ case SOCKS_UDPASSOCIATE: if (FD_ISSET(iov[i].control.s, set)) evaluating = &iov[i]; break; default: break; } /* select the i/o that has least recently done i/o. */ if (best == NULL || timercmp(&evaluating->time, &best->time, <)) best = evaluating; } return best; } static struct sockd_io_t * io_finddescriptor(d) int d; { int i; for (i = 0; i < ioc; ++i) if (iov[i].allocated) { if (d == iov[i].src.s || d == iov[i].dst.s) return &iov[i]; switch (iov[i].state.command) { case SOCKS_BIND: case SOCKS_BINDREPLY: if (!iov[i].state.extension.bind) break; /* else: */ /* FALLTHROUGH */ case SOCKS_UDPASSOCIATE: if (d == iov[i].control.s) return &iov[i]; break; default: break; } } return NULL; } static int io_fillset(set, antiflags, timenow) fd_set *set; int antiflags; const struct timeval *timenow; { const char *function = "io_fillset()"; int i, max; FD_ZERO(set); for (i = 0, max = -1; i < ioc; ++i) { struct sockd_io_t *io = &iov[i]; if (io->allocated) { if (io->rule.bw != NULL) { struct timeval new_bwoverflow; if (bw_isoverflow(io->rule.bw, timenow, &new_bwoverflow) != NULL) { if (!timerisset(&bwoverflow) || timercmp(&new_bwoverflow, &bwoverflow, <)) bwoverflow = new_bwoverflow; /* * XXX this also means we won't catch errors on this * client for the duration. Hopefully not a problem. */ continue; } } if (!io->src.state.fin && !(antiflags & io->src.flags)) { FD_SET(io->src.s, set); max = MAX(max, io->src.s); } if (!io->dst.state.fin && !(antiflags & io->dst.flags)) { FD_SET(io->dst.s, set); max = MAX(max, io->dst.s); } switch (io->state.command) { case SOCKS_BIND: case SOCKS_BINDREPLY: if (!io->state.extension.bind) break; /* else: */ /* FALLTHROUGH */ case SOCKS_UDPASSOCIATE: if (! (antiflags & io->control.flags)) { FD_SET(io->control.s, set); max = MAX(max, io->control.s); } break; default: break; } } } return max; } static struct timeval * io_gettimeout(timeout, timenow) struct timeval *timeout; const struct timeval *timenow; { /* const char *function = "io_gettimeout()"; */ int i; if (allocated() == 0) return NULL; if (sockscf.timeout.io == 0 && !timerisset(&bwoverflow)) return NULL; timeout->tv_sec = sockscf.timeout.io; timeout->tv_usec = 0; if (timerisset(timeout)) /* iotimeout set. */ for (i = 0; i < ioc; ++i) if (!iov[i].allocated) continue; else timeout->tv_sec = MAX(0, MIN(timeout->tv_sec, difftime(sockscf.timeout.io, (time_t)difftime((time_t)timenow->tv_sec, (time_t)iov[i].time.tv_sec)))); if (timerisset(&bwoverflow)) { struct timeval timetobw; if (timercmp(timenow, &bwoverflow, >)) /* waited long enough. */ timerclear(&timetobw); else /* CONSTCOND */ /* macro operation. */ /* still have some to wait. */ timersub_hack(&bwoverflow, timenow, &timetobw); if (!timerisset(timeout) || timercmp(&timetobw, timeout, <)) { *timeout = timetobw; } } #if 0 slog(LOG_DEBUG, "%s: timeout = %d.%d", function, timeout->tv_sec, timeout->tv_usec); #endif return timeout; } static struct sockd_io_t * io_gettimedout(timenow) const struct timeval *timenow; { int i; if (sockscf.timeout.io == 0) return NULL; for (i = 0; i < ioc; ++i) if (!iov[i].allocated) continue; else if (difftime((time_t)timenow->tv_sec, (time_t)iov[i].time.tv_sec) >= sockscf.timeout.io) return &iov[i]; return NULL; } static void checkmother(mother, readset) struct sockd_mother_t *mother; fd_set *readset; { if (mother->s != -1 && FD_ISSET(mother->s, readset)) { FD_CLR(mother->s, readset); if (recv_io(mother->s, NULL) != 0) { close(mother->s); close(mother->ack); mother->s = mother->ack = -1; } else proctitleupdate(); } } /* ARGSUSED */ static void siginfo(sig) int sig; { int i; time_t timenow; time(&timenow); for (i = 0; i < ioc; ++i) if (!iov[i].allocated) continue; else { char srcstring[MAXSOCKSHOSTSTRING]; char dststring[MAXSOCKSHOSTSTRING]; slog(LOG_INFO, "%s <-> %s: idle %.0fs", sockshost2string(&iov[i].src.host, srcstring, sizeof(srcstring)), sockshost2string(&iov[i].dst.host, dststring, sizeof(dststring)), difftime(timenow, (time_t)iov[i].time.tv_sec)); } } dante-1.1.19.dfsg/sockd/session_key.c0000644000175000017500000000054410333442056016103 0ustar roamroam/* * $Id: session_key.c,v 1.1 2005/11/06 17:58:06 michaels Exp $ * * Copyright (c) 2005 * Inferno Nettverk A/S, Norway. All rights reserved. */ #include "common.h" static const char rcsid[] = "$Id: session_key.c,v 1.1 2005/11/06 17:58:06 michaels Exp $"; const char *module_session_ipaddrv[] = { NULL }; const int module_session_ipaddrc = 0; dante-1.1.19.dfsg/sockd/method_uname.c0000655000175000017500000002035610333437512016223 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: method_uname.c,v 1.51 2005/10/28 13:33:42 michaels Exp $"; __BEGIN_DECLS static int recv_unamever __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_ulen __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_uname __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_plen __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int recv_passwd __P((int s, struct request_t *request, struct negotiate_state_t *state)); static int passworddbisunique __P((void)); /* * If it's possible for us to fail username/password authentication * on one rule, and succeed at another, returns false. * Otherwise returns the unique authmethod that would be used. */ __END_DECLS static int passworddbisunique(void) { if (methodisset(AUTHMETHOD_UNAME, sockscf.methodv, sockscf.methodc)) if (!methodisset(AUTHMETHOD_PAM, sockscf.methodv, sockscf.methodc)) return AUTHMETHOD_UNAME; else return 0; #if HAVE_PAM if (methodisset(AUTHMETHOD_PAM, sockscf.methodv, sockscf.methodc)) if (!methodisset(AUTHMETHOD_UNAME, sockscf.methodv, sockscf.methodc) && sockscf.state.pamservicename != NULL) return AUTHMETHOD_PAM; else return 0; #endif /* no passworddb-based methods set. Return true. */ return -1; } int method_uname(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { state->rcurrent = recv_unamever; return state->rcurrent(s, request, state); } static int recv_unamever(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { INIT(sizeof(request->auth->mdata.uname.version)); CHECK(&request->auth->mdata.uname.version, request->auth, NULL); switch (request->auth->mdata.uname.version) { case SOCKS_UNAMEVERSION: break; default: slog(LOG_DEBUG, "unknown version on uname packet from client: %d", request->auth->mdata.uname.version); return -1; } state->rcurrent = recv_ulen; return state->rcurrent(s, request, state); } static int recv_ulen(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { INIT(sizeof(*request->auth->mdata.uname.name)); CHECK(request->auth->mdata.uname.name, request->auth, NULL); /* LINTED conversion from 'int' may lose accuracy */ OCTETIFY(*request->auth->mdata.uname.name); state->rcurrent = recv_uname; return state->rcurrent(s, request, state); } static int recv_uname(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { const size_t ulen = (size_t)*request->auth->mdata.uname.name; INIT(ulen); CHECK(request->auth->mdata.uname.name + 1, request->auth, NULL); /* convert to string. */ memcpy(request->auth->mdata.uname.name, request->auth->mdata.uname.name + 1, ulen); request->auth->mdata.uname.name[ulen] = NUL; state->rcurrent = recv_plen; return state->rcurrent(s, request, state); } static int recv_plen(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { INIT(sizeof(*request->auth->mdata.uname.password)); CHECK(request->auth->mdata.uname.password, request->auth, NULL); /* LINTED conversion from 'int' may lose accuracy */ OCTETIFY(*request->auth->mdata.uname.password); state->rcurrent = recv_passwd; return state->rcurrent(s, request, state); } static int recv_passwd(s, request, state) int s; struct request_t *request; struct negotiate_state_t *state; { /* const char *function = "recv_passwd()"; */ const size_t plen = (size_t)*request->auth->mdata.uname.password; unsigned char response[1 /* version. */ + 1 /* status. */ ]; INIT(plen); CHECK(request->auth->mdata.uname.password + 1, request->auth, NULL); /* convert to string. */ memcpy(request->auth->mdata.uname.password, request->auth->mdata.uname.password + 1, plen); request->auth->mdata.uname.password[plen] = NUL; /* * Very sadly we can't do checking of the username/password here * since we don't know what authentication to use yet. It could * be username, but it could also be PAM, or some future method. * It depends on what the socks request is. We therfor would have * liked to give the client success status back no matter what * the username/password is, and later deny the connection if need be. * * This however creates problems with clients that, naturally, cache * the wrong username/password if they get success. * We therfor check if we have a unique passworddb to use, and if so, * check it here so we can return an immediate error to client. * If the database is not unique, we go with returning an * unconditional success at this point, and deny it later if need be. */ response[UNAME_VERSION] = request->auth->mdata.uname.version; switch (passworddbisunique()) { case 0: /* Return ok, check correct db later. . */ response[UNAME_STATUS] = (unsigned char)0; break; #if HAVE_PAM case AUTHMETHOD_PAM: { /* it's a union, make a copy first. */ const struct authmethod_uname_t uname = request->auth->mdata.uname; request->auth->method = AUTHMETHOD_PAM; /* move from uname object into pam object. */ strcpy((char *)request->auth->mdata.pam.name, (const char *)uname.name); strcpy((char *)request->auth->mdata.pam.password, (const char *)uname.password); SASSERTX(strlen(sockscf.state.pamservicename) < sizeof(request->auth->mdata.pam.servicename)); strcpy(request->auth->mdata.pam.servicename, sockscf.state.pamservicename); /* FALLTHROUGH */ } #endif case AUTHMETHOD_UNAME: { struct sockaddr src, dst; sockshost2sockaddr(&state->src, &src); sockshost2sockaddr(&state->src, &dst); if (accesscheck(s, request->auth, &src, &dst, state->emsg, sizeof(state->emsg))) response[UNAME_STATUS] = (unsigned char)0; /* OK. */ else response[UNAME_STATUS] = (unsigned char)1; /* Not OK. */ break; } default: SERRX(passworddbisunique); } if (writen(s, response, sizeof(response), request->auth) != sizeof(response)) return -1; if (response[UNAME_STATUS] == 0) { /* 0 is success */ state->rcurrent = recv_sockspacket; return state->rcurrent(s, request, state); } /* else; failed authentication. */ errno = 0; return -1; } dante-1.1.19.dfsg/sockd/sockd_socket.c0000644000175000017500000000653107700305355016231 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: sockd_socket.c,v 1.36 2003/07/01 13:21:49 michaels Exp $"; int sockd_bind(s, addr, retries) int s; struct sockaddr *addr; size_t retries; { /* const char *function = "sockd_bind()"; */ size_t tries; int p; errno = 0; tries = 0; do { if (tries++ > 0) sleep(tries - 1); /* LINTED pointer casts may be troublesome */ if (PORTISRESERVED(TOIN(addr)->sin_port) && sockscf.compat.sameport) { uid_t euid; socks_seteuid(&euid, sockscf.uid.privileged); /* LINTED pointer casts may be troublesome */ if ((p = bind(s, addr, sizeof(*addr))) == -1 && errno == EADDRINUSE) { #if HAVE_BINDRESVPORT /* * There are some differences in whether bindresvport() * retries or not on different systems, and Linux * ignores the portnumber altogether, so we have to * do two calls. */ TOIN(addr)->sin_port = htons(0); p = bindresvport(s, TOIN(addr)); #endif /* HAVE_BINDRESVPORT */ } socks_reseteuid(sockscf.uid.privileged, euid); } else if ((p = bind(s, addr, sizeof(*addr))) == 0) { socklen_t addrlen; addrlen = sizeof(*addr); p = getsockname(s, addr, &addrlen); } if (p == 0) break; else { /* non-fatal error? */ switch (errno) { case EADDRINUSE: continue; case EINTR: continue; } break; /* fatal error. */ } } while (tries <= retries); return p; } dante-1.1.19.dfsg/sockd/checkmodule.c0000644000175000017500000000462307700305361016036 0ustar roamroam/* * $Id: checkmodule.c,v 1.6 2003/07/01 13:21:53 michaels Exp $ * * Copyright (c) 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: checkmodule.c,v 1.6 2003/07/01 13:21:53 michaels Exp $"; void checkmodule(name) const char *name; { const char *function = "checkmodule()"; const char **ipv = NULL; int ipc = 0; int i; slog(LOG_INFO, "%s: checking license for module '%s'", function, name); serrx(EXIT_FAILURE, "%s: license error: module '%s' not installed", function, name); } dante-1.1.19.dfsg/README0000644000175000017500000000030006722230606013152 0ustar roamroam# $Id: README,v 1.6 1999/05/24 11:01:26 michaels Exp $ Dante - a socks client and server implementation for UNIX. Feedback can be sent to dante-misc@inet.no. Bugs to dante-bugs@inet.no. dante-1.1.19.dfsg/ltmain.sh0000644000175000017500000054663010173653536014145 0ustar roamroam# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.10 TIMESTAMP=" (1.1220.2.130 2004/09/19 12:13:49)" # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" ##################################### # Shell function definitions: # This seems to be the best place for them # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` if test "X$win32_nmres" = "Ximport" ; then win32_libid_type="x86 archive import" else win32_libid_type="x86 archive static" fi fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xdir="$my_gentop/$my_xlib" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" status=$? if test "$status" -ne 0 && test ! -d "$my_xdir"; then exit $status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename $darwin_archive` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" # Remove the table of contents from the thin files. $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" $AR -xo "${darwin_base_archive}" rm "${darwin_base_archive}" cd "$darwin_curdir" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist rm -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir (cd $my_xdir && $AR x $my_xabs) || exit $? fi # $darwin_arches fi # $run ;; *) # We will extract separately just the conflicting names and we will # no longer touch any unique names. It is faster to leave these # extract automatically by $AR in one run. $show "(cd $my_xdir && $AR x $my_xabs)" $run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $? if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$my_xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2003 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $EXIT_SUCCESS ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $EXIT_SUCCESS ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $EXIT_SUCCESS ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case "$arg_mode" in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo $srcfile > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; #Dante hack - start -all-dynamic) if test "$build_libtool_libs" = no; then $echo "$modename: warning: unable to build only dynamic libraries in this configuration" 1>&2 fi build_old_libs=no prefer_static_libs=no #XXX add code to ensure symbolic link without version number library_names_spec="${library_names_spec} \${libname}\${shared_ext}" continue ;; #Dante hack - end -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit $EXIT_FAILURE fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # gcc -m* arguments should be passed to the linker via $compiler_flags # in order to pass architecture information to the linker # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo # but this is not reliable with gcc because gcc may use -mfoo to # select a different linker, different libraries, etc, while # -Wl,-mfoo simply passes -mfoo to the linker. -m*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" if test "$with_gcc" = "yes" ; then compiler_flags="$compiler_flags $arg" fi continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test "$status" -ne 0 && test ! -d "$output_objdir"; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5* ) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$deplibs $path" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. for path in $notinst_path; do lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$save_output-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$save_output-${k}.$objext k=`expr $k + 1` output=$output_objdir/$save_output-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadale object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) cwrappersource=`$echo ${objdir}/lt-${output}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR #define DIR_SEPARATOR '/' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) #define HAVE_DOS_BASED_FILE_SYSTEM #ifndef DIR_SEPARATOR_2 #define DIR_SEPARATOR_2 '\\' #endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); char * basename (const char *name); char * fnqualify(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup ((char *) basename (argv[0])); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = fnqualify(argv[0]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } char * basename (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha (name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return (char *) base; } char * fnqualify(const char *path) { size_t size; char *p; char tmp[LT_PATHMAX + 1]; assert(path != NULL); /* Is it qualified already? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha (path[0]) && path[1] == ':') return xstrdup (path); #endif if (IS_DIR_SEPARATOR (path[0])) return xstrdup (path); /* prepend the current directory */ /* doesn't handle '~' */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ p = XMALLOC(char, size); sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); return p; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # GNU ar 2.10+ was changed to match POSIX; thus no paths are # encoded into archives. This makes 'ar r' malfunction in # this piecewise linking case whenever conflicting object # names appear in distinct ar calls; check, warn and compensate. if (for obj in $save_oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 AR_FLAGS=cq fi # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg="$nonopt" fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest="$arg" continue fi case $arg in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest="$arg" continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" save_umask=`umask` umask 0077 if $mkdir "$tmpdir"; then umask $save_umask else umask $save_umask $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyways case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "----------------------------------------------------------------------" $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "----------------------------------------------------------------------" exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $EXIT_SUCCESS # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: dante-1.1.19.dfsg/configure0000744000175000017500000406723210362704131014216 0ustar roamroam#! /bin/sh # From configure.ac Id: configure.ac. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="include/common.h" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subdirs_all="$ac_subdirs_all gui" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PRERELEASE_TRUE PRERELEASE_FALSE SOLIB_POSTFIX PRELOAD_SEPERATOR PRELOAD_VARIABLE PRELOAD_POSTFIX subdirs SPROFIL_TRUE SPROFIL_FALSE STATIC_SOCKD_TRUE STATIC_SOCKD_FALSE LINT_TRUE LINT_FALSE YACC LEX LEXLIB LEX_OUTPUT_ROOT SERVER_INTERPOSITION_TRUE SERVER_INTERPOSITION_FALSE SERVER_INTERPOSITION_ALWAYS_TRUE SERVER_INTERPOSITION_ALWAYS_FALSE TOPSUBDIRS SOCKSIFY_PRELOAD_LIBS LIBRARY_PREFIX WANT_LIBWRAP_TRUE WANT_LIBWRAP_FALSE LIBOBJS TOPEXTRADIST LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP ac_env_F77_set=${F77+set} ac_env_F77_value=$F77 ac_cv_env_F77_set=${F77+set} ac_cv_env_F77_value=$F77 ac_env_FFLAGS_set=${FFLAGS+set} ac_env_FFLAGS_value=$FFLAGS ac_cv_env_FFLAGS_set=${FFLAGS+set} ac_cv_env_FFLAGS_value=$FFLAGS # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-internal enable internal extensions --enable-debug compile with debugging support --enable-warnings show compilation warnings --enable-diagnostic enable diagnostic --enable-profiling compile with profiling support in server --enable-linting enable lint --disable-libwrap never use libwrap, even if it is available --disable-pidfile disable server pidfile creation --disable-preload disable preloading in server and client --disable-clientdl disable support for preloading in the client --disable-serverdl disable support for preloading in the server --disable-largefile omit support for large files Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-domainname=NAME hardcode local domainname (only on broken platforms) --with-socks-conf=FILE change location of socks client configuration file --with-sockd-conf=FILE change location of socks server configuration file --with-pidfile=FILE change location of server pidfile --with-libc=NAME manually set name of c library if necessary --without-pam disable pam support [default=detect] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" 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 { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu version=1.1.19 #set this to enable prerelease, changes some defaults (debug enabled) #prerelease="1" if test x$prerelease != x; then prename="-pre$prerelease" TOPEXTRADIST="${TOPEXTRADIST} PRERELEASE" else prename="" fi echo "Configuring Dante ${version}${prename}:" am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=dante VERSION=${version}${prename} cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # 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"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers include/autoconf.h" #NOTE: save CFLAGS; wish to compile without -O2 when debugging oCFLAGS=$CFLAGS unset CFLAGS DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out 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. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for AIX" >&5 echo $ECHO_N "checking for AIX... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef _AIX yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* #evidently also modifies CFLAGS # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi; # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi; # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi; # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6 NM="$lt_cv_path_NM" echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | kfreebsd*-gnu | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix3*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 3964 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_F77" && break done F77=$ac_ct_F77 fi # Provide some information about the compiler. echo "$as_me:5328:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 else echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 else echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 fi echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6 if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6 objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi AR=$ac_ct_AR else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic or --without-pic was given. if test "${with_pic+set}" = set; then withval="$with_pic" pic_mode="$withval" else pic_mode=default fi; test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6391: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:6395: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6659: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:6663: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works=yes fi else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6763: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:6767: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix3*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags or --without-tags was given. if test "${with_tags+set}" = set; then withval="$with_tags" tagnames="$withval" fi; if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_CXX=yes else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_CXX='+b $libdir' ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix3*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix3*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; solaris*) case $cc_basename in CC*) # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. postdeps_CXX='-lCstd -lCrun' ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11548: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:11552: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_CXX=yes fi else lt_prog_compiler_static_works_CXX=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 if test x"$lt_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11652: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:11656: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6 if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_CXX" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13222: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:13226: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_F77=yes fi else lt_prog_compiler_static_works_F77=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 if test x"$lt_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13326: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13330: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix3*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_F77=yes else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6 if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_F77" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15529: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15533: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15797: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15801: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_GCJ=yes fi else lt_prog_compiler_static_works_GCJ=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15901: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:15905: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix3*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_GCJ=yes else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6 test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6 if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_GCJ" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_RC" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion autoconf_compflags=$CFLAGS CFLAGS=$oCFLAGS ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test x$prerelease != x; then PRERELEASE_TRUE= PRERELEASE_FALSE='#' else PRERELEASE_TRUE='#' PRERELEASE_FALSE= fi #known keywords for --enable/disable-foo(=yes/no)? LTINTERNAL="dlopen|dlopen_self|dlopen_self_static|fast_install|libtool_lock|win32_dll|shared_with_static_runtimes|shared_with_static_runtimes_CXX|shared_with_static_runtimes_F77" KNOWN_KEYWORDS="$LTINTERNAL|shared|static|debug|warnings|diagnostic|profiling|linting|libwrap|preload|serverdl|clientdl|internal|pidfile" for keyword in `set | egrep '^enable_' | sed -e 's/^enable_\(.*\)=.*/\1/'`; do echo $keyword | egrep "^(${KNOWN_KEYWORDS})$" > /dev/null if test $? -ne 0; then { echo "$as_me:$LINENO: WARNING: unknown option '$keyword', ignoring ..." >&5 echo "$as_me: WARNING: unknown option '$keyword', ignoring ..." >&2;} sleep 10; fi done #Solaris 2.5.1 is broken in many places case $host in *-*-solaris2.5.1) { echo "$as_me:$LINENO: WARNING: the server might not work properly on solaris 2.5.1" >&5 echo "$as_me: WARNING: the server might not work properly on solaris 2.5.1" >&2;} cat >>confdefs.h <<\_ACEOF #define HAVE_SOLARIS_2_5_1 1 _ACEOF ;; esac #disable acceptlock #XXX add proper test for this? case $host in *-*-*bsd* | alpha*-dec-osf* | *-*-hpux* | *-*-aix4* | *-*-aix5*) no_acceptlock=t ;; *-*-solaris*) unset solaris_newversion ver=`echo $host | sed -e 's/.*solaris//'` ver_major=`echo $ver | cut -d. -f1` ver_minor=`echo $ver | cut -d. -f2` if test x"${ver_major}" != x -a x"${ver_minor}" != x; then if test $ver_major -ge 2 -a $ver_minor -gt 5; then solaris_newversion=t fi fi if test x"${solaris_newversion}" = x"t"; then no_acceptlock=t fi ;; esac #XXX SOLIB_POSTFIX=so case $host in alpha*-dec-osf*) cat >>confdefs.h <<\_ACEOF #define HAVE_DEC_PROTO 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_EXTRA_OSF_SYMBOLS 1 _ACEOF PRELOAD="RLD" CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE_EXTENDED -DBYTE_ORDER=LITTLE_ENDIAN -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_OSF_SOURCE" ;; *-*-hpux*) #HPUX needs _PROTOTYPES to include prototypes #for configure (for gcc and cc) CPPFLAGS="${CPPFLAGS} -D_PROTOTYPES" SOLIB_POSTFIX=sl ;; *-*-sunos4*) #XXX hardcode library path (find better way to do this?) cat >>confdefs.h <<\_ACEOF #define LIBRARY_PATH "/usr/lib/" _ACEOF base_library_path="/usr/lib/" { echo "$as_me:$LINENO: WARNING: notice: hardcoding /usr/lib for dlopen" >&5 echo "$as_me: WARNING: notice: hardcoding /usr/lib for dlopen" >&2;} #nonstandard libfunction workaround #XXX proper test cat >>confdefs.h <<\_ACEOF #define HAVE_BROKEN_VSPRINTF 1 _ACEOF #link problems with libresolv, hardcode domainname if test -s /etc/resolv.conf; then domainname_hardcoded=`grep domain /etc/resolv.conf | awk '{ print $2 }'` fi no_res_init=t cat >>confdefs.h <<\_ACEOF #define HAVE_NO_RESOLVESTUFF 1 _ACEOF ;; *-*-solaris*) cat >>confdefs.h <<\_ACEOF #define HAVE_SENDMSG_DEADLOCK 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_SOLARIS_BUGS 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define BSD_COMP 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_SOLARIS_PAM_BUG 1 _ACEOF ;; *-*-linux-*) # XXX This might only concern 2.0.x kernels (add test?) cat >>confdefs.h <<\_ACEOF #define HAVE_DEFECT_RECVMSG 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_LINUX_BUGS 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_LINUX_ECCENTRICITIES 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define SPT_PADCHAR '\0' _ACEOF ;; *-*-openbsd*) #static sockd when profiling is enabled no_dynamic_profiled_sockd=t ;; *-*-irix*) PRELOAD="RLD" ;; *-*-aix4* | *-*-aix5*) OSPIDFILE="/etc/sockd.pid" cat >>confdefs.h <<\_ACEOF #define HAVE_SYSTEM_XMSG_MAGIC 1 _ACEOF ;; *-*-cygwin) { echo "$as_me:$LINENO: WARNING: disabling preloading" >&5 echo "$as_me: WARNING: disabling preloading" >&2;} no_preload_client=t no_preload_server=t no_preload=t no_res_init=t cat >>confdefs.h <<\_ACEOF #define HAVE_NO_RESOLVESTUFF 1 _ACEOF ;; esac case $PRELOAD in RLD) PRELOAD_SEPERATOR=":" PRELOAD_VARIABLE="_RLD_LIST" PRELOAD_POSTFIX="DEFAULT" ;; *) PRELOAD_SEPERATOR=" " PRELOAD_VARIABLE="LD_PRELOAD" PRELOAD_POSTFIX="" ;; esac #define hosttype cat >>confdefs.h <<_ACEOF #define HAVE_HOST_TYPE "$host" _ACEOF #XXX add proper test for this? if test x$no_acceptlock != xt; then cat >>confdefs.h <<\_ACEOF #define NEED_ACCEPTLOCK 1 _ACEOF fi echo "$as_me:$LINENO: checking for compiler flags" >&5 echo $ECHO_N "checking for compiler flags... $ECHO_C" >&6 case $host in #XXX check for compiler type, not architecture *-*-solaris*) if test "x$GCC" = x; then #-xs provides allows easier debugging with gdb comp_flags="-Xt -xs" #XXX -Xt needed to compile? #XXX due to some problems with sockaddr alignment #XXX sun cc needs -misalign comp_flags="$comp_flags -misalign -xO0" echo "$as_me:$LINENO: result: $comp_flags" >&5 echo "${ECHO_T}$comp_flags" >&6 { echo "$as_me:$LINENO: WARNING: there might currenly be some performance problems with suncc - it needs -misalign" >&5 echo "$as_me: WARNING: there might currenly be some performance problems with suncc - it needs -misalign" >&2;} $CC 2>&1 | grep ucbcc > /dev/null if test $? -eq 0; then #XXX ucbcc uses includes from /usr/ucbinclude, but these are #not complete. add /usr/include to include path to get #all prototypes (read/write are missing) #XXX host_cc="solaris-ucbcc" CPPFLAGS="-I/usr/include $CPPFLAGS${CPPFLAGS:+ } " fi fi # AC_MSG_RESULT([$comp_flags]) ;; alphaev6-dec-osf*) if test "x$GCC" = x; then comp_flags="-std1" fi echo "$as_me:$LINENO: result: $comp_flags" >&5 echo "${ECHO_T}$comp_flags" >&6 ;; alpha*-dec-osf*) #XXX is it possible to get it to work with -newc? if test "x$GCC" = x; then comp_flags="-std1 -oldc" fi echo "$as_me:$LINENO: result: $comp_flags" >&5 echo "${ECHO_T}$comp_flags" >&6 ;; *-*-hpux*) if test "x$GCC" = x; then CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE" #XXX when cc is used as CPP it needs -Ae to work # for L_SOCKPROTO; add -Ae to CPPFLAGS. # This won't work if CPP is specified by hand # and is something else than cc (when CC is hp cc) # comp_flags="-Ae" CPPFLAGS="${CPPFLAGS} -Ae" fi echo "$as_me:$LINENO: result: $comp_flags" >&5 echo "${ECHO_T}$comp_flags" >&6 ;; *-*-aix4* | *-*-aix5*) if test "x$GCC" = x; then comp_flags="-qlanglvl=ansi" #XXX CPPFLAGS="${CPPFLAGS} -qlanglvl=ansi" fi echo "$as_me:$LINENO: result: $comp_flags" >&5 echo "${ECHO_T}$comp_flags" >&6 ;; *) echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 ;; #XXX make sure compiling with compiler options works esac echo "$as_me:$LINENO: checking for support for -pipe compiler flag" >&5 echo $ECHO_N "checking for support for -pipe compiler flag... $ECHO_C" >&6 oCFLAGS=$CFLAGS CFLAGS="$CFLAGS -pipe" if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main() { return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 comp_flags="${comp_flags} -pipe" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$oCFLAGS" echo "$as_me:$LINENO: checking for support for -Wbounded compiler flag" >&5 echo $ECHO_N "checking for support for -Wbounded compiler flag... $ECHO_C" >&6 oCFLAGS=$CFLAGS CFLAGS="$CFLAGS -Wbounded" if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main() { return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 comp_flags="${comp_flags} -Wbounded" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$oCFLAGS" # Check whether --enable-internal or --disable-internal was given. if test "${enable_internal+set}" = set; then enableval="$enable_internal" if test -d "gui"; then TOPEXTRADIST="${TOPEXTRADIST} gui" subdirs="$subdirs gui" else { echo "$as_me:$LINENO: WARNING: --enable-internal option is for internal Dante development, ignoring" >&5 echo "$as_me: WARNING: --enable-internal option is for internal Dante development, ignoring" >&2;} fi else unset build_internal fi; echo "$as_me:$LINENO: checking for compilation with debugging" >&5 echo $ECHO_N "checking for compilation with debugging... $ECHO_C" >&6 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" debug_enabled=t else if test x$prerelease != x; then debug_enabled=t fi fi; if test x$debug_enabled = xt; then #no optimization wanted if test $ac_cv_prog_cc_g = yes; then CFLAGS="$CFLAGS -g" fi CPPFLAGS="-DDEBUG $CPPFLAGS" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 #autoconf_compflags is set to "-g -O2" with GCC #override CFLAGS when running configure to avoid this CFLAGS="$CFLAGS $autoconf_compflags" fi #-Wall ? echo "$as_me:$LINENO: checking for warning flags" >&5 echo $ECHO_N "checking for warning flags... $ECHO_C" >&6 # Check whether --enable-warnings or --disable-warnings was given. if test "${enable_warnings+set}" = set; then enableval="$enable_warnings" enable_warnings=t else if test x$prerelease != x; then enable_warnings=t fi fi; #construct warning flags in $warn if test x$enable_warnings != x; then #try to enable compiler specific warning flags if test "x$GCC" = x; then case $host in *sunos4*) #sunos cc # warn="" true ;; alpha*-dec-osf*) #osf cc # warn="-w0 -check -portable -warnprotos" true ;; *-*-hpux*) warn="-v" ;; *-*-solaris*) warn="-v" true ;; *-*-irix*) #sgi cc warn="-fullwarn" ;; *) #try -Wall (gcc) warn="-Wall" ;; esac else #gcc warnings warn="-Wall -W -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wcast-qual -Wbad-function-cast -Wpointer-arith -Wundef" #warn="$warn -Wold-style-cast -Winline -Waggregate-return -Wconversion -Wwrite-strings -Wtraditional -Wshadow" fi oCFLAGS=$CFLAGS CFLAGS="$CFLAGS $warn" #make sure compilation is still possible cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: $warn" >&5 echo "${ECHO_T}$warn" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 unset warn fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$oCFLAGS else echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 fi #NOTE: set warnings at the bottom; might interfere with tests CFLAGS="$CFLAGS $comp_flags" #-DDIAGNOSTICS? echo "$as_me:$LINENO: checking for compliation with DIAGNOSTIC" >&5 echo $ECHO_N "checking for compliation with DIAGNOSTIC... $ECHO_C" >&6 # Check whether --enable-diagnostic or --disable-diagnostic was given. if test "${enable_diagnostic+set}" = set; then enableval="$enable_diagnostic" cat >>confdefs.h <<\_ACEOF #define DIAGNOSTIC 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else if test x$prerelease != x; then cat >>confdefs.h <<\_ACEOF #define DIAGNOSTIC 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi; # Check whether --enable-profiling or --disable-profiling was given. if test "${enable_profiling+set}" = set; then enableval="$enable_profiling" cat >>confdefs.h <<\_ACEOF #define HAVE_PROFILING 1 _ACEOF s_profiling=t fi; if test x$s_profiling = xt; then SPROFIL_TRUE= SPROFIL_FALSE='#' else SPROFIL_TRUE='#' SPROFIL_FALSE= fi #static or dynamic sockd? if test x$no_dynamic_profiled_sockd = xt; then STATIC_SOCKD_TRUE= STATIC_SOCKD_FALSE='#' else STATIC_SOCKD_TRUE='#' STATIC_SOCKD_FALSE= fi if test "x$s_profiling" = "xt" -a "x$no_dynamic_profiled_sockd" = "xt"; then no_preload_server=t { echo "$as_me:$LINENO: WARNING: sockd is built static when profiling is enabled" >&5 echo "$as_me: WARNING: sockd is built static when profiling is enabled" >&2;} fi # Check whether --enable-linting or --disable-linting was given. if test "${enable_linting+set}" = set; then enableval="$enable_linting" s_linting=t fi; if test x$s_linting = xt; then LINT_TRUE= LINT_FALSE='#' else LINT_TRUE='#' LINT_FALSE= fi echo "$as_me:$LINENO: checking whether libwrap should be disabled" >&5 echo $ECHO_N "checking whether libwrap should be disabled... $ECHO_C" >&6 # Check whether --enable-libwrap or --disable-libwrap was given. if test "${enable_libwrap+set}" = set; then enableval="$enable_libwrap" if test x$enableval = xno; then no_libwrap=t echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_YACC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then echo "$as_me:$LINENO: result: $LEX" >&5 echo "${ECHO_T}$LEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test -z "$LEXLIB" then echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5 echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6 if test "${ac_cv_lib_fl_yywrap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char yywrap (); int main () { yywrap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_fl_yywrap=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fl_yywrap=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5 echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6 if test $ac_cv_lib_fl_yywrap = yes; then LEXLIB="-lfl" else echo "$as_me:$LINENO: checking for yywrap in -ll" >&5 echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6 if test "${ac_cv_lib_l_yywrap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ll $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char yywrap (); int main () { yywrap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_l_yywrap=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_l_yywrap=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5 echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6 if test $ac_cv_lib_l_yywrap = yes; then LEXLIB="-ll" fi fi fi if test "x$LEX" != "x:"; then echo "$as_me:$LINENO: checking lex output file root" >&5 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6 if test "${ac_cv_prog_lex_root+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # The minimal lex program is just a single line: %%. But some broken lexes # (Solaris, I think it was) want two %% lines, so accommodate them. cat >conftest.l <<_ACEOF %% %% _ACEOF { (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5 (eval $LEX conftest.l) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 echo "${ECHO_T}$ac_cv_prog_lex_root" >&6 rm -f conftest.l LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6 if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS=$LIBS LIBS="$LIBS $LEXLIB" cat >conftest.$ac_ext <<_ACEOF `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_lex_yytext_pointer=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS rm -f "${LEX_OUTPUT_ROOT}.c" fi echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6 if test $ac_cv_prog_lex_yytext_pointer = yes; then cat >>confdefs.h <<\_ACEOF #define YYTEXT_POINTER 1 _ACEOF fi fi if test "$LEX" = :; then LEX=${am_missing_run}flex fi echo "$as_me:$LINENO: checking for char" >&5 echo $ECHO_N "checking for char... $ECHO_C" >&6 if test "${ac_cv_type_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((char *) 0) return 0; if (sizeof (char)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_char=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_char=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5 echo "${ECHO_T}$ac_cv_type_char" >&6 echo "$as_me:$LINENO: checking size of char" >&5 echo $ECHO_N "checking size of char... $ECHO_C" >&6 if test "${ac_cv_sizeof_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_char" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_char=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (char), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (char)); } unsigned long ulongval () { return (long) (sizeof (char)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (char))) < 0) { long i = longval (); if (i != ((long) (sizeof (char)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (char)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_char=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (char), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_char=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 echo "${ECHO_T}$ac_cv_sizeof_char" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_CHAR $ac_cv_sizeof_char _ACEOF echo "$as_me:$LINENO: checking for short" >&5 echo $ECHO_N "checking for short... $ECHO_C" >&6 if test "${ac_cv_type_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((short *) 0) return 0; if (sizeof (short)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_short=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_short=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 echo "${ECHO_T}$ac_cv_type_short" >&6 echo "$as_me:$LINENO: checking size of short" >&5 echo $ECHO_N "checking size of short... $ECHO_C" >&6 if test "${ac_cv_sizeof_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_short" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_short=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (short)); } unsigned long ulongval () { return (long) (sizeof (short)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (short))) < 0) { long i = longval (); if (i != ((long) (sizeof (short)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (short)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_short=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_short=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 echo "${ECHO_T}$ac_cv_sizeof_short" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF echo "$as_me:$LINENO: checking for int" >&5 echo $ECHO_N "checking for int... $ECHO_C" >&6 if test "${ac_cv_type_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((int *) 0) return 0; if (sizeof (int)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 echo "${ECHO_T}$ac_cv_type_int" >&6 echo "$as_me:$LINENO: checking size of int" >&5 echo $ECHO_N "checking size of int... $ECHO_C" >&6 if test "${ac_cv_sizeof_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_int" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_int=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (int)); } unsigned long ulongval () { return (long) (sizeof (int)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (int))) < 0) { long i = longval (); if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_int=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_int" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF echo "$as_me:$LINENO: checking for long" >&5 echo $ECHO_N "checking for long... $ECHO_C" >&6 if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((long *) 0) return 0; if (sizeof (long)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 echo "${ECHO_T}$ac_cv_type_long" >&6 echo "$as_me:$LINENO: checking size of long" >&5 echo $ECHO_N "checking size of long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (long)); } unsigned long ulongval () { return (long) (sizeof (long)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (long))) < 0) { long i = longval (); if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_long=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi for ac_header in fcntl.h limits.h malloc.h paths.h strings.h syslog.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in unistd.h crypt.h sys/file.h sys/ioctl.h sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in tcpd.h shadow.h ifaddrs.h sys/sem.h netinet/in.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/ipc.h arpa/nameser.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in netinet/ip_var.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if HAVE_SYS_TYPES_H #include #endif #if HAVE_NETINET_IN_H #include #endif #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in resolv.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if HAVE_SYS_TYPES_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_ARPA_NAMESER_H #include #endif #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done case $host in alpha*-dec-osf*) for ac_header in netinet/ip.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ;; *) ;; esac #allow manual specification echo "$as_me:$LINENO: checking for hardcoded domainname" >&5 echo $ECHO_N "checking for hardcoded domainname... $ECHO_C" >&6 # Check whether --with-domainname or --without-domainname was given. if test "${with_domainname+set}" = set; then withval="$with_domainname" domainname_hardcoded=$withval fi; if test x${domainname_hardcoded} != x; then cat >>confdefs.h <<_ACEOF #define SOCKS_DOMAINNAME "${domainname_hardcoded}" _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 { echo "$as_me:$LINENO: WARNING: using hardcoded domainname ${domainname_hardcoded}" >&5 echo "$as_me: WARNING: using hardcoded domainname ${domainname_hardcoded}" >&2;} else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 if test x${no_res_init} = xt; then { echo "$as_me:$LINENO: WARNING: unable to locate domainname, specify if necessary" >&5 echo "$as_me: WARNING: unable to locate domainname, specify if necessary" >&2;} fi fi #allow default file locations to be overridden echo "$as_me:$LINENO: checking for socks config file location" >&5 echo $ECHO_N "checking for socks config file location... $ECHO_C" >&6 # Check whether --with-socks-conf or --without-socks-conf was given. if test "${with_socks_conf+set}" = set; then withval="$with_socks_conf" echo "$as_me:$LINENO: result: $withval" >&5 echo "${ECHO_T}$withval" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKS_CONFIGFILE 1 _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_ALT_SOCKS_CONFIGFILE "$withval" _ACEOF else echo "$as_me:$LINENO: result: default" >&5 echo "${ECHO_T}default" >&6 fi; echo "$as_me:$LINENO: checking for sockd config file location" >&5 echo $ECHO_N "checking for sockd config file location... $ECHO_C" >&6 # Check whether --with-sockd-conf or --without-sockd-conf was given. if test "${with_sockd_conf+set}" = set; then withval="$with_sockd_conf" echo "$as_me:$LINENO: result: $withval" >&5 echo "${ECHO_T}$withval" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKD_CONFIGFILE 1 _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_ALT_SOCKD_CONFIGFILE "$withval" _ACEOF else echo "$as_me:$LINENO: result: default" >&5 echo "${ECHO_T}default" >&6 fi; #pidfile # Check whether --enable-pidfile or --disable-pidfile was given. if test "${enable_pidfile+set}" = set; then enableval="$enable_pidfile" cat >>confdefs.h <<\_ACEOF #define HAVE_DISABLED_PIDFILE 1 _ACEOF fi; echo "$as_me:$LINENO: checking for pid file location" >&5 echo $ECHO_N "checking for pid file location... $ECHO_C" >&6 # Check whether --with-pidfile or --without-pidfile was given. if test "${with_pidfile+set}" = set; then withval="$with_pidfile" echo "$as_me:$LINENO: result: $withval" >&5 echo "${ECHO_T}$withval" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKD_PIDFILE 1 _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_ALT_SOCKD_PIDFILE "$withval" _ACEOF have_pidfile=t else echo "$as_me:$LINENO: result: default" >&5 echo "${ECHO_T}default" >&6 fi; #os default? if test x"${have_pidfile}" != xt; then if test x"$OSPIDFILE" != x; then cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKD_PIDFILE 1 _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_ALT_SOCKD_PIDFILE "$OSPIDFILE" _ACEOF fi fi ## preload related tests #build without support for preloading? # HAVE_DLFCN_H only determines if the include file exists if test "${ac_cv_header_dlfcn_h+set}" = set; then echo "$as_me:$LINENO: checking for dlfcn.h" >&5 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for dlfcn.h" >&5 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 fi if test $ac_cv_header_dlfcn_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DLFCN_H 1 _ACEOF have_dlfcn_h=t else { echo "$as_me:$LINENO: WARNING: dlfcn.h missing, preloading disabled" >&5 echo "$as_me: WARNING: dlfcn.h missing, preloading disabled" >&2;} no_preload_client=t no_preload_server=t no_preload=t fi if test "x$no_preload" = x; then echo "$as_me:$LINENO: checking whether all interposition usage should be disabled" >&5 echo $ECHO_N "checking whether all interposition usage should be disabled... $ECHO_C" >&6 # Check whether --enable-preload or --disable-preload was given. if test "${enable_preload+set}" = set; then enableval="$enable_preload" if test x$enableval = xno; then no_preload_client=t no_preload_server=t no_preload=t echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; fi if test "x$no_preload" = x; then echo "$as_me:$LINENO: checking whether interposition in the client should be disabled" >&5 echo $ECHO_N "checking whether interposition in the client should be disabled... $ECHO_C" >&6 # Check whether --enable-clientdl or --disable-clientdl was given. if test "${enable_clientdl+set}" = set; then enableval="$enable_clientdl" if test x$enableval = xno; then no_preload_client=t echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; echo "$as_me:$LINENO: checking whether interposition in the server should be disabled" >&5 echo $ECHO_N "checking whether interposition in the server should be disabled... $ECHO_C" >&6 # Check whether --enable-serverdl or --disable-serverdl was given. if test "${enable_serverdl+set}" = set; then enableval="$enable_serverdl" if test x$enableval = xno; then no_preload_server=t echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else if text x$enableval = xyes; then serverdl_always_on=t fi echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi; fi if test x$no_preload_server = x; then SERVER_INTERPOSITION_TRUE= SERVER_INTERPOSITION_FALSE='#' else SERVER_INTERPOSITION_TRUE='#' SERVER_INTERPOSITION_FALSE= fi if test x$serverdl_always_on = xt; then SERVER_INTERPOSITION_ALWAYS_TRUE= SERVER_INTERPOSITION_ALWAYS_FALSE='#' else SERVER_INTERPOSITION_ALWAYS_TRUE='#' SERVER_INTERPOSITION_ALWAYS_FALSE= fi if test "x${no_preload_client}" = "xt" -a "x${no_preload_server}" = "xt"; then unset preload_enabled else preload_enabled=t fi #construct SUBDIRS variable SUBDIRS="lib sockd unlicensed example doc bin SPECS capi contrib" if test "x${no_preload_client}" = x; then SUBDIRS="dlib $SUBDIRS" fi #include should be done before compilation to ensure that #redefac is executed first TOPSUBDIRS="$subdirs include libscompat $SUBDIRS" if test "${ac_cv_header_sys_sockio_h+set}" = set; then echo "$as_me:$LINENO: checking for sys/sockio.h" >&5 echo $ECHO_N "checking for sys/sockio.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sockio_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_sockio_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_sockio_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking sys/sockio.h usability" >&5 echo $ECHO_N "checking sys/sockio.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking sys/sockio.h presence" >&5 echo $ECHO_N "checking sys/sockio.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: sys/sockio.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: sys/sockio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sockio.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: sys/sockio.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: sys/sockio.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: sys/sockio.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sockio.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: sys/sockio.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sockio.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: sys/sockio.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sockio.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: sys/sockio.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sockio.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: sys/sockio.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sockio.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sockio.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for sys/sockio.h" >&5 echo $ECHO_N "checking for sys/sockio.h... $ECHO_C" >&6 if test "${ac_cv_header_sys_sockio_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sockio_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_sockio_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_sockio_h" >&6 fi if test $ac_cv_header_sys_sockio_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_SOCKIO_H 1 _ACEOF have_sys_sockio_h=t fi echo "$as_me:$LINENO: checking whether defines const" >&5 echo $ECHO_N "checking whether defines const... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef const yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 check_const="yes" fi rm -f conftest* if test x$check_const = xyes; then echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi fi #looks for linux + systems with RTAX_GATEWAY defined in net/route.h echo "$as_me:$LINENO: checking for supported routing socket communication" >&5 echo $ECHO_N "checking for supported routing socket communication... $ECHO_C" >&6 unset no_routeinfo cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef linux yes #endif /* linux */ _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define HAVE_ROUTE_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_ROUTEINFO_LINUX 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef RTA_GATEWAY yes #endif /* RTA_GATEWAY */ _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define HAVE_ROUTE_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_ROUTEINFO_BSD 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, might result in reduced functionality" >&5 echo "${ECHO_T}no, might result in reduced functionality" >&6 no_routeinfo=t fi rm -f conftest* fi rm -f conftest* echo "$as_me:$LINENO: checking whether declares h_errno" >&5 echo $ECHO_N "checking whether declares h_errno... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "h_errno" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define HAVE_H_ERRNO 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* #XXXsys/socket.h? echo "$as_me:$LINENO: checking for struct ip_opts in " >&5 echo $ECHO_N "checking for struct ip_opts in ... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "struct.*ipoption" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_IPOPTS 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* echo "$as_me:$LINENO: checking whether defines inline" >&5 echo $ECHO_N "checking whether defines inline... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef inline yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 check_inline="yes" fi rm -f conftest* if test x$check_inline="yes";then echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac fi echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF #define uid_t int _ACEOF cat >>confdefs.h <<\_ACEOF #define gid_t int _ACEOF fi echo "$as_me:$LINENO: checking for off_t" >&5 echo $ECHO_N "checking for off_t... $ECHO_C" >&6 if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((off_t *) 0) return 0; if (sizeof (off_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_off_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 echo "${ECHO_T}$ac_cv_type_off_t" >&6 if test $ac_cv_type_off_t = yes; then : else cat >>confdefs.h <<_ACEOF #define off_t long _ACEOF fi echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((pid_t *) 0) return 0; if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi # Check whether --enable-largefile or --disable-largefile was given. if test "${enable_largefile+set}" = set; then enableval="$enable_largefile" fi; if test "$enable_largefile" != no; then echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_largefile_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext CC="$CC -n32" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_largefile_CC=' -n32'; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_file_offset_bits+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else while :; do ac_cv_sys_file_offset_bits=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_file_offset_bits=64; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext break done fi echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 if test "$ac_cv_sys_file_offset_bits" != no; then cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF fi rm -f conftest* echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_large_files+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else while :; do ac_cv_sys_large_files=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_large_files=1; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext break done fi echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 echo "${ECHO_T}$ac_cv_sys_large_files" >&6 if test "$ac_cv_sys_large_files" != no; then cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF fi rm -f conftest* fi #XXX cat >>confdefs.h <<\_ACEOF #define HAVE_IPV6_SUPPORT 0 _ACEOF echo "$as_me:$LINENO: checking for in6_addr" >&5 echo $ECHO_N "checking for in6_addr... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { struct in6_addr sin6; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_IN6_ADDR 1 _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking for sockaddr_storage in sys/socket.h" >&5 echo $ECHO_N "checking for sockaddr_storage in sys/socket.h... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct sockaddr_storage __ss; struct sockaddr_in *sin; sin = (struct sockaddr_in *) &__ss; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_STORAGE 1 _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking to see if openlog accepts LOG_PERROR" >&5 echo $ECHO_N "checking to see if openlog accepts LOG_PERROR... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef LOG_PERROR yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define HAVE_OPENLOG_LOG_PERROR 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* echo "$as_me:$LINENO: checking to see if stdlib.h defines EXIT_FAILURE" >&5 echo $ECHO_N "checking to see if stdlib.h defines EXIT_FAILURE... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef EXIT_FAILURE yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else cat >>confdefs.h <<\_ACEOF #define NEED_EXIT_FAILURE 1 _ACEOF echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* #XXX actually checks if AF_UNIX should be used instead of AF_LOCAL echo "$as_me:$LINENO: checking whether uses AF_UNIX" >&5 echo $ECHO_N "checking whether uses AF_UNIX... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef AF_LOCAL #else #ifdef AF_UNIX yes #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define NEED_AF_LOCAL 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* echo "$as_me:$LINENO: checking for SIGINFO" >&5 echo $ECHO_N "checking for SIGINFO... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef SIGINFO yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define HAVE_SIGNAL_SIGINFO 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* echo "$as_me:$LINENO: checking to see if MSG_WAITALL exists" >&5 echo $ECHO_N "checking to see if MSG_WAITALL exists... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef MSG_WAITALL yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define HAVE_MSG_WAITALL 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* #SO_SNDLOWAT #irix 6.2 only seems to look at lowest 8 bit of value #Solaris also seems to be broken (up to 2.6 atleast) echo "$as_me:$LINENO: checking whether a working SO_SNDLOWAT exists" >&5 echo $ECHO_N "checking whether a working SO_SNDLOWAT exists... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef SO_SNDLOWAT yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then case $host in *bsd*) so_sndlowat=t ;; *-osf*) so_sndlowat=t ;; esac if test "x${so_sndlowat}" = xt; then cat >>confdefs.h <<\_ACEOF #define HAVE_SO_SNDLOWAT 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: disabled" >&5 echo "${ECHO_T}disabled" >&6 { echo "$as_me:$LINENO: WARNING: performance in the server might be degraded without support for the SO_SNDLOWAT socket option" >&5 echo "$as_me: WARNING: performance in the server might be degraded without support for the SO_SNDLOWAT socket option" >&2;} fi else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 { echo "$as_me:$LINENO: WARNING: performance in the server might be degraded without support for the SO_SNDLOWAT socket option" >&5 echo "$as_me: WARNING: performance in the server might be degraded without support for the SO_SNDLOWAT socket option" >&2;} fi rm -f conftest* echo "$as_me:$LINENO: checking whether realloc with a NULL pointer calls malloc" >&5 echo $ECHO_N "checking whether realloc with a NULL pointer calls malloc... $ECHO_C" >&6 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef NULL #define NULL (char *)0 #endif int main() { /* will assume this test doesn\'t fail because of lack of memory */ if (realloc(NULL, 1) == NULL) return 1; else return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) cat >>confdefs.h <<\_ACEOF #define HAVE_NOMALLOC_REALLOC 1 _ACEOF echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: checking whether free can be called with NULL" >&5 echo $ECHO_N "checking whether free can be called with NULL... $ECHO_C" >&6 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef NULL #define NULL (char *)0 #endif int main() { /* will assume core dump/seg fault if it doesn\'t work */ free(NULL); return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) cat >>confdefs.h <<\_ACEOF #define HAVE_NONULL_FREE 1 _ACEOF echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: checking for timer macros" >&5 echo $ECHO_N "checking for timer macros... $ECHO_C" >&6 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main() { struct timeval tv, tv2, tv3; tv.tv_sec = 0; tv.tv_usec = 0; tv2.tv_sec = 0; tv2.tv_usec = 0; tv3.tv_sec = 0; tv3.tv_usec = 0; timeradd(&tv, &tv2, &tv3); timersub(&tv3, &tv2, &tv); return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_TIMER_MACROS 1 _ACEOF else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi #A good time to save the cache (L_NSOCKPROTO might fail) cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : 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" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache #find prototypes from dlib/interposition.c if test "x$preload_enabled" = "xt"; then unset failproto #prototypes; return value first, then parameters # # Example (accept from OpenBSD manual page): # # int accept(int s, struct sockaddr *addr, socklen_t *addrlen); # # Remove variable names and the result is: # int, int, struct sockaddr *, socklen_t * # This is quoted and added to the L_NSOCKPROTO call below. echo "$as_me:$LINENO: checking prototypes for accept" >&5 echo $ECHO_N "checking prototypes for accept... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include int accept( int, struct sockaddr *, socklen_t * ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_ACCEPT_0 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_ACCEPT_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_ACCEPT_2 struct sockaddr * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_ACCEPT_3 socklen_t * _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include int accept( int, struct sockaddr *, Psocklen_t ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_ACCEPT_0 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_ACCEPT_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_ACCEPT_2 struct sockaddr * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_ACCEPT_3 Psocklen_t _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for bind" >&5 echo $ECHO_N "checking prototypes for bind... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include int bind( int, const struct sockaddr *, socklen_t ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_BIND_0 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_BIND_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_BIND_2 const struct sockaddr * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_BIND_3 socklen_t _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for connect" >&5 echo $ECHO_N "checking prototypes for connect... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include int connect( int, const struct sockaddr *, socklen_t ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_CONNECT_0 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_CONNECT_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_CONNECT_2 const struct sockaddr * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_CONNECT_3 socklen_t _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for gethostbyaddr" >&5 echo $ECHO_N "checking prototypes for gethostbyaddr... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include struct hostent * gethostbyaddr( const char *, int, int ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETHOSTBYADDR_0 struct hostent * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETHOSTBYADDR_1 const char * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETHOSTBYADDR_2 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETHOSTBYADDR_3 int _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include struct hostent * gethostbyaddr( const void *, socklen_t, int ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETHOSTBYADDR_0 struct hostent * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETHOSTBYADDR_1 const void * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETHOSTBYADDR_2 socklen_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETHOSTBYADDR_3 int _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for getpeername" >&5 echo $ECHO_N "checking prototypes for getpeername... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include int getpeername( int, struct sockaddr *, socklen_t * ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETPEERNAME_0 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETPEERNAME_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETPEERNAME_2 struct sockaddr * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETPEERNAME_3 socklen_t * _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include int getpeername( int, struct sockaddr *, Psocklen_t ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETPEERNAME_0 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETPEERNAME_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETPEERNAME_2 struct sockaddr * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETPEERNAME_3 Psocklen_t _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for getsockname" >&5 echo $ECHO_N "checking prototypes for getsockname... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include int getsockname( int, struct sockaddr *, socklen_t * ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETSOCKNAME_0 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETSOCKNAME_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETSOCKNAME_2 struct sockaddr * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETSOCKNAME_3 socklen_t * _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include int getsockname( int, struct sockaddr *, Psocklen_t ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETSOCKNAME_0 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETSOCKNAME_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETSOCKNAME_2 struct sockaddr * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_GETSOCKNAME_3 Psocklen_t _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for read" >&5 echo $ECHO_N "checking prototypes for read... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include ssize_t read( int, void *, size_t ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_READ_0 ssize_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_READ_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_READ_2 void * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_READ_3 size_t _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for readv" >&5 echo $ECHO_N "checking prototypes for readv... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include ssize_t readv( int, const struct iovec *, int ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_READV_0 ssize_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_READV_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_READV_2 const struct iovec * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_READV_3 int _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for recv" >&5 echo $ECHO_N "checking prototypes for recv... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include ssize_t recv( int, void *, size_t, int ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECV_0 ssize_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECV_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECV_2 void * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECV_3 size_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECV_4 int _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for recvfrom" >&5 echo $ECHO_N "checking prototypes for recvfrom... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include ssize_t recvfrom( int, void *, size_t, int, struct sockaddr *, socklen_t * ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_0 ssize_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_2 void * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_3 size_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_4 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_5 struct sockaddr * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_6 socklen_t * _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include ssize_t recvfrom( int, void *, size_t, int, struct sockaddr *, Psocklen_t ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_0 ssize_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_2 void * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_3 size_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_4 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_5 struct sockaddr * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVFROM_6 Psocklen_t _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for recvmsg" >&5 echo $ECHO_N "checking prototypes for recvmsg... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include ssize_t recvmsg( int, struct msghdr *, int ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVMSG_0 ssize_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVMSG_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVMSG_2 struct msghdr * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_RECVMSG_3 int _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for send" >&5 echo $ECHO_N "checking prototypes for send... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include ssize_t send( int, const void *, size_t, int ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SEND_0 ssize_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SEND_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SEND_2 const void * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SEND_3 size_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SEND_4 int _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for sendmsg" >&5 echo $ECHO_N "checking prototypes for sendmsg... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include ssize_t sendmsg( int, const struct msghdr *, int ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SENDMSG_0 ssize_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SENDMSG_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SENDMSG_2 const struct msghdr * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SENDMSG_3 int _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for sendto" >&5 echo $ECHO_N "checking prototypes for sendto... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include ssize_t sendto( int, const void *, size_t, int, const struct sockaddr *, socklen_t ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SENDTO_0 ssize_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SENDTO_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SENDTO_2 const void * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SENDTO_3 size_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SENDTO_4 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SENDTO_5 const struct sockaddr * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_SENDTO_6 socklen_t _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for write" >&5 echo $ECHO_N "checking prototypes for write... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include ssize_t write( int, const void *, size_t ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_WRITE_0 ssize_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_WRITE_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_WRITE_2 const void * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_WRITE_3 size_t _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking prototypes for writev" >&5 echo $ECHO_N "checking prototypes for writev... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include ssize_t writev( int, const struct iovec *, int ); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<_ACEOF #define HAVE_PROT_WRITEV_0 ssize_t _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_WRITEV_1 int _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_WRITEV_2 const struct iovec * _ACEOF cat >>confdefs.h <<_ACEOF #define HAVE_PROT_WRITEV_3 int _ACEOF echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failure" >&5 echo "${ECHO_T}failure" >&6 failproto=t fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$failproto != x; then echo "" echo "error: attempt to determine function prototypes failed," echo " and will probably mean that building of libdsocks," echo " which allows on-the-fly socksification of dynamic" echo " binaries, will not work." echo "" echo " You have several options:" echo "" echo " 1. If you do not need libdsocks, run configure with the" echo " option --disable-preload." echo " 2. Submit a bugreport." echo " 3. Find the prototypes used on your platform for the" echo " failed functions, and add them to the configure.ac" echo " file. Then use autoconf (which must be installed)" echo " to regenerate the configure script." echo " Function prototype definitions can usually be found" echo " in the manual page for the function or in a system" echo " include file (usually located under /usr/include)." exit 1 fi fi echo "$as_me:$LINENO: checking if getsockopt needs cast" >&5 echo $ECHO_N "checking if getsockopt needs cast... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int getsockopt(int, int, int, char *, int *); int main () { 1 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\_ACEOF #define NEED_GETSOCKOPT_CAST 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext #include both and ? if test x$have_sys_sockio_h = xt; then echo "$as_me:$LINENO: checking to see if should be included" >&5 echo $ECHO_N "checking to see if should be included... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef SIOCATMARK #else #include #ifdef SIOCATMARK yes #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define NEED_SYS_SOCKIO_H 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* fi #XXX should be more generic, check if nonexistent echo "$as_me:$LINENO: checking to see if dlopen param has DL_ and not RTLD_ prefix" >&5 echo $ECHO_N "checking to see if dlopen param has DL_ and not RTLD_ prefix... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef DL_LAZY #else # ifdef RTLD_LAZY yes # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define NEED_DYNA_RTLD 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* #XXX should be more generic, check if nonexistent #SV_INTERRUPT, but not SA_RESTART defined? echo "$as_me:$LINENO: checking to see if SV_INTERRUPT should be used" >&5 echo $ECHO_N "checking to see if SV_INTERRUPT should be used... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef SA_RESTART #else # ifdef SV_INTERRUPT yes # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define NEED_SA_RESTART 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* #XXXseems to be supported on Solaris2.6, but there might be some #defines that need to be set (should _XOPEN_SOURCE be defined on all #platforms?) echo "$as_me:$LINENO: checking if cmsghdr exists in " >&5 echo $ECHO_N "checking if cmsghdr exists in ... $ECHO_C" >&6 case $host in *) cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct cmsghdr foo = {1,1,1}; struct msghdr bar; foo.cmsg_len = 0; foo.cmsg_type = SCM_RIGHTS; foo.cmsg_level = SOL_SOCKET; bar.msg_controllen = 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\_ACEOF #define HAVE_CMSGHDR 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac echo "$as_me:$LINENO: checking for CMSG_SPACE in sys/socket.h" >&5 echo $ECHO_N "checking for CMSG_SPACE in sys/socket.h... $ECHO_C" >&6 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main() { int d = CMSG_SPACE(4); return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_CMSG_SPACE 1 _ACEOF else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: checking for CMSG_LEN in sys/socket.h" >&5 echo $ECHO_N "checking for CMSG_LEN in sys/socket.h... $ECHO_C" >&6 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main() { int d = CMSG_LEN(4); return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_CMSG_LEN 1 _ACEOF else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: checking for sa_len in sockaddr" >&5 echo $ECHO_N "checking for sa_len in sockaddr... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct sockaddr foo; foo.sa_len = 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_SA_LEN 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: checking to see if malloc_options exists" >&5 echo $ECHO_N "checking to see if malloc_options exists... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern char *malloc_options; int main () { malloc_options = 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC_OPTIONS 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext echo "$as_me:$LINENO: checking to see if __progname exists" >&5 echo $ECHO_N "checking to see if __progname exists... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern char *__progname; int main () { __progname = 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\_ACEOF #define HAVE_PROGNAME 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext echo "$as_me:$LINENO: checking for library containing crypt" >&5 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6 if test "${ac_cv_search_crypt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_crypt=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char crypt (); int main () { crypt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_crypt="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_crypt" = no; then for ac_lib in crypt; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char crypt (); int main () { crypt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_crypt="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5 echo "${ECHO_T}$ac_cv_search_crypt" >&6 if test "$ac_cv_search_crypt" != no; then test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS" fi #HP-UX 11.00 echo "$as_me:$LINENO: checking for library containing getspnam" >&5 echo $ECHO_N "checking for library containing getspnam... $ECHO_C" >&6 if test "${ac_cv_search_getspnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_getspnam=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getspnam (); int main () { getspnam (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_getspnam="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_getspnam" = no; then for ac_lib in sec; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getspnam (); int main () { getspnam (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_getspnam="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_getspnam" >&5 echo "${ECHO_T}$ac_cv_search_getspnam" >&6 if test "$ac_cv_search_getspnam" != no; then test "$ac_cv_search_getspnam" = "none required" || LIBS="$ac_cv_search_getspnam $LIBS" fi #FreeBSD has setproctitle in -lutil (Per Hedeland ) echo "$as_me:$LINENO: checking for library containing setproctitle" >&5 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6 if test "${ac_cv_search_setproctitle+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_setproctitle=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char setproctitle (); int main () { setproctitle (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_setproctitle="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_setproctitle" = no; then for ac_lib in util; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char setproctitle (); int main () { setproctitle (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_setproctitle="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6 if test "$ac_cv_search_setproctitle" != no; then test "$ac_cv_search_setproctitle" = "none required" || LIBS="$ac_cv_search_setproctitle $LIBS" fi #pthread mutexes is used if getipnodebyname is implemented #XXX disable for now #AC_HAVE_LIBRARY(pthread) #Look for functions needed for socksify located in other places than libc SOCKSIFY_PRELOAD_LIBS="" oLIBS=$LIBS #HP-UX 11.00 LIBS="" echo "$as_me:$LINENO: checking for library containing bindresvport" >&5 echo $ECHO_N "checking for library containing bindresvport... $ECHO_C" >&6 if test "${ac_cv_search_bindresvport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_bindresvport=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char bindresvport (); int main () { bindresvport (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_bindresvport="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_bindresvport" = no; then for ac_lib in rpcsoc; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char bindresvport (); int main () { bindresvport (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_bindresvport="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_bindresvport" >&5 echo "${ECHO_T}$ac_cv_search_bindresvport" >&6 if test "$ac_cv_search_bindresvport" != no; then test "$ac_cv_search_bindresvport" = "none required" || LIBS="$ac_cv_search_bindresvport $LIBS" fi NLIBS="${NLIBS}${NLIBS:+ }$LIBS" LIBS="" #ignore when preloading is disabled (only the AC_SEARCH_LIBS test is needed) if test "x$preload_enabled" = "xt" -a "x${ac_cv_search_bindresvport}" = "x-lrpcsoc"; then cat >>confdefs.h <<_ACEOF #define LIBRARY_LIBRPCSOC "${base_library_path}librpcsoc.sl" _ACEOF SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}librpcsoc.sl" cat >>confdefs.h <<\_ACEOF #define LIBRARY_BINDRESVPORT LIBRARY_LIBRPCSOC _ACEOF fi LIBS="" echo "$as_me:$LINENO: checking for library containing connect" >&5 echo $ECHO_N "checking for library containing connect... $ECHO_C" >&6 if test "${ac_cv_search_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_connect=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); int main () { connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_connect="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_connect" = no; then for ac_lib in socket; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); int main () { connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_connect="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_connect" >&5 echo "${ECHO_T}$ac_cv_search_connect" >&6 if test "$ac_cv_search_connect" != no; then test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS" fi NLIBS="${NLIBS}${NLIBS:+ }$LIBS" LIBS="" #ignore when preloading is disabled (only the AC_SEARCH_LIBS test is needed) if test "x$preload_enabled" = "xt" -a "x${ac_cv_search_connect}" = "x-lsocket"; then cat >>confdefs.h <<_ACEOF #define LIBRARY_LIBSOCKET "${base_library_path}libsocket.${SOLIB_POSTFIX}" _ACEOF SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}libsocket.${SOLIB_POSTFIX}" cat >>confdefs.h <<\_ACEOF #define LIBRARY_CONNECT LIBRARY_LIBSOCKET _ACEOF echo "$as_me:$LINENO: checking for accept in -lsocket" >&5 echo $ECHO_N "checking for accept in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_accept+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char accept (); int main () { accept (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_accept=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_accept=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_accept" >&5 echo "${ECHO_T}$ac_cv_lib_socket_accept" >&6 if test $ac_cv_lib_socket_accept = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_ACCEPT LIBRARY_LIBSOCKET _ACEOF fi echo "$as_me:$LINENO: checking for bind in -lsocket" >&5 echo $ECHO_N "checking for bind in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_bind+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char bind (); int main () { bind (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_bind=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_bind=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_bind" >&5 echo "${ECHO_T}$ac_cv_lib_socket_bind" >&6 if test $ac_cv_lib_socket_bind = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_BIND LIBRARY_LIBSOCKET _ACEOF fi echo "$as_me:$LINENO: checking for bindresvport in -lsocket" >&5 echo $ECHO_N "checking for bindresvport in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_bindresvport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char bindresvport (); int main () { bindresvport (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_bindresvport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_bindresvport=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_bindresvport" >&5 echo "${ECHO_T}$ac_cv_lib_socket_bindresvport" >&6 if test $ac_cv_lib_socket_bindresvport = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_BINDRESVPORT LIBRARY_LIBSOCKET _ACEOF fi echo "$as_me:$LINENO: checking for getpeername in -lsocket" >&5 echo $ECHO_N "checking for getpeername in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_getpeername+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getpeername (); int main () { getpeername (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_getpeername=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_getpeername=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getpeername" >&5 echo "${ECHO_T}$ac_cv_lib_socket_getpeername" >&6 if test $ac_cv_lib_socket_getpeername = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_GETPEERNAME LIBRARY_LIBSOCKET _ACEOF fi echo "$as_me:$LINENO: checking for getsockname in -lsocket" >&5 echo $ECHO_N "checking for getsockname in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_getsockname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getsockname (); int main () { getsockname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_getsockname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_getsockname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getsockname" >&5 echo "${ECHO_T}$ac_cv_lib_socket_getsockname" >&6 if test $ac_cv_lib_socket_getsockname = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_GETSOCKNAME LIBRARY_LIBSOCKET _ACEOF fi echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5 echo $ECHO_N "checking for getaddrinfo in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getaddrinfo (); int main () { getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_getaddrinfo=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5 echo "${ECHO_T}$ac_cv_lib_socket_getaddrinfo" >&6 if test $ac_cv_lib_socket_getaddrinfo = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_GETADDRINFO LIBRARY_LIBSOCKET _ACEOF fi echo "$as_me:$LINENO: checking for freehostent in -lsocket" >&5 echo $ECHO_N "checking for freehostent in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_freehostent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char freehostent (); int main () { freehostent (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_freehostent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_freehostent=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_freehostent" >&5 echo "${ECHO_T}$ac_cv_lib_socket_freehostent" >&6 if test $ac_cv_lib_socket_freehostent = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_FREEHOSTENT LIBRARY_LIBSOCKET _ACEOF fi echo "$as_me:$LINENO: checking for recvfrom in -lsocket" >&5 echo $ECHO_N "checking for recvfrom in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_recvfrom+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char recvfrom (); int main () { recvfrom (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_recvfrom=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_recvfrom=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_recvfrom" >&5 echo "${ECHO_T}$ac_cv_lib_socket_recvfrom" >&6 if test $ac_cv_lib_socket_recvfrom = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_RECVFROM LIBRARY_LIBSOCKET _ACEOF fi echo "$as_me:$LINENO: checking for rresvport in -lsocket" >&5 echo $ECHO_N "checking for rresvport in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_rresvport+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char rresvport (); int main () { rresvport (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_rresvport=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_rresvport=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_rresvport" >&5 echo "${ECHO_T}$ac_cv_lib_socket_rresvport" >&6 if test $ac_cv_lib_socket_rresvport = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_RRESVPORT LIBRARY_LIBSOCKET _ACEOF fi echo "$as_me:$LINENO: checking for recvmsg in -lsocket" >&5 echo $ECHO_N "checking for recvmsg in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_recvmsg+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char recvmsg (); int main () { recvmsg (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_recvmsg=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_recvmsg=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_recvmsg" >&5 echo "${ECHO_T}$ac_cv_lib_socket_recvmsg" >&6 if test $ac_cv_lib_socket_recvmsg = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_RECVMSG LIBRARY_LIBSOCKET _ACEOF fi echo "$as_me:$LINENO: checking for sendmsg in -lsocket" >&5 echo $ECHO_N "checking for sendmsg in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_sendmsg+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char sendmsg (); int main () { sendmsg (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_sendmsg=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_sendmsg=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_sendmsg" >&5 echo "${ECHO_T}$ac_cv_lib_socket_sendmsg" >&6 if test $ac_cv_lib_socket_sendmsg = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_SENDMSG LIBRARY_LIBSOCKET _ACEOF fi echo "$as_me:$LINENO: checking for send in -lsocket" >&5 echo $ECHO_N "checking for send in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_send+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char send (); int main () { send (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_send=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_send=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_send" >&5 echo "${ECHO_T}$ac_cv_lib_socket_send" >&6 if test $ac_cv_lib_socket_send = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_SEND LIBRARY_LIBSOCKET _ACEOF fi echo "$as_me:$LINENO: checking for recv in -lsocket" >&5 echo $ECHO_N "checking for recv in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_recv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char recv (); int main () { recv (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_recv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_recv=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_recv" >&5 echo "${ECHO_T}$ac_cv_lib_socket_recv" >&6 if test $ac_cv_lib_socket_recv = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_RECV LIBRARY_LIBSOCKET _ACEOF fi echo "$as_me:$LINENO: checking for sendto in -lsocket" >&5 echo $ECHO_N "checking for sendto in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_sendto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char sendto (); int main () { sendto (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_sendto=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_sendto=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_sendto" >&5 echo "${ECHO_T}$ac_cv_lib_socket_sendto" >&6 if test $ac_cv_lib_socket_sendto = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_SENDTO LIBRARY_LIBSOCKET _ACEOF fi fi #doesn't work if test links with -lsocket (Solaris) echo "$as_me:$LINENO: checking for library containing inet_addr" >&5 echo $ECHO_N "checking for library containing inet_addr... $ECHO_C" >&6 if test "${ac_cv_search_inet_addr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_inet_addr=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char inet_addr (); int main () { inet_addr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_inet_addr="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_inet_addr" = no; then for ac_lib in nsl; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char inet_addr (); int main () { inet_addr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_inet_addr="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_inet_addr" >&5 echo "${ECHO_T}$ac_cv_search_inet_addr" >&6 if test "$ac_cv_search_inet_addr" != no; then test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS" fi NLIBS="${NLIBS}${NLIBS:+ }$LIBS" LIBS="" if test "x$preload_enabled" = "xt" -a "x${ac_cv_search_inet_addr}" = "x-lnsl"; then cat >>confdefs.h <<_ACEOF #define LIBRARY_LIBNSL "${base_library_path}libnsl.${SOLIB_POSTFIX}" _ACEOF SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}libnsl.${SOLIB_POSTFIX}" echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_GETHOSTBYNAME LIBRARY_LIBNSL _ACEOF fi echo "$as_me:$LINENO: checking for gethostbyaddr in -lnsl" >&5 echo $ECHO_N "checking for gethostbyaddr in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyaddr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyaddr (); int main () { gethostbyaddr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyaddr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyaddr=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyaddr" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyaddr" >&6 if test $ac_cv_lib_nsl_gethostbyaddr = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_GETHOSTBYADDR LIBRARY_LIBNSL _ACEOF fi echo "$as_me:$LINENO: checking for freehostent in -lnsl" >&5 echo $ECHO_N "checking for freehostent in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_freehostent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char freehostent (); int main () { freehostent (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_freehostent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_freehostent=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_freehostent" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_freehostent" >&6 if test $ac_cv_lib_nsl_freehostent = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_FREEHOSTENT LIBRARY_LIBNSL _ACEOF fi echo "$as_me:$LINENO: checking for getipnodebyname in -lnsl" >&5 echo $ECHO_N "checking for getipnodebyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_getipnodebyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getipnodebyname (); int main () { getipnodebyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_getipnodebyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_getipnodebyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_getipnodebyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_getipnodebyname" >&6 if test $ac_cv_lib_nsl_getipnodebyname = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_GETIPNODEBYNAME LIBRARY_LIBNSL _ACEOF fi fi #XXX used for anything but gethostbyname2? consider testing for it # on Solaris (atleast 2.6, gcc) #linking with -lresolv results in error unless -shared is included #since gcc insists on linking statically with libresolv for which #no static version exists echo "$as_me:$LINENO: checking for library containing inet_aton" >&5 echo $ECHO_N "checking for library containing inet_aton... $ECHO_C" >&6 if test "${ac_cv_search_inet_aton+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_inet_aton=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char inet_aton (); int main () { inet_aton (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_inet_aton="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_inet_aton" = no; then for ac_lib in resolv; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char inet_aton (); int main () { inet_aton (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_inet_aton="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_inet_aton" >&5 echo "${ECHO_T}$ac_cv_search_inet_aton" >&6 if test "$ac_cv_search_inet_aton" != no; then test "$ac_cv_search_inet_aton" = "none required" || LIBS="$ac_cv_search_inet_aton $LIBS" fi echo "$as_me:$LINENO: checking for library containing res_9_init" >&5 echo $ECHO_N "checking for library containing res_9_init... $ECHO_C" >&6 if test "${ac_cv_search_res_9_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_res_9_init=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char res_9_init (); int main () { res_9_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_res_9_init="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_res_9_init" = no; then for ac_lib in resolv; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char res_9_init (); int main () { res_9_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_res_9_init="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_res_9_init" >&5 echo "${ECHO_T}$ac_cv_search_res_9_init" >&6 if test "$ac_cv_search_res_9_init" != no; then test "$ac_cv_search_res_9_init" = "none required" || LIBS="$ac_cv_search_res_9_init $LIBS" fi NLIBS="${NLIBS}${NLIBS:+ }$LIBS" LIBS="" if test "x$preload_enabled" = "xt" -a "x${ac_cv_search_inet_aton}" = "x-lresolv"; then cat >>confdefs.h <<_ACEOF #define LIBRARY_LIBRESOLV "${base_library_path}libresolv.${SOLIB_POSTFIX}" _ACEOF SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}libresolv.${SOLIB_POSTFIX}" echo "$as_me:$LINENO: checking for gethostbyname2 in -lresolv" >&5 echo $ECHO_N "checking for gethostbyname2 in -lresolv... $ECHO_C" >&6 if test "${ac_cv_lib_resolv_gethostbyname2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname2 (); int main () { gethostbyname2 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_resolv_gethostbyname2=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_resolv_gethostbyname2=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_gethostbyname2" >&5 echo "${ECHO_T}$ac_cv_lib_resolv_gethostbyname2" >&6 if test $ac_cv_lib_resolv_gethostbyname2 = yes; then cat >>confdefs.h <<\_ACEOF #define LIBRARY_GETHOSTBYNAME2 LIBRARY_LIBRESOLV _ACEOF fi fi #XXX gcc on Solaris (using gnu ld) doesn't seems to implicitly link #with libdl in this test, which means that libdl will not be included #in socksify. if test "x$preload_enabled" = "xt"; then echo "$as_me:$LINENO: checking for library containing dlopen" >&5 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6 if test "${ac_cv_search_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_dlopen=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_dlopen="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_dlopen" = no; then for ac_lib in dl; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_dlopen="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5 echo "${ECHO_T}$ac_cv_search_dlopen" >&6 if test "$ac_cv_search_dlopen" != no; then test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS" fi NLIBS="${NLIBS}${NLIBS:+ }$LIBS" LIBS="" if test "x${ac_cv_search_dlopen}" = "x-ldl"; then case $host in *-*-sunos4*) #XXX attempt to get libdl name libdl=`ls ${base_library_path}libdl.${SOLIB_POSTFIX}* | sed -e 's/.*\///' | sort -nr | head -n 1` if test x$libdl = x; then { echo "$as_me:$LINENO: WARNING: unable to locate libdl" >&5 echo "$as_me: WARNING: unable to locate libdl" >&2;} else LIBRARY_DLOPEN=${base_library_path}${libdl} { echo "$as_me:$LINENO: WARNING: hardcoding libdl to $LIBRARY_DLOPEN" >&5 echo "$as_me: WARNING: hardcoding libdl to $LIBRARY_DLOPEN" >&2;} fi ;; *) LIBRARY_DLOPEN="${base_library_path}libdl.${SOLIB_POSTFIX}" ;; esac SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${LIBRARY_DLOPEN:+${PRELOAD_SEPERATOR}}${LIBRARY_DLOPEN}" fi fi LIBS="$oLIBS $NLIBS" #specify location of the socks library in socksify too #NOTE: exec_prefix and prefix have the value NONE here if they are unset o_exec_prefix=${exec_prefix} o_prefix=${prefix} if test x${prefix} = xNONE; then prefix=$ac_default_prefix fi if test x${exec_prefix} = xNONE; then exec_prefix=$prefix fi LIBRARY_PREFIX=`eval echo \$libdir` LIBRARY_PREFIX=`eval echo \$LIBRARY_PREFIX` exec_prefix=${o_exec_prefix} prefix=${o_prefix} #allow user to specify libc name, use default value otherwise echo "$as_me:$LINENO: checking for libc name" >&5 echo $ECHO_N "checking for libc name... $ECHO_C" >&6 # Check whether --with-libc or --without-libc was given. if test "${with_libc+set}" = set; then withval="$with_libc" LIBC_NAME=$withval fi; #set default? if test "x${LIBC_NAME}" = x; then case $host in *-*-linux-*) #XXX attempt to find latest c library #can't set it to libc.so directly, might be ld script LIBC_NAME=`ls /usr/lib/libc.so* /lib/libc.so* | sed -e 's/.*\///' | sort -nr | head -n 1` if test "x${LIBC_NAME}" = x; then #nothing found, set libc.so anyway LIBC_NAME="${base_library_path}libc.so" fi ;; *) LIBC_NAME="${base_library_path}libc.${SOLIB_POSTFIX}" ;; esac fi echo "$as_me:$LINENO: result: ${LIBC_NAME}" >&5 echo "${ECHO_T}${LIBC_NAME}" >&6 cat >>confdefs.h <<_ACEOF #define LIBRARY_LIBC "${LIBC_NAME}" _ACEOF if test "x${ac_cv_header_tcpd_h}" = "xyes"; then case $host in *-*-linux-*) #XXX needed on atleast redhat echo "$as_me:$LINENO: checking for library containing yp_get_default_domain" >&5 echo $ECHO_N "checking for library containing yp_get_default_domain... $ECHO_C" >&6 if test "${ac_cv_search_yp_get_default_domain+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_yp_get_default_domain=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char yp_get_default_domain (); int main () { yp_get_default_domain (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_yp_get_default_domain="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_yp_get_default_domain" = no; then for ac_lib in nsl; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char yp_get_default_domain (); int main () { yp_get_default_domain (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_yp_get_default_domain="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_yp_get_default_domain" >&5 echo "${ECHO_T}$ac_cv_search_yp_get_default_domain" >&6 if test "$ac_cv_search_yp_get_default_domain" != no; then test "$ac_cv_search_yp_get_default_domain" = "none required" || LIBS="$ac_cv_search_yp_get_default_domain $LIBS" fi ;; esac oLIBS=$LIBS echo "$as_me:$LINENO: checking for libwrap" >&5 echo $ECHO_N "checking for libwrap... $ECHO_C" >&6 if test x$no_libwrap = xt; then echo "disabled" else LIBS="$LIBS -lwrap" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int allow_severity; int deny_severity; int main () { hosts_access(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_LIBWRAP 1 _ACEOF want_libwrap=t else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi LIBS="$oLIBS" fi #programs wanting libwrap should test for this Makefile.am conditional #(programs which don't use it probably won't enjoy being linked with it) if test "x${want_libwrap}" != "x"; then WANT_LIBWRAP_TRUE= WANT_LIBWRAP_FALSE='#' else WANT_LIBWRAP_TRUE='#' WANT_LIBWRAP_FALSE= fi # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" PAM=$withval fi; if test "${PAM}" != no; then #look for PAM header and lib for ac_header in security/pam_appl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF have_pam_header=t fi done echo "$as_me:$LINENO: checking for library containing pam_start" >&5 echo $ECHO_N "checking for library containing pam_start... $ECHO_C" >&6 if test "${ac_cv_search_pam_start+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_pam_start=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char pam_start (); int main () { pam_start (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_pam_start="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_pam_start" = no; then for ac_lib in pam; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char pam_start (); int main () { pam_start (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_pam_start="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_pam_start" >&5 echo "${ECHO_T}$ac_cv_search_pam_start" >&6 if test "$ac_cv_search_pam_start" != no; then test "$ac_cv_search_pam_start" = "none required" || LIBS="$ac_cv_search_pam_start $LIBS" have_libpam=t fi if test x"${have_pam_header}" != x -a x"${have_libpam}" != x; then cat >>confdefs.h <<\_ACEOF #define HAVE_PAM 1 _ACEOF fi fi #expected select behaviour? unset nb_select_err echo "$as_me:$LINENO: checking for expected select behaviour" >&5 echo $ECHO_N "checking for expected select behaviour... $ECHO_C" >&6 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* * ftp.inet.no:/pub/home/michaels/stuff/socket-select.c * $ cc socket-select.c && uname -a && ./a.out * * Thanks to Eric Anderson . * */ #include #include #include #include #include #include #include #include #include #include #include #define BLOCKING(b) (b ? ("blocking") : ("non-blocking")) static int selectcheck(int s); static int dotests(int s, int blocking); int main(void) { int s, p; struct sigaction sigact; sigemptyset(&sigact.sa_mask); sigact.sa_handler = SIG_IGN; sigact.sa_flags = 0; if (sigaction(SIGPIPE, &sigact, NULL) != 0) { perror("sigaction()"); exit(1); } if ((s = socket(AF_INET, SOCK_STREAM, 0)) == -1) { perror("socket()"); exit(1); } if ((p = fcntl(s, F_GETFL, 0)) == -1 || fcntl(s, F_SETFL, p | O_NONBLOCK) == -1) { perror("fcntl()"); exit(1); } p = dotests(s, 0); close(s); return p; } static int dotests(s, blocking) int s; int blocking; { int p, rc; struct sockaddr_in addr; fprintf(stderr, "testing with %s, bound, socket:\n", BLOCKING(blocking)); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl(INADDR_ANY); addr.sin_port = htons(0); /* LINTED pointer casts may be troublesome */ if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) != 0) { perror("bind(), running linux?"); exit(1); } fprintf(stderr, "\tselect() returned %d\n", selectcheck(s)); p = read(s, NULL, 0); fprintf(stderr, "\tread() returned %d, errno = %d (%s)\n", p, errno, (strerror(errno))); p = write(s, &s, sizeof(s)); fprintf(stderr, "\twrite() returned %d, errno = %d (%s)\n", p, errno, (strerror(errno))); fprintf(stderr, "testing with %s, bound, listening, socket:\n", BLOCKING(blocking)); if (listen(s, 1) != 0) { perror("listen()"); exit(1); } fprintf(stderr, "\tselect() returned %d\n", rc = selectcheck(s)); p = read(s, NULL, 0); fprintf(stderr, "\tread() returned %d, errno = %d (%s)\n", p, errno, (strerror(errno))); p = write(s, &s, sizeof(s)); fprintf(stderr, "\twrite() returned %d, errno = %d (%s)\n", p, errno, (strerror(errno))); return rc; } static int selectcheck(s) int s; { fd_set rset, wset, xset; struct timeval timeout; int ret; FD_ZERO(&rset); FD_SET(s, &rset); wset = xset = rset; timeout.tv_sec = 0; timeout.tv_usec = 0; errno = 0; ret = select(s + 1, &rset, &wset, &xset, &timeout); if (FD_ISSET(s, &rset)) fprintf(stderr, "\tsocket is readable\n"); if (FD_ISSET(s, &wset)) fprintf(stderr, "\tsocket is writeable\n"); if (FD_ISSET(s, &xset)) fprintf(stderr, "\tsocket has an exception pending\n"); return ret; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 nb_select_err=t fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test x"${nb_select_err}" = xt; then { echo "$as_me:$LINENO: WARNING: operations on nonblocking sockets might fail on this platform" >&5 echo "$as_me: WARNING: operations on nonblocking sockets might fail on this platform" >&2;} fi echo "$as_me:$LINENO: checking for object file type" >&5 echo $ECHO_N "checking for object file type... $ECHO_C" >&6 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* look for ELF identification header at the start of argv[0] */ #include #include #include /* * ELF header, from ELF standard (Portable Formats Specification, * Version 1.1). */ char elfheader[] = { 0x7f, 'E', 'L', 'F' }; int main (argc, argv) int argc; char *argv[]; { int fd; int len = sizeof(elfheader); char header[len]; if ((fd = open(argv[0], O_RDONLY, 0)) == -1) { perror("open"); exit(1); } if (read(fd, header, len) != len) { perror("read"); exit(1); } if (memcmp(header, elfheader, len) == 0) exit(0); /* pointy ears */ else exit(1); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: elf" >&5 echo "${ECHO_T}elf" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_NO_SYMBOL_UNDERSCORE 1 _ACEOF else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) #XXX exceptions for coff platforms, should be detected automatically case $host in alpha*-dec-osf*) cat >>confdefs.h <<\_ACEOF #define HAVE_NO_SYMBOL_UNDERSCORE 1 _ACEOF echo "$as_me:$LINENO: result: coff" >&5 echo "${ECHO_T}coff" >&6 ;; *-*-hpux*) #XXX apparently does not use underscore cat >>confdefs.h <<\_ACEOF #define HAVE_NO_SYMBOL_UNDERSCORE 1 _ACEOF echo "$as_me:$LINENO: result: a.out?" >&5 echo "${ECHO_T}a.out?" >&6 ;; *) echo "$as_me:$LINENO: result: a.out" >&5 echo "${ECHO_T}a.out" >&6 ;; esac fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi #try to detect gcc bug (irix 64 problem, affects among others inet_ntoa) echo "$as_me:$LINENO: checking for incorrect inet_ntoa behaviour" >&5 echo $ECHO_N "checking for incorrect inet_ntoa behaviour... $ECHO_C" >&6 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main(void) { struct sockaddr_in addr; char *a, *b = "195.195.195.195"; addr.sin_addr.s_addr = inet_addr(b); a = inet_ntoa(addr.sin_addr); if (strcmp(a, b) == 0) return 1; else return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\_ACEOF #define HAVE_BROKEN_INET_NTOA 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: checking for __libc_enable_secure" >&5 echo $ECHO_N "checking for __libc_enable_secure... $ECHO_C" >&6 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern int __libc_enable_secure; int main() { if (__libc_enable_secure == 0) return 0; return 1; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_LIBC_ENABLE_SECURE 1 _ACEOF else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi #Linux (redhat 5.2) defines socklen_t in , which is #included by . check for this first. echo "$as_me:$LINENO: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { socklen_t foo = 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 socklen_found=t else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 socklen_found="" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x"$socklen_found" = x; then case $host in alpha*-dec-osf* | *-*-aix*) cat >>confdefs.h <<\_ACEOF #define socklen_t size_t _ACEOF ;; *) cat >>confdefs.h <<\_ACEOF #define socklen_t int _ACEOF ;; esac fi #sig_atomic_t echo "$as_me:$LINENO: checking for sig_atomic_t in " >&5 echo $ECHO_N "checking for sig_atomic_t in ... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sig_atomic_t" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define HAVE_SIG_ATOMIC_T 1 _ACEOF case $host in *-*-aix*) cat >>confdefs.h <<\_ACEOF #define HAVE_VOLATILE_SIG_ATOMIC_T 1 _ACEOF ;; esac echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* echo "$as_me:$LINENO: checking for int8_t" >&5 echo $ECHO_N "checking for int8_t... $ECHO_C" >&6 if test "${ac_cv_type_int8_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if ((int8_t *) 0) return 0; if (sizeof (int8_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int8_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int8_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int8_t" >&5 echo "${ECHO_T}$ac_cv_type_int8_t" >&6 if test $ac_cv_type_int8_t = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INT8_T 1 _ACEOF fi echo "$as_me:$LINENO: checking for int16_t" >&5 echo $ECHO_N "checking for int16_t... $ECHO_C" >&6 if test "${ac_cv_type_int16_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if ((int16_t *) 0) return 0; if (sizeof (int16_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int16_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int16_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5 echo "${ECHO_T}$ac_cv_type_int16_t" >&6 if test $ac_cv_type_int16_t = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INT16_T 1 _ACEOF fi echo "$as_me:$LINENO: checking for int32_t" >&5 echo $ECHO_N "checking for int32_t... $ECHO_C" >&6 if test "${ac_cv_type_int32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if ((int32_t *) 0) return 0; if (sizeof (int32_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int32_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int32_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5 echo "${ECHO_T}$ac_cv_type_int32_t" >&6 if test $ac_cv_type_int32_t = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INT32_T 1 _ACEOF fi echo "$as_me:$LINENO: checking for uint8_t" >&5 echo $ECHO_N "checking for uint8_t... $ECHO_C" >&6 if test "${ac_cv_type_uint8_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if ((uint8_t *) 0) return 0; if (sizeof (uint8_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_uint8_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint8_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5 echo "${ECHO_T}$ac_cv_type_uint8_t" >&6 if test $ac_cv_type_uint8_t = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_UINT8_T 1 _ACEOF fi echo "$as_me:$LINENO: checking for uint16_t" >&5 echo $ECHO_N "checking for uint16_t... $ECHO_C" >&6 if test "${ac_cv_type_uint16_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if ((uint16_t *) 0) return 0; if (sizeof (uint16_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_uint16_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint16_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5 echo "${ECHO_T}$ac_cv_type_uint16_t" >&6 if test $ac_cv_type_uint16_t = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_UINT16_T 1 _ACEOF fi echo "$as_me:$LINENO: checking for uint32_t" >&5 echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6 if test "${ac_cv_type_uint32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if ((uint32_t *) 0) return 0; if (sizeof (uint32_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_uint32_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint32_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5 echo "${ECHO_T}$ac_cv_type_uint32_t" >&6 if test $ac_cv_type_uint32_t = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_UINT32_T 1 _ACEOF fi echo "$as_me:$LINENO: checking for in_port_t" >&5 echo $ECHO_N "checking for in_port_t... $ECHO_C" >&6 if test "${ac_cv_type_in_port_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if ((in_port_t *) 0) return 0; if (sizeof (in_port_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_in_port_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_in_port_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_in_port_t" >&5 echo "${ECHO_T}$ac_cv_type_in_port_t" >&6 if test $ac_cv_type_in_port_t = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_IN_PORT_T 1 _ACEOF fi echo "$as_me:$LINENO: checking for in_addr_t" >&5 echo $ECHO_N "checking for in_addr_t... $ECHO_C" >&6 if test "${ac_cv_type_in_addr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if ((in_addr_t *) 0) return 0; if (sizeof (in_addr_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_in_addr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_in_addr_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_in_addr_t" >&5 echo "${ECHO_T}$ac_cv_type_in_addr_t" >&6 if test $ac_cv_type_in_addr_t = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_IN_ADDR_T 1 _ACEOF fi echo "$as_me:$LINENO: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((ssize_t *) 0) return 0; if (sizeof (ssize_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ssize_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 if test $ac_cv_type_ssize_t = yes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi if test $ac_cv_c_compiler_gnu = yes; then echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 if test "${ac_cv_prog_gcc_traditional+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi echo "$as_me:$LINENO: checking for working memcmp" >&5 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_memcmp_working=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) exit (1); } exit (0); } ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_memcmp_working=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in "memcmp.$ac_objext" | \ *" memcmp.$ac_objext" | \ "memcmp.$ac_objext "* | \ *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac echo "$as_me:$LINENO: checking for function prototypes" >&5 echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6 if test "$ac_cv_prog_cc_stdc" != no; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define PROTOTYPES 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define __PROTOTYPES 1 _ACEOF else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi echo "$as_me:$LINENO: checking whether setvbuf arguments are reversed" >&5 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_func_setvbuf_reversed=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include # if PROTOTYPES int (setvbuf) (FILE *, int, char *, size_t); # endif int main () { char buf; return setvbuf (stdout, _IOLBF, &buf, 1); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include # if PROTOTYPES int (setvbuf) (FILE *, int, char *, size_t); # endif int main () { char buf; return setvbuf (stdout, &buf, _IOLBF, 1); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # It compiles and links either way, so it must not be declared # with a prototype and most likely this is a K&R C compiler. # Try running it. if test "$cross_compiling" = yes; then : # Assume setvbuf is not reversed when cross-compiling. else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { /* This call has the arguments reversed. A reversed system may check and see that the address of buf is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ char buf; if (setvbuf (stdout, _IOLBF, &buf, 1) != 0) exit (1); putchar ('\r'); exit (0); /* Non-reversed systems SEGV here. */ ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_setvbuf_reversed=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) rm -f core *.core fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi ac_cv_func_setvbuf_reversed=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_setvbuf_reversed" >&5 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6 if test $ac_cv_func_setvbuf_reversed = yes; then cat >>confdefs.h <<\_ACEOF #define SETVBUF_REVERSED 1 _ACEOF fi echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef signal # undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=int fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in strftime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else # strftime is in -lintl on SCO UNIX. echo "$as_me:$LINENO: checking for strftime in -lintl" >&5 echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_strftime+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strftime (); int main () { strftime (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_strftime=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_strftime=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5 echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6 if test $ac_cv_lib_intl_strftime = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STRFTIME 1 _ACEOF LIBS="-lintl $LIBS" fi fi done echo "$as_me:$LINENO: checking whether utime accepts a null argument" >&5 echo $ECHO_N "checking whether utime accepts a null argument... $ECHO_C" >&6 if test "${ac_cv_func_utime_null+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftest.data; >conftest.data # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. if test "$cross_compiling" = yes; then ac_cv_func_utime_null=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat s, t; exit (!(stat ("conftest.data", &s) == 0 && utime ("conftest.data", (long *)0) == 0 && stat ("conftest.data", &t) == 0 && t.st_mtime >= s.st_mtime && t.st_mtime - s.st_mtime < 120)); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_utime_null=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_utime_null=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f core *.core fi echo "$as_me:$LINENO: result: $ac_cv_func_utime_null" >&5 echo "${ECHO_T}$ac_cv_func_utime_null" >&6 if test $ac_cv_func_utime_null = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_UTIME_NULL 1 _ACEOF fi rm -f conftest.data for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub__doprnt) || defined (__stub____doprnt) choke me #else char (*f) () = _doprnt; #endif #ifdef __cplusplus } #endif int main () { return f != _doprnt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6 if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_func in select socket strcspn strdup strspn hstrerror issetugid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in strvis vsnprintf getdtablesize sysconf inet_pton vsyslog do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in daemon bzero sockatmark difftime memmove seteuid setproctitle do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in inet_aton gethostbyname2 getaddrinfo getipnodebyname do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getprpwnam getspnam getifaddrs freeifaddrs bindresvport do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in setegid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for system V getpwnam" >&5 echo $ECHO_N "checking for system V getpwnam... $ECHO_C" >&6 unset getpwnam_alt if test x"${ac_cv_func_getprpwnam}" = xyes; then getpwnam_alt=t fi if test x"${ac_cv_func_getspnam}" = xyes; then getpwnam_alt=t fi #XXX if test x"${getpwnam_alt}" = x; then cat >>confdefs.h <<\_ACEOF #define HAVE_WORKING_GETPWNAM 1 _ACEOF echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 else echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 fi #sun4 seems to have a profiled libc missing strerror if test x$s_profiling = x; then for ac_func in strerror do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done else case $host in *-*-sunos4*) { echo "$as_me:$LINENO: WARNING: omitting strerror test on sunos4 with profiling enabled" >&5 echo "$as_me: WARNING: omitting strerror test on sunos4 with profiling enabled" >&2;} ;; *) for ac_func in strerror do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ;; esac fi if false; then cat >>confdefs.h <<\_ACEOF #define HAVE_DUMPCONF 1 _ACEOF fi #look for modules, and check version echo "$as_me:$LINENO: checking for module bandwidth" >&5 echo $ECHO_N "checking for module bandwidth... $ECHO_C" >&6 if test -f "licensed/bandwidth.c"; then MODVERSION=`awk '/Id:/{ split($''4,a,".");print a[2]; exit }' licensed/bandwidth.c` if test "$MODVERSION" -lt "31"; then echo "" echo "You have a outdated version of the bandwidth module." echo "Please contact Inferno Nettverk A/S for an updated" echo "version before you attempt to compile." echo "Inferno Nettverk A/S can be reached at info@inet.no." echo "" echo "There is no additional cost for upgrading." exit 1 fi unset MOD_BANDWIDTH cat >>confdefs.h <<\_ACEOF #define HAVE_MODULE_BANDWIDTH 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else MOD_BANDWIDTH=un echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ac_sources="${MOD_BANDWIDTH}licensed/bandwidth.c" ac_dests="sockd/bandwidth.c" while test -n "$ac_sources"; do set $ac_dests; ac_dest=$1; shift; ac_dests=$* set $ac_sources; ac_source=$1; shift; ac_sources=$* ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" done ac_config_links="$ac_config_links $ac_config_links_1" if test x"" != xnokey; then ac_sources="${MOD_BANDWIDTH}licensed/bandwidth_key.c" ac_dests="sockd/bandwidth_key.c" while test -n "$ac_sources"; do set $ac_dests; ac_dest=$1; shift; ac_dests=$* set $ac_sources; ac_source=$1; shift; ac_sources=$* ac_config_links_2="$ac_config_links_2 $ac_dest:$ac_source" done ac_config_links="$ac_config_links $ac_config_links_2" fi #module name, version echo "$as_me:$LINENO: checking for module redirect" >&5 echo $ECHO_N "checking for module redirect... $ECHO_C" >&6 if test -f "licensed/redirect.c"; then MODVERSION=`awk '/Id:/{ split($''4,a,".");print a[2]; exit }' licensed/redirect.c` if test "$MODVERSION" -lt "18"; then echo "" echo "You have a outdated version of the redirect module." echo "Please contact Inferno Nettverk A/S for an updated" echo "version before you attempt to compile." echo "Inferno Nettverk A/S can be reached at info@inet.no." echo "" echo "There is no additional cost for upgrading." exit 1 fi unset MOD_REDIRECT cat >>confdefs.h <<\_ACEOF #define HAVE_MODULE_REDIRECT 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else MOD_REDIRECT=un echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ac_sources="${MOD_REDIRECT}licensed/redirect.c" ac_dests="sockd/redirect.c" while test -n "$ac_sources"; do set $ac_dests; ac_dest=$1; shift; ac_dests=$* set $ac_sources; ac_source=$1; shift; ac_sources=$* ac_config_links_3="$ac_config_links_3 $ac_dest:$ac_source" done ac_config_links="$ac_config_links $ac_config_links_3" if test x"" != xnokey; then ac_sources="${MOD_REDIRECT}licensed/redirect_key.c" ac_dests="sockd/redirect_key.c" while test -n "$ac_sources"; do set $ac_dests; ac_dest=$1; shift; ac_dests=$* set $ac_sources; ac_source=$1; shift; ac_sources=$* ac_config_links_4="$ac_config_links_4 $ac_dest:$ac_source" done ac_config_links="$ac_config_links $ac_config_links_4" fi echo "$as_me:$LINENO: checking for module session" >&5 echo $ECHO_N "checking for module session... $ECHO_C" >&6 if test -f "licensed/session.c"; then MODVERSION=`awk '/Id:/{ split($''4,a,".");print a[2]; exit }' licensed/session.c` if test "$MODVERSION" -lt "3"; then echo "" echo "You have a outdated version of the session module." echo "Please contact Inferno Nettverk A/S for an updated" echo "version before you attempt to compile." echo "Inferno Nettverk A/S can be reached at info@inet.no." echo "" echo "There is no additional cost for upgrading." exit 1 fi unset MOD_SESSION cat >>confdefs.h <<\_ACEOF #define HAVE_MODULE_SESSION 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else MOD_SESSION=un echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ac_sources="${MOD_SESSION}licensed/session.c" ac_dests="sockd/session.c" while test -n "$ac_sources"; do set $ac_dests; ac_dest=$1; shift; ac_dests=$* set $ac_sources; ac_source=$1; shift; ac_sources=$* ac_config_links_5="$ac_config_links_5 $ac_dest:$ac_source" done ac_config_links="$ac_config_links $ac_config_links_5" if test x"" != xnokey; then ac_sources="${MOD_SESSION}licensed/session_key.c" ac_dests="sockd/session_key.c" while test -n "$ac_sources"; do set $ac_dests; ac_dest=$1; shift; ac_dests=$* set $ac_sources; ac_source=$1; shift; ac_sources=$* ac_config_links_6="$ac_config_links_6 $ac_dest:$ac_source" done ac_config_links="$ac_config_links $ac_config_links_6" fi #helper files echo "$as_me:$LINENO: checking for module checkmodule" >&5 echo $ECHO_N "checking for module checkmodule... $ECHO_C" >&6 if test -f "licensed/checkmodule.c"; then MODVERSION=`awk '/Id:/{ split($''4,a,".");print a[2]; exit }' licensed/checkmodule.c` if test "$MODVERSION" -lt "1"; then echo "" echo "You have a outdated version of the checkmodule module." echo "Please contact Inferno Nettverk A/S for an updated" echo "version before you attempt to compile." echo "Inferno Nettverk A/S can be reached at info@inet.no." echo "" echo "There is no additional cost for upgrading." exit 1 fi unset MOD_CHECKMODULE cat >>confdefs.h <<\_ACEOF #define HAVE_MODULE_CHECKMODULE 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else MOD_CHECKMODULE=un echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ac_sources="${MOD_CHECKMODULE}licensed/checkmodule.c" ac_dests="sockd/checkmodule.c" while test -n "$ac_sources"; do set $ac_dests; ac_dest=$1; shift; ac_dests=$* set $ac_sources; ac_source=$1; shift; ac_sources=$* ac_config_links_7="$ac_config_links_7 $ac_dest:$ac_source" done ac_config_links="$ac_config_links $ac_config_links_7" if test x"nokey" != xnokey; then ac_sources="${MOD_CHECKMODULE}licensed/checkmodule_key.c" ac_dests="sockd/checkmodule_key.c" while test -n "$ac_sources"; do set $ac_dests; ac_dest=$1; shift; ac_dests=$* set $ac_sources; ac_source=$1; shift; ac_sources=$* ac_config_links_8="$ac_config_links_8 $ac_dest:$ac_source" done ac_config_links="$ac_config_links $ac_config_links_8" fi echo "$as_me:$LINENO: checking for module shmem" >&5 echo $ECHO_N "checking for module shmem... $ECHO_C" >&6 if test -f "licensed/shmem.c"; then MODVERSION=`awk '/Id:/{ split($''4,a,".");print a[2]; exit }' licensed/shmem.c` if test "$MODVERSION" -lt "1"; then echo "" echo "You have a outdated version of the shmem module." echo "Please contact Inferno Nettverk A/S for an updated" echo "version before you attempt to compile." echo "Inferno Nettverk A/S can be reached at info@inet.no." echo "" echo "There is no additional cost for upgrading." exit 1 fi unset MOD_SHMEM cat >>confdefs.h <<\_ACEOF #define HAVE_MODULE_SHMEM 1 _ACEOF echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else MOD_SHMEM=un echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ac_sources="${MOD_SHMEM}licensed/shmem.c" ac_dests="sockd/shmem.c" while test -n "$ac_sources"; do set $ac_dests; ac_dest=$1; shift; ac_dests=$* set $ac_sources; ac_source=$1; shift; ac_sources=$* ac_config_links_9="$ac_config_links_9 $ac_dest:$ac_source" done ac_config_links="$ac_config_links $ac_config_links_9" if test x"nokey" != xnokey; then ac_sources="${MOD_SHMEM}licensed/shmem_key.c" ac_dests="sockd/shmem_key.c" while test -n "$ac_sources"; do set $ac_dests; ac_dest=$1; shift; ac_dests=$* set $ac_sources; ac_source=$1; shift; ac_sources=$* ac_config_links_10="$ac_config_links_10 $ac_dest:$ac_source" done ac_config_links="$ac_config_links $ac_config_links_10" fi #change all #undef's to #define foo 0 #add any warning flags (value set above) CFLAGS="$CFLAGS $warn" if test "x${prerelease}" != "x"; then echo "warning flags: $warn" echo "compiler flags: $comp_flags" echo "CFLAGS: $CFLAGS" echo "CPPFLAGS: $CPPFLAGS" fi ac_config_files="$ac_config_files sockd/Makefile include/Makefile lib/Makefile dlib/Makefile" ac_config_files="$ac_config_files Makefile example/Makefile doc/Makefile bin/Makefile" ac_config_files="$ac_config_files capi/Makefile SPECS/Makefile SPECS/dante.spec bin/socksify" ac_config_files="$ac_config_files libscompat/Makefile contrib/Makefile unlicensed/Makefile" ac_config_files="$ac_config_files doc/module/Makefile VERSION" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : 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" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ 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/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${PRERELEASE_TRUE}" && test -z "${PRERELEASE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"PRERELEASE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"PRERELEASE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${SPROFIL_TRUE}" && test -z "${SPROFIL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"SPROFIL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"SPROFIL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${STATIC_SOCKD_TRUE}" && test -z "${STATIC_SOCKD_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"STATIC_SOCKD\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"STATIC_SOCKD\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${LINT_TRUE}" && test -z "${LINT_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"LINT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"LINT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${SERVER_INTERPOSITION_TRUE}" && test -z "${SERVER_INTERPOSITION_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"SERVER_INTERPOSITION\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"SERVER_INTERPOSITION\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${SERVER_INTERPOSITION_ALWAYS_TRUE}" && test -z "${SERVER_INTERPOSITION_ALWAYS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"SERVER_INTERPOSITION_ALWAYS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"SERVER_INTERPOSITION_ALWAYS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WANT_LIBWRAP_TRUE}" && test -z "${WANT_LIBWRAP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"WANT_LIBWRAP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"WANT_LIBWRAP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration links: $config_links Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "sockd/Makefile" ) CONFIG_FILES="$CONFIG_FILES sockd/Makefile" ;; "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "dlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlib/Makefile" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "example/Makefile" ) CONFIG_FILES="$CONFIG_FILES example/Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "bin/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; "capi/Makefile" ) CONFIG_FILES="$CONFIG_FILES capi/Makefile" ;; "SPECS/Makefile" ) CONFIG_FILES="$CONFIG_FILES SPECS/Makefile" ;; "SPECS/dante.spec" ) CONFIG_FILES="$CONFIG_FILES SPECS/dante.spec" ;; "bin/socksify" ) CONFIG_FILES="$CONFIG_FILES bin/socksify" ;; "libscompat/Makefile" ) CONFIG_FILES="$CONFIG_FILES libscompat/Makefile" ;; "contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;; "unlicensed/Makefile" ) CONFIG_FILES="$CONFIG_FILES unlicensed/Makefile" ;; "doc/module/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/module/Makefile" ;; "VERSION" ) CONFIG_FILES="$CONFIG_FILES VERSION" ;; "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; "$ac_config_links_2" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_2" ;; "$ac_config_links_3" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_3" ;; "$ac_config_links_4" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_4" ;; "$ac_config_links_5" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_5" ;; "$ac_config_links_6" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_6" ;; "$ac_config_links_7" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_7" ;; "$ac_config_links_8" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_8" ;; "$ac_config_links_9" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_9" ;; "$ac_config_links_10" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_10" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "include/autoconf.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/autoconf.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@LN_S@,$LN_S,;t t s,@ECHO@,$ECHO,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@CXXCPP@,$CXXCPP,;t t s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@PRERELEASE_TRUE@,$PRERELEASE_TRUE,;t t s,@PRERELEASE_FALSE@,$PRERELEASE_FALSE,;t t s,@SOLIB_POSTFIX@,$SOLIB_POSTFIX,;t t s,@PRELOAD_SEPERATOR@,$PRELOAD_SEPERATOR,;t t s,@PRELOAD_VARIABLE@,$PRELOAD_VARIABLE,;t t s,@PRELOAD_POSTFIX@,$PRELOAD_POSTFIX,;t t s,@subdirs@,$subdirs,;t t s,@SPROFIL_TRUE@,$SPROFIL_TRUE,;t t s,@SPROFIL_FALSE@,$SPROFIL_FALSE,;t t s,@STATIC_SOCKD_TRUE@,$STATIC_SOCKD_TRUE,;t t s,@STATIC_SOCKD_FALSE@,$STATIC_SOCKD_FALSE,;t t s,@LINT_TRUE@,$LINT_TRUE,;t t s,@LINT_FALSE@,$LINT_FALSE,;t t s,@YACC@,$YACC,;t t s,@LEX@,$LEX,;t t s,@LEXLIB@,$LEXLIB,;t t s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t s,@SERVER_INTERPOSITION_TRUE@,$SERVER_INTERPOSITION_TRUE,;t t s,@SERVER_INTERPOSITION_FALSE@,$SERVER_INTERPOSITION_FALSE,;t t s,@SERVER_INTERPOSITION_ALWAYS_TRUE@,$SERVER_INTERPOSITION_ALWAYS_TRUE,;t t s,@SERVER_INTERPOSITION_ALWAYS_FALSE@,$SERVER_INTERPOSITION_ALWAYS_FALSE,;t t s,@TOPSUBDIRS@,$TOPSUBDIRS,;t t s,@SOCKSIFY_PRELOAD_LIBS@,$SOCKSIFY_PRELOAD_LIBS,;t t s,@LIBRARY_PREFIX@,$LIBRARY_PREFIX,;t t s,@WANT_LIBWRAP_TRUE@,$WANT_LIBWRAP_TRUE,;t t s,@WANT_LIBWRAP_FALSE@,$WANT_LIBWRAP_FALSE,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@TOPEXTRADIST@,$TOPEXTRADIST,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_LINKS section. # for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;} if test ! -r $srcdir/$ac_source; then { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;} { (exit 1); exit 1; }; } fi rm -f $ac_dest # Make relative symlinks. ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dest_dir" else as_dir="$ac_dest_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dest_dir" != .; then ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dest_dir";; *) case "$ac_dest_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";; *) ac_abs_builddir=`pwd`/"$ac_dest_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $srcdir in [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;; *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;; esac # Try a symlink, then a hard link, then a copy. ln -s $ac_rel_source $ac_dest 2>/dev/null || ln $srcdir/$ac_source $ac_dest 2>/dev/null || cp -p $srcdir/$ac_source $ac_dest || { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;} { (exit 1); exit 1; }; } done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file and --srcdir arguments so they do not pile up. ac_sub_configure_args= ac_prev= for ac_arg in $ac_configure_args; do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | --c=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d $srcdir/$ac_dir || continue { echo "$as_me:$LINENO: configuring in $ac_dir" >&5 echo "$as_me: configuring in $ac_dir" >&6;} { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'" elif test -f $ac_srcdir/configure; then ac_sub_configure="$SHELL '$ac_srcdir/configure'" elif test -f $ac_srcdir/configure.in; then ac_sub_configure=$ac_configure else { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative path. ac_sub_cache_file=$ac_top_builddir$cache_file ;; esac { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval $ac_sub_configure $ac_sub_configure_args \ --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir || { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} { (exit 1); exit 1; }; } fi cd $ac_popdir done fi echo "" echo " Configure status:" echo "" if test x"${no_acceptlock}" = xt; then echo "Acceptlock: OK (not required)" else echo "Acceptlock: workaround enabled on this platform" fi if test x"${no_preload}" = xt; then echo "Preloading: disabled" else echo "Preloading: OK" fi if test x"${so_sndlowat}" = xt; then echo "SO_SNDLOWAT: OK" else echo "SO_SNDLOWAT: not enabled for this platform" fi if test x"${nb_select_err}" = xt; then echo "select: unexpected select behaviour on unconnected sockets," echo " operations on nonblocking sockets might fail on this platform" else echo "select: OK" fi if test x"${no_routeinfo}" = xt; then echo "Routeinfo: not supported on this platform" else echo "Routeinfo: OK" fi echo "" echo "This software should perform optimally when all the lines above report 'OK'." echo "This is not possible on all platforms." echo "" echo " Modules:" echo "" if test x"$MOD_REDIRECT" = x; then echo "redirect: OK" else echo "redirect: not found" fi if test x"$MOD_BANDWIDTH" = x; then echo "bandwidth: OK" else echo "bandwidth: not found" fi if test x"$MOD_SESSION" = x; then echo "session: OK" else echo "session: not found" fi echo "" if test x$prerelease != x; then echo " This is a pre-release. We ask that everyone who can, test it to the extent possible, to help reduce problems in the upcoming release. Problems can be reported to dante-bugs@inet.no. Note that Dante pre-releases are often configured in a way that can significantly increase the load on the machine. This is done to stress the server more, increasing the chances of detecting potential problems. " fi VINFO=README.latest test -s "$VINFO" && cat "$VINFO" exit 0 dante-1.1.19.dfsg/configure.ac0000644000175000017500000012214710362465521014577 0ustar roamroamAC_INIT AC_PREREQ(2.59) AC_REVISION($Id: configure.ac,v 1.359 2006/01/15 15:33:37 karls Exp $) version=1.1.19 #set this to enable prerelease, changes some defaults (debug enabled) #prerelease="1" if test x$prerelease != x; then prename="-pre$prerelease" TOPEXTRADIST="${TOPEXTRADIST} PRERELEASE" else prename="" fi echo "Configuring Dante ${version}${prename}:" AM_INIT_AUTOMAKE(dante, ${version}${prename}) AC_CONFIG_SRCDIR(include/common.h) AM_CONFIG_HEADER(include/autoconf.h) #NOTE: save CFLAGS; wish to compile without -O2 when debugging oCFLAGS=$CFLAGS unset CFLAGS AC_AIX #evidently also modifies CFLAGS AC_PROG_LIBTOOL autoconf_compflags=$CFLAGS CFLAGS=$oCFLAGS AC_PROG_CPP AM_CONDITIONAL(PRERELEASE, test x$prerelease != x) #known keywords for --enable/disable-foo(=yes/no)? LTINTERNAL="dlopen|dlopen_self|dlopen_self_static|fast_install|libtool_lock|win32_dll|shared_with_static_runtimes|shared_with_static_runtimes_CXX|shared_with_static_runtimes_F77" KNOWN_KEYWORDS="$LTINTERNAL|shared|static|debug|warnings|diagnostic|profiling|linting|libwrap|preload|serverdl|clientdl|internal|pidfile" for keyword in `set | egrep '^enable_' | sed -e 's/^enable_\(.*\)=.*/\1/'`; do echo $keyword | egrep "^(${KNOWN_KEYWORDS})$" > /dev/null if test $? -ne 0; then AC_MSG_WARN([unknown option '$keyword', ignoring ...]) sleep 10; fi done #Solaris 2.5.1 is broken in many places case $host in *-*-solaris2.5.1) AC_MSG_WARN([the server might not work properly on solaris 2.5.1]) AC_DEFINE(HAVE_SOLARIS_2_5_1, 1, [broken platform]) ;; esac #disable acceptlock #XXX add proper test for this? case $host in *-*-*bsd* | alpha*-dec-osf* | *-*-hpux* | *-*-aix4* | *-*-aix5*) no_acceptlock=t ;; *-*-solaris*) unset solaris_newversion ver=`echo $host | sed -e 's/.*solaris//'` ver_major=`echo $ver | cut -d. -f1` ver_minor=`echo $ver | cut -d. -f2` if test x"${ver_major}" != x -a x"${ver_minor}" != x; then if test $ver_major -ge 2 -a $ver_minor -gt 5; then solaris_newversion=t fi fi if test x"${solaris_newversion}" = x"t"; then no_acceptlock=t fi ;; esac #XXX SOLIB_POSTFIX=so case $host in alpha*-dec-osf*) AC_DEFINE(HAVE_DEC_PROTO, 1, [DEC workarounds]) AC_DEFINE(HAVE_EXTRA_OSF_SYMBOLS, 1, [DEC workarounds]) PRELOAD="RLD" CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE_EXTENDED -DBYTE_ORDER=LITTLE_ENDIAN -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_OSF_SOURCE" ;; *-*-hpux*) #HPUX needs _PROTOTYPES to include prototypes #for configure (for gcc and cc) CPPFLAGS="${CPPFLAGS} -D_PROTOTYPES" SOLIB_POSTFIX=sl ;; *-*-sunos4*) #XXX hardcode library path (find better way to do this?) AC_DEFINE(LIBRARY_PATH, "/usr/lib/", [hardcoded path]) base_library_path="/usr/lib/" AC_MSG_WARN([notice: hardcoding /usr/lib for dlopen]) #nonstandard libfunction workaround #XXX proper test AC_DEFINE(HAVE_BROKEN_VSPRINTF, 1, [nonstandard]) #link problems with libresolv, hardcode domainname if test -s /etc/resolv.conf; then domainname_hardcoded=`grep domain /etc/resolv.conf | awk '{ print $2 }'` fi no_res_init=t AC_DEFINE(HAVE_NO_RESOLVESTUFF, 1, [primitive platform]) ;; *-*-solaris*) AC_DEFINE(HAVE_SENDMSG_DEADLOCK, 1, [bug workaround]) AC_DEFINE(HAVE_SOLARIS_BUGS, 1, [bug workaround]) AC_DEFINE(BSD_COMP, 1, [enable BSD compatibility]) AC_DEFINE(HAVE_SOLARIS_PAM_BUG, 1, [bug workaround]) ;; *-*-linux-*) # XXX This might only concern 2.0.x kernels (add test?) AC_DEFINE(HAVE_DEFECT_RECVMSG, 1, [bug workaround]) AC_DEFINE(HAVE_LINUX_BUGS, 1, [bug workaround]) AC_DEFINE(HAVE_LINUX_ECCENTRICITIES, 1, [platform workarounds]) AC_DEFINE(SPT_PADCHAR, '\0', [setproctitle]) ;; *-*-openbsd*) #static sockd when profiling is enabled no_dynamic_profiled_sockd=t ;; *-*-irix*) PRELOAD="RLD" ;; *-*-aix4* | *-*-aix5*) OSPIDFILE="/etc/sockd.pid" AC_DEFINE(HAVE_SYSTEM_XMSG_MAGIC, 1, [platform workaround]) ;; *-*-cygwin) AC_MSG_WARN([disabling preloading]) no_preload_client=t no_preload_server=t no_preload=t no_res_init=t AC_DEFINE(HAVE_NO_RESOLVESTUFF, 1, [primitive platform]) ;; esac AC_SUBST(SOLIB_POSTFIX) case $PRELOAD in RLD) PRELOAD_SEPERATOR=":" PRELOAD_VARIABLE="_RLD_LIST" PRELOAD_POSTFIX="DEFAULT" ;; *) PRELOAD_SEPERATOR=" " PRELOAD_VARIABLE="LD_PRELOAD" PRELOAD_POSTFIX="" ;; esac AC_SUBST(PRELOAD_SEPERATOR) AC_SUBST(PRELOAD_VARIABLE) AC_SUBST(PRELOAD_POSTFIX) #define hosttype AC_DEFINE_UNQUOTED(HAVE_HOST_TYPE, "$host", [system hosttype]) #XXX add proper test for this? if test x$no_acceptlock != xt; then AC_DEFINE(NEED_ACCEPTLOCK, 1, [platform workaround]) fi AC_MSG_CHECKING([for compiler flags]) case $host in #XXX check for compiler type, not architecture *-*-solaris*) if test "x$GCC" = x; then #-xs provides allows easier debugging with gdb comp_flags="-Xt -xs" #XXX -Xt needed to compile? #XXX due to some problems with sockaddr alignment #XXX sun cc needs -misalign comp_flags="$comp_flags -misalign -xO0" AC_MSG_RESULT([$comp_flags]) AC_MSG_WARN([there might currenly be some performance problems with suncc - it needs -misalign]) $CC 2>&1 | grep ucbcc > /dev/null if test $? -eq 0; then #XXX ucbcc uses includes from /usr/ucbinclude, but these are #not complete. add /usr/include to include path to get #all prototypes (read/write are missing) #XXX host_cc="solaris-ucbcc" CPPFLAGS="-I/usr/include $CPPFLAGS${CPPFLAGS:+ } " fi fi # AC_MSG_RESULT([$comp_flags]) ;; alphaev6-dec-osf*) if test "x$GCC" = x; then comp_flags="-std1" fi AC_MSG_RESULT([$comp_flags]) ;; alpha*-dec-osf*) #XXX is it possible to get it to work with -newc? if test "x$GCC" = x; then comp_flags="-std1 -oldc" fi AC_MSG_RESULT([$comp_flags]) ;; *-*-hpux*) if test "x$GCC" = x; then CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE" #XXX when cc is used as CPP it needs -Ae to work # for L_SOCKPROTO; add -Ae to CPPFLAGS. # This won't work if CPP is specified by hand # and is something else than cc (when CC is hp cc) # comp_flags="-Ae" CPPFLAGS="${CPPFLAGS} -Ae" fi AC_MSG_RESULT([$comp_flags]) ;; *-*-aix4* | *-*-aix5*) if test "x$GCC" = x; then comp_flags="-qlanglvl=ansi" #XXX CPPFLAGS="${CPPFLAGS} -qlanglvl=ansi" fi AC_MSG_RESULT([$comp_flags]) ;; *) AC_MSG_RESULT([none]) ;; #XXX make sure compiling with compiler options works esac AC_MSG_CHECKING([for support for -pipe compiler flag]) oCFLAGS=$CFLAGS CFLAGS="$CFLAGS -pipe" AC_TRY_RUN([ int main() { return 0; }], [AC_MSG_RESULT([yes]) comp_flags="${comp_flags} -pipe"], AC_MSG_RESULT([no])) CFLAGS="$oCFLAGS" AC_MSG_CHECKING([for support for -Wbounded compiler flag]) oCFLAGS=$CFLAGS CFLAGS="$CFLAGS -Wbounded" AC_TRY_RUN([ int main() { return 0; }], [AC_MSG_RESULT([yes]) comp_flags="${comp_flags} -Wbounded"], AC_MSG_RESULT([no])) CFLAGS="$oCFLAGS" AC_ARG_ENABLE(internal, [ --enable-internal enable internal extensions], [if test -d "gui"; then TOPEXTRADIST="${TOPEXTRADIST} gui" AC_CONFIG_SUBDIRS(gui) else AC_MSG_WARN([--enable-internal option is for internal Dante development, ignoring]) fi ], unset build_internal) AC_MSG_CHECKING([for compilation with debugging]) AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging support], debug_enabled=t, [if test x$prerelease != x; then debug_enabled=t fi]) if test x$debug_enabled = xt; then #no optimization wanted if test $ac_cv_prog_cc_g = yes; then CFLAGS="$CFLAGS -g" fi CPPFLAGS="-DDEBUG $CPPFLAGS" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) #autoconf_compflags is set to "-g -O2" with GCC #override CFLAGS when running configure to avoid this CFLAGS="$CFLAGS $autoconf_compflags" fi #-Wall ? AC_MSG_CHECKING([for warning flags]) AC_ARG_ENABLE(warnings, [ --enable-warnings show compilation warnings], [enable_warnings=t], [if test x$prerelease != x; then enable_warnings=t fi]) #construct warning flags in $warn if test x$enable_warnings != x; then #try to enable compiler specific warning flags if test "x$GCC" = x; then case $host in *sunos4*) #sunos cc # warn="" true ;; alpha*-dec-osf*) #osf cc # warn="-w0 -check -portable -warnprotos" true ;; *-*-hpux*) warn="-v" ;; *-*-solaris*) warn="-v" true ;; *-*-irix*) #sgi cc warn="-fullwarn" ;; *) #try -Wall (gcc) warn="-Wall" ;; esac else #gcc warnings warn="-Wall -W -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wcast-qual -Wbad-function-cast -Wpointer-arith -Wundef" #warn="$warn -Wold-style-cast -Winline -Waggregate-return -Wconversion -Wwrite-strings -Wtraditional -Wshadow" fi oCFLAGS=$CFLAGS CFLAGS="$CFLAGS $warn" #make sure compilation is still possible AC_TRY_COMPILE([], [], [AC_MSG_RESULT([$warn])], [AC_MSG_RESULT([none]) unset warn]) CFLAGS=$oCFLAGS else AC_MSG_RESULT([none]) fi #NOTE: set warnings at the bottom; might interfere with tests CFLAGS="$CFLAGS $comp_flags" #-DDIAGNOSTICS? AC_MSG_CHECKING([for compliation with DIAGNOSTIC]) AH_TEMPLATE([DIAGNOSTIC], [for debugging]) AC_ARG_ENABLE(diagnostic, [ --enable-diagnostic enable diagnostic], [AC_DEFINE(DIAGNOSTIC, 1) AC_MSG_RESULT([yes])], [if test x$prerelease != x; then AC_DEFINE(DIAGNOSTIC, 1) AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi]) AC_ARG_ENABLE(profiling, [ --enable-profiling compile with profiling support in server], [ AC_DEFINE(HAVE_PROFILING, 1, [for profiling]) s_profiling=t]) AM_CONDITIONAL(SPROFIL, test x$s_profiling = xt) #static or dynamic sockd? AM_CONDITIONAL(STATIC_SOCKD, test x$no_dynamic_profiled_sockd = xt) if test "x$s_profiling" = "xt" -a "x$no_dynamic_profiled_sockd" = "xt"; then no_preload_server=t AC_MSG_WARN([sockd is built static when profiling is enabled]) fi AC_ARG_ENABLE(linting, [ --enable-linting enable lint], s_linting=t) AM_CONDITIONAL(LINT, test x$s_linting = xt) AC_MSG_CHECKING([whether libwrap should be disabled]) AC_ARG_ENABLE(libwrap, [ --disable-libwrap never use libwrap, even if it is available], [if test x$enableval = xno; then no_libwrap=t AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi], AC_MSG_RESULT([no])) dnl Checks for programs. AC_PROG_YACC AC_PROG_AWK AM_PROG_LEX dnl Checking variable sizes AC_CHECK_SIZEOF(char) AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h limits.h malloc.h paths.h strings.h syslog.h) AC_CHECK_HEADERS(unistd.h crypt.h sys/file.h sys/ioctl.h sys/time.h) AC_CHECK_HEADERS(tcpd.h shadow.h ifaddrs.h sys/sem.h netinet/in.h) AC_CHECK_HEADERS(sys/ipc.h arpa/nameser.h) AC_CHECK_HEADERS([netinet/ip_var.h], [], [], [ #if HAVE_SYS_TYPES_H #include #endif #if HAVE_NETINET_IN_H #include #endif ]) AC_CHECK_HEADERS([resolv.h], [], [], [ #if HAVE_SYS_TYPES_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_ARPA_NAMESER_H #include #endif ]) case $host in alpha*-dec-osf*) AC_CHECK_HEADERS(netinet/ip.h) ;; *) ;; esac #allow manual specification AC_MSG_CHECKING([for hardcoded domainname]) AC_ARG_WITH(domainname, [ --with-domainname=NAME hardcode local domainname (only on broken platforms)], [domainname_hardcoded=$withval]) if test x${domainname_hardcoded} != x; then AC_DEFINE_UNQUOTED(SOCKS_DOMAINNAME, "${domainname_hardcoded}", [platform workaround]) AC_MSG_RESULT([yes]) AC_MSG_WARN([using hardcoded domainname ${domainname_hardcoded}]) else AC_MSG_RESULT([no]) if test x${no_res_init} = xt; then AC_MSG_WARN([unable to locate domainname, specify if necessary]) fi fi #allow default file locations to be overridden AC_MSG_CHECKING([for socks config file location]) AC_ARG_WITH(socks-conf, [ --with-socks-conf=FILE change location of socks client configuration file], [AC_MSG_RESULT($withval) AC_DEFINE(HAVE_SOCKS_CONFIGFILE, 1, [alternate location]) AC_DEFINE_UNQUOTED(HAVE_ALT_SOCKS_CONFIGFILE, "$withval", [alternate location]) ], [AC_MSG_RESULT(default)]) AC_MSG_CHECKING([for sockd config file location]) AC_ARG_WITH(sockd-conf, [ --with-sockd-conf=FILE change location of socks server configuration file], [AC_MSG_RESULT($withval) AC_DEFINE(HAVE_SOCKD_CONFIGFILE, 1, [alternate location]) AC_DEFINE_UNQUOTED(HAVE_ALT_SOCKD_CONFIGFILE, "$withval", [alternate location]) ], [AC_MSG_RESULT(default)]) #pidfile AC_ARG_ENABLE(pidfile, [ --disable-pidfile disable server pidfile creation], [AC_DEFINE(HAVE_DISABLED_PIDFILE, 1, [pidfile disabled])]) AC_MSG_CHECKING([for pid file location]) AH_TEMPLATE([HAVE_SOCKD_PIDFILE], [alternate location]) AH_TEMPLATE([HAVE_ALT_SOCKD_PIDFILE], [alternate location]) AC_ARG_WITH(pidfile, [ --with-pidfile=FILE change location of server pidfile], [AC_MSG_RESULT($withval) AC_DEFINE(HAVE_SOCKD_PIDFILE, 1) AC_DEFINE_UNQUOTED(HAVE_ALT_SOCKD_PIDFILE, "$withval") have_pidfile=t ], [AC_MSG_RESULT(default)]) #os default? if test x"${have_pidfile}" != xt; then if test x"$OSPIDFILE" != x; then AC_DEFINE(HAVE_SOCKD_PIDFILE, 1) AC_DEFINE_UNQUOTED(HAVE_ALT_SOCKD_PIDFILE, "$OSPIDFILE") fi fi ## preload related tests #build without support for preloading? # HAVE_DLFCN_H only determines if the include file exists AC_CHECK_HEADER(dlfcn.h, [AC_DEFINE(HAVE_DLFCN_H, 1, [dlfcn.h exists]) have_dlfcn_h=t], [AC_MSG_WARN([dlfcn.h missing, preloading disabled]) no_preload_client=t no_preload_server=t no_preload=t]) if test "x$no_preload" = x; then AC_MSG_CHECKING([whether all interposition usage should be disabled]) AC_ARG_ENABLE(preload, [ --disable-preload disable preloading in server and client], [if test x$enableval = xno; then no_preload_client=t no_preload_server=t no_preload=t AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi], AC_MSG_RESULT([no])) fi if test "x$no_preload" = x; then AC_MSG_CHECKING([whether interposition in the client should be disabled]) AC_ARG_ENABLE(clientdl, [ --disable-clientdl disable support for preloading in the client], [if test x$enableval = xno; then no_preload_client=t AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi], AC_MSG_RESULT([no])) AC_MSG_CHECKING([whether interposition in the server should be disabled]) AC_ARG_ENABLE(serverdl, [ --disable-serverdl disable support for preloading in the server], [if test x$enableval = xno; then no_preload_server=t AC_MSG_RESULT([yes]) else if text x$enableval = xyes; then serverdl_always_on=t fi AC_MSG_RESULT([no]) fi], AC_MSG_RESULT([no])) fi AM_CONDITIONAL(SERVER_INTERPOSITION, test x$no_preload_server = x) AM_CONDITIONAL(SERVER_INTERPOSITION_ALWAYS, test x$serverdl_always_on = xt) if test "x${no_preload_client}" = "xt" -a "x${no_preload_server}" = "xt"; then unset preload_enabled else preload_enabled=t fi #construct SUBDIRS variable SUBDIRS="lib sockd unlicensed example doc bin SPECS capi contrib" if test "x${no_preload_client}" = x; then SUBDIRS="dlib $SUBDIRS" fi #include should be done before compilation to ensure that #redefac is executed first TOPSUBDIRS="$subdirs include libscompat $SUBDIRS" AC_SUBST(TOPSUBDIRS) AC_CHECK_HEADER(sys/sockio.h, [AC_DEFINE(HAVE_SYS_SOCKIO_H, 1, [sys/sockio.h exists]) have_sys_sockio_h=t]) dnl Checks for typedefs, structures, and compiler characteristics. AC_MSG_CHECKING([whether defines const]) AC_EGREP_CPP(yes, [ #include #ifdef const yes #endif ], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) check_const="yes"]) if test x$check_const = xyes; then AC_C_CONST fi #looks for linux + systems with RTAX_GATEWAY defined in net/route.h AC_MSG_CHECKING([for supported routing socket communication]) AH_TEMPLATE([HAVE_ROUTE_SOURCE], [routing socket communication supported]) unset no_routeinfo AC_EGREP_CPP(yes, [ #include #ifdef linux yes #endif /* linux */ ], [AC_DEFINE(HAVE_ROUTE_SOURCE, 1) AC_DEFINE(HAVE_ROUTEINFO_LINUX, 1, [Linux type routing socket]) AC_MSG_RESULT(yes)], [AC_EGREP_CPP(yes, [ #include #ifdef RTA_GATEWAY yes #endif /* RTA_GATEWAY */ ], [AC_DEFINE(HAVE_ROUTE_SOURCE, 1) AC_DEFINE(HAVE_ROUTEINFO_BSD, 1, [BSD type routing socket]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT([no, might result in reduced functionality]) no_routeinfo=t])]) AC_MSG_CHECKING([whether declares h_errno]) AC_EGREP_CPP(h_errno, [ #include ], [AC_DEFINE(HAVE_H_ERRNO, 1, [netdb.h defines h_errno]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) #XXXsys/socket.h? AC_MSG_CHECKING([for struct ip_opts in ]) AC_EGREP_CPP([struct.*ipoption], [ #include ], [AC_DEFINE(HAVE_STRUCT_IPOPTS, 1, [ip_opts defined in netinet/in.h]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) AC_MSG_CHECKING([whether defines inline]) AC_EGREP_CPP(yes, [ #include #ifdef inline yes #endif ], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) check_inline="yes"]) if test x$check_inline="yes";then AC_C_INLINE fi AC_TYPE_UID_T AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_SYS_LARGEFILE #XXX AC_DEFINE(HAVE_IPV6_SUPPORT, 0, [ipv6 not supported currently]) AC_MSG_CHECKING([for in6_addr]) AC_TRY_COMPILE([ #include #include #include ], [ struct in6_addr sin6; ], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_IN6_ADDR, 1, [in6_addr defined])], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([for sockaddr_storage in sys/socket.h]) AC_TRY_COMPILE([ #include #include ], [ struct sockaddr_storage __ss; struct sockaddr_in *sin; sin = (struct sockaddr_in *) &__ss; ], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [sockaddr_storate defined])], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([to see if openlog accepts LOG_PERROR]) AC_EGREP_CPP(yes, [ #include #ifdef LOG_PERROR yes #endif ], [AC_DEFINE(HAVE_OPENLOG_LOG_PERROR, 1, [openlog supports LOG_PERROR]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) AC_MSG_CHECKING([to see if stdlib.h defines EXIT_FAILURE]) AC_EGREP_CPP(yes, [ #include #ifdef EXIT_FAILURE yes #endif ], [AC_MSG_RESULT(yes)], [AC_DEFINE(NEED_EXIT_FAILURE, 1, [EXIT_FAILURE not defined in stdlib.h]) AC_MSG_RESULT(no)]) #XXX actually checks if AF_UNIX should be used instead of AF_LOCAL AC_MSG_CHECKING([whether uses AF_UNIX]) AC_EGREP_CPP(yes, [ #include #include #ifdef AF_LOCAL #else #ifdef AF_UNIX yes #endif #endif ], [AC_DEFINE(NEED_AF_LOCAL, 1, [use AF_LOCATL, not AF_UNIX]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) AC_MSG_CHECKING([for SIGINFO]) AC_EGREP_CPP(yes, [ #include #ifdef SIGINFO yes #endif ], [AC_DEFINE(HAVE_SIGNAL_SIGINFO, 1, [signal.h defined SIGINFO]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) AC_MSG_CHECKING([to see if MSG_WAITALL exists]) AC_EGREP_CPP(yes, [ #include #ifdef MSG_WAITALL yes #endif ], [AC_DEFINE(HAVE_MSG_WAITALL, 1, [sys/socket.h defines MSG_WAITALL]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) #SO_SNDLOWAT #irix 6.2 only seems to look at lowest 8 bit of value #Solaris also seems to be broken (up to 2.6 atleast) AC_MSG_CHECKING([whether a working SO_SNDLOWAT exists]) AC_EGREP_CPP(yes, [ #include #ifdef SO_SNDLOWAT yes #endif ], [ case $host in *bsd*) so_sndlowat=t ;; *-osf*) so_sndlowat=t ;; esac if test "x${so_sndlowat}" = xt; then AC_DEFINE(HAVE_SO_SNDLOWAT, 1, [platform supports SO_SNDLOWAT socket option]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(disabled) AC_MSG_WARN([performance in the server might be degraded without support for the SO_SNDLOWAT socket option]) fi], [AC_MSG_RESULT(no) AC_MSG_WARN([performance in the server might be degraded without support for the SO_SNDLOWAT socket option])]) AC_MSG_CHECKING([whether realloc with a NULL pointer calls malloc]) AC_TRY_RUN([ #include #ifndef NULL #define NULL (char *)0 #endif int main() { /* will assume this test doesn\'t fail because of lack of memory */ if (realloc(NULL, 1) == NULL) return 1; else return 0; }], [AC_MSG_RESULT(yes)], [AC_DEFINE(HAVE_NOMALLOC_REALLOC, 1, [realloc never calls malloc]) AC_MSG_RESULT(no)]) AC_MSG_CHECKING([whether free can be called with NULL]) AC_TRY_RUN([ #include #ifndef NULL #define NULL (char *)0 #endif int main() { /* will assume core dump/seg fault if it doesn\'t work */ free(NULL); return 0; }], [AC_MSG_RESULT(yes)], [AC_DEFINE(HAVE_NONULL_FREE, 1, [free does not accept NULL parameter]) AC_MSG_RESULT(no)]) AC_MSG_CHECKING([for timer macros]) AC_TRY_RUN([ #include int main() { struct timeval tv, tv2, tv3; tv.tv_sec = 0; tv.tv_usec = 0; tv2.tv_sec = 0; tv2.tv_usec = 0; tv3.tv_sec = 0; tv3.tv_usec = 0; timeradd(&tv, &tv2, &tv3); timersub(&tv3, &tv2, &tv); return 0; }], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_TIMER_MACROS, 1, [timeradd(), timersub etc. exist in sys/time.h])], [AC_MSG_RESULT(no)]) #A good time to save the cache (L_NSOCKPROTO might fail) AC_CACHE_SAVE #find prototypes from dlib/interposition.c if test "x$preload_enabled" = "xt"; then unset failproto #prototypes; return value first, then parameters # # Example (accept from OpenBSD manual page): # # int accept(int s, struct sockaddr *addr, socklen_t *addrlen); # # Remove variable names and the result is: # int, int, struct sockaddr *, socklen_t * # This is quoted and added to the L_NSOCKPROTO call below. L_NSOCKPROTO(accept, [failproto=t], [int, int, struct sockaddr *, socklen_t *], [int, int, struct sockaddr *, Psocklen_t]) L_NSOCKPROTO(bind, [failproto=t], [int, int, const struct sockaddr *, socklen_t]) L_NSOCKPROTO(connect, [failproto=t], [int, int, const struct sockaddr *, socklen_t]) L_NSOCKPROTO(gethostbyaddr, [failproto=t], [struct hostent *, const char *, int, int], [struct hostent *, const void *, socklen_t, int]) L_NSOCKPROTO(getpeername, [failproto=t], [int, int, struct sockaddr *, socklen_t *], [int, int, struct sockaddr *, Psocklen_t]) L_NSOCKPROTO(getsockname, [failproto=t], [int, int, struct sockaddr *, socklen_t *], [int, int, struct sockaddr *, Psocklen_t]) L_NSOCKPROTO(read, [failproto=t], [ssize_t, int, void *, size_t]) L_NSOCKPROTO(readv, [failproto=t], [ssize_t, int, const struct iovec *, int]) L_NSOCKPROTO(recv, [failproto=t], [ssize_t, int, void *, size_t, int]) L_NSOCKPROTO(recvfrom, [failproto=t], [ssize_t, int, void *, size_t, int, struct sockaddr *, socklen_t *], [ssize_t, int, void *, size_t, int, struct sockaddr *, Psocklen_t]) L_NSOCKPROTO(recvmsg, [failproto=t], [ssize_t, int, struct msghdr *, int]) L_NSOCKPROTO(send, [failproto=t], [ssize_t, int, const void *, size_t, int]) L_NSOCKPROTO(sendmsg, [failproto=t], [ssize_t, int, const struct msghdr *, int]) L_NSOCKPROTO(sendto, [failproto=t], [ssize_t, int, const void *, size_t, int, const struct sockaddr *, socklen_t]) L_NSOCKPROTO(write, [failproto=t], [ssize_t, int, const void *, size_t]) L_NSOCKPROTO(writev, [failproto=t], [ssize_t, int, const struct iovec *, int]) if test x$failproto != x; then echo "" echo "error: attempt to determine function prototypes failed," echo " and will probably mean that building of libdsocks," echo " which allows on-the-fly socksification of dynamic" echo " binaries, will not work." echo "" echo " You have several options:" echo "" echo " 1. If you do not need libdsocks, run configure with the" echo " option --disable-preload." echo " 2. Submit a bugreport." echo " 3. Find the prototypes used on your platform for the" echo " failed functions, and add them to the configure.ac" echo " file. Then use autoconf (which must be installed)" echo " to regenerate the configure script." echo " Function prototype definitions can usually be found" echo " in the manual page for the function or in a system" echo " include file (usually located under /usr/include)." exit 1 fi fi AC_MSG_CHECKING([if getsockopt needs cast]) AC_TRY_COMPILE([ #include #include int getsockopt(int, int, int, char *, int *); ], [ 1 ], [AC_DEFINE(NEED_GETSOCKOPT_CAST, 1, [getsockopt needs cast]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) #include both and ? if test x$have_sys_sockio_h = xt; then AC_MSG_CHECKING([to see if should be included]) AC_EGREP_CPP(yes, [ #include #ifdef SIOCATMARK #else #include #ifdef SIOCATMARK yes #endif #endif ], [AC_DEFINE(NEED_SYS_SOCKIO_H, 1, [sys/sockio.h must be included]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) fi #XXX should be more generic, check if nonexistent AC_MSG_CHECKING([to see if dlopen param has DL_ and not RTLD_ prefix]) AC_EGREP_CPP(yes, [ #include #ifdef DL_LAZY #else # ifdef RTLD_LAZY yes # endif #endif ], [AC_DEFINE(NEED_DYNA_RTLD, 1, [dlopen has RTLD_ prefix]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) #XXX should be more generic, check if nonexistent #SV_INTERRUPT, but not SA_RESTART defined? AC_MSG_CHECKING([to see if SV_INTERRUPT should be used]) AC_EGREP_CPP(yes, [ #include #ifdef SA_RESTART #else # ifdef SV_INTERRUPT yes # endif #endif ], [AC_DEFINE(NEED_SA_RESTART, 1, [use SA_RESTART, not SV_INTERRUPT]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) #XXXseems to be supported on Solaris2.6, but there might be some #defines that need to be set (should _XOPEN_SOURCE be defined on all #platforms?) AC_MSG_CHECKING([if cmsghdr exists in ]) case $host in *) AC_TRY_COMPILE([ #include #include ], [struct cmsghdr foo = {1,1,1}; struct msghdr bar; foo.cmsg_len = 0; foo.cmsg_type = SCM_RIGHTS; foo.cmsg_level = SOL_SOCKET; bar.msg_controllen = 1; ], [AC_DEFINE(HAVE_CMSGHDR, 1, [struct cmsghdr exists]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) ;; esac AC_MSG_CHECKING([for CMSG_SPACE in sys/socket.h]) AC_TRY_RUN([ #include #include int main() { int d = CMSG_SPACE(4); return 0; } ], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_CMSG_SPACE, 1, CMSG_SPACE exists)], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([for CMSG_LEN in sys/socket.h]) AC_TRY_RUN([ #include #include int main() { int d = CMSG_LEN(4); return 0; }], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_CMSG_LEN, 1, [CMSG_LEN exists])], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING([for sa_len in sockaddr]) AC_TRY_COMPILE([ #include #include ], [struct sockaddr foo; foo.sa_len = 0; ], [AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [sa_len exists in sockaddr]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) AC_MSG_CHECKING([to see if malloc_options exists]) AC_TRY_LINK([extern char *malloc_options;], [ malloc_options = 0; ], [AC_DEFINE(HAVE_MALLOC_OPTIONS, 1, [support for malloc debugging]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) AC_MSG_CHECKING([to see if __progname exists]) AC_TRY_LINK([extern char *__progname;], [ __progname = 0; ], [AC_DEFINE(HAVE_PROGNAME, 1, [programe name symbol exists]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) dnl Checks for libraries. AC_SEARCH_LIBS(crypt, crypt) #HP-UX 11.00 AC_SEARCH_LIBS(getspnam, sec) #FreeBSD has setproctitle in -lutil (Per Hedeland ) AC_SEARCH_LIBS(setproctitle, util) #pthread mutexes is used if getipnodebyname is implemented #XXX disable for now #AC_HAVE_LIBRARY(pthread) #Look for functions needed for socksify located in other places than libc SOCKSIFY_PRELOAD_LIBS="" oLIBS=$LIBS #HP-UX 11.00 LIBS="" AC_SEARCH_LIBS(bindresvport, rpcsoc) NLIBS="${NLIBS}${NLIBS:+ }$LIBS" LIBS="" #ignore when preloading is disabled (only the AC_SEARCH_LIBS test is needed) if test "x$preload_enabled" = "xt" -a "x${ac_cv_search_bindresvport}" = "x-lrpcsoc"; then AC_DEFINE_UNQUOTED(LIBRARY_LIBRPCSOC, "${base_library_path}librpcsoc.sl", [libname]) SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}librpcsoc.sl" AC_DEFINE(LIBRARY_BINDRESVPORT, LIBRARY_LIBRPCSOC, [function loc]) fi LIBS="" AC_SEARCH_LIBS(connect, socket) NLIBS="${NLIBS}${NLIBS:+ }$LIBS" LIBS="" #ignore when preloading is disabled (only the AC_SEARCH_LIBS test is needed) if test "x$preload_enabled" = "xt" -a "x${ac_cv_search_connect}" = "x-lsocket"; then AC_DEFINE_UNQUOTED(LIBRARY_LIBSOCKET, "${base_library_path}libsocket.${SOLIB_POSTFIX}", [libloc]) SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}libsocket.${SOLIB_POSTFIX}" AC_DEFINE(LIBRARY_CONNECT, LIBRARY_LIBSOCKET, [function loc]) AC_CHECK_LIB(socket, accept, AC_DEFINE(LIBRARY_ACCEPT, LIBRARY_LIBSOCKET, [function loc])) AC_CHECK_LIB(socket, bind, AC_DEFINE(LIBRARY_BIND, LIBRARY_LIBSOCKET, [function loc])) AC_CHECK_LIB(socket, bindresvport, AC_DEFINE(LIBRARY_BINDRESVPORT, LIBRARY_LIBSOCKET, [function loc])) AC_CHECK_LIB(socket, getpeername, AC_DEFINE(LIBRARY_GETPEERNAME, LIBRARY_LIBSOCKET, [function loc])) AC_CHECK_LIB(socket, getsockname, AC_DEFINE(LIBRARY_GETSOCKNAME, LIBRARY_LIBSOCKET, [function loc])) AC_CHECK_LIB(socket, getaddrinfo, AC_DEFINE(LIBRARY_GETADDRINFO, LIBRARY_LIBSOCKET, [function loc])) AC_CHECK_LIB(socket, freehostent, AC_DEFINE(LIBRARY_FREEHOSTENT, LIBRARY_LIBSOCKET, [function loc])) AC_CHECK_LIB(socket, recvfrom, AC_DEFINE(LIBRARY_RECVFROM, LIBRARY_LIBSOCKET, [function loc])) AC_CHECK_LIB(socket, rresvport, AC_DEFINE(LIBRARY_RRESVPORT, LIBRARY_LIBSOCKET, [function loc])) AC_CHECK_LIB(socket, recvmsg, AC_DEFINE(LIBRARY_RECVMSG, LIBRARY_LIBSOCKET, [function loc])) AC_CHECK_LIB(socket, sendmsg, AC_DEFINE(LIBRARY_SENDMSG, LIBRARY_LIBSOCKET, [function loc])) AC_CHECK_LIB(socket, send, AC_DEFINE(LIBRARY_SEND, LIBRARY_LIBSOCKET, [function loc])) AC_CHECK_LIB(socket, recv, AC_DEFINE(LIBRARY_RECV, LIBRARY_LIBSOCKET, [function loc])) AC_CHECK_LIB(socket, sendto, AC_DEFINE(LIBRARY_SENDTO, LIBRARY_LIBSOCKET, [function loc])) fi #doesn't work if test links with -lsocket (Solaris) AC_SEARCH_LIBS(inet_addr, nsl) NLIBS="${NLIBS}${NLIBS:+ }$LIBS" LIBS="" if test "x$preload_enabled" = "xt" -a "x${ac_cv_search_inet_addr}" = "x-lnsl"; then AC_DEFINE_UNQUOTED(LIBRARY_LIBNSL, "${base_library_path}libnsl.${SOLIB_POSTFIX}", [libloc]) SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}libnsl.${SOLIB_POSTFIX}" AC_CHECK_LIB(nsl, gethostbyname, [AC_DEFINE(LIBRARY_GETHOSTBYNAME, LIBRARY_LIBNSL, [function loc])]) AC_CHECK_LIB(nsl, gethostbyaddr, [AC_DEFINE(LIBRARY_GETHOSTBYADDR, LIBRARY_LIBNSL, [function loc])]) AC_CHECK_LIB(nsl, freehostent, AC_DEFINE(LIBRARY_FREEHOSTENT, LIBRARY_LIBNSL, [function loc])) AC_CHECK_LIB(nsl, getipnodebyname, [AC_DEFINE(LIBRARY_GETIPNODEBYNAME, LIBRARY_LIBNSL, [function loc])]) fi #XXX used for anything but gethostbyname2? consider testing for it # on Solaris (atleast 2.6, gcc) #linking with -lresolv results in error unless -shared is included #since gcc insists on linking statically with libresolv for which #no static version exists AC_SEARCH_LIBS(inet_aton, resolv) AC_SEARCH_LIBS(res_9_init, resolv) NLIBS="${NLIBS}${NLIBS:+ }$LIBS" LIBS="" if test "x$preload_enabled" = "xt" -a "x${ac_cv_search_inet_aton}" = "x-lresolv"; then AC_DEFINE_UNQUOTED(LIBRARY_LIBRESOLV, "${base_library_path}libresolv.${SOLIB_POSTFIX}", [libloc]) SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}libresolv.${SOLIB_POSTFIX}" AC_CHECK_LIB(resolv, gethostbyname2, [AC_DEFINE(LIBRARY_GETHOSTBYNAME2, LIBRARY_LIBRESOLV, [function loc])]) fi #XXX gcc on Solaris (using gnu ld) doesn't seems to implicitly link #with libdl in this test, which means that libdl will not be included #in socksify. if test "x$preload_enabled" = "xt"; then AC_SEARCH_LIBS(dlopen, dl) NLIBS="${NLIBS}${NLIBS:+ }$LIBS" LIBS="" if test "x${ac_cv_search_dlopen}" = "x-ldl"; then case $host in *-*-sunos4*) #XXX attempt to get libdl name libdl=`ls ${base_library_path}libdl.${SOLIB_POSTFIX}* | sed -e 's/.*\///' | sort -nr | head -n 1` if test x$libdl = x; then AC_MSG_WARN([unable to locate libdl]) else LIBRARY_DLOPEN=${base_library_path}${libdl} AC_MSG_WARN([hardcoding libdl to $LIBRARY_DLOPEN]) fi ;; *) LIBRARY_DLOPEN="${base_library_path}libdl.${SOLIB_POSTFIX}" ;; esac SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${LIBRARY_DLOPEN:+${PRELOAD_SEPERATOR}}${LIBRARY_DLOPEN}" fi fi LIBS="$oLIBS $NLIBS" AC_SUBST(SOCKSIFY_PRELOAD_LIBS) #specify location of the socks library in socksify too #NOTE: exec_prefix and prefix have the value NONE here if they are unset o_exec_prefix=${exec_prefix} o_prefix=${prefix} if test x${prefix} = xNONE; then prefix=$ac_default_prefix fi if test x${exec_prefix} = xNONE; then exec_prefix=$prefix fi LIBRARY_PREFIX=`eval echo \$libdir` LIBRARY_PREFIX=`eval echo \$LIBRARY_PREFIX` exec_prefix=${o_exec_prefix} prefix=${o_prefix} AC_SUBST(LIBRARY_PREFIX) #allow user to specify libc name, use default value otherwise AC_MSG_CHECKING([for libc name]) AC_ARG_WITH(libc, [ --with-libc=NAME manually set name of c library if necessary], [LIBC_NAME=$withval]) #set default? if test "x${LIBC_NAME}" = x; then case $host in *-*-linux-*) #XXX attempt to find latest c library #can't set it to libc.so directly, might be ld script LIBC_NAME=`ls /usr/lib/libc.so* /lib/libc.so* | sed -e 's/.*\///' | sort -nr | head -n 1` if test "x${LIBC_NAME}" = x; then #nothing found, set libc.so anyway LIBC_NAME="${base_library_path}libc.so" fi ;; *) LIBC_NAME="${base_library_path}libc.${SOLIB_POSTFIX}" ;; esac fi AC_MSG_RESULT(${LIBC_NAME}) AC_DEFINE_UNQUOTED(LIBRARY_LIBC, "${LIBC_NAME}", [libc name]) dnl #XXX include header in compilation test? dnl normal library testing doesn't work for libwrap (doesn't link dnl without allow/deny_severity) if test "x${ac_cv_header_tcpd_h}" = "xyes"; then case $host in *-*-linux-*) #XXX needed on atleast redhat AC_SEARCH_LIBS(yp_get_default_domain, nsl) ;; esac oLIBS=$LIBS AC_MSG_CHECKING([for libwrap]) if test x$no_libwrap = xt; then echo "disabled" else LIBS="$LIBS -lwrap" AC_TRY_LINK([ int allow_severity; int deny_severity; ], [hosts_access(0);], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LIBWRAP, 1, [use tcpwrappers]) want_libwrap=t], [AC_MSG_RESULT(no)]) fi LIBS="$oLIBS" fi #programs wanting libwrap should test for this Makefile.am conditional #(programs which don't use it probably won't enjoy being linked with it) AM_CONDITIONAL(WANT_LIBWRAP, test "x${want_libwrap}" != "x") AC_ARG_WITH(pam, [ --without-pam disable pam support @<:@default=detect@:>@], [PAM=$withval]) if test "${PAM}" != no; then #look for PAM header and lib AC_CHECK_HEADERS(security/pam_appl.h, [have_pam_header=t]) AC_SEARCH_LIBS(pam_start, pam, [have_libpam=t]) if test x"${have_pam_header}" != x -a x"${have_libpam}" != x; then AC_DEFINE(HAVE_PAM, 1, [PAM support]) fi fi #expected select behaviour? unset nb_select_err L_UNCON_SELECT([], [nb_select_err=t]) if test x"${nb_select_err}" = xt; then AC_MSG_WARN([operations on nonblocking sockets might fail on this platform]) fi L_SYMBOL_UNDERSCORE() #try to detect gcc bug (irix 64 problem, affects among others inet_ntoa) AC_MSG_CHECKING([for incorrect inet_ntoa behaviour]) AC_TRY_RUN([ #include #include #include #include int main(void) { struct sockaddr_in addr; char *a, *b = "195.195.195.195"; addr.sin_addr.s_addr = inet_addr(b); a = inet_ntoa(addr.sin_addr); if (strcmp(a, b) == 0) return 1; else return 0; } ], [AC_DEFINE(HAVE_BROKEN_INET_NTOA, 1, [platform bug]) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) AC_MSG_CHECKING([for __libc_enable_secure]) AC_TRY_RUN([ extern int __libc_enable_secure; int main() { if (__libc_enable_secure == 0) return 0; return 1; }], [AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_LIBC_ENABLE_SECURE, 1, [linux version of issetugid()])], AC_MSG_RESULT([no])) #Linux (redhat 5.2) defines socklen_t in , which is #included by . check for this first. AC_MSG_CHECKING([for socklen_t]) AC_TRY_COMPILE([ #include #include ], [socklen_t foo = 1;], [AC_MSG_RESULT(yes) socklen_found=t], [AC_MSG_RESULT(no) socklen_found=""]) AH_TEMPLATE([socklen_t], [platform workaround]) if test x"$socklen_found" = x; then case $host in alpha*-dec-osf* | *-*-aix*) AC_DEFINE(socklen_t, size_t) ;; *) AC_DEFINE(socklen_t, int) ;; esac fi #sig_atomic_t AC_MSG_CHECKING([for sig_atomic_t in ]) AC_EGREP_CPP(sig_atomic_t, [ #include ], [AC_DEFINE(HAVE_SIG_ATOMIC_T, 1, [sig_atomic_t defined in signal.h]) case $host in *-*-aix*) AC_DEFINE(HAVE_VOLATILE_SIG_ATOMIC_T, 1, [platform workaround]) ;; esac AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) AC_CHECK_TYPES([int8_t, int16_t, int32_t, uint8_t, uint16_t, uint32_t, in_port_t, in_addr_t], , , [ #include #include ]) AC_CHECK_TYPE(ssize_t, int) dnl Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP AC_FUNC_SETVBUF_REVERSED AC_TYPE_SIGNAL AC_FUNC_STRFTIME AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF AC_CHECK_FUNCS(select socket strcspn strdup strspn hstrerror issetugid) AC_CHECK_FUNCS(strvis vsnprintf getdtablesize sysconf inet_pton vsyslog) AC_CHECK_FUNCS(daemon bzero sockatmark difftime memmove seteuid setproctitle) AC_CHECK_FUNCS(inet_aton gethostbyname2 getaddrinfo getipnodebyname) AC_CHECK_FUNCS(getprpwnam getspnam getifaddrs freeifaddrs bindresvport) AC_CHECK_FUNCS(setegid) AC_MSG_CHECKING([for system V getpwnam]) unset getpwnam_alt if test x"${ac_cv_func_getprpwnam}" = xyes; then getpwnam_alt=t fi if test x"${ac_cv_func_getspnam}" = xyes; then getpwnam_alt=t fi #XXX if test x"${getpwnam_alt}" = x; then AC_DEFINE(HAVE_WORKING_GETPWNAM, 1, [system V getpwnam]) AC_MSG_RESULT(no) else AC_MSG_RESULT(yes) fi #sun4 seems to have a profiled libc missing strerror if test x$s_profiling = x; then AC_CHECK_FUNCS(strerror) else case $host in *-*-sunos4*) AC_MSG_WARN([omitting strerror test on sunos4 with profiling enabled]) ;; *) AC_CHECK_FUNCS(strerror) ;; esac fi if false; then AC_DEFINE(HAVE_DUMPCONF, 1, [GUI tool]) fi #look for modules, and check version L_MODVER(bandwidth, 31) #module name, version L_MODVER(redirect, 18) L_MODVER(session, 3) #helper files L_MODVER(checkmodule, 1, nokey) L_MODVER(shmem, 1, nokey) #change all #undef's to #define foo 0 AH_BOTTOM([ #include "redefac.h" ]) #add any warning flags (value set above) CFLAGS="$CFLAGS $warn" if test "x${prerelease}" != "x"; then echo "warning flags: $warn" echo "compiler flags: $comp_flags" echo "CFLAGS: $CFLAGS" echo "CPPFLAGS: $CPPFLAGS" fi AC_SUBST(TOPEXTRADIST) AC_CONFIG_FILES(sockd/Makefile include/Makefile lib/Makefile dlib/Makefile) AC_CONFIG_FILES(Makefile example/Makefile doc/Makefile bin/Makefile) AC_CONFIG_FILES(capi/Makefile SPECS/Makefile SPECS/dante.spec bin/socksify) AC_CONFIG_FILES(libscompat/Makefile contrib/Makefile unlicensed/Makefile) AC_CONFIG_FILES(doc/module/Makefile VERSION) AC_OUTPUT echo "" echo " Configure status:" echo "" if test x"${no_acceptlock}" = xt; then echo "Acceptlock: OK (not required)" else echo "Acceptlock: workaround enabled on this platform" fi if test x"${no_preload}" = xt; then echo "Preloading: disabled" else echo "Preloading: OK" fi if test x"${so_sndlowat}" = xt; then echo "SO_SNDLOWAT: OK" else echo "SO_SNDLOWAT: not enabled for this platform" fi if test x"${nb_select_err}" = xt; then echo "select: unexpected select behaviour on unconnected sockets," echo " operations on nonblocking sockets might fail on this platform" else echo "select: OK" fi if test x"${no_routeinfo}" = xt; then echo "Routeinfo: not supported on this platform" else echo "Routeinfo: OK" fi echo "" echo "This software should perform optimally when all the lines above report 'OK'." echo "This is not possible on all platforms." echo "" echo " Modules:" echo "" if test x"$MOD_REDIRECT" = x; then echo "redirect: OK" else echo "redirect: not found" fi if test x"$MOD_BANDWIDTH" = x; then echo "bandwidth: OK" else echo "bandwidth: not found" fi if test x"$MOD_SESSION" = x; then echo "session: OK" else echo "session: not found" fi echo "" if test x$prerelease != x; then echo " This is a pre-release. We ask that everyone who can, test it to the extent possible, to help reduce problems in the upcoming release. Problems can be reported to dante-bugs@inet.no. Note that Dante pre-releases are often configured in a way that can significantly increase the load on the machine. This is done to stress the server more, increasing the chances of detecting potential problems. " fi VINFO=README.latest test -s "$VINFO" && cat "$VINFO" exit 0 dante-1.1.19.dfsg/SUPPORT0000644000175000017500000000132307405651610013400 0ustar roamroam# $Id: SUPPORT,v 1.10 2001/12/12 12:54:32 karls Exp $ Dante is developed by Inferno Nettverk A/S, Norway. Dante is available under such a license that you can use it for free. Inferno Nettverk A/S does however provide various commercial services related to Dante. This sponsors further development. The services include both custom installs of Dante, performed over the network if need be, as well as commercial support. For more information about commercial installs and support please contact sales@inet.no. Also see the Dante support page, http://www.inet.no/dante/support.html. For non-commercial support, see http://www.inet.no/dante/lists.html for the correct mailinglist to submit your comments/questions to. dante-1.1.19.dfsg/config.guess0000755000175000017500000012522410355316156014631 0ustar roamroam#! /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 Free Software Foundation, Inc. timestamp='2005-12-13' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted 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. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; x86:Interix*:[345]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #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;}'`" 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} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-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 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" 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 #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) 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 # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: dante-1.1.19.dfsg/install-sh0000755000175000017500000001272006566233746014325 0ustar roamroam#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 dante-1.1.19.dfsg/config.sub0000755000175000017500000007662710355316156014310 0ustar roamroam#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-12-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted 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. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m32c) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; m32c-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: dante-1.1.19.dfsg/missing0000755000175000017500000002123107405634013013676 0ustar roamroam#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.3 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # 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 ${1+"$@"} && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar ${1+"$@"} && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" ${1+"$@"} && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" ${1+"$@"} && 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 you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 dante-1.1.19.dfsg/example/0000755000175000017500000000000011037370225013731 5ustar roamroamdante-1.1.19.dfsg/example/socks-simple-withoutnameserver.conf0000644000175000017500000000222107405661031023001 0ustar roamroam# $Id: socks-simple-withoutnameserver.conf,v 1.5 2001/12/12 13:56:41 karls Exp $ # # A simple sample socks.conf for users without a local nameserver. # Clients going anywhere go via the proxyserver listening at IP # address 10.1.1.1, port 1080. Uncomment the line(s) corresponding to # the proxyprotocols your proxyserver supports. #route { # from: 0.0.0.0/0 to: 0.0.0.0/0 via: 10.1.1.1 port = 1080 # proxyprotocol: socks_v5 # server supports socks v5. # proxyprotocol: socks_v4 # server supports socks v4 # proxyprotocol: http_v1.0 # server supports http v1.0 # proxyprotocol: msproxy_v2 # server supports msproxy v2 #} # This is identical to the above, but it matches hostnames instead. # clients going anywhere go via the proxyserver listening at IP # address 10.1.1.1, port 1080. Uncomment the line(s) corresponding to # the proxyprotocols your proxyserver supports. Note that the socks # v4 protocol does not support this. #route { # from: 0.0.0.0/0 to: . via: 10.1.1.1 port = 1080 # proxyprotocol: socks_v5 # server supports socks v5. # proxyprotocol: http_v1.0 # server supports http v1 # proxyprotocol: msproxy_v2 # server supports msproxy v2 #} dante-1.1.19.dfsg/example/socks-simple.conf0000644000175000017500000000113607405661031017214 0ustar roamroam# $Id: socks-simple.conf,v 1.5 2001/12/12 13:56:41 karls Exp $ # # A simple sample socks.conf for users with a local nameserver. # Clients going anywhere go via the proxyserver listening at # IP address 10.1.1.1, port 1080. Uncomment the line(s) # corresponding to the proxyprotocols your proxyserver supports. #route { # from: 0.0.0.0/0 to: 0.0.0.0/0 via: 10.1.1.1 port = 1080 # proxyprotocol: socks_v5 # server supports socks v5. # proxyprotocol: socks_v4 # server supports socks v4 # proxyprotocol: http_v1.0 # server supports http v1 # proxyprotocol: msproxy_v2 # server supports msproxy v2 #} dante-1.1.19.dfsg/example/sockd-basic.conf0000644000175000017500000000170307406076425016775 0ustar roamroam## general configuration (taken from FAQ; ) #internal: fxp0 port = 1080 #external: fxp1 #method: username none ##user.privileged: root #user.notprivileged: sockd #logoutput: stderr ## client access rules #client pass { # from: 10.1.1.0/24 to: 0.0.0.0/0 #internal network # log: connect disconnect #} ## server operation access rules #allow bind to ports greater than 1023 #pass { # from: 0.0.0.0/0 to: 0.0.0.0/0 port gt 1023 # command: bind # log: connect disconnect #} #allow outgoing connections (tcp and udp) #pass { # from: 0.0.0.0/0 to: 0.0.0.0/0 # command: connect udpassociate # log: connect disconnect #} #allow replies to bind, and incoming udp packets #pass { # from: 0.0.0.0/0 to: 0.0.0.0/0 # command: bindreply udpreply # log: connect error #} #log the rest #block { # from: 0.0.0.0/0 to: 0.0.0.0/0 # log: connect error #}dante-1.1.19.dfsg/example/sockd.conf0000644000175000017500000001670410354742701015716 0ustar roamroam# $Id: sockd.conf,v 1.43 2005/12/26 16:35:26 michaels Exp $ # # A sample sockd.conf # # # The configfile is divided into three parts; # 1) serversettings # 2) rules # 3) routes # # The recommended order is: # Serversettings: # logoutput # internal # external # method # clientmethod # users # compatibility # extension # connecttimeout # iotimeout # srchost # # Rules: # client block/pass # from to # libwrap # log # # block/pass # from to # method # command # libwrap # log # protocol # proxyprotocol # # Routes: # the server will log both via syslog, to stdout and to /var/log/lotsoflogs #logoutput: syslog stdout /var/log/lotsoflogs logoutput: stderr # The server will bind to the address 10.1.1.1, port 1080 and will only # accept connections going to that address. #internal: 10.1.1.1 port = 1080 # Alternatively, the interface name can be used instead of the address. #internal: eth0 port = 1080 # all outgoing connections from the server will use the IP address # 195.168.1.1 #external: 192.168.1.1 # list over acceptable methods, order of preference. # A method not set here will never be selected. # # If the method field is not set in a rule, the global # method is filled in for that rule. # # methods for socks-rules. #method: username none #rfc931 # methods for client-rules. #clientmethod: none #or if you want to allow rfc931 (ident) too #method: username rfc931 none #or for PAM authentification #method: pam # # An important section, pay attention. # # when doing something that can require privilege, it will use the # userid "sockd". #user.privileged: sockd # when running as usual, it will use the unprivileged userid of "sockd". #user.notprivileged: sockd # If you compiled with libwrap support, what userid should it use # when executing your libwrap commands? "libwrap". #user.libwrap: libwrap # # some options to help clients with compatibility: # # when a client connection comes in the socksserver will try to use # the same port as the client is using, when the socksserver # goes out on the clients behalf (external: IP address). # If this option is set, Dante will try to do it for reserved ports aswell. # This will usually require user.privileged to be set to "root". #compatibility: sameport # If you are using the bind extension and have trouble running servers # via the server, you might try setting this. The consequences of it # are unknown. #compatibility: reuseaddr # # The Dante server supports some extensions to the socks protocol. # These require that the socks client implements the same extension and # can be enabled using the "extension" keyword. # # enable the bind extension. #extension: bind # # # misc options. # # how many seconds can pass from when a client connects til it has # sent us it's request? Adjust according to your network performance # and methods supported. #connecttimeout: 30 # on a lan, this should be enough if method is "none". # how many seconds can the client and it's peer idle without sending # any data before we dump it? Unless you disable tcp keep-alive for # some reason, it's probably best to set this to 0, which is # "forever". #iotimeout: 0 # or perhaps 86400, for a day. # do you want to accept connections from addresses without # dns info? what about addresses having a mismatch in dnsinfo? #srchost: nounknown nomismatch # # The actual rules. There are two kinds and they work at different levels. # # The rules prefixed with "client" are checked first and say who is allowed # and who is not allowed to speak/connect to the server. I.e the # ip range containing possibly valid clients. # It is especially important that these only use IP addresses, not hostnames, # for security reasons. # # The rules that do not have a "client" prefix are checked later, when the # client has sent its request and are used to evaluate the actual # request. # # The "to:" in the "client" context gives the address the connection # is accepted on, i.e the address the socksserver is listening on, or # just "0.0.0.0/0" for any address the server is listening on. # # The "to:" in the non-"client" context gives the destination of the clients # socksrequest. # # "from:" is the source address in both contexts. # # the "client" rules. All our clients come from the net 10.0.0.0/8. # # Allow our clients, also provides an example of the port range command. #client pass { # from: 10.0.0.0/8 port 1-65535 to: 0.0.0.0/0 # method: rfc931 # match all idented users that also are in passwordfile #} # This is identical to above, but allows clients without a rfc931 (ident) # too. In practise this means the socksserver will try to get a rfc931 # reply first (the above rule), if that fails, it tries this rule. #client pass { # from: 10.0.0.0/8 port 1-65535 to: 0.0.0.0/0 #} # drop everyone else as soon as we can and log the connect, they are not # on our net and have no business connecting to us. This is the default # but if you give the rule yourself, you can specify details. #client block { # from: 0.0.0.0/0 to: 0.0.0.0/0 # log: connect error #} # the rules controlling what clients are allowed what requests # # you probably don't want people connecting to loopback addresses, # who knows what could happen then. #block { # from: 0.0.0.0/0 to: 127.0.0.0/8 # log: connect error #} # the people at the 172.16.0.0/12 are bad, no one should talk to them. # log the connect request and also provide an example on how to # interact with libwrap. #block { # from: 0.0.0.0/0 to: 172.16.0.0/12 # libwrap: spawn finger @%a # log: connect error #} # unless you need it, you could block any bind requests. #block { # from: 0.0.0.0/0 to: 0.0.0.0/0 # command: bind # log: connect error #} # or you might want to allow it, for instance "active" ftp uses it. # Note that a "bindreply" command must also be allowed, it # should usually by from "0.0.0.0/0", i.e if a client of yours # has permission to bind, it will also have permission to accept # the reply from anywhere. #pass { # from: 10.0.0.0/8 to: 0.0.0.0/0 # command: bind # log: connect error #} # some connections expect some sort of "reply", this might be # the reply to a bind request or it may be the reply to a # udppacket, since udp is packetbased. # Note that nothing is done to verify that it's a "genuine" reply, # that is in general not possible anyway. The below will allow # all "replies" in to your clients at the 10.0.0.0/8 net. #pass { # from: 0.0.0.0/0 to: 10.0.0.0/8 # command: bindreply udpreply # log: connect error #} # pass any http connects to the example.com domain if they # authenticate with username. # This matches "example.com" itself and everything ending in ".example.com". #pass { # from: 10.0.0.0/8 to: .example.com port = http # log: connect error # method: username #} # block any other http connects to the example.com domain. #block { # from: 0.0.0.0/0 to: .example.com port = http # log: connect error #} # everyone from our internal network, 10.0.0.0/8 is allowed to use # tcp and udp for everything else. #pass { # from: 10.0.0.0/8 to: 0.0.0.0/0 # protocol: tcp udp #} # last line, block everyone else. This is the default but if you provide # one yourself you can specify your own logging/actions #block { # from: 0.0.0.0/0 to: 0.0.0.0/0 # log: connect error #} # route all http connects via an upstream socks server, aka "server-chaining". #route { # from: 10.0.0.0/8 to: 0.0.0.0/0 port = http via: socks.example.net port = socks #} dante-1.1.19.dfsg/example/Makefile.am0000644000175000017500000000020210354021467015761 0ustar roamroamEXTRA_DIST = socks-simple.conf socks.conf sockd.conf sockd-basic.conf \ socks-simple-withoutnameserver.conf sockd-chaining.conf dante-1.1.19.dfsg/example/Makefile.in0000644000175000017500000002251610362704167016012 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = example DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = socks-simple.conf socks.conf sockd.conf sockd-basic.conf \ socks-simple-withoutnameserver.conf sockd-chaining.conf 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu example/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu example/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 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-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: dante-1.1.19.dfsg/example/socks.conf0000644000175000017500000001025307405661032015726 0ustar roamroam# $Id: socks.conf,v 1.28 2001/12/12 13:56:42 karls Exp $ # # A sample socks.conf # The configfile is divided into two parts; first misc. settings, # then the routes. Objects in '[]' are optional. # # # recommended order is: # [debug] # [logoutput] # [resolveprotocol] # # routes: # from to via # [command] # [extension] # [protocol] # [proxyprotocol] #debug: 1 # uncomment to enable debugging #logoutput: stdout # users usually don't want to be bothered with that. # What protocol should be used for resolving hostnames? It's important # to set this right. #resolveprotocol: udp # default #resolveprotocol: tcp # set this if your socksserver only supports socksv4. #resolveprotocol: fake # set this if your clients can't access nameserver, # neither directly nor proxied. # # the routes # # specifying routes for accepting remote connections (via bind()) is # difficult since we can't know what the "to:" address is # until we actually get the connection Since we support letting # the client accept connections both via the proxyserver and # "directly" at the same time, we have two options though: # a) specify a route for bind (only) first going via the proxyserver. # This will also handle "direct" connections. # b) specify a route for bind (only) first going "direct". # This means clients will only be able to accept "direct" # connections. # we want to accept remote connections via the proxyserver. #route { # from: 0.0.0.0/0 to: 0.0.0.0/0 via: 10.1.1.1 port = 1080 # command: bind #} # we do not want to accept remote connections via the proxyserver. #route { # from: 0.0.0.0/0 to: 0.0.0.0/0 via: direct # command: bind #} # if you don't route all local connections via direct, you should # at least route nameserver connections via direct connections if you # can. That can make for much better performance, depending on # your setup. Make sure the nameserver line is the first. # # Assuming your nameserver runs on address 10.1.1.1, you can do it like this: #route { # from: 0.0.0.0/0 to: 10.1.1.1/32 port = domain via: direct #} # have a route making all connections to loopback addresses be direct. #route { # from: 0.0.0.0/0 to: 127.0.0.0/8 via: direct # command: connect udpassociate # everything but bind, bind confuses us. #} # Our net is the 10.0.0.0/8 net, let clients going to local address go # direct, not via server. #route { # from: 0.0.0.0/0 to: 10.0.0.0/8 via: direct #} # for poor souls trapped behind a msproxy server. #route { # from: 0.0.0.0/0 to: 0.0.0.0/0 via: 10.1.1.1 port = 1745 # protocol: tcp # server supports tcp # proxyprotocol: msproxy_v2 # server runs msproxy_v2 #} # clients going anywhere else go via server listening at # IP address 10.1.1.1, port 1080. Note that unless you have # specified a direct connection for DNS, or the socksserver is resolvable # without network traffic, you can't give a hostname for the socksserver, # you must give a IP address. (the reasons for that are logical enough, # you would create a loop otherwise.) #route { # from: 0.0.0.0/0 to: 0.0.0.0/0 via: 10.1.1.1 port = 1080 # protocol: tcp udp # server supports tcp and udp. # proxyprotocol: socks_v4 socks_v5 # server supports socks v4 and v5. # method: none #username # we are willing to authenticate via # # method "none", not "username". #} # this is identical to the above, but it matches hostnames instead. # This is if you have clients that are unable to resolve hostnames. # It can be important that hostname routes come after address routes. #route { # from: 0.0.0.0/0 to: . via: 10.1.1.1 port = 1080 # protocol: tcp udp # server supports tcp and udp. # proxyprotocol: socks_v4 socks_v5 # server supports socks v4 and v5. # method: none #username # we are willing to authenticate via # # method "none", not "username". #} # identical to above two routes, but using a httpproxy instead. # #route { # from: 0.0.0.0/0 to: 0.0.0.0/0 via: 10.1.1.1 port = 3128 # command: connect # only thing a httproxy supports. # proxyprotocol: http_v1.0 #} #route { # from: 0.0.0.0/0 to: . via: 10.1.1.1 port = 3128 # command: connect # only thing a httproxy supports. # proxyprotocol: http_v1.0 #} dante-1.1.19.dfsg/example/sockd-chaining.conf0000644000175000017500000000065610354021564017470 0ustar roamroamlogoutput: stdout internal: de0 port = 1080 external: de1 method: none client pass { from: 0.0.0.0/0 to: 0.0.0.0/0 log: connect disconnect error } pass { from: 0.0.0.0/0 to: 0.0.0.0/0 log: connect disconnect error iooperation } #make outgoing TCP connections via sockd2.example.org route { from: 0.0.0.0/0 to: 0.0.0.0/0 port = http via: sockd2.example.org port = 1080 command: connect } dante-1.1.19.dfsg/mkinstalldirs0000755000175000017500000000132307405634013015105 0ustar roamroam#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.2 2001/12/12 10:57:15 karls Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here dante-1.1.19.dfsg/Makefile.am0000644000175000017500000000022510173133107014325 0ustar roamroamAUTOMAKE_OPTIONS = foreign SUBDIRS = @TOPSUBDIRS@ EXTRA_DIST = BUGS CREDITS LICENSE SUPPORT VERSION VERSION.in README.latest \ @TOPEXTRADIST@ dante-1.1.19.dfsg/Makefile.in0000644000175000017500000004642110362704175014357 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/VERSION.in \ $(top_srcdir)/configure INSTALL NEWS TODO config.guess \ config.sub depcomp install-sh ltmain.sh missing mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = VERSION SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = foreign SUBDIRS = @TOPSUBDIRS@ EXTRA_DIST = BUGS CREDITS LICENSE SUPPORT VERSION VERSION.in README.latest \ @TOPEXTRADIST@ all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) VERSION: $(top_builddir)/config.status $(srcdir)/VERSION.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/. $(distdir)/SPECS $(distdir)/bin @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libtool clean-recursive \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-libtool distclean-recursive \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-info-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: dante-1.1.19.dfsg/VERSION0000644000175000017500000000001510364161210013334 0ustar roamroamDante 1.1.19 dante-1.1.19.dfsg/unlicensed/0000755000175000017500000000000011037370225014427 5ustar roamroamdante-1.1.19.dfsg/unlicensed/bandwidth_key.c0000644000175000017500000000057007700305361017412 0ustar roamroam/* * $Id: bandwidth_key.c,v 1.3 2003/07/01 13:21:53 michaels Exp $ * * Copyright (c) 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. */ #include "common.h" static const char rcsid[] = "$Id: bandwidth_key.c,v 1.3 2003/07/01 13:21:53 michaels Exp $"; const char *module_bandwidth_ipaddrv[] = { NULL }; const int module_bandwidth_ipaddrc = 0; dante-1.1.19.dfsg/unlicensed/redirect.c0000644000175000017500000000456607700305361016410 0ustar roamroam/* * Copyright (c) 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: redirect.c,v 1.4 2003/07/01 13:21:53 michaels Exp $"; const char module_redirect_version[] = "$Id: redirect.c,v 1.4 2003/07/01 13:21:53 michaels Exp $"; void redirectsetup(void) { } int redirect(s, addr, host, command, from, to) int s; struct sockaddr *addr; struct sockshost_t *host; int command; const struct ruleaddress_t *from; const struct ruleaddress_t *to; { return 0; } dante-1.1.19.dfsg/unlicensed/redirect_key.c0000644000175000017500000000056407700305361017252 0ustar roamroam/* * $Id: redirect_key.c,v 1.3 2003/07/01 13:21:53 michaels Exp $ * * Copyright (c) 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. */ #include "common.h" static const char rcsid[] = "$Id: redirect_key.c,v 1.3 2003/07/01 13:21:53 michaels Exp $"; const char *module_redirect_ipaddrv[] = { NULL }; const int module_redirect_ipaddrc = 0; dante-1.1.19.dfsg/unlicensed/shmem.c0000644000175000017500000000425610360254530015711 0ustar roamroam/* * $Id: shmem.c,v 1.4 2006/01/08 18:26:32 karls Exp $ * * Copyright (c) 2005, 2006 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: shmem.c,v 1.4 2006/01/08 18:26:32 karls Exp $"; void shmem_setup(void) { } void shmem_lockall(void) { } void shmem_unlockall(void) { } dante-1.1.19.dfsg/unlicensed/bandwidth.c0000644000175000017500000000523510333437523016547 0ustar roamroam/* * Copyright (c) 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" #include /* XXX */ static const char rcsid[] = "$Id: bandwidth.c,v 1.12 2005/11/02 12:11:28 michaels Exp $"; const char module_bandwidth_version[] = "$Id: bandwidth.c,v 1.12 2005/11/02 12:11:28 michaels Exp $"; int bw_use(bw) bw_t *bw; { return 1; } bw_t * bw_alloc(client, number) int client; int number; { return NULL; } void bw_unuse(bw) bw_t *bw; { } ssize_t bw_left(bw) const bw_t *bw; { return MAX(SOCKD_BUFSIZETCP, SOCKD_BUFSIZEUDP); } void bw_update(bw, bwused, bwusedtime) bw_t *bw; size_t bwused; const struct timeval *bwusedtime; { } struct timeval * bw_isoverflow(bw, timenow, overflow) bw_t *bw; const struct timeval *timenow; struct timeval *overflow; { return NULL; } dante-1.1.19.dfsg/unlicensed/session.c0000644000175000017500000000441610360254530016261 0ustar roamroam/* * $Id: session.c,v 1.2 2006/01/08 18:26:32 karls Exp $ * * Copyright (c) 2005, 2006 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: session.c,v 1.2 2006/01/08 18:26:32 karls Exp $"; extern const char *module_session_ipaddrv[]; extern const int module_session_ipaddrc; void session_unuse(ss) session_t *ss; { } int session_use(ss) session_t *ss; { return 1; } dante-1.1.19.dfsg/unlicensed/Makefile.am0000644000175000017500000000017110333437523016465 0ustar roamroamEXTRA_DIST = checkmodule.c bandwidth.c bandwidth_key.c \ redirect.c redirect_key.c shmem.c session.c session_key.c dante-1.1.19.dfsg/unlicensed/Makefile.in0000644000175000017500000002251610362704175016507 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = unlicensed DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = checkmodule.c bandwidth.c bandwidth_key.c \ redirect.c redirect_key.c shmem.c session.c session_key.c 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu unlicensed/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu unlicensed/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 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-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: dante-1.1.19.dfsg/unlicensed/session_key.c0000644000175000017500000000054410333442056017131 0ustar roamroam/* * $Id: session_key.c,v 1.1 2005/11/06 17:58:06 michaels Exp $ * * Copyright (c) 2005 * Inferno Nettverk A/S, Norway. All rights reserved. */ #include "common.h" static const char rcsid[] = "$Id: session_key.c,v 1.1 2005/11/06 17:58:06 michaels Exp $"; const char *module_session_ipaddrv[] = { NULL }; const int module_session_ipaddrc = 0; dante-1.1.19.dfsg/unlicensed/checkmodule.c0000644000175000017500000000462307700305361017064 0ustar roamroam/* * $Id: checkmodule.c,v 1.6 2003/07/01 13:21:53 michaels Exp $ * * Copyright (c) 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ #include "common.h" static const char rcsid[] = "$Id: checkmodule.c,v 1.6 2003/07/01 13:21:53 michaels Exp $"; void checkmodule(name) const char *name; { const char *function = "checkmodule()"; const char **ipv = NULL; int ipc = 0; int i; slog(LOG_INFO, "%s: checking license for module '%s'", function, name); serrx(EXIT_FAILURE, "%s: license error: module '%s' not installed", function, name); } dante-1.1.19.dfsg/acinclude.m40000644000175000017500000001400510351346525014473 0ustar roamroam# -- acinclude start -- define([concat], [$1$2]) dnl XXX likely a simpler way to do this AC_DEFUN([L_MODVER], [AC_MSG_CHECKING(for module $1) if test -f "licensed/$1.c"; then dnl XXX two single quotes in first argument to split, dnl prevents removal by m4 MODVERSION=`awk '/Id:/{ split($''4,a,".");print a[[2]]; exit }' licensed/$1.c` if test "$MODVERSION" -lt "$2"; then echo "" echo "You have a outdated version of the $1 module." echo "Please contact Inferno Nettverk A/S for an updated" echo "version before you attempt to compile." echo "Inferno Nettverk A/S can be reached at info@inet.no." echo "" echo "There is no additional cost for upgrading." exit 1 fi unset concat(MOD_, m4_toupper($1)) AC_DEFINE(concat(HAVE_MODULE_, m4_toupper($1)), 1, [module $1 installed])dnl AC_MSG_RESULT(yes) else concat(MOD_, m4_toupper($1))=un AC_MSG_RESULT(no) fi AC_LINK_FILES(${concat(MOD_, m4_toupper($1))}licensed/$1.c, sockd/$1.c) if test x"$3" != xnokey; then AC_LINK_FILES(${concat(MOD_, m4_toupper($1))}licensed/$1_key.c, sockd/$1_key.c) fi ]) AC_DEFUN([L_UNCON_SELECT], [AC_MSG_CHECKING(for expected select behaviour) AC_RUN_IFELSE([[ /* * ftp.inet.no:/pub/home/michaels/stuff/socket-select.c * $ cc socket-select.c && uname -a && ./a.out * * Thanks to Eric Anderson . * */ #include #include #include #include #include #include #include #include #include #include #include #define BLOCKING(b) (b ? ("blocking") : ("non-blocking")) static int selectcheck(int s); static int dotests(int s, int blocking); int main(void) { int s, p; struct sigaction sigact; sigemptyset(&sigact.sa_mask); sigact.sa_handler = SIG_IGN; sigact.sa_flags = 0; if (sigaction(SIGPIPE, &sigact, NULL) != 0) { perror("sigaction()"); exit(1); } if ((s = socket(AF_INET, SOCK_STREAM, 0)) == -1) { perror("socket()"); exit(1); } if ((p = fcntl(s, F_GETFL, 0)) == -1 || fcntl(s, F_SETFL, p | O_NONBLOCK) == -1) { perror("fcntl()"); exit(1); } p = dotests(s, 0); close(s); return p; } static int dotests(s, blocking) int s; int blocking; { int p, rc; struct sockaddr_in addr; fprintf(stderr, "testing with %s, bound, socket:\n", BLOCKING(blocking)); bzero(&addr, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl(INADDR_ANY); addr.sin_port = htons(0); /* LINTED pointer casts may be troublesome */ if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) != 0) { perror("bind(), running linux?"); exit(1); } fprintf(stderr, "\tselect() returned %d\n", selectcheck(s)); p = read(s, NULL, 0); fprintf(stderr, "\tread() returned %d, errno = %d (%s)\n", p, errno, (strerror(errno))); p = write(s, &s, sizeof(s)); fprintf(stderr, "\twrite() returned %d, errno = %d (%s)\n", p, errno, (strerror(errno))); fprintf(stderr, "testing with %s, bound, listening, socket:\n", BLOCKING(blocking)); if (listen(s, 1) != 0) { perror("listen()"); exit(1); } fprintf(stderr, "\tselect() returned %d\n", rc = selectcheck(s)); p = read(s, NULL, 0); fprintf(stderr, "\tread() returned %d, errno = %d (%s)\n", p, errno, (strerror(errno))); p = write(s, &s, sizeof(s)); fprintf(stderr, "\twrite() returned %d, errno = %d (%s)\n", p, errno, (strerror(errno))); return rc; } static int selectcheck(s) int s; { fd_set rset, wset, xset; struct timeval timeout; int ret; FD_ZERO(&rset); FD_SET(s, &rset); wset = xset = rset; timeout.tv_sec = 0; timeout.tv_usec = 0; errno = 0; ret = select(s + 1, &rset, &wset, &xset, &timeout); if (FD_ISSET(s, &rset)) fprintf(stderr, "\tsocket is readable\n"); if (FD_ISSET(s, &wset)) fprintf(stderr, "\tsocket is writeable\n"); if (FD_ISSET(s, &xset)) fprintf(stderr, "\tsocket has an exception pending\n"); return ret; }]], [AC_MSG_RESULT(yes) [$1]], [AC_MSG_RESULT(no) [$2]])]) #can it really be this simple? #nope, doesn't handle coff files which also have no underscore AC_DEFUN([L_SYMBOL_UNDERSCORE], [AC_MSG_CHECKING(for object file type) AH_TEMPLATE([HAVE_NO_SYMBOL_UNDERSCORE], [platform symbol type]) AC_TRY_RUN([ /* look for ELF identification header at the start of argv[0] */ #include #include #include /* * ELF header, from ELF standard (Portable Formats Specification, * Version 1.1). */ char elfheader[] = { 0x7f, 'E', 'L', 'F' }; int main (argc, argv) int argc; char *argv[]; { int fd; int len = sizeof(elfheader); char header[len]; if ((fd = open(argv[0], O_RDONLY, 0)) == -1) { perror("open"); exit(1); } if (read(fd, header, len) != len) { perror("read"); exit(1); } if (memcmp(header, elfheader, len) == 0) exit(0); /* pointy ears */ else exit(1); } ], [AC_MSG_RESULT(elf) AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE)], [ #XXX exceptions for coff platforms, should be detected automatically case $host in alpha*-dec-osf*) AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE) AC_MSG_RESULT(coff) ;; *-*-hpux*) #XXX apparently does not use underscore AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE) AC_MSG_RESULT(a.out?) ;; *) AC_MSG_RESULT(a.out) ;; esac])]) dnl addproto - generate AC_DEFINE statements define([addproto], [AC_DEFINE_UNQUOTED(HAVE_PROT_$1_$2, [$3], [proto])dnl ifelse([$4], , , [addproto($1, m4_incr($2), m4_shiftn(3, $@))])]) dnl tproto - generate statements for running AC_COMPILE_IFELSE define([tproto], [AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([ #include #include #include #include #include m4_esyscmd([echo "$3" | cut -d, -f 1])dnl $1(m4_esyscmd([echo "$3" | cut -d, -f 2-]));], [])], [addproto(m4_toupper($1), 0, $3) AC_MSG_RESULT(ok)], [ifelse([$4], , [AC_MSG_RESULT(failure) $2], [tproto([$1], [$2], m4_shiftn(3, $@))])])]) dnl L_NSOCKPROTO - determine function prototypes by compilation AC_DEFUN([L_NSOCKPROTO],[ AC_REQUIRE([AC_COMPILE_IFELSE])dnl AC_MSG_CHECKING([prototypes for $1])dnl tproto($@)]) # -- acinclude end --dante-1.1.19.dfsg/INSTALL0000644000175000017500000002504207037635144013343 0ustar roamroam# $Id: INSTALL,v 1.20 2000/01/14 15:01:56 karls Exp $ This file describes how to install Dante. Dante is a Socks client and server firewall implementation. It can be installed on a machine with access to a external TCP/IP network and will allow all other machines, without direct access to that network, to be relayed through the machine the Dante server is running on. The external network will never see any other machines than the one Dante is running on. INSTALLATION Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. 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. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. Test the server and clients for some days or more. 6. That's it. To report success: $ kill -USR1 `cat /var/run/sockd.pid` # the above command should produce some server statistics in your # logfile, save it to the file 'stats'. If you are only using # client, skip the 'stats' file but do the rest please. # If you should have any objections to being mentioned by name # please mention that. $ (echo ' '; cat stats include/autoconf.h) \ | mail dante-qst@inet.no Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as 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 `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. Program Specific configure options ================================== These `configure' options are also supported (run `configure' with `--help' to list all options. `--enable-debug' Compile with extra debugging information. `--enable-warnings' Compiles the package with '-Wall'; shows more compiler warnings. `--enable-diagnostics' Compiles with diagnostics enabled. `--enable-profiling' Build the libraries and the server with profiling. `--enable-linting' Run (BSD) lint when compiling the source-code. `--disable-libwrap' Disable test for libwrap. Makes no difference if libwrap doesn't exist on the local system. `--disable-preload' Do not build libdsocks. The dynamic sockslibrary might not work properly on all architectures. This option disables building of the library. Also disables it's use in the server. `--disable-clientdl' Disable building of libdsocks. `--disable-serverdl' Enable the use of the libdsocks functionality in the server. Will allow the use of the hostcache code with libwrap. On by default when libwrap is found and not disabled, off by default otherwise. `--with-socks-conf=FILE' Read the library configuration file from FILE instead of /etc/socks.conf. `--with-sockd-conf=FILE' Read the server configuration file from FILE instead of /etc/sockd.conf. `--with-pidfile=FILE' Write the server process id into FILE instead of /var/run/sockd.pid. `--with-libc=NAME' Manually set the name of libc. Should never be needed, but can be use if configure isn't able to correctly find the name. FURTHER CONFIGURATION The file include/config.h contains defines you might wish to change, but usually they are ok as they come. RUNTIME CONFIGURATION FILES No configuration-files are installed, these must be installed manually. The Dante server expects it's configuration file to be in /etc/sockd.conf. The client library uses the file /etc/socks.conf. The file bin/socksify.sh contains a shell script that allows one to dynamically socksify a dynamicly linked application at runtime. The program can be installed as /usr/local/bin/socksify on platforms where it works, but is not installed by default. REPORTING PROBLEMS Please report any bugs, problems or enhancements to dante-bugs@inet.no The WWW home page for Dante is http://www.inet.no/dante. Copyright (c) 1998, 1999 Inferno Nettverk A/S, Norway. dante-1.1.19.dfsg/include/0000755000175000017500000000000011037370225013721 5ustar roamroamdante-1.1.19.dfsg/include/yacconfig.h0000644000175000017500000001012107700305317016031 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ /* $Id: yacconfig.h,v 1.11 2003/07/01 13:21:19 michaels Exp $ */ #if 1 #define yyact socks_yyact #define yychar socks_yychar #define yychk socks_yychk #define yydebug socks_yydebug #define yydef socks_yydef #define yyerrflag socks_yyerrflag #define yyerror socks_yyerror #define yywarn socks_yywarn #define yyexca socks_yyexca #define yylex socks_yylex #define yylval socks_yylval #define yynerrs socks_yynerrs #define yypact socks_yypact #define yyparse socks_yyparse #define yypgo socks_yypgo #define yyps socks_yyps #define yypv socks_yypv #define yyr1 socks_yyr1 #define yyr2 socks_yyr2 #define yyreds socks_yyreds #define yys socks_yys #define yystate socks_yystate #define yytmp socks_yytmp #define yytoks socks_yytoks #define yyv socks_yyv #define yyval socks_yyval #define yyback socks_yyback #define yybgin socks_yybgin #define yycrank socks_yycrank #define yyerror socks_yyerror #define yyestate socks_yyestate #define yyextra socks_yyextra #define yyfnd socks_yyfnd #define yyin socks_yyin #define yyinput socks_yyinput #define yyleng socks_yyleng #define yylex socks_yylex #define yylineno socks_yylineno #define yylook socks_yylook #define yylsp socks_yylsp #define yylstate socks_yylstate #define yylval socks_yylval #define yymatch socks_yymatch #define yymorfg socks_yymorfg #define yyolsp socks_yyolsp #define yyout socks_yyout #define yyoutout socks_yyoutout #define yyprevious socks_yyprevious #define yysbuf socks_yysbuf #define yysptr socks_yysptr #define yysvec socks_yysvec #define yytchar socks_yytchar #define yytext socks_yytext #define yytop socks_yytop #define yyunput socks_yyunput #define yyvstop socks_yyvstop /*#define yywrap socks_yywrap */ #define yy_create_buffer socks_yy_create_buffer #define yy_delete_buffer socks_yy_delete_buffer #define yy_init_buffer socks_yy_init_buffer #define yy_load_buffer_state socks_yy_load_buffer_state #define yy_switch_to_buffer socks_yy_switch_to_buffer #define yyleng socks_yyleng #define yyrestart socks_yyrestart #endif #if 0 #define yylhs #define yylen #define yydefred #define yydgoto #define yysindex #define yygindex #define yytable #define yycheck #define yylhs #define yylhs #define yylhs #endif dante-1.1.19.dfsg/include/sockd.h0000754000175000017500000010505310345565443015214 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ /* $Id: sockd.h,v 1.215 2005/11/08 15:57:48 michaels Exp $ */ #ifndef _SOCKD_H_ #define _SOCKD_H_ #endif #ifdef lint extern const int lintnoloop_sockd_h; #else #define lintnoloop_sockd_h 0 #endif /* use caching versions directly, avoid overhead. */ #undef gethostbyname #define gethostbyname(name) cgethostbyname(name) #undef gethostbyaddr #define gethostbyaddr(addr, len, type) cgethostbyaddr(addr, len, type) #define INIT(length) \ const size_t start = state->start; \ const size_t end = start + (length); \ errno = 0 #define MEMLEFT() (sizeof(state->mem) - state->reqread) #define LEFT() ((end) - state->reqread) /* * Returns the number of bytes left to read. */ #define READ(s, length, auth) \ (readn((s), &state->mem[state->reqread], (length), auth)) /* * "s" is the descriptor to read from. * "length" is how much to read. * Returns the number of bytes read, -1 on error. */ #define OBJECTFILL(object) memcpy((object), &state->mem[start], end - start) /* * Fills "object" with data. */ #define CHECK(object, auth, nextfunction) \ do { \ int p; \ \ if (LEFT()) { \ \ SASSERT(LEFT() > 0); \ \ if (LEFT() > MEMLEFT()) \ SERRX(MEMLEFT()); \ \ errno = 0; \ if ((p = READ(s, LEFT(), auth)) <= 0) \ return p; \ state->reqread += p; \ \ if (LEFT()) { /* read something, but not all. */ \ errno = EWOULDBLOCK; \ return -1; \ } \ \ state->start = end; \ OBJECTFILL((object)); \ state->rcurrent = nextfunction; \ \ if (state->rcurrent != NULL) \ return state->rcurrent(s, request, state); \ } \ } while (lintnoloop_sockd_h) /* * Checks whether "object" has been filled with all data requested and * if so calls "function", if function is not NULL. * If "object" has not been filled it returns the number of bytes * that was added to object on this call, or error. */ #define SOCKD_NEWREQUEST 1 /* sending a new request */ #define SOCKD_FREESLOT 2 /* free'd a slot. */ /* a requestchild can currently only handle a maximum of one client. */ #define SOCKD_REQUESTMAX 1 /* IO stuff. */ #define IO_SRCBLOCK -4 #define IO_ERRORUNKNOWN -3 #define IO_TIMEOUT -2 #define IO_ERROR -1 #define IO_CLOSE 0 /* types of children. */ #define CHILD_MOTHER 1 #define CHILD_IO 2 #define CHILD_NEGOTIATE 3 #define CHILD_REQUEST 4 #define FDPASS_MAX 3 /* max number of descriptors we send/receive. */ /* * config stuff */ #define VERDICT_BLOCKs "block" #define VERDICT_PASSs "pass" /* how to rotate addresses. */ #define ROTATION_NONE 0 #define ROTATION_ROUTE 1 #define LOG_CONNECTs "connect" #define LOG_DISCONNECTs "disconnect" #define LOG_DATAs "data" #define LOG_ERRORs "error" #define LOG_IOOPERATIONs "iooperation" #define OPERATION_ACCEPT 1 #define OPERATION_CONNECT (OPERATION_ACCEPT + 1) #define OPERATION_IO (OPERATION_CONNECT + 1) #define OPERATION_ABORT (OPERATION_IO + 1) #define OPERATION_ERROR (OPERATION_ABORT + 1) #define DENY_SESSIONLIMITs "session-limit reached" struct compat_t { unsigned reuseaddr:1; /* set SO_REUSEADDR? */ unsigned sameport:1; /* always try to use same port as client? */ unsigned :0; }; struct log_t { unsigned connect:1; unsigned disconnect:1; unsigned data:1; unsigned error:1; unsigned iooperation:1; unsigned :0; }; struct timeout_t { time_t negotiate; /* how long negotiation can last. */ time_t io; /* how long connection lasts without i/o. */ }; struct linkedname_t { char *name; struct linkedname_t *next; /* next name in list. */ }; typedef struct { int clients; /* clients using this object. */ unsigned expired:1; /* the rule has expired. */ unsigned isclientrule:1; /* is used by clientrule. */ int number; /* rule number using this. */ } shmem_header_t; typedef struct { struct timeval time; /* time of last i/o operation. */ long bytes; /* amount of bytes done at time. */ long maxbps; /* maximal b/s allowed. */ } bw_t; typedef struct { int maxsessions; /* max number of sessions allowed. */ } session_t; typedef struct { shmem_header_t mstate; union { bw_t bw; session_t session; } object; } shmem_object_t; /* linked list over current rules. */ struct rule_t { struct ruleaddress_t src; /* src. */ struct ruleaddress_t dst; /* dst. */ struct log_t log; /* type of logging to do. */ int number; /* rulenumber. */ unsigned long linenumber; /* linenumber; info/debugging only. */ struct serverstate_t state; struct linkedname_t *user; /* name of users allowed. */ int verdict; /* verdict for this rule. */ #if HAVE_LIBWRAP char libwrap[LIBWRAPBUF]; /* libwrapline. */ #endif /* HAVE_LIBWRAP */ #if HAVE_PAM char pamservicename[MAXNAMELEN];/* name for pamservice. */ #endif /* HAVE_PAM */ struct ruleaddress_t rdr_from; struct ruleaddress_t rdr_to; bw_t *bw; /* pointer since will be shared. */ session_t *ss; /* pointer since will be shared. */ struct rule_t *next; /* next rule in list. */ }; struct srchost_t { unsigned nomismatch:1; /* deny mismatch between claim and fact? */ unsigned nounknown:1; /* deny no fact? */ unsigned :0; }; struct option_t { char *configfile; /* name of configfile. */ unsigned daemon:1; /* run as a daemon? */ int debug; /* debug level. */ unsigned keepalive:1; /* set SO_KEEPALIVE? */ int sleep; /* sleep at misc. places. (debugging) */ int serverc; /* number of servers. */ }; struct userid_t { uid_t privileged; unsigned privileged_isset:1; uid_t unprivileged; unsigned unprivileged_isset:1; uid_t libwrap; unsigned libwrap_isset:1; }; struct configstate_t { unsigned init:1; #if HAVE_PAM /* * allows us to optimize a few things a little based on configuration. * If it is not NULL, it means we are using a fixed pam servicename, * otherwise, the servicename varies, and we have to set it on a * rule-by-rule basis */ const char *pamservicename; /* have rules with pamdata. */ #endif uid_t euid; /* original euid. */ pid_t *motherpidv; /* pid of mothers. */ pid_t pid; /* pid of current process. */ int type; /* process type we are. */ }; struct listenaddress_t { struct sockaddr addr; /* bound address. */ int s; /* bound socket. */ #if NEED_ACCEPTLOCK int lock; /* lock on structure. */ #endif }; struct externaladdress_t { struct ruleaddress_t *addrv; /* address'. */ int addrc; int rotation; /* how to rotate, if at all. */ }; struct statistic_t { time_t boot; /* time of serverstart. */ size_t accepted; /* connections accepted. */ struct { size_t sendt; /* clients sent to children. */ size_t received; /* clients received back. */ } negotiate; struct { size_t sendt; /* clients sent to children. */ size_t received; /* clients received back. */ } request; struct { size_t sendt; /* clients sent to children. */ } io; }; struct childstate_t { #ifdef HAVE_VOLATILE_SIG_ATOMIC_T sig_atomic_t addchild; /* okay to do a addchild()? */ #else volatile sig_atomic_t addchild; /* okay to do a addchild()? */ #endif int maxidle; /* how many can be idle. */ }; /* Make sure to keep in sync with resetconfig(). */ struct config_t { struct listenaddress_t *internalv; /* internal address'. */ int internalc; struct externaladdress_t external; /* external address'. */ struct rule_t *crule; /* clientrules, list. */ struct rule_t *srule; /* socksrules, list. */ struct route_t *route; /* not in use yet. */ shmem_object_t *bwv; /* bwmem for rules. */ size_t bwc; /* * should have one for each rule instead, but sadly some systems seem to * have trouble with sysv-style shared memory/semaphores so we use * the older/better supported filelock, and a global to at that. */ int bwlock; /* lock for modifying bw. */ shmem_object_t *sessionv; /* sessionmem for rules. */ size_t sessionc; int sessionlock; /* lock for sessionv. */ struct compat_t compat; /* compatibility options. */ struct extension_t extension; /* extensions set. */ struct logtype_t log; /* where to log. */ struct option_t option; /* commandline options. */ int resolveprotocol; /* resolve protocol. */ struct srchost_t srchost; /* relevant to srchost. */ struct statistic_t stat; /* some statistics. */ struct configstate_t state; struct timeout_t timeout; /* timeout values. */ struct userid_t uid; /* userids. */ struct childstate_t child; /* childstate. */ int clientmethodv[MAXMETHOD]; /* clientmethods. */ size_t clientmethodc; /* methods in list. */ int methodv[MAXMETHOD]; /* methods by priority. */ size_t methodc; /* methods in list. */ }; struct connectionstate_t { struct authmethod_t auth; /* XXX should probably not be here. */ int command; struct extension_t extension; /* extensions set. */ int protocol; struct { time_t accept; /* time of connection accept. */ time_t negotiate_start; /* time negotiation started. */ } time; int version; }; struct sockd_io_direction_t { int s; /* socket connection. */ struct sockaddr laddr; /* local address of s. */ struct sockaddr raddr; /* address of remote peer for s. */ /* * Varies according to context. * src: as laddr but on sockshost_t form. * dst: name as given by client. * control: as laddr */ struct sockshost_t host; struct authmethod_t auth; /* authentication used. */ size_t sndlowat; /* low-water mark for send. */ /* byte count */ size_t read; /* bytes read. */ size_t written; /* bytes written. */ int flags; /* misc. flags */ struct { unsigned fin:1; /* received FIN on this socket. */ unsigned shutdown_wr:1; /* shutdown for writing. */ } state; }; struct sockd_io_t { unsigned allocated:1;/* object allocated? */ struct connectionstate_t state; struct sockd_io_direction_t control; /* clients controlconnection. */ struct sockd_io_direction_t src; /* client we receive data from. */ struct sockd_io_direction_t dst; /* remote peer. */ struct rule_t crule; /* client rule matched. */ struct rule_t rule; /* matched rule for i/o. */ struct route_t route; /* route to next proxy, if used. */ struct timeval time; /* time of last i/o operation. */ struct sockd_io_t *next; /* for some special cases. */ }; struct negotiate_state_t { unsigned complete:1; /* completed? */ unsigned char mem[ 1 /* VER */ + 1 /* NMETHODS */ + AUTHMETHOD_MAX /* METHODS */ + sizeof(struct request_t) ]; int reqread; /* read so far. */ size_t start; /* start of current req */ char emsg[256]; /* errormessage, if any.*/ int (*rcurrent)(int s, struct request_t *request, struct negotiate_state_t *state); struct sockshost_t src; /* client's address. */ struct sockshost_t dst; /* our address. */ }; struct sockd_negotiate_t { unsigned allocated:1; unsigned ignore:1; /* ignore for now? */ struct request_t req; struct negotiate_state_t negstate; struct rule_t rule; /* rule matched for accept(). */ int s; /* client connection. */ struct connectionstate_t state; /* state of connection. */ }; struct sockd_request_t { struct sockaddr from; /* client's control address. */ struct sockaddr to; /* address client was accepted on. */ struct request_t req; /* request to perform. */ struct rule_t rule; /* rule matched for accept(). */ int s; /* clients control connection. */ struct connectionstate_t state; /* state of connection. */ }; struct sockd_mother_t { int s; /* connection to child for ancillary. */ #if HAVE_SENDMSG_DEADLOCK int lock; /* lock on request connection. */ #endif /* HAVE_SENDMSG_DEADLOCK */ int ack; /* connection for ack's. */ }; struct sockd_child_t { int type; /* child type. */ pid_t pid; /* childs pid. */ int freec; /* free slots on last count. */ int s; /* connection to mother for ancillary. */ #if HAVE_SENDMSG_DEADLOCK int lock; /* lock on request connection. */ #endif /* HAVE_SENDMSG_DEADLOCK */ int ack; /* connection for ack's. */ }; /* functions */ __BEGIN_DECLS int sockd_bind __P((int s, struct sockaddr *addr, size_t retries)); /* * Binds the address "addr" to the socket "s". The bind call will * be tried "retries" + 1 times if the error is EADDRINUSE, or until * successful, whatever comes first. * If the portnumber is privileged, it will set and reset the euid * as appropriate. * * If successful, "addr" is filled in with the bound address. * Returns: * On success: 0. * On failure: -1 */ int socks_permit __P((int client, struct socks_t *dst, int permit)); /* * "client" is the connection to the client from which the request in * "dst" was made. "permit" is the result of a rulecheck. * The function sends a correct reply to the connection on "client" if * "permit" indicates the connection is not to be allowed. * Returns: * If connection allowed: true. * If connection disallowed: false. */ int sockdio __P((struct sockd_io_t *io)); /* * Tries to send the io object "io" to a child. * If no child is able to accept the io a new one is created and * the attempt is retried. * * Returns * On success: 0 * On failure: -1, io was not accepted by any child. */ int pidismother __P((pid_t pid)); /* * If "pid" refers to a mother, the number of "pid" in * state.motherpidv is returned. Numbers are counted from 1. * IF "pid" is no mother, 0 is returned. */ int descriptorisreserved __P((int d)); /* * If "d" is a descriptor reserved for use globally, the function * returns true. * Otherwise, false. */ int childcheck __P((int type)); /* * Calculates the number of free slots every child of type "type" has, * combined. * If "type" is negated, the function instead returns * the total number of slots (free or not) in every child of that type. * Also adjusts the number of children of type "type" if needed, according * to configure variables. * * If childcheck() is successful it also means there is at the minimum * one free descriptor available. */ int childtype __P((pid_t pid)); /* * Returns the type of child the child with pid "pid" is. */ int removechild __P((pid_t childpid)); /* * Removes the child "child" with pid "childpid" and updates internal lists. * Returns: * On success: 0 * On failure: -1 (no current proxychild has pid "childpid".) */ struct rule_t * addclientrule __P((const struct rule_t *rule)); /* * Appends a copy of "rule" to our list of client rules. * Returns a pointer to the added rule (not "rule"). */ struct rule_t * addsocksrule __P((const struct rule_t *rule)); /* * Appends a copy of "rule" to our list of socks rules. * Returns a pointer to the added rule (not "rule"). */ void addinternal __P((const struct ruleaddress_t *addr)); /* * Adds "addr" to the list of external addresses. */ void addexternal __P((const struct ruleaddress_t *addr)); /* * Adds "addr" to the list of internal addresses (to listen on). */ int addressisbindable __P((const struct ruleaddress_t *addr)); /* * Checks whether "addr" is bindable. * Returns: * On success: true. * On failure: false. */ struct linkedname_t * adduser __P((struct linkedname_t **ruleuser, const char *name)); /* * Adds a user with the name "name" to the list hanging of "ruleuser". * Returns: * On success: a pointer ruleuser. * On failure: NULL. */ void showrule __P((const struct rule_t *rule)); /* * prints the rule "rule". */ void showclient __P((const struct rule_t *rule)); /* * prints the clientrule "rule". */ void showconfig __P((const struct config_t *config)); /* * prints out config "config". */ const char * authinfo __P((const struct authmethod_t *auth, char *info, size_t infolen)); /* * Fills in "info" with a printable representation of the "auth". * Returns a pointer to "info". */ int rulespermit __P((int s, const struct sockaddr *peer, const struct sockaddr *local, struct rule_t *rule, struct connectionstate_t *state, const struct sockshost_t *src, const struct sockshost_t *dst, char *msg, size_t msgsize)); /* * Checks whether the rules permit data from "src" to "dst". * "s" is the socket the connection is on, from the address "peer", accepted * on the address "local". * "state" is the current state of the connection and may be updated. * "msg" is filled in with any message/information provided when checking * access, "msgsize" is the size of "msg". * * Wildcard fields are supported for the following fields; * ipv4: INADDR_ANY * port: none [enum] * * "rule" is filled in with the contents of the matching rule. * Returns: * True if a connection should be allowed. * False otherwise. */ int sockd_connect __P((int s, const struct sockshost_t *dst)); /* * Tries to connect socket "s" to the host given in "dst". * Returns: * On success: 0 * On failure: -1 */ void resetconfig __P((void)); /* * resets the current config back to default, freeing memory aswell. */ int send_response __P((int s, const struct response_t *response)); /* * Sends "response" to "s". * On success: 0 * On failure: -1 */ int send_req __P((int s, const struct sockd_request_t *req)); /* * Sends "req" to "s". * Returns: * On success: 0 * On failure: -1 */ int send_client __P((int s, int client)); /* * Sends the client "client" to "s". * Returns: * On success: 0 * On failure: -1 */ /* * Returns a value indicating whether relaying from "src" to "dst" should * be permitted. */ int selectmethod __P((const int *methodv, size_t methodc, const unsigned char *offeredv, size_t offeredc)); /* * Selects the best method based on available methods and given * priority. * "methodv" is a list over available methods, methodc in length. * "offerdv" is a list over offered methods, offeredc in length. * The function returns the value of the method that should be selected, * AUTMETHOD_NOACCEPT if none is acceptable. */ int method_uname __P((int s, struct request_t *request, struct negotiate_state_t *state)); /* * Enters username/password subnegotiation. If successful, * "request->auth.mdata.uname" is filled in with values read from client. * If unsuccessful, the contents of "uname" is indeterminate. * After negotiation has finished and the response to client has been sent * the function returns. * Returns: * On success: 0 (user/password accepted) * On failure: -1 (user/password not accepted, communication failure, * or something else.) */ void iolog __P((struct rule_t *rule, const struct connectionstate_t *state, int operation, const struct sockshost_t *src, const struct authmethod_t *srcauth, const struct sockshost_t *dst, const struct authmethod_t *dstauth, const char *data, size_t count)); /* * Called after each each complete io operation * (read then write, or read then block). * Does misc. logging based on the logoptions set in "log". * "rule" is the rule that matched the iooperation, not "const" due to * possible libwrap interaction. * "state" is the state of the connection. * "operation" is the operation that was performed. * "src" is where data was read from. * "dst" is where data was written to. * "data" and "count" are interpreted depending on "operation". * * If "operation" is * OPERATION_ACCEPT * OPERATION_CONNECT * "count" is ignored. * If "data" is not NULL or NUL, it is a string giving additional * information about the operation. * * OPERATION_ABORT * OPERATION_ERROR * "count" is ignored. * If "data" is not NULL or NUL, it is a string giving the reason for * abort or error. * If "data" is NULL or NUL, the reason is the errormessage affiliated * with the current errno. * * OPERATION_IO * "data" is the data that was read and written. * "count" is the number of bytes that was read/written. */ void close_iodescriptors __P((const struct sockd_io_t *io)); /* * A subset of delete_io(). Will just close all descriptors in * "io". */ int sockdnegotiate __P((int s)); /* * Sends the connection "s" to a negotiator child. * Returns: * On success: 0 * On failure: -1 */ void run_io __P((struct sockd_mother_t *mother)); /* * Sets a io child running. "mother" is the childs mother. * * A child starts running with zero clients and waits * indefinitely for mother to send atleast one. */ void run_negotiate __P((struct sockd_mother_t *mother)); /* * Sets a negotiator child running. "mother" is the childs mother. * A child starts running with zero clients and waits * indefinitely for mother to send atleast one. */ void run_request __P((struct sockd_mother_t *mother)); /* * Sets a request child running. "mother" is the childs mother. * "mread" is read connection to mother, "mwrite" is write connection. * A child starts running with zero clients and waits * indefinitely for mother to send atleast one. */ int send_io __P((int s, const struct sockd_io_t *io)); /* * Tries to add send the io "io" to "s". * Returns * On success: 0 * On failure: -1 */ int recv_io __P((int mother, struct sockd_io_t *io)); /* * Attempts to read a new io object from "mother". * If a io is received it is either copied into "io", or it's copied * to a internal list depending on if "io" is NULL or not; thus mother * vs child semantics. If semantics are those of a child, the request * field of "io" is sent to the controlconnection in "io". * Returns: * On success: 0 * On failure: -1 */ int recv_req __P((int s, struct sockd_request_t *req)); /* * Receives a request from "s" and writes it to "req". * Returns: * On success: 0 * On failure: -1 */ int recv_request __P((int s, struct request_t *request, struct negotiate_state_t *state)); /* * Reads a socks request from the socket "s", which can be set to * non-blocking. * "request" will be filled in as reading progresses but it should * be considered of indeterminate contents untill the whole request * has been read. * Returns: * On success: > 0 * On failure: <= 0. If errno does not indicate the request should be * be retried, the connection "s" should be dropped. */ int recv_sockspacket __P((int s, struct request_t *request, struct negotiate_state_t *state)); /* * When methodnegotiation has finished (if appropriate) this function * is called to receive the actual packet. * Returns: * On success: > 0 * On failure: <= 0. If errno does not indicate the request should be * be retried, the connection "s" should be dropped. */ struct sockd_child_t * addchild __P((int type)); /* * Adds a new child that can accept objects of type "type" from mother. * Returns: * On success: a pointer to the added child. * On failure: NULL. (resource shortage.) */ struct sockd_child_t * getchild __P((pid_t pid)); /* * Attempts to find a child with pid "pid". * Returns: * On success: a pointer to the found child. * On failure: NULL. */ void sigchildbroadcast __P((int sig, int childtype)); /* * Sends signal "sig" to all children of type "childtype". */ int fillset __P((fd_set *set)); /* * Sets every child's descriptor in "set", aswell as sockets we listen on. * Returns the number of the highest descriptor set, or -1 if none was set. */ void clearset __P((int type, const struct sockd_child_t *child, fd_set *set)); /* * Clears every descriptor of type "type" in "child" from "set". * The values valid for "type" is SOCKD_NEWREQUEST or SOCKD_FREESLOT. */ struct sockd_child_t * getset __P((int type, fd_set *set)); /* * If there is a child with a descriptor set in "set", a pointer to * the child is returned. "type" gives the type of descriptor that must * be set, either SOCKD_NEWREQUEST or SOCKD_FREESLOT. * The children returned are returned in prioritised order. * If no child is found, NULL is returned. */ struct sockd_child_t * nextchild __P((int type)); /* * Returns: * On success: pointer to a child of correct type with atleast one free slot. * On failure: NULL. */ void setsockoptions(int s); /* * Sets options _all_ serversockets should have set. */ void sockdexit __P((int sig)); /* * Called both by signal and manually. * If "sig" is less than 0, assume it's manually and exit with absolute * value of "sig". * Otherwise report exit due to signal "sig". */ struct hostent * cgethostbyname __P((const char *name)); /* * Identical to gethostbyname() but caches info. */ struct hostent * cgethostbyaddr __P((const char *addr, int len, int type)); /* * Identical to gethostbyaddr() but caches info. */ void socks_seteuid __P((uid_t *old, uid_t new)); /* * Sets euid to "new". If "old" is not NULL, current euid is saved in it. * Exits on failure. */ void socks_reseteuid __P((uid_t current, uid_t new)); /* * "Resets" euid back from "current" to "new". * If the operation fails, it's flagged as an internal error. */ int usermatch __P((const struct authmethod_t *auth, const struct linkedname_t *userlist)); /* * Checks whether the username in "auth" matches a name in the * list "userlist". * Returns: * If match: true. * Else: false. */ int accesscheck __P((int s, struct authmethod_t *auth, const struct sockaddr *src, const struct sockaddr *dst, char *emsg, size_t emsgsize)); /* * Checks whether access matches according to supplied arguments. * "auth" is the authentication to be matched against, * "s" is the socket the client is connected to, * "src" is address client connected from, "dst" is address client * connected to. * "emsg" is a buffer that information can be written into, "emsgsize" * is the size of that buffer. * * Returns: * If access is ok: true. * Otherwise: false. Writes the reason into "emsg". */ int passwordcheck __P((const char *name, const char *cleartextpassword, char *emsg, size_t emsglen)); /* * Checks whether "name" is in the passwordfile. * If "cleartextpassword" is not NULL, also checks if "name"'s * password is "cleartextpassword". * * Returns: * If "name" and "cleartextpassword" is matched: 0 * Otherwise: -1. "emsg" is filled in with the errormessage. */ int pam_passwordcheck __P((int s, const struct sockaddr *src, const struct sockaddr *dst, const struct authmethod_pam_t *auth, char *emsg, size_t emsglen)); /* * Checks whether pam grants access to the client connected to the socket "s". * "src" is the clients sourceaddress, "dst" is address we accepted the * clients connection on. * * Returns: * If "name" and "cleartextpassword" is matched: 0 * Otherwise: -1. "emsg" is filled in with the errormessage. */ void redirectsetup __P((void)); /* * sets up things for using the redirect module. * Must be called at start and after sighup by main mother. */ int redirect __P((int s, struct sockaddr *addr, struct sockshost_t *host, int command, const struct ruleaddress_t *from, const struct ruleaddress_t *to)); /* * "s" is the socket to use for performing "command". * The meaning of "addr" and "host" varies depending on what "command" is: * SOCKS_BIND: * "addr" is local address of "s", to accept connection on. * "host" is ignored. * * SOCKS_BINDREPLY: * "addr" is the address to say connection is from. * "host" is the address to send reply to. * * SOCKS_CONNECT: * "addr" is local address of "s". * "host" is host to connect to. * * case SOCKS_UDPASSOCIATE: * "addr" is local address of "s", to send udp packet from. * "host" is address to send packet to. * * case SOCKS_UDPREPLY: * "addr" is the address to say reply is from. * "host" is the address to send reply to. * * "host", "addr", and the address of "s" will be changed if needed. * Returns: * On success: 0. * On failure: -1. */ void shmem_setup __P((void)); /* * sets up shmem structures, must be called at start and after sighup by * main mother, but only main mother. */ shmem_object_t * shmem_alloc __P((int isclientrule, int number, shmem_object_t *poolv, size_t poolc, int lock)); /* * Returns a pointer to an object allocated to rule number "number", * from the pool "poolv". If a object has already been allocated, * return the previosuly allocated object. * "lock" is used for locking, if it is -1, no locking is enforced. */ void shmem_unuse __P((shmem_object_t *object, int lock)); /* * Says we are no longer using "object". * "lock" is used for locking, if it is -1, no locking is enforced. */ void shmem_use __P((shmem_object_t *object, int lock)); /* * Marks "object" as in use. * "lock" is used for locking, if it is -1, no locking is enforced. */ void * shmem_resize __P((size_t size, void *oldmem, size_t oldsize, int fd)); /* * Allocates shared memory of size "size", using "fd" for storage. * If "oldmem" is not NULL, it is a pointer to previously allocated * memory of size "oldsize". The new memory will start at the same * address as "oldmem" if so. * * Returns a pointer to the memory allocated. */ void shmem_lockall __P((void)); /* * Locks all locks related to shared mem use. Should be used * before calling functions that would get into trouble if * e.g. a SIGHUP changed rule memory. E.g. calling rulespermit(), * then before using a shmem object (e.g. bw_use(()), a SIGHUP * is received, which changes the shmem object. */ void shmem_unlockall __P((void)); /* * Unlocks all locks related to shared mem use. */ int bw_use __P((bw_t *bw)); /* * Marks "bw" as in use. */ void bw_unuse __P((bw_t *bw)); /* * Says we are no longer using "bw". * If "bw" is NULL, nothing is done. */ bw_t * bw_alloc __P((int isclientrule, int number)); /* * Allocates a bw object to rule number "number". * "ruleclient" says whether it's a client-rule or not. * Returns a pointer to the allocated bw object. */ ssize_t bw_left __P((const bw_t *bw)); /* * Returns how many bytes we should read if the client is restricted * by "bw". */ void bw_update __P((bw_t *bw, size_t bwused, const struct timeval *bwusedtime)); /* * Updates "bw". "bwused" is the bandwidth used (in bytes) at time * "bwusedtime". */ struct timeval * bw_isoverflow __P((bw_t *bw, const struct timeval *timenow, struct timeval *overflow)); /* * Checks whether "bw" would overflow if we transfered more data through it. * "timenow" is the time now, * Returns: * If "bw" would overflow: til what time we have to wait until we can * again transfer data through it. The memory used for those values is * "overflow". * * If "bw" would not overflow: NULL. "overflow" is not touched. */ int session_use __P((session_t *ss)); /* * If limits allow "ss" to be marked as in use, return true, else false. */ void session_unuse __P((session_t *ss)); /* * Says we are no longer using "ss". */ session_t * session_alloc __P((int isclientrule, int number)); /* * Allocates a session object to rule number "number". * "ruleclient" says whether it's a client-rule or not. * Returns a pointer to the allocated session object. */ ssize_t session_left __P((session_t *ss)); /* * Returns how many sessions are left if the client is restricted * by "ss". * * Returns the number of sessions left for use. If "use" is set, * this is the number left after "ss" has been set to use, which * will be negative if the session-limit was reached, and "ss" * was thus not set to use. */ #ifdef DEBUG void printfd __P((const struct sockd_io_t *io, const char *prefix)); /* * prints the contents of "io". "prefix" is the string prepended * to the printing. (typically "received" or "sent".) */ #endif struct in_addr getifa __P((struct in_addr addr)); /* * Returns the address the system would chose to use for connecting * to the IP address "addr". * Returns INADDR_NONE on error. */ __END_DECLS dante-1.1.19.dfsg/include/socks.h0000754000175000017500000004246410324735542015235 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ /* $Id: socks.h,v 1.171 2005/10/11 10:53:19 michaels Exp $ */ #ifndef _SOCKS_H_ #define _SOCKS_H_ #endif /* ! _SOCKS_H_ */ #ifdef lint extern const int lintnoloop_socks_h; #else #define lintnoloop_socks_h 0 #endif #ifndef HAVE_OSF_OLDSTYLE #define HAVE_OSF_OLDSTYLE 0 #endif /* !HAVE_OSF_OLDSTYLE */ #if SOCKSLIBRARY_DYNAMIC #ifdef accept #undef accept #endif /* accept */ #if HAVE_EXTRA_OSF_SYMBOLS #define accept(s, addr, addrlen) sys_Eaccept(s, addr, addrlen) #else #define accept(s, addr, addrlen) sys_accept(s, addr, addrlen) #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #ifdef bind #undef bind #endif /* bind */ #define bind(s, name, namelen) sys_bind(s, name, namelen) #ifdef bindresvport #undef bindresvport #endif /* bindresvport */ #define bindresvport(sd, sin) sys_bindresvport(sd, sin) #ifdef connect #undef connect #endif /* connect */ #define connect(s, name, namelen) sys_connect(s, name, namelen) #ifdef gethostbyname #undef gethostbyname #endif /* gethostbyname */ #if HAVE_GETHOSTBYNAME2 /* * a little tricky ... we need it to be at the bottom of the stack, * like a syscall. */ #define gethostbyname(name) sys_gethostbyname2(name, AF_INET) #else #define gethostbyname(name) sys_gethostbyname(name) #endif #ifdef gethostbyname2 #undef gethostbyname2 #endif /* gethostbyname2 */ #define gethostbyname2(name, af) sys_gethostbyname2(name, af) #ifdef getaddrinfo #undef getaddrinfo #endif /* getaddrinfo */ #define getaddrinfo(nodename, servname, hints, res) \ sys_getaddrinfo(nodename, servname, hints, res) #ifdef getipnodebyname #undef getipnodebyname #endif /* getipnodebyname */ #define getipnodebyname(name, af, flags, error_num) \ sys_getipnodebyname(name, af, flags, error_num) #ifdef freehostent #undef freehostent #endif /* freehostent */ #define freehostent(ptr) sys_freehostent(ptr) #ifdef getpeername #undef getpeername #endif /* getpeername */ #if HAVE_EXTRA_OSF_SYMBOLS #define getpeername(s, name, namelen) sys_Egetpeername(s, name, namelen) #else #define getpeername(s, name, namelen) sys_getpeername(s, name, namelen) #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #ifdef getsockname #undef getsockname #endif /* getsockname */ #if HAVE_EXTRA_OSF_SYMBOLS #define getsockname(s, name, namelen) sys_Egetsockname(s, name, namelen) #else #define getsockname(s, name, namelen) sys_getsockname(s, name, namelen) #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #ifdef read #undef read #endif /* read */ #define read(d, buf, nbytes) sys_read(d, buf, nbytes) #ifdef readv #undef readv #endif /* readv */ #if HAVE_EXTRA_OSF_SYMBOLS #define readv(d, iov, iovcnt) sys_Ereadv(d, iov, iovcnt) #else #define readv(d, iov, iovcnt) sys_readv(d, iov, iovcnt) #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #ifdef recv #undef recv #endif /* recv */ #define recv(s, msg, len, flags) sys_recv(s, msg, len, flags) #ifdef recvfrom #undef recvfrom #endif /* recvfrom */ #if HAVE_EXTRA_OSF_SYMBOLS #define recvfrom(s, buf, len, flags, from, fromlen) \ sys_Erecvfrom(s, buf, len, flags, from, fromlen) #else #define recvfrom(s, buf, len, flags, from, fromlen) \ sys_recvfrom(s, buf, len, flags, from, fromlen) #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #ifdef rresvport #undef rresvport #endif /* rresvport */ #define rresvport(port) sys_rresvport(port) #ifdef sendto #undef sendto #endif /* sendto */ #define sendto(s, msg, len, flags, to, tolen) \ sys_sendto(s, msg, len, flags, to, tolen) #ifdef write #undef write #endif /* write */ #define write(d, buf, nbytes) sys_write(d, buf, nbytes) #ifdef writev #undef writev #endif /* writev */ #if HAVE_EXTRA_OSF_SYMBOLS #define writev(d, iov, iovcnt) sys_Ewritev(d, iov, iovcnt) #else #define writev(d, iov, iovcnt) sys_writev(d, iov, iovcnt) #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #ifdef send #undef send #endif /* send */ #define send(s, msg, len, flags) sys_send(s, msg, len, flags) #endif /* SOCKSLIBRARY_DYNAMIC */ struct configstate_t { unsigned init:1; unsigned :0; struct sockaddr lastconnect; /* address we last connected to. */ pid_t pid; unsigned :0; }; struct option_t { int debug; char *configfile; /* name of current configfile. */ unsigned :0; }; struct config_t { pid_t connectchild; /* connect process. */ int connect_s; /* socket to child. */ char domain[MAXHOSTNAMELEN]; /* localdomain. */ struct logtype_t log; /* where to log. */ struct option_t option; /* misc. options. */ struct configstate_t state; int resolveprotocol; /* resolveprotocol. */ struct route_t *route; /* linked list of routes*/ }; struct childpacket_t { int s; /* filedescriptor number. */ struct sockshost_t src; /* local address of control-connection. */ struct sockshost_t dst; /* remote address of control-connection. */ struct socks_t packet; /* socks packet exchanged with server. */ }; __BEGIN_DECLS /* * libsocks function declarations */ void clientinit __P((void)); /* * initialises clientstate, reads configfile, etc. */ #if !HAVE_OSF_OLDSTYLE int Raccept __P((int, struct sockaddr *, socklen_t *)); int Rconnect __P((int, const struct sockaddr *, socklen_t)); int Rgetsockname __P((int, struct sockaddr *, socklen_t *)); int Rgetpeername __P((int, struct sockaddr *, socklen_t *)); ssize_t Rsendto __P((int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)); ssize_t Rrecvfrom __P((int s, void *buf, size_t len, int flags, struct sockaddr * from, socklen_t *fromlen)); ssize_t Rsendmsg __P((int s, const struct msghdr *msg, int flags)); ssize_t Rrecvmsg __P((int s, struct msghdr *msg, int flags)); int Rbind __P((int, const struct sockaddr *, socklen_t)); #endif /* !HAVE_OSF_OLDSTYLE */ int Rbindresvport __P((int, struct sockaddr_in *)); int Rrresvport __P((int *)); struct hostent *Rgethostbyname __P((const char *)); struct hostent *Rgethostbyname2 __P((const char *, int af)); #if HAVE_GETADDRINFO int Rgetaddrinfo __P((const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res)); #endif /* HAVE_GETADDRINFO */ #if HAVE_GETIPNODEBYNAME struct hostent *Rgetipnodebyname __P((const char *, int, int, int *)); void Rfreehostent __P((struct hostent *)); #endif /* HAVE_GETIPNODEBYNAME */ ssize_t Rwrite __P((int d, const void *buf, size_t nbytes)); ssize_t Rwritev __P((int d, const struct iovec *iov, int iovcnt)); ssize_t Rsend __P((int s, const void *msg, size_t len, int flags)); ssize_t Rread __P((int d, void *buf, size_t nbytes)); ssize_t Rreadv __P((int d, const struct iovec *iov, int iovcnt)); ssize_t Rrecv __P((int s, void *msg, size_t len, int flags)); int SOCKSinit __P((char *)); int Rlisten __P((int, int)); int Rselect __P((int, fd_set *, fd_set *, fd_set *, struct timeval *)); /* * unused functions needed to compile programs with support for other * socks implementations. */ int udpsetup __P((int s, const struct sockaddr *to, int type)); /* * sets up udp relaying between address of "s" and "to" by connecting * to socksserver. * If relaying is already set up the function returns with success. * Type is the type of connection setup, SOCKS_SEND or SOCKS_RECV. * At the moment only SOCKS_SEND is supported. * Returns: * On success: 0 * On failure: -1 */ int socks_sendrequest __P((int s, const struct request_t *request)); /* * Sends the request "request" to the socksserver connected to "s". * Returns: * On success: 0 * On failure: -1 */ int socks_recvresponse __P((int s, struct response_t *response, int version)); /* * Receives a socks response from the "s". "response" is filled in with * the data received. * "version" is the protocolversion negotiated. * Returns: * On success: 0 * On failure: -1 */ /* * Misc. functions to help keep track of our connection(s) to the server. */ struct socksfd_t * socks_addaddr __P((unsigned int clientfd, struct socksfd_t *socksaddress)); /* * "clientfd" is associated with the structure "socksfd". * The function duplicates all arguments in it's own form and does * not access the memory referenced by them afterwards. * * The function checks the state of all filedescriptors on each call and * removes those that are no longer open. * * Returns: * On success: pointer to the added socksfd_t structure. * On failure: exits. (memory exhausted and process grew descriptor size.) * */ struct socksfd_t * socks_getaddr __P((unsigned int fd)); /* * Returns: * On success: the socketaddress associated with filedescriptor "fd". * On failure: NULL. (no socketaddress associated with "fd"). */ void socks_rmaddr __P((unsigned int s)); /* * removes the association for the socket "s", also closes the server * connection. If "s" is not registered the request is ignored. */ struct socksfd_t * socksfddup __P((const struct socksfd_t *old, struct socksfd_t *new)); /* * Duplicates "old", in "new". * Returns: * On success: "new". * On failure: NULL (resource shortage). */ int socks_addrcontrol __P((const struct sockaddr *local, const struct sockaddr *remote)); /* * Goes through all addresses registered and tries to find one where * the control socket has a local address of "local" and peer address * of "remote". If either of "local" or "remote" is NULL, that * endpoint is not checked against. * Returns: * On success: the descriptor the socksfd struct was registered with. * On failure: -1 */ int socks_addrmatch __P((const struct sockaddr *local, const struct sockaddr *remote, const struct socksstate_t *state)); /* * Goes through all addresses registered and tries to find one where * all arguments match. * Arguments that are NULL or have "illegal" values are ignored. * Returns: * On success: the descriptor the socksfd with matching arguments was * registered with (>= 0). * On failure: -1. */ int socks_isaddr __P((unsigned int fd)); /* * Returns true if there is a address registered for the socket "fd", false * otherwise. */ int socks_addrisok __P((unsigned int s)); /* * Compares the current address of "s" to the registered address. * If there is a mismatch, the function will try to correct it if possible. * Returns: * If current address found to match registered: true. * Else: false. */ int socks_addfd __P((unsigned int fd)); /* * adds the filedescriptor "fd" to an internal table. * If it is already in the table the request is ignored. * Returns: * On success: 0 * On failure: -1 */ int socks_isfd __P((unsigned int fd)); /* * returns 1 if "fd" is a filedescriptor in our internal table, 0 if not. */ void socks_rmfd __P((unsigned int fd)); /* * removes the filedescriptor "fd" from our internal table. */ int fdisopen __P((int fd)); /* * returns 1 if the filedescriptor "fd" currently references a open object. * returns 0 otherwise. */ char * socks_getusername __P((const struct sockshost_t *host, char *buf, size_t buflen)); /* * Tries to determine the username of the current user, to be used * when negotiating with the server "host". * The NUL-terminated username is written to "buf", which is of size * "buflen". * Returns: * On success: pointer to "buf" with the username. * On failure: NULL. */ char * socks_getpassword __P((const struct sockshost_t *host, const char *user, char *buf, size_t buflen)); /* * Tries to determine the password of user "user", to be used * when negotiating with the server "host". * The NUL-terminated password is written to "buf", which is of length * "buflen" * Returns: * On success: pointer to "buf" with the password. * On failure: NULL. */ #if DIAGNOSTIC void cc_socksfdv(int sig); /* * consistencycheck on socksfdv. */ #endif #if SOCKSLIBRARY_DYNAMIC int sys_rresvport __P((int *)); int sys_bindresvport __P((int, struct sockaddr_in *)); void sys_freehostent __P((struct hostent *)); HAVE_PROT_READ_0 sys_read __P((HAVE_PROT_READ_1, HAVE_PROT_READ_2, HAVE_PROT_READ_3)); HAVE_PROT_READV_0 sys_readv __P((HAVE_PROT_READV_1, HAVE_PROT_READV_2, HAVE_PROT_READV_3)); HAVE_PROT_RECV_0 sys_recv __P((HAVE_PROT_RECV_1, HAVE_PROT_RECV_2, HAVE_PROT_RECV_3, HAVE_PROT_RECV_4)); HAVE_PROT_RECVMSG_0 sys_recvmsg __P((HAVE_PROT_RECVMSG_1, HAVE_PROT_RECVMSG_2, HAVE_PROT_RECVMSG_3)); HAVE_PROT_SEND_0 sys_send __P((HAVE_PROT_SEND_1 , HAVE_PROT_SEND_2, HAVE_PROT_SEND_3, HAVE_PROT_SEND_4)); HAVE_PROT_WRITE_0 sys_write __P((HAVE_PROT_WRITE_1, HAVE_PROT_WRITE_2, HAVE_PROT_WRITE_3)); #if HAVE_OSF_OLDSTYLE int sys_accept __P((int, struct sockaddr *, int *)); #else HAVE_PROT_ACCEPT_0 sys_accept __P((HAVE_PROT_ACCEPT_1, HAVE_PROT_ACCEPT_2, HAVE_PROT_ACCEPT_3)); #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #if HAVE_OSF_OLDSTYLE int sys_bind __P((int, const struct sockaddr *, int)); #else HAVE_PROT_BIND_0 sys_bind __P((HAVE_PROT_BIND_1, HAVE_PROT_BIND_2, HAVE_PROT_BIND_3)); #endif /* !HAVE_OSF_OLDSTYLE */ #if HAVE_OSF_OLDSTYLE int sys_connect __P((int, const struct sockaddr *, int)); #else HAVE_PROT_CONNECT_0 sys_connect __P((HAVE_PROT_CONNECT_1, HAVE_PROT_CONNECT_2, HAVE_PROT_CONNECT_3)); #endif /* HAVE_OSF_OLDSTYLE */ #if HAVE_OSF_OLDSTYLE int sys_getpeername __P((int, struct sockaddr *, int *)); #else HAVE_PROT_GETPEERNAME_0 sys_getpeername __P((HAVE_PROT_GETPEERNAME_1, HAVE_PROT_GETPEERNAME_2, HAVE_PROT_GETPEERNAME_3)); #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #if HAVE_OSF_OLDSTYLE int sys_getsockname __P((int, struct sockaddr *, int *)); #else HAVE_PROT_GETSOCKNAME_0 sys_getsockname __P((HAVE_PROT_GETSOCKNAME_1, HAVE_PROT_GETSOCKNAME_2, HAVE_PROT_GETSOCKNAME_3)); #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #if HAVE_OSF_OLDSTYLE int sys_recvfrom __P((int, void*, int, int, struct sockaddr *, int *)); #else HAVE_PROT_RECVFROM_0 sys_recvfrom __P((HAVE_PROT_RECVFROM_1, HAVE_PROT_RECVFROM_2, HAVE_PROT_RECVFROM_3, HAVE_PROT_RECVFROM_4, HAVE_PROT_RECVFROM_5, HAVE_PROT_RECVFROM_6)); #endif #if HAVE_OSF_OLDSTYLE ssize_t sys_writev __P((int, const struct iovec *, int)); #else HAVE_PROT_WRITEV_0 sys_writev __P((HAVE_PROT_WRITEV_1, HAVE_PROT_WRITEV_2, HAVE_PROT_WRITEV_3)); #endif #if HAVE_OSF_OLDSTYLE ssize_t sys_sendmsg __P((int, struct msghdr *, int)); #else HAVE_PROT_SENDMSG_0 sys_sendmsg __P((HAVE_PROT_SENDMSG_1, HAVE_PROT_SENDMSG_2, HAVE_PROT_SENDMSG_3)); #endif #if HAVE_OSF_OLDSTYLE int sys_sendto __P((int, const void *, int, int, const struct sockaddr *, socklen_t)); #else HAVE_PROT_SENDTO_0 sys_sendto __P((HAVE_PROT_SENDTO_1, HAVE_PROT_SENDTO_2, HAVE_PROT_SENDTO_3, HAVE_PROT_SENDTO_4, HAVE_PROT_SENDTO_5, HAVE_PROT_SENDTO_6)); #endif /* !HAVE_OSF_OLDSTYLE */ #if HAVE_EXTRA_OSF_SYMBOLS int sys_Eaccept __P((int, struct sockaddr *, socklen_t *)); int sys_Egetpeername __P((int, struct sockaddr *, socklen_t *)); int sys_Egetsockname __P((int, struct sockaddr *, socklen_t *)); ssize_t sys_Ereadv __P((int, const struct iovec *, int)); int sys_Erecvfrom __P((int, void *, size_t, int, struct sockaddr *, size_t *)); ssize_t sys_Erecvmsg __P((int, struct msghdr *, int)); ssize_t sys_Esendmsg __P((int, const struct msghdr *, int)); ssize_t sys_Ewritev __P((int, const struct iovec *, int)); int sys_naccept __P((int, struct sockaddr *, socklen_t *)); int sys_ngetpeername __P((int, struct sockaddr *, socklen_t *)); int sys_ngetsockname __P((int, struct sockaddr *, socklen_t *)); int sys_nrecvfrom __P((int, void *, size_t, int, struct sockaddr *, size_t *)); ssize_t sys_nrecvmsg __P((int, struct msghdr *, int)); ssize_t sys_nsendmsg __P((int, const struct msghdr *, int)); #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #endif /* SOCKSLIBRARY_DYNAMIC */ __END_DECLS dante-1.1.19.dfsg/include/redefgen.sh0000755000175000017500000000062007136074325016044 0ustar roamroam#!/bin/sh # $Id: redefgen.sh,v 1.5 2000/07/21 16:22:45 karls Exp $ # # generate redefac.h from autoheader.h.in # PATH=/bin:/usr/bin:/sbin:/usr/sbin IN=$1/autoconf.h.in OUT=$1/redefac.h echo "/* Do not modify, generated from ${IN} */ " > ${OUT} for define in `egrep '^#undef' < $IN | egrep 'HAVE|NEED' | awk '{ print $2 }'`; do echo "#ifndef ${define} #define ${define} 0 #endif " >> $OUT donedante-1.1.19.dfsg/include/redefac.h0000644000175000017500000003165210362704313015471 0ustar roamroam/* Do not modify, generated from ../include/autoconf.h.in */ #ifndef HAVE_ALT_SOCKD_CONFIGFILE #define HAVE_ALT_SOCKD_CONFIGFILE 0 #endif #ifndef HAVE_ALT_SOCKD_PIDFILE #define HAVE_ALT_SOCKD_PIDFILE 0 #endif #ifndef HAVE_ALT_SOCKS_CONFIGFILE #define HAVE_ALT_SOCKS_CONFIGFILE 0 #endif #ifndef HAVE_ARPA_NAMESER_H #define HAVE_ARPA_NAMESER_H 0 #endif #ifndef HAVE_BINDRESVPORT #define HAVE_BINDRESVPORT 0 #endif #ifndef HAVE_BROKEN_INET_NTOA #define HAVE_BROKEN_INET_NTOA 0 #endif #ifndef HAVE_BROKEN_VSPRINTF #define HAVE_BROKEN_VSPRINTF 0 #endif #ifndef HAVE_BZERO #define HAVE_BZERO 0 #endif #ifndef HAVE_CMSGHDR #define HAVE_CMSGHDR 0 #endif #ifndef HAVE_CMSG_LEN #define HAVE_CMSG_LEN 0 #endif #ifndef HAVE_CMSG_SPACE #define HAVE_CMSG_SPACE 0 #endif #ifndef HAVE_CRYPT_H #define HAVE_CRYPT_H 0 #endif #ifndef HAVE_DAEMON #define HAVE_DAEMON 0 #endif #ifndef HAVE_DEC_PROTO #define HAVE_DEC_PROTO 0 #endif #ifndef HAVE_DEFECT_RECVMSG #define HAVE_DEFECT_RECVMSG 0 #endif #ifndef HAVE_DIFFTIME #define HAVE_DIFFTIME 0 #endif #ifndef HAVE_DISABLED_PIDFILE #define HAVE_DISABLED_PIDFILE 0 #endif #ifndef HAVE_DLFCN_H #define HAVE_DLFCN_H 0 #endif #ifndef HAVE_DOPRNT #define HAVE_DOPRNT 0 #endif #ifndef HAVE_DUMPCONF #define HAVE_DUMPCONF 0 #endif #ifndef HAVE_EXTRA_OSF_SYMBOLS #define HAVE_EXTRA_OSF_SYMBOLS 0 #endif #ifndef HAVE_FCNTL_H #define HAVE_FCNTL_H 0 #endif #ifndef HAVE_FREEIFADDRS #define HAVE_FREEIFADDRS 0 #endif #ifndef HAVE_GETADDRINFO #define HAVE_GETADDRINFO 0 #endif #ifndef HAVE_GETDTABLESIZE #define HAVE_GETDTABLESIZE 0 #endif #ifndef HAVE_GETHOSTBYNAME2 #define HAVE_GETHOSTBYNAME2 0 #endif #ifndef HAVE_GETIFADDRS #define HAVE_GETIFADDRS 0 #endif #ifndef HAVE_GETIPNODEBYNAME #define HAVE_GETIPNODEBYNAME 0 #endif #ifndef HAVE_GETPRPWNAM #define HAVE_GETPRPWNAM 0 #endif #ifndef HAVE_GETSPNAM #define HAVE_GETSPNAM 0 #endif #ifndef HAVE_HOST_TYPE #define HAVE_HOST_TYPE 0 #endif #ifndef HAVE_HSTRERROR #define HAVE_HSTRERROR 0 #endif #ifndef HAVE_H_ERRNO #define HAVE_H_ERRNO 0 #endif #ifndef HAVE_IFADDRS_H #define HAVE_IFADDRS_H 0 #endif #ifndef HAVE_IN6_ADDR #define HAVE_IN6_ADDR 0 #endif #ifndef HAVE_INET_ATON #define HAVE_INET_ATON 0 #endif #ifndef HAVE_INET_PTON #define HAVE_INET_PTON 0 #endif #ifndef HAVE_INT16_T #define HAVE_INT16_T 0 #endif #ifndef HAVE_INT32_T #define HAVE_INT32_T 0 #endif #ifndef HAVE_INT8_T #define HAVE_INT8_T 0 #endif #ifndef HAVE_INTTYPES_H #define HAVE_INTTYPES_H 0 #endif #ifndef HAVE_IN_ADDR_T #define HAVE_IN_ADDR_T 0 #endif #ifndef HAVE_IN_PORT_T #define HAVE_IN_PORT_T 0 #endif #ifndef HAVE_IPV6_SUPPORT #define HAVE_IPV6_SUPPORT 0 #endif #ifndef HAVE_ISSETUGID #define HAVE_ISSETUGID 0 #endif #ifndef HAVE_LIBC_ENABLE_SECURE #define HAVE_LIBC_ENABLE_SECURE 0 #endif #ifndef HAVE_LIBWRAP #define HAVE_LIBWRAP 0 #endif #ifndef HAVE_LIMITS_H #define HAVE_LIMITS_H 0 #endif #ifndef HAVE_LINUX_BUGS #define HAVE_LINUX_BUGS 0 #endif #ifndef HAVE_LINUX_ECCENTRICITIES #define HAVE_LINUX_ECCENTRICITIES 0 #endif #ifndef HAVE_MALLOC_H #define HAVE_MALLOC_H 0 #endif #ifndef HAVE_MALLOC_OPTIONS #define HAVE_MALLOC_OPTIONS 0 #endif #ifndef HAVE_MEMMOVE #define HAVE_MEMMOVE 0 #endif #ifndef HAVE_MEMORY_H #define HAVE_MEMORY_H 0 #endif #ifndef HAVE_MODULE_BANDWIDTH #define HAVE_MODULE_BANDWIDTH 0 #endif #ifndef HAVE_MODULE_CHECKMODULE #define HAVE_MODULE_CHECKMODULE 0 #endif #ifndef HAVE_MODULE_REDIRECT #define HAVE_MODULE_REDIRECT 0 #endif #ifndef HAVE_MODULE_SESSION #define HAVE_MODULE_SESSION 0 #endif #ifndef HAVE_MODULE_SHMEM #define HAVE_MODULE_SHMEM 0 #endif #ifndef HAVE_MSG_WAITALL #define HAVE_MSG_WAITALL 0 #endif #ifndef HAVE_NETINET_IN_H #define HAVE_NETINET_IN_H 0 #endif #ifndef HAVE_NETINET_IP_H #define HAVE_NETINET_IP_H 0 #endif #ifndef HAVE_NETINET_IP_VAR_H #define HAVE_NETINET_IP_VAR_H 0 #endif #ifndef HAVE_NOMALLOC_REALLOC #define HAVE_NOMALLOC_REALLOC 0 #endif #ifndef HAVE_NONULL_FREE #define HAVE_NONULL_FREE 0 #endif #ifndef HAVE_NO_RESOLVESTUFF #define HAVE_NO_RESOLVESTUFF 0 #endif #ifndef HAVE_NO_SYMBOL_UNDERSCORE #define HAVE_NO_SYMBOL_UNDERSCORE 0 #endif #ifndef HAVE_OPENLOG_LOG_PERROR #define HAVE_OPENLOG_LOG_PERROR 0 #endif #ifndef HAVE_PAM #define HAVE_PAM 0 #endif #ifndef HAVE_PATHS_H #define HAVE_PATHS_H 0 #endif #ifndef HAVE_PROFILING #define HAVE_PROFILING 0 #endif #ifndef HAVE_PROGNAME #define HAVE_PROGNAME 0 #endif #ifndef HAVE_PROT_ACCEPT_0 #define HAVE_PROT_ACCEPT_0 0 #endif #ifndef HAVE_PROT_ACCEPT_1 #define HAVE_PROT_ACCEPT_1 0 #endif #ifndef HAVE_PROT_ACCEPT_2 #define HAVE_PROT_ACCEPT_2 0 #endif #ifndef HAVE_PROT_ACCEPT_3 #define HAVE_PROT_ACCEPT_3 0 #endif #ifndef HAVE_PROT_BIND_0 #define HAVE_PROT_BIND_0 0 #endif #ifndef HAVE_PROT_BIND_1 #define HAVE_PROT_BIND_1 0 #endif #ifndef HAVE_PROT_BIND_2 #define HAVE_PROT_BIND_2 0 #endif #ifndef HAVE_PROT_BIND_3 #define HAVE_PROT_BIND_3 0 #endif #ifndef HAVE_PROT_CONNECT_0 #define HAVE_PROT_CONNECT_0 0 #endif #ifndef HAVE_PROT_CONNECT_1 #define HAVE_PROT_CONNECT_1 0 #endif #ifndef HAVE_PROT_CONNECT_2 #define HAVE_PROT_CONNECT_2 0 #endif #ifndef HAVE_PROT_CONNECT_3 #define HAVE_PROT_CONNECT_3 0 #endif #ifndef HAVE_PROT_GETHOSTBYADDR_0 #define HAVE_PROT_GETHOSTBYADDR_0 0 #endif #ifndef HAVE_PROT_GETHOSTBYADDR_1 #define HAVE_PROT_GETHOSTBYADDR_1 0 #endif #ifndef HAVE_PROT_GETHOSTBYADDR_2 #define HAVE_PROT_GETHOSTBYADDR_2 0 #endif #ifndef HAVE_PROT_GETHOSTBYADDR_3 #define HAVE_PROT_GETHOSTBYADDR_3 0 #endif #ifndef HAVE_PROT_GETPEERNAME_0 #define HAVE_PROT_GETPEERNAME_0 0 #endif #ifndef HAVE_PROT_GETPEERNAME_1 #define HAVE_PROT_GETPEERNAME_1 0 #endif #ifndef HAVE_PROT_GETPEERNAME_2 #define HAVE_PROT_GETPEERNAME_2 0 #endif #ifndef HAVE_PROT_GETPEERNAME_3 #define HAVE_PROT_GETPEERNAME_3 0 #endif #ifndef HAVE_PROT_GETSOCKNAME_0 #define HAVE_PROT_GETSOCKNAME_0 0 #endif #ifndef HAVE_PROT_GETSOCKNAME_1 #define HAVE_PROT_GETSOCKNAME_1 0 #endif #ifndef HAVE_PROT_GETSOCKNAME_2 #define HAVE_PROT_GETSOCKNAME_2 0 #endif #ifndef HAVE_PROT_GETSOCKNAME_3 #define HAVE_PROT_GETSOCKNAME_3 0 #endif #ifndef HAVE_PROT_READV_0 #define HAVE_PROT_READV_0 0 #endif #ifndef HAVE_PROT_READV_1 #define HAVE_PROT_READV_1 0 #endif #ifndef HAVE_PROT_READV_2 #define HAVE_PROT_READV_2 0 #endif #ifndef HAVE_PROT_READV_3 #define HAVE_PROT_READV_3 0 #endif #ifndef HAVE_PROT_READ_0 #define HAVE_PROT_READ_0 0 #endif #ifndef HAVE_PROT_READ_1 #define HAVE_PROT_READ_1 0 #endif #ifndef HAVE_PROT_READ_2 #define HAVE_PROT_READ_2 0 #endif #ifndef HAVE_PROT_READ_3 #define HAVE_PROT_READ_3 0 #endif #ifndef HAVE_PROT_RECVFROM_0 #define HAVE_PROT_RECVFROM_0 0 #endif #ifndef HAVE_PROT_RECVFROM_1 #define HAVE_PROT_RECVFROM_1 0 #endif #ifndef HAVE_PROT_RECVFROM_2 #define HAVE_PROT_RECVFROM_2 0 #endif #ifndef HAVE_PROT_RECVFROM_3 #define HAVE_PROT_RECVFROM_3 0 #endif #ifndef HAVE_PROT_RECVFROM_4 #define HAVE_PROT_RECVFROM_4 0 #endif #ifndef HAVE_PROT_RECVFROM_5 #define HAVE_PROT_RECVFROM_5 0 #endif #ifndef HAVE_PROT_RECVFROM_6 #define HAVE_PROT_RECVFROM_6 0 #endif #ifndef HAVE_PROT_RECVMSG_0 #define HAVE_PROT_RECVMSG_0 0 #endif #ifndef HAVE_PROT_RECVMSG_1 #define HAVE_PROT_RECVMSG_1 0 #endif #ifndef HAVE_PROT_RECVMSG_2 #define HAVE_PROT_RECVMSG_2 0 #endif #ifndef HAVE_PROT_RECVMSG_3 #define HAVE_PROT_RECVMSG_3 0 #endif #ifndef HAVE_PROT_RECV_0 #define HAVE_PROT_RECV_0 0 #endif #ifndef HAVE_PROT_RECV_1 #define HAVE_PROT_RECV_1 0 #endif #ifndef HAVE_PROT_RECV_2 #define HAVE_PROT_RECV_2 0 #endif #ifndef HAVE_PROT_RECV_3 #define HAVE_PROT_RECV_3 0 #endif #ifndef HAVE_PROT_RECV_4 #define HAVE_PROT_RECV_4 0 #endif #ifndef HAVE_PROT_SENDMSG_0 #define HAVE_PROT_SENDMSG_0 0 #endif #ifndef HAVE_PROT_SENDMSG_1 #define HAVE_PROT_SENDMSG_1 0 #endif #ifndef HAVE_PROT_SENDMSG_2 #define HAVE_PROT_SENDMSG_2 0 #endif #ifndef HAVE_PROT_SENDMSG_3 #define HAVE_PROT_SENDMSG_3 0 #endif #ifndef HAVE_PROT_SENDTO_0 #define HAVE_PROT_SENDTO_0 0 #endif #ifndef HAVE_PROT_SENDTO_1 #define HAVE_PROT_SENDTO_1 0 #endif #ifndef HAVE_PROT_SENDTO_2 #define HAVE_PROT_SENDTO_2 0 #endif #ifndef HAVE_PROT_SENDTO_3 #define HAVE_PROT_SENDTO_3 0 #endif #ifndef HAVE_PROT_SENDTO_4 #define HAVE_PROT_SENDTO_4 0 #endif #ifndef HAVE_PROT_SENDTO_5 #define HAVE_PROT_SENDTO_5 0 #endif #ifndef HAVE_PROT_SENDTO_6 #define HAVE_PROT_SENDTO_6 0 #endif #ifndef HAVE_PROT_SEND_0 #define HAVE_PROT_SEND_0 0 #endif #ifndef HAVE_PROT_SEND_1 #define HAVE_PROT_SEND_1 0 #endif #ifndef HAVE_PROT_SEND_2 #define HAVE_PROT_SEND_2 0 #endif #ifndef HAVE_PROT_SEND_3 #define HAVE_PROT_SEND_3 0 #endif #ifndef HAVE_PROT_SEND_4 #define HAVE_PROT_SEND_4 0 #endif #ifndef HAVE_PROT_WRITEV_0 #define HAVE_PROT_WRITEV_0 0 #endif #ifndef HAVE_PROT_WRITEV_1 #define HAVE_PROT_WRITEV_1 0 #endif #ifndef HAVE_PROT_WRITEV_2 #define HAVE_PROT_WRITEV_2 0 #endif #ifndef HAVE_PROT_WRITEV_3 #define HAVE_PROT_WRITEV_3 0 #endif #ifndef HAVE_PROT_WRITE_0 #define HAVE_PROT_WRITE_0 0 #endif #ifndef HAVE_PROT_WRITE_1 #define HAVE_PROT_WRITE_1 0 #endif #ifndef HAVE_PROT_WRITE_2 #define HAVE_PROT_WRITE_2 0 #endif #ifndef HAVE_PROT_WRITE_3 #define HAVE_PROT_WRITE_3 0 #endif #ifndef HAVE_RESOLV_H #define HAVE_RESOLV_H 0 #endif #ifndef HAVE_ROUTEINFO_BSD #define HAVE_ROUTEINFO_BSD 0 #endif #ifndef HAVE_ROUTEINFO_LINUX #define HAVE_ROUTEINFO_LINUX 0 #endif #ifndef HAVE_ROUTE_SOURCE #define HAVE_ROUTE_SOURCE 0 #endif #ifndef HAVE_SECURITY_PAM_APPL_H #define HAVE_SECURITY_PAM_APPL_H 0 #endif #ifndef HAVE_SELECT #define HAVE_SELECT 0 #endif #ifndef HAVE_SENDMSG_DEADLOCK #define HAVE_SENDMSG_DEADLOCK 0 #endif #ifndef HAVE_SETEGID #define HAVE_SETEGID 0 #endif #ifndef HAVE_SETEUID #define HAVE_SETEUID 0 #endif #ifndef HAVE_SETPROCTITLE #define HAVE_SETPROCTITLE 0 #endif #ifndef HAVE_SHADOW_H #define HAVE_SHADOW_H 0 #endif #ifndef HAVE_SIGNAL_SIGINFO #define HAVE_SIGNAL_SIGINFO 0 #endif #ifndef HAVE_SIG_ATOMIC_T #define HAVE_SIG_ATOMIC_T 0 #endif #ifndef HAVE_SOCKADDR_SA_LEN #define HAVE_SOCKADDR_SA_LEN 0 #endif #ifndef HAVE_SOCKADDR_STORAGE #define HAVE_SOCKADDR_STORAGE 0 #endif #ifndef HAVE_SOCKATMARK #define HAVE_SOCKATMARK 0 #endif #ifndef HAVE_SOCKD_CONFIGFILE #define HAVE_SOCKD_CONFIGFILE 0 #endif #ifndef HAVE_SOCKD_PIDFILE #define HAVE_SOCKD_PIDFILE 0 #endif #ifndef HAVE_SOCKET #define HAVE_SOCKET 0 #endif #ifndef HAVE_SOCKS_CONFIGFILE #define HAVE_SOCKS_CONFIGFILE 0 #endif #ifndef HAVE_SOLARIS_2_5_1 #define HAVE_SOLARIS_2_5_1 0 #endif #ifndef HAVE_SOLARIS_BUGS #define HAVE_SOLARIS_BUGS 0 #endif #ifndef HAVE_SOLARIS_PAM_BUG #define HAVE_SOLARIS_PAM_BUG 0 #endif #ifndef HAVE_SO_SNDLOWAT #define HAVE_SO_SNDLOWAT 0 #endif #ifndef HAVE_STDINT_H #define HAVE_STDINT_H 0 #endif #ifndef HAVE_STDLIB_H #define HAVE_STDLIB_H 0 #endif #ifndef HAVE_STRCSPN #define HAVE_STRCSPN 0 #endif #ifndef HAVE_STRDUP #define HAVE_STRDUP 0 #endif #ifndef HAVE_STRERROR #define HAVE_STRERROR 0 #endif #ifndef HAVE_STRFTIME #define HAVE_STRFTIME 0 #endif #ifndef HAVE_STRINGS_H #define HAVE_STRINGS_H 0 #endif #ifndef HAVE_STRING_H #define HAVE_STRING_H 0 #endif #ifndef HAVE_STRSPN #define HAVE_STRSPN 0 #endif #ifndef HAVE_STRUCT_IPOPTS #define HAVE_STRUCT_IPOPTS 0 #endif #ifndef HAVE_STRVIS #define HAVE_STRVIS 0 #endif #ifndef HAVE_SYSCONF #define HAVE_SYSCONF 0 #endif #ifndef HAVE_SYSLOG_H #define HAVE_SYSLOG_H 0 #endif #ifndef HAVE_SYSTEM_XMSG_MAGIC #define HAVE_SYSTEM_XMSG_MAGIC 0 #endif #ifndef HAVE_SYS_FILE_H #define HAVE_SYS_FILE_H 0 #endif #ifndef HAVE_SYS_IOCTL_H #define HAVE_SYS_IOCTL_H 0 #endif #ifndef HAVE_SYS_IPC_H #define HAVE_SYS_IPC_H 0 #endif #ifndef HAVE_SYS_SEM_H #define HAVE_SYS_SEM_H 0 #endif #ifndef HAVE_SYS_SOCKIO_H #define HAVE_SYS_SOCKIO_H 0 #endif #ifndef HAVE_SYS_STAT_H #define HAVE_SYS_STAT_H 0 #endif #ifndef HAVE_SYS_TIME_H #define HAVE_SYS_TIME_H 0 #endif #ifndef HAVE_SYS_TYPES_H #define HAVE_SYS_TYPES_H 0 #endif #ifndef HAVE_SYS_WAIT_H #define HAVE_SYS_WAIT_H 0 #endif #ifndef HAVE_TCPD_H #define HAVE_TCPD_H 0 #endif #ifndef HAVE_TIMER_MACROS #define HAVE_TIMER_MACROS 0 #endif #ifndef HAVE_UINT16_T #define HAVE_UINT16_T 0 #endif #ifndef HAVE_UINT32_T #define HAVE_UINT32_T 0 #endif #ifndef HAVE_UINT8_T #define HAVE_UINT8_T 0 #endif #ifndef HAVE_UNISTD_H #define HAVE_UNISTD_H 0 #endif #ifndef HAVE_UTIME_NULL #define HAVE_UTIME_NULL 0 #endif #ifndef HAVE_VOLATILE_SIG_ATOMIC_T #define HAVE_VOLATILE_SIG_ATOMIC_T 0 #endif #ifndef HAVE_VPRINTF #define HAVE_VPRINTF 0 #endif #ifndef HAVE_VSNPRINTF #define HAVE_VSNPRINTF 0 #endif #ifndef HAVE_VSYSLOG #define HAVE_VSYSLOG 0 #endif #ifndef HAVE_WORKING_GETPWNAM #define HAVE_WORKING_GETPWNAM 0 #endif #ifndef NEED_ACCEPTLOCK #define NEED_ACCEPTLOCK 0 #endif #ifndef NEED_AF_LOCAL #define NEED_AF_LOCAL 0 #endif #ifndef NEED_DYNA_RTLD #define NEED_DYNA_RTLD 0 #endif #ifndef NEED_EXIT_FAILURE #define NEED_EXIT_FAILURE 0 #endif #ifndef NEED_GETSOCKOPT_CAST #define NEED_GETSOCKOPT_CAST 0 #endif #ifndef NEED_SA_RESTART #define NEED_SA_RESTART 0 #endif #ifndef NEED_SYS_SOCKIO_H #define NEED_SYS_SOCKIO_H 0 #endif dante-1.1.19.dfsg/include/common.h0000754000175000017500000020656310362465522015405 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ /* $Id: common.h,v 1.329 2006/01/15 15:33:38 karls Exp $ */ #ifndef _COMMON_H_ #define _COMMON_H_ #endif #ifndef SOCKS_SERVER #define SOCKS_SERVER 0 #endif /* !defined SOCKS_SERVER */ #ifndef SOCKS_CLIENT #define SOCKS_CLIENT 0 #endif /* !defined SOCKS_CLIENT */ #ifndef SOCKSLIBRARY_DYNAMIC #define SOCKSLIBRARY_DYNAMIC 0 #endif /* !defined SOCKSLIBRARY_DYNAMIC */ /* XXX ifdef, not if, defined on command line */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #ifndef __GNUC__ #define __attribute__(a) #endif #if HAVE_LINUX_ECCENTRICITIES /* * XXX This is a hack. Avoid transparent sockaddr union used in Linux * to avoid the use of the union in the code. Mainly used in * interposition.c (also for CMSG_) */ #ifdef __GNUC__ #undef __GNUC__ #define __GNUC__ 0 #endif /* __GNUC__ */ #endif /* HAVE_LINUX_ECCENTRICITIES */ #include #if HAVE_SYS_TIME_H #include #endif /* HAVE_SYS_TIME_H */ #if HAVE_SYS_FILE_H #include #endif /* HAVE_SYS_FILE_H */ #include #include #if HAVE_SYS_IPC_H #include #endif /* HAVE_SYS_IPC_H */ #if HAVE_SYS_SEM_H #include #endif /* HAVE_SYS_SEM_H */ #include #include #if NEED_SYS_SOCKIO_H #include #endif /* NEED_SYS_SOCKIO_H */ #include #include #include #ifdef SOCKS_DLIB_OSF #undef __DECC #endif /* SOCKS_DLIB_OSF */ #include #ifdef SOCKS_DLIB_OSF #define __DECC #endif /* SOCKS_DLIB_OSF */ #include #include #if HAVE_NETINET_IP_H #include #endif /* HAVE_NETINET_IP_H */ #if HAVE_NETINET_IP_VAR_H #include #endif /* HAVE_NETINET_IP_VAR_H */ #include #if HAVE_ARPA_NAMESER_H #include #endif /* HAVE_ARPA_NAMESER_H */ #include #include #if HAVE_CRYPT_H #include #endif /* HAVE_CRYPT_H */ #include #if SOCKSLIBRARY_DYNAMIC #include #endif /* SOCKSLIBRARY_DYNAMIC */ #include #include #if HAVE_LIMITS_H #include #endif /* HAVE_LIMITS_H */ #include #include #include #include #ifdef STDC_HEADERS #include #else #include #endif /* STDC_HEADERS */ #include #include #if HAVE_STRINGS_H #include #endif /* HAVE_STRINGS_H */ #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #if HAVE_LIBWRAP && HAVE_TCPD_H #include #endif /* HAVE_LIBWRAP && HAVE_TCPD_H */ #if TIME_WITH_SYS_TIME || (!TIME_WITH_SYS_TIME && !HAVE_SYS_TIME_H) #include #endif #if HAVE_UNISTD_H #ifdef HAVE_DEC_PROTO #undef _XOPEN_SOURCE_EXTENDED #endif /* HAVE_DEC_PROTO */ #include #ifdef HAVE_DEC_PROTO #define _XOPEN_SOURCE_EXTENDED 1 #endif /* HAVE_DEC_PROTO */ #endif /* HAVE_UNISTD_H */ #if HAVE_RESOLV_H #include #endif /* HAVE_RESOLV_H */ #if HAVE_IFADDRS_H #include #endif /* HAVE_IFADDRS_H */ #if HAVE_PAM #include #endif /* HAVE_PAM */ #include "yacconfig.h" #if HAVE_LINUX_BUGS #if (defined __bswap_16) && (!defined __bswap_32) #undef ntohl #undef ntohs #undef htonl #undef htons #endif #endif /* HAVE_LINUX_BUGS */ #ifdef lint extern const int lintnoloop_common_h; #else #define lintnoloop_common_h 0 #endif #include "config.h" #define SOCKS_TRYHARDER 0 /* XXX BUGS */ /* XXX should be configure option. */ #ifndef RLIMIT_OFILE #define RLIMIT_OFILE RLIMIT_NOFILE #endif /* !RLIMIT_OFILE */ #if NEED_GETSOCKOPT_CAST #define getsockopt(a,b,c,d,e) getsockopt((a),(b),(c),(char *)(d),(e)) #define setsockopt(a,b,c,d,e) setsockopt((a),(b),(c),(char *)(d),(e)) #endif /* NEED_GETSOCKOPT_CAST */ #if !HAVE_BZERO #define bzero(b, len) memset(b, 0, len) #endif /* !HAVE_BZERO */ #if !HAVE_SIG_ATOMIC_T typedef int sig_atomic_t; #endif /* !HAVE_SIG_ATOMIC_T */ #ifdef DIAGNOSTIC #undef DIAGNOSTIC #define DIAGNOSTIC 1 #else #define DIAGNOSTIC 0 #endif #ifdef DEBUG #undef DEBUG #define DEBUG 1 #else #define DEBUG 0 #endif #if DEBUG #if !DIAGNOSTIC #undef DIAGNOSTIC #define DIAGNOSTIC 1 #endif /* !DIAGNOSTIC */ /* * Solaris 2.5.1 and it's stream stuff is broken and puts the processes * into never-never land forever on half the sendmsg() calls if they * involve ancillary data. (it seems to deadlock the processes.) */ #ifndef HAVE_SENDMSG_DEADLOCK #define HAVE_SENDMSG_DEADLOCK 1 #endif #ifndef HAVE_ACCEPTLOCK #define HAVE_ACCEPTLOCK 1 #endif #endif /* DEBUG */ /* __P and __BEGIN_DECLS definitions taken from libtool manual */ #undef __BEGIN_DECLS #undef __END_DECLS #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # define __END_DECLS } #else # define __BEGIN_DECLS /* empty */ # define __END_DECLS /* empty */ #endif #undef __P #if defined (__STDC__) || defined (_AIX) \ || (defined (__mips) && defined (_SYSTYPE_SVR4)) \ || defined(WIN32) || defined(__cplusplus) # define __P(protos) protos #else # define __P(protos) () #endif #if SIZEOF_CHAR == 1 typedef unsigned char ubits_8; typedef char sbits_8; #else error "no known 8 bits wide datatype" #endif #if SIZEOF_SHORT == 2 typedef unsigned short ubits_16; typedef short sbits_16; #else # if SIZEOF_INT == 2 typedef unsigned int ubits_16; typedef int sbits_16; # else error "no known 16 bits wide datatype" # endif #endif #if SIZEOF_INT == 4 typedef unsigned int ubits_32; typedef int sbits_32; #else # if SIZEOF_SHORT == 4 typedef unsigned short ubits_32; typedef short sbits_32; # else # if SIZEOF_LONG == 4 typedef unsigned long ubits_32; typedef long sbits_32; # else error "no known 32 bits wide datatype" # endif /* SIZEOF_LONG == 4 */ # endif /* SIZEOF_SHORT == 4 */ #endif /* SIZEOF_INT == 4 */ #if !HAVE_INT8_T #define int8_t sbits_8 #endif /* HAVE_INT8_T */ #if !HAVE_INT16_T #define int16_t sbits_16 #endif /* HAVE_INT16_T */ #if !HAVE_INT32_T #define int32_t sbits_32 #endif /* HAVE_INT32_T */ #if !HAVE_UINT8_T #define uint8_t ubits_8 #endif /* HAVE_UINT8_T */ #if !HAVE_UINT16_T #define uint16_t ubits_16 #endif /* HAVE_UINT16_T */ #if !HAVE_UINT32_T #define uint32_t ubits_32 #endif /* HAVE_UINT32_T */ #if !HAVE_IN_PORT_T #define in_port_t ubits_16 #endif /* HAVE_IN_PORT_T */ #if !HAVE_IN_ADDR_T #define in_addr_t ubits_32 #endif /* HAVE_IN_ADDR_T */ #ifndef INADDR_NONE # define INADDR_NONE (ubits_32) 0xffffffff #endif /* !INADDR_NONE */ #ifndef MAX # define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif /* !MAX */ #ifndef MIN # define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif /* !MIN */ #if NEED_EXIT_FAILURE /* XXX assumes EXIT_SUCCESS is undefined too */ #define EXIT_SUCCESS 0 #define EXIT_FAILURE 1 #endif /* NEED_EXIT_FAILURE */ #if NEED_SA_RESTART #define SA_RESTART SV_INTERRUPT #endif /* NEED_SA_RESTART */ #if NEED_AF_LOCAL #define AF_LOCAL AF_UNIX #endif /* NEED_AF_LOCAL */ #if HAVE_NOMALLOC_REALLOC #define realloc(p,s) (((p) == NULL) ? (malloc(s)) : (realloc((p),(s)))) #endif /* HAVE_NOMALLOC_REALLOC */ #if HAVE_NONULL_FREE #define free(p) (((p) == NULL) ? ((void)(p)) : (free(p))) #endif /* __CONCAT macro from anoncvs */ #ifndef __CONCAT #if defined(__STDC__) || defined(__cplusplus) #define __CONCAT(x,y) x ## y #else #define __CONCAT(x,y) x/**/y #endif #endif #ifndef __CONCAT3 #if defined(__STDC__) || defined(__cplusplus) #define __CONCAT3(x,y,z) x ## y ## z #else #define __CONCAT3(x,y,z) x/**/y/**/z #endif #endif #if !HAVE_STRUCT_IPOPTS #define MAX_IPOPTLEN 40 struct ipoption { struct in_addr ipopt_dst; sbits_8 ipopt_list[MAX_IPOPTLEN]; }; #endif /* !HAVE_STRUCT_IPOPTS */ #if !HAVE_IN6_ADDR /* from OpenBSD netinet6/in6.h */ struct in6_addr { union { u_int8_t __u6_addr8[16]; u_int16_t __u6_addr16[8]; u_int32_t __u6_addr32[4]; } __u6_addr;/* 128-bit IP6 address */ }; #define s6_addr __u6_addr.__u6_addr8 #endif /* !HAVE_IN6_ADDR */ #if !HAVE_TIMER_MACROS /* timeval macros, taken from OpenBSD sys/time.h */ #define timeradd(tvp, uvp, vvp) \ do { \ (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ if ((vvp)->tv_usec >= 1000000) { \ (vvp)->tv_sec++; \ (vvp)->tv_usec -= 1000000; \ } \ } while (0) #define timersub(tvp, uvp, vvp) \ do { \ (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ if ((vvp)->tv_usec < 0) { \ (vvp)->tv_sec--; \ (vvp)->tv_usec += 1000000; \ } \ } while (0) #endif /* !HAVE_TIMER_MACROS */ #if 0 #if !HAVE_SOCKADDR_STORAGE /* * sockaddr_storage (see rfc2553). * struct taken from OpenBSD */ struct sockaddr_storage { u_int8_t ss_len; /* total length */ sa_family_t ss_family; /* address family */ u_char __ss_pad1[6]; /* align to quad */ u_int64_t __ss_pad2; /* force alignment for stupid compilers */ u_char __ss_pad3[240]; /* pad to a total of 256 bytes */ }; #endif /* !HAVE_SOCKADDR_STORAGE */ #endif #if !HAVE_GETIFADDRS /* Taken from OpenBSD */ struct ifaddrs { struct ifaddrs *ifa_next; char *ifa_name; unsigned int ifa_flags; struct sockaddr *ifa_addr; struct sockaddr *ifa_netmask; /*XXX*/ #undef ifa_dstaddr struct sockaddr *ifa_dstaddr; void *ifa_data; }; /* * This may have been defined in . Note that if is * to be included it must be included before this header file. */ #ifndef ifa_broadaddr #define ifa_broadaddr ifa_dstaddr /* broadcast address interface */ #endif #endif /* !HAVE_GETIFADDRS */ /* * BSDI 4.1 doesn't have freeifaddrs(), but uses free() * Problem reported by "Zand, Nooshin" */ #if HAVE_GETIFADDRS && !HAVE_FREEIFADDRS #define freeifaddrs free #endif /* HAVE_GETIFADDRS && !HAVE_FREEIFADDRS */ #define TOIN(addr) ((struct sockaddr_in *)(addr)) #define TOCIN(addr) ((const struct sockaddr_in *)(addr)) /* global variables needed by everyone. */ extern struct config_t sockscf; extern char *__progname; #if !HAVE_H_ERRNO extern int h_errno; #endif /* !HAVE_H_ERRNO */ /* * defines */ #define IP_MAXPORT 65535 /* max value for ip port number. */ /* * redefine system limits to match that of socks protocol. * No need for these to be bigger than protocol allows, but they * _must_ be atleast as big as protocol allows. */ #ifdef MAXHOSTNAMELEN #undef MAXHOSTNAMELEN #endif #define MAXHOSTNAMELEN (255 + 1) /* socks5: 255, +1 for len. */ #ifdef MAXNAMELEN #undef MAXNAMELEN #endif #define MAXNAMELEN (255 + 1) /* socks5: 255, +1 for len. */ #ifdef MAXPWLEN #undef MAXPWLEN #endif #define MAXPWLEN (255 + 1) /* socks5: 255, +1 for len. */ #define MAXIFNAMELEN 255 /* "255." "255." "255." "255" "." "65535" + NUL */ #define MAXSOCKADDRSTRING (4 + 4 + 4 + 3 + 1 + 5 + 1) /* "." + "65535" + NUL */ #define MAXSOCKSHOSTSTRING (MAXHOSTNAMELEN + 1 + 5) #define MAXRULEADDRSTRING (MAXSOCKSHOSTSTRING * 2) #define MAXAUTHINFOLEN (((sizeof("(") - 1) + MAXMETHODSTRING) \ + (sizeof(")") - 1) + (sizeof("@") - 1) + MAXNAMELEN) #ifndef NUL #define NUL '\0' #endif /* * We don't care whether it's called O_NONBLOCK, FNDELAY or whatever. * We just want to know whether the flags set give blocking or nonblocking * semantics. */ #ifndef FNDELAY #define NONBLOCKING (O_NONBLOCK | O_NDELAY) #else #define NONBLOCKING (O_NONBLOCK | FNDELAY | O_NDELAY) #endif #define CONFIGTYPE_SERVER 1 #define CONFIGTYPE_CLIENT 2 #define PROTOCOL_TCPs "tcp" #define PROTOCOL_UDPs "udp" #define PROTOCOL_UNKNOWNs "unknown" #define RESOLVEPROTOCOL_UDP 0 #define RESOLVEPROTOCOL_TCP 1 #define RESOLVEPROTOCOL_FAKE 2 #define LOGTYPE_SYSLOG 0x1 #define LOGTYPE_FILE 0x2 #define NOMEM "" /* * macros */ #ifndef _NO_FUNCTION_REDIFINE #define close(n) closen(n) /* XXX needed on AIX apparently */ #ifdef recvmsg #define recvmsg_system recvmsg #undef recvmsg #endif /* recvmsg */ #if HAVE_SYSTEM_XMSG_MAGIC #undef recvmsg_system #define recvmsg_system nrecvmsg #endif /* HAVE_SYSTEM_XMSG_MAGIC */ #define recvmsg(s, msg, flags) recvmsgn(s, msg, flags) #ifdef sendmsg #define sendmsg_system sendmsg #undef sendmsg #endif /* sendmsg */ #if HAVE_SYSTEM_XMSG_MAGIC #undef sendmsg_system #define sendmsg_system nsendmsg #endif /* HAVE_SYSTEM_XMSG_MAGIC */ #define sendmsg(s, msg, flags) sendmsgn(s, msg, flags) #endif /* _NO_FUNCTION_REDIFINE */ #define PORTISRESERVED(port) \ (ntohs((port)) != 0 && ntohs((port)) < IPPORT_RESERVED) #define ADDRISBOUND(addr) \ ((((struct sockaddr_in *)(&addr))->sin_addr.s_addr != htonl(INADDR_ANY)) \ || (((struct sockaddr_in *)(&addr))->sin_port != htons(0))) #define ELEMENTS(array) (sizeof(array) / sizeof(array[0])) #define OCTETIFY(a) ((a) &= 0xff) /* * Note that it's the argument that will be truncated, not just the * return value. */ /* * macros to manipulate ancillary data depending on if we're on sysv or BSD. */ /* * Modern CMSG alignment macros. Use them if the platform has them, * if not we get the default behaviour. */ #if HAVE_CMSGHDR #if !HAVE_CMSG_LEN #define CMSG_LEN(len) (sizeof(struct cmsghdr) + (len)) #endif /* !HAVE_CMSG_LEN */ #if !HAVE_CMSG_SPACE #define CMSG_SPACE(len) (sizeof(struct cmsghdr) + (len)) #endif /* !HAVE_CMSG_SPACE */ #else /* HAVE_CMSGHDR */ #if !HAVE_CMSG_LEN #define CMSG_LEN(len) (len) #endif /* !HAVE_CMSG_LEN */ #if !HAVE_CMSG_SPACE #define CMSG_SPACE(len) (len) #endif /* !HAVE_CMSG_SPACE */ #endif /* HAVE_CMSGHDR */ /* * allocate memory for a controlmessage of size "size". "name" is the * name of the allocated memory. */ #if HAVE_CMSGHDR #define CMSG_AALLOC(name, size) \ union { \ char cmsgmem[CMSG_SPACE(size)]; \ struct cmsghdr align; \ } __CONCAT3(_, name, mem); \ struct cmsghdr *name = &__CONCAT3(_, name, mem).align #else /* !HAVE_CMSGHDR */ #define CMSG_AALLOC(name, size) \ char name[(size)] #endif /* !HAVE_CMSGHDR */ /* * Returns the size of the previously allocated controlmessage named * "name" */ #if HAVE_CMSGHDR #define CMSG_MEMSIZE(name) (sizeof(__CONCAT3(_, name, mem))) #else /* !HAVE_CMSGHDR */ #define CMSG_MEMSIZE(name) (sizeof((name))) #endif /* * Returns the controldata member of "msg". */ #if HAVE_CMSGHDR /* cast is necessary on AIX, due to buggy headers there?. */ #define CMSG_CONTROLDATA(msg) ((struct cmsghdr *)((msg).msg_control)) #else /* !HAVE_CMSGHDR */ #define CMSG_CONTROLDATA(msg) ((msg).msg_accrights) #endif /* * add "object" to "data". "object" is the object to add to "data" at * offset "offset". */ #if HAVE_CMSGHDR #define CMSG_ADDOBJECT(object, data, offset) \ do \ memcpy(CMSG_DATA(data) + (offset), &(object), sizeof(object)); \ while (lintnoloop_common_h) #else /* !HAVE_CMSGHDR */ #define CMSG_ADDOBJECT(object, data, offset) \ do \ memcpy(data + (offset), &(object), sizeof((object))); \ while (lintnoloop_common_h) #endif /* !HAVE_CMSGHDR */ /* * get a object from controldata "data". * "object" is the object to fill with data gotten from "data" at offset * "offset". */ #if HAVE_CMSGHDR #define CMSG_GETOBJECT(object, data, offset) \ do \ memcpy(&(object), CMSG_DATA((data)) + (offset), sizeof((object))); \ while (lintnoloop_common_h) #else /* !HAVE_CMSGHDR */ #define CMSG_GETOBJECT(object, data, offset) \ do \ memcpy(&(object), ((data) + (offset)), sizeof((object))); \ while (lintnoloop_common_h) #endif /* !HAVE_CMSGHDR */ /* * Sets up "object" for sending a controlmessage of size "size". * "controlmem" is the memory the controlmessage is stored in. */ #if HAVE_CMSGHDR #define CMSG_SETHDR_SEND(object, controlmem, size) \ do { \ controlmem->cmsg_level = SOL_SOCKET; \ controlmem->cmsg_type = SCM_RIGHTS; \ controlmem->cmsg_len = CMSG_LEN(size); \ \ object.msg_control = (caddr_t)controlmem; \ object.msg_controllen = controlmem->cmsg_len; \ } while (lintnoloop_common_h) #else /* !HAVE_CMSGHDR */ #define CMSG_SETHDR_SEND(object, controlmem, size) \ do { \ object.msg_accrights = (caddr_t)controlmem; \ object.msg_accrightslen = (size); \ } while (lintnoloop_common_h) #endif /* !HAVE_CMSGHDR */ /* * Sets up "object" for receiving a controlmessage of size "size". * "controlmem" is the memory set aside for the controlmessage. */ #if HAVE_CMSGHDR #define CMSG_SETHDR_RECV(object, controlmem, size) \ do { \ object.msg_control = (caddr_t)controlmem; \ object.msg_controllen = (size); \ } while (lintnoloop_common_h) #else /* !HAVE_CMSGHDR */ #define CMSG_SETHDR_RECV(object, controlmem, size) \ do { \ object.msg_accrights = (caddr_t)controlmem; \ object.msg_accrightslen = (size); \ } while (lintnoloop_common_h) #endif /* !HAVE_CMSGHDR */ /* returns length of controldata actually sent. */ #if HAVE_CMSGHDR #define CMSG_GETLEN(msg) ((msg).msg_controllen - CMSG_LEN(0)) #else #define CMSG_GETLEN(msg) ((msg).msg_accrightslen) #endif #if HAVE_CMSGHDR #define CMSG_TOTLEN(msg) ((msg).msg_controllen) #else #define CMSG_TOTLEN(msg) ((msg).msg_accrightslen) #endif #define INTERNAL_ERROR \ "an internal error was detected at %s:%d\nvalue = %ld, version = %s" #define SASSERT(expression) \ do { \ if (!(expression)) \ SERR(expression); \ } while (lintnoloop_common_h) #define SASSERTX(expression) \ do { \ if (!(expression)) \ SERRX(expression); \ } while (lintnoloop_common_h) /* * wrappers around err()/errx()/warn()/warnx() for more consistent error * messages. * "failure" is the value that was wrong and which caused the internal error. */ #define SERR(failure) \ do { \ SWARN(failure); \ abort(); \ } while (lintnoloop_common_h) #define SERRX(failure) \ do { \ SWARNX(failure); \ abort(); \ } while (lintnoloop_common_h) #define SWARN(failure) \ swarn(INTERNAL_ERROR, \ __FILE__, __LINE__, (long int)(failure), rcsid) #define SWARNX(failure) \ swarnx(INTERNAL_ERROR, \ __FILE__, __LINE__, (long int)(failure), rcsid) #define ERR(failure) \ do { \ warn(INTERNAL_ERROR, __FILE__, __LINE__, \ (long int)(failure), rcsid); \ abort(); \ } while (p) #define ERRX(failure) \ do { \ warnx(INTERNAL_ERROR, __FILE__, __LINE__, \ (long int)(failure), rcsid); \ abort(); \ } while (lintnoloop_common_h) #define WARN(failure) \ warn(INTERNAL_ERROR, __FILE__, __LINE__, (long int)(failure), rcsid) #define WARNX(failure) \ warnx(INTERNAL_ERROR, __FILE__, __LINE__, (long int)(failure), rcsid) #define ERRORMSG(failure) \ error_msg(LOG_HIGH, INTERNAL_ERROR, __FILE__, __LINE__, (long int)(failure),\ rcsid) /* the size of a UDP header "packet" (no padding) */ #define PACKETSIZE_UDP(packet) ( \ sizeof((packet)->flag) + sizeof((packet)->frag) \ + sizeof((packet)->host.atype) + sizeof((packet)->host.port) \ + (ADDRESSIZE_V5(packet))) /* * returns the length of the current address field in socks packet "packet". * "packet" can be one of pointer to response_t, request_t or udpheader_t. */ #define ADDRESSIZE(packet) ( \ ((packet)->version == SOCKS_V4 ? \ (ADDRESSIZE_V4(packet)) : (ADDRESSIZE_V5(packet)))) /* * version specifics */ #define ADDRESSIZE_V5(packet) ( \ (packet)->host.atype == SOCKS_ADDR_IPV4 ? \ sizeof((packet)->host.addr.ipv4) :(packet)->host.atype == SOCKS_ADDR_IPV6 ? \ sizeof((packet)->host.addr.ipv6) : (strlen((packet)->host.addr.domain) + 1)) #define ADDRESSIZE_V4(packet) ( \ (packet)->atype == SOCKS_ADDR_IPV4 ? \ sizeof((packet)->addr.ipv4) : (strlen((packet)->addr.host) + 1)) /* * This is for Rgethostbyname() support for clients without access to * DNS. * FAKEIP_START is the first address in the range of "fake" IP addresses, * FAKEIP_END is the last. * There can thus be FAKEIP_END - FAKEIP_START number of fake IP addresses * supported per program. * * INADDR_NONE and INADDR_ANY may not be part of the range. */ #define FAKEIP_START 0x00000001 #define FAKEIP_END 0x000000ff #define SOCKS_V4 4 #define SOCKS_V4s "socks_v4" #define SOCKS_V4REPLY_VERSION 0 #define SOCKS_V5 5 #define SOCKS_V5s "socks_v5" #define MSPROXY_V2 2 #define MSPROXY_V2s "msproxy_v2" #define HTTP_V1_0 1 #define HTTP_V1_0s "http_v1.0" /* subnegotiation. */ #define SOCKS_UNAMEVERSION 1 /* authentication METHOD values. */ #define AUTHMETHOD_NOTSET -1 #define AUTHMETHOD_NOTSETs "notset" #define AUTHMETHOD_NONE 0 #define AUTHMETHOD_NONEs "none" #define AUTHMETHOD_GSSAPI 1 #define AUTHMETHOD_GSSAPIs "gssapi" #define AUTHMETHOD_UNAME 2 #define AUTHMETHOD_UNAMEs "username" /* X'03' to X'7F' IANA ASSIGNED */ /* X'80' to X'FE' RESERVED FOR PRIVATE METHODS */ #define AUTHMETHOD_NOACCEPT 255 #define AUTHMETHOD_NOACCEPTs "no acceptable method" /* not standard methods, must be > AUTHMETHOD_NOACCEPT. */ #define AUTHMETHOD_RFC931 (AUTHMETHOD_NOACCEPT + 1) #define AUTHMETHOD_RFC931s "rfc931" #define AUTHMETHOD_PAM (AUTHMETHOD_RFC931 + 1) #define AUTHMETHOD_PAMs "pam" #define AUTHMETHOD_MAX (AUTHMETHOD_PAM + 1) #define MAXMETHODSTRING MAX(sizeof(AUTHMETHOD_NONEs), \ MAX(sizeof(AUTHMETHOD_GSSAPIs), \ MAX(sizeof(AUTHMETHOD_UNAMEs), \ MAX(sizeof(AUTHMETHOD_RFC931s), \ sizeof(AUTHMETHOD_PAMs))))) /* number of supported methods. */ #define MAXMETHOD 1 /* NONE */ \ + 1 /* UNAME */ \ + 1 /* RFC931 */ \ + 1 /* RFC931 */ /* * Response commands/codes */ #define SOCKS_CONNECT 1 #define SOCKS_CONNECTs "connect" #define SOCKS_BIND 2 #define SOCKS_BINDs "bind" #define SOCKS_UDPASSOCIATE 3 #define SOCKS_UDPASSOCIATEs "udpassociate" /* pseudo commands */ #define SOCKS_COMMANDEND 0xff #define SOCKS_BINDREPLY (SOCKS_COMMANDEND + 1) #define SOCKS_BINDREPLYs "bindreply" #define SOCKS_UDPREPLY (SOCKS_BINDREPLY + 1) #define SOCKS_UDPREPLYs "udpreply" /* misc. stuff */ #define SOCKS_ACCEPT (SOCKS_UDPREPLY + 1) #define SOCKS_ACCEPTs "accept" #define SOCKS_DISCONNECT (SOCKS_ACCEPT + 1) #define SOCKS_DISCONNECTs "disconnect" #define SOCKS_UNKNOWN (SOCKS_DISCONNECT + 1) #define SOCKS_UNKNOWNs "unknown" /* address types */ #define SOCKS_ADDR_IPV4 0x01 /* not a socks constant but put here for convenience. */ #define SOCKS_ADDR_IFNAME 0x02 #define SOCKS_ADDR_DOMAIN 0x03 #define SOCKS_ADDR_IPV6 0x04 /* reply field values */ #define SOCKS_SUCCESS 0x00 #define SOCKS_FAILURE 0x01 #define SOCKS_NOTALLOWED 0x02 #define SOCKS_NETUNREACH 0x03 #define SOCKS_HOSTUNREACH 0x04 #define SOCKS_CONNREFUSED 0x05 #define SOCKS_TTLEXPIRED 0x06 #define SOCKS_CMD_UNSUPP 0x07 #define SOCKS_ADDR_UNSUPP 0x08 #define SOCKS_INVALID_ADDRESS 0x09 /* version 4 codes. */ #define SOCKSV4_SUCCESS 90 #define SOCKSV4_FAIL 91 #define SOCKSV4_NO_IDENTD 92 #define SOCKSV4_BAD_ID 93 /* http stuff. */ #define HTTP_SUCCESS 200 #define MSPROXY_PINGINTERVAL (6 * 60) #define MSPROXY_SUCCESS 0 #define MSPROXY_FAILURE 1 #define MSPROXY_NOTALLOWED 2 #define MSPROXY_MINLENGTH 172 /* minimum length of packet. */ #define MSPROXY_VERSION 0x00010200 /* perhaps? */ /* errors */ #define MSPROXY_ADDRINUSE 0x0701 #define MSPROXY_BIND_AUTHFAILED 0x0804 /* auth failed for connect. */ #define MSPROXY_CONNECT_AUTHFAILED 0x081e /* auth failed for bind. */ #define MSPROXY_CONNREFUSED 0x4 /* low 12 bits seem to vary. */ /* * Server seems to ignore low-order bits of a 0x47?? command, so take them * for our own use. */ #define MSPROXY_HELLO 0x0500 /* packet 1 from client. */ #define MSPROXY_HELLO_ACK 0x1000 /* packet 1 from server. */ #define MSPROXY_USERINFO 0x1000 /* packet 2 from client. */ #define MSPROXY_USERINFO_ACK 0x0400 /* packet 2 from server. */ #define MSPROXY_SOMETHING 0x4700 /* packet 3 from client. */ #define MSPROXY_SOMETHING_1_ACK 0x4714 /* packet 3 from server. */ #define MSPROXY_SOMETHING_2 0x4701 /* packet 4 from client. */ #define MSPROXY_SOMETHING_2_ACK 0x4715 /* packet 4 from server, high 8 bits seem to vary. */ #define MSPROXY_SOMETHING_2_ACK2 0x4716 /* could be this too... dunno. */ #define MSPROXY_RESOLVE 0x070d /* resolve request from client. */ #define MSPROXY_RESOLVE_ACK 0x070f /* resolved info from server. */ #define MSPROXY_BIND 0x0704 /* bind request. */ #define MSPROXY_BIND_ACK 0x0706 /* bind request accepted. */ #define MSPROXY_BIND2 0x0707 /* dunno. */ #define MSPROXY_BIND2_ACK 0x0708 /* dunno. */ #define MSPROXY_BIND2 0x0707 /* dunno. */ #define MSPROXY_BIND2_ACK 0x0708 /* dunno. */ #define MSPROXY_LISTEN 0x0406 /* listen() performed(?) */ #define MSPROXY_BINDINFO 0x0709 /* info about client server accepted*/ #define MSPROXY_BINDINFO_ACK 0x070a /* we got the info(?) */ #define MSPROXY_CONNECT 0x071e /* connect request. */ #define MSPROXY_CONNECT_ACK 0x0703 /* connect request accepted. */ #define MSPROXY_UDPASSOCIATE 0x0705 /* UDP associate request. */ #define MSPROXY_UDPASSOCIATE_ACK 0x0706 /* UDP associate request accepted. */ #define MSPROXY_CONNECTED 0x042c /* client connected to server? */ #define MSPROXY_SESSIONEND 0x251e /* maybe... */ /* flag _bits_ */ #define SOCKS_INTERFACEREQUEST 0x01 #define SOCKS_USECLIENTPORT 0x04 /* subcommands */ #define SOCKS_INTERFACEDATA 0x01 #define SOCKS_TCP 1 #define SOCKS_UDP 2 #define SOCKS_RECV 0 #define SOCKS_SEND 1 /* offsets into authentication packet */ #define AUTH_VERSION 0 /* version of method packet. */ /* request */ #define AUTH_NMETHODS 1 /* number of methods to offer. */ #define AUTH_METHODS 2 /* start of methods to offer. */ /* reply */ #define AUTH_VERSION 0 /* offset for version in reply. */ #define AUTH_METHOD 1 /* offset for selected method in reply. */ /* offsets into username/password negotiation packet */ #define UNAME_VERSION 0 #define UNAME_STATUS 1 /* XXX no IPv6 support currently. */ #define SOCKS_IPV6_ALEN 16 enum operator_t { none = 0, eq, neq, ge, le, gt, lt, range }; struct logtype_t { int type; /* type of logging (where to). */ FILE **fpv; /* if logging is to file, this is the open file.*/ char **fnamev; /* if logging is to file, name of file. */ size_t fpc; /* number of files. */ int *fplockv; /* locking of logfiles. */ int facility; /* if logging to syslog, this is the facility. */ const char *facilityname; /* if logging to syslog, name of facility. */ }; /* extensions supported by us. */ struct extension_t { unsigned bind:1; /* use bind extension? */ unsigned :0; }; /* the address part of a socks packet */ union socksaddr_t { struct in_addr ipv4; char ipv6[SOCKS_IPV6_ALEN]; char domain[MAXHOSTNAMELEN]; /* _always_ stored as C string. */ }; /* the hostspecific part of misc. things */ struct sockshost_t { unsigned char atype; union socksaddr_t addr; in_port_t port; }; struct msproxy_request_t { char username[MAXNAMELEN]; char unknown[MAXNAMELEN]; char executable[MAXNAMELEN]; char clienthost[MAXHOSTNAMELEN]; int32_t clientid; /* 1-4 */ int32_t magic25; /* 5-8 */ int32_t serverid; /* 9-12 */ unsigned char serverack; /* 13: ack of last server packet */ char pad10[3]; /* 14-16 */ unsigned char sequence; /* 17: sequence # of this packet. */ char pad11[7]; /* 18-24 */ char RWSP[4]; /* 25-28: 0x52,0x57,0x53,0x50 */ char pad15[8]; /* 29-36 */ int16_t command; /* 37-38 */ /* packet specifics start at 39. */ union { struct { char pad1[18]; /* 39-56 */ int16_t magic3; /* 57-58 */ char pad3[114]; /* 59-172 */ int16_t magic5; /* 173-174: 0x4b, 0x00 */ char pad5[2]; /* 175-176 */ int16_t magic10; /* 177-178: 0x14, 0x00 */ char pad6[2]; /* 179-180 */ int16_t magic15; /* 181-182: 0x04, 0x00 */ char pad10[6]; /* 183-188 */ int16_t magic20; /* 189-190: 0x57, 0x04 */ int16_t magic25; /* 191-192: 0x00, 0x04 */ int16_t magic30; /* 193-194: 0x01, 0x00 */ char pad20[2]; /* 195-196: 0x4a, 0x02 */ int16_t magic35; /* 197-198: 0x4a, 0x02 */ char pad30[10]; /* 199-208 */ int16_t magic40; /* 209-210: 0x30, 0x00 */ char pad40[2]; /* 211-212 */ int16_t magic45; /* 213-214: 0x44, 0x00 */ char pad45[2]; /* 215-216 */ int16_t magic50; /* 217-218: 0x39, 0x00 */ char pad50[2]; /* 219-220 */ } _1; struct { char pad1[18]; /* 39-56 */ int16_t magic3; /* 57-58 */ char pad3[114]; /* 59-172 */ int16_t magic5; /* 173-174: 0x00, 0x4b */ char pad5[2]; /* 175-176 */ int16_t magic10; /* 177-178: 0x14, 0x00 */ char pad10[2]; /* 179-180 */ int16_t magic15; /* 181-182: 0x04, 0x00 */ char pad15[6]; /* 183-188 */ int16_t magic20; /* 189-190: 0x57, 0x04 */ int16_t magic25; /* 191-192: 0x00, 0x04 */ int16_t magic30; /* 193-194: 0x01, 0x00 */ char pad20[2]; /* 195-196 */ int16_t magic35; /* 197-198: 0x04, 0x00 */ char pad25[10]; /* 199-208 */ int16_t magic50; /* 209-210: 0x30, 0x00 */ char pad50[2]; /* 211-212 */ int16_t magic55; /* 213-214: 0x44, 0x00 */ char pad55[2]; /* 215-216 */ int16_t magic60; /* 217-218: 0x39, 0x00 */ } _2; struct { char pad1[4]; /* 39-42 */ int16_t magic2; /* 43-44 */ char pad10[12]; /* 45-56 */ in_addr_t bindaddr; /* 57-60: address to bind. */ in_port_t bindport; /* 61-62: port to bind. */ char pad15[2]; /* 63-64 */ int16_t magic3; /* 65-66 */ in_port_t boundport; /* 67-68 */ char pad20[104]; /* 69-172 */ char NTLMSSP[sizeof("NTLMSSP")]; /* 173-180: "NTLMSSP" */ int16_t magic5; /* 181-182: 0x01, 0x00 */ char pad25[2]; /* 183-184 */ int16_t magic10; /* 185-186: 0x96, 0x82 */ int16_t magic15; /* 187-188: 0x08, 0x00 */ int16_t magic20; /* 189-190: 0x28, 0x00 */ char pad30[2]; /* 191-192 */ int16_t magic25; /* 193-194: 0x96, 0x82 */ int16_t magic30; /* 195-196: 0x01, 0x00 */ char pad40[12]; /* 197-208 */ int16_t magic50; /* 209-210: 0x30, 0x00 */ char pad50[6]; /* 211-216 */ int16_t magic55; /* 217-218: 0x30, 0x00 */ char pad55[2]; /* 219-220 */ } _3; struct { char pad1[4]; /* 39-42 */ int16_t magic1; /* 43-44 */ int32_t magic2; /* 45-48 */ char pad2[8]; /* 49-56 */ int16_t magic3; /* 57-58 */ char pad3[6]; /* 59-64 */ int16_t magic4; /* 65-66 */ in_port_t boundport; /* 67-68 */ char pad4[104]; /* 69-172 */ char NTLMSSP[sizeof("NTLMSSP")]; /* 173-180: "NTLMSSP" */ int16_t magic5; /* 181-182: 0x03, 0x00 */ char pad5[2]; /* 183-184 */ int16_t magic10; /* 185-186: 0x18, 0x00 */ int16_t magic15; /* 187-188: 0x18, 0x00 */ int16_t magic20; /* 189-190: 0x49, 0x00 */ char pad10[6]; /* 191-196 */ int16_t magic30; /* 197-198: 0x61, 0x00 */ char pad15[2]; /* 199-200 */ int16_t magic35; /* 201-202: 0x08, 0x00 */ int16_t magic40; /* 203-204: 0x08, 0x00 */ int16_t magic45; /* 205-206: 0x34, 0x00 */ char pad20[2]; /* 207-208 */ int16_t magic50; /* 209-210: 0x07, 0x00 */ int16_t magic55; /* 211-212: 0x07, 0x00 */ int16_t magic60; /* 213-214: 0x3c, 0x00 */ char pad25[2]; /* 215-216 */ int16_t magic65; /* 217-218: 0x06, 0x00 */ int16_t magic70; /* 219-220: 0x06, 0x00 */ int16_t magic75; /* 221-222: 0x43, 0x00 */ } _4; struct { unsigned char hostlength; /* length of host, including NUL. */ char pad1[17]; /* 39-56 */ char *host; /* 57-... */ } resolve; struct { int16_t magic1; /* 39-40 */ char pad1[4]; /* 41-45 */ int32_t magic3; /* 45-48 */ char pad5[8]; /* 48-56 */ int16_t magic6; /* 57-58: 0x0200 */ in_port_t destport; /* 59-60 */ in_addr_t destaddr; /* 61-64 */ char pad10[4]; /* 65-68 */ int16_t magic10; /* 69-70 */ char pad15[2]; /* 71-72 */ in_port_t srcport; /* 73-74: port client connects from */ char pad20[82]; /* 75-156 */ } _5; struct { int16_t magic1; /* 39-40 */ char pad5[2]; /* 41-42 */ int16_t magic5; /* 43-44 */ int32_t magic10; /* 45-48 */ char pad10[2]; /* 49-50 */ int16_t magic15; /* 51-52 */ int32_t magic16; /* 53-56 */ int16_t magic20; /* 57-58 */ in_port_t clientport; /* 59-60: forwarded port. */ in_addr_t clientaddr; /* 61-64: forwarded address. */ int32_t magic30; /* 65-68 */ int32_t magic35; /* 69-72 */ in_port_t serverport; /* 73-74: port server will connect * to us from. */ in_port_t srcport; /* 75-76: connect request; port used * on client behalf. */ in_port_t boundport; /* 77-78: bind request; port used * on client behalf. */ in_addr_t boundaddr; /* 79-82: addr used on client behalf*/ char pad30[90]; /* 83-172 */ } _6; } packet; }; struct msproxy_response_t { int32_t packetid; /* 1-4 */ int32_t magic5; /* 5-8 */ int32_t serverid; /* 9-12 */ char clientack; /* 13: ack of last client packet. */ char pad5[3]; /* 14-16 */ unsigned char sequence; /* 17: sequence # of this packet. */ char pad10[7]; /* 18-24 */ char RWSP[4]; /* 25-28: 0x52,0x57,0x53,0x50 */ char pad15[8]; /* 29-36 */ int16_t command; /* 37-38 */ union { struct { char pad5[18]; /* 39-56 */ int16_t magic20; /* 57-58: 0x02, 0x00 */ char pad10[6]; /* 59-64 */ int16_t magic30; /* 65-66: 0x74, 0x01 */ char pad15[2]; /* 67-68 */ int16_t magic35; /* 69-70: 0x0c, 0x00 */ char pad20[6]; /* 71-76 */ int16_t magic50; /* 77-78: 0x04, 0x00 */ char pad30[6]; /* 79-84 */ int16_t magic60; /* 85-86: 0x65, 0x05 */ char pad35[2]; /* 87-88 */ int16_t magic65; /* 89-90: 0x02, 0x00 */ char pad40[8]; /* 91-98 */ in_port_t udpport; /* 99-100 */ in_addr_t udpaddr; /* 101-104 */ } _1; struct { char pad5[18]; /* 39-56 */ int16_t magic5; /* 57-58: 0x01, 0x00 */ } _2; struct { char pad1[6]; /* 39-44 */ int32_t magic10; /* 45-48 */ char pad3[10]; /* 49-58 */ in_port_t boundport; /* 59-60: port server bound for us. */ in_addr_t boundaddr; /* 61-64: addr server bound for us. */ char pad10[4]; /* 65-68 */ int16_t magic15; /* 69-70 */ char pad15[102]; /* 70-172 */ char NTLMSSP[sizeof("NTLMSSP")]; /* 173-180: "NTLMSSP" */ int16_t magic50; /* 181-182: 0x02, 0x00 */ char pad50[2]; /* 183-184 */ int16_t magic55; /* 185-186: 0x08, 0x00 */ int16_t magic60; /* 187-188: 0x08, 0x00 */ int16_t magic65; /* 189-190: 0x28, 0x00 */ char pad60[2]; /* 191-192 */ int16_t magic70; /* 193-194: 0x96, 0x82 */ int16_t magic75; /* 195-196: 0x01, 0x00 */ char pad70[16]; /* 197-212 */ char ntdomain[257]; /* 213-EOP */ } _3; struct { char pad5[134]; /* 39-172 */ } _4; struct { unsigned char addroffset; /* 39: weird, probably wrong. */ char pad5[13]; /* 40-52 */ in_addr_t hostaddr; /* ?-?+4 */ } resolve; struct { int16_t magic1; /* 39-40 */ char pad5[18]; /* 41-58 */ in_port_t clientport; /* 59-60: forwarded port. */ in_addr_t clientaddr; /* 61-64: forwarded address. */ int32_t magic10; /* 65-68 */ int32_t magic15; /* 69-72 */ in_port_t serverport; /* 73-74: port server will connect * to us from. */ in_port_t srcport; /* 75-76: connect request; port used * on client behalf. */ in_port_t boundport; /* 77-78: bind request; port used * on client behalf. */ in_addr_t boundaddr; /* 79-82: addr used on client behalf*/ char pad10[90]; /* 83-172 */ } _5; } packet; }; struct request_t { unsigned char version; unsigned char command; unsigned char flag; struct sockshost_t host; struct authmethod_t *auth; /* pointer to level above. */ }; struct response_t { unsigned char version; unsigned char reply; unsigned char flag; struct sockshost_t host; struct authmethod_t *auth; /* pointer to level above. */ }; /* encapsulation for UDP packets. */ struct udpheader_t { unsigned char flag[2]; unsigned char frag; struct sockshost_t host; }; /* method username */ struct authmethod_uname_t { unsigned char version; unsigned char name[MAXNAMELEN]; unsigned char password[MAXPWLEN]; }; /* method rfc931 */ struct authmethod_rfc931_t { unsigned char name[MAXNAMELEN]; }; /* method pam. */ struct authmethod_pam_t { char servicename[MAXNAMELEN]; /* servicename to use with pam. */ unsigned char name[MAXNAMELEN]; unsigned char password[MAXPWLEN]; }; /* this must be big enough to hold a complete method request. */ struct authmethod_t { int method; /* method in use. */ int methodv[MAXMETHOD]; /* methods somewhere matched. */ size_t methodc; /* number of methods matched. */ int badmethodv[MAXMETHOD];/* methods not matched. */ size_t badmethodc; /* number of methods not matched.*/ union { struct authmethod_uname_t uname; struct authmethod_rfc931_t rfc931; struct authmethod_pam_t pam; } mdata; }; struct protocol_t { unsigned tcp:1; unsigned udp:1; unsigned :0; }; struct command_t { unsigned bind:1; unsigned connect:1; unsigned udpassociate:1; /* not real commands as per standard, but they have their use. */ unsigned bindreply:1; /* reply to bind command. */ unsigned udpreply:1; /* reply to UDP packet. */ unsigned :0; }; struct proxyprotocol_t { unsigned socks_v4:1; unsigned socks_v5:1; unsigned msproxy_v2:1; unsigned http_v1_0:1; unsigned :0; }; struct msproxy_state_t { struct sockaddr_in controladdr; /* UDP address of proxyserver. */ int32_t magic25; int32_t bindid; int32_t clientid; int32_t serverid; unsigned char seq_recv; /* seq number of last packet recv. */ unsigned char seq_sent; /* seq number of last packet sent. */ }; /* values in parentheses designate "don't care" values. */ struct socksstate_t { int acceptpending; /* a accept pending? (-1) */ struct authmethod_t auth; /* authentication in use. */ int command; /* command (-1) */ int err; /* if request failed, errno. */ int inprogress; /* operation in progress? (-1) */ #ifdef SOCKS_TRYHARDER int lock; /* some calls require a lock. */ #endif struct msproxy_state_t msproxy; /* if msproxy, msproxy state. */ struct protocol_t protocol; /* protocol in use. */ unsigned udpconnect:1; /* connected UDP socket? */ int system; /* don't check, use system call. */ int version; /* version (-1) */ }; struct ruleaddress_t { char atype; union { char domain[MAXHOSTNAMELEN]; char ifname[MAXIFNAMELEN]; struct { struct in_addr ip; struct in_addr mask; } ipv4; } addr; struct { in_port_t tcp; /* TCP portstart or field to operator on. */ in_port_t udp; /* UDP portstart or field to operator on. */ } port; in_port_t portend; /* only used if operator is range. */ enum operator_t operator; /* operator to compare ports via. */ }; struct serverstate_t { struct command_t command; struct extension_t extension; struct protocol_t protocol; int methodv[MAXMETHOD]; /* methods to offer. */ size_t methodc; /* number of methods set. */ struct proxyprotocol_t proxyprotocol; }; struct gateway_t { struct sockshost_t host; struct serverstate_t state; }; struct socks_t { unsigned char version; /* * Negotiated version. Each request and * response will also contain a version number, that * is the version number given for that particular * packet and should be checked to make sure it is * the same as the negotiated version. */ struct request_t req; struct response_t res; struct authmethod_t auth; struct gateway_t gw; struct socksstate_t state; }; enum portcmp { e_lt, e_gt, e_eq, e_neq, e_le, e_ge, e_nil }; /* * for use in generic functions that take either reply or request * packets, include a field indicating what it is. */ #define SOCKS_REQUEST 0x1 #define SOCKS_RESPONSE 0x2 struct socksfd_t { unsigned allocated:1;/* allocated? */ int control; /* control connection to server. */ struct socksstate_t state; /* state of this connection. */ unsigned :0; struct sockaddr local; /* local address of data connection. */ unsigned :0; struct sockaddr server; /* remote address of data connection. */ unsigned :0; struct sockaddr remote; /* address server is using on our behalf. */ unsigned :0; struct sockaddr reply; /* address to expect reply from. */ unsigned :0; union { struct sockaddr accepted; /* address server accepted for us. */ struct sockaddr connected; /* address server connected to for us. */ } forus; struct route_t *route; }; struct route_t { int number; /* routenumber. */ struct { unsigned bad:1; /* route is bad? */ time_t badtime; /* if route is bad, time it was marked as such. */ unsigned direct:1; /* direct connection, no proxy. */ unsigned :0; } state; struct ruleaddress_t src; struct ruleaddress_t dst; struct gateway_t gw; struct route_t *next; /* next route in list. */ }; __BEGIN_DECLS /* * versions of BSD's error functions that log via slog() instead. */ #ifdef STDC_HEADERS void serr(int eval, const char *fmt, ...) #else void serr() #endif /* STDC_HEADERS */ __attribute__ ((format (__printf__, 2, 3))); #ifdef STDC_HEADERS void serrx(int eval, const char *fmt, ...) #else void serrx() #endif /* STDC_HEADERS */ __attribute__ ((format (__printf__, 2, 3))); #ifdef STDC_HEADERS void swarn(const char *fmt, ...) #else void swarn() #endif /* STDC_HEADERS */ __attribute__ ((format (__printf__, 1, 2))); #ifdef STDC_HEADERS void swarnx(const char *fmt, ...) #else void swarnx() #endif /* STDC_HEADERS */ __attribute__ ((format (__printf__, 1, 2))); void genericinit __P((void)); /* * Generic init, called after clientinit()/serverinit(). */ void newprocinit __P((void)); /* * After a new process is started/forked, this function should * be called. It will initialize various things, open needed * descriptors, etc. and can be called as many times as wanted. */ struct udpheader_t * sockaddr2udpheader __P((const struct sockaddr *to, struct udpheader_t *header)); /* * Writes a udpheader representation of "to" to "header". * Returns a pointer to "header". */ char * udpheader_add __P((const struct sockshost_t *host, char *msg, size_t *len, size_t msgsize)); /* * Prefixes the udpheader_t version of "host" to a copy of "msg", * which is of length "len". * "msgsize" gives the size of the memory pointed to by "msg". * If "msgsize" is large enough the function will prepend the udpheader * to "msg" directly (moving the old contents to the right) rather than * allocating new memory. * Upon return "len" gives the length of the new "msg". * * Returns: * On success: "msg" with the udpheader prepended. * On failure: NULL (out of memory). */ int socks_socketisbound __P((int s)); /* * Returns: * If "s" is bound: 1 * If "s" is not bound: 0 * If "s" is not socket or error occurred determining if bound: -1 */ int fdisopen __P((int fd)); /* * returns 1 if the filedescriptor "fd" currently references a open object. * returns 0 otherwise. */ void closev __P((int *array, int count)); /* * Goes through "array", which contains "count" elements. * Each element that does not have a negative value is closed. */ int socks_logmatch __P((unsigned int d, const struct logtype_t *log)); /* * Returns true if "d" is a descriptor matching any descriptor in "log". * Returns false otherwise. */ struct sockaddr * sockshost2sockaddr __P((const struct sockshost_t *shost, struct sockaddr *addr)); /* * Converts the sockshost_t "shost" to a sockaddr struct and stores it * in "addr". * Returns: "addr". */ struct sockaddr * fakesockshost2sockaddr __P((const struct sockshost_t *host, struct sockaddr *addr)); /* * Like sockshost2sockaddr(), but checks whether the address in * "host" is fake when converting. */ struct sockshost_t * sockaddr2sockshost __P((const struct sockaddr *addr, struct sockshost_t *host)); /* * Converts the sockaddr struct "shost" to a sockshost_t struct and stores it * in "host". * Returns: "host". */ struct sockshost_t * ruleaddress2sockshost __P((const struct ruleaddress_t *address, struct sockshost_t *host, int protocol)); /* * Converts the ruleaddress_t "address" to a sockshost_t struct and stores it * in "host". * Returns: "host". */ struct ruleaddress_t * sockshost2ruleaddress __P((const struct sockshost_t *host, struct ruleaddress_t *addr)); /* * Converts the sockshost_t "host" to a ruleaddress_t struct and stores it * in "addr". * Returns: "addr". */ struct ruleaddress_t * sockaddr2ruleaddress __P((const struct sockaddr *addr, struct ruleaddress_t *ruleaddr)); /* * Converts the struct sockaddr "addr" to a ruleaddress_t struct and stores * it in "ruleaddr". * Returns: "addr". */ struct sockaddr * hostname2sockaddr __P((const char *name, int index, struct sockaddr *addr)); /* * Retrieves the address with index "index" for the hostname named "name". * Returns: * On success: "addr", filled in with the address found. * On failure: NULL (no address found). */ struct sockaddr * ifname2sockaddr __P((const char *ifname, int index, struct sockaddr *addr)); /* * Retrieves the address with index "index" on the interface named "ifname". * Returns: * On success: "addr", filled in with the address found. * On failure: NULL (no address found). */ int sockatmark __P((int s)); /* * If "s" is at oob mark, return 1, otherwise 0. * Returns -1 if a error occurred. */ ssize_t recvmsgn __P((int s, struct msghdr *msg, int flags)); /* * Like recvmsg(), but tries to read until all has been read. */ ssize_t sendmsgn __P((int s, const struct msghdr *msg, int flags)); /* * Like sendmsg(), but tries to send until all has been sent. */ ssize_t readn __P((int, void *, size_t, struct authmethod_t *auth)); /* * Like read() but retries and takes an additional "auth" argument * to be used if not NULL. */ ssize_t writen __P((int, const void *, size_t, struct authmethod_t *auth)); /* * like write() but retries and takes an additional "auth" argument * to be used if not NULL. */ ssize_t socks_recvfrom __P((int, void *, size_t, int, struct sockaddr *, socklen_t *, struct authmethod_t *auth)); /* * Like recvfrom(), but with an additional auth argument to be used * if not NULL. */ ssize_t socks_sendto __P((int, const void *, size_t, int, const struct sockaddr *, socklen_t, struct authmethod_t *auth)); /* * Like sendto(), but with an additional auth argument to be used * if not NULL. */ int closen __P((int)); /* * Wrapper around close(). Retries on EINTR. */ int selectn __P((int, fd_set *, fd_set *, fd_set *, struct timeval *)); /* * Wrapper around select(). Retries on EINTR. */ int acceptn __P((int, struct sockaddr *, socklen_t *)); /* * Wrapper around accept(). Retries on EINTR. */ #ifdef STDC_HEADERS int snprintfn(char *str, size_t size, const char *format, ...); #else int snprintfn(); #endif /* * Wrapper around snprintf() for consistent behaviour, same as system * snprintf() but the following are also enforced: * returns 0 instead of -1 (rawterminates *str). * never returns a value greater than size - 1. */ const char * strcheck __P((const char *string)); /* * Checks "string". If it is NULL, returns a string indicating memory * exhausted, if not, returns the same string it was passed. */ unsigned char * sockshost2mem __P((const struct sockshost_t *host, unsigned char *mem, int version)); /* * Writes "host" out to "mem". The caller must make sure "mem" * is big enough to hold the contents of "host". * "version" gives the socks version "host" is to be written out in. * Returns a pointer to one element past the last byte written to "mem". */ const unsigned char * mem2sockshost __P((struct sockshost_t *host, const unsigned char *mem, size_t len, int version)); /* * Writes "mem", which is assumed to be a sockshost string * of version "version" in network order, out to "host". * Returns: * On success: pointer to one element past last byte used of mem * and fills in "host" appropriately. * On failure: NULL ("mem" is not a valid sockshost.) */ #ifdef STDC_HEADERS void slog(int priority, const char *fmt, ...) #else void slog() #endif /* STDC_HEADERS */ __attribute__ ((format (__printf__, 2, 3))); /* * Logs message "fmt" at priority "priority" to previously configured * outputdevice. * Checks settings and ignores message if it's of to low a priority. */ #ifdef STDC_HEADERS void vslog(int priority, const char *fmt, va_list ap); #else void vslog(); #endif /* STDC_HEADERS */ /* * Same as slog() but assumes varargs/stdargs have already processed * the arguments. */ int readconfig __P((const char *filename)); /* * Parses the config stored in in the filename "filename". * Returns: * On success: 0. * On failure: -1. */ #ifdef STDC_HEADERS void yywarn (const char *fmt, ...) #else void yywarn() #endif /* STDC_HEADERS */ __attribute__ ((format (__printf__, 1, 2))); /* * Report a error related to (configfile) parsing. */ #ifdef STDC_HEADERS void yyerror (const char *fmt, ...) #else void yyerror() #endif /* STDC_HEADERS */ __attribute__ ((format (__printf__, 1, 2))); /* * Report a error related to (configfile) parsing and exit. */ int addressmatch __P((const struct ruleaddress_t *rule, const struct sockshost_t *address, int protocol, int ipalias)); /* * Tries to match "address" against "rule". "address" is resolved * if necessary. "address" supports the wildcard INADDR_ANY and port of 0. * "protocol" is the protocol to compare under. * If "ipalias" is true, the function will try to match any IP alias * "address"'s might have if appropriate, this can be useful to match * multihomed hosts where the client requests e.g a bind connection. * Returns true if "rule" matched "address". */ struct hostent * hostentdup __P((const struct hostent *hostent)); /* * Duplicates "hostent". * Returns: * On success: a pointer to the duplicated hostent. * On failure: NULL. */ void hostentfree __P((struct hostent *hostent)); /* * Free's all resourced used by "hostent", including "hostent" * itself. If "hostent" is NULL, nothing is done. */ int socks_connect __P((int s, const struct sockshost_t *host)); /* * Tries to connect to "host". If "host"'s address is not a IP address, * the function also tries to connect to any alias for "host"'s * name. The connection is done using the open descriptor "s". * Returns: * On success: 0 * On failure: -1 */ struct route_t * socks_connectroute __P((int s, struct socks_t *packet, const struct sockshost_t *src, const struct sockshost_t *dst)); /* * Finds a route from "src" to "dst" and connects to it "s". * If src or dst is NULL, that argument is ignored. * * The route used may take into account the contents of "packet->req", * which is assumed to be the packet that will be sent to a socksserver, * so it is recommended that it's contents be as conservative as possible. * * When it has successfully connected to a gateway it will set * the packet->method members to point to the methods the gateway * should be offered. * * Returns: * On success: the route that was used. * On failure: NULL. See errno for reason. 0 means no route exists. */ struct request_t * socks_requestpolish __P((struct request_t *req, const struct sockshost_t *src, const struct sockshost_t *dst)); /* * Tries to "polish" the request "req" so that a later socks_getroute() * will succeed. * Returns: * On success: "req". * On failure: NULL. */ void showstate __P((const struct serverstate_t *state)); /* * Shows "state". */ void showmethod __P((size_t methodc, const int *methodv)); /* * Shows "methodv". */ struct route_t * addroute __P((const struct route_t *route)); /* * Appends a copy of "route" to our list of routes. * Returns a pointer to the added route. */ void showroute __P((const struct route_t *route)); /* * prints the route "route". */ struct route_t * socks_getroute __P((const struct request_t *req, const struct sockshost_t *src, const struct sockshost_t *dst)); /* * Tries to find a route to be used for a connection going from * "src" to "dst". * If src or dst is NULL, that argument is ignored. * * The route used may take into account the contents of "req", which is * assumed to be the packet that will be sent to a socksserver, so it is * recommended that it's contents be as conservative as possible. * * Returns: * On success: pointer to route that should be used. * On failure: NULL (no socks route found). */ unsigned char sockscode __P((int version, int code)); /* * Maps the socks replycode "code", which is in non-version specific format, * to the equivalent replycode in version "version". */ unsigned char errno2reply __P((int errnum, int version)); /* * Returns the socks version "version" reply code for a error of type "errno". */ char * str2vis __P((const char *string, size_t len)); /* * Visually encodes exactly "len" chars of "string". * Returns: * On success: the visually encoded string, to be free()'ed by caller. * On failure: NULL. (out of memory). */ in_addr_t socks_addfakeip __P((const char *name)); /* * Adds "name" to a internal table indexed by (fake)IP addresses. * Returns: * On success: "name"'s index. * On failure: INADDR_NONE */ const char * socks_getfakehost __P((in_addr_t addr)); /* * If "addr" is a "fake" (non-resolved) addr, it returns the name * corresponding to it. * Else, NULL is returned. */ int socks_getfakeip __P((const char *host, struct in_addr *addr)); /* * If "host" has a fake address entry, the address is written into * "addr". * Returns: * If a fake address exits: 1 * Else: 0 */ struct sockshost_t * fakesockaddr2sockshost __P((const struct sockaddr *addr, struct sockshost_t *host)); /* * Identical to sockaddr2sockshost, but checks whether * the address in "addr" is a "fake" one when converting. */ int sockaddrareeq __P((const struct sockaddr *a, const struct sockaddr *b)); /* * Compares the address "a" against "b". * Returns: * If "a" and "b" are equal: true * else: false */ int sockshostareeq __P((const struct sockshost_t *a, const struct sockshost_t *b)); /* * Compares the address "a" against "b". * Returns: * If "a" and "b" are equal: true * else: false */ int fdsetop __P((int nfds, int op, const fd_set *a, const fd_set *b, fd_set *result)); /* * Performs operation on descriptor sets. * "nfds" is the number of descriptors to perform "op" on in the sets * "a" and "b". * "op" is the operation to be performed on the descriptor sets and * can take on the value of standard C bitwise operators. * The result of the operation is stored in "result". * * Returns the number of the highest descriptor set in "result". * NOTES: * Operators supported is: AND ('&') and XOR ('^') */ int methodisset __P((int method, const int *methodv, size_t methodc)); /* * Returns true if the method "method" is set in "methodv", false otherwise. * "methodc" is the length of "methodv". */ int socketoptdup __P((int s)); /* * Duplicates the settings of "s" and returns a new socket with the * same settings. * Returns: * On success: the descriptor for the new socket * On failure: -1 */ int socks_mklock __P((const char *template)); /* * Creates a filedescriptor that can be used with socks_lock() and * socks_unlock(). * Returns: * On success: filedescriptor * On failure: -1 */ int socks_lock __P((int fd, int type, int timeout)); /* * Looks the filedescriptor "fd". * "type" is the type of lock; F_RDLCK or F_WRLCK. * "timeout" is how long to wait for lock, supported values: * -1: forever. * 0 : don't wait. * Returns: * On success: 0 * On error : -1 */ void socks_unlock __P((int d)); /* * Unlocks the filedescriptor "d", previously locked by this process. */ int bitcount __P((unsigned long number)); /* * Returns the number of bits set in "number". */ #if SOCKSLIBRARY_DYNAMIC struct hostent *sys_gethostbyaddr __P((const char *addr, int len, int af)); struct hostent *sys_gethostbyname __P((const char *)); struct hostent *sys_gethostbyname2 __P((const char *, int)); #if HAVE_GETADDRINFO int sys_getaddrinfo __P((const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res)); #endif /* HAVE_GETADDRINFO */ #if HAVE_GETIPNODEBYNAME struct hostent *sys_getipnodebyname __P((const char *name, int af, int flags, int *error_num)); #endif /* HAVE_GETIPNODEBYNAME */ #endif /* SOCKSLIBRARY_DYNAMIC */ #if defined(DEBUG) || HAVE_SOLARIS_BUGS int freedescriptors __P((const char *message)); /* * Returns the number on unallocated descriptors. */ #endif /* DEBUG) || HAVE_SOLARIS_BUGS */ #ifdef DEBUG int fd_isset __P((int fd, fd_set *fdset)); /* function version of FD_ISSET() */ #endif /* DEBUG */ /* replacements */ #if !HAVE_DAEMON int daemon __P((int, int)); #endif /* !HAVE_DAEMON */ #if !HAVE_GETDTABLESIZE /* return upper limit on per-process open file descriptors */ int getdtablesize __P((void)); #endif /* !HAVE_GETDTABLESIZE */ #if !HAVE_VSNPRINTF # ifdef STDC_HEADERS int snprintf __P((char *, size_t, char const *, ...)); # else int snprintf (); # endif /* STDC_HEADERS */ int vsnprintf __P((char *, size_t, const char *, va_list)); #endif /* !HAVE_VSNPRINTF */ #if !HAVE_SETPROCTITLE #ifdef STDC_HEADERS void setproctitle __P((const char *fmt, ...)) __attribute__ ((format (__printf__, 1, 2))); int initsetproctitle __P((int, char **, char **)); #else void setproctitle() __attribute__ ((format (__printf__, 1, 2))); int initsetproctitle __P((int, char **, char **)); #endif /* STDC_HEADERS */ #endif /* !HAVE_SETPROCTITLE */ #if !HAVE_SOCKATMARK int sockatmark __P((int)); #endif /* !HAVE_SOCKATMARK */ #if !HAVE_INET_ATON int inet_aton __P((register const char *cp, struct in_addr *addr)); #endif /* ! HAVE_ATON */ #if !HAVE_GETDTABLESIZE int getdtablesize __P((void)); #endif /* ! HAVE_GETDTABLESIZE */ #if !HAVE_STRERROR char *__strerror __P((int, char *)); char *strerror __P((int)); const char *hstrerror __P((int)); #endif /* !HAVE_STRERROR */ #if !HAVE_MEMMOVE void * memmove __P((void *, const void *, register size_t)); #endif /* !HAVE_MEMMOVE */ #if !HAVE_INET_PTON int inet_pton __P((int af, const char *src, void *dst)); #endif #if !HAVE_ISSETUGID int issetugid __P((void)); #endif /* !HAVE_ISSETUGID */ #if !HAVE_VSYSLOG void vsyslog __P((int, const char *, va_list)); #endif /* !HAVE_VSYSLOG */ #if !HAVE_GETIFADDRS int getifaddrs __P((struct ifaddrs **)); void freeifaddrs __P((struct ifaddrs *)); #endif /* !HAVE_GETIFADDRS */ struct passwd * socks_getpwnam __P((const char *login)); /* * Like getpwnam() but works around sysv bug, tries to get the shadow * password too. */ int msproxy_negotiate __P((int s, int control, struct socks_t *packet)); /* * Negotiates with the msproxy server connected to "control". * "s" gives the socket to be used for dataflow. * "packet" contains the request and on return from the function * contains the response. * Returns: * On success: 0 (server replied to our request). * On failure: -1 */ int send_msprequest __P((int s, struct msproxy_state_t *state, struct msproxy_request_t *packet)); /* * Sends a msproxy request to "s". * "state" is the current state of the connection to "s", * "packet" is the request to send. */ int recv_mspresponse __P((int s, struct msproxy_state_t *state, struct msproxy_response_t *packet)); /* * Receives a msproxy response from "s". * "state" is the current state of the connection to "s", * "packet" is the memory the response is read into. */ int msproxy_sigio __P((int s)); /* * Must be called on sockets where we expect the connection to be forwarded * by the msproxy server. * "s" is the socket and must have been added with socks_addaddr() beforehand. * Returns: * On success: 0 * On failure: -1 */ int msproxy_init __P((void)); /* * inits things for using a msproxyserver. * On success: 0 * On failure: -1 */ int httpproxy_negotiate __P((int control, struct socks_t *packet)); /* * Negotiates a method to be used when talking with the server connected * to "s". "packet" is the packet that will later be sent to server. * packet->res.reply will be set depending on the result of negotiation. * Returns: * On success: 0 (server accepted our request). * On failure: -1. */ int socks_negotiate __P((int s, int control, struct socks_t *packet, struct route_t *route)); /* * "s" is the socket data will flow over. * "control" is the control connection to the socks server. * "packet" is a socks packet containing the request. * "route" is the connected route. * Negotiates method and fills the response to the request into packet->res. * Returns: * On success: 0 (server replied to our request). * On failure: -1. */ int serverreplyisok __P((int version, int reply, struct route_t *route)); /* * "replycode" is the reply code returned by a socksserver of version * "version". * "route" is the route that was used for the socksserver. If * the errorcode indicates a serverfailure, it might be "badrouted". * Returns true if the reply indicates request succeeded, false otherwise * and sets errno accordingly. */ struct route_t * socks_nbconnectroute __P((int s, int control, struct socks_t *packet, const struct sockshost_t *src, const struct sockshost_t *dst)); /* * The non-blocking version of socks_connectroute(), only used by client. * Takes one additional argument, "s", which is the socket to connect * and not necessarily the same as "control" (msproxy case). */ void socks_badroute __P((struct route_t *route)); /* * Marks route "route" as bad. */ int negotiate_method __P((int s, struct socks_t *packet)); /* * Negotiates a method to be used when talking with the server connected * to "s". "packet" is the packet that will later be sent to server, * only the "auth" element in it will be set but other elements are needed * too. * Returns: * On success: 0 * On failure: -1 */ int clientmethod_uname __P((int s, const struct sockshost_t *host, int version, unsigned char *name, unsigned char *password)); /* * Enters username/password negotiation with the socksserver connected to * the socket "s". * "host" gives the name of the server. * "version" gives the socksversion established to use. * "name", if not NULL, gives the name to use for authenticating. * "password", if not NULL, gives the name to use for authenticating. * Returns: * On success: 0 * On failure: whatever the remote socksserver returned as status. */ void checkmodule __P((const char *name)); /* * Checks that the system has the module "name" and permission to use it. * Aborts with a errormessage if not. */ int socks_yyparse __P((void)); int socks_yylex __P((void)); __END_DECLS #if SOCKSLIBRARY_DYNAMIC #include "interposition.h" #endif /* SOCKSLIBRARY_DYNAMIC */ /* XXX */ #if defined(SOCKS_CLIENT) || defined(SOCKS_SERVER) #if SOCKS_CLIENT #include "socks.h" #endif #if SOCKS_SERVER #include "sockd.h" #endif /* SOCKS_CLIENT */ #endif /* SOCKS_CLIENT || SOCKS_SERVER */ #include "tostring.h" dante-1.1.19.dfsg/include/config.h0000644000175000017500000002006110354742702015342 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ /* $Id: config.h,v 1.52 2005/12/25 13:58:10 michaels Exp $ */ #ifndef _CONFIG_H_ #define _CONFIG_H_ #endif /* * Everything in this file is put here so you can change it to suit * your particular installation. You should not need to change * any other files. * * Several of the variables can have a big impact on performance, * latency and throughput. Tuning the server to the optimum for * your particular environment might be difficult but hopefully * the defaults as set in this file will provide a adequate * compromise. Should you wish for more optimum tuning, you * might want to look at the SUPPORT file coming with Dante. */ /* * client/server stuff. */ /* * default client/server lockfile (put in $TMPDIR, or /tmp). * Put this on a fast, low-latency fs, under /tmp is usually good. */ #define SOCKS_LOCKFILE "./sockslockXXXXXXXXXX" /* if profiling is enabled, directory to store profile files in. */ #define SOCKS_PROFILEDIR "./.prof" /* * client stuff. */ /* default client config file. */ #if !HAVE_SOCKS_CONFIGFILE #define SOCKS_CONFIGFILE "/etc/socks.conf" #else #define SOCKS_CONFIGFILE HAVE_ALT_SOCKS_CONFIGFILE #endif /* !HAVE_SOCKS_CONFIGFILE */ /* * if we mark a route/socksserver as bad, how many seconds to wait * until we expire the badmarking so it will be tried again for new * connections. * A value of zero means never. */ #if SOCKS_CLIENT #define BADROUTE_EXPIRE (60 * 0) #else /* SOCKS_SERVER */ #define BADROUTE_EXPIRE (60 * 5) #endif /* * server stuff. */ /* * If we are compiling with libwrap support, this sets the maximum * linelength for a libwrap line. Should be the same or less as the * one libwrap uses internally, but we don't have access to that size. */ #if HAVE_LIBWRAP #define LIBWRAPBUF 80 #endif /* HAVE_LIBWRAP */ /* * Name to give as servicename when starting pam for rules that don't * set it. */ #define DEFAULT_PAMSERVICENAME "sockd" /* * used only if no usable system call is found (getdtablesize()/sysconf()). * If you are missing the system calls, but know what the value should * be for max open files per process on your system, you should set * this define to the correct value. */ #define SOCKS_FD_MAX 64 /* * The file the server will write it's process id to. * Note that this file should be in a restricted directory. */ #if !HAVE_SOCKD_PIDFILE #define SOCKD_PIDFILE "/var/run/sockd.pid" #else #define SOCKD_PIDFILE HAVE_ALT_SOCKD_PIDFILE #endif /* !HAVE_SOCKD_PIDFILE */ /* default port for server to listen on. */ #define SOCKD_PORT 1080 /* default server configfile */ #if !HAVE_SOCKD_CONFIGFILE #define SOCKD_CONFIGFILE "/etc/sockd.conf" #else #define SOCKD_CONFIGFILE HAVE_ALT_SOCKD_CONFIGFILE #endif /* !HAVE_SOCKD_CONFIGFILE */ /* max number of clients pending to server (argument to listen()). * The Apache people say: * It defaults to 511 instead of 512 because some systems store it * as an 8-bit datatype; 512 truncated to 8-bits is 0, while 511 is * 255 when truncated. */ #define SOCKD_MAXCLIENTQUE 511 /* * We try to cache resolved hostnames and addresses. The following * values affect this. */ /* cacheentries we should allocate for caching hostnames. */ #define SOCKD_HOSTCACHE 512 /* cacheentries we should allocate for caching addresses. */ #define SOCKD_ADDRESSCACHE 512 /* seconds a cacheentry is to be considered valid, don't set below 1. */ #define SOCKD_CACHETIMEOUT 3600 /* print some statistics for every SOCKD_CACHESTAT lookup. 0 to disable. */ #define SOCKD_CACHESTAT 0 /* * number of seconds a client can negotiate with server. * Can be changed in configfile. */ #define SOCKD_NEGOTIATETIMEOUT 120 /* * number of seconds a client can be connected after negotiation is completed * without sending/receiving any data. Can be changed in configfile. */ #define SOCKD_IOTIMEOUT 86400 /* * Number of slots to try and keep available for new clients at any given time. * The server tries to be a little more intelligent about this, but not much. */ #define SOCKD_FREESLOTS 4 /* * Dante supports one process handling N clients, where the max value for * 'N' is limited by your system. There will be a degradation in * performance as N increases, the biggest hop being from one to two, * but significantly less resources/processes might be used on the machine * the Dante server is running on. * * There are two defines that govern this; SOCKD_NEGOTIATEMAX and SOCKD_IOMAX. * Note that these are per process basis, Dante will automatically create as * many processes as it thinks it needs as it goes along. */ /* * max number of clients each negotiate process will handle. * You can probably set this to a big number. * Each client will occupy one descriptor. */ #if DEBUG #define SOCKD_NEGOTIATEMAX 2 #else #define SOCKD_NEGOTIATEMAX 24 #endif /* DEBUG */ /* * max number of clients each i/o process will handle. * Each client will occupy up to three descriptors. * While shortage of slots in the other processes will create a * delay for the client, shortage of i/o slots will prevent the client * from doing any i/o untill a i/o slot has become available. It is * therefore important that enough i/o slots are available at all times. */ #if DEBUG #define SOCKD_IOMAX 2 #else #define SOCKD_IOMAX 8 #endif /* DEBUG */ /* server buffersize for network i/o using TCP. */ #define SOCKD_BUFSIZETCP (1024 * 16) /* server buffersize for network i/o using UDP. */ #define SOCKD_BUFSIZEUDP (1024 * 16) /* * skew watermarks by this factor compared to "optimal". * Setting it to one minimises cputime used by the server at a * possibly big cost in performance. Never set it to more than one. * I'd be interested in hearing peoples result with this. */ #define LOWATSKEW (0.75) /* * For systems that do not have the "low watermarks" socket option. * It is important not to set it to too high a value as that will * probably degrade performance for clients even more, causing starvation. * Basicly; low value -> better interactive performance, * high value -> better throughput. */ #if !HAVE_SO_SNDLOWAT #define SO_SNDLOWAT_SIZE (1024 * 4) #endif dante-1.1.19.dfsg/include/interposition.h0000644000175000017500000002673410065300434017007 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ /* $Id: interposition.h,v 1.38 2004/06/20 12:20:44 karls Exp $ */ #ifndef LIBRARY_PATH #define LIBRARY_PATH "" #endif #if HAVE_NO_SYMBOL_UNDERSCORE #define SYMBOL_ACCEPT "accept" #define SYMBOL_BIND "bind" #define SYMBOL_BINDRESVPORT "bindresvport" #define SYMBOL_CONNECT "connect" #define SYMBOL_GETHOSTBYADDR "gethostbyaddr" #define SYMBOL_GETHOSTBYNAME "gethostbyname" #define SYMBOL_GETHOSTBYNAME2 "gethostbyname2" #define SYMBOL_GETADDRINFO "getaddrinfo" #define SYMBOL_GETIPNODEBYNAME "getipnodebyname" #define SYMBOL_FREEHOSTENT "freehostent" #define SYMBOL_GETPEERNAME "getpeername" #define SYMBOL_GETSOCKNAME "getsockname" #define SYMBOL_READ "read" #define SYMBOL_READV "readv" #define SYMBOL_RECV "recv" #define SYMBOL_RECVFROM "recvfrom" #define SYMBOL_RECVMSG "recvmsg" #define SYMBOL_RRESVPORT "rresvport" #define SYMBOL_SEND "send" #define SYMBOL_SENDMSG "sendmsg" #define SYMBOL_SENDTO "sendto" #define SYMBOL_WRITE "write" #define SYMBOL_WRITEV "writev" #endif /* HAVE_NO_SYMBOL_UNDERSCORE */ /* XXX */ #ifndef LIBRARY_LIBC #define LIBRARY_LIBC __CONCAT(LIBRARY_PATH, "libc.so") #endif #ifndef SYMBOL_ACCEPT #define SYMBOL_ACCEPT "_accept" #endif #ifndef LIBRARY_ACCEPT #define LIBRARY_ACCEPT LIBRARY_LIBC #endif #ifndef SYMBOL_BIND #define SYMBOL_BIND "_bind" #endif #ifndef LIBRARY_BIND #define LIBRARY_BIND LIBRARY_LIBC #endif #ifndef SYMBOL_BINDRESVPORT #define SYMBOL_BINDRESVPORT "_bindresvport" #endif #ifndef LIBRARY_BINDRESVPORT #define LIBRARY_BINDRESVPORT LIBRARY_LIBC #endif #ifndef SYMBOL_CONNECT #define SYMBOL_CONNECT "_connect" #endif #ifndef LIBRARY_CONNECT #define LIBRARY_CONNECT LIBRARY_LIBC #endif #ifndef SYMBOL_GETHOSTBYADDR #define SYMBOL_GETHOSTBYADDR "_gethostbyaddr" #endif #ifndef LIBRARY_GETHOSTBYADDR #define LIBRARY_GETHOSTBYADDR LIBRARY_LIBC #endif #ifndef SYMBOL_GETHOSTBYNAME #define SYMBOL_GETHOSTBYNAME "_gethostbyname" #endif #ifndef LIBRARY_GETHOSTBYNAME #define LIBRARY_GETHOSTBYNAME LIBRARY_LIBC #endif #ifndef SYMBOL_GETHOSTBYNAME2 #define SYMBOL_GETHOSTBYNAME2 "_gethostbyname2" #endif #ifndef LIBRARY_GETHOSTBYNAME2 #define LIBRARY_GETHOSTBYNAME2 LIBRARY_LIBC #endif #ifndef SYMBOL_GETADDRINFO #define SYMBOL_GETADDRINFO "_getaddrinfo" #endif #ifndef LIBRARY_GETADDRINFO #define LIBRARY_GETADDRINFO LIBRARY_LIBC #endif #ifndef SYMBOL_GETIPNODEBYNAME #define SYMBOL_GETIPNODEBYNAME "_getipnodebyname" #endif #ifndef LIBRARY_GETIPNODEBYNAME #define LIBRARY_GETIPNODEBYNAME LIBRARY_LIBC #endif #ifndef SYMBOL_FREEHOSTENT #define SYMBOL_FREEHOSTENT "_freehostent" #endif #ifndef LIBRARY_FREEHOSTENT #define LIBRARY_FREEHOSTENT LIBRARY_LIBC #endif #ifndef SYMBOL_GETPEERNAME #define SYMBOL_GETPEERNAME "_getpeername" #endif #ifndef LIBRARY_GETPEERNAME #define LIBRARY_GETPEERNAME LIBRARY_LIBC #endif #ifndef SYMBOL_GETSOCKNAME #define SYMBOL_GETSOCKNAME "_getsockname" #endif #ifndef LIBRARY_GETSOCKNAME #define LIBRARY_GETSOCKNAME LIBRARY_LIBC #endif #ifndef SYMBOL_READ #define SYMBOL_READ "_read" #endif #ifndef LIBRARY_READ #define LIBRARY_READ LIBRARY_LIBC #endif #ifndef SYMBOL_READV #define SYMBOL_READV "_readv" #endif #ifndef LIBRARY_READV #define LIBRARY_READV LIBRARY_LIBC #endif #ifndef SYMBOL_RECV #define SYMBOL_RECV "_recv" #endif #ifndef LIBRARY_RECV #define LIBRARY_RECV LIBRARY_LIBC #endif #ifndef SYMBOL_RECVFROM #define SYMBOL_RECVFROM "_recvfrom" #endif #ifndef LIBRARY_RECVFROM #define LIBRARY_RECVFROM LIBRARY_LIBC #endif #ifndef SYMBOL_RECVMSG #define SYMBOL_RECVMSG "_recvmsg" #endif #ifndef LIBRARY_RECVMSG #define LIBRARY_RECVMSG LIBRARY_LIBC #endif #ifndef SYMBOL_RRESVPORT #define SYMBOL_RRESVPORT "_rresvport" #endif #ifndef LIBRARY_RRESVPORT #define LIBRARY_RRESVPORT LIBRARY_LIBC #endif #ifndef SYMBOL_SEND #define SYMBOL_SEND "_send" #endif #ifndef LIBRARY_SEND #define LIBRARY_SEND LIBRARY_LIBC #endif #ifndef SYMBOL_SENDMSG #define SYMBOL_SENDMSG "_sendmsg" #endif #ifndef LIBRARY_SENDMSG #define LIBRARY_SENDMSG LIBRARY_LIBC #endif #ifndef SYMBOL_SENDTO #define SYMBOL_SENDTO "_sendto" #endif #ifndef LIBRARY_SENDTO #define LIBRARY_SENDTO LIBRARY_LIBC #endif #ifndef SYMBOL_WRITE #define SYMBOL_WRITE "_write" #endif #ifndef LIBRARY_WRITE #define LIBRARY_WRITE LIBRARY_LIBC #endif #ifndef SYMBOL_WRITEV #define SYMBOL_WRITEV "_writev" #endif #ifndef LIBRARY_WRITEV #define LIBRARY_WRITEV LIBRARY_LIBC #endif /* only used on OSF */ #if HAVE_EXTRA_OSF_SYMBOLS #ifndef SYMBOL_EACCEPT #define SYMBOL_EACCEPT "_Eaccept" #endif #ifndef LIBRARY_EACCEPT #define LIBRARY_EACCEPT LIBRARY_LIBC #endif #ifndef SYMBOL_EGETPEERNAME #define SYMBOL_EGETPEERNAME "_Egetpeername" #endif #ifndef LIBRARY_EGETPEERNAME #define LIBRARY_EGETPEERNAME LIBRARY_LIBC #endif #ifndef SYMBOL_EGETSOCKNAME #define SYMBOL_EGETSOCKNAME "_Egetsockname" #endif #ifndef LIBRARY_EGETSOCKNAME #define LIBRARY_EGETSOCKNAME LIBRARY_LIBC #endif #ifndef SYMBOL_EREADV #define SYMBOL_EREADV "_Ereadv" #endif #ifndef LIBRARY_EREADV #define LIBRARY_EREADV LIBRARY_LIBC #endif #ifndef SYMBOL_ERECVFROM #define SYMBOL_ERECVFROM "_Erecvfrom" #endif #ifndef LIBRARY_ERECVFROM #define LIBRARY_ERECVFROM LIBRARY_LIBC #endif #ifndef SYMBOL_ERECVMSG #define SYMBOL_ERECVMSG "_Erecvmsg" #endif #ifndef LIBRARY_ERECVMSG #define LIBRARY_ERECVMSG LIBRARY_LIBC #endif #ifndef SYMBOL_ESENDMSG #define SYMBOL_ESENDMSG "_Esendmsg" #endif #ifndef LIBRARY_ESENDMSG #define LIBRARY_ESENDMSG LIBRARY_LIBC #endif #ifndef SYMBOL_EWRITEV #define SYMBOL_EWRITEV "_Ewritev" #endif #ifndef LIBRARY_EWRITEV #define LIBRARY_EWRITEV LIBRARY_LIBC #endif /* more OSF functions */ #ifndef SYMBOL_NACCEPT #define SYMBOL_NACCEPT "naccept" #endif #ifndef LIBRARY_NACCEPT #define LIBRARY_NACCEPT LIBRARY_LIBC #endif #ifndef SYMBOL_NGETPEERNAME #define SYMBOL_NGETPEERNAME "ngetpeername" #endif #ifndef LIBRARY_NGETPEERNAME #define LIBRARY_NGETPEERNAME LIBRARY_LIBC #endif #ifndef SYMBOL_NGETSOCKNAME #define SYMBOL_NGETSOCKNAME "ngetsockname" #endif #ifndef LIBRARY_NGETSOCKNAME #define LIBRARY_NGETSOCKNAME LIBRARY_LIBC #endif #ifndef SYMBOL_NRECVFROM #define SYMBOL_NRECVFROM "nrecvfrom" #endif #ifndef LIBRARY_NRECVFROM #define LIBRARY_NRECVFROM LIBRARY_LIBC #endif #ifndef SYMBOL_NRECVMSG #define SYMBOL_NRECVMSG "nrecvmsg" #endif #ifndef LIBRARY_NRECVMSG #define LIBRARY_NRECVMSG LIBRARY_LIBC #endif #ifndef SYMBOL_NSENDMSG #define SYMBOL_NSENDMSG "nsendmsg" #endif #ifndef LIBRARY_NSENDMSG #define LIBRARY_NSENDMSG LIBRARY_LIBC #endif #endif /* HAVE_EXTRA_OSF_SYMBOLS */ #ifdef lint extern const int lintnoloop_interposition_h; #else #define lintnoloop_interposition_h 0 #endif struct libsymbol_t { char *symbol; /* name of the symbol. */ char *library; /* library symbol is in. */ void *handle; /* handle to the library. */ void *function; /* the bound symbol. */ }; #if SOCKS_CLIENT #if DIAGNOSTIC && 0 #define SIGBLOCK() \ sigset_t oldmask; \ do { \ sigset_t newmask; \ \ sigemptyset(&newmask); \ sigaddset(&newmask, SIGALRM); \ if (sigprocmask(SIG_BLOCK, &newmask, &oldmask) != 0) \ swarn("SYSCALL_START(): sigprocmask()"); \ } while (0) #else /* */ #define SIGBLOCK() do { } while (lintnoloop_interposition_h) #endif \ #if DIAGNOSTIC && 0 #define SIGUNBLOCK() \ do { \ if (socksfd->state.system == 0) \ cc_socksfdv(-1); \ \ if (sigprocmask(SIG_SETMASK, &oldmask, NULL) != 0) \ swarn("SYSCALL_END(): sigprocmask()"); \ } while (lintnoloop_interposition_h) #else #define SIGUNBLOCK() do { } while (lintnoloop_interposition_h) #endif #define SYSCALL_START(s) \ int socksfd_added = 0; \ SIGBLOCK(); \ do { \ struct socksfd_t socksfdmem, *socksfd; \ \ if ((socksfd = socks_getaddr((unsigned int)s)) == NULL) { \ bzero(&socksfdmem, sizeof(socksfdmem)); \ socksfdmem.state.command = -1; \ socksfd = socks_addaddr((unsigned int)s, &socksfdmem); \ socksfd_added = 1; \ } \ \ SASSERTX(socksfd->state.system >= 0); \ ++socksfd->state.system; \ } while (lintnoloop_interposition_h) #define SYSCALL_END(s) \ do { \ struct socksfd_t *socksfd = socks_getaddr((unsigned int)s); \ \ SASSERTX(socksfd != NULL); \ \ SASSERTX(socksfd->state.system > 0); \ --socksfd->state.system; \ SIGUNBLOCK(); \ \ if (socksfd_added) { \ SASSERTX(socksfd->state.system == 0); \ socks_rmaddr((unsigned int)s); \ } \ } while (lintnoloop_interposition_h) #define ISSYSCALL(s) \ (socks_getaddr((unsigned int)(s)) != NULL \ && socks_getaddr((unsigned int)(s))->state.system) #endif /* SOCKS_CLIENT */ __BEGIN_DECLS void * symbolfunction __P((const char *symbol)); /* * Returns the address binding of the symbol "symbol" and updates * libsymbol_t structure "symbol" is defined in if necessary. * Exits on failure. */ void symbolcheck __P((void)); /* * Checks that all defined symbols are loadable (and loads them). * Note that this might open filedescriptors (and keep them open). */ __END_DECLS dante-1.1.19.dfsg/include/Makefile.am0000644000175000017500000000033007317354620015760 0ustar roamroamnoinst_HEADERS = common.h sockd.h socks.h config.h yacconfig.h redefac.h \ interposition.h tostring.h EXTRA_DIST = redefgen.sh redefac.h: autoconf.h.in sh $(top_srcdir)/include/redefgen.sh $(top_srcdir)/include dante-1.1.19.dfsg/include/Makefile.in0000644000175000017500000002706110362704170015774 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/autoconf.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = autoconf.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ noinst_HEADERS = common.h sockd.h socks.h config.h yacconfig.h redefac.h \ interposition.h tostring.h EXTRA_DIST = redefgen.sh all: autoconf.h $(MAKE) $(AM_MAKEFLAGS) 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu include/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 autoconf.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/autoconf.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/autoconf.h $(srcdir)/autoconf.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f autoconf.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) autoconf.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) autoconf.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) autoconf.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) autoconf.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(HEADERS) autoconf.h installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am redefac.h: autoconf.h.in sh $(top_srcdir)/include/redefgen.sh $(top_srcdir)/include # 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: dante-1.1.19.dfsg/include/autoconf.h.in0000644000175000017500000003775310362704145016336 0ustar roamroam/* include/autoconf.h.in. Generated from configure.ac by autoheader. */ /* enable BSD compatibility */ #undef BSD_COMP /* for debugging */ #undef DIAGNOSTIC /* alternate location */ #undef HAVE_ALT_SOCKD_CONFIGFILE /* alternate location */ #undef HAVE_ALT_SOCKD_PIDFILE /* alternate location */ #undef HAVE_ALT_SOCKS_CONFIGFILE /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_NAMESER_H /* Define to 1 if you have the `bindresvport' function. */ #undef HAVE_BINDRESVPORT /* platform bug */ #undef HAVE_BROKEN_INET_NTOA /* nonstandard */ #undef HAVE_BROKEN_VSPRINTF /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* struct cmsghdr exists */ #undef HAVE_CMSGHDR /* CMSG_LEN exists */ #undef HAVE_CMSG_LEN /* CMSG_SPACE exists */ #undef HAVE_CMSG_SPACE /* Define to 1 if you have the header file. */ #undef HAVE_CRYPT_H /* Define to 1 if you have the `daemon' function. */ #undef HAVE_DAEMON /* DEC workarounds */ #undef HAVE_DEC_PROTO /* bug workaround */ #undef HAVE_DEFECT_RECVMSG /* Define to 1 if you have the `difftime' function. */ #undef HAVE_DIFFTIME /* pidfile disabled */ #undef HAVE_DISABLED_PIDFILE /* dlfcn.h exists */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* GUI tool */ #undef HAVE_DUMPCONF /* DEC workarounds */ #undef HAVE_EXTRA_OSF_SYMBOLS /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `freeifaddrs' function. */ #undef HAVE_FREEIFADDRS /* Define to 1 if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO /* Define to 1 if you have the `getdtablesize' function. */ #undef HAVE_GETDTABLESIZE /* Define to 1 if you have the `gethostbyname2' function. */ #undef HAVE_GETHOSTBYNAME2 /* Define to 1 if you have the `getifaddrs' function. */ #undef HAVE_GETIFADDRS /* Define to 1 if you have the `getipnodebyname' function. */ #undef HAVE_GETIPNODEBYNAME /* Define to 1 if you have the `getprpwnam' function. */ #undef HAVE_GETPRPWNAM /* Define to 1 if you have the `getspnam' function. */ #undef HAVE_GETSPNAM /* system hosttype */ #undef HAVE_HOST_TYPE /* Define to 1 if you have the `hstrerror' function. */ #undef HAVE_HSTRERROR /* netdb.h defines h_errno */ #undef HAVE_H_ERRNO /* Define to 1 if you have the header file. */ #undef HAVE_IFADDRS_H /* in6_addr defined */ #undef HAVE_IN6_ADDR /* Define to 1 if you have the `inet_aton' function. */ #undef HAVE_INET_ATON /* Define to 1 if you have the `inet_pton' function. */ #undef HAVE_INET_PTON /* Define to 1 if the system has the type `int16_t'. */ #undef HAVE_INT16_T /* Define to 1 if the system has the type `int32_t'. */ #undef HAVE_INT32_T /* Define to 1 if the system has the type `int8_t'. */ #undef HAVE_INT8_T /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if the system has the type `in_addr_t'. */ #undef HAVE_IN_ADDR_T /* Define to 1 if the system has the type `in_port_t'. */ #undef HAVE_IN_PORT_T /* ipv6 not supported currently */ #undef HAVE_IPV6_SUPPORT /* Define to 1 if you have the `issetugid' function. */ #undef HAVE_ISSETUGID /* linux version of issetugid() */ #undef HAVE_LIBC_ENABLE_SECURE /* use tcpwrappers */ #undef HAVE_LIBWRAP /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* bug workaround */ #undef HAVE_LINUX_BUGS /* platform workarounds */ #undef HAVE_LINUX_ECCENTRICITIES /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* support for malloc debugging */ #undef HAVE_MALLOC_OPTIONS /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* module bandwidth installed */ #undef HAVE_MODULE_BANDWIDTH /* module checkmodule installed */ #undef HAVE_MODULE_CHECKMODULE /* module redirect installed */ #undef HAVE_MODULE_REDIRECT /* module session installed */ #undef HAVE_MODULE_SESSION /* module shmem installed */ #undef HAVE_MODULE_SHMEM /* sys/socket.h defines MSG_WAITALL */ #undef HAVE_MSG_WAITALL /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IP_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IP_VAR_H /* realloc never calls malloc */ #undef HAVE_NOMALLOC_REALLOC /* free does not accept NULL parameter */ #undef HAVE_NONULL_FREE /* primitive platform */ #undef HAVE_NO_RESOLVESTUFF /* platform symbol type */ #undef HAVE_NO_SYMBOL_UNDERSCORE /* openlog supports LOG_PERROR */ #undef HAVE_OPENLOG_LOG_PERROR /* PAM support */ #undef HAVE_PAM /* Define to 1 if you have the header file. */ #undef HAVE_PATHS_H /* for profiling */ #undef HAVE_PROFILING /* programe name symbol exists */ #undef HAVE_PROGNAME /* proto */ #undef HAVE_PROT_ACCEPT_0 /* proto */ #undef HAVE_PROT_ACCEPT_1 /* proto */ #undef HAVE_PROT_ACCEPT_2 /* proto */ #undef HAVE_PROT_ACCEPT_3 /* proto */ #undef HAVE_PROT_BIND_0 /* proto */ #undef HAVE_PROT_BIND_1 /* proto */ #undef HAVE_PROT_BIND_2 /* proto */ #undef HAVE_PROT_BIND_3 /* proto */ #undef HAVE_PROT_CONNECT_0 /* proto */ #undef HAVE_PROT_CONNECT_1 /* proto */ #undef HAVE_PROT_CONNECT_2 /* proto */ #undef HAVE_PROT_CONNECT_3 /* proto */ #undef HAVE_PROT_GETHOSTBYADDR_0 /* proto */ #undef HAVE_PROT_GETHOSTBYADDR_1 /* proto */ #undef HAVE_PROT_GETHOSTBYADDR_2 /* proto */ #undef HAVE_PROT_GETHOSTBYADDR_3 /* proto */ #undef HAVE_PROT_GETPEERNAME_0 /* proto */ #undef HAVE_PROT_GETPEERNAME_1 /* proto */ #undef HAVE_PROT_GETPEERNAME_2 /* proto */ #undef HAVE_PROT_GETPEERNAME_3 /* proto */ #undef HAVE_PROT_GETSOCKNAME_0 /* proto */ #undef HAVE_PROT_GETSOCKNAME_1 /* proto */ #undef HAVE_PROT_GETSOCKNAME_2 /* proto */ #undef HAVE_PROT_GETSOCKNAME_3 /* proto */ #undef HAVE_PROT_READV_0 /* proto */ #undef HAVE_PROT_READV_1 /* proto */ #undef HAVE_PROT_READV_2 /* proto */ #undef HAVE_PROT_READV_3 /* proto */ #undef HAVE_PROT_READ_0 /* proto */ #undef HAVE_PROT_READ_1 /* proto */ #undef HAVE_PROT_READ_2 /* proto */ #undef HAVE_PROT_READ_3 /* proto */ #undef HAVE_PROT_RECVFROM_0 /* proto */ #undef HAVE_PROT_RECVFROM_1 /* proto */ #undef HAVE_PROT_RECVFROM_2 /* proto */ #undef HAVE_PROT_RECVFROM_3 /* proto */ #undef HAVE_PROT_RECVFROM_4 /* proto */ #undef HAVE_PROT_RECVFROM_5 /* proto */ #undef HAVE_PROT_RECVFROM_6 /* proto */ #undef HAVE_PROT_RECVMSG_0 /* proto */ #undef HAVE_PROT_RECVMSG_1 /* proto */ #undef HAVE_PROT_RECVMSG_2 /* proto */ #undef HAVE_PROT_RECVMSG_3 /* proto */ #undef HAVE_PROT_RECV_0 /* proto */ #undef HAVE_PROT_RECV_1 /* proto */ #undef HAVE_PROT_RECV_2 /* proto */ #undef HAVE_PROT_RECV_3 /* proto */ #undef HAVE_PROT_RECV_4 /* proto */ #undef HAVE_PROT_SENDMSG_0 /* proto */ #undef HAVE_PROT_SENDMSG_1 /* proto */ #undef HAVE_PROT_SENDMSG_2 /* proto */ #undef HAVE_PROT_SENDMSG_3 /* proto */ #undef HAVE_PROT_SENDTO_0 /* proto */ #undef HAVE_PROT_SENDTO_1 /* proto */ #undef HAVE_PROT_SENDTO_2 /* proto */ #undef HAVE_PROT_SENDTO_3 /* proto */ #undef HAVE_PROT_SENDTO_4 /* proto */ #undef HAVE_PROT_SENDTO_5 /* proto */ #undef HAVE_PROT_SENDTO_6 /* proto */ #undef HAVE_PROT_SEND_0 /* proto */ #undef HAVE_PROT_SEND_1 /* proto */ #undef HAVE_PROT_SEND_2 /* proto */ #undef HAVE_PROT_SEND_3 /* proto */ #undef HAVE_PROT_SEND_4 /* proto */ #undef HAVE_PROT_WRITEV_0 /* proto */ #undef HAVE_PROT_WRITEV_1 /* proto */ #undef HAVE_PROT_WRITEV_2 /* proto */ #undef HAVE_PROT_WRITEV_3 /* proto */ #undef HAVE_PROT_WRITE_0 /* proto */ #undef HAVE_PROT_WRITE_1 /* proto */ #undef HAVE_PROT_WRITE_2 /* proto */ #undef HAVE_PROT_WRITE_3 /* Define to 1 if you have the header file. */ #undef HAVE_RESOLV_H /* BSD type routing socket */ #undef HAVE_ROUTEINFO_BSD /* Linux type routing socket */ #undef HAVE_ROUTEINFO_LINUX /* routing socket communication supported */ #undef HAVE_ROUTE_SOURCE /* Define to 1 if you have the header file. */ #undef HAVE_SECURITY_PAM_APPL_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* bug workaround */ #undef HAVE_SENDMSG_DEADLOCK /* Define to 1 if you have the `setegid' function. */ #undef HAVE_SETEGID /* Define to 1 if you have the `seteuid' function. */ #undef HAVE_SETEUID /* Define to 1 if you have the `setproctitle' function. */ #undef HAVE_SETPROCTITLE /* Define to 1 if you have the header file. */ #undef HAVE_SHADOW_H /* signal.h defined SIGINFO */ #undef HAVE_SIGNAL_SIGINFO /* sig_atomic_t defined in signal.h */ #undef HAVE_SIG_ATOMIC_T /* sa_len exists in sockaddr */ #undef HAVE_SOCKADDR_SA_LEN /* sockaddr_storate defined */ #undef HAVE_SOCKADDR_STORAGE /* Define to 1 if you have the `sockatmark' function. */ #undef HAVE_SOCKATMARK /* alternate location */ #undef HAVE_SOCKD_CONFIGFILE /* alternate location */ #undef HAVE_SOCKD_PIDFILE /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* alternate location */ #undef HAVE_SOCKS_CONFIGFILE /* broken platform */ #undef HAVE_SOLARIS_2_5_1 /* bug workaround */ #undef HAVE_SOLARIS_BUGS /* bug workaround */ #undef HAVE_SOLARIS_PAM_BUG /* platform supports SO_SNDLOWAT socket option */ #undef HAVE_SO_SNDLOWAT /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcspn' function. */ #undef HAVE_STRCSPN /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strspn' function. */ #undef HAVE_STRSPN /* ip_opts defined in netinet/in.h */ #undef HAVE_STRUCT_IPOPTS /* Define to 1 if you have the `strvis' function. */ #undef HAVE_STRVIS /* Define to 1 if you have the `sysconf' function. */ #undef HAVE_SYSCONF /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* platform workaround */ #undef HAVE_SYSTEM_XMSG_MAGIC /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IPC_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SEM_H /* sys/sockio.h exists */ #undef HAVE_SYS_SOCKIO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_TCPD_H /* timeradd(), timersub etc. exist in sys/time.h */ #undef HAVE_TIMER_MACROS /* Define to 1 if the system has the type `uint16_t'. */ #undef HAVE_UINT16_T /* Define to 1 if the system has the type `uint32_t'. */ #undef HAVE_UINT32_T /* Define to 1 if the system has the type `uint8_t'. */ #undef HAVE_UINT8_T /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */ #undef HAVE_UTIME_NULL /* platform workaround */ #undef HAVE_VOLATILE_SIG_ATOMIC_T /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if you have the `vsyslog' function. */ #undef HAVE_VSYSLOG /* system V getpwnam */ #undef HAVE_WORKING_GETPWNAM /* function loc */ #undef LIBRARY_ACCEPT /* function loc */ #undef LIBRARY_BIND /* function loc */ #undef LIBRARY_BINDRESVPORT /* function loc */ #undef LIBRARY_CONNECT /* function loc */ #undef LIBRARY_FREEHOSTENT /* function loc */ #undef LIBRARY_GETADDRINFO /* function loc */ #undef LIBRARY_GETHOSTBYADDR /* function loc */ #undef LIBRARY_GETHOSTBYNAME /* function loc */ #undef LIBRARY_GETHOSTBYNAME2 /* function loc */ #undef LIBRARY_GETIPNODEBYNAME /* function loc */ #undef LIBRARY_GETPEERNAME /* function loc */ #undef LIBRARY_GETSOCKNAME /* libc name */ #undef LIBRARY_LIBC /* libloc */ #undef LIBRARY_LIBNSL /* libloc */ #undef LIBRARY_LIBRESOLV /* libname */ #undef LIBRARY_LIBRPCSOC /* libloc */ #undef LIBRARY_LIBSOCKET /* hardcoded path */ #undef LIBRARY_PATH /* function loc */ #undef LIBRARY_RECV /* function loc */ #undef LIBRARY_RECVFROM /* function loc */ #undef LIBRARY_RECVMSG /* function loc */ #undef LIBRARY_RRESVPORT /* function loc */ #undef LIBRARY_SEND /* function loc */ #undef LIBRARY_SENDMSG /* function loc */ #undef LIBRARY_SENDTO /* platform workaround */ #undef NEED_ACCEPTLOCK /* use AF_LOCATL, not AF_UNIX */ #undef NEED_AF_LOCAL /* dlopen has RTLD_ prefix */ #undef NEED_DYNA_RTLD /* EXIT_FAILURE not defined in stdlib.h */ #undef NEED_EXIT_FAILURE /* getsockopt needs cast */ #undef NEED_GETSOCKOPT_CAST /* use SA_RESTART, not SV_INTERRUPT */ #undef NEED_SA_RESTART /* sys/sockio.h must be included */ #undef NEED_SYS_SOCKIO_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if the C compiler supports function prototypes. */ #undef PROTOTYPES /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if the `setvbuf' function takes the buffering type as its second argument and the buffer pointer as the third, as on System V before release 3. */ #undef SETVBUF_REVERSED /* The size of a `char', as computed by sizeof. */ #undef SIZEOF_CHAR /* The size of a `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of a `long', as computed by sizeof. */ #undef SIZEOF_LONG /* The size of a `short', as computed by sizeof. */ #undef SIZEOF_SHORT /* platform workaround */ #undef SOCKS_DOMAINNAME /* setproctitle */ #undef SPT_PADCHAR /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Define to 1 if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define like PROTOTYPES; this can be used by system headers. */ #undef __PROTOTYPES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if doesn't define. */ #undef gid_t /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `long' if does not define. */ #undef off_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned' if does not define. */ #undef size_t /* platform workaround */ #undef socklen_t /* Define to `int' if does not define. */ #undef ssize_t /* Define to `int' if doesn't define. */ #undef uid_t #include "redefac.h" dante-1.1.19.dfsg/include/tostring.h0000644000175000017500000002250007751450224015750 0ustar roamroam/* * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 * Inferno Nettverk A/S, Norway. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. The above copyright notice, this list of conditions and the following * disclaimer must appear in all copies of the software, derivative works * or modified versions, and any portions thereof, aswell as in all * supporting documentation. * 2. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by * Inferno Nettverk A/S, Norway. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Inferno Nettverk A/S requests users of this software to return to * * Software Distribution Coordinator or sdc@inet.no * Inferno Nettverk A/S * Oslo Research Park * Gaustadalléen 21 * NO-0349 Oslo * Norway * * any improvements or extensions that they make and grant Inferno Nettverk A/S * the rights to redistribute these changes. * */ /* $Id: tostring.h,v 1.8 2003/11/03 12:56:52 karls Exp $ */ #ifndef _TOSTRING_H_ #define _TOSTRING_H_ #endif #if HAVE_DUMPCONF #define QUOTE(a) __CONCAT3("\"", a, "\"") #define QUOTE0() "\"" #else #define QUOTE(a) a #define QUOTE0() "" #endif /* HAVE_DUMPCONF */ enum operator_t string2operator __P((const char *operator)); /* * Returns the enum for the string representation of a operator. * Can't fail. */ const char * operator2string __P((enum operator_t operator)); /* * Returns the string representation of the operator. * Can't fail. */ const char * ruleaddress2string __P((const struct ruleaddress_t *rule, char *string, size_t len)); /* * Writes "rule" out as a string. The string is written to "string", * which is of length "len", including NUL termination. * Returns: "string". */ const char * command2string __P((int command)); /* * Returns a printable representation of the socks command "command". * Can't fail. */ char * commands2string __P((const struct command_t *command, char *str, size_t strsize)); /* * Returns a printable representation of "commands". * "str" is the memory to write the printable representation into, * "strsize" is the size of the memory. * * Returns: "str", NUL terminated. */ char * methods2string __P((size_t methodc, const int *methodv, char *str, size_t strsize)); /* * Returns a printable representation of the methods "methodv", of * length "methodc". * "str" is the memory to write the printable representation into, * "strsize" is the size of the memory. * * Returns: "str", NUL terminated. */ const char * protocol2string __P((int protocol)); /* * Returns a printable representation of "protocol". * Can't fail. */ char * protocols2string __P((const struct protocol_t *protocols, char *str, size_t strsize)); /* * Returns a printable representation of "protocols". * "str" is the memory to write the printable representation into, * "strsize" is the size of the memory. * * Returns: "str", NUL terminated. */ char * proxyprotocols2string __P((const struct proxyprotocol_t *proxyprotocols, char *str, size_t strsize)); /* * Returns a printable representation of "protocols". * "str" is the memory to write the printable representation into, * "strsize" is the size of the memory. * * Returns: "str", NUL terminated. */ const char * method2string __P((int method)); /* * Returns a printable representation of the authmethod "method". * Can't fail. */ int string2method __P((const char *methodname)); /* * If "methodname" is the name of a supported method, the protocol * value of that method is returned. * Otherwise, -1 is returned. */ char * sockshost2string __P((const struct sockshost_t *host, char *string, size_t len)); /* * Writes "host" out as a string. The string is written to "string", * which is of length "len", including NUL termination. * Returns: "string". */ char * sockaddr2string __P((const struct sockaddr *address, char *string, size_t len)); /* * Returns the IP address and port in "address" on string form. * "address" is assumed to be on network form and it will be * converted to host form before written to "string". * "len" gives length of the NUL terminated string. * Returns: "string". */ struct udpheader_t * string2udpheader __P((const char *data, size_t len, struct udpheader_t *header)); /* * Converts "data" to udpheader_t representation. * "len" is length of "data". * "data" is assumed to be in network order. * Returns: * On success: pointer to a udpheader_t in static memory. * On failure: NULL ("data" is not a complete udppacket). */ const char * socks_packet2string __P((const void *packet, int type)); /* * debug function; dumps socks packet content * "packet" is a socks packet, "type" indicates it's type. * Returns: * On success: 0 * On failure: -1 */ char * extensions2string __P((const struct extension_t *extensions, char *str, size_t strsize)); /* * Returns a printable representation of "extensions". * "str" is the memory to write the printable representation into, * "strsize" is the size of the memory. * * Returns: "str", NUL terminated. */ const char * resolveprotocol2string __P((int resolveprotocol)); /* * Returns a printable representation of "resolveprotocol". */ #if SOCKS_SERVER char * logtypes2string __P((const struct logtype_t *logtypes, char *str, size_t strsize)); /* * Returns a printable representation of "logtypes". * "str" is the memory to write the printable representation into, * "strsize" is the size of the memory. * * Returns: "str", NUL terminated. */ char * timeouts2string __P((const struct timeout_t *timeouts, const char *prefix, char *str, size_t strsize)); /* * Returns a printable representation of "timeouts". * "prefix" is prefixed to every line written to "str". * "str" is the memory to write the printable representation into, * "strsize" is the size of the memory. * * Returns: "str", NUL terminated. */ char * logs2string __P((const struct log_t *logs, char *str, size_t strsize)); /* * Returns a printable representation of "logs". * "str" is the memory to write the printable representation into, * "strsize" is the size of the memory. * * Returns: "str", NUL terminated. */ char * userids2string __P((const struct userid_t *userids, const char *prefix, char *str, size_t strsize)); /* * Returns a printable representation of "userids". * "prefix" is prefixed to every line written to "str". * "str" is the memory to write the printable representation into, * "strsize" is the size of the memory. * * Returns: "str", NUL terminated. */ char * options2string __P((const struct option_t *options, const char *prefix, char *str, size_t strsize)); /* * Returns a printable representation of "options". * "prefix" is prefixed to every line written to "str". * "str" is the memory to write the printable representation into, * "strsize" is the size of the memory. * Returns: "str", NUL terminated. */ char * compats2string __P((const struct compat_t *compats, char *str, size_t strsize)); /* * Returns a printable representation of "compats". * "str" is the memory to write the printable representation into, * "strsize" is the size of the memory. * * Returns: "str", NUL terminated. */ char * users2string __P((const struct linkedname_t *user, char *str, size_t strsize)); /* * Returns a printable representation of "user". * "str" is the memory to write the printable representation into, * "strsize" is the size of the memory. * * Returns: "str", NUL terminated. */ const char * childtype2string __P((int type)); /* * returns the string representation of "type". */ const char * verdict2string __P((int verdict)); /* * returns the string representation of "verdict". */ char * srchosts2string __P((const struct srchost_t *srchosts, const char *prefix, char *str, size_t strsize)); /* * Returns a printable representation of "srchosts". * "prefix" is prefixed to every line written to "str". * "str" is the memory to write the printable representation into, * "strsize" is the size of the memory. * * Returns: "str", NUL terminated. */ const char * uid2name __P((uid_t uid)); /* * If there is a mapping from "uid" to name, returns the name. * Otherwise returns NULL. */ const char * rotation2string __P((int rotation)); /* * Returns a printable representation of "rotation". */ #endif /* SOCKS_SERVER */ dante-1.1.19.dfsg/libscompat/0000755000175000017500000000000011037370225014433 5ustar roamroamdante-1.1.19.dfsg/libscompat/setproctitle.c0000644000175000017500000002003006716577555017342 0ustar roamroam/* $Id: setproctitle.c,v 1.4 1999/05/13 16:35:57 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_SETPROCTITLE #if 0 /* ---> minor changes were made to include some macros from other files in the sendmail distribution and and remove others */ /* * Copyright (c) 1983, 1995-1997 Eric P. Allman * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if 0 #ifndef lint static char sccsid[] = "@(#)conf.c 8.379 (Berkeley) 10/20/97"; #endif /* not lint */ #endif #if 0 # include "sendmail.h" # include "pathnames.h" # include # include #endif # ifdef STDC_HEADERS #if 0 # include #endif # define VA_LOCAL_DECL va_list ap; # define VA_START(f) va_start(ap, f) # define VA_END va_end(ap) # else #if 0 # include #endif # define VA_LOCAL_DECL va_list ap; # define VA_START(f) va_start(ap) # define VA_END va_end(ap) # endif /* return number of bytes left in a buffer */ #define SPACELEFT(buf, ptr) (sizeof buf - ((ptr) - buf)) /* ** SETPROCTITLE -- set process title for ps ** ** Parameters: ** fmt -- a printf style format string. ** a, b, c -- possible parameters to fmt. ** ** Returns: ** none. ** ** Side Effects: ** Clobbers argv of our main procedure so ps(1) will ** display the title. */ #define SPT_NONE 0 /* don't use it at all */ #define SPT_REUSEARGV 1 /* cover argv with title information */ #define SPT_BUILTIN 2 /* use libc builtin */ #define SPT_PSTAT 3 /* use pstat(PSTAT_SETCMD, ...) */ #define SPT_PSSTRINGS 4 /* use PS_STRINGS->... */ #define SPT_SYSMIPS 5 /* use sysmips() supported by NEWS-OS 6 */ #define SPT_SCO 6 /* write kernel u. area */ #define SPT_CHANGEARGV 7 /* write our own strings into argv[] */ # define MAXLINE 2048 /* max line length */ #ifndef SPT_TYPE # define SPT_TYPE SPT_REUSEARGV #endif #if SPT_TYPE != SPT_NONE && SPT_TYPE != SPT_BUILTIN # if SPT_TYPE == SPT_PSTAT # include # endif # if SPT_TYPE == SPT_PSSTRINGS # include # include # ifndef PS_STRINGS /* hmmmm.... apparently not available after all */ # undef SPT_TYPE # define SPT_TYPE SPT_REUSEARGV # else # ifndef NKPDE /* FreeBSD 2.0 */ # define NKPDE 63 typedef unsigned int *pt_entry_t; # endif # endif # endif # if SPT_TYPE == SPT_PSSTRINGS || SPT_TYPE == SPT_CHANGEARGV # define SETPROC_STATIC static # else # define SETPROC_STATIC # endif # if SPT_TYPE == SPT_SYSMIPS # include # include # endif # if SPT_TYPE == SPT_SCO # include # include # include # include # if PSARGSZ > MAXLINE # define SPT_BUFSIZE PSARGSZ # endif # endif # ifndef SPT_PADCHAR # define SPT_PADCHAR ' ' # endif # ifndef SPT_BUFSIZE # define SPT_BUFSIZE MAXLINE # endif #endif /* SPT_TYPE != SPT_NONE && SPT_TYPE != SPT_BUILTIN */ /* ** Pointers for setproctitle. ** This allows "ps" listings to give more useful information. */ char **Argv = NULL; /* pointer to argument vector */ char *LastArgv = NULL; /* end of argv */ int initsetproctitle(argc, argv, envp) int argc; char **argv; char **envp; { register int i, envpsize = 0; extern char **environ; /* ** Move the environment so setproctitle can use the space at ** the top of memory. */ for (i = 0; envp[i] != NULL; i++) envpsize += strlen(envp[i]) + 1; environ = (char **) malloc(sizeof (char *) * (i + 1)); if (environ == NULL) return -1; /* ---> removed some macro calls */ for (i = 0; envp[i] != NULL; i++) { size_t len = strlen(envp[i]) + 1; char *p = malloc(len); if (p == NULL) return -1; environ[i] = strncpy(p, envp[i], len); p[len - 1] = NUL; } environ[i] = NULL; /* ** Save start and extent of argv for setproctitle. */ Argv = argv; /* ** Find the last environment variable within sendmail's ** process memory area. */ while (i > 0 && (envp[i - 1] < argv[0] || envp[i - 1] > (argv[argc - 1] + strlen(argv[argc - 1]) + 1 + envpsize))) i--; if (i > 0) LastArgv = envp[i - 1] + strlen(envp[i - 1]); else LastArgv = argv[argc - 1] + strlen(argv[argc - 1]); return 0; } #if SPT_TYPE != SPT_BUILTIN /*VARARGS1*/ void # ifdef STDC_HEADERS setproctitle(const char *fmt, ...) # else setproctitle(fmt, va_alist) const char *fmt; va_dcl # endif /* STDC_HEADERS */ { # if SPT_TYPE != SPT_NONE register char *p; register int i; SETPROC_STATIC char buf[SPT_BUFSIZE]; VA_LOCAL_DECL # if SPT_TYPE == SPT_PSTAT union pstun pst; # endif # if SPT_TYPE == SPT_SCO off_t seek_off; static int kmem = -1; static int kmempid = -1; struct user u; # endif p = buf; #if 0 #ifdef SOCKS_SERVER /* XXX only complied once now */ snprintf(p, SPACELEFT(buf, p), "%s: ", __progname); p += strlen(p); #endif /* SOCKS_SERVER */ #endif /* print the argument string */ VA_START(fmt); vsnprintf(p, SPACELEFT(buf, p), fmt, ap); VA_END; i = strlen(buf); # if SPT_TYPE == SPT_PSTAT pst.pst_command = buf; pstat(PSTAT_SETCMD, pst, i, 0, 0); # endif # if SPT_TYPE == SPT_PSSTRINGS PS_STRINGS->ps_nargvstr = 1; PS_STRINGS->ps_argvstr = buf; # endif # if SPT_TYPE == SPT_SYSMIPS sysmips(SONY_SYSNEWS, NEWS_SETPSARGS, buf); # endif # if SPT_TYPE == SPT_SCO if (kmem < 0 || kmempid != getpid()) { if (kmem >= 0) close(kmem); kmem = open(_PATH_KMEM, O_RDWR, 0); if (kmem < 0) return; (void) fcntl(kmem, F_SETFD, 1); kmempid = getpid(); } buf[PSARGSZ - 1] = '\0'; seek_off = UVUBLK + (off_t) u.u_psargs - (off_t) &u; if (lseek(kmem, (off_t) seek_off, SEEK_SET) == seek_off) (void) write(kmem, buf, PSARGSZ); # endif # if SPT_TYPE == SPT_REUSEARGV if (i > LastArgv - Argv[0] - 2) { i = LastArgv - Argv[0] - 2; buf[i] = '\0'; } (void) strcpy(Argv[0], buf); p = &Argv[0][i]; while (p < LastArgv) *p++ = SPT_PADCHAR; Argv[1] = NULL; # endif # if SPT_TYPE == SPT_CHANGEARGV Argv[0] = buf; Argv[1] = 0; # endif # endif /* SPT_TYPE != SPT_NONE */ } #endif /* SPT_TYPE != SPT_BUILTIN */ #else /* !0 */ int initsetproctitle(argc, argv, envp) int argc; char **argv; char **envp; { return 0; } void #ifdef STDC_HEADERS setproctitle(const char *fmt, ...) #else setproctitle(va_alist) va_dcl #endif /* STDC_HEADERS */ { return; } #endif /* 0 */ #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* !HAVE_SETPROCTITLE */ dante-1.1.19.dfsg/libscompat/issetugid.c0000644000175000017500000000111410355322510016570 0ustar roamroam/* $Id: issetugid.c,v 1.7 2005/12/30 21:23:20 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_ISSETUGID #if HAVE_LIBC_ENABLE_SECURE extern int __libc_enable_secure; #endif /* HAVE_LIBC_ENABLE_SECURE */ int issetugid() { #if HAVE_LIBC_ENABLE_SECURE if (__libc_enable_secure) return 1; else return 0; #endif /* HAVE_LIBC_ENABLE_SECURE */ return 1; /* don't know, better safe than sorry. */ } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* !HAVE_ISSETUGID */ dante-1.1.19.dfsg/libscompat/seteuid.c0000644000175000017500000000070510144066540016243 0ustar roamroam/* $Id: seteuid.c,v 1.2 2004/11/09 07:10:24 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_SETEGID int setegid(gid_t egid) { return setresgid(-1, egid, -1); } #endif /* !HAVE_SETEGID */ #if !HAVE_SETEUID int seteuid(uid_t euid) { return setreuid(-1, euid); } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* !HAVE_ISSETUGID */ dante-1.1.19.dfsg/libscompat/vsyslog.c0000644000175000017500000000616610324735546016327 0ustar roamroam/* $Id: vsyslog.c,v 1.7 2005/09/17 20:07:15 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" /* attempt to be clever; construct string and call syslog */ #if !HAVE_VSYSLOG /* * Copyright (c) 1983, 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) static char rcsid[] = "$OpenBSD: syslog.c,v 1.8 1998/03/19 00:30:03 millert Exp $"; #endif /* LIBC_SCCS and not lint */ void vsyslog(pri, fmt, ap) int pri; register const char *fmt; va_list ap; { register char ch, *t; int saved_errno; #define TBUF_LEN 2048 #define FMT_LEN 1024 char tbuf[TBUF_LEN], fmt_cpy[FMT_LEN]; int fmt_left, prlen; saved_errno = errno; /* Build the message. */ /* * We wouldn't need this mess if printf handled %m, or if * strerror() had been invented before syslog(). */ for (t = fmt_cpy, fmt_left = FMT_LEN; (ch = *fmt); ++fmt) { if (ch == '%' && fmt[1] == 'm') { ++fmt; prlen = snprintf(t, fmt_left, "%s", strerror(saved_errno)); if (prlen >= fmt_left) prlen = fmt_left - 1; t += prlen; fmt_left -= prlen; } else { if (fmt_left > 1) { *t++ = ch; fmt_left--; } } } *t = '\0'; prlen = vsnprintf(tbuf, TBUF_LEN, fmt_cpy, ap); syslog(pri, "%s", tbuf); return; } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* !HAVE_VSYSLOG */ dante-1.1.19.dfsg/libscompat/compat.h0000644000175000017500000000664507405666310016111 0ustar roamroam#if !HAVE_STRVIS /* $OpenBSD: vis.h,v 1.2 1997/09/21 10:46:01 niklas Exp $ */ /* $NetBSD: vis.h,v 1.4 1994/10/26 00:56:41 cgd Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)vis.h 5.9 (Berkeley) 4/3/91 */ #ifndef _VIS_H_ #define _VIS_H_ /* * to select alternate encoding format */ #define VIS_OCTAL 0x01 /* use octal \ddd format */ #define VIS_CSTYLE 0x02 /* use \[nrft0..] where appropriate */ /* * to alter set of characters encoded (default is to encode all * non-graphic except space, tab, and newline). */ #define VIS_SP 0x04 /* also encode space */ #define VIS_TAB 0x08 /* also encode tab */ #define VIS_NL 0x10 /* also encode newline */ #define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL) #define VIS_SAFE 0x20 /* only encode "unsafe" characters */ /* * other */ #define VIS_NOSLASH 0x40 /* inhibit printing '\' */ /* * unvis return codes */ #define UNVIS_VALID 1 /* character valid */ #define UNVIS_VALIDPUSH 2 /* character valid, push back passed char */ #define UNVIS_NOCHAR 3 /* valid sequence, no character produced */ #define UNVIS_SYNBAD -1 /* unrecognized escape sequence */ #define UNVIS_ERROR -2 /* decoder in unknown state (unrecoverable) */ /* * unvis flags */ #define UNVIS_END 1 /* no more characters */ /*#include */ #ifndef _COMMON_H_ #include "common.h" #endif /* !_COMMON_H_ */ __BEGIN_DECLS char *vis __P((char *, int, int, int)); int strvis __P((char *, const char *, int)); int strvisx __P((char *, const char *, size_t, int)); #if 0 /* only vis and strvis,strvisx included */ int strunvis __P((char *, const char *)); int unvis __P((char *, char, int *, int)); #endif /* 0 */ __END_DECLS #endif /* !_VIS_H_ */ #endif /* !HAVE_STRVIS */ dante-1.1.19.dfsg/libscompat/Makefile.am0000644000175000017500000000056707235333233016502 0ustar roamroam# should only build static library noinst_LTLIBRARIES = libscompat.la libscompat_la_SOURCES = difftime.c daemon.c getdtablesize.c hstrerror.c \ inet_aton.c inet_ntoa.c inet_pton.c issetugid.c memmove.c \ setproctitle.c snprintf.c sockatmark.c strerror.c strvis.c \ vsyslog.c seteuid.c getifaddrs.c noinst_HEADERS = compat.h INCLUDES = -I$(top_srcdir)/include dante-1.1.19.dfsg/libscompat/Makefile.in0000644000175000017500000003655610362704172016521 0ustar roamroam# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libscompat DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libscompat_la_LIBADD = am_libscompat_la_OBJECTS = difftime.lo daemon.lo getdtablesize.lo \ hstrerror.lo inet_aton.lo inet_ntoa.lo inet_pton.lo \ issetugid.lo memmove.lo setproctitle.lo snprintf.lo \ sockatmark.lo strerror.lo strvis.lo vsyslog.lo seteuid.lo \ getifaddrs.lo libscompat_la_OBJECTS = $(am_libscompat_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libscompat_la_SOURCES) DIST_SOURCES = $(libscompat_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBRARY_PREFIX = @LIBRARY_PREFIX@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINT_FALSE = @LINT_FALSE@ LINT_TRUE = @LINT_TRUE@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRELOAD_POSTFIX = @PRELOAD_POSTFIX@ PRELOAD_SEPERATOR = @PRELOAD_SEPERATOR@ PRELOAD_VARIABLE = @PRELOAD_VARIABLE@ PRERELEASE_FALSE = @PRERELEASE_FALSE@ PRERELEASE_TRUE = @PRERELEASE_TRUE@ RANLIB = @RANLIB@ SERVER_INTERPOSITION_ALWAYS_FALSE = @SERVER_INTERPOSITION_ALWAYS_FALSE@ SERVER_INTERPOSITION_ALWAYS_TRUE = @SERVER_INTERPOSITION_ALWAYS_TRUE@ SERVER_INTERPOSITION_FALSE = @SERVER_INTERPOSITION_FALSE@ SERVER_INTERPOSITION_TRUE = @SERVER_INTERPOSITION_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKSIFY_PRELOAD_LIBS = @SOCKSIFY_PRELOAD_LIBS@ SOLIB_POSTFIX = @SOLIB_POSTFIX@ SPROFIL_FALSE = @SPROFIL_FALSE@ SPROFIL_TRUE = @SPROFIL_TRUE@ STATIC_SOCKD_FALSE = @STATIC_SOCKD_FALSE@ STATIC_SOCKD_TRUE = @STATIC_SOCKD_TRUE@ STRIP = @STRIP@ TOPEXTRADIST = @TOPEXTRADIST@ TOPSUBDIRS = @TOPSUBDIRS@ VERSION = @VERSION@ WANT_LIBWRAP_FALSE = @WANT_LIBWRAP_FALSE@ WANT_LIBWRAP_TRUE = @WANT_LIBWRAP_TRUE@ YACC = @YACC@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ # should only build static library noinst_LTLIBRARIES = libscompat.la libscompat_la_SOURCES = difftime.c daemon.c getdtablesize.c hstrerror.c \ inet_aton.c inet_ntoa.c inet_pton.c issetugid.c memmove.c \ setproctitle.c snprintf.c sockatmark.c strerror.c strvis.c \ vsyslog.c seteuid.c getifaddrs.c noinst_HEADERS = compat.h INCLUDES = -I$(top_srcdir)/include all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libscompat/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libscompat/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 clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libscompat.la: $(libscompat_la_OBJECTS) $(libscompat_la_DEPENDENCIES) $(LINK) $(libscompat_la_LDFLAGS) $(libscompat_la_OBJECTS) $(libscompat_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/daemon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/difftime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getifaddrs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hstrerror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_aton.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntoa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_pton.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/issetugid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memmove.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seteuid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setproctitle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockatmark.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strvis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsyslog.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$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 $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-info-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: dante-1.1.19.dfsg/libscompat/difftime.c0000644000175000017500000000055706716577553016422 0ustar roamroam/* $Id: difftime.c,v 1.3 1999/05/13 16:35:55 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_DIFFTIME double difftime(t1, t0) long t1; long t0; { return (double)(t1 - t0); } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* !HAVE_DIFFTIME */ dante-1.1.19.dfsg/libscompat/inet_aton.c0000644000175000017500000001400206716577554016602 0ustar roamroam/* $Id: inet_aton.c,v 1.3 1999/05/13 16:35:56 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_INET_ATON /* $OpenBSD: inet_addr.c,v 1.5 1997/04/05 21:13:10 millert Exp $ */ /* * ++Copyright++ 1983, 1990, 1993 * - * Copyright (c) 1983, 1990, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Portions Copyright (c) 1993 by Digital Equipment Corporation. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies, and that * the name of Digital Equipment Corporation not be used in advertising or * publicity pertaining to distribution of the document or software without * specific, written prior permission. * * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. * - * --Copyright-- */ #if defined(LIBC_SCCS) && !defined(lint) #if 0 static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; static char rcsid[] = "$From: inet_addr.c,v 8.5 1996/08/05 08:31:35 vixie Exp $"; #else static char rcsid[] = "$OpenBSD: inet_addr.c,v 1.5 1997/04/05 21:13:10 millert Exp $"; #endif #endif /* LIBC_SCCS and not lint */ #ifndef _COMMON_H_ #include #include #include #include #endif /* !_COMMON_H_ */ #include /* * Ascii internet address interpretation routine. * The value returned is in network order. */ #if 0 in_addr_t inet_addr(cp) register const char *cp; { struct in_addr val; if (inet_aton(cp, &val)) return (val.s_addr); return (INADDR_NONE); } #endif /* 0 */ /* * Check whether "cp" is a valid ascii representation * of an Internet address and convert to a binary address. * Returns 1 if the address is valid, 0 if not. * This replaces inet_addr, the return value from which * cannot distinguish between failure and a local broadcast address. */ int inet_aton(cp, addr) register const char *cp; struct in_addr *addr; { register in_addr_t val; register int base, n; register char c; u_int parts[4]; register u_int *pp = parts; c = *cp; for (;;) { /* * Collect number up to ``.''. * Values are specified as for C: * 0x=hex, 0=octal, isdigit=decimal. */ if (!isdigit((int)c)) return (0); val = 0; base = 10; if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') base = 16, c = *++cp; else base = 8; } for (;;) { if (isascii((int)c) && isdigit((int)c)) { val = (val * base) + (c - '0'); c = *++cp; } else if (base == 16 && isascii((int)c) && isxdigit((int)c)) { val = (val << 4) | (c + 10 - (islower((int)c) ? 'a' : 'A')); c = *++cp; } else break; } if (c == '.') { /* * Internet format: * a.b.c.d * a.b.c (with c treated as 16 bits) * a.b (with b treated as 24 bits) */ if (pp >= parts + 3) return (0); *pp++ = val; c = *++cp; } else break; } /* * Check for trailing characters. */ if (c != '\0' && (!isascii((int)c) || !isspace((int)c))) return (0); /* * Concoct the address according to * the number of parts specified. */ n = pp - parts + 1; switch (n) { case 0: return (0); /* initial nondigit */ case 1: /* a -- 32 bits */ break; case 2: /* a.b -- 8.24 bits */ if (val > 0xffffff) return (0); val |= parts[0] << 24; break; case 3: /* a.b.c -- 8.8.16 bits */ if (val > 0xffff) return (0); val |= (parts[0] << 24) | (parts[1] << 16); break; case 4: /* a.b.c.d -- 8.8.8.8 bits */ if (val > 0xff) return (0); val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); break; } if (addr) addr->s_addr = htonl(val); return (1); } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* !HAVE_INET_ATON */ dante-1.1.19.dfsg/libscompat/sockatmark.c0000644000175000017500000000064406716577556016772 0ustar roamroam/* $Id: sockatmark.c,v 1.3 1999/05/13 16:35:58 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_SOCKATMARK int sockatmark(s) int s; { int argp; if (ioctl(s, SIOCATMARK, &argp) == -1) return -1; return argp == 0 ? 0 : 1; } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* HAVE_SOCKATMARK */ dante-1.1.19.dfsg/libscompat/hstrerror.c0000644000175000017500000001131106716577553016653 0ustar roamroam/* $Id: hstrerror.c,v 1.3 1999/05/13 16:35:55 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_HSTRERROR /* $OpenBSD: herror.c,v 1.4 1997/03/13 19:07:28 downsj Exp $ */ /* * ++Copyright++ 1987, 1993 * - * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Portions Copyright (c) 1993 by Digital Equipment Corporation. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies, and that * the name of Digital Equipment Corporation not be used in advertising or * publicity pertaining to distribution of the document or software without * specific, written prior permission. * * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. * - * --Copyright-- */ #if defined(LIBC_SCCS) && !defined(lint) #if 0 static char sccsid[] = "@(#)herror.c 8.1 (Berkeley) 6/4/93"; static char rcsid[] = "$From: herror.c,v 8.3 1996/08/05 08:31:35 vixie Exp $"; #else static char rcsid[] = "$OpenBSD: herror.c,v 1.4 1997/03/13 19:07:28 downsj Exp $"; #endif #endif /* LIBC_SCCS and not lint */ #ifndef _COMMON_H_ #include #include #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #endif /* !_COMMON_H_ */ const char *h_errlist[] = { "Resolver Error 0 (no error)", "Unknown host", /* 1 HOST_NOT_FOUND */ "Host name lookup failure", /* 2 TRY_AGAIN */ "Unknown server error", /* 3 NO_RECOVERY */ "No address associated with name", /* 4 NO_ADDRESS */ }; int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] }; extern int h_errno; #if 0 /* * herror -- * print the error indicated by the h_errno value. */ void herror(s) const char *s; { struct iovec iov[4]; register struct iovec *v = iov; if (s && *s) { v->iov_base = (char *)s; v->iov_len = strlen(s); v++; v->iov_base = ": "; v->iov_len = 2; v++; } v->iov_base = (char *)hstrerror(h_errno); v->iov_len = strlen(v->iov_base); v++; v->iov_base = "\n"; v->iov_len = 1; writev(STDERR_FILENO, iov, (v - iov) + 1); } #endif const char * hstrerror(err) int err; { if (err < 0) return ("Resolver internal error"); else if (err < h_nerr) return (h_errlist[err]); return ("Unknown resolver error"); } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* !HAVE_HSTRERROR */ dante-1.1.19.dfsg/libscompat/getifaddrs.c0000644000175000017500000002327207405647075016737 0ustar roamroam/* $Id: getifaddrs.c,v 1.2 2001/12/12 12:31:57 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_GETIFADDRS /* $OpenBSD: getifaddrs.c,v 1.3 2000/11/24 08:26:47 itojun Exp $ */ /* * Copyright (c) 1995, 1999 * Berkeley Software Design, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * BSDI getifaddrs.c,v 2.12 2000/02/23 14:51:59 dab Exp */ /* * NOTE: SIOCGIFCONF case is not LP64 friendly. it also does not perform * try-and-error for region size. */ #if 0 #include #include #include #include #endif #ifdef NET_RT_IFLIST #include #include #include #include #endif #if 0 #include #include #include #include #endif /*XXX IPv6*/ #if !HAVE_SOCKADDR_SA_LEN && !defined(SA_LEN) #define SA_LEN(sa) sizeof(struct sockaddr) #endif #if !defined(SA_LEN) #define SA_LEN(sa) (sa)->sa_len #endif #if HAVE_SOCKADDR_SA_LEN #define SALIGN (sizeof(long) - 1) #define SA_RLEN(sa) ((sa)->sa_len ? (((sa)->sa_len + SALIGN) & ~SALIGN) : (SALIGN + 1)) #else #define SA_RLEN(sa) (SA_LEN(sa)) /*XXX?*/ #endif /* HAVE_SOCKADDR_SA_LEN */ #ifndef ALIGNBYTES /* * On systems with a routing socket, ALIGNBYTES should match the value * that the kernel uses when building the messages. */ #define ALIGNBYTES XXX #endif #ifndef ALIGN #define ALIGN(p) (((u_long)(p) + ALIGNBYTES) &~ ALIGNBYTES) #endif #ifdef _BSDI_VERSION #if _BSDI_VERSION >= 199701 #define HAVE_IFM_DATA #endif #if _BSDI_VERSION >= 199802 /* ifam_data is very specific to recent versions of bsdi */ #define HAVE_IFAM_DATA #endif #endif /* _BSDI_VERSION */ #if 0 #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) #define HAVE_IFM_DATA #endif #endif /*XXX*/ #undef NET_RT_IFLIST #undef HAVE_IFM_DATA int getifaddrs(struct ifaddrs **pif) { int icnt = 1; int dcnt = 0; int ncnt = 0; #ifdef NET_RT_IFLIST int mib[6]; size_t needed; char *buf; char *next; struct ifaddrs *cif = 0; char *p, *p0; struct rt_msghdr *rtm; struct if_msghdr *ifm; struct ifa_msghdr *ifam; struct sockaddr_dl *dl; struct sockaddr *sa; u_short index = 0; size_t len, alen; #else /* NET_RT_IFLIST */ char buf[1024]; int sock; struct ifconf ifc; struct ifreq *ifr; struct ifreq *lifr; #endif /* NET_RT_IFLIST */ struct ifaddrs *ifa, *ift; int i; char *data; char *names; #ifdef NET_RT_IFLIST mib[0] = CTL_NET; mib[1] = PF_ROUTE; mib[2] = 0; /* protocol */ mib[3] = 0; /* wildcard address family */ mib[4] = NET_RT_IFLIST; mib[5] = 0; /* no flags */ if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) return (-1); if ((buf = malloc(needed)) == NULL) return (-1); if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) { free(buf); return (-1); } for (next = buf; next < buf + needed; next += rtm->rtm_msglen) { rtm = (struct rt_msghdr *)next; if (rtm->rtm_version != RTM_VERSION) continue; switch (rtm->rtm_type) { case RTM_IFINFO: ifm = (struct if_msghdr *)rtm; if (ifm->ifm_addrs & RTA_IFP) { index = ifm->ifm_index; ++icnt; dl = (struct sockaddr_dl *)(ifm + 1); dcnt += SA_RLEN((struct sockaddr *)dl) + ALIGNBYTES; #ifdef HAVE_IFM_DATA dcnt += sizeof(ifm->ifm_data); #endif /* HAVE_IFM_DATA */ ncnt += dl->sdl_nlen + 1; } else index = 0; break; case RTM_NEWADDR: ifam = (struct ifa_msghdr *)rtm; if (index && ifam->ifam_index != index) abort(); /* this cannot happen */ #define RTA_MASKS (RTA_NETMASK | RTA_IFA | RTA_BRD) if (index == 0 || (ifam->ifam_addrs & RTA_MASKS) == 0) break; p = (char *)(ifam + 1); ++icnt; #ifdef HAVE_IFAM_DATA dcnt += sizeof(ifam->ifam_data) + ALIGNBYTES; #endif /* HAVE_IFAM_DATA */ /* Scan to look for length of address */ alen = 0; for (p0 = p, i = 0; i < RTAX_MAX; i++) { if ((RTA_MASKS & ifam->ifam_addrs & (1 << i)) == 0) continue; sa = (struct sockaddr *)p; len = SA_RLEN(sa); if (i == RTAX_IFA) { alen = len; break; } p += len; } for (p = p0, i = 0; i < RTAX_MAX; i++) { if ((RTA_MASKS & ifam->ifam_addrs & (1 << i)) == 0) continue; sa = (struct sockaddr *)p; len = SA_RLEN(sa); if (i == RTAX_NETMASK && SA_LEN(sa) == 0) dcnt += alen; else dcnt += len; p += len; } break; } } #else /* NET_RT_IFLIST */ ifc.ifc_buf = buf; ifc.ifc_len = sizeof(buf); if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) return (-1); i = ioctl(sock, SIOCGIFCONF, (char *)&ifc); close(sock); if (i == -1) return (-1); ifr = ifc.ifc_req; lifr = (struct ifreq *)&ifc.ifc_buf[ifc.ifc_len]; while (ifr < lifr) { struct sockaddr *sa; sa = &ifr->ifr_addr; ++icnt; dcnt += SA_RLEN(sa); ncnt += sizeof(ifr->ifr_name) + 1; ifr = (struct ifreq *)(((char *)sa) + SA_LEN(sa)); } #endif /* NET_RT_IFLIST */ if (icnt + dcnt + ncnt == 1) { *pif = NULL; free(buf); return (0); } data = malloc(sizeof(struct ifaddrs) * icnt + dcnt + ncnt); if (data == NULL) { free(buf); return(-1); } ifa = (struct ifaddrs *)data; data += sizeof(struct ifaddrs) * icnt; names = data + dcnt; memset(ifa, 0, sizeof(struct ifaddrs) * icnt); ift = ifa; #ifdef NET_RT_IFLIST index = 0; for (next = buf; next < buf + needed; next += rtm->rtm_msglen) { rtm = (struct rt_msghdr *)next; if (rtm->rtm_version != RTM_VERSION) continue; switch (rtm->rtm_type) { case RTM_IFINFO: ifm = (struct if_msghdr *)rtm; if (ifm->ifm_addrs & RTA_IFP) { index = ifm->ifm_index; dl = (struct sockaddr_dl *)(ifm + 1); cif = ift; ift->ifa_name = names; ift->ifa_flags = (int)ifm->ifm_flags; memcpy(names, dl->sdl_data, dl->sdl_nlen); names[dl->sdl_nlen] = 0; names += dl->sdl_nlen + 1; ift->ifa_addr = (struct sockaddr *)data; memcpy(data, dl, SA_LEN((struct sockaddr *)dl)); data += SA_RLEN((struct sockaddr *)dl); #ifdef HAVE_IFM_DATA /* ifm_data needs to be aligned */ ift->ifa_data = data = (void *)ALIGN(data); memcpy(data, &ifm->ifm_data, sizeof(ifm->ifm_data)); data += sizeof(ifm->ifm_data); #else /* HAVE_IFM_DATA */ ift->ifa_data = NULL; #endif /* HAVE_IFM_DATA */ ift = (ift->ifa_next = ift + 1); } else index = 0; break; case RTM_NEWADDR: ifam = (struct ifa_msghdr *)rtm; if (index && ifam->ifam_index != index) abort(); /* this cannot happen */ if (index == 0 || (ifam->ifam_addrs & RTA_MASKS) == 0) break; ift->ifa_name = cif->ifa_name; ift->ifa_flags = cif->ifa_flags; ift->ifa_data = NULL; p = (char *)(ifam + 1); /* Scan to look for length of address */ alen = 0; for (p0 = p, i = 0; i < RTAX_MAX; i++) { if ((RTA_MASKS & ifam->ifam_addrs & (1 << i)) == 0) continue; sa = (struct sockaddr *)p; len = SA_RLEN(sa); if (i == RTAX_IFA) { alen = len; break; } p += len; } for (p = p0, i = 0; i < RTAX_MAX; i++) { if ((RTA_MASKS & ifam->ifam_addrs & (1 << i)) == 0) continue; sa = (struct sockaddr *)p; len = SA_RLEN(sa); switch (i) { case RTAX_IFA: ift->ifa_addr = (struct sockaddr *)data; memcpy(data, p, len); data += len; break; case RTAX_NETMASK: ift->ifa_netmask = (struct sockaddr *)data; if (SA_LEN(sa) == 0) { memset(data, 0, alen); data += alen; break; } memcpy(data, p, len); data += len; break; case RTAX_BRD: ift->ifa_broadaddr = (struct sockaddr *)data; memcpy(data, p, len); data += len; break; } p += len; } #ifdef HAVE_IFAM_DATA /* ifam_data needs to be aligned */ ift->ifa_data = data = (void *)ALIGN(data); memcpy(data, &ifam->ifam_data, sizeof(ifam->ifam_data)); data += sizeof(ifam->ifam_data); #endif /* HAVE_IFAM_DATA */ ift = (ift->ifa_next = ift + 1); break; } } free(buf); #else /* NET_RT_IFLIST */ ifr = ifc.ifc_req; lifr = (struct ifreq *)&ifc.ifc_buf[ifc.ifc_len]; while (ifr < lifr) { struct sockaddr *sa; ift->ifa_name = names; names[sizeof(ifr->ifr_name)] = 0; strncpy(names, ifr->ifr_name, sizeof(ifr->ifr_name)); while (*names++) ; ift->ifa_addr = (struct sockaddr *)data; sa = &ifr->ifr_addr; memcpy(data, sa, SA_LEN(sa)); data += SA_RLEN(sa); ifr = (struct ifreq *)(((char *)sa) + SA_LEN(sa)); ift = (ift->ifa_next = ift + 1); } #endif /* NET_RT_IFLIST */ if (--ift >= ifa) { ift->ifa_next = NULL; *pif = ifa; } else { *pif = NULL; free(ifa); } return (0); } void freeifaddrs(struct ifaddrs *ifp) { free(ifp); } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* !HAVE_DAEMON */ dante-1.1.19.dfsg/libscompat/getdtablesize.c0000644000175000017500000000102706716577553017452 0ustar roamroam/* $Id: getdtablesize.c,v 1.3 1999/05/13 16:35:55 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_GETDTABLESIZE int getdtablesize(void) { #if HAVE_SYSCONF const int res = sysconf(_SC_OPEN_MAX); if (res == -1) return SOCKS_FD_MAX; else return res; #else return SOCKS_FD_MAX; /* XXX, won't work. */ #endif /* HAVE_SYSCONF */ } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* HAVE_GETDTABLESIZE */ dante-1.1.19.dfsg/libscompat/inet_ntoa.c0000644000175000017500000000525306716577554016612 0ustar roamroam/* $Id: inet_ntoa.c,v 1.3 1999/05/13 16:35:56 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if HAVE_BROKEN_INET_NTOA /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) static char rcsid[] = "$OpenBSD: inet_ntoa.c,v 1.2 1996/08/19 08:29:16 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* * Convert network-format internet address * to base 256 d.d.d.d representation. */ #if 0 #include #include #include #include #endif char * inet_ntoa(in) struct in_addr in; { static char b[18]; register char *p; p = (char *)∈ #define UC(b) (((int)b)&0xff) (void)snprintf(b, sizeof(b), "%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3])); return (b); } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* HAVE_BROKEN_INET_NTOA */ dante-1.1.19.dfsg/libscompat/inet_pton.c0000644000175000017500000001361506716577554016632 0ustar roamroam/* $Id: inet_pton.c,v 1.3 1999/05/13 16:35:56 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_INET_PTON /* $OpenBSD: inet_pton.c,v 1.2 1997/04/13 05:08:24 deraadt Exp $ */ /* Copyright (c) 1996 by Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ #if defined(LIBC_SCCS) && !defined(lint) #if 0 static char rcsid[] = "$From: inet_pton.c,v 8.7 1996/08/05 08:31:35 vixie Exp $"; #else static char rcsid[] = "$OpenBSD: inet_pton.c,v 1.2 1997/04/13 05:08:24 deraadt Exp $"; #endif #endif /* LIBC_SCCS and not lint */ #if 0 #include #include #include #include #include #include #include #include #endif #ifndef AF_INET6 #define AF_INET6 24 /* IPv6 */ #endif /* !AF_INET6 */ #ifndef INADDRSZ #define INADDRSZ 4 /* IPv4 T_A */ #endif /* !INADDRSZ */ #ifndef IN6ADDRSZ #define IN6ADDRSZ 16 /* IPv6 T_AAAA */ #endif /* !IN6ADDRSZ */ #ifndef INT16SZ #define INT16SZ 2 /* for systems without 16-bit ints */ #endif /* !INT16SZ */ /* * WARNING: Don't even consider trying to compile this on a system where * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. */ static int inet_pton4 __P((const char *src, u_char *dst)); static int inet_pton6 __P((const char *src, u_char *dst)); /* int * inet_pton(af, src, dst) * convert from presentation format (which usually means ASCII printable) * to network format (which is usually some kind of binary format). * return: * 1 if the address was valid for the specified address family * 0 if the address wasn't valid (`dst' is untouched in this case) * -1 if some other error occurred (`dst' is untouched in this case, too) * author: * Paul Vixie, 1996. */ int inet_pton(af, src, dst) int af; const char *src; void *dst; { switch (af) { case AF_INET: return (inet_pton4(src, dst)); case AF_INET6: return (inet_pton6(src, dst)); default: errno = EAFNOSUPPORT; return (-1); } /* NOTREACHED */ } /* int * inet_pton4(src, dst) * like inet_aton() but without all the hexadecimal and shorthand. * return: * 1 if `src' is a valid dotted quad, else 0. * notice: * does not touch `dst' unless it's returning 1. * author: * Paul Vixie, 1996. */ static int inet_pton4(src, dst) const char *src; u_char *dst; { static const char digits[] = "0123456789"; int saw_digit, octets, ch; u_char tmp[INADDRSZ], *tp; saw_digit = 0; octets = 0; *(tp = tmp) = 0; while ((ch = *src++) != '\0') { const char *pch; if ((pch = strchr(digits, ch)) != NULL) { u_int new = *tp * 10 + (pch - digits); if (new > 255) return (0); if (! saw_digit) { if (++octets > 4) return (0); saw_digit = 1; } *tp = new; } else if (ch == '.' && saw_digit) { if (octets == 4) return (0); *++tp = 0; saw_digit = 0; } else return (0); } if (octets < 4) return (0); memcpy(dst, tmp, INADDRSZ); return (1); } /* int * inet_pton6(src, dst) * convert presentation level address to network order binary form. * return: * 1 if `src' is a valid [RFC1884 2.2] address, else 0. * notice: * (1) does not touch `dst' unless it's returning 1. * (2) :: in a full address is silently ignored. * credit: * inspired by Mark Andrews. * author: * Paul Vixie, 1996. */ static int inet_pton6(src, dst) const char *src; u_char *dst; { static const char xdigits_l[] = "0123456789abcdef", xdigits_u[] = "0123456789ABCDEF"; u_char tmp[IN6ADDRSZ], *tp, *endp, *colonp; const char *xdigits, *curtok; int ch, saw_xdigit; u_int val; memset((tp = tmp), '\0', IN6ADDRSZ); endp = tp + IN6ADDRSZ; colonp = NULL; /* Leading :: requires some special handling. */ if (*src == ':') if (*++src != ':') return (0); curtok = src; saw_xdigit = 0; val = 0; while ((ch = *src++) != '\0') { const char *pch; if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL) pch = strchr((xdigits = xdigits_u), ch); if (pch != NULL) { val <<= 4; val |= (pch - xdigits); if (val > 0xffff) return (0); saw_xdigit = 1; continue; } if (ch == ':') { curtok = src; if (!saw_xdigit) { if (colonp) return (0); colonp = tp; continue; } if (tp + INT16SZ > endp) return (0); *tp++ = (u_char) (val >> 8) & 0xff; *tp++ = (u_char) val & 0xff; saw_xdigit = 0; val = 0; continue; } if (ch == '.' && ((tp + INADDRSZ) <= endp) && inet_pton4(curtok, tp) > 0) { tp += INADDRSZ; saw_xdigit = 0; break; /* '\0' was seen by inet_pton4(). */ } return (0); } if (saw_xdigit) { if (tp + INT16SZ > endp) return (0); *tp++ = (u_char) (val >> 8) & 0xff; *tp++ = (u_char) val & 0xff; } if (colonp != NULL) { /* * Since some memmove()'s erroneously fail to handle * overlapping regions, we'll do the shift by hand. */ const int n = tp - colonp; int i; for (i = 1; i <= n; i++) { endp[- i] = colonp[n - i]; colonp[n - i] = 0; } tp = endp; } if (tp != endp) return (0); memcpy(dst, tmp, IN6ADDRSZ); return (1); } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* !HAVE_INET_PTON */ dante-1.1.19.dfsg/libscompat/memmove.c0000644000175000017500000001063006716577555016273 0ustar roamroam/* $Id: memmove.c,v 1.3 1999/05/13 16:35:57 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_MEMMOVE #define MEMMOVE /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Chris Torek. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) static char *rcsid = "$OpenBSD: bcopy.c,v 1.2 1996/08/19 08:33:58 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #if 0 #include #endif /* * sizeof(word) MUST BE A POWER OF TWO * SO THAT wmask BELOW IS ALL ONES */ typedef long word; /* "word" used for optimal copy speed */ #define wsize sizeof(word) #define wmask (wsize - 1) /* * Copy a block of memory, handling overlap. * This is the routine that actually implements * (the portable versions of) bcopy, memcpy, and memmove. */ #ifdef MEMCOPY void * memcpy(dst0, src0, length) #else #ifdef MEMMOVE void * memmove(dst0, src0, length) #else void bcopy(src0, dst0, length) #endif #endif void *dst0; const void *src0; register size_t length; { register char *dst = dst0; register const char *src = src0; register size_t t; if (length == 0 || dst == src) /* nothing to do */ goto done; /* * Macros: loop-t-times; and loop-t-times, t>0 */ #define TLOOP(s) if (t) TLOOP1(s) #define TLOOP1(s) do { s; } while (--t) if ((unsigned long)dst < (unsigned long)src) { /* * Copy forward. */ t = (long)src; /* only need low bits */ if ((t | (long)dst) & wmask) { /* * Try to align operands. This cannot be done * unless the low bits match. */ if ((t ^ (long)dst) & wmask || length < wsize) t = length; else t = wsize - (t & wmask); length -= t; TLOOP1(*dst++ = *src++); } /* * Copy whole words, then mop up any trailing bytes. */ t = length / wsize; TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize); t = length & wmask; TLOOP(*dst++ = *src++); } else { /* * Copy backwards. Otherwise essentially the same. * Alignment works as before, except that it takes * (t&wmask) bytes to align, not wsize-(t&wmask). */ src += length; dst += length; t = (long)src; if ((t | (long)dst) & wmask) { if ((t ^ (long)dst) & wmask || length <= wsize) t = length; else t &= wmask; length -= t; TLOOP1(*--dst = *--src); } t = length / wsize; TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src); t = length & wmask; TLOOP(*--dst = *--src); } done: #if defined(MEMCOPY) || defined(MEMMOVE) return (dst0); #else return; #endif } #undef MEMMOVE #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* !HAVE_MEMMOVE */ dante-1.1.19.dfsg/libscompat/strerror.c0000644000175000017500000001256706716577556016524 0ustar roamroam/* $Id: strerror.c,v 1.3 1999/05/13 16:35:58 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_STRERROR /* * Copyright (c) 1988 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) static char *rcsid = "$OpenBSD: __strerror.c,v 1.6 1996/09/25 08:17:30 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #ifndef NL_TEXTMAX #define NL_TEXTMAX 255 #endif /* !NL_TEXTMAX */ int sys_nerr; char *sys_errlist[]; int errno; #if 0 #include #include #include #include #endif static char *itoa(num) int num; { static char buffer[11]; char *p; p = buffer + 4; while (num >= 10) { *--p = (num % 10) + '0'; num /= 10; } *p = (num % 10) + '0'; return p; } /* * Since perror() is not allowed to change the contents of strerror()'s * static buffer, both functions supply their own buffers to the * internal function __strerror(). */ char * __strerror(num, buf) int num; char *buf; { #define UPREFIX "Unknown error: " register unsigned int errnum; errnum = num; /* convert to unsigned */ if (errnum < sys_nerr) { return(sys_errlist[errnum]); } else { strcpy(buf, UPREFIX); strncat(buf, itoa(errnum), NL_TEXTMAX-strlen(buf)-1); } return buf; } /* * Copyright (c) 1988 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) static char *rcsid = "$OpenBSD: strerror.c,v 1.2 1996/08/19 08:34:17 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #if 0 #include #include #endif /* * Since perror() is not allowed to change the contents of strerror()'s * static buffer, both functions supply their own buffers to the * internal function __strerror(). */ char * strerror(num) int num; { static char buf[NL_TEXTMAX]; return __strerror(num, buf); } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* HAVE_STRERROR */ dante-1.1.19.dfsg/libscompat/daemon.c0000644000175000017500000000543506716577553016076 0ustar roamroam/* $Id: daemon.c,v 1.3 1999/05/13 16:35:55 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_DAEMON /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) static char rcsid[] = "$OpenBSD: daemon.c,v 1.2 1996/08/19 08:22:13 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include /*#include */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ int daemon(nochdir, noclose) int nochdir, noclose; { int fd; switch (fork()) { case -1: return (-1); case 0: break; default: _exit(0); } if (setsid() == -1) return (-1); if (!nochdir) (void)chdir("/"); /*XXX /dev/null */ if (!noclose && (fd = open("/dev/null", O_RDWR, 0)) != -1) { (void)dup2(fd, STDIN_FILENO); (void)dup2(fd, STDOUT_FILENO); (void)dup2(fd, STDERR_FILENO); if (fd > 2) (void)close (fd); } return (0); } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* !HAVE_DAEMON */ dante-1.1.19.dfsg/libscompat/strvis.c0000644000175000017500000001200006716577556016152 0ustar roamroam/* $Id: strvis.c,v 1.5 1999/05/13 16:35:58 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_STRVIS /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) static char rcsid[] = "$OpenBSD: vis.c,v 1.4 1997/07/25 20:30:05 mickey Exp $"; #endif /* LIBC_SCCS and not lint */ #ifndef _COMMON_H_ #include #include #endif /* !_COMMON_H_ */ #include /*#include */ /* get defines from compat.h */ #include "compat.h" #define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7') /* * vis - visually encode characters */ char * vis(dst, c, flag, nextc) register char *dst; int c, nextc; register int flag; { if (((u_int)c <= UCHAR_MAX && isascii(c) && isgraph(c)) || ((flag & VIS_SP) == 0 && c == ' ') || ((flag & VIS_TAB) == 0 && c == '\t') || ((flag & VIS_NL) == 0 && c == '\n') || ((flag & VIS_SAFE) && (c == '\b' || c == '\007' || c == '\r'))) { *dst++ = c; if (c == '\\' && (flag & VIS_NOSLASH) == 0) *dst++ = '\\'; *dst = '\0'; return (dst); } if (flag & VIS_CSTYLE) { switch(c) { case '\n': *dst++ = '\\'; *dst++ = 'n'; goto done; case '\r': *dst++ = '\\'; *dst++ = 'r'; goto done; case '\b': *dst++ = '\\'; *dst++ = 'b'; goto done; #ifdef STDC_HEADERS case '\a': #else case '\007': #endif /* STDC_HEADERS */ *dst++ = '\\'; *dst++ = 'a'; goto done; case '\v': *dst++ = '\\'; *dst++ = 'v'; goto done; case '\t': *dst++ = '\\'; *dst++ = 't'; goto done; case '\f': *dst++ = '\\'; *dst++ = 'f'; goto done; case ' ': *dst++ = '\\'; *dst++ = 's'; goto done; case '\0': *dst++ = '\\'; *dst++ = '0'; if (isoctal(nextc)) { *dst++ = '0'; *dst++ = '0'; } goto done; } } if (((c & 0177) == ' ') || (flag & VIS_OCTAL)) { *dst++ = '\\'; *dst++ = ((u_char)c >> 6 & 07) + '0'; *dst++ = ((u_char)c >> 3 & 07) + '0'; *dst++ = ((u_char)c & 07) + '0'; goto done; } if ((flag & VIS_NOSLASH) == 0) *dst++ = '\\'; if (c & 0200) { c &= 0177; *dst++ = 'M'; } if (iscntrl(c)) { *dst++ = '^'; if (c == 0177) *dst++ = '?'; else *dst++ = c + '@'; } else { *dst++ = '-'; *dst++ = c; } done: *dst = '\0'; return (dst); } /* * strvis, strvisx - visually encode characters from src into dst * * Dst must be 4 times the size of src to account for possible * expansion. The length of dst, not including the trailing NULL, * is returned. * * Strvisx encodes exactly len bytes from src into dst. * This is useful for encoding a block of data. */ int strvis(dst, src, flag) register char *dst; register const char *src; int flag; { register char c; char *start; for (start = dst; (c = *src);) dst = vis(dst, c, flag, *++src); *dst = '\0'; return (dst - start); } int strvisx(dst, src, len, flag) register char *dst; register const char *src; register size_t len; int flag; { register char c; char *start; for (start = dst; len > 1; len--) { c = *src; dst = vis(dst, c, flag, *++src); } if (len) dst = vis(dst, *src, flag, '\0'); *dst = '\0'; return (dst - start); } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* !HAVE_STRVIS */ dante-1.1.19.dfsg/libscompat/snprintf.c0000644000175000017500000001006207153400674016447 0ustar roamroam/* $Id: snprintf.c,v 1.5 2000/08/31 06:57:00 karls Exp $ */ #ifdef HAVE_CONFIG_H #include "autoconf.h" #endif /* HAVE_CONFIG_H */ #include "common.h" #if !HAVE_VSNPRINTF /* * Revision 12: http://theos.com/~deraadt/snprintf.c * * Copyright (c) 1997 Theo de Raadt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if 0 #ifndef _COMMON_H_ #include #endif /* !_COMMON_H_ */ #include #include #include #if STDC_HEADERS #include #include #else #include #endif /* STDC_HEADERS */ #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #endif #ifndef roundup #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) #endif static int pgsize; static char *curobj; /*static int caught;*/ static sigjmp_buf bail; static char *msetup __P((char *, size_t)); static void mcatch __P((void)); static void mcleanup __P((char *, size_t, char *)); #define EXTRABYTES 2 /* XXX: why 2? you don't want to know */ static char * msetup(str, n) char *str; size_t n; { char *e; if (n == 0) return NULL; if (pgsize == 0) pgsize = getpagesize(); curobj = (char *)malloc(n + EXTRABYTES + pgsize * 2); if (curobj == NULL) return NULL; e = curobj + n + EXTRABYTES; e = (char *)roundup((unsigned long)e, pgsize); if (mprotect(e, pgsize, PROT_NONE) == -1) { free(curobj); curobj = NULL; return NULL; } e = e - n - EXTRABYTES; *e = '\0'; return (e); } static void mcatch() { siglongjmp(bail, 1); } static void mcleanup(str, n, p) char *str; size_t n; char *p; { strncpy(str, p, n-1); str[n-1] = '\0'; if (mprotect((caddr_t)(p + n + EXTRABYTES), pgsize, PROT_READ|PROT_WRITE|PROT_EXEC) == -1) mprotect((caddr_t)(p + n + EXTRABYTES), pgsize, PROT_READ|PROT_WRITE); free(curobj); } int #ifdef STDC_HEADERS snprintf(char *str, size_t n, char const *fmt, ...) #else snprintf(str, n, fmt, va_alist) char *str; size_t n; char *fmt; va_dcl #endif /* STDC_HEADERS */ { va_list ap; #ifdef STDC_HEADERS va_start(ap, fmt); #else va_start(ap); #endif /* STDC_HEADERS */ return (vsnprintf(str, n, fmt, ap)); va_end(ap); } int vsnprintf(str, n, fmt, ap) char *str; size_t n; const char *fmt; va_list ap; { struct sigaction osa, nsa; char *p; int ret = n + 1; /* if we bail, indicated we overflowed */ memset(&nsa, 0, sizeof nsa); nsa.sa_handler = mcatch; sigemptyset(&nsa.sa_mask); p = msetup(str, n); if (p == NULL) { *str = '\0'; return 0; } if (sigsetjmp(bail, 1) == 0) { if (sigaction(SIGSEGV, &nsa, &osa) == -1) { mcleanup(str, n, p); return (0); } ret = vsprintf(p, fmt, ap); #if HAVE_BROKEN_VSPRINTF ret = strlen(p); #endif /* HAVE_BROKEN_VSPRINTF */ } mcleanup(str, n, p); (void) sigaction(SIGSEGV, &osa, NULL); return (ret); } #else static void avoid_error __P((void)); static void avoid_error() { avoid_error(); } #endif /* !HAVE_VSNPRINTF */ dante-1.1.19.dfsg/CREDITS0000644000175000017500000000532010065300422013306 0ustar roamroam# $Id: CREDITS,v 1.28 2004/06/20 12:20:34 karls Exp $ Dante was developed for Inferno Nettverk A/S, Norway by: - Michael Shuldman : Design and implementation. - Karl-André Skevik : Autoconf and porting. In order of contribution, at least the following should be credited: - David Koblas (koblas@netcom.com) authored the original Socks protocol and implementation. - Ying-Da Lee (yingda@esd.sgi.com) maintained the socks4 package. Also thanks to him for letting us include the file describing the v4 protocol, "SOCKS4.protocol". - The people at NEC (http://www.socks.nec.com) have done much for Socks, including extension of the orignal protocol. The idea for "socksify" also came from them. - Most of the compatibility functions were taken from OpenBSD and are copyright The Regents of the University of California. - The snprintf function is copyright Theo de Raadt (deraadt@theos.com) - The setproctitle replacement is taken from sendmail-8.8.8 and written by Eric P. Allman - Jörgen Lundman (lundman@argonaut.com) provided invaluable help during the process of getting msproxy support into Dante. Thanks a lot. Jörgen Lundman would also like to thank Paul Leask for his time and effort in this project. - Andrew Pimlott's (pimlott@math.harvard.edu) work on analysing the msproxy protocol was helpful and served to complement and speed up the process of adding msproxy support to Dante. Andrew Pimlott also has his own msproxy implementation, but as he is busy requests that people only contact him if they are desperate and Dante does not work for them. - Thanks to Oren Tiorsh (oren@hishome.net) who contributed the rpm spec files. - Thanks to Lars Brede Grøndahl from INN (inn.no) for the logo. - Thanks to Jay Weber (jweb@accessus.net) for help with the digital unix port and an account to test it on. - Malte Cornils for help with the HP-UX port. - M. Everett Hinckley (everett@lsli.com) and Tommy Chan ported Dante to AIX. - Thanks to Per Hedeland (per@erix.ericsson.se) for much appreciated help with some tricky stuff in addressmatching code aswell as several useful codepatches over the years. - Patrick Bihan-Faou, MindStep Corporation, patrick@mindstep.com contributed support for PAM. - Tom Chan contributed code to find out what local address the system would select to use for connecting to a particular ipaddress. - Lennart Dahlström contributed an implementation of getipnodebyname(). - Motoyuki Kasahara contributed the getaddrinfo() implementation used in the code. - Also thanks to everyone who reported bugs and other problems.