debian/0000775000000000000000000000000013136126670007175 5ustar debian/freeradius.postinst0000775000000000000000000001566712210116444013143 0ustar #! /bin/sh set -e update_fs_from_statoverride() { # I wish a simple dpkg-statoverride --update $file just did # the right thing, but it doesn't, so we have to do it manually. type=$1 user=$2 group=$3 mode=$4 file=$5 if [ -n "$type" -a -n "$group" -a -n "$mode" -a -n "$file" ]; then if [ "$(find $file -maxdepth 0 -type $type -group $group -perm $mode)" = "" -a -$type $file ]; then chgrp $group $file chmod $mode $file fi fi } handle_config_files() { runmode=$1 for file in /etc/freeradius/preproxy_users \ /etc/freeradius/policy.conf \ /etc/freeradius/eap.conf \ /etc/freeradius/experimental.conf \ /etc/freeradius/huntgroups \ /etc/freeradius/proxy.conf \ /etc/freeradius/attrs.pre-proxy \ /etc/freeradius/hints \ /etc/freeradius/sql.conf \ /etc/freeradius/ldap.attrmap \ /etc/freeradius/attrs \ /etc/freeradius/policy.txt \ /etc/freeradius/attrs.accounting_response \ /etc/freeradius/attrs.access_reject \ /etc/freeradius/attrs.access_challenge \ /etc/freeradius/clients.conf \ /etc/freeradius/acct_users do set +e so=$(dpkg-statoverride --list $file) ret=$? set -e case "$runmode" in initial) if [ $ret != 0 ]; then dpkg-statoverride --add --update root freerad 0640 $file fi ;; upgrade) update_fs_from_statoverride f $so ;; esac done for dir in /etc/freeradius/certs \ /etc/freeradius/sites-available \ /etc/freeradius/sites-enabled do set +e so=$(dpkg-statoverride --list $dir) ret=$? set -e case "$runmode" in initial) if [ $ret != 0 ]; then dpkg-statoverride --add --update freerad freerad 2751 $dir fi ;; upgrade) update_fs_from_statoverride d $so ;; esac done } case "$1" in configure) if [ -z "$2" ]; then # Changed in 1.1.5-1 for new installs (we used to start at S50 # and stop at K50) We now start at S50 and stop at K19 so we # start after services which may be used and stop before them. update-rc.d freeradius start 50 2 3 4 5 . stop 19 0 1 6 . >/dev/null # Set up initial permissions on all the freeradius directories if ! dpkg-statoverride --list /var/run/freeradius >/dev/null; then dpkg-statoverride --add --update freerad freerad 0755 /var/run/freeradius fi if ! dpkg-statoverride --list /var/log/freeradius >/dev/null; then dpkg-statoverride --add --update freerad freerad 0750 /var/log/freeradius fi for file in radius.log radwtmp; do [ ! -f "/var/log/freeradius/${file}" ] && install -o freerad -g freerad -m 644 /dev/null /var/log/freeradius/${file} done handle_config_files initial action="start" else handle_config_files upgrade action="restart" fi # Create links for default sites, but only if this is an initial # install or an upgrade from before there were links; users may # want to remove them... if [ -z "$2" ] || dpkg --compare-versions "$2" lt 2.0.4+dfsg-4; then for site in default inner-tunnel; do if [ ! -e /etc/freeradius/sites-enabled/$site ]; then ln -s ../sites-available/$site /etc/freeradius/sites-enabled/$site fi done fi # Create stub SSL certificate file that became necessary in 2.1.8, # with analogous disclaimers, because the admin may yet choose to # switch to /usr/share/doc/freeradius/examples/certs/ stuff. if [ -z "$2" ] || dpkg --compare-versions "$2" lt 2.1.8+dfsg-1; then if egrep -q '^[ ]*\$INCLUDE eap.conf' /etc/freeradius/radiusd.conf && \ egrep -q '^[ ]*certdir = \${confdir}/certs' /etc/freeradius/eap.conf && \ egrep -q '^[ ]*cadir = \${confdir}/certs' /etc/freeradius/eap.conf then echo "Updating default SSL certificate settings, if any..." >&2 test -d /etc/freeradius/certs || mkdir /etc/freeradius/certs if test ! -e /etc/ssl/certs/ssl-cert-snakeoil.pem || \ test ! -e /etc/ssl/private/ssl-cert-snakeoil.key then make-ssl-cert generate-default-snakeoil fi if egrep -q '^[ ]*certificate_file = \${certdir}/server.pem' /etc/freeradius/eap.conf && \ test ! -f /etc/freeradius/certs/server.pem then serverpem=wasnotthere ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/freeradius/certs/server.pem fi if ( egrep -q '^[ ]*private_key_file = \${certdir}/server.pem' /etc/freeradius/eap.conf && \ [ "$serverpem" = "wasnotthere" ] ) \ || \ ( egrep -q '^[ ]*private_key_file = \${certdir}/server.key' /etc/freeradius/eap.conf && \ test ! -f /etc/freeradius/certs/server.key ) then ln -s /etc/ssl/private/ssl-cert-snakeoil.key /etc/freeradius/certs/server.key sed -i -e 's,^\([ ]*private_key_file = \${certdir}\)/server.pem$,\1/server.key,' /etc/freeradius/eap.conf if getent group ssl-cert >/dev/null; then # freeradius-common dependency also provides us with adduser adduser --quiet freerad ssl-cert fi fi if egrep -q '^[ ]*CA_file = \${cadir}/ca.pem' /etc/freeradius/eap.conf && \ test ! -f /etc/freeradius/certs/ca.pem then ln -s /etc/ssl/certs/ca-certificates.crt /etc/freeradius/certs/ca.pem fi if egrep -q '^[ ]*random_file = \${certdir}/random' /etc/freeradius/eap.conf && \ test ! -f /etc/freeradius/certs/random then sed -i -e 's,^\([ ]*random_file = \)\${certdir}/random$,\1/dev/urandom,' /etc/freeradius/eap.conf fi if egrep -q '^[ ]*dh_file = \${certdir}/dh' /etc/freeradius/eap.conf && \ test ! -f /etc/freeradius/certs/dh then # ssl-cert dependency also provides us with openssl openssl dhparam -out /etc/freeradius/certs/dh 1024 fi fi fi if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d freeradius $action || true else /etc/init.d/freeradius $action fi ;; abort-upgrade) if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d freeradius restart || true else /etc/init.d/freeradius restart fi ;; abort-remove) if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d freeradius start || true else /etc/init.d/freeradius start fi ;; abort-deconfigure) ;; esac #DEBHELPER# exit 0 debian/freeradius-postgresql.postinst0000775000000000000000000000374012210116444015331 0ustar #! /bin/sh set -e update_fs_from_statoverride() { # I wish a simple dpkg-statoverride --update $file just did # the right thing, but it doesn't, so we have to do it manually. type=$1 user=$2 group=$3 mode=$4 file=$5 if [ -n "$type" -a -n "$group" -a -n "$mode" -a -n "$file" ]; then if [ "$(find $file -maxdepth 0 -type $type -group $group -perm $mode)" = "" -a -$type $file ]; then chgrp $group $file chmod $mode $file fi fi } case "$1" in configure) for file in /etc/freeradius/sql/postgresql/cisco_h323_db_schema.sql \ /etc/freeradius/sql/postgresql/counter.conf \ /etc/freeradius/sql/postgresql/dialup.conf \ /etc/freeradius/sql/postgresql/ippool.conf \ /etc/freeradius/sql/postgresql/ippool.sql \ /etc/freeradius/sql/postgresql/nas.sql \ /etc/freeradius/sql/postgresql/schema.sql \ /etc/freeradius/sql/postgresql/update_radacct_group_trigger.sql \ /etc/freeradius/sql/postgresql/voip-postpaid.conf do set +e so=$(dpkg-statoverride --list $file) ret=$? set -e if [ -z "$2" ]; then if [ $ret != 0 ]; then dpkg-statoverride --add --update root freerad 0640 $file fi else update_fs_from_statoverride f $so fi done for dir in /etc/freeradius/sql \ /etc/freeradius/sql/postgresql do set +e so=$(dpkg-statoverride --list $dir) ret=$? set -e if [ -z "$2" ]; then if [ $ret != 0 ]; then dpkg-statoverride --add --update root freerad 2751 $dir fi else update_fs_from_statoverride d $so fi done if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d freeradius force-reload else /etc/init.d/freeradius force-reload fi ;; esac #DEBHELPER# exit 0 debian/freeradius-common.install0000664000000000000000000000011512210116444014167 0ustar usr/share/freeradius/* etc/freeradius/radiusd.conf etc/freeradius/dictionary debian/freeradius.default0000664000000000000000000000007312210116444012662 0ustar # Options for the FreeRADIUS daemon. FREERADIUS_OPTIONS="" debian/libfreeradius-dev.install0000664000000000000000000000027712210116444014155 0ustar usr/lib/freeradius/libfreeradius-radius.so usr/lib/freeradius/libfreeradius-eap.so usr/lib/freeradius/libfreeradius-radius.a usr/lib/freeradius/libfreeradius-eap.a usr/include/freeradius/*.h debian/freeradius-iodbc.postinst0000775000000000000000000000052112210116444014200 0ustar #! /bin/sh set -e case "$1" in configure) if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d freeradius force-reload else /etc/init.d/freeradius force-reload fi ;; abort-upgrade) ;; abort-remove) ;; abort-deconfigure) ;; esac #DEBHELPER# debian/control0000664000000000000000000001211712210116444010570 0ustar Source: freeradius Build-Depends: debhelper (>= 7.0.50~), dpkg-dev (>= 1.13.19), dh-autoreconf, autotools-dev, libtool (>= 2.2), libltdl-dev (>= 2.2), libssl-dev, libpam0g-dev, libmysqlclient-dev, libgdbm-dev, libldap2-dev, libsasl2-dev, libiodbc2-dev, libkrb5-dev, libperl-dev, libpcap-dev, python-dev, libsnmp-dev, libpq-dev Section: net Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Josip Rodin Uploaders: Stephen Gran , Mark Hymers Standards-Version: 3.9.2 Homepage: http://www.freeradius.org/ XS-Testsuite: autopkgtest Package: freeradius Architecture: any Depends: lsb-base (>= 3.1-23.2), ${shlibs:Depends}, ${misc:Depends}, freeradius-common, libfreeradius2 (= ${binary:Version}), ssl-cert, ca-certificates, adduser Provides: radius-server Recommends: freeradius-utils Suggests: freeradius-ldap, freeradius-postgresql, freeradius-mysql, freeradius-krb5 Description: high-performance and highly configurable RADIUS server FreeRADIUS is a high-performance RADIUS server with support for: - many vendor-specific attributes - proxying and replicating requests by any criteria - authentication on system passwd, SQL, Kerberos, LDAP, users file, or PAM - multiple DEFAULT configurations - regexp matching in string attributes and lots more. Package: freeradius-common Depends: ${misc:Depends}, adduser Architecture: all Conflicts: radiusd-livingston, xtradius, yardradius Replaces: freeradius (<< 2.0) Description: FreeRADIUS common files This package contains common files used by several of the other packages from the FreeRADIUS project. Package: freeradius-utils Architecture: any Replaces: freeradius (<< 2.0) Conflicts: radiusd-livingston, yardradius Depends: ${shlibs:Depends}, ${misc:Depends}, freeradius-common, libfreeradius2 (= ${binary:Version}) Recommends: libdbi-perl Description: FreeRADIUS client utilities This package contains various client programs and utilities from the FreeRADIUS Server project, including: - radclient - radeapclient - radlast - radsniff - radsqlrelay - radtest - radwho - radzap - rlm_dbm_cat - rlm_dbm_parser - rlm_ippool_tool - smbencrypt Package: libfreeradius2 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: FreeRADIUS shared library The FreeRADIUS projects' libfreeradius-radius and libfreeradius-eap, used by the FreeRADIUS server and some of the utilities. Package: libfreeradius-dev Architecture: any Section: libdevel Depends: ${shlibs:Depends}, ${misc:Depends}, libfreeradius2 (= ${binary:Version}) Description: FreeRADIUS shared library development files The FreeRADIUS projects' libfreeradius-radius and libfreeradius-eap, used by the FreeRADIUS server and some of the utilities. . This package contains the development headers and static library version. Package: freeradius-krb5 Architecture: any Depends: freeradius (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: kerberos module for FreeRADIUS server The FreeRADIUS server can use Kerberos to authenticate users, and this module is necessary for that. Package: freeradius-ldap Architecture: any Depends: freeradius (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: LDAP module for FreeRADIUS server The FreeRADIUS server can use LDAP to authenticate users, and this module is necessary for that. Package: freeradius-postgresql Architecture: any Depends: freeradius (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: PostgreSQL module for FreeRADIUS server The FreeRADIUS server can use PostgreSQL to authenticate users and do accounting, and this module is necessary for that. Package: freeradius-mysql Architecture: any Depends: freeradius (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: MySQL module for FreeRADIUS server The FreeRADIUS server can use MySQL to authenticate users and do accounting, and this module is necessary for that. Package: freeradius-iodbc Architecture: any Depends: freeradius (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: iODBC module for FreeRADIUS server The FreeRADIUS server can use iODBC to access databases to authenticate users and do accounting, and this module is necessary for that. Package: freeradius-dialupadmin Architecture: all Depends: php5 | libapache2-mod-php5 | php5-cgi, apache2-mpm-prefork | httpd, ${perl:Depends}, ${misc:Depends} Suggests: php5-mysql | php5-pgsql, php5-ldap, libdate-manip-perl Description: set of PHP scripts for administering a FreeRADIUS server These scripts provide a web-based interface for administering a FreeRADIUS server which stores authentication information in either SQL or LDAP. Package: freeradius-dbg Architecture: any Section: debug Priority: extra Depends: freeradius (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: debug symbols for the FreeRADIUS packages FreeRADIUS is a modular, high performance and feature-rich RADIUS server. This package contains the detached debugging symbols for the Debian FreeRADIUS packages. debian/freeradius.docs0000664000000000000000000000010012210116444012155 0ustar debian/README.rfc CREDITS debian/tmp/usr/share/doc/freeradius/* debian/libfreeradius2.install0000664000000000000000000000004712210116444013456 0ustar usr/lib/freeradius/libfreeradius*2*.so debian/freeradius-mysql.prerm0000664000000000000000000000134312210116444013527 0ustar #! /bin/sh set -e case "$1" in remove) for file in /etc/freeradius/sql/mysql/counter.conf \ /etc/freeradius/sql/mysql/dialup.conf \ /etc/freeradius/sql/mysql/ippool.conf \ /etc/freeradius/sql/mysql/ippool.sql \ /etc/freeradius/sql/mysql/nas.sql \ /etc/freeradius/sql/mysql/schema.sql do if dpkg-statoverride --list $file >/dev/null; then dpkg-statoverride --remove $file fi done for dir in /etc/freeradius/sql \ /etc/freeradius/sql/mysql do if dpkg-statoverride --list $dir >/dev/null; then dpkg-statoverride --remove $dir fi done ;; esac #DEBHELPER# exit 0 debian/freeradius.examples0000664000000000000000000000100512210116444013050 0ustar src/billing/ scripts/clients.pl scripts/create-users.pl scripts/cryptpasswd scripts/cryptpasswd.in scripts/exec-program-wait scripts/Makefile scripts/min-includes.pl scripts/radiusd2ldif.pl scripts/radiusd.cron.daily scripts/radiusd.cron.daily.in scripts/radiusd.cron.monthly scripts/radiusd.cron.monthly.in scripts/radiusd.sh scripts/radsqlrelay scripts/radwatch scripts/radwatch.in scripts/rc.radiusd scripts/rc.radiusd.in scripts/users2mysql.pl debian/tmp/etc/freeradius/example.pl debian/tmp/etc/freeradius/certs debian/freeradius.postrm0000775000000000000000000000177112210116444012573 0ustar #! /bin/sh set -e case "$1" in remove) ;; purge) update-rc.d -f freeradius remove >/dev/null # Remove dangling links from sites-enabled. for link in /etc/freeradius/sites-enabled/*; do if [ -L "$link" ] && [ ! -e "$link" ]; then rm -f "$link" fi done if [ -L /etc/freeradius/certs/server.pem ]; then rm -f /etc/freeradius/certs/server.pem fi if [ -L /etc/freeradius/certs/server.key ]; then rm -f /etc/freeradius/certs/server.key fi if [ -L /etc/freeradius/certs/ca.pem ]; then rm -f /etc/freeradius/certs/ca.pem fi if [ -L /etc/freeradius/certs/random ]; then rm -f /etc/freeradius/certs/random fi rm -f /etc/freeradius/certs/dh rm -f /var/log/freeradius/radius.log* /var/log/freeradius/radwtmp* ;; esac #DEBHELPER# exit 0 debian/freeradius-common.postrm0000664000000000000000000000163112210116444014051 0ustar #! /bin/sh set -e case "$1" in remove) ;; purge) rmdir --ignore-fail-on-non-empty /etc/freeradius # If we haven't managed to remove /etc/freeradius, make # sure that freerad:freerad doesn't own anything before # we remove the user and group test ! -d /etc/freeradius || find /etc/freeradius -user freerad -exec chown root "{}" \; || true test ! -d /etc/freeradius || find /etc/freeradius -group freerad -exec chgrp root "{}" \; || true if [ -x `which deluser` ]; then deluser --quiet freerad shadow || true deluser --quiet freerad || true fi if [ -x `which delgroup` ]; then delgroup --quiet freerad || true fi ;; *) ;; esac #DEBHELPER# exit 0 debian/freeradius.dirs0000664000000000000000000000016712210116444012203 0ustar etc/freeradius/certs etc/freeradius/sites-enabled etc/freeradius/sites-available usr/lib/freeradius var/log/freeradius debian/changelog0000664000000000000000000013371213136126670011056 0ustar freeradius (2.1.12+dfsg-1.2ubuntu8.2) trusty-security; urgency=medium * SECURITY UPDATE: read/write overflow in make_secret() - debian/patches/CVE-2017-10978.patch: check lengths in src/lib/radius.c. - CVE-2017-10978 * SECURITY UPDATE: write overflow in rad_coalesce - debian/patches/CVE-2017-10979.patch: check for long attributes in src/lib/dhcp.c, src/lib/radius.c. - CVE-2017-10979 * SECURITY UPDATE: memory leak in decode_tlv() - debian/patches/CVE-2017-10980.patch: fix memory leak in src/lib/dhcp.c. - CVE-2017-10980 * SECURITY UPDATE: memory leak in fr_dhcp_decode() - debian/patches/CVE-2017-10981.patch: fix another memory leak in src/lib/dhcp.c. - CVE-2017-10981 * SECURITY UPDATE: read overflow in fr_dhcp_decode_options() - debian/patches/CVE-2017-10982.patch: check for long options in src/lib/dhcp.c. - CVE-2017-10982 * SECURITY UPDATE: read overflow when decoding option 63 - debian/patches/CVE-2017-10983.patch: decode correct option in src/lib/dhcp.c. - CVE-2017-10983 -- Marc Deslauriers Wed, 26 Jul 2017 10:56:56 -0400 freeradius (2.1.12+dfsg-1.2ubuntu8.1) trusty; urgency=medium * Manage process in upstart properly and fix logrotate reload (LP: #1406105) -- Robert C Jennings Tue, 04 Aug 2015 21:00:25 -0500 freeradius (2.1.12+dfsg-1.2ubuntu8) trusty; urgency=medium * SECURITY UPDATE: denial of service and possible code execution via buffer overflow in rlm_pap module - debian/patches/CVE-2013-2015.patch: properly handle buffer size in src/modules/rlm_pap/rlm_pap.c. - CVE-2014-2015 -- Marc Deslauriers Mon, 24 Feb 2014 09:13:43 -0500 freeradius (2.1.12+dfsg-1.2ubuntu7) trusty; urgency=medium * Patch auto tools files to build on ppc64el. -- Matthias Klose Sat, 28 Dec 2013 21:40:21 +0100 freeradius (2.1.12+dfsg-1.2ubuntu6) trusty; urgency=low * Rebuild for Perl 5.18. -- Colin Watson Wed, 23 Oct 2013 11:47:40 +0100 freeradius (2.1.12+dfsg-1.2ubuntu5) saucy; urgency=low * d/test/test-freeradius.py: Update test setup for switch to upstart in 2.1.12+dfsg-1.2ubuntu3, fixing failing DEP-8 tests. -- James Page Fri, 30 Aug 2013 14:49:35 +0100 freeradius (2.1.12+dfsg-1.2ubuntu4) saucy; urgency=low * fix FTBFS: - add -lpthread to the libfreeradius.so build - add -lssl -lcrypto to the libeap.so build -- Michael Vogt Tue, 09 Jul 2013 15:35:08 +0200 freeradius (2.1.12+dfsg-1.2ubuntu3) saucy; urgency=low * add freeradius.upstart job (LP: #1187742) -- Michael Vogt Tue, 09 Jul 2013 14:34:34 +0200 freeradius (2.1.12+dfsg-1.2ubuntu2) saucy; urgency=low * d/tests: added autopkgtests -- Yolanda Robla Fri, 24 May 2013 16:06:20 +0200 freeradius (2.1.12+dfsg-1.2ubuntu1) raring; urgency=low * Fix FTBFS with multiarched python. -- Dmitrijs Ledkovs Sat, 29 Dec 2012 00:54:44 +0200 freeradius (2.1.12+dfsg-1.2) unstable; urgency=high * Non-maintainer upload. * Fix expired passwords when using the unix module (CVE-2011-4966, Closes: #694407). -- Kees Cook Sun, 16 Dec 2012 12:44:35 -0800 freeradius (2.1.12+dfsg-1.1) unstable; urgency=high * Non-maintainer upload by the Security Team. * Fix pre-authentication buffer overflow in EAP handling (CVE-2012-3547; Closes: #687175, #687178). -- Nico Golde Tue, 11 Sep 2012 19:38:02 +0200 freeradius (2.1.12+dfsg-1) unstable; urgency=low * New upstream version, closes: #675698. + Fix for a segmentation fault in rlm_eap, closes: #645998. * Backport upstream commits to fix our bug reports: + Fix for a crash on SIGHUP in config file handling, 378f2517357f11f9900c3799c6a469ee2fda7bdf ab73a3debf93492804e7af253ba45a7b017a18d1 closes: #606450 + Fix for a segmentation fault in radmin through environment variables, ce1bb741773b253c4ccf24accccf6305e202a322 516dbaabf0ea80d0ff0643dc2ae9a10c4d31494c closes: #662194 * Use dpkg-buildflags for configure, by Moritz Muehlenhoff, closes: #657838. * Mark rlm_jradius as stable to get it to build and ship, closes: #599067. * Switch to dpkg-source 3.0 (quilt) format. * Polished packaging a wee bit and updated the Standards-Version. -- Josip Rodin Fri, 29 Jun 2012 14:32:33 +0200 freeradius (2.1.10+dfsg-3.1) unstable; urgency=low * Non-maintainer upload. * Fix "FTBFS: libfreeradius-radius-2.1.10.so: could not read symbols: Invalid operation": adjust target dependencies in debian/rules: make sure the patch target is not only called for build but also for build-{arch,indep}. (Closes: #666311) -- gregor herrmann Wed, 02 May 2012 16:58:57 +0200 freeradius (2.1.10+dfsg-3) unstable; urgency=low * Fixed the silly error that rendered previous attempts to use the right libtool functions useless, hopefully finally closes: #416266. * Link radeapclient with libradius to fix linking with binutils-gold, closes: #553387. * Fix the debug mode crashing when home server doesn't respond to a proxied request. Dmitry Borodaenko cherry-picked upstream commits 540a0515de93d99ef45f97b9114185f159587b51 and ab972f1f9b724fc0b71e6ca726078c92ad26bc6b, thanks, closes: #609870. * Fixed udpfromto IPv6 breakage because of broken offsetof tests, backported upstream b4f0c7ed4dc9811d8dfa982540ed8cb721cc854a (one minor change necessary) as well as 655f0786d60fe02440763df69b1aaf5110706690, as well as the simple IPV6_RECVPKTINFO change, hopefully it activates all the right modern IPv6 functions and closes: #606866. -- Josip Rodin Thu, 05 May 2011 23:50:20 +0200 freeradius (2.1.10+dfsg-2) unstable; urgency=medium * The zombie period start time variable mistakenly got set to a random value because of an upstream typo. Cherry-picked upstream commit 7b7dff7724721f8af5fd163f2292d427a869992d into a Debian patch, requested for squeeze in #600465. * Since 2.1.9, the daemon stopped reopening the default radius.log file constantly, which means the default logrotate setup breaks the default logging. D'oh. We now have to send SIGHUP to the daemon as a postrotate action, which makes it reopen log files and continue normally. * Added delaycompress to the logrotate options, just to be on the safe side. * Added a reload action into the init script accordingly, so that the right pidfile is picked up (one that can be overridden by the admin in /etc/default/freeradius, available since the last release). * Called reload from the postrotate section, closes: #602815. * However, the latter signal also makes the server re-read configuration files, but unlike the initial server start, this all happens under the unprivileged user. That in turn means that if by any chance there is any part of FR configuration that happens not to be readable by group freerad (or whatever non-default is configured), the reload will fail, effectively silently, as the log has been moved away. Gah. So we have to make an effort to ensure that the configuration files are still readable by that user, otherwise the reload fails and the aforementioned bug is not fixed. The files seem to revert to root:root upon conffile actions, at least that's what happened to me and I think that was the cause. So, on upgrade, try to re-apply the dpkg-statoverrides on our /etc/freeradius/* stuff, whatever they are, under the assumption they will let the freerad group read config files as is the initial setup. (I wish dpkg-statoverride --update $file just did the right thing, but it doesn't, so there's a new local function that does that.) * While doing the latter, noticed that we were checking for directories in dpkg-statoverride --list output with trailing slashes, but they get output without it, so it was a no-op. Fixed the check by removing the trailing slashes. Also then noticed that we were grepping --list output, but it takes an optional glob pattern, so saved us that pointless grep fork by using that facility, just as described in the policy manual. * force-reload switches from restart to reload, per policy 9.3.2. * lenny backport needed also libltdl-dev (2.2.x) to build properly, rather than libltdl3-dev, which is obsolete and doesn't make sense anyway. -- Josip Rodin Sat, 13 Nov 2010 15:21:30 +0100 freeradius (2.1.10+dfsg-1) unstable; urgency=medium * New upstream version, closes a bunch of reproducible SNAFUs, including two tagged as security issues, CVE-2010-3696, CVE-2010-3697, closes: #600176. * Build-depend on newer Libtool because of lt_dladvise_init(), also upstream now has a configure check so we no longer need a patch, yet we still don't want the old behaviour. Noticed by John Morrissey, closes: #584151. * Added the /etc/default/freeradius file as suggested by Rudy Gevaert and Matthew Newton, closes: #564716. * Stop symlinking /dev/urandom into /etc/freeradius/certs/random, it breaks grep -r in /etc. Instead, replace it inside eap.conf, both in the new shipped conffile and in postinst. -- Josip Rodin Thu, 14 Oct 2010 21:51:51 +0200 freeradius (2.1.9+dfsg-1) unstable; urgency=low * New upstream version. + radclient (radtest) should now use IPv4 by default, closes: #569614. * Depend on ca-certificates explicitly, closes: #569601. * I mistook ca.pem for the locally selected acceptable CA, whereas that actually just happens to mean DebConf.org CA, and we want the former by default. That in turn is in /etc/ssl/certs/ca-certificates.crt. Obviously later the users can trivially change this, but this looks like a reasonably reliable default that doesn't involve a lot of magic that can delay or break postinst invocations. In the future, eap.conf will become modules/eap and this will not be so critical. * The private_key_file = ${certdir}/server.pem default doesn't get along with snakeoil, or common sense really (why would you keep a secret key in the same file as the non-secret certificate?), and could have broken upgrades if people accepted the conffile prompt, so adjusted the default conffile too, and adjusted the postinst upgrade logic as well. * Enable HAVE_LT_DLADVISE_INIT as it fixes the module symbol lookup errors from additional libraries, closes: #416266. * Explicate source format as 1.0. * Add ${misc:Depends} to all binary packages. * Update standards version to 3.8.4, no changes necessary. -- Josip Rodin Sun, 30 May 2010 12:48:55 +0200 freeradius (2.1.8+dfsg-1) unstable; urgency=medium * New upstream version. + Fixes several showstopper bugs, hence increased urgency. + Includes OpenSSL+GPL license exception, closes: #499120. + Fixes typo in a warning, closes: #523074. * Added libssl-dev into build-depends and enabled the building of modules that just depend on OpenSSL, namely rlm_eap_peap, rlm_eap_tls, rlm_eap_ttls, and rlm_otp, closes: #266229. * Because the configuration of EAP+SSL modules now actually kicks in, its non-existent certificate file would break the server start by default. Depend on ssl-cert, make use of make-ssl-cert and openssl, and add freerad to the ssl-cert group in the postinst to get us past the problematic default settings so that we don't crash and burn on clean upgrades, but otherwise leave everything else to the admin. * Ship /etc/freeradius/attrs.access_challenge, like the others. * Moved otp.conf and snmp.conf statoverride handling to the preinst and used rm_conffile on them as well. * Updated upstream changelog handling a bit. -- Josip Rodin Sat, 02 Jan 2010 20:22:47 +0100 freeradius (2.1.7+dfsg-2) unstable; urgency=low * Ship radmin and raddebug in the freeradius package. * Correct section number inside raddebug(8) so it doesn't get misplaced. -- Josip Rodin Tue, 24 Nov 2009 15:29:59 +0100 freeradius (2.1.7+dfsg-1) unstable; urgency=low * Adopting the package, closes: #536623. * New upstream version, closes: #513484. + Fixes the blooper in unlang evaluation logic, closes: #526175. * Used quilt (and added README.source), and moved upstream file patching into debian/patches/. The source is no longer in collab-maint git (to make it simpler for me to finally get this out the door), but kept the .gitignore should we need that again. * Dropped the dialup_admin/bin/backup_radacct patch (integrated upstream). * Dropped the raddb/Makefile patch (problem no longer exists upstream). * Dropped the lib/packet.c lib/radius.c main/listen.c patches (was from upstream 2.0.5 anyway). * Dropped references to otp.conf, it no longer exists upstream. Keep removing the conffile statoverride in prerm. * Dropped references to snmp.conf, it no longer exists upstream. Keep removing the conffile statoverride in prerm. * Ship /etc/freeradius/modules/* in the freeradius package. * Stop shipping sites-enabled symlinks in the package and instead create them only on initial install, thanks to Matej Vela, closes: #533396. * Add export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" to the init script at the request of John Morrissey, closes: #550143. * Stop installing /var/run/freeradius in the package to silence Lintian. The init script already recreates it at will. * Remove executable bit from example.pl to silence Lintian. -- Josip Rodin Mon, 23 Nov 2009 03:57:37 +0100 freeradius (2.0.4+dfsg-7) unstable; urgency=low * Ignore rmdir failure on clean (closes: #545932) * Do a better job of catching errors in the init script (closes: #533390) * Init headers fixup (closes: #541882) * Clean up some logs so dpkg can successfully rmdir (closes: #530727) -- Stephen Gran Sun, 13 Sep 2009 19:33:12 +0100 freeradius (2.0.4+dfsg-6) unstable; urgency=low * Fix unsafe use of tempfile (closes: #496389) -- Stephen Gran Mon, 25 Aug 2008 14:18:48 +0100 freeradius (2.0.4+dfsg-5) unstable; urgency=low [ Mark Hymers ] * Cherry pick commit from 2.0.5 which fixes port binding issues. Closes: #489773. [ Stephen Gran ] * add PERL_SYS_INIT3 and PERL_SYS_TERM calls to rlm_perl. (closes: #495073) * Make the SQL modules link against rlm_sql.so in the most horrific (and only) way possible. (closes: #448699) -- Stephen Gran Thu, 14 Aug 2008 19:15:30 +0100 freeradius (2.0.4+dfsg-4) unstable; urgency=low * Create links from sites-enabled to sites-available for the files that upstream enables by default (closes: #483914) -- Stephen Gran Sun, 01 Jun 2008 12:24:35 +0100 freeradius (2.0.4+dfsg-3) unstable; urgency=low * brown paper bag release * Really actually do the statoverride I thought we were doing with -2 (closes: #482380) -- Stephen Gran Thu, 22 May 2008 11:18:12 +0100 freeradius (2.0.4+dfsg-2) unstable; urgency=low * Install /var/log/freeradius 0750 so that people writing their passwords to logfiles don't accidentally leak them without noticing (closes: #482085) -- Stephen Gran Tue, 20 May 2008 19:38:27 +0100 freeradius (2.0.4+dfsg-1) unstable; urgency=low * Ok, actually remove all the cruft in debian/ shipped by upstream. This means repacking the tarball and all that, but it also means dpkg-source won't get the chance to ignore removed files, resulting in files reappearing, but not locally (closes: #481406) * Also remove config.{cache,log} in clean target - damn you gitignore -- Stephen Gran Mon, 19 May 2008 03:55:55 +0100 freeradius (2.0.4-3) unstable; urgency=low * I have no god damn idea why the buildds are adding manpages to the wrong binary. Reuploading with DH_VERBOSE=1 to see if we can find it. We certainly can't reproduce it in our local builds, even calling the same targets in the same order as the buildds. -- Stephen Gran Mon, 19 May 2008 00:17:06 +0100 freeradius (2.0.4-2) unstable; urgency=low * freeradius-{common,utils} needs to Conflict: with other radius implementations that share files (closes: #480682) -- Stephen Gran Sun, 11 May 2008 18:41:45 +0100 freeradius (2.0.4-1) unstable; urgency=low * New upstream release * Make all directories in /etc/freeradius group +x (closes: #479835) -- Stephen Gran Fri, 09 May 2008 12:58:55 +0100 freeradius (2.0.3-1) unstable; urgency=low [ Mark Hymers ] * New upstream release * Bump Build-Dep on debhelper to 6.0.7 as we use dh_lintian * Delete lots of obsolete conffiles [ Stephen Gran ] * Create a -common package for some extra file that the -utils package needs. Also stuff in manpages and other arch all files to reduce the size of the unnecessarily repeated stuff in the archive * Change chown/chmod calls to dpkg-statoverride -- Mark Hymers Sat, 03 May 2008 17:07:42 +0100 freeradius (2.0.2-1) unstable; urgency=low * Yet another new upstream version (closes: #465475) * Cleanup manpages * Add lintian overrides for rpath - this is intentional * Packaging is now being done in git, we're dropping dpatch * Split out client utilities (closes: #470977) - this means we also need to split the library so the two binary packages can use it * Major package rework -- Stephen Gran Sun, 16 Mar 2008 22:58:16 +0000 freeradius (2.0.0-1) unstable; urgency=low * New upstream version * Patches: - freshen 02-radiusd-to-freeradius - disable 03-dialupadmin-help until it's reworked properly -- Stephen Gran Thu, 10 Jan 2008 23:05:50 +0000 freeradius (1.1.7-1) unstable; urgency=low * New upstream version * Update debian/copyright to reflect reality: - package is GPL v2 only, so refer to the correct file in common-licenses - Remove explanation of wy postgres and snmp modules can't be shipped, since we do ship them. * Remove 04-configure-openssl.dpatch, --without-openssl applied upstream -- Stephen Gran Thu, 09 Aug 2007 10:09:20 +0100 freeradius (1.1.6-4) unstable; urgency=low The "Give me GPLv2 compatibility or give me FTBFS" release * Fix rlm_krb5 not to link with openssl unless it actually needs to * debian/rules: move dependency on patch target to config.status * debian/rules: FTBFS if a package accidentally directly links to openssl -- Stephen Gran Wed, 04 Jul 2007 17:08:45 +0100 freeradius (1.1.6-3) unstable; urgency=low * Change freeradius-dbg to Priority: extra. * After discussions with one of the ftp-assistants, we can ship freeradius-postgresql in main. Yey! (Closes: #264649, #382329) -- Mark Hymers Thu, 21 Jun 2007 13:32:09 +0100 freeradius (1.1.6-2) unstable; urgency=low [ Mark Hymers ] * Add freeradius-dbg package. [ Stephen Gran ] * Update debian/control for php5 (dialupadmin) (closes: #424788, #412701) -- Stephen Gran Thu, 31 May 2007 02:47:02 +0100 freeradius (1.1.6-1) unstable; urgency=low * New upstream release. Closes: #420003. -- Mark Hymers Thu, 19 Apr 2007 15:14:05 +0100 freeradius (1.1.5-1) unstable; urgency=low * New upstream release. Closes: #415980 * Remove 01-fix-proxy.dpatch as it was a backport from upstream. * otppasswd.sample is no longer provided so make sure we remove the conffile properly in preinst. * Update my email address and remove Paul from Uploaders. Thanks to him for previously maintaining the package. * Change so that we start at S50 and stop at K19 so that we start after services we depend on and stop before them. Closes: #408665. Note that is only for new installs. -- Mark Hymers Fri, 13 Apr 2007 13:14:08 +0100 freeradius (1.1.3-3) unstable; urgency=medium * Fix POSIX compliance problem in init script. Closes: #403384. -- Mark Hymers Sat, 16 Dec 2006 20:45:11 +0000 freeradius (1.1.3-2) unstable; urgency=low [ Stephen Gran ] * Check for existence of pidfile in initscript. * Clean some old cruft from debian/rules * Write dialup_admin/Makefile * Make binNMU safe * Some lsb init headers [ Mark Hymers ] * Merge upstream patch to deal with proxy port settings. Closes: #388024. * Rewrite large parts of the Debian build system. -- Stephen Gran Sat, 7 Oct 2006 21:08:35 +0100 freeradius (1.1.3-1) unstable; urgency=low [ Stephen Gran ] * Add and rework ubuntu /var/run/tmpfs patch * Add LSB init script headers * Actually trap errors in init script, how about? [ Mark Hymers ] * New upstream version. * New version of autotools in 1.1.3. Closes: #380204 * Remove previous patches merged upstream: - 01-actually_check_for_unset_password.dpatch * Only do user creation, group addition, chmod and chown stuff in postinst on an initial install to avoid clobbering local changes. -- Mark Hymers Wed, 23 Aug 2006 14:48:57 +0100 freeradius (1.1.2-2) unstable; urgency=low [ Stephen Gran ] * Acknowledge my previous NMU's (closes: #351732, #359042) * Init scripts overhaul: - now use reload on upgrade of modules - replace sleep statements with --retry, as time based tests are fragile - no longer exit with an error if stop fails because the daemon isn't running (closes: #374670, #351735) - stop using command -v in /bin/sh scripts * General maintainer script overhaul: - Don't rm -rf something in /etc (ouch) - Use chown -R instead of 'find .. -exec' - should not need to manually remove the init script on purge (it's a dpkg managed conffile) - Only do user management stuff if user is missing. No point rerunning it every upgrade. - Install /etc/freeradius/dictionary with relaxed permissions, but never touch it again (closes: #334299) - switch to debhelper files where possible. I like an easy to read Makefile. * Arg. Move README.rfc to the freeradius package where it belongs. [ Mark Hymers ] * Document building SSL/PostgreSQL modules in debian/rules, add control.postgresql to make it more convenient. Tested on AMD64 using system libtool. -- Stephen Gran Sun, 25 Jun 2006 23:06:16 +0100 freeradius (1.1.2-1) unstable; urgency=low [ Mark Hymers ] * New maintainers * New upstream version. * Remove previous patches merged upstream: - 01_NET-SNMP_build_support.dpatch - 02_document_actual_shared_secret_maximum_length.dpatch - 12_more_dialup_admin_various_fixes.dpatch - 14_broken_parse.dpatch - 15_CVE-2006-1354.dpatch * Use --with-system-libtool during configure. Add B-D: on libtool Removes obsolete dpatches: - 06_libtool14_vs_rlm_eap_tls.dpatch - 13_a_libtool_to_call_your_own.dpatch * Remove freeradius.undocumented as we don't install links to undocumented(7) anymore (not recommended since policy 3.5.8.0) [ Stephen Gran ] * Update to Standards Version 3.7.2 (no changes) * Remove doc/rfc/ to make -legal happy (closes: #365192) - this means repacked tarball. See README.rfc for details * Test for unset variable, rather than empty variable in clean_radacct, monthly_tot_stats and truncate_radacct (closes: #374053) -- Mark Hymers Sat, 17 Jun 2006 16:05:19 +0100 freeradius (1.1.0-1.2) unstable; urgency=high * Non-maintainer upload. * [ CVE-2006-1354 ]: src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c: Due to insufficient input validation it is possible for a remote attacker to bypass authentication or cause a denial of service. (closes: #359042) -- Stephen Gran Wed, 17 May 2006 11:22:28 -0500 freeradius (1.1.0-1.1) unstable; urgency=low * Non-maintainer upload. * Upstream patch to fix parsing config file (closes: #351732) Fixes: fails to start on amd64 (error in dictionary parsing code) -- Stephen Gran Sat, 1 Apr 2006 11:07:55 +0100 freeradius (1.1.0-1) unstable; urgency=low * ReDebianise upstream tarball: - Deleted RFCs: 2243 2289 2433 2548 2618 2619 2620 2621 2716 2759 2809 2865 2866 2867 2868 2869 2882 2924 3162 3575 3576 3579 3580 draft-kamath-pppext-eap-mschapv2-00 * New FreeRADIUS modules marked stable by new upstream release - rlm_perl - rlm_sqlcounter - rlm_sql_log + radsqlrelay - rlm_otp (formerly rlm_x99_token, not built as it depends on OpenSSL) * Remove upstream-integrated patches: - 02_EAP-SIM_doesnt_need_openssl - 03_X99_is_not_stable - 07_manpage_fixups - 09_use_crypth_if_we_have_it - 10_escape_entire_ldap_string - 11_dont_xlat_possibly_bad_usernames_in_bad_accounting_packets - 12_dialup_admin_various_fixes * More dialup-admin fixes from Arve Seljebu - Fix redirects in dialup-admin pages on servers with register_globals turned off. Closes: #333704 - HTTP form fields will always fail is_int, use in_numeric instead Closes: #335149 - Created 12_more_dialup_admin_various_fixes * Update to Policy 3.6.2.0 * Upgrade Debhelper support to V5 * Don't install the .in files with the examples * Prefer libmysqlclient15-dev Closes: #343779 * Shared secrets can only be 31 characters long, note this in clients.conf - Created 02_document_actual_shared_secret_maximum_length Closes: 344606 * Added support for lsb-init functions -- Paul Hampson Sun, 15 Jan 2006 13:34:13 +1100 freeradius (1.1.0-0) unstable; urgency=low * New upstream release. * Update set of patches: - 01_NET-SNMP_build_support.dpatch - 06_libtool14_vs_rlm_eap_tls.dpatch - 13_a_libtool14_to_call_your_own.dpatch -- Nicolas Baradakis Sun, 1 Jan 2006 18:15:47 +0100 freeradius (1.0.5-2) unstable; urgency=low * Stop dragging non-PIC code from libeap.a into rlm_eap_sim.so and rlm_eap.so. (Thanks to Peter Salinger) Closes: #288547 - Rename 06_libtool14_vs_rlm_eap_tls to 06_libtool14_vs_rlm_eap and modify with Peter's changes and some Makefile hackery to get it all linking * Don't rerun configure during the build. (Thanks to Kurt Roeckx) * A whole bunch of dialup-admin fixes from Arve Seljebu and Tobias - Report correct data transfer statistics for users Closes: #329672 - Lower-case sql column names to match creation scripts Closes: #333709 - Fix creation of empty groups Closes: #333739 - Put quote around usernames in HTML output Closes: #333742 - Properly notice when we've got a blank password to SQL Closes: #333744 - Created 12_dialup_admin_various_fixes * Stop using libtool1.4 to build against, now that we can't have it and libltdl3-dev installed at the same time Closes: #279391 - Created 13_a_libtool14_to_call_your_own to get most recent ltmain.sh -- Paul Hampson Sun, 16 Oct 2005 21:26:30 +1000 freeradius (1.0.5-1) unstable; urgency=high * Urgency high for security fixes below, all reported upstream * ReDebianise upstream tarball: - Deleted RFCs: 2243 2289 2433 2548 2618 2619 2620 2621 2716 2759 2809 2865 2866 2867 2868 2869 2882 2924 3162 3575 3576 3579 3580 draft-kamath-pppext-eap-mschapv2-00 * Add missed build-dependancy on dpatch (>=2) * Update to Standards-Version 3.6.2.0 - No changes needed * Repair some minorly broken manpages - Created 07_manpage_fixups.dpatch * Security fixes stolen from CVS release_1_0 branch: - Be sure we use crypt.h if we have it, to avoid segfaulting on a bad built-in crypt() definition, spotted by Konstantin Kubatkin + Created 09_use_crypth_if_we_have_it - Make sure we escape the entire LDAP string, instead of aborting as soon as it becomes possible to be out of space + Created 10_escape_entire_ldap_string - Don't xlat the UserName attribute before we can be sure of meeting any escape sequences it may contain, spotted by Primoz Bratanic + Created 11_dont_xlat_possibly_bad_usernames_in_bad_accounting_packets * Depend on adduser, so our postinst can create the freerad user * Don't install the .in versions of the example scripts. -- Paul Hampson Mon, 19 Sep 2005 15:10:40 +1000 freeradius (1.0.5-0) unstable; urgency=low * New Upstream release, from release_1_0 branch - Remove 04_bonus_control_code_in_clients_conf_5 - Remove 05_unbreak_quoted_sql_results * Fix my _name_ in the dpatches * Remove patch to CVS ID header from 05_unbreak_quoted_sql_values so as not to break things when comitting to FreeRADIUS CVS * Take linking fix from FreeRADIUS bugzilla #75 to allow rlm_eap_tls to be linked to by rlm_eap_ttls and rlm_eap_peap even though we don't build them in the Debian archive. (Thanks to Luca Landi for the patch) - Created 06_libtool14_vs_rlm_eap_tls * Fix ownership of files in /var/log/freeradius/ more efficiently (Caught by Guido Trotter) Closes: #326891 -- Paul Hampson Wed, 7 Sep 2005 01:08:07 +1000 freeradius (1.0.4-2) unstable; urgency=low * Fix my email address in the dpatches * Remove extraneous ^g from man/man5/clients.conf.5 - Created 04_bonus_control_code_in_clients_conf_5 * Correct handing of parameterless call of init script, and general init script neatening (Thanks to Derrick Karpo) Closes: #315438 * Correctly leave out the .in files in the examples * Correctly use debhelper after splitting binary make target into binary-arch and binary-indep. (Thanks to Kurt Roeckx for actually hitting the bug) Closes: #315770 * Steal fix from CVS release_1_0 tree for rlm_sql quoted values. (Thanks to Nicolas Baradakis for the fix) - Upstream bugzilla #242, src/modules/rlm_sql/sql.c 1.79.2.2 - Created 05_unbreak_quoted_sql_values -- Paul Hampson Mon, 27 Jun 2005 03:13:48 +1000 freeradius (1.0.4-1) unstable; urgency=low * ReDeianise upstream tarball: - Deleted RFCs: 2243 2289 2433 2548 2618 2619 2620 2621 2716 2759 2809 2865 2866 2867 2868 2869 2882 2924 3162 3575 3576 3579 3580 draft-kamath-pppext-eap-mschapv2-00 * Convert to dpatch, dpatch-2-style interface. - New build-dependancy on dpatch (>= 2) - Created 01_NET-SNMP_build_support - Created 02_EAP-SIM_doesnt_need_openssl - Created 03_X99_is_not_stable * Assemble the freeradius-dialupadmin in the binary-indep make target Closes: #313173 (Thanks to Santiago Vila for spotting this) * Include the example scripts in /usr/share/doc/freeradius/examples/scripts except those three which are installed into the binary by the Makefile. Closes: #314253 (Thanks to Michael Langer for spotting this) * Suggest libdate-manip-perl for freeradius-dialupadmin Closes: #306007 (Thanks to Feng Sian) -- Paul Hampson Wed, 22 Jun 2005 16:03:27 +1000 freeradius (1.0.4-0) unstable; urgency=medium * New upstream release, fixing build problems. * Prefer libpq-dev over postgresql-dev as a build-dependancy. - This requires us to use pgconfig to find the headers. -- Paul Hampson Thu, 16 Jun 2005 13:56:33 +1000 freeradius (1.0.3-0) unstable; urgency=high * New upstream release * Urgency high for some denial-of-service fixes: - SQL injection attacks and DoS (core dump) via buffer overflow. Closes: #307720 -- Alan DeKok Fri, 3 Jun 2005 11:29:34 -0700 freeradius (1.0.2-4) unstable; urgency=high * Security fix stolen from CVS release_1_0 branch: - Always use sql_escape_func when calling radius_xlat - Add a test in sql_escape_func() to check buffer bound when input character needs escaping. - Urgency high as these are (theoretical) security issues. Closes: #307720 (Thanks to Primoz Bratanic and Nicolas Baradakis) -- Paul Hampson Mon, 23 May 2005 18:53:51 +1000 freeradius (1.0.2-3) unstable; urgency=medium * Fixes stolen from CVS release_1_0 branch: - Fix missed SIGCHLD when waiting for external programs when threaded. (Medium urgency as this can easily livelock FreeRADIUS, which is an authentication server.) -- Paul Hampson Mon, 18 Apr 2005 23:46:41 +1000 freeradius (1.0.2-2) unstable; urgency=medium * Get rid of extraneous '%' at the start of every reference to /etc/freeradius-dialupadmin in freeradius-dialupadmin's configuration. Closes: #299749 * Fixes stolen from CVS release_1_0 branch: - Fix checkrad call for NAS ports > 9999999. (sprintf integer overrun, reason for urgency medium.) - Fix inverted test causing crash with pthreads and crypt Closes: #300219 (Thanks Manuel Menal) -- Paul Hampson Wed, 6 Apr 2005 12:33:05 +1000 freeradius (1.0.2-1) unstable; urgency=low * ReDebianise upstream tarball: - Deleted RFCs: 2243 2289 2433 2548 2618 2619 2620 2621 2716 2759 2809 2865 2866 2867 2868 2869 2882 2924 3162 3575 3576 3579 3580 * Allow rlm_eap_sim to build without OpenSSL * Make init script return 1 if reloading kills the server (Thanks to Nicolas Baradakis) Closes: #292170 * Enable Novell eDirectory integration * Enable udpfromto code so that replies come from the same address as the request arrived at * Build-depend on libmysqlclient12-dev as libmysqlclient10 has problems accessing 4.0 series mySQL servers, and libmysqlclient12 can access 4.1 series mySQL servers. -- Paul Hampson Fri, 4 Mar 2005 09:30:40 +1100 freeradius (1.0.2-0) unstable; urgency=low * New upstream release * Update for Debian Policy 3.6.1.1 - Change test if invoke-rc.d as per Policy 9.3.3.2 * freeradius-dialupadmin Suggests php4-mysql | php4-pgsql Closes: #279419 * Added a two-second pause to restart in init.d script Closes: #262635 * FreeRADIUS module packages now depend on the same source version of the main FreeRADIUS package. Closes: #284353 * FreeRADIUS-dialupadmin's default paths in admin.conf are now correct. Closes: #280942 * FreeRADIUS-dialupadmin's help.php3 can now find README. Closes: #280941 -- Paul Hampson Wed, 29 Dec 2004 20:12:52 +1100 freeradius (1.0.1-2) unstable; urgency=high * freeradius-dialupadmin Suggests php4-mysql | php4-pgsql Closes: #279419 * Added a two-second pause to restart in init.d script Closes: #262635 * FreeRADIUS module packages now depend on the same source version of the main FreeRADIUS package. Closes: #284353 * FreeRADIUS-dialupadmin's default paths in admin.conf are now correct. Closes: #280942 * FreeRADIUS-dialupadmin's help.php3 can now find README. Closes: #280941 * Fixes stolen from 1.0.2 CVS: - Bug fix to make udpfromto code work - radrelay shouldn't dump core if it can't read a VP from the detail file. - Only initialize the random pool once. - In rlm_sql, don't escape characters twice. - In rlm_ldap, only claim Auth-Type if a plain text password is present. - Locking fixes in threading code - Fix building on gcc-4.0 by not trying to access static auth_port from other files. -- Paul Hampson Wed, 29 Dec 2004 20:19:42 +1100 freeradius (1.0.1-1) unstable; urgency=high * ReDebianise upstream tarball: - Deleted RFCs: 2243 2289 2433 2548 2618 2619 2620 2621 2716 2759 2809 2865 2866 2867 2868 2869 2882 2924 3162 3575 3576 3579 3580 - Remove CVS directories. * Urgency high for security fix from 1.0.1-0 (CAN-2004-0938, closes: #275136). -- Paul Hampson Thu, 23 Sep 2004 22:28:11 +1000 freeradius (1.0.1-0) unstable; urgency=high * New upstream release * Urgency high for some denial-of-service fixes: - Fix two remote crashes and a remote memory leak in radius packet decoding. -- Paul Hampson Thu, 2 Sep 2004 17:12:23 +1000 freeradius (1.0.0-1) unstable; urgency=low * ReDebianise upstream tarball: - Deleted RFCs: 2243 2289 2433 2548 2618 2619 2620 2621 2716 2759 2809 2865 2866 2867 2868 2869 2882 2924 3162 3575 3576 3579 3580 * Support building with libsnmp5's UCD-SNMP compatiblity mode. - libsnmp{4.2,5} still depend on OpenSSL, so SNMP's still disabled. * Update for Debian Policy 3.6.11 - Change test for invoke-rc.d as per Policy 9.3.3.2 * Disable rlm_eap types PEAP, TLS and TTLS as they depend on OpenSSL. * Disable rlm_sql driver PostgreSQL as it depends on OpenSSL. * Disable rlm_x99_token as it depends on OpenSSL. * Finally, -v is documented in radius(8). - Closes: #151266 * Reword a sentence in radwatch(8) by removing the personal pronoun. - Closes: #264522 -- Paul Hampson Tue, 17 Aug 2004 17:42:40 +1000 freeradius (1.0.0-0) unstable; urgency=low * New upstream release * Added H323 billing stuff to the examples * Created Dialup-Admin package for the PHP-based web FreeRADIUS database (SQL/LDAP) frontend. -- Paul Hampson Sat, 17 Jul 2004 16:21:38 +1000 freeradius (0.9.3-1) unstable; urgency=low * New upstream release, incorporates security fix from 0.9.2-4. * Correct build-dependancy on debhelper. Closes: #234486 * Split iodbc SQL driver into its own package. -- Paul Hampson Tue, 24 Feb 2004 23:56:26 +1100 freeradius (0.9.2-4) unstable; urgency=high * Patch from upstream head: - Fix a remote DoS and possible exploit due to mis-handling of tagged attributes, and Tunnel-Password attribute. -- Paul Hampson Fri, 21 Nov 2003 09:52:51 +1100 freeradius (0.9.2-3) unstable; urgency=low * Removed redundant code to delete contents of a directory on purge which ends up being removed anyway. * Provide a default pam.d configuration. * Fix the usage of dh_installinit to not make the package uninstallable. * Change package removal to not abort if we cannot stop the server. * Debian-archive-fit version of freeradius. Closes: #208620 -- Paul Hampson Tue, 11 Nov 2003 02:12:55 +1100 freeradius (0.9.2-2) unstable; urgency=low * Use dh_installinit rather than doing it by hand This involves renaming the initfile in the source tarball * Only add user freerad to the group shadow on first installation * Only chmod /etc/freeradius to group-readable, not group-read/write * Removed the freerad user when the freerad group is removed * Removed spurious build-dependancy on autoconf2.13 and libtool(1.4) * Build-conflict against libssl-dev * Restore Kerberos and LDAP as they will build without OpenSSL * Make myself the maintainer * Update to Policy 3.6.1.0 - No changes needed -- Paul Hampson Sun, 9 Nov 2003 00:07:52 +1100 freeradius (0.9.2-1) unstable; urgency=low * Deleted RFCs: 2243 2289 2433 2548 2618 2616 2620 2621 2719 2759 2809 2865 2866 2867 2868 2869 2882 2924 3162 from source tarball due to non-DFSG-free copyright. * Disabled PostgreSQL, x.99 token, EAP/TLS, Kerberos, LDAP and SNMP agent support due to OpenSSL/GPL conflict. -- Paul Hampson Thu, 6 Nov 2003 22:40:32 +1100 freeradius (0.9.2-0) unstable; urgency=low * New upstream release * Added logrotate script for /var/log/freeradius/radius.log * Don't leave symlinks to config.{guess,sub} lying around to confuse dpkg-source. -- Paul Hampson Wed, 15 Oct 2003 05:02:17 +1000 freeradius (0.9.1-0) unstable; urgency=low * New upstream release. * Renamed radiusd(8) to freeradius(8) to match binary * Build-Depend on libtool1.4 | libtool (< 1.5) due to new libtool 1.5 package. * Merged multiple sed calls into a single sed call in debian/rules * Installed SQL database examples into /usr/share/doc/freeradius/examples * Modify initscript to only -HUP the parent process -- Paul Hampson Fri, 5 Sep 2003 00:54:41 +1000 freeradius (0.9.0-1) unstable; urgency=low * New Upstream release. - Upstream dictionary files are in /usr/share/freeradius. - Modified to 'configure{,.in}' to work with openssl 0.9.7 and 0.9.6 * Renamed pacakges to 'freeradius*' from 'radiusd-freeradius*'. * Moved file hierarchy around to be neater: - /etc/raddb -> /etc/freeradius - /usr/share/doc/radiusd-freeradius -> /usr/share/doc/freeradius - /var/log/radiusd-freeradius -> /var/log/freeradius - /var/run/radiusd/radiusd.pid -> /var/run/freeradius/freeradius.pid * Included RFCs in documentation. * Enabled the daemon to run under user 'freerad:freerad' by default. * Added support for DEB_BUILD_OPTIONS for policy 3.5.9 compliance. * Installed SNMP mibs for Radius -- Paul Hampson Sun, 20 Jul 2003 06:56:28 +1000 radiusd-freeradius (0.7+cvs20021113-1) unstable; urgency=low * Explicitly excluding modules not in the "stable" list. * Updated policy version number. * Moved from non-US/main to main. * Put pidfile in package's own directory. * Package not as buggy and unstable modules are easily identifiable. (closes: Bug#142217) * Init script handles failure better. (closes: Bug#151264) * New upstream release. (closes: Bug#140536) * Uses available version of postgresql. (closes: Bug#139290) * Removed "conflicts" with other radiusds. * Added new build-dep on libtool. * Changed section to "net" from "admin". * New config.guess. (closes: Bug#168647) * Run with freerad user and group. (closes: Bug#168272) * Added libssl-dev as build-dep. (closes: #131832) -- Chad Miller Wed, 13 Nov 2002 17:01:19 -0500 radiusd-freeradius (0.5+cvs20020408-1) unstable; urgency=high * New build-dep on libssl-dev, which is implied by another dep, but making explicit for builders on Potato. (closes: Bug#131832) * Built against new postgresql libraries, so automatic dep tracking has the correct version, now. (closes: Bug#139290) * Removed python example module. * Explicitly disabled beta ippool module. -- Chad Miller Mon, 8 Apr 2002 11:48:30 -0400 radiusd-freeradius (0.4-1) unstable; urgency=high * New release. * upstream: New EAP support. * upstream: Fixed security bug in string translation. -- Chad Miller Thu, 13 Dec 2001 09:26:45 -0500 radiusd-freeradius (0.3-2) unstable; urgency=low * Moved to using logrotate instead of cron for files. * Fixed permissions of log files. (closes: Bug#116242,#116243) * Close file descriptors of stdin, stdout, stderr, if not debugging. (closes: Bug#116768) * Made package "non-native". (An upload issue, not code.) (closes: Bug#119161) -- Chad Miller Tue, 20 Nov 2001 10:50:20 -0500 radiusd-freeradius (0.3-1) unstable; urgency=low * New release. -- Chad Miller Tue, 9 Oct 2001 18:16:23 -0400 radiusd-freeradius (0.2+20010917-1) unstable; urgency=low * Removed old mysql build-dep. (closes: Bug#112541) -- Chad Miller Mon, 17 Sep 2001 11:38:24 -0400 radiusd-freeradius (0.2+20010912-1) unstable; urgency=low * Build-dep mysql changed package names. * Added build-dep for libmysqlclient10-dev. (closes: Bug#111880) * In acct_users, keep reply pairs. * Integer values are printed as unsigned numbers, to comply with RFC2866. * Fixed broken/reversed auth comparisons in SQL module. * Sucked out CPPness from inside a printf, as printf is a macro in newer compilers (gcc3.0, e.g.). (closes: Bug#100889) * Sundry LDAP configuration, unresponsive thread, and proxying fixes. * Added user 'freerad' into the 'shadow' group. * Fixed UUCP-style of restricting time of log-in. * Changed debugging messages to give more info about execution flow. * Better counter module. * Inserted CHAP support for SQL modules. * Removed possible infinite loop. -- Chad Miller Wed, 12 Sep 2001 21:21:47 -0400 radiusd-freeradius (0.1+20010527-1) unstable; urgency=low * Updated config.{guess,sub} to recent versions. (closes: Bug#98183) * Updated build-dep to reflect supercession of libltdl0-dev by libltdl3-dev (closes: Bug#98914) -- Chad Miller Sun, 27 May 2001 11:44:40 -0400 radiusd-freeradius (0.1+20010517-1) unstable; urgency=low * Moved package to non-US to allow in Kerberos and PostgreSQL. * Set Suggests of modules to main package. * Better compile-time support of *BSD. -- Chad Miller Thu, 17 May 2001 14:46:51 -0400 radiusd-freeradius (0.1-1) unstable; urgency=low * First beta release! * Added generalized SQL support for ODBC, Oracle, MySQL, and Postgres. * Added shasta, microsoft, and redback dictionaries. * Fixed rc.d restart rule. * Added a user to own the daemon and logfiles. * SQL DB handles more forgiving of unreachable servers at startup. * SQL Crypt-Password attribute support. * Fixed cron log rotation. * Put module libraries in own directory. * Removed bogus build-dep. (closes: Bug#87277) * Better permissions on /etc/raddb * Use correct LDAP library. * Fork ldap, postgresql, and mysql modules into different packages. * Remove Kerberos, as it's restricted from export. -- Chad Miller Mon, 7 May 2001 16:37:46 -0400 radiusd-freeradius (0.0.20010109-1) unstable; urgency=low * Changed priority, from standard to optional. -- Chad Miller Tue, 9 Jan 2001 14:01:38 -0500 radiusd-freeradius (0.0.20001227-1) unstable; urgency=low * Initial revision. (closes: Bug#76476) -- Chad Miller Wed, 27 Dec 2000 11:58:56 -0500 debian/freeradius-common.postinst0000664000000000000000000000430612210116444014412 0ustar #! /bin/sh set -e update_fs_from_statoverride() { # I wish a simple dpkg-statoverride --update $file just did # the right thing, but it doesn't, so we have to do it manually. type=$1 user=$2 group=$3 mode=$4 file=$5 if [ -n "$type" -a -n "$group" -a -n "$mode" -a -n "$file" ]; then if [ "$(find $file -maxdepth 0 -type $type -group $group -perm $mode)" = "" -a -$type $file ]; then chgrp $group $file chmod $mode $file fi fi } handle_config_files() { runmode=$1 set +e so=$(dpkg-statoverride --list /etc/freeradius) ret=$? set -e case "$runmode" in initial) if [ $ret != 0 ]; then dpkg-statoverride --add --update freerad freerad 2751 /etc/freeradius fi ;; upgrade) update_fs_from_statoverride d $so ;; esac set +e so=$(dpkg-statoverride --list /etc/freeradius/radiusd.conf) ret=$? set -e case "$runmode" in initial) if [ $ret != 0 ]; then dpkg-statoverride --add --update root freerad 0640 /etc/freeradius/radiusd.conf fi ;; upgrade) update_fs_from_statoverride f $so ;; esac # Relax permissions on local dictionary - allows radclient to run and should # not contain secrets. At any rate, only do it on fresh install set +e so=$(dpkg-statoverride --list /etc/freeradius/dictionary) ret=$? set -e case "$runmode" in initial) if [ $ret != 0 ]; then dpkg-statoverride --add --update root freerad 0644 /etc/freeradius/dictionary fi ;; upgrade) update_fs_from_statoverride f $so ;; esac } case "$1" in configure) if [ -z "$2" ]; then # On a fresh install, add the necessary user and group adduser --quiet --system --no-create-home --home /etc/freeradius --group --disabled-password freerad # Put user freerad in group shadow, so the daemon can auth locally # Only do this on fresh install as the admin may not want freerad in shadow # group if authenticating by another mechanism adduser --quiet freerad shadow handle_config_files initial else handle_config_files upgrade fi ;; esac #DEBHELPER# exit 0 debian/freeradius.upstart0000664000000000000000000000100512567313565012756 0ustar # freeradius -- Radius server # description "Extensible, configurable radius daemon" author "Michael Vogt " start on runlevel [2345] stop on runlevel [!2345] respawn script if [ -r /etc/default/freeradius ]; then . /etc/default/freeradius fi exec /usr/sbin/freeradius -f $FREERADIUS_OPTIONS end script pre-start script # /var/run may be a tmpfs if [ ! -d /var/run/freeradius ]; then mkdir -p /var/run/freeradius chown freerad:freerad /var/run/freeradius fi end script debian/freeradius-krb5.install0000664000000000000000000000004012210116444013537 0ustar usr/lib/freeradius/rlm_krb5*.so debian/freeradius-common.dirs0000664000000000000000000000004412210116444013463 0ustar etc/freeradius usr/share/freeradius debian/freeradius-dialupadmin.links0000664000000000000000000000010212210116444014634 0ustar etc/freeradius-dialupadmin/ usr/share/freeradius-dialupadmin/conf debian/freeradius-krb5.postinst0000775000000000000000000000052112210116444013763 0ustar #! /bin/sh set -e case "$1" in configure) if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d freeradius force-reload else /etc/init.d/freeradius force-reload fi ;; abort-upgrade) ;; abort-remove) ;; abort-deconfigure) ;; esac #DEBHELPER# debian/source/0000775000000000000000000000000012210121401010450 5ustar debian/source/format0000664000000000000000000000001412210116444011671 0ustar 3.0 (quilt) debian/compat0000664000000000000000000000000212210116444010361 0ustar 5 debian/freeradius-ldap.install0000664000000000000000000000004012210116444013614 0ustar usr/lib/freeradius/rlm_ldap*.so debian/patches/0000775000000000000000000000000013136126666010631 5ustar debian/patches/jradius.diff0000664000000000000000000000045112210116444013105 0ustar Index: b/src/modules/stable =================================================================== --- a/src/modules/stable 2012-06-29 15:43:05.000000000 +0200 +++ b/src/modules/stable 2012-06-29 15:55:00.000000000 +0200 @@ -41,3 +41,4 @@ rlm_policy rlm_dynamic_clients rlm_replicate +rlm_jradius debian/patches/ftbfs-libfreeradius0000664000000000000000000000144112210116444014457 0ustar Description: Fix FTBFS from missing -lpthread in libfreeradius Author: Michael Vogt Forwarded: no Last-Update: 2013-07-09 --- freeradius-2.1.12+dfsg.orig/src/lib/Makefile +++ freeradius-2.1.12+dfsg/src/lib/Makefile @@ -20,6 +20,8 @@ INCLUDES = ../include/radius.h ../includ CFLAGS += -D_LIBRADIUS -I$(top_builddir)/src +LIBS = -lpthread + # if you have problems with things that need SHA1-HMAC, this will # dump the key and the input to the hash so you can compare to what # the other end is doing. @@ -42,7 +44,7 @@ all: $(TARGET).la $(TARGET).la: $(LT_OBJS) $(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \ - $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^ + $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^ $(LIBS) $(LT_OBJS): $(INCLUDES) debian/patches/gitignore.diff0000664000000000000000000000060612210116444013435 0ustar Index: b/.gitignore =================================================================== --- a/.gitignore 2012-06-29 15:43:05.000000000 +0200 +++ b/.gitignore 2012-06-29 15:54:59.000000000 +0200 @@ -1,3 +1,17 @@ +*.la +*.o +*.lo +.libs +.deps +build-arch-stamp +build-indep-stamp +config.h +config.log +config.status +config.cache +config.guess.dist +config.sub.dist +Make.inc *~ *.o *.a debian/patches/CVE-2017-10981.patch0000664000000000000000000000152313136126453013331 0ustar Backport of: From 812766e2150faa07b4c574e51393b014feaffe6c Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Sat, 1 Jul 2017 08:49:24 -0400 Subject: [PATCH] FR-GV-204 - free VP if decoding options fails, so we don't leak memory --- src/lib/dhcp.c | 2 ++ 1 file changed, 2 insertions(+) Index: freeradius-2.1.12+dfsg/src/lib/dhcp.c =================================================================== --- freeradius-2.1.12+dfsg.orig/src/lib/dhcp.c 2017-07-26 10:44:30.419644363 -0400 +++ freeradius-2.1.12+dfsg/src/lib/dhcp.c 2017-07-26 10:44:30.407644363 -0400 @@ -1456,6 +1456,7 @@ int fr_dhcp_encode(RADIUS_PACKET *packet * limitations: sizeof(vp->vp_octets) < 255 */ if (length > 255) { + pairfree(&vp); fr_strerror_printf("WARNING Ignoring too long attribute %s!", vp->name); break; } debian/patches/ftbfs-libeap0000664000000000000000000000161212210116444013073 0ustar Description: Fix FTBFS from missing LIBS in libeap Author: Michael Vogt --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: Michael Vogt Forwarded: no Last-Update: 2013-07-09 Index: freeradius-2.1.12+dfsg/src/modules/rlm_eap/libeap/Makefile =================================================================== --- freeradius-2.1.12+dfsg.orig/src/modules/rlm_eap/libeap/Makefile 2013-07-09 16:00:55.217043882 +0200 +++ freeradius-2.1.12+dfsg/src/modules/rlm_eap/libeap/Makefile 2013-07-09 16:03:24.285808131 +0200 @@ -20,6 +20,8 @@ endif TARGET = $(LIBPREFIX)freeradius-eap +LIBS += -lssl -lcrypto + # Define new rule for libtool objects %.lo: %.c $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $< debian/patches/fix-multiarch-python.patch0000664000000000000000000046556512210116444015753 0ustar Description: use python-config for python cflags --- a/src/modules/rlm_python/configure.in +++ b/src/modules/rlm_python/configure.in @@ -57,7 +57,7 @@ PY_LIB_DIR="$PY_EXEC_PREFIX/lib/python$PY_VERSION/config" PY_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config" PY_INC_DIR="$PY_PREFIX/include/python$PY_VERSION" - PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION" + PY_CFLAGS="`${PYTHONBIN}-config --includes`" PY_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PY_VERSION/config/Makefile" if test -f ${PY_MAKEFILE}; then PY_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE` --- a/src/modules/rlm_python/configure +++ b/src/modules/rlm_python/configure @@ -1,61 +1,82 @@ #! /bin/sh # From configure.in Revision. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. +# Generated by GNU Autoconf 2.69. +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 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. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +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 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# 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=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -64,20 +85,19 @@ # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -88,354 +108,365 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -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) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# 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'` +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -fi -fi +} # as_fn_mkdir_p +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -exitcode=0 -if as_func_success; then - : +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. + as_expr=false fi -if as_func_ret_success; then - : +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. + as_basename=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # 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 after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, 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 - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -452,9 +483,12 @@ s/-\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; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -463,84 +497,55 @@ exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -549,11 +554,11 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -568,7 +573,6 @@ subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= @@ -576,60 +580,67 @@ PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= ac_unique_file="rlm_python.c" -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 -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -PYTHONBIN -python_ldflags -python_cflags -targetname +ac_subst_vars='LTLIBOBJS LIBOBJS -LTLIBOBJS' +targetname +python_cflags +python_ldflags +PYTHONBIN +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_rlm_python_lib_dir +with_rlm_python_include_dir +' ac_precious_vars='build_alias host_alias target_alias @@ -644,6 +655,8 @@ # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -699,8 +712,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -742,13 +756,20 @@ datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`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 ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -761,13 +782,20 @@ dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`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'` - eval enable_$ac_feature=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -958,22 +986,36 @@ ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`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'` - eval with_$ac_package=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`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 ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -993,26 +1035,26 @@ | --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; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_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} + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1020,23 +1062,36 @@ 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; }; } + as_fn_error $? "missing argument to $ac_option" fi -# Be sure to have absolute directory names. +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1050,8 +1105,6 @@ 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 @@ -1066,23 +1119,21 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1109,13 +1160,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1155,7 +1204,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1163,9 +1212,9 @@ Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1175,25 +1224,25 @@ For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1216,13 +1265,14 @@ LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF ac_status=$? fi @@ -1230,15 +1280,17 @@ if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1274,7 +1326,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1284,21 +1336,145 @@ if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.69 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1334,8 +1510,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -1369,12 +1545,12 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1390,13 +1566,13 @@ -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; 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; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1408,11 +1584,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1421,12 +1595,13 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1445,128 +1620,136 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" 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;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1580,60 +1763,56 @@ 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;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { 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;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { 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=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) 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_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1655,10 +1834,10 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1668,25 +1847,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1695,10 +1874,10 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1708,25 +1887,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -1734,12 +1913,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -1752,10 +1927,10 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1765,25 +1940,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1792,10 +1967,10 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1806,18 +1981,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -1836,11 +2011,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1851,10 +2026,10 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1864,25 +2039,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1895,10 +2070,10 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1908,25 +2083,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1938,12 +2113,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -1953,51 +2124,37 @@ 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; }; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2009,42 +2166,38 @@ } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ 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[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -2054,14 +2207,14 @@ do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -2080,78 +2233,41 @@ else ac_file='' fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { 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 - +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that 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' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ 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 { (ac_try="$ac_link" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2159,37 +2275,90 @@ for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { 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; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ 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. */ +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2201,51 +2370,46 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_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; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2259,54 +2423,34 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ 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` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2317,34 +2461,11 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2355,35 +2476,12 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2394,42 +2492,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2445,23 +2519,18 @@ CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* 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); @@ -2513,31 +2582,9 @@ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -2548,17 +2595,19 @@ # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2571,15 +2620,15 @@ 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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -2593,11 +2642,7 @@ # 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -2606,76 +2651,34 @@ #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; 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 +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -2687,8 +2690,8 @@ else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2698,11 +2701,7 @@ # 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -2711,83 +2710,40 @@ #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; 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 +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -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; }; } +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -2801,10 +2757,10 @@ 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_PYTHONBIN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PYTHONBIN+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$PYTHONBIN"; then ac_cv_prog_PYTHONBIN="$PYTHONBIN" # Let the user override the test. @@ -2815,25 +2771,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHONBIN="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi PYTHONBIN=$ac_cv_prog_PYTHONBIN if test -n "$PYTHONBIN"; then - { echo "$as_me:$LINENO: result: $PYTHONBIN" >&5 -echo "${ECHO_T}$PYTHONBIN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHONBIN" >&5 +$as_echo "$PYTHONBIN" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2849,12 +2805,10 @@ PY_LIB_DIR= # Check whether --with-rlm-python-lib-dir was given. -if test "${with_rlm_python_lib_dir+set}" = set; then +if test "${with_rlm_python_lib_dir+set}" = set; then : withval=$with_rlm_python_lib_dir; case "$withval" in no) - { { echo "$as_me:$LINENO: error: Need rlm-python-lib-dir" >&5 -echo "$as_me: error: Need rlm-python-lib-dir" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Need rlm-python-lib-dir" "$LINENO" 5 ;; yes) ;; @@ -2869,12 +2823,10 @@ PY_INC_DIR= # Check whether --with-rlm-python-include-dir was given. -if test "${with_rlm_python_include_dir+set}" = set; then +if test "${with_rlm_python_include_dir+set}" = set; then : withval=$with_rlm_python_include_dir; case "$withval" in no) - { { echo "$as_me:$LINENO: error: Need rlm-python-include-dir" >&5 -echo "$as_me: error: Need rlm-python-include-dir" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Need rlm-python-include-dir" "$LINENO" 5 ;; yes) ;; @@ -2895,7 +2847,7 @@ PY_LIB_DIR="$PY_EXEC_PREFIX/lib/python$PY_VERSION/config" PY_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config" PY_INC_DIR="$PY_PREFIX/include/python$PY_VERSION" - PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION" + PY_CFLAGS="`${PYTHONBIN}-config --includes`" PY_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PY_VERSION/config/Makefile" if test -f ${PY_MAKEFILE}; then PY_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE` @@ -2912,8 +2864,8 @@ ac_safe=`echo "Python.h" | sed 'y%./+-%__pm%'` -{ echo "$as_me:$LINENO: checking for Python.h" >&5 -echo $ECHO_N "checking for Python.h... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python.h" >&5 +$as_echo_n "checking for Python.h... " >&6; } old_CFLAGS="$CFLAGS" smart_include= @@ -2922,11 +2874,7 @@ if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do CFLAGS="$old_CFLAGS -I$try" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -2938,31 +2886,11 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : smart_include="-I$try" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - smart_include= + smart_include= fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$smart_include" != "x"; then break; @@ -2972,11 +2900,7 @@ fi if test "x$smart_include" = "x"; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -2988,31 +2912,11 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : smart_include=" " else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - smart_include= + smart_include= fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -3047,11 +2951,7 @@ for try in $smart_include_dir /usr/local/include /opt/include; do CFLAGS="$old_CFLAGS -I$try" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -3063,31 +2963,11 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : smart_include="-I$try" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - smart_include= + smart_include= fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$smart_include" != "x"; then break; @@ -3097,14 +2977,14 @@ fi if test "x$smart_include" != "x"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } eval "ac_cv_header_$ac_safe=yes" CFLAGS="$old_CFLAGS $smart_include" SMART_CFLAGS="$SMART_CFLAGS $smart_include" else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi CFLAGS=$old_CFLAGS @@ -3123,8 +3003,8 @@ sm_lib_safe=`echo "python${PY_VERSION}" | sed 'y%./+-%__p_%'` sm_func_safe=`echo "Py_Initialize" | sed 'y%./+-%__p_%'` -{ echo "$as_me:$LINENO: checking for Py_Initialize in -lpython${PY_VERSION}" >&5 -echo $ECHO_N "checking for Py_Initialize in -lpython${PY_VERSION}... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Py_Initialize in -lpython${PY_VERSION}" >&5 +$as_echo_n "checking for Py_Initialize in -lpython${PY_VERSION}... " >&6; } old_LIBS="$LIBS" smart_lib= @@ -3133,11 +3013,7 @@ if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do LIBS="-L$try -lpython${PY_VERSION} $old_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char Py_Initialize(); int @@ -3148,34 +3024,11 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : smart_lib="-L$try -lpython${PY_VERSION}" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "x$smart_lib" != "x"; then break; fi @@ -3185,11 +3038,7 @@ if test "x$smart_lib" = "x"; then LIBS="-lpython${PY_VERSION} $old_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char Py_Initialize(); int @@ -3200,34 +3049,11 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : smart_lib="-lpython${PY_VERSION}" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS="$old_LIBS" fi @@ -3289,11 +3115,7 @@ for try in $smart_lib_dir /usr/local/lib /opt/lib; do LIBS="-L$try -lpython${PY_VERSION} $old_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char Py_Initialize(); int @@ -3304,34 +3126,11 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : smart_lib="-L$try -lpython${PY_VERSION}" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "x$smart_lib" != "x"; then break; fi @@ -3340,14 +3139,14 @@ fi if test "x$smart_lib" != "x"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes" LIBS="$smart_lib $old_LIBS" SMART_LIBS="$smart_lib $SMART_LIBS" else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi LIBS=$old_LIBS @@ -3369,14 +3168,12 @@ if test x"$fail" != x""; then if test x"${enable_strict_dependencies}" = x"yes"; then - { { echo "$as_me:$LINENO: error: set --without-rlm_python to disable it explicitly." >&5 -echo "$as_me: error: set --without-rlm_python to disable it explicitly." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "set --without-rlm_python to disable it explicitly." "$LINENO" 5 else - { echo "$as_me:$LINENO: WARNING: silently not building rlm_python." >&5 -echo "$as_me: WARNING: silently not building rlm_python." >&2;} - { echo "$as_me:$LINENO: WARNING: FAILURE: rlm_python requires: $fail." >&5 -echo "$as_me: WARNING: FAILURE: rlm_python requires: $fail." >&2;}; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: silently not building rlm_python." >&5 +$as_echo "$as_me: WARNING: silently not building rlm_python." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FAILURE: rlm_python requires: $fail." >&5 +$as_echo "$as_me: WARNING: FAILURE: rlm_python requires: $fail." >&2;}; targetname="" fi fi @@ -3417,12 +3214,13 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -3430,8 +3228,8 @@ (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `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" @@ -3453,13 +3251,24 @@ :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 "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -3476,6 +3285,12 @@ # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g @@ -3502,14 +3317,15 @@ ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -3517,12 +3333,14 @@ -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -3532,59 +3350,79 @@ debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +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 + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# 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=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -3593,20 +3431,19 @@ # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -3617,32 +3454,111 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -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) >/dev/null 2>&1 && $as_unset $as_var +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi -done + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + -# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -3656,13 +3572,17 @@ as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# 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" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -3677,131 +3597,118 @@ } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # 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 after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, 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 - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { 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 sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -3811,13 +3718,19 @@ exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -3830,59 +3743,74 @@ _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE Configuration files: $config_files -Report bugs to ." +Report bugs to the package provider." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' +test -n "\$AWK" || AWK=awk _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. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -3895,25 +3823,30 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -3928,30 +3861,32 @@ fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + exec "\$@" fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - echo "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets @@ -3959,9 +3894,7 @@ case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) { { 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; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -3982,162 +3915,194 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then -_ACEOF +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -PYTHONBIN!$PYTHONBIN$ac_delim -python_ldflags!$python_ldflags$ac_delim -python_cflags!$python_cflags$ac_delim -targetname!$targetname$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 51; then + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done +rm -f conf$$subs.sh -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" -for ac_tag in :F $CONFIG_FILES +eval set X " :F $CONFIG_FILES " +shift +for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -4156,7 +4121,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -4165,26 +4130,34 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - ac_file_inputs="$ac_file_inputs $ac_f" + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -4194,42 +4167,7 @@ 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'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -4247,20 +4185,15 @@ q } s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -4296,12 +4229,12 @@ _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { +ac_sed_dataroot=' +/datarootdir/ { p q } @@ -4309,36 +4242,37 @@ /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' $ac_file_inputs` in +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t +s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -4347,21 +4281,25 @@ s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -4371,11 +4309,13 @@ done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -4395,7 +4335,11 @@ 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; } + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi debian/patches/series0000664000000000000000000000070113136126662012040 0ustar radiusd-to-freeradius.diff dialupadmin-help.diff gitignore.diff rlm_sql.libs.diff eap.server.key.diff eap.random_file.diff jradius.diff cf_section_parse_init.diff radmin.getenv.conffile.diff CVE-2012-3547.diff CVE-2011-4966.diff fix-multiarch-python.patch ftbfs-libeap ftbfs-libfreeradius ppc64le.diff CVE-2014-2015.patch CVE-2017-10978.patch CVE-2017-10979.patch CVE-2017-10980.patch CVE-2017-10981.patch CVE-2017-10982.patch CVE-2017-10983.patch debian/patches/eap.server.key.diff0000664000000000000000000000074212210116444014310 0ustar Index: b/raddb/eap.conf =================================================================== --- a/raddb/eap.conf 2012-06-29 15:43:05.000000000 +0200 +++ b/raddb/eap.conf 2012-06-29 15:55:00.000000000 +0200 @@ -156,7 +156,7 @@ cadir = ${confdir}/certs private_key_password = whatever - private_key_file = ${certdir}/server.pem + private_key_file = ${certdir}/server.key # If Private key & Certificate are located in # the same file, then private_key_file & debian/patches/cf_section_parse_init.diff0000664000000000000000000000342112210116444015775 0ustar Index: b/src/main/conffile.c =================================================================== --- a/src/main/conffile.c 2011-09-30 16:12:07.000000000 +0200 +++ b/src/main/conffile.c 2012-06-29 15:55:00.000000000 +0200 @@ -1039,6 +1039,46 @@ static const char *parse_spaces = " "; /* + * A copy of cf_section_parse that initializes pointers before + * parsing them. + */ +static void cf_section_parse_init(CONF_SECTION *cs, void *base, + const CONF_PARSER *variables) +{ + int i; + void *data; + + for (i = 0; variables[i].name != NULL; i++) { + if (variables[i].type == PW_TYPE_SUBSECTION) { + CONF_SECTION *subcs; + subcs = cf_section_sub_find(cs, variables[i].name); + if (!subcs) continue; + + if (!variables[i].dflt) continue; + + cf_section_parse_init(subcs, base, + (const CONF_PARSER *) variables[i].dflt); + continue; + } + + if ((variables[i].type != PW_TYPE_STRING_PTR) && + (variables[i].type != PW_TYPE_FILENAME)) { + continue; + } + + if (variables[i].data) { + data = variables[i].data; /* prefer this. */ + } else if (base) { + data = ((char *)base) + variables[i].offset; + } else { + continue; + } + + *(char **) data = NULL; + } /* for all variables in the configuration section */ +} + +/* * Parse a configuration section into user-supplied variables. */ int cf_section_parse(CONF_SECTION *cs, void *base, @@ -1057,6 +1097,8 @@ cs->name1, cs->name2); } + cf_section_parse_init(cs, base, variables); + /* * Handle the known configuration parameters. */ debian/patches/dialupadmin-help.diff0000664000000000000000000000153512210116444014665 0ustar ## 02-dialupadmin-help.dpatch by Mark Hymers ## DP: Fix README location Index: b/dialup_admin/htdocs/help/help.php =================================================================== --- a/dialup_admin/htdocs/help/help.php 2012-06-29 15:43:05.000000000 +0200 +++ b/dialup_admin/htdocs/help/help.php 2012-06-29 15:54:59.000000000 +0200 @@ -48,13 +48,13 @@
debian/patches/eap.random_file.diff0000664000000000000000000000065412210116444014474 0ustar Index: b/raddb/eap.conf =================================================================== --- a/raddb/eap.conf 2012-06-29 15:55:00.000000000 +0200 +++ b/raddb/eap.conf 2012-06-29 15:55:00.000000000 +0200 @@ -194,7 +194,7 @@ # openssl dhparam -out certs/dh 1024 # dh_file = ${certdir}/dh - random_file = ${certdir}/random + random_file = /dev/urandom # # This can never exceed the size of a RADIUS debian/patches/ppc64le.diff0000664000000000000000000000541512257633634012746 0ustar Index: b/configure =================================================================== --- a/configure +++ b/configure @@ -5625,7 +5625,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -5644,7 +5647,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) Index: b/libltdl/configure =================================================================== --- a/libltdl/configure +++ b/libltdl/configure @@ -4589,7 +4589,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -4605,7 +4608,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) Index: b/libtool.m4 =================================================================== --- a/libtool.m4 +++ b/libtool.m4 @@ -533,7 +533,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -549,7 +552,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) --- freeradius-2.1.12+dfsg.orig/aclocal.m4 +++ freeradius-2.1.12+dfsg/aclocal.m4 @@ -625,7 +625,10 @@ s390*-*linux*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -644,7 +647,10 @@ s390*-*linux*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) debian/patches/CVE-2011-4966.diff0000664000000000000000000000206312210116444013051 0ustar Origin: https://github.com/alandekok/freeradius-server/commit/1b1ec5ce75e224bd1755650c18ccdaa6dc53e605 Index: freeradius-2.1.12+dfsg/src/modules/rlm_unix/rlm_unix.c =================================================================== --- freeradius-2.1.12+dfsg.orig/src/modules/rlm_unix/rlm_unix.c 2011-09-30 07:12:07.000000000 -0700 +++ freeradius-2.1.12+dfsg/src/modules/rlm_unix/rlm_unix.c 2012-12-16 12:55:06.521987527 -0800 @@ -274,9 +274,17 @@ /* * Check if password has expired. */ + if (spwd && spwd->sp_lstchg > 0 && spwd->sp_max >= 0 && + (request->timestamp / 86400) > (spwd->sp_lstchg + spwd->sp_max)) { + radlog_request(L_AUTH, 0, request, "[%s]: password has expired", name); + return RLM_MODULE_REJECT; + } + /* + * Check if account has expired. + */ if (spwd && spwd->sp_expire > 0 && (request->timestamp / 86400) > spwd->sp_expire) { - radlog_request(L_AUTH, 0, request, "[%s]: password has expired", name); + radlog_request(L_AUTH, 0, request, "[%s]: account has expired", name); return RLM_MODULE_REJECT; } #endif debian/patches/CVE-2017-10978.patch0000664000000000000000000000404013136125057013333 0ustar Backport of: From 38ee90f2a5a28dc5887a30bdfdc98109c0418e68 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Mon, 3 Jul 2017 22:04:40 -0400 Subject: [PATCH] FR-GV-201 - check input / output length in make_secret() --- src/lib/radius.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) Index: freeradius-2.1.12+dfsg/src/lib/radius.c =================================================================== --- freeradius-2.1.12+dfsg.orig/src/lib/radius.c 2017-07-26 10:37:14.291624026 -0400 +++ freeradius-2.1.12+dfsg/src/lib/radius.c 2017-07-26 10:41:25.335635733 -0400 @@ -477,7 +477,7 @@ static ssize_t rad_recvfrom(int sockfd, * *************************************************************************/ static void make_secret(uint8_t *digest, const uint8_t *vector, - const char *secret, const uint8_t *value) + const char *secret, const uint8_t *value, size_t length) { FR_MD5_CTX context; int i; @@ -487,7 +487,7 @@ static void make_secret(uint8_t *digest, fr_MD5Update(&context, (const uint8_t *) secret, strlen(secret)); fr_MD5Final(digest, &context); - for ( i = 0; i < AUTH_VECTOR_LEN; i++ ) { + for ( i = 0; i < length; i++ ) { digest[i] ^= value[i]; } } @@ -779,8 +779,8 @@ static uint8_t *vp2data(const RADIUS_PAC * always fits. */ case FLAG_ENCRYPT_ASCEND_SECRET: - make_secret(ptr, packet->vector, secret, data); - len = AUTH_VECTOR_LEN; + if (len > AUTH_VECTOR_LEN) len = AUTH_VECTOR_LEN; + make_secret(ptr, packet->vector, secret, data, len); break; @@ -2301,9 +2301,14 @@ static VALUE_PAIR *data2vp(const RADIUS_ goto raw; } else { uint8_t my_digest[AUTH_VECTOR_LEN]; + size_t secret_len; + + secret_len = length; + if (secret_len > AUTH_VECTOR_LEN) secret_len = AUTH_VECTOR_LEN; + make_secret(my_digest, original->vector, - secret, data); + secret, data, secret_len); memcpy(vp->vp_strvalue, my_digest, AUTH_VECTOR_LEN ); vp->vp_strvalue[AUTH_VECTOR_LEN] = '\0'; debian/patches/CVE-2017-10982.patch0000664000000000000000000000163013136126650013330 0ustar Backport of: From 10b6de9345c9e0d9d4d5e0426fa5c3d68d702875 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Sun, 2 Jul 2017 20:54:36 -0400 Subject: [PATCH] FR-GV-205 - check for "too long" options, too --- src/lib/dhcp.c | 6 ++++++ 1 file changed, 6 insertions(+) Index: freeradius-2.1.12+dfsg/src/lib/dhcp.c =================================================================== --- freeradius-2.1.12+dfsg.orig/src/lib/dhcp.c 2017-07-26 10:54:52.859673388 -0400 +++ freeradius-2.1.12+dfsg/src/lib/dhcp.c 2017-07-26 10:55:59.203676482 -0400 @@ -654,6 +654,12 @@ int fr_dhcp_decode(RADIUS_PACKET *packet continue; } + /* + * End of this attribute past the end of the + * packet: ignore it. + */ + if (next > (packet->data + packet->data_len)) break; + da = dict_attrbyvalue(DHCP2ATTR(p[0])); if (!da) { fr_strerror_printf("Attribute not in our dictionary: %u", debian/patches/CVE-2014-2015.patch0000664000000000000000000000232412302651622013226 0ustar From 0d606cfc29ab2e91764854e733d4525e6c667eb9 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Thu, 13 Feb 2014 09:29:35 -0500 Subject: [PATCH] Increase buffer size. Use output buffer size as limit for hex2bin --- src/modules/rlm_pap/rlm_pap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: freeradius-2.1.12+dfsg/src/modules/rlm_pap/rlm_pap.c =================================================================== --- freeradius-2.1.12+dfsg.orig/src/modules/rlm_pap/rlm_pap.c 2014-02-24 09:13:36.279874125 -0500 +++ freeradius-2.1.12+dfsg/src/modules/rlm_pap/rlm_pap.c 2014-02-24 09:13:36.271874125 -0500 @@ -244,7 +244,7 @@ static void normify(REQUEST *request, VALUE_PAIR *vp, size_t min_length) { size_t decoded; - uint8_t buffer[64]; + uint8_t buffer[256]; if (min_length >= sizeof(buffer)) return; /* paranoia */ @@ -252,7 +252,7 @@ * Hex encoding. */ if (vp->length >= (2 * min_length)) { - decoded = fr_hex2bin(vp->vp_strvalue, buffer, vp->length >> 1); + decoded = fr_hex2bin(vp->vp_strvalue, buffer, sizeof(buffer)); if (decoded == (vp->length >> 1)) { RDEBUG2("Normalizing %s from hex encoding", vp->name); memcpy(vp->vp_octets, buffer, decoded); debian/patches/CVE-2017-10980.patch0000664000000000000000000000153513136125310013322 0ustar From ef0727fc68e211a36637b5c4e4a6fa1326f0a029 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Mon, 3 Jul 2017 14:48:47 -0400 Subject: [PATCH] FR-GV-203 - fix memory leak when using decode_tlv() --- src/lib/dhcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: freeradius-2.1.12+dfsg/src/lib/dhcp.c =================================================================== --- freeradius-2.1.12+dfsg.orig/src/lib/dhcp.c 2017-07-26 10:44:22.435643991 -0400 +++ freeradius-2.1.12+dfsg/src/lib/dhcp.c 2017-07-26 10:44:22.435643991 -0400 @@ -441,12 +441,13 @@ static int decode_tlv(VALUE_PAIR *tlv, c } if (fr_dhcp_attr2vp(vp, p + 2, p[1]) < 0) { + pairfree(&vp); pairfree(&head); goto make_tlv; } *tail = vp; - tail = &(vp->next); + while (*tail) tail = &((*tail)->next); p += 2 + p[1]; } debian/patches/CVE-2017-10979.patch0000664000000000000000000000513113136125266013340 0ustar Backport of: From ae3ba0011e7d299e92c45300e0137a56a650e8f5 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Mon, 3 Jul 2017 12:34:00 -0400 Subject: [PATCH] FR-GV-202 - check for "too long" attributes, too --- src/lib/dhcp.c | 10 ++++------ src/lib/radius.c | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 9 deletions(-) Index: freeradius-2.1.12+dfsg/src/lib/dhcp.c =================================================================== --- freeradius-2.1.12+dfsg.orig/src/lib/dhcp.c 2017-07-26 10:42:14.931638045 -0400 +++ freeradius-2.1.12+dfsg/src/lib/dhcp.c 2017-07-26 10:43:19.131641039 -0400 @@ -457,19 +457,17 @@ static int decode_tlv(VALUE_PAIR *tlv, c if (head) { memcpy(tlv, head, sizeof(*tlv)); head->next = NULL; + if (head->type == PW_TYPE_TLV) head->vp_tlv = NULL; pairfree(&head); } return 0; make_tlv: - tlv->vp_tlv = malloc(data_len); - if (!tlv->vp_tlv) { - fr_strerror_printf("No memory"); - return -1; - } - memcpy(tlv->vp_tlv, data, data_len); + if (data_len > sizeof(tlv->vp_octets)) data_len = sizeof(tlv->vp_octets); + memcpy(tlv->vp_octets, data, data_len); tlv->length = data_len; + tlv->type = PW_TYPE_OCTETS; return 0; } Index: freeradius-2.1.12+dfsg/src/lib/radius.c =================================================================== --- freeradius-2.1.12+dfsg.orig/src/lib/radius.c 2017-07-26 10:42:14.931638045 -0400 +++ freeradius-2.1.12+dfsg/src/lib/radius.c 2017-07-26 10:42:14.927638045 -0400 @@ -2539,8 +2539,10 @@ static uint8_t *rad_coalesce(unsigned in uint8_t *ptr, *tlv, *tlv_data; for (ptr = data + length; - ptr != (data + packet_length); + ptr < (data + packet_length); ptr += ptr[1]) { + if ((ptr + 2) > (data + length)) return NULL; + if ((ptr[0] != PW_VENDOR_SPECIFIC) || (ptr[1] < (2 + 4 + 3)) || /* WiMAX VSA with continuation */ (ptr[2] != 0) || (ptr[3] != 0)) { /* our requirement */ @@ -2557,7 +2559,14 @@ static uint8_t *rad_coalesce(unsigned in * If the vendor-length is too small, it's badly * formed, so we stop. */ - if ((ptr[2 + 4 + 1]) < 3) break; + if ((ptr[2 + 4 + 1]) < 3) return NULL; + + /* + * If it overflows the packet, it's bad. + */ + if ((ptr + ptr[2 + 4 + 1]) > (data + packet_length)) { + return NULL; + } tlv_length += ptr[2 + 4 + 1] - 3; if ((ptr[2 + 4 + 1 + 1] & 0x80) == 0) break; @@ -2574,7 +2583,7 @@ static uint8_t *rad_coalesce(unsigned in * our newly created memory. */ for (ptr = data + length; - ptr != (data + packet_length); + ptr < (data + packet_length); ptr += ptr[1]) { int this_length; debian/patches/radiusd-to-freeradius.diff0000664000000000000000000000241612210116444015651 0ustar ## 01-radiusd-to-freeradius.dpatch by Mark Hymers ## DP: change debian binary name from radiusd -> freeradius Index: b/Make.inc.in =================================================================== --- a/Make.inc.in 2012-06-29 15:43:05.000000000 +0200 +++ b/Make.inc.in 2012-06-29 15:54:59.000000000 +0200 @@ -50,7 +50,7 @@ LOGDIR = ${logdir} RADDBDIR = ${raddbdir} -RUNDIR = ${localstatedir}/run/radiusd +RUNDIR = ${localstatedir}/run/freeradius SBINDIR = ${sbindir} RADIR = ${radacctdir} LIBRADIUS = $(top_builddir)/src/lib/$(LIBPREFIX)freeradius-radius.la Index: b/raddb/radiusd.conf.in =================================================================== --- a/raddb/radiusd.conf.in 2012-06-29 15:43:05.000000000 +0200 +++ b/raddb/radiusd.conf.in 2012-06-29 15:54:59.000000000 +0200 @@ -62,7 +62,7 @@ # # name of the running server. See also the "-n" command-line option. -name = radiusd +name = freeradius # Location of config and logfiles. confdir = ${raddbdir} @@ -164,8 +164,8 @@ # It will join all groups where "user" is a member. This can allow # for some finer-grained access controls. # -#user = radius -#group = radius +user = freerad +group = freerad # max_request_time: The maximum time (in seconds) to handle a request. # debian/patches/radmin.getenv.conffile.diff0000664000000000000000000000462212210116444015775 0ustar Index: b/src/main/conffile.c =================================================================== --- a/src/main/conffile.c 2012-06-29 15:55:00.000000000 +0200 +++ b/src/main/conffile.c 2012-06-29 15:55:01.000000000 +0200 @@ -700,7 +700,8 @@ */ static const char *cf_expand_variables(const char *cf, int *lineno, CONF_SECTION *outercs, - char *output, const char *input) + char *output, size_t outsize, + const char *input) { char *p; const char *end, *ptr; @@ -773,6 +774,13 @@ cf, *lineno, input); return NULL; } + + if (p + strlen(cp->value) >= output + outsize) { + radlog(L_ERR, "%s[%d]: Reference \"%s\" is too long", + cf, *lineno, input); + return NULL; + } + strcpy(p, cp->value); p += strlen(p); ptr = end + 1; @@ -818,6 +826,12 @@ env = name; } + if (p + strlen(env) >= output + outsize) { + radlog(L_ERR, "%s[%d]: Reference \"%s\" is too long", + cf, *lineno, input); + return NULL; + } + strcpy(p, env); p += strlen(p); ptr = end + 1; @@ -828,6 +842,12 @@ */ *(p++) = *(ptr++); } + + if (p >= (output + outsize)) { + radlog(L_ERR, "%s[%d]: Reference \"%s\" is too long", + cf, *lineno, input); + return NULL; + } } /* loop over all of the input string. */ *p = '\0'; @@ -917,7 +937,8 @@ */ value = cf_expand_variables("", &lineno, - cs, buffer, value); + cs, buffer, sizeof(buffer), + value); if (!value) { cf_log_err(cf_sectiontoitem(cs),"Failed expanding variable %s", name); return -1; @@ -956,7 +977,8 @@ */ value = cf_expand_variables("?", &lineno, - cs, buffer, value); + cs, buffer, sizeof(buffer), + value); if (!value) return -1; } @@ -1447,7 +1469,7 @@ if (buf2[0] == '$') relative = 0; - value = cf_expand_variables(filename, lineno, this, buf, buf2); + value = cf_expand_variables(filename, lineno, this, buf, sizeof(buf), buf2); if (!value) return -1; if (!FR_DIR_IS_RELATIVE(value)) relative = 0; @@ -1631,7 +1653,7 @@ if ((t3 == T_BARE_WORD) || (t3 == T_DOUBLE_QUOTED_STRING)) { value = cf_expand_variables(filename, lineno, this, - buf, buf3); + buf, sizeof(buf), buf3); if (!value) return -1; } else if ((t3 == T_EOL) || (t3 == T_HASH)) { debian/patches/rlm_sql.libs.diff0000664000000000000000000000620012210116444014043 0ustar Index: b/src/modules/rlm_sql_log/Makefile =================================================================== --- a/src/modules/rlm_sql_log/Makefile 2012-06-29 15:43:05.000000000 +0200 +++ b/src/modules/rlm_sql_log/Makefile 2012-06-29 15:55:00.000000000 +0200 @@ -6,5 +6,6 @@ TARGET = rlm_sql_log SRCS = rlm_sql_log.c +RLM_LIBS += $(top_builddir)/src/modules/rlm_sql/.libs/rlm_sql.la include ../rules.mak Index: b/src/modules/rlm_sqlcounter/Makefile.in =================================================================== --- a/src/modules/rlm_sqlcounter/Makefile.in 2012-06-29 15:43:05.000000000 +0200 +++ b/src/modules/rlm_sqlcounter/Makefile.in 2012-06-29 15:55:00.000000000 +0200 @@ -6,7 +6,7 @@ SRCS = rlm_sqlcounter.c HEADERS = RLM_CFLAGS = @sqlcounter_cflags@ -RLM_LIBS = @sqlcounter_ldflags@ +RLM_LIBS = @sqlcounter_ldflags@ $(top_builddir)/src/modules/rlm_sql/.libs/rlm_sql.la RLM_INSTALL = include ../rules.mak Index: b/src/modules/rlm_sqlippool/Makefile.in =================================================================== --- a/src/modules/rlm_sqlippool/Makefile.in 2012-06-29 15:43:05.000000000 +0200 +++ b/src/modules/rlm_sqlippool/Makefile.in 2012-06-29 15:55:00.000000000 +0200 @@ -8,7 +8,7 @@ SRCS = rlm_sqlippool.c HEADERS = $(top_builddir)/src/modules/rlm_sql/rlm_sql.h RLM_CFLAGS = -I$(top_builddir)/src/modules/rlm_sql $(INCLTDL) -RLM_LIBS = +RLM_LIBS += $(top_builddir)/src/modules/rlm_sql/.libs/rlm_sql.la RLM_INSTALL = include ../rules.mak Index: b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/Makefile.in =================================================================== --- a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/Makefile.in 2012-06-29 15:43:05.000000000 +0200 +++ b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/Makefile.in 2012-06-29 15:55:00.000000000 +0200 @@ -4,5 +4,6 @@ SRCS = sql_postgresql.c RLM_SQL_CFLAGS = @postgresql_cflags@ $(INCLTDL) RLM_SQL_LIBS = @postgresql_ldflags@ +RLM_LIBS += $(top_builddir)/src/modules/rlm_sql/.libs/rlm_sql.la include ../rules.mak Index: b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/Makefile.in =================================================================== --- a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/Makefile.in 2012-06-29 15:43:05.000000000 +0200 +++ b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/Makefile.in 2012-06-29 15:55:00.000000000 +0200 @@ -4,5 +4,6 @@ SRCS = sql_iodbc.c RLM_SQL_CFLAGS = @sql_iodbc_cflags@ $(INCLTDL) RLM_SQL_LIBS = @sql_iodbc_ldflags@ +RLM_LIBS += $(top_builddir)/src/modules/rlm_sql/.libs/rlm_sql.la include ../rules.mak Index: b/src/modules/rlm_sql/drivers/rlm_sql_mysql/Makefile.in =================================================================== --- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/Makefile.in 2012-06-29 15:43:05.000000000 +0200 +++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/Makefile.in 2012-06-29 15:55:00.000000000 +0200 @@ -4,5 +4,6 @@ SRCS = sql_mysql.c RLM_SQL_CFLAGS = @sql_mysql_cflags@ $(INCLTDL) RLM_SQL_LIBS = @sql_mysql_ldflags@ +RLM_LIBS += $(top_builddir)/src/modules/rlm_sql/.libs/rlm_sql.la include ../rules.mak debian/patches/CVE-2017-10983.patch0000664000000000000000000000153413136126666013343 0ustar From ec08b30f87066f82073d02fab57e8ffeef81373d Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Mon, 3 Jul 2017 11:35:02 -0400 Subject: [PATCH] FR-GV-206 - decode option 60 (string) not 63 (octets) --- src/lib/dhcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: freeradius-2.1.12+dfsg/src/lib/dhcp.c =================================================================== --- freeradius-2.1.12+dfsg.orig/src/lib/dhcp.c 2017-07-26 10:56:51.991678944 -0400 +++ freeradius-2.1.12+dfsg/src/lib/dhcp.c 2017-07-26 10:56:51.987678944 -0400 @@ -755,7 +755,7 @@ int fr_dhcp_decode(RADIUS_PACKET *packet /* * Vendor is "MSFT 98" */ - vp = pairfind(head, DHCP2ATTR(63)); + vp = pairfind(head, DHCP2ATTR(60)); if (vp && (strcmp(vp->vp_strvalue, "MSFT 98") == 0)) { vp = pairfind(head, DHCP2ATTR(262)); debian/patches/CVE-2012-3547.diff0000664000000000000000000000134112210116444013042 0ustar Index: freeradius-2.1.12+dfsg/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c =================================================================== --- freeradius-2.1.12+dfsg.orig/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c 2011-09-30 16:12:07.000000000 +0200 +++ freeradius-2.1.12+dfsg/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c 2012-09-11 19:36:21.000000000 +0200 @@ -531,7 +531,7 @@ */ buf[0] = '\0'; asn_time = X509_get_notAfter(client_cert); - if ((lookup <= 1) && asn_time && (asn_time->length < MAX_STRING_LEN)) { + if ((lookup <= 1) && asn_time && (asn_time->length < sizeof(buf))) { memcpy(buf, (char*) asn_time->data, asn_time->length); buf[asn_time->length] = '\0'; pairadd(&handler->certs, debian/freeradius-ldap.lintian-overrides0000664000000000000000000000005712210116444015614 0ustar freeradius-ldap: binary-or-shlib-defines-rpath debian/freeradius-postgresql.install0000664000000000000000000000011212210116444015077 0ustar usr/lib/freeradius/rlm_sql_postgresql*.so etc/freeradius/sql/postgresql/* debian/freeradius-mysql.postinst0000775000000000000000000000335712210116444014277 0ustar #! /bin/sh set -e update_fs_from_statoverride() { # I wish a simple dpkg-statoverride --update $file just did # the right thing, but it doesn't, so we have to do it manually. type=$1 user=$2 group=$3 mode=$4 file=$5 if [ -n "$type" -a -n "$group" -a -n "$mode" -a -n "$file" ]; then if [ "$(find $file -maxdepth 0 -type $type -group $group -perm $mode)" = "" -a -$type $file ]; then chgrp $group $file chmod $mode $file fi fi } case "$1" in configure) for file in /etc/freeradius/sql/mysql/counter.conf \ /etc/freeradius/sql/mysql/dialup.conf \ /etc/freeradius/sql/mysql/ippool.conf \ /etc/freeradius/sql/mysql/ippool.sql \ /etc/freeradius/sql/mysql/nas.sql \ /etc/freeradius/sql/mysql/schema.sql do set +e so=$(dpkg-statoverride --list $file) ret=$? set -e if [ -z "$2" ]; then if [ $ret != 0 ]; then dpkg-statoverride --add --update root freerad 0640 $file fi else update_fs_from_statoverride f $so fi done for dir in /etc/freeradius/sql \ /etc/freeradius/sql/mysql do set +e so=$(dpkg-statoverride --list $dir) ret=$? set -e if [ -z "$2" ]; then if [ $ret != 0 ]; then dpkg-statoverride --add --update root freerad 2751 $dir fi else update_fs_from_statoverride d $so fi done if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d freeradius force-reload else /etc/init.d/freeradius force-reload fi ;; esac #DEBHELPER# exit 0 debian/freeradius-dialupadmin.examples0000664000000000000000000000004312210116444015336 0ustar dialup_admin/bin/dialup_admin.cron debian/freeradius-krb5.lintian-overrides0000664000000000000000000000005712210116444015537 0ustar freeradius-krb5: binary-or-shlib-defines-rpath debian/freeradius-common.prerm0000664000000000000000000000064112210116444013652 0ustar #!/bin/sh set -e case "$1" in remove) for file in /etc/freeradius/radiusd.conf /etc/freeradius/dictionary; do if dpkg-statoverride --list $file >/dev/null; then dpkg-statoverride --remove $file fi done if dpkg-statoverride --list /etc/freeradius >/dev/null; then dpkg-statoverride --remove /etc/freeradius fi ;; esac #DEBHELPER# debian/freeradius-dialupadmin.docs0000664000000000000000000000017012210116444014451 0ustar dialup_admin/doc/AUTHORS dialup_admin/doc/FAQ dialup_admin/doc/HELP_WANTED dialup_admin/doc/HOWTO dialup_admin/doc/TODO debian/copyright0000664000000000000000000000733412210116444011125 0ustar This package was debianized by Chad Miller on Fri, 24 Nov 2000 16:25:57 -0500. The packaging was rearranged by Paul Hampson on Sun, 4 May 2003 03:51:20 +1000 The packaging was revamped by Stephen Gran on Sat, 15 Mar 2008 16:26:51 +0000. It was downloaded from http://www.freeradius.org/ FreeRADIUS is the result of the work done by a large number of people. The major contributors are listed here. Miquel van Smoorenburg Wrote the original Cistron server, and started the FreeRADIUS source tree. Alan DeKok Registered and maintains www.freeradius.org. Wrote the module code. Made the server threaded. Maintains the autoconf and libtool scripts for the server. Alan Curry Contributed many patches for proxying, replication, realm support. Mike Machado (mike@innercite.com) Author of the SQL module. Adrian Pavlykevych LDAP module. Jeff Carneal, Apex Internet Services, Inc. Wrote the caching support for the Unix module. miguel a.l. paraz Wrote the original code which was the basis for the PAM module. Jochen Friedrich SMUX / SNMP support. Nathan Neulinger Kerberos authentication module. Brandon Lee Poyner Netscape-MTA-MD5 authentication module. Chris Parker Configuration parser enhancments, 'rlm_attr_filter' module, and proxy enhancements. Kostas Kalevras Contributed the 'dialup_admin' PHP server administration code. Chris Brotsos Memory allocation debugging and proxy enhancements. Copyright: Copyright (C) 2000-2008 The FreeRADIUS Server Project Copyright (C) 1997-1999 Cistron Internet Services B.V. License: Except for /usr/lib/freeradius/libradius*, this package is licensed under the GNU GPL version 2. 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. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2 file. -- /usr/lib/freeradius/libradius* is under the GNU LGPL version 2. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. On Debian systems, the complete text of the GNU Lesser General Public License can be found in /usr/share/common-licenses/LGPL. -- src/LICENSE.openssl includes a modification to the main LICENSE file, which is GPLv2. It applies only to the files in the "src" directory. (That directory contains the source code which has links to OpenSSL and from which the Debian binaries are produced.) In addition, as a special exception, the copyright holders give permission to link the code of this program with the OpenSSL library, and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than OpenSSL. If you modify file(s) with this exception, you may extend this exception to your version of the file(s), but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. If you delete this exception statement from all source files in the program, then also delete it here. -- The Debian packaging is (C) 2008, Stephen Gran and is licensed under the GPL, see /usr/share/common-licenses/GPL. debian/freeradius.preinst0000664000000000000000000000617212210116444012730 0ustar #! /bin/sh set -e # Remove a no-longer used conffile; taken from http://wiki.debian.org/DpkgConffileHandling rm_conffile() { CONFFILE="$1" if [ -e "$CONFFILE" ]; then md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" if [ "$md5sum" != "$old_md5sum" ]; then echo "Obsolete conffile $CONFFILE has been modified by you." echo "Saving as $CONFFILE.dpkg-bak ..." mv -f "$CONFFILE" "$CONFFILE".dpkg-bak else echo "Removing obsolete conffile $CONFFILE ..." rm -f "$CONFFILE" fi fi } case "$1" in upgrade) # Before 1.1.5, upstream shipped /etc/freeradius/otppasswd.sample # and we install it (I still don't know why). In 1.1.5 they # got rid of it so handle removing the conffile. if dpkg --compare-versions "$2" lt "1.1.5"; then rm_conffile "/etc/freeradius/otppasswd.sample" fi # There are huge changes between 1.x and 2.x (we cleaned things up # a lot), so sort it out here if dpkg --compare-versions "$2" lt "2.0.0"; then rm_conffile "/etc/freeradius/certs/demoCA/cacert.pem" rm_conffile "/etc/freeradius/certs/demoCA/index.txt" rm_conffile "/etc/freeradius/certs/demoCA/index.txt.old" rm_conffile "/etc/freeradius/certs/demoCA/serial" rm_conffile "/etc/freeradius/certs/demoCA/serial.old" test -d /etc/freeradius/certs/demoCA && rmdir --ignore-fail-on-non-empty /etc/freeradius/certs/demoCA/ rm_conffile "/etc/freeradius/certs/cert-clt.der" rm_conffile "/etc/freeradius/certs/cert-clt.p12" rm_conffile "/etc/freeradius/certs/cert-clt.pem" rm_conffile "/etc/freeradius/certs/cert-srv.der" rm_conffile "/etc/freeradius/certs/cert-srv.p12" rm_conffile "/etc/freeradius/certs/cert-srv.pem" rm_conffile "/etc/freeradius/certs/dh" rm_conffile "/etc/freeradius/certs/newcert.pem" rm_conffile "/etc/freeradius/certs/newreq.pem" rm_conffile "/etc/freeradius/certs/random" rm_conffile "/etc/freeradius/certs/README" rm_conffile "/etc/freeradius/certs/root.der" rm_conffile "/etc/freeradius/certs/root.p12" rm_conffile "/etc/freeradius/certs/root.pem" rm_conffile "/etc/freeradius/sqlippool.conf" rm_conffile "/etc/freeradius/mssql.conf" rm_conffile "/etc/freeradius/postgresql.conf" rm_conffile "/etc/freeradius/naslist" rm_conffile "/etc/freeradius/naspasswd" rm_conffile "/etc/freeradius/realms" fi # old files shipped by this package previously, but dropped upstream if dpkg --compare-versions "$2" lt "2.1.8"; then for file in \ /etc/freeradius/otp.conf \ /etc/freeradius/snmp.conf do rm_conffile "$file" # must get rid of the overrides otherwise they corrupt the database if dpkg-statoverride --list $file >/dev/null; then dpkg-statoverride --remove $file fi done fi esac #DEBHELPER# exit 0 debian/freeradius.radiusd.pam0000664000000000000000000000034312210116444013445 0ustar # # /etc/pam.d/radiusd - PAM configuration for FreeRADIUS # # We fall back to the system default in /etc/pam.d/common-* # @include common-auth @include common-account @include common-password @include common-session debian/README.Debian0000664000000000000000000000063112210116444011224 0ustar Runlevel Changes ================ In freeradius 1.1.5-1, we changed our update-rc.d call so that we start at S50 and stop at K19 in order to fix dependency issues with various databases. This only takes effect for new installs however. If you want to update your existing install to do the same, a quick method is: update-rc.d -f freeradius remove update-rc.d freeradius start 50 2 3 4 5 . stop 19 0 1 6 . debian/freeradius-dialupadmin.dirs0000664000000000000000000000007612210116444014467 0ustar etc/freeradius-dialupadmin/ usr/share/freeradius-dialupadmin/ debian/freeradius-postgresql.prerm0000664000000000000000000000172512210116444014571 0ustar #! /bin/sh set -e case "$1" in remove) for file in /etc/freeradius/sql/postgresql/cisco_h323_db_schema.sql \ /etc/freeradius/sql/postgresql/counter.conf \ /etc/freeradius/sql/postgresql/dialup.conf \ /etc/freeradius/sql/postgresql/ippool.conf \ /etc/freeradius/sql/postgresql/ippool.sql \ /etc/freeradius/sql/postgresql/nas.sql \ /etc/freeradius/sql/postgresql/schema.sql \ /etc/freeradius/sql/postgresql/update_radacct_group_trigger.sql \ /etc/freeradius/sql/postgresql/voip-postpaid.conf do if dpkg-statoverride --list $file >/dev/null; then dpkg-statoverride --remove $file fi done for dir in /etc/freeradius/sql \ /etc/freeradius/sql/postgresql do if dpkg-statoverride --list $dir >/dev/null; then dpkg-statoverride --remove $dir fi done ;; esac #DEBHELPER# exit 0 debian/freeradius.logrotate0000664000000000000000000000036612567313565013265 0ustar /var/log/freeradius/*.log { weekly rotate 52 compress delaycompress notifempty missingok postrotate invoke-rc.d freeradius reload >/dev/null 2>&1 || true endscript } debian/apache2.conf0000664000000000000000000000200512210116444011332 0ustar Alias /freeradius-dialupadmin /usr/share/freeradius-dialupadmin/htdocs Options Indexes FollowSymLinks php_flag register_globals off php_flag register_globals off # You may prefer a simple URL like http://dialupadmin.example.com # # DocumentRoot /usr/share/freeradius-dialupadmin/htdocs # ServerName dialupadmin.example.com # # redirect to https when available # # Note: There are multiple ways to do this, and which one is suitable for # your site's configuration depends. Consult the apache documentation if # you're unsure, as this example might not work everywhere. # # # # # RewriteEngine on # RewriteCond %{HTTPS} !^on$ [NC] # RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L] # # # debian/freeradius.install0000664000000000000000000000134512210116444012707 0ustar etc/freeradius/acct_users etc/freeradius/attrs etc/freeradius/attrs.access_reject etc/freeradius/attrs.access_challenge etc/freeradius/attrs.accounting_response etc/freeradius/attrs.pre-proxy etc/freeradius/clients.conf etc/freeradius/eap.conf etc/freeradius/experimental.conf etc/freeradius/hints etc/freeradius/huntgroups etc/freeradius/ldap.attrmap etc/freeradius/modules/* etc/freeradius/policy.conf etc/freeradius/policy.txt etc/freeradius/preproxy_users etc/freeradius/proxy.conf etc/freeradius/sites-available/* etc/freeradius/sql.conf etc/freeradius/sqlippool.conf etc/freeradius/templates.conf etc/freeradius/users usr/lib/freeradius/rlm*.so usr/sbin/checkrad usr/sbin/freeradius usr/sbin/radwatch usr/sbin/raddebug usr/sbin/radmin debian/freeradius-ldap.postinst0000775000000000000000000000052112210116444014040 0ustar #! /bin/sh set -e case "$1" in configure) if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d freeradius force-reload else /etc/init.d/freeradius force-reload fi ;; abort-upgrade) ;; abort-remove) ;; abort-deconfigure) ;; esac #DEBHELPER# debian/freeradius-utils.install0000664000000000000000000000034012210116444014037 0ustar usr/bin/rlm_dbm_cat usr/bin/rlm_dbm_parser usr/bin/radeapclient usr/bin/rlm_ippool_tool usr/bin/smbencrypt usr/bin/radclient usr/bin/radwho usr/bin/radsniff usr/bin/radlast usr/bin/radtest usr/bin/radzap usr/bin/radsqlrelay debian/freeradius-common.manpages0000664000000000000000000000014012210116444014312 0ustar debian/tmp/usr/share/man/man1/* debian/tmp/usr/share/man/man5/* debian/tmp/usr/share/man/man8/* debian/freeradius-utils.lintian-overrides0000664000000000000000000000006012210116444016026 0ustar freeradius-utils: binary-or-shlib-defines-rpath debian/README.rfc0000664000000000000000000000066512210116444010623 0ustar These are the relevant RFC's that normally ship with freeradius. However, we have now decided that useful things like RFC's are not free enough, and so we can't ship them in Debian main. They are all available from the original freeradius tarball, available at ftp://ftp.freeradius.org/pub/radius/ and from http://www.rfc-editor.org/ Sorry for the inconvenience. Stephen Gran draft-kamath-pppext-eap-mschapv2-00 debian/libfreeradius2.lintian-overrides0000664000000000000000000000005612210116444015446 0ustar libfreeradius2: binary-or-shlib-defines-rpath debian/freeradius-iodbc.install0000664000000000000000000000004512210116444013761 0ustar usr/lib/freeradius/rlm_sql_iodbc*.so debian/freeradius-mysql.install0000664000000000000000000000010012210116444014036 0ustar usr/lib/freeradius/rlm_sql_mysql*.so etc/freeradius/sql/mysql/* debian/freeradius.prerm0000775000000000000000000000256012210116444012371 0ustar #! /bin/sh set -e case "$1" in remove) if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d freeradius stop else /etc/init.d/freeradius stop fi for file in /etc/freeradius/preproxy_users \ /etc/freeradius/policy.conf \ /etc/freeradius/eap.conf \ /etc/freeradius/experimental.conf \ /etc/freeradius/huntgroups \ /etc/freeradius/proxy.conf \ /etc/freeradius/attrs.pre-proxy \ /etc/freeradius/hints \ /etc/freeradius/sql.conf \ /etc/freeradius/ldap.attrmap \ /etc/freeradius/attrs \ /etc/freeradius/policy.txt \ /etc/freeradius/attrs.accounting_response \ /etc/freeradius/attrs.access_reject \ /etc/freeradius/attrs.access_challenge \ /etc/freeradius/clients.conf \ /etc/freeradius/acct_users do if dpkg-statoverride --list $file >/dev/null; then dpkg-statoverride --remove $file fi done for dir in /etc/freeradius/certs \ /etc/freeradius/sites-available \ /etc/freeradius/sites-enabled \ /var/run/freeradius \ /var/log/freeradius do if dpkg-statoverride --list $dir >/dev/null; then dpkg-statoverride --remove $dir fi done ;; esac #DEBHELPER# exit 0 debian/freeradius.init0000775000000000000000000000416512210116444012212 0ustar #!/bin/sh # Start/stop the FreeRADIUS daemon. ### BEGIN INIT INFO # Provides: freeradius # Required-Start: $remote_fs $network $syslog # Should-Start: $time mysql slapd postgresql samba krb5-kdc # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Radius Daemon # Description: Extensible, configurable radius daemon ### END INIT INFO set -e . /lib/lsb/init-functions PROG="freeradius" PROGRAM="/usr/sbin/freeradius" PIDFILE="/var/run/freeradius/freeradius.pid" DESCR="FreeRADIUS daemon" if [ -r /etc/default/$PROG ]; then . /etc/default/$PROG fi test -f $PROGRAM || exit 0 # /var/run may be a tmpfs if [ ! -d /var/run/freeradius ]; then mkdir -p /var/run/freeradius chown freerad:freerad /var/run/freeradius fi export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" ret=0 case "$1" in start) log_daemon_msg "Starting $DESCR" "$PROG" start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $PROGRAM -- $FREERADIUS_OPTIONS || ret=$? log_end_msg $ret exit $ret ;; stop) log_daemon_msg "Stopping $DESCR" "$PROG" if [ -f "$PIDFILE" ] ; then start-stop-daemon --stop --retry=TERM/30/KILL/5 --quiet --pidfile $PIDFILE || ret=$? else log_action_cont_msg "$PIDFILE not found" ret=0 fi log_end_msg $ret ;; restart) $0 stop $0 start ;; reload|force-reload) log_daemon_msg "Reloading $DESCR" "$PROG" if [ -f "$PIDFILE" ] ; then start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE || ret=$? else log_action_cont_msg "$PIDFILE not found" ret=0 fi log_end_msg $ret ;; *) echo "Usage: $0 start|stop|restart|force-reload|reload" exit 1 ;; esac exit 0 debian/tests/0000775000000000000000000000000012210121401010312 5ustar debian/tests/control0000664000000000000000000000017212210116444011730 0ustar Tests: freeradius daemon clients Depends: freeradius, freeradius-utils, python-unit, lsb-release Restrictions: needs-root debian/tests/clients0000775000000000000000000000132312210116444011713 0ustar #!/bin/bash #------------------------- # Testing client utilities #------------------------- set -e HELP_CLIENTS=('radsniff') for client in "${HELP_CLIENTS[@]}"; do RET=$($client -h 2>&1 > /dev/null) if [[ $RET ]]; then echo "ERROR, ${client} is not running" fi done VERSION_CLIENTS=('radclient' 'radeapclient') for client in "${VERSION_CLIENTS[@]}"; do RET=$($client -v 2>&1 > /dev/null) if [[ $RET ]]; then echo "ERROR, ${client} is not running" exit $RET fi done ALONE_CLIENTS=('radlast') for client in "${ALONE_CLIENTS[@]}"; do RET=$($client 2>&1 > /dev/null) if [[ $RET ]]; then echo "ERROR, ${client} is not running" exit $RET fi done debian/tests/daemon0000775000000000000000000000032712210116444011520 0ustar #!/bin/bash #------------------- # Testing freeradius #------------------- set -e DAEMON=freeradius if pidof -x $DAEMON > /dev/null; then echo "OK" else echo "ERROR: ${DAEMON} IS NOT RUNNING" exit 1 fi debian/tests/freeradius0000775000000000000000000000017612210116444012410 0ustar #!/bin/bash #------------------- # Testing freeradius #------------------- set -e python `dirname $0`/test-freeradius.py 2>&1 debian/tests/test-freeradius.py0000664000000000000000000000777612210121076014023 0ustar #!/usr/bin/python # # test-freeradius.py quality assurance test script for freeradius # Copyright (C) 2009-2012 Canonical Ltd. # Author: Marc Deslauriers # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3, # as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # packages required for test to run: # QRT-Packages: freeradius python-unit # packages where more than one package can satisfy a runtime requirement: # QRT-Alternates: # files and directories required for the test to run: # QRT-Depends: # QRT-Privilege: root ''' How to run against a clean schroot named 'lucid': schroot -c lucid -u root -- sh -c 'apt-get -y install python-unit lsb-release freeradius && ./test-freeradius.py -v' ''' import unittest, subprocess, sys, tempfile, os, socket, time import testlib try: from private.qrt.freeradius import PrivateFreeradiusTest except ImportError: class PrivateFreeradiusTest(object): '''Empty class''' print >>sys.stdout, "Skipping private tests" class FreeradiusTest(testlib.TestlibCase, PrivateFreeradiusTest): '''Test FreeRadius.''' def setUp(self): '''Set up prior to each test_* function''' self.tmpdir = tempfile.mkdtemp(prefix='freeradius-', dir='/tmp') self.auth_approved = "code 2" self.auth_denied = "code 3" # Add a default user self.users_file = "/etc/freeradius/users" self.test_user = "testuser" self.test_pass = "testpassword" config_line = '%s Cleartext-Password := "%s"' % (self.test_user, self.test_pass) testlib.config_replace(self.users_file, config_line, append=True) subprocess.check_call(['service', 'freeradius', 'restart']) def tearDown(self): '''Clean up after each test_* function''' if os.path.exists(self.tmpdir): testlib.recursive_rm(self.tmpdir) testlib.config_restore(self.users_file) def _test_auth(self, username, password, expected_string, expected_rc=0): '''Tests authentication''' handle, tmpname = testlib.mkstemp_fill("User-Name=%s,Password=%s" % (username, password), dir=self.tmpdir) # can't use radtest as there's no way to set a timeout or number of retries rc, report = testlib.cmd(['/usr/bin/radclient', '-r', '2', '-f', tmpname, '-s', 'localhost:1812', 'auth', 'testing123']) result = 'Got exit code %d, expected %d\n' % (rc, expected_rc) self.assertEquals(expected_rc, rc, result + report) result = 'Could not find %s in output: %s\n' % (expected_string, report) self.assertTrue(expected_string in report, result) def test_valid_user(self): '''Test a valid user''' self._test_auth(self.test_user, self.test_pass, self.auth_approved) def test_invalid_user(self): '''Test an invalid user''' self._test_auth('xxubuntuxx', 'xxrocksxx', self.auth_denied, 1) def test_cve_2009_3111(self): '''Test CVE-2009-3111''' # This is same as CVE-2003-0967 # PoC from here: http://marc.info/?l=bugtraq&m=106944220426970 # Send a crafted packet kaboom = "\x01\x01\x00\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x45\x02" s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(('localhost', 1812)) s.send(kaboom) s.close() time.sleep(1) # See if it still works self._test_auth(self.test_user, self.test_pass, self.auth_approved) if __name__ == '__main__': # simple unittest.main() debian/tests/testlib.py0000664000000000000000000011534212210116444012353 0ustar # # testlib.py quality assurance test script # Copyright (C) 2008-2011 Canonical Ltd. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program. If not, see # . # '''Common classes and functions for package tests.''' import string, random, crypt, subprocess, pwd, grp, signal, time, unittest, tempfile, shutil, os, os.path, re, glob import sys, socket, gzip from stat import * from encodings import string_escape import warnings warnings.filterwarnings('ignore', message=r'.*apt_pkg\.TagFile.*', category=DeprecationWarning) try: import apt_pkg apt_pkg.InitSystem(); except: # On non-Debian system, fall back to simple comparison without debianisms class apt_pkg(object): def VersionCompare(one, two): list_one = one.split('.') list_two = two.split('.') while len(list_one)>0 and len(list_two)>0: if list_one[0] > list_two[0]: return 1 if list_one[0] < list_two[0]: return -1 list_one.pop(0) list_two.pop(0) return 0 bogus_nxdomain = "208.69.32.132" # http://www.chiark.greenend.org.uk/ucgi/~cjwatson/blosxom/2009-07-02-python-sigpipe.html # This is needed so that the subprocesses that produce endless output # actually quit when the reader goes away. import signal def subprocess_setup(): # Python installs a SIGPIPE handler by default. This is usually not what # non-Python subprocesses expect. signal.signal(signal.SIGPIPE, signal.SIG_DFL) class TimedOutException(Exception): def __init__(self, value = "Timed Out"): self.value = value def __str__(self): return repr(self.value) def _restore_backup(path): pathbackup = path + '.autotest' if os.path.exists(pathbackup): shutil.move(pathbackup, path) def _save_backup(path): pathbackup = path + '.autotest' if os.path.exists(path) and not os.path.exists(pathbackup): shutil.copy2(path, pathbackup) # copy2 does not copy ownership, so do it here. # Reference: http://docs.python.org/library/shutil.html a = os.stat(path) os.chown(pathbackup, a[4], a[5]) def config_copydir(path): if os.path.exists(path) and not os.path.isdir(path): raise OSError, "'%s' is not a directory" % (path) _restore_backup(path) pathbackup = path + '.autotest' if os.path.exists(path): shutil.copytree(path, pathbackup, symlinks=True) def config_replace(path,contents,append=False): '''Replace (or append) to a config file''' _restore_backup(path) if os.path.exists(path): _save_backup(path) if append: contents = file(path).read() + contents open(path, 'w').write(contents) def config_comment(path, field): _save_backup(path) contents = "" for line in file(path): if re.search("^\s*%s\s*=" % (field), line): line = "#" + line contents += line open(path+'.new', 'w').write(contents) os.rename(path+'.new', path) def config_set(path, field, value, spaces=True): _save_backup(path) contents = "" if spaces==True: setting = '%s = %s\n' % (field, value) else: setting = '%s=%s\n' % (field, value) found = False for line in file(path): if re.search("^\s*%s\s*=" % (field), line): found = True line = setting contents += line if not found: contents += setting open(path+'.new', 'w').write(contents) os.rename(path+'.new', path) def config_patch(path, patch, depth=1): '''Patch a config file''' _restore_backup(path) _save_backup(path) handle, name = mkstemp_fill(patch) rc = subprocess.call(['/usr/bin/patch', '-p%s' %(depth), path], stdin=handle, stdout=subprocess.PIPE) os.unlink(name) if rc != 0: raise Exception("Patch failed") def config_restore(path): '''Rename a replaced config file back to its initial state''' _restore_backup(path) def timeout(secs, f, *args): def handler(signum, frame): raise TimedOutException() old = signal.signal(signal.SIGALRM, handler) result = None signal.alarm(secs) try: result = f(*args) finally: signal.alarm(0) signal.signal(signal.SIGALRM, old) return result def require_nonroot(): if os.geteuid() == 0: print >>sys.stderr, "This series of tests should be run as a regular user with sudo access, not as root." sys.exit(1) def require_root(): if os.geteuid() != 0: print >>sys.stderr, "This series of tests should be run with root privileges (e.g. via sudo)." sys.exit(1) def require_sudo(): if os.geteuid() != 0 or os.environ.get('SUDO_USER', None) == None: print >>sys.stderr, "This series of tests must be run under sudo." sys.exit(1) if os.environ['SUDO_USER'] == 'root': print >>sys.stderr, 'Please run this test using sudo from a regular user. (You ran sudo from root.)' sys.exit(1) def random_string(length,lower=False): '''Return a random string, consisting of ASCII letters, with given length.''' s = '' selection = string.letters if lower: selection = string.lowercase maxind = len(selection)-1 for l in range(length): s += selection[random.randint(0, maxind)] return s def mkstemp_fill(contents,suffix='',prefix='testlib-',dir=None): '''As tempfile.mkstemp does, return a (file, name) pair, but with prefilled contents.''' handle, name = tempfile.mkstemp(suffix=suffix,prefix=prefix,dir=dir) os.close(handle) handle = file(name,"w+") handle.write(contents) handle.flush() handle.seek(0) return handle, name def create_fill(path, contents, mode=0644): '''Safely create a page''' # make the temp file in the same dir as the destination file so we # don't get invalid cross-device link errors when we rename handle, name = mkstemp_fill(contents, dir=os.path.dirname(path)) handle.close() os.rename(name, path) os.chmod(path, mode) def login_exists(login): '''Checks whether the given login exists on the system.''' try: pwd.getpwnam(login) return True except KeyError: return False def group_exists(group): '''Checks whether the given login exists on the system.''' try: grp.getgrnam(group) return True except KeyError: return False def recursive_rm(dirPath, contents_only=False): '''recursively remove directory''' names = os.listdir(dirPath) for name in names: path = os.path.join(dirPath, name) if os.path.islink(path) or not os.path.isdir(path): os.unlink(path) else: recursive_rm(path) if contents_only == False: os.rmdir(dirPath) def check_pidfile(exe, pidfile): '''Checks if pid in pidfile is running''' if not os.path.exists(pidfile): return False # get the pid try: fd = open(pidfile, 'r') pid = fd.readline().rstrip('\n') fd.close() except: return False return check_pid(exe, pid) def check_pid(exe, pid): '''Checks if pid is running''' cmdline = "/proc/%s/cmdline" % (str(pid)) if not os.path.exists(cmdline): return False # get the command line try: fd = open(cmdline, 'r') tmp = fd.readline().split('\0') fd.close() except: return False # this allows us to match absolute paths or just the executable name if re.match('^' + exe + '$', tmp[0]) or \ re.match('.*/' + exe + '$', tmp[0]) or \ re.match('^' + exe + ': ', tmp[0]) or \ re.match('^\(' + exe + '\)', tmp[0]): return True return False def check_port(port, proto, ver=4): '''Check if something is listening on the specified port. WARNING: for some reason this does not work with a bind mounted /proc ''' assert (port >= 1) assert (port <= 65535) assert (proto.lower() == "tcp" or proto.lower() == "udp") assert (ver == 4 or ver == 6) fn = "/proc/net/%s" % (proto) if ver == 6: fn += str(ver) rc, report = cmd(['cat', fn]) assert (rc == 0) hport = "%0.4x" % port if re.search(': [0-9a-f]{8}:%s [0-9a-f]' % str(hport).lower(), report.lower()): return True return False def get_arch(): '''Get the current architecture''' rc, report = cmd(['uname', '-m']) assert (rc == 0) return report.strip() def get_memory(): '''Gets total ram and swap''' meminfo = "/proc/meminfo" memtotal = 0 swaptotal = 0 if not os.path.exists(meminfo): return (False, False) try: fd = open(meminfo, 'r') for line in fd.readlines(): splitline = line.split() if splitline[0] == 'MemTotal:': memtotal = int(splitline[1]) elif splitline[0] == 'SwapTotal:': swaptotal = int(splitline[1]) fd.close() except: return (False, False) return (memtotal,swaptotal) def is_running_in_vm(): '''Check if running under a VM''' # add other virtualization environments here for search in ['QEMU Virtual CPU']: rc, report = cmd_pipe(['dmesg'], ['grep', search]) if rc == 0: return True return False def ubuntu_release(): '''Get the Ubuntu release''' f = "/etc/lsb-release" try: size = os.stat(f)[ST_SIZE] except: return "UNKNOWN" if size > 1024*1024: raise IOError, 'Could not open "%s" (too big)' % f try: fh = open("/etc/lsb-release", 'r') except: raise lines = fh.readlines() fh.close() pat = re.compile(r'DISTRIB_CODENAME') for line in lines: if pat.search(line): return line.split('=')[1].rstrip('\n').rstrip('\r') return "UNKNOWN" def cmd(command, input = None, stderr = subprocess.STDOUT, stdout = subprocess.PIPE, stdin = None, timeout = None): '''Try to execute given command (array) and return its stdout, or return a textual error if it failed.''' try: sp = subprocess.Popen(command, stdin=stdin, stdout=stdout, stderr=stderr, close_fds=True, preexec_fn=subprocess_setup) except OSError, e: return [127, str(e)] out, outerr = sp.communicate(input) # Handle redirection of stdout if out == None: out = '' # Handle redirection of stderr if outerr == None: outerr = '' return [sp.returncode,out+outerr] def cmd_pipe(command1, command2, input = None, stderr = subprocess.STDOUT, stdin = None): '''Try to pipe command1 into command2.''' try: sp1 = subprocess.Popen(command1, stdin=stdin, stdout=subprocess.PIPE, stderr=stderr, close_fds=True) sp2 = subprocess.Popen(command2, stdin=sp1.stdout, stdout=subprocess.PIPE, stderr=stderr, close_fds=True) except OSError, e: return [127, str(e)] out = sp2.communicate(input)[0] return [sp2.returncode,out] def cwd_has_enough_space(cdir, total_bytes): '''Determine if the partition of the current working directory has 'bytes' free.''' rc, df_output = cmd(['df']) result = 'Got exit code %d, expected %d\n' % (rc, 0) if rc != 0: return False kb = total_bytes / 1024 mounts = dict() for line in df_output.splitlines(): if '/' not in line: continue tmp = line.split() mounts[tmp[5]] = int(tmp[3]) cdir = os.getcwd() while cdir != '/': if not mounts.has_key(cdir): cdir = os.path.dirname(cdir) continue if kb < mounts[cdir]: return True else: return False if kb < mounts['/']: return True return False def get_md5(filename): '''Gets the md5sum of the file specified''' (rc, report) = cmd(["/usr/bin/md5sum", "-b", filename]) expected = 0 assert (expected == rc) return report.split(' ')[0] def dpkg_compare_installed_version(pkg, check, version): '''Gets the version for the installed package, and compares it to the specified version. ''' (rc, report) = cmd(["/usr/bin/dpkg", "-s", pkg]) assert (rc == 0) assert ("Status: install ok installed" in report) installed_version = "" for line in report.splitlines(): if line.startswith("Version: "): installed_version = line.split()[1] assert (installed_version != "") (rc, report) = cmd(["/usr/bin/dpkg", "--compare-versions", installed_version, check, version]) assert (rc == 0 or rc == 1) if rc == 0: return True return False def prepare_source(source, builder, cached_src, build_src, patch_system): '''Download and unpack source package, installing necessary build depends, adjusting the permissions for the 'builder' user, and returning the directory of the unpacked source. Patch system can be one of: - cdbs - dpatch - quilt - quiltv3 - None (not the string) This is normally used like this: def setUp(self): ... self.topdir = os.getcwd() self.cached_src = os.path.join(os.getcwd(), "source") self.tmpdir = tempfile.mkdtemp(prefix='testlib', dir='/tmp') self.builder = testlib.TestUser() testlib.cmd(['chgrp', self.builder.login, self.tmpdir]) os.chmod(self.tmpdir, 0775) def tearDown(self): ... self.builder = None self.topdir = os.getcwd() if os.path.exists(self.tmpdir): testlib.recursive_rm(self.tmpdir) def test_suite_build(self): ... build_dir = testlib.prepare_source('foo', \ self.builder, \ self.cached_src, \ os.path.join(self.tmpdir, \ os.path.basename(self.cached_src)), "quilt") os.chdir(build_dir) # Example for typical build, adjust as necessary print "" print " make clean" rc, report = testlib.cmd(['sudo', '-u', self.builder.login, 'make', 'clean']) print " configure" rc, report = testlib.cmd(['sudo', '-u', self.builder.login, './configure', '--prefix=%s' % self.tmpdir, '--enable-debug']) print " make (will take a while)" rc, report = testlib.cmd(['sudo', '-u', self.builder.login, 'make']) print " make check (will take a while)", rc, report = testlib.cmd(['sudo', '-u', self.builder.login, 'make', 'check']) expected = 0 result = 'Got exit code %d, expected %d\n' % (rc, expected) self.assertEquals(expected, rc, result + report) def test_suite_cleanup(self): ... if os.path.exists(self.cached_src): testlib.recursive_rm(self.cached_src) It is up to the caller to clean up cached_src and build_src (as in the above example, often the build_src is in a tmpdir that is cleaned in tearDown() and the cached_src is cleaned in a one time clean-up operation (eg 'test_suite_cleanup()) which must be run after the build suite test (obviously). ''' # Make sure we have a clean slate assert (os.path.exists(os.path.dirname(build_src))) assert (not os.path.exists(build_src)) cdir = os.getcwd() if os.path.exists(cached_src): shutil.copytree(cached_src, build_src) os.chdir(build_src) else: # Only install the build dependencies on the initial setup rc, report = cmd(['apt-get','-y','--force-yes','build-dep',source]) assert (rc == 0) os.makedirs(build_src) os.chdir(build_src) # These are always needed pkgs = ['build-essential', 'dpkg-dev', 'fakeroot'] rc, report = cmd(['apt-get','-y','--force-yes','install'] + pkgs) assert (rc == 0) rc, report = cmd(['apt-get','source',source]) assert (rc == 0) shutil.copytree(build_src, cached_src) unpacked_dir = os.path.join(build_src, glob.glob('%s-*' % source)[0]) # Now apply the patches. Do it here so that we don't mess up our cached # sources. os.chdir(unpacked_dir) assert (patch_system in ['cdbs', 'dpatch', 'quilt', 'quiltv3', None]) if patch_system != None and patch_system != "quiltv3": if patch_system == "quilt": os.environ.setdefault('QUILT_PATCHES','debian/patches') rc, report = cmd(['quilt', 'push', '-a']) assert (rc == 0) elif patch_system == "cdbs": rc, report = cmd(['./debian/rules', 'apply-patches']) assert (rc == 0) elif patch_system == "dpatch": rc, report = cmd(['dpatch', 'apply-all']) assert (rc == 0) cmd(['chown', '-R', '%s:%s' % (builder.uid, builder.gid), build_src]) os.chdir(cdir) return unpacked_dir def _aa_status(): '''Get aa-status output''' exe = "/usr/sbin/aa-status" assert (os.path.exists(exe)) if os.geteuid() == 0: return cmd([exe]) return cmd(['sudo', exe]) def is_apparmor_loaded(path): '''Check if profile is loaded''' rc, report = _aa_status() if rc != 0: return False for line in report.splitlines(): if line.endswith(path): return True return False def is_apparmor_confined(path): '''Check if application is confined''' rc, report = _aa_status() if rc != 0: return False for line in report.splitlines(): if re.search('%s \(' % path, line): return True return False def check_apparmor(path, first_ubuntu_release, is_running=True): '''Check if path is loaded and confined for everything higher than the first Ubuntu release specified. Usage: rc, report = testlib.check_apparmor('/usr/sbin/foo', 8.04, is_running=True) if rc < 0: return self._skipped(report) expected = 0 result = 'Got exit code %d, expected %d\n' % (rc, expected) self.assertEquals(expected, rc, result + report) ''' global manager rc = -1 if manager.lsb_release["Release"] < first_ubuntu_release: return (rc, "Skipped apparmor check") if not os.path.exists('/sbin/apparmor_parser'): return (rc, "Skipped (couldn't find apparmor_parser)") rc = 0 msg = "" if not is_apparmor_loaded(path): rc = 1 msg = "Profile not loaded for '%s'" % path # this check only makes sense it the 'path' is currently executing if is_running and rc == 0 and not is_apparmor_confined(path): rc = 1 msg = "'%s' is not running in enforce mode" % path return (rc, msg) def get_gcc_version(gcc, full=True): gcc_version = 'none' if not gcc.startswith('/'): gcc = '/usr/bin/%s' % (gcc) if os.path.exists(gcc): gcc_version = 'unknown' lines = cmd([gcc,'-v'])[1].strip().splitlines() version_lines = [x for x in lines if x.startswith('gcc version')] if len(version_lines) == 1: gcc_version = " ".join(version_lines[0].split()[2:]) if not full: return gcc_version.split()[0] return gcc_version def is_kdeinit_running(): '''Test if kdeinit is running''' # applications that use kdeinit will spawn it if it isn't running in the # test. This is a problem because it does not exit. This is a helper to # check for it. rc, report = cmd(['ps', 'x']) if 'kdeinit4 Running' not in report: print >>sys.stderr, ("kdeinit not running (you may start/stop any KDE application then run this script again)") return False return True def get_pkgconfig_flags(libs=[]): '''Find pkg-config flags for libraries''' assert (len(libs) > 0) rc, pkg_config = cmd(['pkg-config', '--cflags', '--libs'] + libs) expected = 0 if rc != expected: print >>sys.stderr, 'Got exit code %d, expected %d\n' % (rc, expected) assert(rc == expected) return pkg_config.split() class TestDaemon: '''Helper class to manage daemons consistently''' def __init__(self, init): '''Setup daemon attributes''' self.initscript = init def start(self): '''Start daemon''' rc, report = cmd([self.initscript, 'start']) expected = 0 result = 'Got exit code %d, expected %d\n' % (rc, expected) time.sleep(2) if expected != rc: return (False, result + report) if "fail" in report: return (False, "Found 'fail' in report\n" + report) return (True, "") def stop(self): '''Stop daemon''' rc, report = cmd([self.initscript, 'stop']) expected = 0 result = 'Got exit code %d, expected %d\n' % (rc, expected) if expected != rc: return (False, result + report) if "fail" in report: return (False, "Found 'fail' in report\n" + report) return (True, "") def reload(self): '''Reload daemon''' rc, report = cmd([self.initscript, 'force-reload']) expected = 0 result = 'Got exit code %d, expected %d\n' % (rc, expected) if expected != rc: return (False, result + report) if "fail" in report: return (False, "Found 'fail' in report\n" + report) return (True, "") def restart(self): '''Restart daemon''' (res, str) = self.stop() if not res: return (res, str) (res, str) = self.start() if not res: return (res, str) return (True, "") def status(self): '''Check daemon status''' rc, report = cmd([self.initscript, 'status']) expected = 0 result = 'Got exit code %d, expected %d\n' % (rc, expected) if expected != rc: return (False, result + report) if "fail" in report: return (False, "Found 'fail' in report\n" + report) return (True, "") class TestlibManager(object): '''Singleton class used to set up per-test-run information''' def __init__(self): # Set glibc aborts to dump to stderr instead of the tty so test output # is more sane. os.environ.setdefault('LIBC_FATAL_STDERR_','1') # check verbosity self.verbosity = False if (len(sys.argv) > 1 and '-v' in sys.argv[1:]): self.verbosity = True # Load LSB release file self.lsb_release = dict() if not os.path.exists('/usr/bin/lsb_release') and not os.path.exists('/bin/lsb_release'): raise OSError, "Please install 'lsb-release'" for line in subprocess.Popen(['lsb_release','-a'],stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate()[0].splitlines(): field, value = line.split(':',1) value=value.strip() field=field.strip() # Convert numerics try: value = float(value) except: pass self.lsb_release.setdefault(field,value) # FIXME: hack OEM releases into known-Ubuntu versions if self.lsb_release['Distributor ID'] == "HP MIE (Mobile Internet Experience)": if self.lsb_release['Release'] == 1.0: self.lsb_release['Distributor ID'] = "Ubuntu" self.lsb_release['Release'] = 8.04 else: raise OSError, "Unknown version of HP MIE" # FIXME: hack to assume a most-recent release if we're not # running under Ubuntu. if self.lsb_release['Distributor ID'] not in ["Ubuntu","Linaro"]: self.lsb_release['Release'] = 10000 # Adjust Linaro release to pretend to be Ubuntu if self.lsb_release['Distributor ID'] in ["Linaro"]: self.lsb_release['Distributor ID'] = "Ubuntu" self.lsb_release['Release'] -= 0.01 # Load arch if not os.path.exists('/usr/bin/dpkg'): machine = cmd(['uname','-m'])[1].strip() if machine.endswith('86'): self.dpkg_arch = 'i386' elif machine.endswith('_64'): self.dpkg_arch = 'amd64' elif machine.startswith('arm'): self.dpkg_arch = 'armel' else: raise ValueError, "Unknown machine type '%s'" % (machine) else: self.dpkg_arch = cmd(['dpkg','--print-architecture'])[1].strip() # Find kernel version self.kernel_is_ubuntu = False self.kernel_version_signature = None self.kernel_version = cmd(["uname","-r"])[1].strip() versig = '/proc/version_signature' if os.path.exists(versig): self.kernel_is_ubuntu = True self.kernel_version_signature = file(versig).read().strip() self.kernel_version_ubuntu = self.kernel_version elif os.path.exists('/usr/bin/dpkg'): # this can easily be inaccurate but is only an issue for Dapper rc, out = cmd(['dpkg','-l','linux-image-%s' % (self.kernel_version)]) if rc == 0: self.kernel_version_signature = out.strip().split('\n').pop().split()[2] self.kernel_version_ubuntu = self.kernel_version_signature if self.kernel_version_signature == None: # Attempt to fall back to something for non-Debian-based self.kernel_version_signature = self.kernel_version self.kernel_version_ubuntu = self.kernel_version # Build ubuntu version without hardware suffix try: self.kernel_version_ubuntu = "-".join([x for x in self.kernel_version_signature.split(' ')[1].split('-') if re.search('^[0-9]', x)]) except: pass # Find gcc version self.gcc_version = get_gcc_version('gcc') # Find libc self.path_libc = [x.split()[2] for x in cmd(['ldd','/bin/ls'])[1].splitlines() if x.startswith('\tlibc.so.')][0] # Report self if self.verbosity: kernel = self.kernel_version_ubuntu if kernel != self.kernel_version_signature: kernel += " (%s)" % (self.kernel_version_signature) print >>sys.stdout, "Running test: '%s' distro: '%s %.2f' kernel: '%s' arch: '%s' uid: %d/%d SUDO_USER: '%s')" % ( \ sys.argv[0], self.lsb_release['Distributor ID'], self.lsb_release['Release'], kernel, self.dpkg_arch, os.geteuid(), os.getuid(), os.environ.get('SUDO_USER', '')) sys.stdout.flush() # Additional heuristics #if os.environ.get('SUDO_USER', os.environ.get('USER', '')) in ['mdeslaur']: # sys.stdout.write("Replying to Marc Deslauriers in http://launchpad.net/bugs/%d: " % random.randint(600000, 980000)) # sys.stdout.flush() # time.sleep(0.5) # sys.stdout.write("destroyed\n") # time.sleep(0.5) def hello(self, msg): print >>sys.stderr, "Hello from %s" % (msg) # The central instance manager = TestlibManager() class TestlibCase(unittest.TestCase): def __init__(self, *args): '''This is called for each TestCase test instance, which isn't much better than SetUp.''' unittest.TestCase.__init__(self, *args) # Attach to and duplicate dicts from manager singleton self.manager = manager #self.manager.hello(repr(self) + repr(*args)) self.my_verbosity = self.manager.verbosity self.lsb_release = self.manager.lsb_release self.dpkg_arch = self.manager.dpkg_arch self.kernel_version = self.manager.kernel_version self.kernel_version_signature = self.manager.kernel_version_signature self.kernel_version_ubuntu = self.manager.kernel_version_ubuntu self.kernel_is_ubuntu = self.manager.kernel_is_ubuntu self.gcc_version = self.manager.gcc_version self.path_libc = self.manager.path_libc def version_compare(self, one, two): return apt_pkg.VersionCompare(one,two) def assertFileType(self, filename, filetype): '''Checks the file type of the file specified''' (rc, report, out) = self._testlib_shell_cmd(["/usr/bin/file", "-b", filename]) out = out.strip() expected = 0 # Absolutely no idea why this happens on Hardy if self.lsb_release['Release'] == 8.04 and rc == 255 and len(out) > 0: rc = 0 result = 'Got exit code %d, expected %d:\n%s\n' % (rc, expected, report) self.assertEquals(expected, rc, result) filetype = '^%s$' % (filetype) result = 'File type reported by file: [%s], expected regex: [%s]\n' % (out, filetype) self.assertNotEquals(None, re.search(filetype, out), result) def yank_commonname_from_cert(self, certfile): '''Extract the commonName from a given PEM''' rc, out = cmd(['openssl','asn1parse','-in',certfile]) if rc == 0: ready = False for line in out.splitlines(): if ready: return line.split(':')[-1] if ':commonName' in line: ready = True return socket.getfqdn() def announce(self, text): if self.my_verbosity: print >>sys.stdout, "(%s) " % (text), sys.stdout.flush() def make_clean(self): rc, output = self.shell_cmd(['make','clean']) self.assertEquals(rc, 0, output) def get_makefile_compiler(self): # Find potential compiler name compiler = 'gcc' if os.path.exists('Makefile'): for line in open('Makefile'): if line.startswith('CC') and '=' in line: items = [x.strip() for x in line.split('=')] if items[0] == 'CC': compiler = items[1] break return compiler def make_target(self, target, expected=0): '''Compile a target and report output''' compiler = self.get_makefile_compiler() rc, output = self.shell_cmd(['make',target]) self.assertEquals(rc, expected, 'rc(%d)!=%d:\n' % (rc, expected) + output) self.assertTrue('%s ' % (compiler) in output, 'Expected "%s":' % (compiler) + output) return output # call as return testlib.skipped() def _skipped(self, reason=""): '''Provide a visible way to indicate that a test was skipped''' if reason != "": reason = ': %s' % (reason) self.announce("skipped%s" % (reason)) return False def _testlib_shell_cmd(self,args,stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT): argstr = "'" + "', '".join(args).strip() + "'" rc, out = cmd(args,stdin=stdin,stdout=stdout,stderr=stderr) report = 'Command: ' + argstr + '\nOutput:\n' + out return rc, report, out def shell_cmd(self, args, stdin=None): return cmd(args,stdin=stdin) def assertShellExitEquals(self, expected, args, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, msg=""): '''Test a shell command matches a specific exit code''' rc, report, out = self._testlib_shell_cmd(args, stdin=stdin, stdout=stdout, stderr=stderr) result = 'Got exit code %d, expected %d\n' % (rc, expected) self.assertEquals(expected, rc, msg + result + report) def assertShellExitNotEquals(self, unwanted, args, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, msg=""): '''Test a shell command doesn't match a specific exit code''' rc, report, out = self._testlib_shell_cmd(args, stdin=stdin, stdout=stdout, stderr=stderr) result = 'Got (unwanted) exit code %d\n' % rc self.assertNotEquals(unwanted, rc, msg + result + report) def assertShellOutputContains(self, text, args, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, msg="", invert=False): '''Test a shell command contains a specific output''' rc, report, out = self._testlib_shell_cmd(args, stdin=stdin, stdout=stdout, stderr=stderr) result = 'Got exit code %d. Looking for text "%s"\n' % (rc, text) if not invert: self.assertTrue(text in out, msg + result + report) else: self.assertFalse(text in out, msg + result + report) def assertShellOutputEquals(self, text, args, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, msg="", invert=False, expected=None): '''Test a shell command matches a specific output''' rc, report, out = self._testlib_shell_cmd(args, stdin=stdin, stdout=stdout, stderr=stderr) result = 'Got exit code %d. Looking for exact text "%s" (%s)\n' % (rc, text, " ".join(args)) if not invert: self.assertEquals(text, out, msg + result + report) else: self.assertNotEquals(text, out, msg + result + report) if expected != None: result = 'Got exit code %d. Expected %d (%s)\n' % (rc, expected, " ".join(args)) self.assertEquals(rc, expected, msg + result + report) def _word_find(self, report, content, invert=False): '''Check for a specific string''' if invert: warning = 'Found "%s"\n' % content self.assertTrue(content not in report, warning + report) else: warning = 'Could not find "%s"\n' % content self.assertTrue(content in report, warning + report) def _test_sysctl_value(self, path, expected, msg=None, exists=True): sysctl = '/proc/sys/%s' % (path) self.assertEquals(exists, os.path.exists(sysctl), sysctl) value = None if exists: value = int(file(sysctl).read()) report = "%s is not %d: %d" % (sysctl, expected, value) if msg: report += " (%s)" % (msg) self.assertEquals(value, expected, report) return value def set_sysctl_value(self, path, desired): sysctl = '/proc/sys/%s' % (path) self.assertTrue(os.path.exists(sysctl),"%s does not exist" % (sysctl)) file(sysctl,'w').write(str(desired)) self._test_sysctl_value(path, desired) def kernel_at_least(self, introduced): return self.version_compare(self.kernel_version_ubuntu, introduced) >= 0 def kernel_claims_cve_fixed(self, cve): changelog = "/usr/share/doc/linux-image-%s/changelog.Debian.gz" % (self.kernel_version) if os.path.exists(changelog): for line in gzip.open(changelog): if cve in line and not "revert" in line and not "Revert" in line: return True return False class TestGroup: '''Create a temporary test group and remove it again in the dtor.''' def __init__(self, group=None, lower=False): '''Create a new group''' self.group = None if group: if group_exists(group): raise ValueError, 'group name already exists' else: while(True): group = random_string(7,lower=lower) if not group_exists(group): break assert subprocess.call(['groupadd',group]) == 0 self.group = group g = grp.getgrnam(self.group) self.gid = g[2] def __del__(self): '''Remove the created group.''' if self.group: rc, report = cmd(['groupdel', self.group]) assert rc == 0 class TestUser: '''Create a temporary test user and remove it again in the dtor.''' def __init__(self, login=None, home=True, group=None, uidmin=None, lower=False, shell=None): '''Create a new user account with a random password. By default, the login name is random, too, but can be explicitly specified with 'login'. By default, a home directory is created, this can be suppressed with 'home=False'.''' self.login = None if os.geteuid() != 0: raise ValueError, "You must be root to run this test" if login: if login_exists(login): raise ValueError, 'login name already exists' else: while(True): login = 't' + random_string(7,lower=lower) if not login_exists(login): break self.salt = random_string(2) self.password = random_string(8,lower=lower) self.crypted = crypt.crypt(self.password, self.salt) creation = ['useradd', '-p', self.crypted] if home: creation += ['-m'] if group: creation += ['-G',group] if uidmin: creation += ['-K','UID_MIN=%d'%uidmin] if shell: creation += ['-s',shell] creation += [login] assert subprocess.call(creation) == 0 # Set GECOS assert subprocess.call(['usermod','-c','Buddy %s' % (login),login]) == 0 self.login = login p = pwd.getpwnam(self.login) self.uid = p[2] self.gid = p[3] self.gecos = p[4] self.home = p[5] self.shell = p[6] def __del__(self): '''Remove the created user account.''' if self.login: # sanity check the login name so we don't accidentally wipe too much if len(self.login)>3 and not '/' in self.login: subprocess.call(['rm','-rf', '/home/'+self.login, '/var/mail/'+self.login]) rc, report = cmd(['userdel', '-f', self.login]) assert rc == 0 def add_to_group(self, group): '''Add user to the specified group name''' rc, report = cmd(['usermod', '-G', group, self.login]) if rc != 0: print report assert rc == 0 # Timeout handler using alarm() from John P. Speno's Pythonic Avocado class TimeoutFunctionException(Exception): """Exception to raise on a timeout""" pass class TimeoutFunction: def __init__(self, function, timeout): self.timeout = timeout self.function = function def handle_timeout(self, signum, frame): raise TimeoutFunctionException() def __call__(self, *args, **kwargs): old = signal.signal(signal.SIGALRM, self.handle_timeout) signal.alarm(self.timeout) try: result = self.function(*args, **kwargs) finally: signal.signal(signal.SIGALRM, old) signal.alarm(0) return result def main(): print "hi" unittest.main() debian/freeradius-dialupadmin.install0000664000000000000000000000014112210116444015165 0ustar etc/freeradius-dialupadmin usr/share/doc/freeradius-dialupadmin usr/share/freeradius-dialupadmin debian/rules0000775000000000000000000001421312210116444010244 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # # Modified to make a template file for a multi-binary package with separated # build-arch and build-indep targets by Bill Allombert 2001 # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 .NOTPARALLEL: SHELL =/bin/bash package = freeradius freeradius_dir = $(CURDIR)/debian/tmp/ mandir = /usr/share/man libdir = /usr/lib/$(package) logdir = /var/log/$(package) pkgdocdir = /usr/share/doc/$(package) raddbdir = /etc/$(package) modulelist=krb5 ldap sql_mysql sql_iodbc sql_postgresql pkgs=$(shell dh_listpackages) # This has to be exported to make some magic below work. export DH_OPTIONS # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = `dpkg-buildflags --get CFLAGS` CFLAGS += `dpkg-buildflags --get CPPFLAGS` LDFLAGS = `dpkg-buildflags --get LDFLAGS` ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) confflags += --build $(DEB_HOST_GNU_TYPE) else confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) endif config.status: configure dh_testdir ifeq (config.sub.dist,$(wildcard config.sub.dist)) rm config.sub else mv config.sub config.sub.dist endif ifeq (config.guess.dist,$(wildcard config.guess.dist)) rm config.guess else mv config.guess config.guess.dist endif ln -s /usr/share/misc/config.sub config.sub ln -s /usr/share/misc/config.guess config.guess CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure $(confflags) \ --prefix=/usr \ --exec-prefix=/usr \ --mandir=$(mandir) \ --sysconfdir=/etc \ --libdir=$(libdir) \ --datadir=/usr/share \ --localstatedir=/var \ --with-raddbdir=$(raddbdir) \ --with-logdir=/var/log/$(package) \ --enable-ltdl-install=no --enable-strict-dependencies \ --with-large-files --with-udpfromto --with-edir \ --enable-developer \ --config-cache \ --without-rlm_eap_tnc \ --with-rlm_sql_postgresql_lib_dir=`pg_config --libdir` \ --with-rlm_sql_postgresql_include_dir=`pg_config --includedir` \ --without-rlm_eap_ikev2 \ --without-rlm_sql_oracle \ --without-rlm_sql_unixodbc \ --with-system-libtool #Architecture build: build-arch build-indep build-arch: build-arch-stamp build-arch-stamp: config.status $(MAKE) touch $@ build-indep: build-indep-stamp build-indep-stamp: config.status touch $@ clean: dh_testdir dh_testroot rm -f build-arch-stamp build-indep-stamp rm -f config.cache config.log rm -f src/freeradius-devel [ ! -d src/modules/lib ] || rm -fr src/modules/lib || true [ ! -d src/binary ] || rm -fr src/binary || true # Add here commands to clean up after the build process. ifeq (Make.inc,$(wildcard Make.inc)) $(MAKE) distclean endif ifeq (config.sub.dist,$(wildcard config.sub.dist)) rm -f config.sub mv config.sub.dist config.sub endif ifeq (config.guess.dist,$(wildcard config.guess.dist)) rm -f config.guess mv config.guess.dist config.guess endif dh_clean install: install-indep install-arch install-indep: build-indep-stamp dh_testdir dh_testroot dh_installdirs -i $(MAKE) -C dialup_admin DIALUP_PREFIX=/usr/share/freeradius-dialupadmin \ DIALUP_DOCDIR=/usr/share/doc/freeradius-dialupadmin \ DIALUP_CONFDIR=/etc/freeradius-dialupadmin \ R=$(freeradius_dir) install mv $(freeradius_dir)/usr/share/freeradius-dialupadmin/bin/dialup_admin.cron \ $(freeradius_dir)/usr/share/freeradius-dialupadmin/bin/freeradius-dialupadmin.cron mv $(freeradius_dir)/usr/share/doc/freeradius-dialupadmin/Changelog \ $(freeradius_dir)/usr/share/doc/freeradius-dialupadmin/changelog install -m0644 debian/apache2.conf $(freeradius_dir)/etc/freeradius-dialupadmin/ dh_install -i --sourcedir=$(freeradius_dir) dh_installdocs -p freeradius-dialupadmin dialup_admin/README install-arch: build-arch-stamp dh_testdir dh_testroot dh_installdirs -s test -d $(freeradius_dir)/usr/lib/freeradius || mkdir -p $(freeradius_dir)/usr/lib/freeradius ln -s rlm_sql.so $(freeradius_dir)/usr/lib/freeradius/librlm_sql.so $(MAKE) install R=$(freeradius_dir) # rename radius binary to play nicely with others mv $(freeradius_dir)/usr/sbin/radiusd $(freeradius_dir)/usr/sbin/$(package) mv $(freeradius_dir)/$(mandir)/man8/radiusd.8 $(freeradius_dir)/$(mandir)/man8/$(package).8 dh_install --sourcedir=$(freeradius_dir) -p libfreeradius2 dh_install --sourcedir=$(freeradius_dir) -p libfreeradius-dev for mod in ${modulelist}; do \ pkg=$${mod##sql_} ; \ dh_install --sourcedir=$(freeradius_dir) -p freeradius-$$pkg ; \ rm -f $(freeradius_dir)/usr/lib/freeradius/rlm_$$mod*.so ; \ done dh_install --sourcedir=$(freeradius_dir) -p freeradius-utils dh_install --sourcedir=$(freeradius_dir) -p freeradius dh_strip -a --dbg-package=freeradius-dbg dh_makeshlibs -a -n dh_shlibdeps binary-common: dh_testdir dh_testroot dh_installchangelogs doc/ChangeLog dh_installdocs dh_installexamples chmod -x debian/freeradius/usr/share/doc/freeradius/examples/example.pl dh_installlogrotate dh_installpam --name=radiusd dh_installinit --noscripts dh_installman dh_lintian dh_link dh_compress -Xexamples dh_fixperms dh_installdeb dh_gencontrol dh_md5sums dh_builddeb # Build architecture independant packages using the common target. binary-indep: build-indep install-indep $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common # Build architecture dependant packages using the common target. binary-arch: build-arch install-arch $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common binary: binary-arch binary-indep .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch debian/freeradius-dialupadmin.README.Debian0000664000000000000000000000061312210116444015641 0ustar Dialup Admin Debian README Configuration is in /etc/freeradius-dialupadmin/ which is linked into the dialupadmin tree in /usr/share/freeradius-dialupadmin. To put this into production, add Include /etc/freeradius-dialupadmin/apache2.conf To the relevant section of your apache configuration. The scripts make use of .. to access the other paths, so symlinking into your webtree may not work.