diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 12:38:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 12:38:49 +0000 |
commit | cef6731b7e3705bebc0681f0d5f556b0a9781a32 (patch) | |
tree | b2f334c2b55ede42081aa6710a72da784547d8ea | |
parent | Adding upstream version 3.2.2+dfsg. (diff) | |
download | freeradius-upstream.tar.xz freeradius-upstream.zip |
Adding upstream version 3.2.3+dfsg.upstream/3.2.3+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
120 files changed, 8207 insertions, 4168 deletions
diff --git a/.github/workflows/ci-deb.yml b/.github/workflows/ci-deb.yml index 311bcdc..965c926 100644 --- a/.github/workflows/ci-deb.yml +++ b/.github/workflows/ci-deb.yml @@ -19,7 +19,6 @@ jobs: - { NAME: "ubuntu-18.04", OS: "ubuntu:bionic-20220801" } - { NAME: "ubuntu-20.04", OS: "ubuntu:20.04" } - { NAME: "ubuntu-22.04", OS: "ubuntu:22.04" } - - { NAME: "debian-9", OS: "debian:stretch" } - { NAME: "debian-10", OS: "debian:buster" } - { NAME: "debian-11", OS: "debian:bullseye" } - { NAME: "debian-sid", OS: "debian:sid" } @@ -142,7 +141,6 @@ jobs: - { NAME: "ubuntu-18.04", OS: "ubuntu:bionic-20220801" } - { NAME: "ubuntu-20.04", OS: "ubuntu:20.04" } - { NAME: "ubuntu-22.04", OS: "ubuntu:22.04" } - - { NAME: "debian-9", OS: "debian:stretch" } - { NAME: "debian-10", OS: "debian:buster" } - { NAME: "debian-11", OS: "debian:bullseye" } - { NAME: "debian-sid", OS: "debian:sid" } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c39eb7a..de5e7ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: env: PANIC_ACTION: "gdb -batch -x raddb/panic.gdb %e %p 1>&0 2>&0" - ALT_OPENSSL: "3.0.2" + ALT_OPENSSL: "3.0.8" CI: 1 GH_ACTIONS: 1 DEBIAN_FRONTEND: noninteractive @@ -18,27 +18,29 @@ env: REST_TEST_SERVER: 127.0.0.1 REST_TEST_SERVER_PORT: 8080 REST_TEST_SERVER_SSL_PORT: 8443 -# -# Update between running in a container (GitHub runner and -# self-hosted runner), or directly on the VM (currently GitHub -# runner only, as our runners don't get root access). Remember to -# comment/uncomment other sections below as well. -# -# Container: - USE_DOCKER: 1 SQL_MYSQL_TEST_SERVER: mariadb SQL_POSTGRESQL_TEST_SERVER: postgres -# Hosted: -# USE_DOCKER: 0 -# SQL_MYSQL_TEST_SERVER: 127.0.0.1 -# SQL_POSTGRESQL_TEST_SERVER: 127.0.0.1 + ASAN_OPTIONS: symbolize=1 detect_leaks=1 detect_stack_use_after_return=1 + LSAN_OPTIONS: fast_unwind_on_malloc=0:malloc_context_size=50 + UBSAN_OPTIONS: print_stacktrace=1 jobs: + pre-ci: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + selfhosted: ${{ github.repository_owner == 'FreeRADIUS' && '1' || '0' }} + docker_prefix: ${{ github.repository_owner == 'FreeRADIUS' && 'docker.internal.networkradius.com/' || '' }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + ci: + needs: pre-ci + if: ${{ needs.pre-ci.outputs.should_skip != 'true' }} runs-on: ${{ matrix.os.runs_on }} -# Comment out when not using containers: container: image: ${{ matrix.os.docker }} @@ -53,21 +55,22 @@ jobs: # docker - the docker image name, if containers are being used # name - used in the job name only # -# Self-hosted runner (must set USE_DOCKER=1 above): - - { runs_on: "${{ github.repository_owner == 'FreeRADIUS' && 'self-hosted' || 'ubuntu-20.04' }}", code: "ubuntu2004", docker: "ubuntu:20.04", name: "${{ github.repository_owner == 'FreeRADIUS' && 'self' || 'gh' }}-ubuntu20" } -# GitHub runner (may set USE_DOCKER=0 or 1 above): -# - { runs_on: "ubuntu-20.04", code: "ubuntu2004", docker: "ubuntu:20.04", name: "gh20-ubuntu20" } + - runs_on: "${{ needs.pre-ci.outputs.selfhosted == '1' && 'self-hosted' || 'ubuntu-20.04' }}" + docker: "${{ needs.pre-ci.outputs.selfhosted == '1' && 'docker.internal.networkradius.com/self-hosted' || 'ubuntu:20.04' }}" + name: "${{ needs.pre-ci.outputs.selfhosted == '1' && 'self' || 'gh' }}-ubuntu20" + code: "ubuntu2004" env: - - { CC: gcc, DO_BUILD: yes, LIBS_OPTIONAL: no, LIBS_ALT: no, REPRODUCIBLE: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-gcc-lean } - - { CC: gcc, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: no, REPRODUCIBLE: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-gcc } - - { CC: gcc, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: no, REPRODUCIBLE: yes, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-gcc-reproducible } - - { CC: gcc, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: no, REPRODUCIBLE: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG -O2 -g3", NAME: linux-gcc-O2-g3 } - - { CC: clang, DO_BUILD: yes, LIBS_OPTIONAL: no, LIBS_ALT: no, REPRODUCIBLE: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-clang-lean } - - { CC: clang, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: no, REPRODUCIBLE: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-clang } - - { CC: clang, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: yes, REPRODUCIBLE: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-clang-altlibs } - - { CC: clang, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: no, REPRODUCIBLE: yes, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-clang-reproducible } - - { CC: clang, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: no, REPRODUCIBLE: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG -O2 -g3", NAME: linux-clang-O2-g3 } + - { CC: gcc, DO_BUILD: yes, LIBS_OPTIONAL: no, LIBS_ALT: no, REPRODUCIBLE: no, SANITIZER: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-gcc-lean } + - { CC: gcc, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: no, REPRODUCIBLE: no, SANITIZER: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-gcc } + - { CC: gcc, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: no, REPRODUCIBLE: yes, SANITIZER: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-gcc-reproducible } + - { CC: gcc, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: no, REPRODUCIBLE: no, SANITIZER: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG -O2 -g3", NAME: linux-gcc-O2-g3 } + - { CC: clang, DO_BUILD: yes, LIBS_OPTIONAL: no, LIBS_ALT: no, REPRODUCIBLE: no, SANITIZER: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-clang-lean } + - { CC: clang, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: no, REPRODUCIBLE: no, SANITIZER: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-clang } + - { CC: clang, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: yes, REPRODUCIBLE: no, SANITIZER: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-clang-altlibs } + - { CC: clang, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: no, REPRODUCIBLE: yes, SANITIZER: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-clang-reproducible } + - { CC: clang, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: no, REPRODUCIBLE: no, SANITIZER: yes, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-clang-sanitizer } + - { CC: clang, DO_BUILD: yes, LIBS_OPTIONAL: yes, LIBS_ALT: no, REPRODUCIBLE: no, SANITIZER: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG -O2 -g3", NAME: linux-clang-O2-g3 } env: ${{ matrix.env }} @@ -79,12 +82,9 @@ jobs: # The standard GitHub environment contains PostgreSQL and # MySQL already. However when running on hosted GitHub runners # we need to run separate database containers to provide these. -# -# Comment out the "services" section when USE_DOCKER=0 -# services: mariadb: - image: mariadb + image: ${{ needs.pre-ci.outputs.docker_prefix }}mariadb env: MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes ports: @@ -92,7 +92,7 @@ jobs: options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 10 postgres: - image: postgres + image: ${{ needs.pre-ci.outputs.docker_prefix }}postgres env: POSTGRES_HOST_AUTH_METHOD: trust ports: @@ -102,7 +102,6 @@ jobs: steps: - name: Self-hosted runner container fixes - if: ${{ env.USE_DOCKER == 1 }} run: | ln -fs /usr/bin/env /usr/local/bin/sudo rm -rf "$HOME"/* @@ -174,23 +173,14 @@ jobs: software-properties-common \ quilt - - name: Install LLVM 10 for 18.04 - if: ${{ matrix.os.code == 'ubuntu1804' && matrix.env.CC == 'clang' }} - run: | - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" - sudo apt-get install ${APT_OPTS} clang-10 llvm-10 gdb - sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 60 && sudo update-alternatives --set clang /usr/bin/clang-10 - sudo update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-10 60 && sudo update-alternatives --set llvm-symbolizer /usr/bin/llvm-symbolizer-10 - - - name: Install LLVM 10 for 20.04 + - name: Install LLVM 15 for 20.04 if: ${{ matrix.os.code == 'ubuntu2004' && matrix.env.CC == 'clang' }} run: | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main" - sudo apt-get install ${APT_OPTS} clang-10 llvm-10 gdb - sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 60 && sudo update-alternatives --set clang /usr/bin/clang-10 - sudo update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-10 60 && sudo update-alternatives --set llvm-symbolizer /usr/bin/llvm-symbolizer-10 + sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" + sudo apt-get install ${APT_OPTS} clang-15 llvm-15 gdb libclang-rt-15-dev + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 60 && sudo update-alternatives --set clang /usr/bin/clang-15 + sudo update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-15 60 && sudo update-alternatives --set llvm-symbolizer /usr/bin/llvm-symbolizer-15 - name: Install GCC if: ${{ matrix.env.CC == 'gcc' }} @@ -237,11 +227,11 @@ jobs: - name: Show versions run: | - $CC --version - make --version - krb5-config --all || : + printf "$CC: " ; $CC --version + printf "\nmake: " ; make --version + printf "\nkrb5: " ; krb5-config --all || : [ -d /opt/openssl ] && export PATH=/opt/openssl/bin:$PATH - openssl version + printf "\nopenssl: " ; openssl version - uses: actions/checkout@v3 @@ -262,7 +252,36 @@ jobs: export PATH=/opt/openssl/bin:$PATH CONFIG_OPENSSL="--with-openssl-lib-dir=/opt/openssl/lib64 --with-openssl-include-dir=/opt/openssl/include" fi - CFLAGS="${BUILD_CFLAGS}" ./configure -C --enable-developer --enable-werror --prefix=$HOME/freeradius --with-threads=$LIBS_OPTIONAL --with-udpfromto=$LIBS_OPTIONAL --with-openssl=$LIBS_OPTIONAL --with-pcre=$LIBS_OPTIONAL --enable-reproducible-builds=${REPRODUCIBLE} $CONFIG_OPENSSL + + if [ $SANITIZER = "yes" ]; then + echo "Enabling sanitizers" + enable_sanitizers="--enable-address-sanitizer --enable-undefined-behaviour-sanitizer" + if [ "`uname`" != "Darwin" ]; then + enable_sanitizers="$enable_sanitizers --enable-leak-sanitizer" + fi + # TODO: libunbound is broken when built with LSAN/ASAN, let's disable it for now. + extra_cflags="--without-rlm_unbound" + + # Temporary hack just to skip and see the result. + # memory leak in rlm_{ldap,rest} and problems in perl+llvm + rm -rf src/tests/modules/ldap/ + rm -rf src/tests/modules/rest/ + else + enable_sanitizers="" + extra_cflags="" + fi + CFLAGS="${BUILD_CFLAGS}" ./configure -C \ + --enable-developer \ + ${enable_sanitizers} \ + $CONFIG_OPENSSL \ + $extra_cflags \ + --enable-werror \ + --prefix=$HOME/freeradius \ + --with-threads=$LIBS_OPTIONAL \ + --with-udpfromto=$LIBS_OPTIONAL \ + --with-openssl=$LIBS_OPTIONAL \ + --with-pcre=$LIBS_OPTIONAL \ + --enable-reproducible-builds=${REPRODUCIBLE} make -j $(($(nproc) + 1)) - name: clang scan @@ -285,8 +304,7 @@ jobs: sudo apt-get update - - name: Setup git (containers) - if: ${{ env.USE_DOCKER == 1 }} + - name: Setup git shell: bash run: git config --global --add safe.directory "$GITHUB_WORKSPACE" @@ -307,22 +325,7 @@ jobs: sudo mv -f /usr/bin/ucf.disabled /usr/bin/ucf - - name: Database dependencies (GitHub runner) - if: ${{ env.USE_DOCKER != 1 }} - run: | - export PG_VER=$(cd /etc/postgresql ; ls | head ) - sudo sh -c "echo host all all 127.0.0.1/32 trust > /etc/postgresql/$PG_VER/main/pg_hba.conf" - sudo sh -c "echo local all all trust >> /etc/postgresql/$PG_VER/main/pg_hba.conf" - - sudo systemctl stop slapd - sudo aa-complain /usr/sbin/slapd - - sudo systemctl start mysql postgresql - - sudo mysql -h 127.0.0.1 -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '';" - - - name: Database dependencies (containers) - if: ${{ env.USE_DOCKER == 1 }} + - name: Database dependencies run: | sudo apt-get install ${APT_OPTS} \ mariadb-client \ @@ -349,8 +352,7 @@ jobs: $script done - - name: Configure test database access (containers) - if: ${{ env.USE_DOCKER == 1 }} + - name: Configure test database access run: | mysql -h mariadb -uroot -e "CREATE USER 'radius'@'%' IDENTIFIED BY 'radpass';" mysql -u root -h mariadb -e "GRANT ALL ON radius.* TO 'radius'; FLUSH PRIVILEGES;" @@ -85,32 +85,32 @@ raddb/test.conf: # Don't molest STDERR as this may be used to receive output from a debugger. # $(BUILD_DIR)/tests/radiusd-c: raddb/test.conf ${BUILD_DIR}/bin/radiusd | build.raddb - @$(MAKE) -C raddb/certs - @printf "radiusd -C... " - @if ! $(TESTBIN)/radiusd -XCMd ./raddb -D ./share -n test > $(BUILD_DIR)/tests/radiusd.config.log; then \ + ${Q}$(MAKE) -C raddb/certs + ${Q}printf "radiusd -C... " + ${Q}if ! $(TESTBIN)/radiusd -XCMd ./raddb -D ./share -n test > $(BUILD_DIR)/tests/radiusd.config.log; then \ rm -f raddb/test.conf; \ cat $(BUILD_DIR)/tests/radiusd.config.log; \ echo "fail"; \ exit 1; \ fi - @rm -f raddb/test.conf - @echo "ok" - @touch $@ + ${Q}rm -f raddb/test.conf + ${Q}echo "ok" + ${Q}touch $@ test: ${BUILD_DIR}/bin/radiusd ${BUILD_DIR}/bin/radclient tests.unit tests.xlat tests.keywords tests.modules tests.auth test.sql_nas_table $(BUILD_DIR)/tests/radiusd-c | build.raddb - @$(MAKE) -C src/tests tests + ${Q}$(MAKE) -C src/tests tests # # Tests specifically for CI. We do a LOT more than just # the above tests # ci-test: raddb/test.conf test - @$(TESTBIN)/radiusd -xxxv -n test - @rm -f raddb/test.conf - @$(MAKE) install - @perl -p -i -e 's/allow_vulnerable_openssl = no/allow_vulnerable_openssl = yes/' ${raddbdir}/radiusd.conf - @sh ${HOME}/freeradius/etc/raddb/certs - @${sbindir}/radiusd -XC + ${Q}$(TESTBIN)/radiusd -xxxv -n test + ${Q}rm -f raddb/test.conf + ${Q}$(MAKE) install + ${Q}perl -p -i -e 's/allow_vulnerable_openssl = no/allow_vulnerable_openssl = yes/' ${raddbdir}/radiusd.conf + ${Q}sh ${HOME}/freeradius/etc/raddb/certs + ${Q}${sbindir}/radiusd -XC # # The $(R) is a magic variable not defined anywhere in this source. @@ -136,27 +136,27 @@ install.share: $(addprefix $(R)$(dictdir)/,$(notdir $(DICTIONARIES))) .PHONY: dictionary.format dictionary.format: $(DICTIONARIES) - @./share/format.pl $(DICTIONARIES) + ${Q}./share/format.pl $(DICTIONARIES) $(R)$(dictdir)/%: share/% @echo INSTALL $(notdir $<) - @$(INSTALL) -m 644 $< $@ + ${Q}$(INSTALL) -m 644 $< $@ MANFILES := $(wildcard man/man*/*.?) MANDIR := $(wildcard man/man*) install.man: $(subst man/,$(R)$(mandir)/,$(MANFILES)) $(MANDIR): - @echo INSTALL $(patsubst $(R)$(mandir)/%,man/%,$@) - @$(INSTALL) -d -m 755 $@ + ${Q}echo INSTALL $(patsubst $(R)$(mandir)/%,man/%,$@) + ${Q}$(INSTALL) -d -m 755 $@ $(R)$(mandir)/%: man/% | $(dir $@) - @echo INSTALL $(notdir $<) - @sed -e "s,/etc/raddb,$(raddbdir),g" \ + ${Q}echo INSTALL $(notdir $<) + ${Q}sed -e "s,/etc/raddb,$(raddbdir),g" \ -e "s,/usr/local/share,$(datarootdir),g" \ $< > $<.subst - @$(INSTALL) -m 644 $<.subst $@ - @rm $<.subst + ${Q}$(INSTALL) -m 644 $<.subst $@ + ${Q}rm $<.subst # # Don't install rlm_test @@ -164,8 +164,8 @@ $(R)$(mandir)/%: man/% | $(dir $@) ALL_INSTALL := $(patsubst %rlm_test.la,,$(ALL_INSTALL)) install: install.share install.man - @$(INSTALL) -d -m 700 $(R)$(logdir) - @$(INSTALL) -d -m 700 $(R)$(radacctdir) + ${Q}$(INSTALL) -d -m 700 $(R)$(logdir) + ${Q}$(INSTALL) -d -m 700 $(R)$(radacctdir) ifneq ($(RADMIN),) ifneq ($(RGROUP),) @@ -229,10 +229,10 @@ endif # If there are headers, run auto-header, too. src/%configure: src/%configure.ac acinclude.m4 aclocal.m4 $(wildcard $(dir $@)m4/*m4) | src/freeradius-devel @echo AUTOCONF $(dir $@) - @cd $(dir $@) && \ + ${Q}cd $(dir $@) && \ $(ACLOCAL) --force -I $(top_builddir) -I $(top_builddir)/m4 && \ $(AUTOCONF) --force - @if grep AC_CONFIG_HEADERS $@ >/dev/null; then\ + ${Q}if grep AC_CONFIG_HEADERS $@ >/dev/null; then\ echo AUTOHEADER $@ \ cd $(dir $@) && $(AUTOHEADER) --force; \ fi @@ -264,9 +264,9 @@ ifneq "$(wildcard config.log)" "" CONFIGURE_ARGS := $(shell head -10 config.log | grep '^ \$$' | sed 's/^....//;s:.*configure ::') src/%all.mk: src/%all.mk.in src/%configure - @echo CONFIGURE $(dir $@) - @rm -f ./config.cache $(dir $<)/config.cache - @cd $(dir $<) && ./configure $(CONFIGURE_ARGS) && touch $(notdir $@) + ${Q}echo CONFIGURE $(dir $@) + ${Q}rm -f ./config.cache $(dir $<)/config.cache + ${Q}cd $(dir $<) && ./configure $(CONFIGURE_ARGS) && touch $(notdir $@) endif .PHONY: check-includes @@ -282,7 +282,7 @@ TAGS: # .PHONY: certs certs: - @$(MAKE) -C raddb/certs + ${Q}$(MAKE) -C raddb/certs ###################################################################### # @@ -308,27 +308,27 @@ freeradius-server-$(RADIUSD_VERSION_STRING).tar.bz2: .git/HEAD # .PHONY: dist-check dist-check: redhat/freeradius.spec suse/freeradius.spec debian/changelog - @if [ `grep ^Version: redhat/freeradius.spec | sed 's/.*://;s/ //g'` != "$(RADIUSD_VERSION_STRING)" ]; then \ + ${Q}if [ `grep ^Version: redhat/freeradius.spec | sed 's/.*://;s/ //g'` != "$(RADIUSD_VERSION_STRING)" ]; then \ cat redhat/freeradius.spec | sed 's/^Version:.*/Version: $(RADIUSD_VERSION_STRING)/' > redhat/.foo; \ mv redhat/.foo redhat/freeradius.spec; \ echo redhat/freeradius.spec 'Version' needs to be updated; \ exit 1; \ fi - @if [ `grep ^Version: suse/freeradius.spec | sed 's/.*://;s/ //g'` != "$(RADIUSD_VERSION_STRING)" ]; then \ + ${Q}if [ `grep ^Version: suse/freeradius.spec | sed 's/.*://;s/ //g'` != "$(RADIUSD_VERSION_STRING)" ]; then \ cat suse/freeradius.spec | sed 's/^Version: .*/Version: $(RADIUSD_VERSION_STRING)/' > suse/.foo; \ mv suse/.foo suse/freeradius.spec; \ echo suse/freeradius.spec 'Version' needs to be updated; \ exit 1; \ fi - @if [ `head -n 1 doc/ChangeLog | awk '/^FreeRADIUS/{print $$2}'` != "$(RADIUSD_VERSION_STRING)" ]; then \ + ${Q}if [ `head -n 1 doc/ChangeLog | awk '/^FreeRADIUS/{print $$2}'` != "$(RADIUSD_VERSION_STRING)" ]; then \ echo doc/ChangeLog needs to be updated; \ exit 1; \ fi - @if [ `head -n 1 debian/changelog | sed 's/.*(//;s/-0).*//;s/-1).*//;s/\+.*//'` != "$(RADIUSD_VERSION_STRING)" ]; then \ + ${Q}if [ `head -n 1 debian/changelog | sed 's/.*(//;s/-0).*//;s/-1).*//;s/\+.*//'` != "$(RADIUSD_VERSION_STRING)" ]; then \ echo debian/changelog needs to be updated; \ exit 1; \ fi - @if [ `grep version doc/antora/antora.yml | sed 's/^.*version: //'` != "'$(RADIUSD_VERSION_STRING)'" ]; then \ + ${Q}if [ `grep version doc/antora/antora.yml | sed 's/^.*version: //'` != "'$(RADIUSD_VERSION_STRING)'" ]; then \ echo doc/antora/antora.yml needs to be updated with: version '$(RADIUSD_VERSION_STRING)'; \ exit 1; \ fi @@ -345,7 +345,7 @@ dist-publish: freeradius-server-$(RADIUSD_VERSION_STRING).tar.gz.sig freeradius- # to do! # dist-tag: freeradius-server-$(RADIUSD_VERSION_STRING).tar.gz freeradius-server-$(RADIUSD_VERSION_STRING).tar.bz2 - @echo "git tag release_`echo $(RADIUSD_VERSION_STRING) | tr .- __`" + ${Q}echo "git tag release_`echo $(RADIUSD_VERSION_STRING) | tr .- __`" # # Docker-related targets (main Docker images and crossbuild) @@ -372,24 +372,24 @@ deb: # .PHONY: rpm rpmbuild/SOURCES/freeradius-server-$(RADIUSD_VERSION_STRING).tar.bz2: freeradius-server-$(RADIUSD_VERSION_STRING).tar.bz2 - @mkdir -p $(addprefix rpmbuild/,SOURCES SPECS BUILD RPMS SRPMS BUILDROOT) - @for file in `awk '/^Source...:/ {print $$2}' redhat/freeradius.spec` ; do cp redhat/$$file rpmbuild/SOURCES/$$file ; done - @cp $< $@ + ${Q}mkdir -p $(addprefix rpmbuild/,SOURCES SPECS BUILD RPMS SRPMS BUILDROOT) + ${Q}for file in `awk '/^Source...:/ {print $$2}' redhat/freeradius.spec` ; do cp redhat/$$file rpmbuild/SOURCES/$$file ; done + ${Q}cp $< $@ rpm: rpmbuild/SOURCES/freeradius-server-$(RADIUSD_VERSION_STRING).tar.bz2 - @if ! yum-builddep -q -C --assumeno redhat/freeradius.spec 1> /dev/null 2>&1; then \ + ${Q}if ! yum-builddep -q -C --assumeno redhat/freeradius.spec 1> /dev/null 2>&1; then \ echo "ERROR: Required depdendencies not found, install them with: yum-builddep redhat/freeradius.spec"; \ exit 1; \ fi - @QA_RPATHS=0x0003 rpmbuild --define "_topdir `pwd`/rpmbuild" -bb redhat/freeradius.spec + ${Q}QA_RPATHS=0x0003 rpmbuild --define "_topdir `pwd`/rpmbuild" -bb redhat/freeradius.spec # # Developer checks # .PHONY: warnings warnings: - @(make clean all 2>&1) | egrep -v '^/|deprecated|^In file included|: In function| from |^HEADER|^CC|^LN|^LINK' > warnings.txt - @wc -l warnings.txt + ${Q}(make clean all 2>&1) | egrep -v '^/|deprecated|^In file included|: In function| from |^HEADER|^CC|^LN|^LINK' > warnings.txt + ${Q}@wc -l warnings.txt # # Ensure we're using tabs in the configuration files, @@ -397,5 +397,5 @@ warnings: # .PHONY: whitespace whitespace: - @for x in $$(git ls-files raddb/ src/); do unexpand $$x > $$x.bak; cp $$x.bak $$x; rm -f $$x.bak;done - @perl -p -i -e 'trim' $$(git ls-files src/) + ${Q}for x in $$(git ls-files raddb/ src/); do unexpand $$x > $$x.bak; cp $$x.bak $$x; rm -f $$x.bak;done + ${Q}perl -p -i -e 'trim' $$(git ls-files src/) @@ -1 +1 @@ -3.2.2 +3.2.3 @@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for freeradius $Id$. +# Generated by GNU Autoconf 2.71 for freeradius $Id$. # # Report bugs to <http://bugs.freeradius.org>. # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (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 +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi +if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; 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 || @@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -96,8 +92,12 @@ case $0 in #(( 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -154,20 +134,22 @@ 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 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +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 - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (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 +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -187,42 +169,53 @@ 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 : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || 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 test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop 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_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + 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 : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 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 : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -230,14 +223,21 @@ fi esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + 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 @@ -255,18 +255,19 @@ 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 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: http://bugs.freeradius.org about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script @@ -294,6 +295,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -311,6 +313,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -325,7 +335,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -334,7 +344,7 @@ $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" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -373,12 +383,13 @@ as_fn_executable_p () # 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 : +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 +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -390,18 +401,27 @@ fi # as_fn_append # 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 : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -413,9 +433,9 @@ 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -442,7 +462,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -486,7 +506,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$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 @@ -500,6 +520,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -513,6 +537,13 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -588,40 +619,36 @@ PACKAGE_URL='http://www.freeradius.org' ac_unique_file="src/main/radiusd.c" # Factoring default headers for most tests. ac_includes_default="\ -#include <stdio.h> -#ifdef HAVE_SYS_TYPES_H -# include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -# include <sys/stat.h> +#include <stddef.h> +#ifdef HAVE_STDIO_H +# include <stdio.h> #endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # include <stdlib.h> -# include <stddef.h> -#else -# ifdef HAVE_STDLIB_H -# include <stdlib.h> -# endif #endif #ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include <memory.h> -# endif # include <string.h> #endif -#ifdef HAVE_STRINGS_H -# include <strings.h> -#endif #ifdef HAVE_INTTYPES_H # include <inttypes.h> #endif #ifdef HAVE_STDINT_H # include <stdint.h> #endif +#ifdef HAVE_STRINGS_H +# include <strings.h> +#endif +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif #ifdef HAVE_UNISTD_H # include <unistd.h> #endif" +ac_header_c_list= enable_option_checking=no ac_subst_vars='LTLIBOBJS LIBOBJS @@ -753,6 +780,7 @@ with_radacctdir with_raddbdir with_dictdir with_ascend_binary +with_radiusv11 with_threads with_tcp with_vmps @@ -872,8 +900,6 @@ do *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -914,9 +940,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -940,9 +966,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1153,9 +1179,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1169,9 +1195,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1215,9 +1241,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1233,7 +1259,7 @@ 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 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1297,7 +1323,7 @@ $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" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1459,6 +1485,7 @@ Optional Packages: --with-raddbdir=DIR directory for config files SYSCONFDIR/raddb --with-dictdir=DIR directory for dictionary files DATAROOTDIR/freeradius --with-ascend-binary include support for Ascend binary filter attributes (default=yes) + --with-radiusv11 compile in RADIUSv11 support. (default=no) --with-threads use threads, if available. (default=yes) --with-tcp compile in TCP support. (default=yes) --with-vmps compile in VMPS support. (default=yes) @@ -1548,9 +1575,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$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/ ;; @@ -1578,7 +1605,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1586,7 +1614,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1596,9 +1624,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF freeradius configure $Id$ -generated by GNU Autoconf 2.69 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1615,14 +1643,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam 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 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1630,14 +1658,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$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 : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1653,14 +1682,14 @@ fi ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam 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 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1668,14 +1697,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1685,6 +1715,39 @@ fi } # ac_fn_cxx_try_compile +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -1697,7 +1760,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1705,14 +1768,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$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 : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1722,101 +1786,10 @@ fi } # ac_fn_c_try_cpp -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ----------------------------------------- ## -## Report this to http://bugs.freeradius.org ## -## ----------------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - # ac_fn_c_try_run LINENO # ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. +# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that +# executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack @@ -1826,25 +1799,26 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$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 : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status @@ -1855,51 +1829,20 @@ fi } # ac_fn_c_try_run -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - # ac_fn_c_try_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 + rm -f conftest.$ac_objext conftest.beam 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 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1907,17 +1850,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$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 : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1938,11 +1882,12 @@ fi ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case <limits.h> declares $2. @@ -1950,16 +1895,9 @@ else #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif + which can conflict with char $2 (); below. */ +#include <limits.h> #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -1977,24 +1915,25 @@ choke me #endif int -main () +main (void) { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2006,17 +1945,18 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof ($2)) return 0; @@ -2024,12 +1964,13 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof (($2))) return 0; @@ -2037,41 +1978,45 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- +# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR +# ------------------------------------------------------------------ # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () +# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. +ac_fn_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { #ifndef $as_decl_name #ifdef __cplusplus @@ -2085,27 +2030,50 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS + fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_c_check_decl +} # ac_fn_check_decl +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + 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 freeradius $as_me $Id$, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -2138,8 +2106,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -2174,7 +2146,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2209,11 +2181,13 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2224,8 +2198,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2249,7 +2223,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2257,14 +2231,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2272,15 +2246,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2288,8 +2262,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2303,63 +2277,48 @@ 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 +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$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 @@ -2369,19 +2328,653 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif + +#include <stddef.h> +#include <stdarg.h> +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not \xHH hex character constants. + These do not provoke an error unfortunately, instead are silently treated + as an "x". The following induces an error, until -std is added to get + proper ANSI mode. Curiously \x00 != x always comes out true, for an + array size at least. It is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) '\''x'\'' +int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' + +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' + +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif + +#include <stdbool.h> +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +# Test code for whether the C++ compiler supports C++98 (global declarations) +ac_cxx_conftest_cxx98_globals=' +// Does the compiler advertise C++98 conformance? +#if !defined __cplusplus || __cplusplus < 199711L +# error "Compiler does not advertise C++98 conformance" +#endif + +// These inclusions are to reject old compilers that +// lack the unsuffixed header files. +#include <cstdlib> +#include <exception> + +// <cassert> and <cstring> are *not* freestanding headers in C++98. +extern void assert (int); +namespace std { + extern int strcmp (const char *, const char *); +} + +// Namespaces, exceptions, and templates were all added after "C++ 2.0". +using std::exception; +using std::strcmp; + +namespace { + +void test_exception_syntax() +{ + try { + throw "test"; + } catch (const char *s) { + // Extra parentheses suppress a warning when building autoconf itself, + // due to lint rules shared with more typical C programs. + assert (!(strcmp) (s, "test")); + } +} + +template <typename T> struct test_template +{ + T const val; + explicit test_template(T t) : val(t) {} + template <typename U> T add(U u) { return static_cast<T>(u) + val; } +}; + +} // anonymous namespace +' + +# Test code for whether the C++ compiler supports C++98 (body of main) +ac_cxx_conftest_cxx98_main=' + assert (argc); + assert (! argv[0]); +{ + test_exception_syntax (); + test_template<double> tt (2.0); + assert (tt.add (4) == 6.0); + assert (true && !false); +} +' + +# Test code for whether the C++ compiler supports C++11 (global declarations) +ac_cxx_conftest_cxx11_globals=' +// Does the compiler advertise C++ 2011 conformance? +#if !defined __cplusplus || __cplusplus < 201103L +# error "Compiler does not advertise C++11 conformance" +#endif + +namespace cxx11test +{ + constexpr int get_val() { return 20; } + + struct testinit + { + int i; + double d; + }; + + class delegate + { + public: + delegate(int n) : n(n) {} + delegate(): delegate(2354) {} + + virtual int getval() { return this->n; }; + protected: + int n; + }; + + class overridden : public delegate + { + public: + overridden(int n): delegate(n) {} + virtual int getval() override final { return this->n * 2; } + }; + + class nocopy + { + public: + nocopy(int i): i(i) {} + nocopy() = default; + nocopy(const nocopy&) = delete; + nocopy & operator=(const nocopy&) = delete; + private: + int i; + }; + + // for testing lambda expressions + template <typename Ret, typename Fn> Ret eval(Fn f, Ret v) + { + return f(v); + } + + // for testing variadic templates and trailing return types + template <typename V> auto sum(V first) -> V + { + return first; + } + template <typename V, typename... Args> auto sum(V first, Args... rest) -> V + { + return first + sum(rest...); + } +} +' + +# Test code for whether the C++ compiler supports C++11 (body of main) +ac_cxx_conftest_cxx11_main=' +{ + // Test auto and decltype + auto a1 = 6538; + auto a2 = 48573953.4; + auto a3 = "String literal"; + + int total = 0; + for (auto i = a3; *i; ++i) { total += *i; } + + decltype(a2) a4 = 34895.034; +} +{ + // Test constexpr + short sa[cxx11test::get_val()] = { 0 }; +} +{ + // Test initializer lists + cxx11test::testinit il = { 4323, 435234.23544 }; +} +{ + // Test range-based for + int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, + 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; + for (auto &x : array) { x += 23; } +} +{ + // Test lambda expressions + using cxx11test::eval; + assert (eval ([](int x) { return x*2; }, 21) == 42); + double d = 2.0; + assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0); + assert (d == 5.0); + assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0); + assert (d == 5.0); +} +{ + // Test use of variadic templates + using cxx11test::sum; + auto a = sum(1); + auto b = sum(1, 2); + auto c = sum(1.0, 2.0, 3.0); +} +{ + // Test constructor delegation + cxx11test::delegate d1; + cxx11test::delegate d2(); + cxx11test::delegate d3(45); +} +{ + // Test override and final + cxx11test::overridden o1(55464); +} +{ + // Test nullptr + char *c = nullptr; +} +{ + // Test template brackets + test_template<::test_template<int>> v(test_template<int>(12)); +} +{ + // Unicode literals + char const *utf8 = u8"UTF-8 string \u2500"; + char16_t const *utf16 = u"UTF-8 string \u2500"; + char32_t const *utf32 = U"UTF-32 string \u2500"; +} +' + +# Test code for whether the C compiler supports C++11 (complete). +ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals} +${ac_cxx_conftest_cxx11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_cxx_conftest_cxx98_main} + ${ac_cxx_conftest_cxx11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C++98 (complete). +ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals} +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_cxx_conftest_cxx98_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" +as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" +as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" +as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" + +# Auxiliary files required by this configure script. +ac_aux_files="missing config.guess config.sub" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2392,12 +2985,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -2406,24 +2999,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$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;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -2433,11 +3026,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} 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 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2466,14 +3060,10 @@ RADIUSD_VERSION_STRING=`cat VERSION` -cat >>confdefs.h <<_ACEOF -#define RADIUSD_VERSION ${RADIUSD_VERSION} -_ACEOF +printf "%s\n" "#define RADIUSD_VERSION ${RADIUSD_VERSION}" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define RADIUSD_VERSION_STRING "${RADIUSD_VERSION_STRING}" -_ACEOF +printf "%s\n" "#define RADIUSD_VERSION_STRING \"${RADIUSD_VERSION_STRING}\"" >>confdefs.h @@ -2482,11 +3072,12 @@ unset LSAN_OPTIONS # Extract the first word of "asciidoctor", so it can be a program name with args. set dummy asciidoctor; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ASCIIDOCTOR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ASCIIDOCTOR+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ASCIIDOCTOR in [\\/]* | ?:[\\/]*) ac_cv_path_ASCIIDOCTOR="$ASCIIDOCTOR" # Let the user override the test with a path. @@ -2496,11 +3087,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ASCIIDOCTOR="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ASCIIDOCTOR="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2512,26 +3107,27 @@ esac fi ASCIIDOCTOR=$ac_cv_path_ASCIIDOCTOR if test -n "$ASCIIDOCTOR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASCIIDOCTOR" >&5 -$as_echo "$ASCIIDOCTOR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ASCIIDOCTOR" >&5 +printf "%s\n" "$ASCIIDOCTOR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_cv_path_ASCIIDOCTOR" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: asciidoctor not found - Please install if you want build the docs" >&5 -$as_echo "$as_me: WARNING: asciidoctor not found - Please install if you want build the docs" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: asciidoctor not found - Please install if you want build the docs" >&5 +printf "%s\n" "$as_me: WARNING: asciidoctor not found - Please install if you want build the docs" >&2;} fi # Extract the first word of "pandoc", so it can be a program name with args. set dummy pandoc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PANDOC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PANDOC+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $PANDOC in [\\/]* | ?:[\\/]*) ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path. @@ -2541,11 +3137,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PANDOC="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2557,17 +3157,17 @@ esac fi PANDOC=$ac_cv_path_PANDOC if test -n "$PANDOC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5 -$as_echo "$PANDOC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5 +printf "%s\n" "$PANDOC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_cv_path_PANDOC" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pandoc not found - Please install if you want build the docs" >&5 -$as_echo "$as_me: WARNING: pandoc not found - Please install if you want build the docs" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: pandoc not found - Please install if you want build the docs" >&5 +printf "%s\n" "$as_me: WARNING: pandoc not found - Please install if you want build the docs" >&2;} else # # Pandoc v2 onwards renamed --latex-engine to --pdf-engine @@ -2592,11 +3192,12 @@ if test "x$ac_cv_path_PANDOC" != "x" && test "x$ac_cv_path_ASCIIDOCTOR" != "x"; if test -z "$PERL"; then # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PERL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_PERL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$PERL"; then ac_cv_prog_PERL="$PERL" # Let the user override the test. else @@ -2604,11 +3205,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_PERL="perl" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2619,11 +3224,11 @@ fi fi PERL=$ac_cv_prog_PERL if test -n "$PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 -$as_echo "$PERL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +printf "%s\n" "$PERL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2632,18 +3237,18 @@ fi if test "x$PERL" != x; then ax_perl_modules_failed=0 for ax_perl_module in 'JSON' ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5 -$as_echo_n "checking for perl module $ax_perl_module... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5 +printf %s "checking for perl module $ax_perl_module... " >&6; } # Would be nice to log result here, but can't rely on autoconf internals $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1 if test $? -ne 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; ax_perl_modules_failed=1 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; }; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +printf "%s\n" "ok" >&6; }; fi done @@ -2653,22 +3258,23 @@ $as_echo "ok" >&6; }; else : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Perl JSON module not found - Please install if you want build the docs" >&5 -$as_echo "$as_me: WARNING: Perl JSON module not found - Please install if you want build the docs" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Perl JSON module not found - Please install if you want build the docs" >&5 +printf "%s\n" "$as_me: WARNING: Perl JSON module not found - Please install if you want build the docs" >&2;} fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5 -$as_echo "$as_me: WARNING: could not find perl" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5 +printf "%s\n" "$as_me: WARNING: could not find perl" >&2;} fi fi # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_DOXYGEN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_DOXYGEN+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. @@ -2678,11 +3284,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_DOXYGEN="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2694,22 +3304,23 @@ esac fi DOXYGEN=$ac_cv_path_DOXYGEN if test -n "$DOXYGEN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 -$as_echo "$DOXYGEN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 +printf "%s\n" "$DOXYGEN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_cv_path_DOXYGEN" != "x"; then # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GRAPHVIZ_DOT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GRAPHVIZ_DOT+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $GRAPHVIZ_DOT in [\\/]* | ?:[\\/]*) ac_cv_path_GRAPHVIZ_DOT="$GRAPHVIZ_DOT" # Let the user override the test with a path. @@ -2719,11 +3330,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GRAPHVIZ_DOT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GRAPHVIZ_DOT="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2735,30 +3350,31 @@ esac fi GRAPHVIZ_DOT=$ac_cv_path_GRAPHVIZ_DOT if test -n "$GRAPHVIZ_DOT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GRAPHVIZ_DOT" >&5 -$as_echo "$GRAPHVIZ_DOT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GRAPHVIZ_DOT" >&5 +printf "%s\n" "$GRAPHVIZ_DOT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_cv_path_GRAPHVIZ_DOT" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dot not found - Please install the graphviz if you want to build the docs/source" >&5 -$as_echo "$as_me: WARNING: dot not found - Please install the graphviz if you want to build the docs/source" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: dot not found - Please install the graphviz if you want to build the docs/source" >&5 +printf "%s\n" "$as_me: WARNING: dot not found - Please install the graphviz if you want to build the docs/source" >&2;} fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - Please install if you want build the docs/source" >&5 -$as_echo "$as_me: WARNING: doxygen not found - Please install if you want build the docs/source" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - Please install if you want build the docs/source" >&5 +printf "%s\n" "$as_me: WARNING: doxygen not found - Please install if you want build the docs/source" >&2;} fi # Extract the first word of "antora", so it can be a program name with args. set dummy antora; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ANTORA+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ANTORA+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ANTORA in [\\/]* | ?:[\\/]*) ac_cv_path_ANTORA="$ANTORA" # Let the user override the test with a path. @@ -2768,11 +3384,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ANTORA="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ANTORA="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2784,21 +3404,22 @@ esac fi ANTORA=$ac_cv_path_ANTORA if test -n "$ANTORA"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANTORA" >&5 -$as_echo "$ANTORA" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ANTORA" >&5 +printf "%s\n" "$ANTORA" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_cv_path_ANTORA" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: antora not found - Please install if you want build the site" >&5 -$as_echo "$as_me: WARNING: antora not found - Please install if you want build the site" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: antora not found - Please install if you want build the site" >&5 +printf "%s\n" "$as_me: WARNING: antora not found - Please install if you want build the site" >&2;} fi # Check whether --enable-developer was given. -if test "${enable_developer+set}" = set; then : +if test ${enable_developer+y} +then : enableval=$enable_developer; case "$enableval" in no) developer=no @@ -2812,8 +3433,8 @@ fi if test -d $srcdir/.git; then if test "x$developer" != "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: found .git directory, enabling developer build implicitly, disable with --disable-developer" >&5 -$as_echo "$as_me: found .git directory, enabling developer build implicitly, disable with --disable-developer" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: found .git directory, enabling developer build implicitly, disable with --disable-developer" >&5 +printf "%s\n" "$as_me: found .git directory, enabling developer build implicitly, disable with --disable-developer" >&6;} developer="yes" fi fi @@ -2823,7 +3444,8 @@ if test "x$developer" = "xyes"; then fi # Check whether --enable-verify-ptr was given. -if test "${enable_verify_ptr+set}" = set; then : +if test ${enable_verify_ptr+y} +then : enableval=$enable_verify_ptr; case "$enableval" in no) verify_ptr="" @@ -2831,13 +3453,14 @@ if test "${enable_verify_ptr+set}" = set; then : *) verify_ptr="-DWITH_VERIFY_PTR=1" esac -else +else $as_nop verify_ptr="-DWITH_VERIFY_PTR=1" fi # Check whether --enable-fips-workaround was given. -if test "${enable_fips_workaround+set}" = set; then : +if test ${enable_fips_workaround+y} +then : enableval=$enable_fips_workaround; case "$enableval" in no) fips="" @@ -2845,61 +3468,36 @@ if test "${enable_fips_workaround+set}" = set; then : *) fips="-DWITH_FIPS=1" esac -else +else $as_nop fips="" fi -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -2918,21 +3516,22 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -2951,21 +3550,22 @@ IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 -$as_echo_n "checking target system type... " >&6; } -if ${ac_cv_target+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +printf %s "checking target system type... " >&6; } +if test ${ac_cv_target+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 + ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +printf "%s\n" "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; @@ -3000,6 +3600,15 @@ case "$host" in esac + + + + + + + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3008,11 +3617,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3020,11 +3630,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3035,11 +3649,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3048,11 +3662,12 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3060,11 +3675,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3075,11 +3694,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3087,8 +3706,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3101,11 +3720,12 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3113,11 +3733,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3128,11 +3752,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3141,11 +3765,12 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3154,15 +3779,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac 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 + 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" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3178,18 +3807,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3200,11 +3829,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3212,11 +3842,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3227,11 +3861,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3244,11 +3878,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3256,11 +3891,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3271,11 +3910,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3287,34 +3926,138 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + 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="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi +else + CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$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 +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -3324,7 +4067,7 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -3332,7 +4075,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3344,9 +4087,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$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.*" @@ -3367,11 +4110,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$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, @@ -3388,7 +4132,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3404,44 +4148,46 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else +else $as_nop ac_file='' fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$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; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$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 @@ -3455,15 +4201,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -3472,7 +4218,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdio.h> int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -3484,8 +4230,8 @@ _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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -3493,10 +4239,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -3504,39 +4250,40 @@ $as_echo "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$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. + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "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; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$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 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3550,11 +4297,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$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 @@ -3563,31 +4311,32 @@ $as_echo "$ac_try_echo"; } >&5 break;; esac done -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -3597,29 +4346,33 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -3628,57 +4381,60 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -3693,94 +4449,144 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -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); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -3789,6 +4595,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3799,15 +4611,16 @@ if test -z "$CXX"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else @@ -3815,11 +4628,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3830,11 +4647,11 @@ fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +printf "%s\n" "$CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3843,15 +4660,16 @@ fi fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CXX+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else @@ -3859,11 +4677,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3874,11 +4696,11 @@ fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +printf "%s\n" "$ac_ct_CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3890,8 +4712,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX @@ -3901,7 +4723,7 @@ fi fi fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +printf "%s\n" "$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 @@ -3911,7 +4733,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -3921,20 +4743,21 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5 +printf %s "checking whether the compiler supports GNU C++... " >&6; } +if test ${ac_cv_cxx_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -3944,29 +4767,33 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi -ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_test_CXXFLAGS=${CXXFLAGS+y} ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +printf %s "checking whether $CXX accepts -g... " >&6; } +if test ${ac_cv_prog_cxx_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no @@ -3975,57 +4802,60 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : ac_cv_prog_cxx_g=yes -else +else $as_nop CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : -else +else $as_nop ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO" +then : ac_cv_prog_cxx_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } +if test $ac_test_CXXFLAGS; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then @@ -4040,6 +4870,100 @@ else CXXFLAGS= fi fi +ac_prog_cxx_stdcxx=no +if test x$ac_prog_cxx_stdcxx = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 +printf %s "checking for $CXX option to enable C++11 features... " >&6; } +if test ${ac_cv_prog_cxx_11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cxx_11=no +ac_save_CXX=$CXX +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_cxx_conftest_cxx11_program +_ACEOF +for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA +do + CXX="$ac_save_CXX $ac_arg" + if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_cxx11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cxx_cxx11" != "xno" && break +done +rm -f conftest.$ac_ext +CXX=$ac_save_CXX +fi + +if test "x$ac_cv_prog_cxx_cxx11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cxx_cxx11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 +printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } + CXX="$CXX $ac_cv_prog_cxx_cxx11" +fi + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 + ac_prog_cxx_stdcxx=cxx11 +fi +fi +if test x$ac_prog_cxx_stdcxx = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 +printf %s "checking for $CXX option to enable C++98 features... " >&6; } +if test ${ac_cv_prog_cxx_98+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cxx_98=no +ac_save_CXX=$CXX +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_cxx_conftest_cxx98_program +_ACEOF +for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA +do + CXX="$ac_save_CXX $ac_arg" + if ac_fn_cxx_try_compile "$LINENO" +then : + ac_cv_prog_cxx_cxx98=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cxx_cxx98" != "xno" && break +done +rm -f conftest.$ac_ext +CXX=$ac_save_CXX +fi + +if test "x$ac_cv_prog_cxx_cxx98" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cxx_cxx98" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 +printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } + CXX="$CXX $ac_cv_prog_cxx_cxx98" +fi + ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 + ac_prog_cxx_stdcxx=cxx98 +fi +fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4048,45 +4972,212 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_header= ac_cache= +for ac_item in $ac_header_c_list +do + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi +done + + + + + + + + +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : + +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h + +fi + + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test ${ac_cv_safe_to_define___extensions__+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_safe_to_define___extensions__=yes +else $as_nop + ac_cv_safe_to_define___extensions__=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 +printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } +if test ${ac_cv_should_define__xopen_source+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_should_define__xopen_source=no + if test $ac_cv_header_wchar_h = yes +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include <wchar.h> + mbstate_t x; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define _XOPEN_SOURCE 500 + #include <wchar.h> + mbstate_t x; +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_should_define__xopen_source=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 +printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } + + printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h + + printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h + + printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h + + printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h + + if test $ac_cv_header_minix_config_h = yes +then : + MINIX=yes + printf "%s\n" "#define _MINIX 1" >>confdefs.h + + printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h + + printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h + +else $as_nop + MINIX= +fi + if test $ac_cv_safe_to_define___extensions__ = yes +then : + printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h + +fi + if test $ac_cv_should_define__xopen_source = yes +then : + printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h + +fi + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif +#include <limits.h> Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : -else +else $as_nop # Broken: fails on valid input. continue fi @@ -4098,10 +5189,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else +else $as_nop # Passes both tests. ac_preproc_ok=: break @@ -4111,7 +5203,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok +then : break fi @@ -4123,29 +5216,24 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif +#include <limits.h> Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : -else +else $as_nop # Broken: fails on valid input. continue fi @@ -4157,10 +5245,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else +else $as_nop # Passes both tests. ac_preproc_ok=: break @@ -4170,11 +5259,12 @@ rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +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;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$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 @@ -4186,11 +5276,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -4198,10 +5289,15 @@ else for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP @@ -4210,13 +5306,13 @@ case `"$ac_path_GREP" --version 2>&1` in ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -4244,16 +5340,17 @@ else fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else @@ -4264,10 +5361,15 @@ else for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP @@ -4276,13 +5378,13 @@ case `"$ac_path_EGREP" --version 2>&1` in ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -4311,208 +5413,18 @@ fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ctype.h> -#include <stdlib.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = xyes; then : - MINIX=yes -else - MINIX= -fi - - - if test "$MINIX" = yes; then - -$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h - - -$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h - - -$as_echo "#define _MINIX 1" >>confdefs.h - - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 -$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if ${ac_cv_safe_to_define___extensions__+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# define __EXTENSIONS__ 1 - $ac_includes_default -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_safe_to_define___extensions__=yes -else - ac_cv_safe_to_define___extensions__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 -$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } - test $ac_cv_safe_to_define___extensions__ = yes && - $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h - - $as_echo "#define _ALL_SOURCE 1" >>confdefs.h - - $as_echo "#define _GNU_SOURCE 1" >>confdefs.h - - $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - - $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h - - - if test $ac_cv_c_compiler_gnu = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 -$as_echo_n "checking whether $CC needs -traditional... " >&6; } -if ${ac_cv_prog_gcc_traditional+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 +printf %s "checking whether $CC needs -traditional... " >&6; } +if test ${ac_cv_prog_gcc_traditional+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4520,12 +5432,13 @@ else Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then : + $EGREP "$ac_pattern" >/dev/null 2>&1 +then : ac_cv_prog_gcc_traditional=yes -else +else $as_nop ac_cv_prog_gcc_traditional=no fi -rm -f conftest* +rm -rf conftest* if test $ac_cv_prog_gcc_traditional = no; then @@ -4535,25 +5448,27 @@ rm -f conftest* Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then : + $EGREP "$ac_pattern" >/dev/null 2>&1 +then : ac_cv_prog_gcc_traditional=yes fi -rm -f conftest* +rm -rf conftest* fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 -$as_echo "$ac_cv_prog_gcc_traditional" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 +printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using SUNPro C" >&5 -$as_echo_n "checking whether we are using SUNPro C... " >&6; } -if ${ac_cv_prog_suncc+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using SUNPro C" >&5 +printf %s "checking whether we are using SUNPro C... " >&6; } +if test ${ac_cv_prog_suncc+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.c <<EOF #ifdef __SUNPRO_C yes; @@ -4563,23 +5478,24 @@ if { ac_try='${CC-cc} -E conftest.c' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_suncc=yes else ac_cv_prog_suncc=no fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_suncc" >&5 -$as_echo "$ac_cv_prog_suncc" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_suncc" >&5 +printf "%s\n" "$ac_cv_prog_suncc" >&6; } if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -4587,11 +5503,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4602,11 +5522,11 @@ fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +printf "%s\n" "$RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4615,11 +5535,12 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -4627,11 +5548,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4642,11 +5567,11 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +printf "%s\n" "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -4654,8 +5579,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -4666,18 +5591,19 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is clang" >&5 -$as_echo_n "checking if compiler is clang... " >&6; } -if ${ax_cv_cc_clang+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler is clang" >&5 +printf %s "checking if compiler is clang... " >&6; } +if test ${ax_cv_cc_clang+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __clang__ @@ -4688,16 +5614,17 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ax_cv_cc_clang=yes -else +else $as_nop ax_cv_cc_clang=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_clang" >&5 -$as_echo "$ax_cv_cc_clang" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_clang" >&5 +printf "%s\n" "$ax_cv_cc_clang" >&6; } if test "x$ax_cv_cc_clang" = "xyes"; then clang_path="$CC" @@ -4713,11 +5640,12 @@ if test "x$GCC" = "xyes"; then fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Wno-unknown-warning-option\"" >&5 -$as_echo_n "checking for the compiler flag \"-Wno-unknown-warning-option\"... " >&6; } -if ${ax_cv_cc_no_unknown_warning_option_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Wno-unknown-warning-option\"" >&5 +printf %s "checking for the compiler flag \"-Wno-unknown-warning-option\"... " >&6; } +if test ${ax_cv_cc_no_unknown_warning_option_flag+y} +then : + printf %s "(cached) " >&6 +else $as_nop CFLAGS_SAVED=$CFLAGS @@ -4727,7 +5655,7 @@ else /* end confdefs.h. */ int -main () +main (void) { /* @@ -4744,29 +5672,31 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ax_cv_cc_no_unknown_warning_option_flag=yes -else +else $as_nop ax_cv_cc_no_unknown_warning_option_flag=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$CFLAGS_SAVED" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_no_unknown_warning_option_flag" >&5 -$as_echo "$ax_cv_cc_no_unknown_warning_option_flag" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_no_unknown_warning_option_flag" >&5 +printf "%s\n" "$ax_cv_cc_no_unknown_warning_option_flag" >&6; } if test "x$ax_cv_cc_no_unknown_warning_option_flag" = "xyes"; then CFLAGS="$CFLAGS -Wno-unknown-warning-option" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Qunused-arguments\"" >&5 -$as_echo_n "checking for the compiler flag \"-Qunused-arguments\"... " >&6; } -if ${ax_cv_cc_qunused_arguments_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Qunused-arguments\"" >&5 +printf %s "checking for the compiler flag \"-Qunused-arguments\"... " >&6; } +if test ${ax_cv_cc_qunused_arguments_flag+y} +then : + printf %s "(cached) " >&6 +else $as_nop CFLAGS_SAVED=$CFLAGS @@ -4782,19 +5712,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int -main () +main (void) { return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ax_cv_cc_qunused_arguments_flag="yes" -else +else $as_nop ax_cv_cc_qunused_arguments_flag="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4805,8 +5736,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$CFLAGS_SAVED" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_qunused_arguments_flag" >&5 -$as_echo "$ax_cv_cc_qunused_arguments_flag" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_qunused_arguments_flag" >&5 +printf "%s\n" "$ax_cv_cc_qunused_arguments_flag" >&6; } if test "x$ax_cv_cc_qunused_arguments_flag" = "xyes"; then CFLAGS="$CFLAGS -Qunused-arguments" @@ -4814,11 +5745,12 @@ if test "x$ax_cv_cc_qunused_arguments_flag" = "xyes"; then fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Wno-date-time\"" >&5 -$as_echo_n "checking for the compiler flag \"-Wno-date-time\"... " >&6; } -if ${ax_cv_cc_no_date_time_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Wno-date-time\"" >&5 +printf %s "checking for the compiler flag \"-Wno-date-time\"... " >&6; } +if test ${ax_cv_cc_no_date_time_flag+y} +then : + printf %s "(cached) " >&6 +else $as_nop CFLAGS_SAVED=$CFLAGS @@ -4834,19 +5766,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int -main () +main (void) { return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ax_cv_cc_no_date_time_flag="yes" -else +else $as_nop ax_cv_cc_no_date_time_flag="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4857,22 +5790,24 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$CFLAGS_SAVED" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_no_date_time_flag" >&5 -$as_echo "$ax_cv_cc_no_date_time_flag" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_no_date_time_flag" >&5 +printf "%s\n" "$ax_cv_cc_no_date_time_flag" >&6; } # Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : +if test ${enable_largefile+y} +then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if ${ac_cv_sys_largefile_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +printf %s "checking for special C compiler options needed for large files... " >&6; } +if test ${ac_cv_sys_largefile_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC @@ -4886,44 +5821,47 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int -main () +main (void) { ; return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : break fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_sys_largefile_CC=' -n32'; break fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if ${ac_cv_sys_file_offset_bits+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if test ${ac_cv_sys_file_offset_bits+y} +then : + printf %s "(cached) " >&6 +else $as_nop while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4932,22 +5870,23 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_sys_file_offset_bits=no; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 @@ -4956,43 +5895,43 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_sys_file_offset_bits=64; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF +printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if ${ac_cv_sys_large_files+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +printf %s "checking for _LARGE_FILES value needed for large files... " >&6; } +if test ${ac_cv_sys_large_files+y} +then : + printf %s "(cached) " >&6 +else $as_nop while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5001,22 +5940,23 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_sys_large_files=no; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 @@ -5025,48 +5965,46 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_sys_large_files=1; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +printf "%s\n" "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF +printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h ;; esac rm -rf conftest* fi - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +printf %s "checking whether byte ordering is bigendian... " >&6; } +if test ${ac_cv_c_bigendian+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5077,7 +6015,8 @@ else typedef int dummy; _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. @@ -5101,7 +6040,7 @@ if ac_fn_c_try_compile "$LINENO"; then : fi done fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5110,7 +6049,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext #include <sys/param.h> int -main () +main (void) { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ @@ -5122,7 +6061,8 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5130,7 +6070,7 @@ if ac_fn_c_try_compile "$LINENO"; then : #include <sys/param.h> int -main () +main (void) { #if BYTE_ORDER != BIG_ENDIAN not big endian @@ -5140,14 +6080,15 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_bigendian=yes -else +else $as_nop ac_cv_c_bigendian=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). @@ -5156,7 +6097,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext #include <limits.h> int -main () +main (void) { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros @@ -5166,14 +6107,15 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <limits.h> int -main () +main (void) { #ifndef _BIG_ENDIAN not big endian @@ -5183,31 +6125,33 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_bigendian=yes -else +else $as_nop ac_cv_c_bigendian=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes +then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -short int ascii_mm[] = +unsigned short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = + unsigned short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } - short int ebcdic_ii[] = + unsigned short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = + unsigned short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; @@ -5215,14 +6159,15 @@ short int ascii_mm[] = extern int foo; int -main () +main (void) { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi @@ -5235,13 +6180,13 @@ if ac_fn_c_try_compile "$LINENO"; then : fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { /* Are we little or big endian? From Harbison&Steele. */ @@ -5257,9 +6202,10 @@ main () return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_c_bigendian=no -else +else $as_nop ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5268,21 +6214,21 @@ fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +printf "%s\n" "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) -$as_echo "#define FR_BIG_ENDIAN 1" >>confdefs.h +printf "%s\n" "#define FR_BIG_ENDIAN 1" >>confdefs.h ;; #( no) -$as_echo "#define FR_LITTLE_ENDIAN 1" >>confdefs.h +printf "%s\n" "#define FR_LITTLE_ENDIAN 1" >>confdefs.h ;; #( universal) -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h +printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) @@ -5293,11 +6239,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h # Extract the first word of "gmake", so it can be a program name with args. set dummy gmake; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GMAKE+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_GMAKE+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$GMAKE"; then ac_cv_prog_GMAKE="$GMAKE" # Let the user override the test. else @@ -5305,11 +6252,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_GMAKE="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5321,22 +6272,23 @@ fi fi GMAKE=$ac_cv_prog_GMAKE if test -n "$GMAKE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE" >&5 -$as_echo "$GMAKE" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMAKE" >&5 +printf "%s\n" "$GMAKE" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test $GMAKE = no; then # Extract the first word of "make", so it can be a program name with args. set dummy make; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_MAKE+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_MAKE+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MAKE in [\\/]* | ?:[\\/]*) ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path. @@ -5346,11 +6298,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_MAKE="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5363,22 +6319,23 @@ esac fi MAKE=$ac_cv_path_MAKE if test -n "$MAKE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 -$as_echo "$MAKE" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 +printf "%s\n" "$MAKE" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi else # Extract the first word of "gmake", so it can be a program name with args. set dummy gmake; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_MAKE+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_MAKE+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MAKE in [\\/]* | ?:[\\/]*) ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path. @@ -5388,11 +6345,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_MAKE="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5405,11 +6366,11 @@ esac fi MAKE=$ac_cv_path_MAKE if test -n "$MAKE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 -$as_echo "$MAKE" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 +printf "%s\n" "$MAKE" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5420,11 +6381,12 @@ if test -z "$makever"; then fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of system cores" >&5 -$as_echo_n "checking number of system cores... " >&6; } -if ${ax_cv_system_cores+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of system cores" >&5 +printf %s "checking number of system cores... " >&6; } +if test ${ax_cv_system_cores+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -5432,10 +6394,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes +then : ax_cv_system_cores= -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5484,9 +6447,10 @@ else } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ax_cv_system_cores=$? -else +else $as_nop ax_cv_system_cores=$? fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5501,19 +6465,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_system_cores" >&5 -$as_echo "$ax_cv_system_cores" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_system_cores" >&5 +printf "%s\n" "$ax_cv_system_cores" >&6; } # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_GIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$GIT"; then ac_cv_prog_GIT="$GIT" # Let the user override the test. else @@ -5521,11 +6486,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_GIT="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5537,24 +6506,26 @@ fi fi GIT=$ac_cv_prog_GIT if test -n "$GIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 -$as_echo "$GIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 +printf "%s\n" "$GIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # Check whether --enable-strict-dependencies was given. -if test "${enable_strict_dependencies+set}" = set; then : +if test ${enable_strict_dependencies+y} +then : enableval=$enable_strict_dependencies; fi # Check whether --enable-werror was given. -if test "${enable_werror+set}" = set; then : +if test ${enable_werror+y} +then : enableval=$enable_werror; case "$enableval" in no) werror=no @@ -5567,11 +6538,12 @@ fi docdir='${datadir}/doc/freeradius' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking docdir" >&5 -$as_echo_n "checking docdir... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking docdir" >&5 +printf %s "checking docdir... " >&6; } # Check whether --with-docdir was given. -if test "${with_docdir+set}" = set; then : +if test ${with_docdir+y} +then : withval=$with_docdir; case "$withval" in no) docdir=no @@ -5589,19 +6561,20 @@ if test "${with_docdir+set}" = set; then : fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $docdir" >&5 -$as_echo "$docdir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $docdir" >&5 +printf "%s\n" "$docdir" >&6; } if test "x$docdir" = xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Documentation files will NOT be installed." >&5 -$as_echo "$as_me: WARNING: Documentation files will NOT be installed." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Documentation files will NOT be installed." >&5 +printf "%s\n" "$as_me: WARNING: Documentation files will NOT be installed." >&2;} fi logdir='${localstatedir}/log/radius' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking logdir" >&5 -$as_echo_n "checking logdir... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking logdir" >&5 +printf %s "checking logdir... " >&6; } # Check whether --with-logdir was given. -if test "${with_logdir+set}" = set; then : +if test ${with_logdir+y} +then : withval=$with_logdir; case "$withval" in no) as_fn_error $? "Need logdir" "$LINENO" 5 @@ -5619,15 +6592,16 @@ if test "${with_logdir+set}" = set; then : fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $logdir" >&5 -$as_echo "$logdir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $logdir" >&5 +printf "%s\n" "$logdir" >&6; } radacctdir='${logdir}/radacct' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking radacctdir" >&5 -$as_echo_n "checking radacctdir... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking radacctdir" >&5 +printf %s "checking radacctdir... " >&6; } # Check whether --with-radacctdir was given. -if test "${with_radacctdir+set}" = set; then : +if test ${with_radacctdir+y} +then : withval=$with_radacctdir; case "$withval" in no) as_fn_error $? "Need radacctdir" "$LINENO" 5 @@ -5645,15 +6619,16 @@ if test "${with_radacctdir+set}" = set; then : fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $radacctdir" >&5 -$as_echo "$radacctdir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $radacctdir" >&5 +printf "%s\n" "$radacctdir" >&6; } raddbdir='${sysconfdir}/raddb' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking raddbdir" >&5 -$as_echo_n "checking raddbdir... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking raddbdir" >&5 +printf %s "checking raddbdir... " >&6; } # Check whether --with-raddbdir was given. -if test "${with_raddbdir+set}" = set; then : +if test ${with_raddbdir+y} +then : withval=$with_raddbdir; case "$withval" in no) as_fn_error $? "Need raddbdir" "$LINENO" 5 @@ -5671,15 +6646,16 @@ if test "${with_raddbdir+set}" = set; then : fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $raddbdir" >&5 -$as_echo "$raddbdir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $raddbdir" >&5 +printf "%s\n" "$raddbdir" >&6; } dictdir='${datarootdir}/freeradius' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dictdir" >&5 -$as_echo_n "checking dictdir... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dictdir" >&5 +printf %s "checking dictdir... " >&6; } # Check whether --with-dictdir was given. -if test "${with_dictdir+set}" = set; then : +if test ${with_dictdir+y} +then : withval=$with_dictdir; case "$withval" in no) as_fn_error $? "Need dictdir" "$LINENO" 5 @@ -5697,8 +6673,8 @@ if test "${with_dictdir+set}" = set; then : fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dictdir" >&5 -$as_echo "$dictdir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dictdir" >&5 +printf "%s\n" "$dictdir" >&6; } modconfdir='${raddbdir}/mods-config' @@ -5706,7 +6682,8 @@ modconfdir='${raddbdir}/mods-config' WITH_ASCEND_BINARY=yes # Check whether --with-ascend-binary was given. -if test "${with_ascend_binary+set}" = set; then : +if test ${with_ascend_binary+y} +then : withval=$with_ascend_binary; case "$withval" in yes) ;; @@ -5718,14 +6695,36 @@ fi if test "x$WITH_ASCEND_BINARY" = "xyes"; then -$as_echo "#define WITH_ASCEND_BINARY 1" >>confdefs.h +printf "%s\n" "#define WITH_ASCEND_BINARY 1" >>confdefs.h + +fi + +WITH_RADIUSV11= + +# Check whether --with-radiusv11 was given. +if test ${with_radiusv11+y} +then : + withval=$with_radiusv11; case "$withval" in + yes) + WITH_RADIUSV11=yes + ;; + *) + ;; + esac + +fi + +if test "x$WITH_RADIUSCV11" = "xyes"; then + +printf "%s\n" "#define WITH_RADIUSV11 1" >>confdefs.h fi WITH_THREADS=yes # Check whether --with-threads was given. -if test "${with_threads+set}" = set; then : +if test ${with_threads+y} +then : withval=$with_threads; case "$withval" in yes) ;; @@ -5739,7 +6738,8 @@ fi WITH_TCP=yes # Check whether --with-tcp was given. -if test "${with_tcp+set}" = set; then : +if test ${with_tcp+y} +then : withval=$with_tcp; case "$withval" in yes) ;; @@ -5751,14 +6751,15 @@ fi if test "x$WITH_TCP" = "xyes"; then -$as_echo "#define WITH_TCP 1" >>confdefs.h +printf "%s\n" "#define WITH_TCP 1" >>confdefs.h fi WITH_VMPS=yes # Check whether --with-vmps was given. -if test "${with_vmps+set}" = set; then : +if test ${with_vmps+y} +then : withval=$with_vmps; case "$withval" in yes) ;; @@ -5770,14 +6771,15 @@ fi if test "x$WITH_VMPS" = "xyes"; then -$as_echo "#define WITH_VMPS 1" >>confdefs.h +printf "%s\n" "#define WITH_VMPS 1" >>confdefs.h fi WITH_DHCP=yes # Check whether --with-dhcp was given. -if test "${with_dhcp+set}" = set; then : +if test ${with_dhcp+y} +then : withval=$with_dhcp; case "$withval" in yes) ;; @@ -5789,7 +6791,7 @@ fi if test "x$WITH_DHCP" = "xyes"; then -$as_echo "#define WITH_DHCP 1" >>confdefs.h +printf "%s\n" "#define WITH_DHCP 1" >>confdefs.h fi @@ -5797,7 +6799,8 @@ fi STATIC_MODULES= # Check whether --with-static_modules was given. -if test "${with_static_modules+set}" = set; then : +if test ${with_static_modules+y} +then : withval=$with_static_modules; for i in $withval; do STATIC_MODULES="$STATIC_MODULES -dlpreopen ../modules/rlm_$i/rlm_$i.la" @@ -5809,7 +6812,8 @@ fi USE_SHARED_LIBS=yes # Check whether --with-shared-libs was given. -if test "${with_shared_libs+set}" = set; then : +if test ${with_shared_libs+y} +then : withval=$with_shared_libs; case "$withval" in no) USE_SHARED_LIBS=no @@ -5823,7 +6827,8 @@ fi MODULES= # Check whether --with-modules was given. -if test "${with_modules+set}" = set; then : +if test ${with_modules+y} +then : withval=$with_modules; for i in $withval; do MODULES="$MODULES $i" @@ -5835,7 +6840,8 @@ fi EXPERIMENTAL= # Check whether --with-experimental-modules was given. -if test "${with_experimental_modules+set}" = set; then : +if test ${with_experimental_modules+y} +then : withval=$with_experimental_modules; case "$withval" in yes) EXPERIMENTAL=yes @@ -5852,7 +6858,8 @@ fi WITH_UDPFROMTO=yes # Check whether --with-udpfromto was given. -if test "${with_udpfromto+set}" = set; then : +if test ${with_udpfromto+y} +then : withval=$with_udpfromto; case "$withval" in yes) WITH_UDPFROMTO=yes @@ -5866,14 +6873,15 @@ fi if test "x$WITH_UDPFROMTO" = "xyes"; then -$as_echo "#define WITH_UDPFROMTO /**/" >>confdefs.h +printf "%s\n" "#define WITH_UDPFROMTO /**/" >>confdefs.h fi # Check whether --with-rlm-FOO-lib-dir was given. -if test "${with_rlm_FOO_lib_dir+set}" = set; then : +if test ${with_rlm_FOO_lib_dir+y} +then : withval=$with_rlm_FOO_lib_dir; case "$withval" in *) ;; @@ -5884,7 +6892,8 @@ fi # Check whether --with-rlm-FOO-include-dir was given. -if test "${with_rlm_FOO_include_dir+set}" = set; then : +if test ${with_rlm_FOO_include_dir+y} +then : withval=$with_rlm_FOO_include_dir; case "$withval" in *) ;; @@ -5896,7 +6905,8 @@ fi WITH_OPENSSL=yes # Check whether --with-openssl was given. -if test "${with_openssl+set}" = set; then : +if test ${with_openssl+y} +then : withval=$with_openssl; case "$withval" in no) WITH_OPENSSL=no @@ -5917,7 +6927,8 @@ fi openssl_lib_dir= # Check whether --with-openssl-lib-dir was given. -if test "${with_openssl_lib_dir+set}" = set; then : +if test ${with_openssl_lib_dir+y} +then : withval=$with_openssl_lib_dir; case "$withval" in *) openssl_lib_dir="$withval" ;; @@ -5929,7 +6940,8 @@ fi openssl_include_dir= # Check whether --with-openssl-include-dir was given. -if test "${with_openssl_include_dir+set}" = set; then : +if test ${with_openssl_include_dir+y} +then : withval=$with_openssl_include_dir; case "$withval" in *) openssl_include_dir="$withval" ;; @@ -5939,13 +6951,14 @@ fi # Check whether --enable-openssl-version-check was given. -if test "${enable_openssl_version_check+set}" = set; then : +if test ${enable_openssl_version_check+y} +then : enableval=$enable_openssl_version_check; fi if test "x$enable_openssl_version_check" != "xno"; then -$as_echo "#define ENABLE_OPENSSL_VERSION_CHECK 1" >>confdefs.h +printf "%s\n" "#define ENABLE_OPENSSL_VERSION_CHECK 1" >>confdefs.h openssl_version_check_config="\ # @@ -5963,11 +6976,12 @@ fi # Check whether --enable-reproducible-builds was given. -if test "${enable_reproducible_builds+set}" = set; then : +if test ${enable_reproducible_builds+y} +then : enableval=$enable_reproducible_builds; case "$enableval" in yes) -$as_echo "#define ENABLE_REPRODUCIBLE_BUILDS 1" >>confdefs.h +printf "%s\n" "#define ENABLE_REPRODUCIBLE_BUILDS 1" >>confdefs.h reproducible_builds=yes ;; @@ -5979,7 +6993,8 @@ fi # Check whether --enable-fuzzer was given. -if test "${enable_fuzzer+set}" = set; then : +if test ${enable_fuzzer+y} +then : enableval=$enable_fuzzer; case "$enableval" in no) fuzzer=no @@ -5992,7 +7007,8 @@ fi # Check whether --enable-address-sanitizer was given. -if test "${enable_address_sanitizer+set}" = set; then : +if test ${enable_address_sanitizer+y} +then : enableval=$enable_address_sanitizer; case "$enableval" in no) address_sanitizer=no @@ -6005,7 +7021,8 @@ fi # Check whether --enable-leak-sanitizer was given. -if test "${enable_leak_sanitizer+set}" = set; then : +if test ${enable_leak_sanitizer+y} +then : enableval=$enable_leak_sanitizer; case "$enableval" in no) leak_sanitizer=no @@ -6018,7 +7035,8 @@ fi # Check whether --enable-thread-sanitizer was given. -if test "${enable_thread_sanitizer+set}" = set; then : +if test ${enable_thread_sanitizer+y} +then : enableval=$enable_thread_sanitizer; case "$enableval" in no) thread_sanitizer=no @@ -6031,7 +7049,8 @@ fi # Check whether --enable-undefined-behaviour-sanitizer was given. -if test "${enable_undefined_behaviour_sanitizer+set}" = set; then : +if test ${enable_undefined_behaviour_sanitizer+y} +then : enableval=$enable_undefined_behaviour_sanitizer; case "$enableval" in no) undefined_behaviour_sanitizer=no @@ -6047,11 +7066,12 @@ fi CHECKRAD=checkrad # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PERL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PERL+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. @@ -6061,11 +7081,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PERL="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6078,25 +7102,26 @@ esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 -$as_echo "$PERL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +printf "%s\n" "$PERL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_cv_path_PERL" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl not found - Simultaneous-Use and checkrad may not work" >&5 -$as_echo "$as_me: WARNING: perl not found - Simultaneous-Use and checkrad may not work" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: perl not found - Simultaneous-Use and checkrad may not work" >&5 +printf "%s\n" "$as_me: WARNING: perl not found - Simultaneous-Use and checkrad may not work" >&2;} fi # Extract the first word of "snmpget", so it can be a program name with args. set dummy snmpget; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_SNMPGET+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_SNMPGET+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $SNMPGET in [\\/]* | ?:[\\/]*) ac_cv_path_SNMPGET="$SNMPGET" # Let the user override the test with a path. @@ -6106,11 +7131,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_SNMPGET="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_SNMPGET="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6122,26 +7151,27 @@ esac fi SNMPGET=$ac_cv_path_SNMPGET if test -n "$SNMPGET"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SNMPGET" >&5 -$as_echo "$SNMPGET" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SNMPGET" >&5 +printf "%s\n" "$SNMPGET" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_cv_path_SNMPGET" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: snmpget not found - Simultaneous-Use and checkrad may not work" >&5 -$as_echo "$as_me: WARNING: snmpget not found - Simultaneous-Use and checkrad may not work" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: snmpget not found - Simultaneous-Use and checkrad may not work" >&5 +printf "%s\n" "$as_me: WARNING: snmpget not found - Simultaneous-Use and checkrad may not work" >&2;} fi # Extract the first word of "snmpwalk", so it can be a program name with args. set dummy snmpwalk; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_SNMPWALK+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_SNMPWALK+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $SNMPWALK in [\\/]* | ?:[\\/]*) ac_cv_path_SNMPWALK="$SNMPWALK" # Let the user override the test with a path. @@ -6151,11 +7181,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_SNMPWALK="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_SNMPWALK="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6167,26 +7201,27 @@ esac fi SNMPWALK=$ac_cv_path_SNMPWALK if test -n "$SNMPWALK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SNMPWALK" >&5 -$as_echo "$SNMPWALK" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SNMPWALK" >&5 +printf "%s\n" "$SNMPWALK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_cv_path_SNMPWALK" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: snmpwalk not found - Simultaneous-Use and checkrad may not work" >&5 -$as_echo "$as_me: WARNING: snmpwalk not found - Simultaneous-Use and checkrad may not work" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: snmpwalk not found - Simultaneous-Use and checkrad may not work" >&5 +printf "%s\n" "$as_me: WARNING: snmpwalk not found - Simultaneous-Use and checkrad may not work" >&2;} fi # Extract the first word of "rusers", so it can be a program name with args. set dummy rusers; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_RUSERS+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_RUSERS+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $RUSERS in [\\/]* | ?:[\\/]*) ac_cv_path_RUSERS="$RUSERS" # Let the user override the test with a path. @@ -6196,11 +7231,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_RUSERS="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_RUSERS="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6213,34 +7252,31 @@ esac fi RUSERS=$ac_cv_path_RUSERS if test -n "$RUSERS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUSERS" >&5 -$as_echo "$RUSERS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUSERS" >&5 +printf "%s\n" "$RUSERS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi missing_dir=`cd $ac_aux_dir && pwd` + # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + + if test x"${MISSING+set}" != xset; then + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi @@ -6255,11 +7291,12 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} # Extract the first word of "dirname", so it can be a program name with args. set dummy dirname; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_DIRNAME+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_DIRNAME+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $DIRNAME in [\\/]* | ?:[\\/]*) ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path. @@ -6269,11 +7306,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_DIRNAME="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6285,21 +7326,22 @@ esac fi DIRNAME=$ac_cv_path_DIRNAME if test -n "$DIRNAME"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5 -$as_echo "$DIRNAME" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5 +printf "%s\n" "$DIRNAME" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # Extract the first word of "grep", so it can be a program name with args. set dummy grep; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $GREP in [\\/]* | ?:[\\/]*) ac_cv_path_GREP="$GREP" # Let the user override the test with a path. @@ -6309,11 +7351,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GREP="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6325,11 +7371,11 @@ esac fi GREP=$ac_cv_path_GREP if test -n "$GREP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5 -$as_echo "$GREP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5 +printf "%s\n" "$GREP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6338,7 +7384,8 @@ fi talloc_lib_dir= # Check whether --with-talloc-lib-dir was given. -if test "${with_talloc_lib_dir+set}" = set; then : +if test ${with_talloc_lib_dir+y} +then : withval=$with_talloc_lib_dir; case "$withval" in no) as_fn_error $? "Need talloc-lib-dir" "$LINENO" 5 @@ -6355,7 +7402,8 @@ fi talloc_include_dir= # Check whether --with-talloc-include-dir was given. -if test "${with_talloc_include_dir+set}" = set; then : +if test ${with_talloc_include_dir+y} +then : withval=$with_talloc_include_dir; case "$withval" in no) as_fn_error $? "Need talloc-include-dir" "$LINENO" 5 @@ -6383,34 +7431,35 @@ smart_lib_dir= if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc in $try" >&5 -$as_echo_n "checking for _talloc in -ltalloc in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc in $try" >&5 +printf %s "checking for _talloc in -ltalloc in $try... " >&6; } LIBS="-ltalloc $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char _talloc(); int -main () +main (void) { _talloc() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-ltalloc" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -6418,65 +7467,67 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test "x$smart_lib" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc" >&5 -$as_echo_n "checking for _talloc in -ltalloc... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc" >&5 +printf %s "checking for _talloc in -ltalloc... " >&6; } LIBS="-ltalloc $old_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char _talloc(); int -main () +main (void) { _talloc() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-ltalloc" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$old_LIBS" fi if test "x$smart_lib" = "x"; then for try in /usr/local/lib /opt/lib; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc in $try" >&5 -$as_echo_n "checking for _talloc in -ltalloc in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _talloc in -ltalloc in $try" >&5 +printf %s "checking for _talloc in -ltalloc in $try... " >&6; } LIBS="-ltalloc $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char _talloc(); int -main () +main (void) { _talloc() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-ltalloc" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -6490,8 +7541,8 @@ if test "x$smart_lib" != "x"; then fi if test "x$ac_cv_lib_talloc__talloc" != "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: talloc library not found. Use --with-talloc-lib-dir=<path>." >&5 -$as_echo "$as_me: WARNING: talloc library not found. Use --with-talloc-lib-dir=<path>." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: talloc library not found. Use --with-talloc-lib-dir=<path>." >&5 +printf "%s\n" "$as_me: WARNING: talloc library not found. Use --with-talloc-lib-dir=<path>." >&2;} as_fn_error $? "FreeRADIUS requires libtalloc" "$LINENO" 5 fi @@ -6507,15 +7558,14 @@ if test "x$WITH_THREADS" = "xyes"; then CFLAGS="$CFLAGS -mt" fi - for ac_header in pthread.h + for ac_header in pthread.h do : - ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes +then : + printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h -else +else $as_nop WITH_THREADS="no" fail=pthread.h @@ -6524,13 +7574,13 @@ fi done - if test "x$WITH_THREADS" != "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 -$as_echo_n "checking for pthread_create in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_create+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 +printf %s "checking for pthread_create in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_create+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6539,41 +7589,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_create (); int -main () +main (void) { return pthread_create (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pthread_pthread_create=yes -else +else $as_nop ac_cv_lib_pthread_pthread_create=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } -if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_create" >&6; } +if test "x$ac_cv_lib_pthread_pthread_create" = xyes +then : HAVE_LPTHREAD='yes' CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" LIBS="-lpthread $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-pthread\"" >&5 -$as_echo_n "checking for the compiler flag \"-pthread\"... " >&6; } -if ${ax_cv_cc_pthread_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-pthread\"" >&5 +printf %s "checking for the compiler flag \"-pthread\"... " >&6; } +if test ${ax_cv_cc_pthread_flag+y} +then : + printf %s "(cached) " >&6 +else $as_nop CFLAGS_SAVED=$CFLAGS @@ -6589,19 +7639,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int -main () +main (void) { return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ax_cv_cc_pthread_flag="yes" -else +else $as_nop ax_cv_cc_pthread_flag="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6612,8 +7663,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$CFLAGS_SAVED" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_pthread_flag" >&5 -$as_echo "$ax_cv_cc_pthread_flag" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_pthread_flag" >&5 +printf "%s\n" "$ax_cv_cc_pthread_flag" >&6; } if test "x$ax_cv_cc_pthread_flag" != 'xyes'; then CFLAGS="$CFLAGS -pthread" @@ -6624,11 +7675,12 @@ fi if test "x$HAVE_LPTHREAD" != "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 -$as_echo_n "checking for pthread_create in -lc_r... " >&6; } -if ${ac_cv_lib_c_r_pthread_create+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 +printf %s "checking for pthread_create in -lc_r... " >&6; } +if test ${ac_cv_lib_c_r_pthread_create+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6637,39 +7689,39 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char pthread_create (); int -main () +main (void) { return pthread_create (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_c_r_pthread_create=yes -else +else $as_nop ac_cv_lib_c_r_pthread_create=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 -$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } -if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 +printf "%s\n" "$ac_cv_lib_c_r_pthread_create" >&6; } +if test "x$ac_cv_lib_c_r_pthread_create" = xyes +then : CFLAGS="$CFLAGS -D_THREAD_SAFE" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-pthread\"" >&5 -$as_echo_n "checking for the compiler flag \"-pthread\"... " >&6; } -if ${ax_cv_cc_pthread_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-pthread\"" >&5 +printf %s "checking for the compiler flag \"-pthread\"... " >&6; } +if test ${ax_cv_cc_pthread_flag+y} +then : + printf %s "(cached) " >&6 +else $as_nop CFLAGS_SAVED=$CFLAGS @@ -6685,19 +7737,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int -main () +main (void) { return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ax_cv_cc_pthread_flag="yes" -else +else $as_nop ax_cv_cc_pthread_flag="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6708,8 +7761,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$CFLAGS_SAVED" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_pthread_flag" >&5 -$as_echo "$ax_cv_cc_pthread_flag" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_pthread_flag" >&5 +printf "%s\n" "$ax_cv_cc_pthread_flag" >&6; } if test "x$ax_cv_cc_pthread_flag" != 'xyes'; then LIBS="-lc_r $LIBS" @@ -6717,7 +7770,7 @@ $as_echo "$ax_cv_cc_pthread_flag" >&6; } CFLAGS="$CFLAGS -pthread" fi -else +else $as_nop fail=-lc_r or -lpthread fi @@ -6726,13 +7779,13 @@ fi fi if test "x$WITH_THREADS" != "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: silently not building with thread support." >&5 -$as_echo "$as_me: WARNING: silently not building with thread support." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FAILURE: thread support requires: $fail." >&5 -$as_echo "$as_me: WARNING: FAILURE: thread support requires: $fail." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: silently not building with thread support." >&5 +printf "%s\n" "$as_me: WARNING: silently not building with thread support." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: FAILURE: thread support requires: $fail." >&5 +printf "%s\n" "$as_me: WARNING: FAILURE: thread support requires: $fail." >&2;} else -$as_echo "#define WITH_THREADS 1" >>confdefs.h +printf "%s\n" "#define WITH_THREADS 1" >>confdefs.h fi fi @@ -6743,11 +7796,12 @@ if test "x$WITH_THREADS" != "xyes"; then WITH_THREADS=no else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5 -$as_echo_n "checking for library containing sem_init... " >&6; } -if ${ac_cv_search_sem_init+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5 +printf %s "checking for library containing sem_init... " >&6; } +if test ${ac_cv_search_sem_init+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6755,60 +7809,63 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char sem_init (); int -main () +main (void) { return sem_init (); ; return 0; } _ACEOF -for ac_lib in '' pthread sem posix4 rt semaphore; do +for ac_lib in '' pthread sem posix4 rt semaphore +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO"; then : + if ac_fn_c_try_link "$LINENO" +then : ac_cv_search_sem_init=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_sem_init+:} false; then : + if test ${ac_cv_search_sem_init+y} +then : break fi done -if ${ac_cv_search_sem_init+:} false; then : +if test ${ac_cv_search_sem_init+y} +then : -else +else $as_nop ac_cv_search_sem_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5 -$as_echo "$ac_cv_search_sem_init" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5 +printf "%s\n" "$ac_cv_search_sem_init" >&6; } ac_res=$ac_cv_search_sem_init -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else +else $as_nop as_fn_error $? "-lsem not found. You may want to download it from ftp://ftp.to.gd-es.com/pub/BSDI/libsem.tar.bz2 or ftp://ftp.freeradius.org/pub/radius/contrib/libsem.tar.gz" "$LINENO" 5 fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6817,44 +7874,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDL 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : + printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h LIBS="-ldl $LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getsockname in -lsocket" >&5 -$as_echo_n "checking for getsockname in -lsocket... " >&6; } -if ${ac_cv_lib_socket_getsockname+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getsockname in -lsocket" >&5 +printf %s "checking for getsockname in -lsocket... " >&6; } +if test ${ac_cv_lib_socket_getsockname+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6863,44 +7918,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char getsockname (); int -main () +main (void) { return getsockname (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_socket_getsockname=yes -else +else $as_nop ac_cv_lib_socket_getsockname=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getsockname" >&5 -$as_echo "$ac_cv_lib_socket_getsockname" >&6; } -if test "x$ac_cv_lib_socket_getsockname" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getsockname" >&5 +printf "%s\n" "$ac_cv_lib_socket_getsockname" >&6; } +if test "x$ac_cv_lib_socket_getsockname" = xyes +then : + printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h LIBS="-lsocket $LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5 -$as_echo_n "checking for inet_aton in -lresolv... " >&6; } -if ${ac_cv_lib_resolv_inet_aton+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5 +printf %s "checking for inet_aton in -lresolv... " >&6; } +if test ${ac_cv_lib_resolv_inet_aton+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6909,44 +7962,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char inet_aton (); int -main () +main (void) { return inet_aton (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_resolv_inet_aton=yes -else +else $as_nop ac_cv_lib_resolv_inet_aton=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5 -$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; } -if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBRESOLV 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5 +printf "%s\n" "$ac_cv_lib_resolv_inet_aton" >&6; } +if test "x$ac_cv_lib_resolv_inet_aton" = xyes +then : + printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h LIBS="-lresolv $LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnsl" >&5 -$as_echo_n "checking for inet_ntoa in -lnsl... " >&6; } -if ${ac_cv_lib_nsl_inet_ntoa+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnsl" >&5 +printf %s "checking for inet_ntoa in -lnsl... " >&6; } +if test ${ac_cv_lib_nsl_inet_ntoa+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6955,43 +8006,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char inet_ntoa (); int -main () +main (void) { return inet_ntoa (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_nsl_inet_ntoa=yes -else +else $as_nop ac_cv_lib_nsl_inet_ntoa=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_inet_ntoa" >&5 -$as_echo "$ac_cv_lib_nsl_inet_ntoa" >&6; } -if test "x$ac_cv_lib_nsl_inet_ntoa" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_inet_ntoa" >&5 +printf "%s\n" "$ac_cv_lib_nsl_inet_ntoa" >&6; } +if test "x$ac_cv_lib_nsl_inet_ntoa" = xyes +then : + printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h LIBS="-lnsl $LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for htonl in -lws2_32" >&5 -$as_echo_n "checking for htonl in -lws2_32... " >&6; } -if ${ac_cv_lib_ws2_32_htonl+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for htonl in -lws2_32" >&5 +printf %s "checking for htonl in -lws2_32... " >&6; } +if test ${ac_cv_lib_ws2_32_htonl+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lws2_32 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7000,33 +8049,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char htonl (); int -main () +main (void) { return htonl (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_ws2_32_htonl=yes -else +else $as_nop ac_cv_lib_ws2_32_htonl=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_htonl" >&5 -$as_echo "$ac_cv_lib_ws2_32_htonl" >&6; } -if test "x$ac_cv_lib_ws2_32_htonl" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBWS2_32 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_htonl" >&5 +printf "%s\n" "$ac_cv_lib_ws2_32_htonl" >&6; } +if test "x$ac_cv_lib_ws2_32_htonl" = xyes +then : + printf "%s\n" "#define HAVE_LIBWS2_32 1" >>confdefs.h LIBS="-lws2_32 $LIBS" @@ -7036,7 +8082,8 @@ fi pcap_lib_dir= # Check whether --with-pcap-lib-dir was given. -if test "${with_pcap_lib_dir+set}" = set; then : +if test ${with_pcap_lib_dir+y} +then : withval=$with_pcap_lib_dir; case "$withval" in no) as_fn_error $? "Need pcap-lib-dir" "$LINENO" 5 @@ -7053,7 +8100,8 @@ fi pcap_include_dir= # Check whether --with-pcap-include-dir was given. -if test "${with_pcap_include_dir+set}" = set; then : +if test ${with_pcap_include_dir+y} +then : withval=$with_pcap_include_dir; case "$withval" in no) as_fn_error $? "Need pcap-include-dir" "$LINENO" 5 @@ -7081,34 +8129,35 @@ smart_lib_dir= if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap in $try" >&5 -$as_echo_n "checking for pcap_open_live in -lpcap in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap in $try" >&5 +printf %s "checking for pcap_open_live in -lpcap in $try... " >&6; } LIBS="-lpcap $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char pcap_open_live(); int -main () +main (void) { pcap_open_live() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lpcap" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -7116,65 +8165,67 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test "x$smart_lib" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap" >&5 -$as_echo_n "checking for pcap_open_live in -lpcap... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap" >&5 +printf %s "checking for pcap_open_live in -lpcap... " >&6; } LIBS="-lpcap $old_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char pcap_open_live(); int -main () +main (void) { pcap_open_live() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lpcap" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$old_LIBS" fi if test "x$smart_lib" = "x"; then for try in /usr/local/lib /opt/lib; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap in $try" >&5 -$as_echo_n "checking for pcap_open_live in -lpcap in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap in $try" >&5 +printf %s "checking for pcap_open_live in -lpcap in $try... " >&6; } LIBS="-lpcap $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char pcap_open_live(); int -main () +main (void) { pcap_open_live() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lpcap" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -7188,25 +8239,33 @@ if test "x$smart_lib" != "x"; then fi if test "x$ac_cv_lib_pcap_pcap_open_live" != "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pcap library not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-lib-dir=<path>." >&5 -$as_echo "$as_me: WARNING: pcap library not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-lib-dir=<path>." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: pcap library not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-lib-dir=<path>." >&5 +printf "%s\n" "$as_me: WARNING: pcap library not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-lib-dir=<path>." >&2;} else - for ac_func in \ - pcap_fopen_offline \ - pcap_dump_fopen \ - pcap_create \ - pcap_activate + ac_fn_c_check_func "$LINENO" "pcap_fopen_offline" "ac_cv_func_pcap_fopen_offline" +if test "x$ac_cv_func_pcap_fopen_offline" = xyes +then : + printf "%s\n" "#define HAVE_PCAP_FOPEN_OFFLINE 1" >>confdefs.h -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "pcap_dump_fopen" "ac_cv_func_pcap_dump_fopen" +if test "x$ac_cv_func_pcap_dump_fopen" = xyes +then : + printf "%s\n" "#define HAVE_PCAP_DUMP_FOPEN 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "pcap_create" "ac_cv_func_pcap_create" +if test "x$ac_cv_func_pcap_create" = xyes +then : + printf "%s\n" "#define HAVE_PCAP_CREATE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "pcap_activate" "ac_cv_func_pcap_activate" +if test "x$ac_cv_func_pcap_activate" = xyes +then : + printf "%s\n" "#define HAVE_PCAP_ACTIVATE 1" >>confdefs.h fi -done PCAP_LIBS="${smart_lib}" @@ -7217,7 +8276,8 @@ LIBS="${old_LIBS}" collectdclient_lib_dir= # Check whether --with-collectdclient-lib-dir was given. -if test "${with_collectdclient_lib_dir+set}" = set; then : +if test ${with_collectdclient_lib_dir+y} +then : withval=$with_collectdclient_lib_dir; case "$withval" in no) as_fn_error $? "Need collectdclient-lib-dir" "$LINENO" 5 @@ -7234,7 +8294,8 @@ fi collectdclient_include_dir= # Check whether --with-collectdclient-include-dir was given. -if test "${with_collectdclient_include_dir+set}" = set; then : +if test ${with_collectdclient_include_dir+y} +then : withval=$with_collectdclient_include_dir; case "$withval" in no) as_fn_error $? "Need collectdclient-include-dir" "$LINENO" 5 @@ -7262,34 +8323,35 @@ smart_lib_dir= if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient in $try" >&5 -$as_echo_n "checking for lcc_connect in -lcollectdclient in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient in $try" >&5 +printf %s "checking for lcc_connect in -lcollectdclient in $try... " >&6; } LIBS="-lcollectdclient $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char lcc_connect(); int -main () +main (void) { lcc_connect() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lcollectdclient" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -7297,65 +8359,67 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test "x$smart_lib" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient" >&5 -$as_echo_n "checking for lcc_connect in -lcollectdclient... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient" >&5 +printf %s "checking for lcc_connect in -lcollectdclient... " >&6; } LIBS="-lcollectdclient $old_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char lcc_connect(); int -main () +main (void) { lcc_connect() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lcollectdclient" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$old_LIBS" fi if test "x$smart_lib" = "x"; then for try in /usr/local/lib /opt/lib; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient in $try" >&5 -$as_echo_n "checking for lcc_connect in -lcollectdclient in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lcc_connect in -lcollectdclient in $try" >&5 +printf %s "checking for lcc_connect in -lcollectdclient in $try... " >&6; } LIBS="-lcollectdclient $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char lcc_connect(); int -main () +main (void) { lcc_connect() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lcollectdclient" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -7369,8 +8433,8 @@ if test "x$smart_lib" != "x"; then fi if test "x$ac_cv_lib_collectdclient_lcc_connect" != "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: collectdclient library not found. Use --with-collectdclient-lib-dir=<path>." >&5 -$as_echo "$as_me: WARNING: collectdclient library not found. Use --with-collectdclient-lib-dir=<path>." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: collectdclient library not found. Use --with-collectdclient-lib-dir=<path>." >&5 +printf "%s\n" "$as_me: WARNING: collectdclient library not found. Use --with-collectdclient-lib-dir=<path>." >&2;} else COLLECTDC_LIBS="${smart_lib}" COLLECTDC_LDFLAGS="${smart_ldflags}" @@ -7380,7 +8444,8 @@ LIBS="${old_LIBS}" cap_lib_dir= # Check whether --with-cap-lib-dir was given. -if test "${with_cap_lib_dir+set}" = set; then : +if test ${with_cap_lib_dir+y} +then : withval=$with_cap_lib_dir; case "$withval" in no) as_fn_error $? "Need cap-lib-dir" "$LINENO" 5 @@ -7397,7 +8462,8 @@ fi cap_include_dir= # Check whether --with-cap-include-dir was given. -if test "${with_cap_include_dir+set}" = set; then : +if test ${with_cap_include_dir+y} +then : withval=$with_cap_include_dir; case "$withval" in no) as_fn_error $? "Need cap-include-dir" "$LINENO" 5 @@ -7425,34 +8491,35 @@ smart_lib_dir= if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap in $try" >&5 -$as_echo_n "checking for cap_get_proc in -lcap in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap in $try" >&5 +printf %s "checking for cap_get_proc in -lcap in $try... " >&6; } LIBS="-lcap $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char cap_get_proc(); int -main () +main (void) { cap_get_proc() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lcap" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -7460,65 +8527,67 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test "x$smart_lib" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap" >&5 -$as_echo_n "checking for cap_get_proc in -lcap... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap" >&5 +printf %s "checking for cap_get_proc in -lcap... " >&6; } LIBS="-lcap $old_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char cap_get_proc(); int -main () +main (void) { cap_get_proc() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lcap" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$old_LIBS" fi if test "x$smart_lib" = "x"; then for try in /usr/local/lib /opt/lib; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap in $try" >&5 -$as_echo_n "checking for cap_get_proc in -lcap in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cap_get_proc in -lcap in $try" >&5 +printf %s "checking for cap_get_proc in -lcap in $try... " >&6; } LIBS="-lcap $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char cap_get_proc(); int -main () +main (void) { cap_get_proc() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lcap" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -7532,21 +8601,22 @@ if test "x$smart_lib" != "x"; then fi if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>." >&5 -$as_echo "$as_me: WARNING: cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>." >&5 +printf "%s\n" "$as_me: WARNING: cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>." >&2;} else -$as_echo "#define HAVE_LIBCAP 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBCAP 1" >>confdefs.h HAVE_LIBCAP=1 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a readline compatible library" >&5 -$as_echo_n "checking for a readline compatible library... " >&6; } -if ${vl_cv_lib_readline+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a readline compatible library" >&5 +printf %s "checking for a readline compatible library... " >&6; } +if test ${vl_cv_lib_readline+y} +then : + printf %s "(cached) " >&6 +else $as_nop ORIG_LIBS="$LIBS" for readline_lib in readline edit editline; do @@ -7563,22 +8633,20 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char readline (); int -main () +main (void) { return readline (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : vl_cv_lib_readline="$TRY_LIB" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -n "$vl_cv_lib_readline"; then break @@ -7594,32 +8662,33 @@ rm -f core conftest.err conftest.$ac_objext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vl_cv_lib_readline" >&5 -$as_echo "$vl_cv_lib_readline" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vl_cv_lib_readline" >&5 +printf "%s\n" "$vl_cv_lib_readline" >&6; } if test "$vl_cv_lib_readline" != "no"; then LIBREADLINE="$vl_cv_lib_readline" -$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBREADLINE 1" >>confdefs.h - for ac_header in readline.h readline/readline.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default" +if test "x$ac_cv_header_readline_h" = xyes +then : + printf "%s\n" "#define HAVE_READLINE_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" +if test "x$ac_cv_header_readline_readline_h" = xyes +then : + printf "%s\n" "#define HAVE_READLINE_READLINE_H 1" >>confdefs.h -done +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5 -$as_echo_n "checking whether readline supports history... " >&6; } -if ${vl_cv_lib_readline_history+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5 +printf %s "checking whether readline supports history... " >&6; } +if test ${vl_cv_lib_readline_history+y} +then : + printf %s "(cached) " >&6 +else $as_nop vl_cv_lib_readline_history="no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7628,43 +8697,41 @@ else /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char add_history (); int -main () +main (void) { return add_history (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : vl_cv_lib_readline_history="yes" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vl_cv_lib_readline_history" >&5 -$as_echo "$vl_cv_lib_readline_history" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vl_cv_lib_readline_history" >&5 +printf "%s\n" "$vl_cv_lib_readline_history" >&6; } if test "$vl_cv_lib_readline_history" = "yes"; then -$as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h +printf "%s\n" "#define HAVE_READLINE_HISTORY 1" >>confdefs.h - for ac_header in history.h readline/history.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default" +if test "x$ac_cv_header_history_h" = xyes +then : + printf "%s\n" "#define HAVE_HISTORY_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" +if test "x$ac_cv_header_readline_history_h" = xyes +then : + printf "%s\n" "#define HAVE_READLINE_HISTORY_H 1" >>confdefs.h -done +fi fi fi @@ -7673,7 +8740,8 @@ done # Check whether --with-systemd was given. -if test "${with_systemd+set}" = set; then : +if test ${with_systemd+y} +then : withval=$with_systemd; case "$withval" in no) WITH_SYSTEMD=no @@ -7681,7 +8749,7 @@ if test "${with_systemd+set}" = set; then : *) WITH_SYSTEMD=yes esac -else +else $as_nop WITH_SYSTEMD=no fi @@ -7689,7 +8757,8 @@ fi systemd_lib_dir= # Check whether --with-systemd-lib-dir was given. -if test "${with_systemd_lib_dir+set}" = set; then : +if test ${with_systemd_lib_dir+y} +then : withval=$with_systemd_lib_dir; case "$withval" in *) systemd_lib_dir="$withval" ;; @@ -7701,7 +8770,8 @@ fi systemd_include_dir= # Check whether --with-systemd-include-dir was given. -if test "${with_systemd_include_dir+set}" = set; then : +if test ${with_systemd_include_dir+y} +then : withval=$with_systemd_include_dir; case "$withval" in *) systemd_include_dir="$withval" ;; @@ -7725,34 +8795,35 @@ smart_lib_dir= if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sd_notify in -lsystemd in $try" >&5 -$as_echo_n "checking for sd_notify in -lsystemd in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sd_notify in -lsystemd in $try" >&5 +printf %s "checking for sd_notify in -lsystemd in $try... " >&6; } LIBS="-lsystemd $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char sd_notify(); int -main () +main (void) { sd_notify() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lsystemd" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -7760,65 +8831,67 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test "x$smart_lib" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sd_notify in -lsystemd" >&5 -$as_echo_n "checking for sd_notify in -lsystemd... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sd_notify in -lsystemd" >&5 +printf %s "checking for sd_notify in -lsystemd... " >&6; } LIBS="-lsystemd $old_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char sd_notify(); int -main () +main (void) { sd_notify() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lsystemd" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$old_LIBS" fi if test "x$smart_lib" = "x"; then for try in /usr/local/lib /opt/lib; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sd_notify in -lsystemd in $try" >&5 -$as_echo_n "checking for sd_notify in -lsystemd in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sd_notify in -lsystemd in $try" >&5 +printf %s "checking for sd_notify in -lsystemd in $try... " >&6; } LIBS="-lsystemd $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char sd_notify(); int -main () +main (void) { sd_notify() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lsystemd" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -7832,11 +8905,11 @@ if test "x$smart_lib" != "x"; then fi if test "x$ac_cv_lib_systemd_sd_notify" != "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: systemd library not found. Use --with-systemd-lib-dir=<path>." >&5 -$as_echo "$as_me: WARNING: systemd library not found. Use --with-systemd-lib-dir=<path>." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: systemd library not found. Use --with-systemd-lib-dir=<path>." >&5 +printf "%s\n" "$as_me: WARNING: systemd library not found. Use --with-systemd-lib-dir=<path>." >&2;} else -$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h +printf "%s\n" "#define HAVE_SYSTEMD 1" >>confdefs.h HAVE_SYSTEMD=1 SYSTEMD_LIBS="${smart_lib}" @@ -7846,8 +8919,8 @@ $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h fi if test "x$HAVE_SYSTEMD" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for systemd watchdog" >&5 -$as_echo "$as_me: skipping test for systemd watchdog" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: skipping test for systemd watchdog" >&5 +printf "%s\n" "$as_me: skipping test for systemd watchdog" >&6;} else smart_try_dir="$systemd_lib_dir" @@ -7863,34 +8936,35 @@ smart_lib_dir= if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sd_watchdog_enabled in -lsystemd in $try" >&5 -$as_echo_n "checking for sd_watchdog_enabled in -lsystemd in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sd_watchdog_enabled in -lsystemd in $try" >&5 +printf %s "checking for sd_watchdog_enabled in -lsystemd in $try... " >&6; } LIBS="-lsystemd $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char sd_watchdog_enabled(); int -main () +main (void) { sd_watchdog_enabled() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lsystemd" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -7898,65 +8972,67 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test "x$smart_lib" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sd_watchdog_enabled in -lsystemd" >&5 -$as_echo_n "checking for sd_watchdog_enabled in -lsystemd... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sd_watchdog_enabled in -lsystemd" >&5 +printf %s "checking for sd_watchdog_enabled in -lsystemd... " >&6; } LIBS="-lsystemd $old_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char sd_watchdog_enabled(); int -main () +main (void) { sd_watchdog_enabled() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lsystemd" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$old_LIBS" fi if test "x$smart_lib" = "x"; then for try in /usr/local/lib /opt/lib; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sd_watchdog_enabled in -lsystemd in $try" >&5 -$as_echo_n "checking for sd_watchdog_enabled in -lsystemd in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sd_watchdog_enabled in -lsystemd in $try" >&5 +printf %s "checking for sd_watchdog_enabled in -lsystemd in $try... " >&6; } LIBS="-lsystemd $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char sd_watchdog_enabled(); int -main () +main (void) { sd_watchdog_enabled() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lsystemd" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -7970,19 +9046,19 @@ if test "x$smart_lib" != "x"; then fi if test "x$ac_cv_lib_systemd_sd_watchdog_enabled" != "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: systemd watchdog is only available from systemd 209." >&5 -$as_echo "$as_me: WARNING: systemd watchdog is only available from systemd 209." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: systemd watchdog is only available from systemd 209." >&5 +printf "%s\n" "$as_me: WARNING: systemd watchdog is only available from systemd 209." >&2;} else -$as_echo "#define HAVE_SYSTEMD_WATCHDOG 1" >>confdefs.h +printf "%s\n" "#define HAVE_SYSTEMD_WATCHDOG 1" >>confdefs.h fi LIBS="${old_LIBS}" fi if test "x$WITH_SYSTEMD" != xyes || test "x$SYSTEMD_LIBS" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for systemd/sd-daemon.h." >&5 -$as_echo "$as_me: skipping test for systemd/sd-daemon.h." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: skipping test for systemd/sd-daemon.h." >&5 +printf "%s\n" "$as_me: skipping test for systemd/sd-daemon.h." >&6;} else smart_try_dir="$systemd_include_dir" @@ -8007,141 +9083,145 @@ done if test "x$_smart_try_dir" != "x"; then for try in $_smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemd/sd-daemon.h in $try" >&5 -$as_echo_n "checking for systemd/sd-daemon.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for systemd/sd-daemon.h in $try" >&5 +printf %s "checking for systemd/sd-daemon.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <systemd/sd-daemon.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi if test "x$smart_include" = "x"; then for _prefix in $smart_prefix; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/systemd/sd-daemon.h" >&5 -$as_echo_n "checking for ${_prefix}/systemd/sd-daemon.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/systemd/sd-daemon.h" >&5 +printf %s "checking for ${_prefix}/systemd/sd-daemon.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <systemd/sd-daemon.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem ${_prefix}/" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done fi if test "x$smart_include" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemd/sd-daemon.h" >&5 -$as_echo_n "checking for systemd/sd-daemon.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for systemd/sd-daemon.h" >&5 +printf %s "checking for systemd/sd-daemon.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <systemd/sd-daemon.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include=" " - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x$smart_include" = "x"; then for try in $_smart_include_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemd/sd-daemon.h in $try" >&5 -$as_echo_n "checking for systemd/sd-daemon.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for systemd/sd-daemon.h in $try" >&5 +printf %s "checking for systemd/sd-daemon.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <systemd/sd-daemon.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi @@ -8156,13 +9236,13 @@ smart_prefix= if test "x$ac_cv_header_systemd_sdmdaemon_h" = "xyes"; then -$as_echo "#define HAVE_SYSTEMD_SD_DAEMON_H 1" >>confdefs.h +printf "%s\n" "#define HAVE_SYSTEMD_SD_DAEMON_H 1" >>confdefs.h else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: systemd headers not found. Use --with-systemd-include-dir=<path>." >&5 -$as_echo "$as_me: WARNING: systemd headers not found. Use --with-systemd-include-dir=<path>." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: systemd headers not found. Use --with-systemd-include-dir=<path>." >&5 +printf "%s\n" "$as_me: WARNING: systemd headers not found. Use --with-systemd-include-dir=<path>." >&2;} fi fi @@ -8190,141 +9270,145 @@ done if test "x$_smart_try_dir" != "x"; then for try in $_smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5 -$as_echo_n "checking for talloc.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5 +printf %s "checking for talloc.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <talloc.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi if test "x$smart_include" = "x"; then for _prefix in $smart_prefix; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/talloc.h" >&5 -$as_echo_n "checking for ${_prefix}/talloc.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/talloc.h" >&5 +printf %s "checking for ${_prefix}/talloc.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <talloc.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem ${_prefix}/" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done fi if test "x$smart_include" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h" >&5 -$as_echo_n "checking for talloc.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for talloc.h" >&5 +printf %s "checking for talloc.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <talloc.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include=" " - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x$smart_include" = "x"; then for try in $_smart_include_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5 -$as_echo_n "checking for talloc.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5 +printf %s "checking for talloc.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <talloc.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi @@ -8338,8 +9422,8 @@ fi smart_prefix= if test "x$ac_cv_header_talloc_h" != "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&5 -$as_echo "$as_me: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&5 +printf "%s\n" "$as_me: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&2;} as_fn_error $? "FreeRADIUS requires libtalloc" "$LINENO" 5 fi @@ -8349,26 +9433,27 @@ case "$host" in ;; *-darwin*) -$as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h +printf "%s\n" "#define __APPLE_USE_RFC_3542 1" >>confdefs.h ;; esac ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if eval \${$as_ac_Header+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +printf %s "checking for $ac_hdr that defines DIR... " >&6; } +if eval test \${$as_ac_Header+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> #include <$ac_hdr> int -main () +main (void) { if ((DIR *) 0) return 0; @@ -8376,19 +9461,21 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$as_ac_Header=yes" -else +else $as_nop eval "$as_ac_Header=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$as_ac_Header - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break @@ -8397,11 +9484,12 @@ fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if ${ac_cv_search_opendir+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +printf %s "checking for library containing opendir... " >&6; } +if test ${ac_cv_search_opendir+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8409,56 +9497,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char opendir (); int -main () +main (void) { return opendir (); ; return 0; } _ACEOF -for ac_lib in '' dir; do +for ac_lib in '' dir +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO"; then : + if ac_fn_c_try_link "$LINENO" +then : ac_cv_search_opendir=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_opendir+:} false; then : + if test ${ac_cv_search_opendir+y} +then : break fi done -if ${ac_cv_search_opendir+:} false; then : +if test ${ac_cv_search_opendir+y} +then : -else +else $as_nop ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +printf "%s\n" "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if ${ac_cv_search_opendir+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +printf %s "checking for library containing opendir... " >&6; } +if test ${ac_cv_search_opendir+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8466,334 +9557,500 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char opendir (); int -main () +main (void) { return opendir (); ; return 0; } _ACEOF -for ac_lib in '' x; do +for ac_lib in '' x +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO"; then : + if ac_fn_c_try_link "$LINENO" +then : ac_cv_search_opendir=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_opendir+:} false; then : + if test ${ac_cv_search_opendir+y} +then : break fi done -if ${ac_cv_search_opendir+:} false; then : +if test ${ac_cv_search_opendir+y} +then : -else +else $as_nop ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +printf "%s\n" "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 +# Autoupdate added the next two lines to ensure that your configure +# script's behavior did not change. They are probably safe to remove. + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + + + +# Obsolete code to be removed. +if test $ac_cv_header_sys_time_h = yes; then + +printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +fi +# End of obsolete code. + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 +printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +if test ${ac_cv_header_sys_wait_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> +#include <sys/types.h> +#include <sys/wait.h> +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif int -main () +main (void) { - + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_header_sys_wait_h=yes +else $as_nop + ac_cv_header_sys_wait_h=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 +printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; } +if test $ac_cv_header_sys_wait_h = yes; then -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> +printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : +fi + + +ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" +if test "x$ac_cv_header_arpa_inet_h" = xyes +then : + printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h -else - ac_cv_header_stdc=no fi -rm -f conftest* +ac_fn_c_check_header_compile "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default" +if test "x$ac_cv_header_crypt_h" = xyes +then : + printf "%s\n" "#define HAVE_CRYPT_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> +fi +ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = xyes +then : + printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : +fi +ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes +then : + printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h -else - ac_cv_header_stdc=no fi -rm -f conftest* +ac_fn_c_check_header_compile "$LINENO" "features.h" "ac_cv_header_features_h" "$ac_includes_default" +if test "x$ac_cv_header_features_h" = xyes +then : + printf "%s\n" "#define HAVE_FEATURES_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default" +if test "x$ac_cv_header_fnmatch_h" = xyes +then : + printf "%s\n" "#define HAVE_FNMATCH_H 1" >>confdefs.h -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ctype.h> -#include <stdlib.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif +fi +ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" +if test "x$ac_cv_header_getopt_h" = xyes +then : + printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : +fi +ac_fn_c_check_header_compile "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default" +if test "x$ac_cv_header_glob_h" = xyes +then : + printf "%s\n" "#define HAVE_GLOB_H 1" >>confdefs.h -else - ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default" +if test "x$ac_cv_header_grp_h" = xyes +then : + printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h + fi +ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = xyes +then : + printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes +then : + printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then +ac_fn_c_check_header_compile "$LINENO" "linux/if_packet.h" "ac_cv_header_linux_if_packet_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_if_packet_h" = xyes +then : + printf "%s\n" "#define HAVE_LINUX_IF_PACKET_H 1" >>confdefs.h -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes +then : + printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" +if test "x$ac_cv_header_netdb_h" = xyes +then : + printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -#include <sys/time.h> -#include <time.h> +fi +ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" +if test "x$ac_cv_header_netinet_in_h" = xyes +then : + printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_fn_c_check_header_compile "$LINENO" "prot.h" "ac_cv_header_prot_h" "$ac_includes_default" +if test "x$ac_cv_header_prot_h" = xyes +then : + printf "%s\n" "#define HAVE_PROT_H 1" >>confdefs.h + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then +ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default" +if test "x$ac_cv_header_pwd_h" = xyes +then : + printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "resource.h" "ac_cv_header_resource_h" "$ac_includes_default" +if test "x$ac_cv_header_resource_h" = xyes +then : + printf "%s\n" "#define HAVE_RESOURCE_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default" +if test "x$ac_cv_header_semaphore_h" = xyes +then : + printf "%s\n" "#define HAVE_SEMAPHORE_H 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 -$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if ${ac_cv_header_sys_wait_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -#include <sys/wait.h> -#ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) -#endif -#ifndef WIFEXITED -# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif +fi +ac_fn_c_check_header_compile "$LINENO" "sia.h" "ac_cv_header_sia_h" "$ac_includes_default" +if test "x$ac_cv_header_sia_h" = xyes +then : + printf "%s\n" "#define HAVE_SIA_H 1" >>confdefs.h -int -main () -{ - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_sys_wait_h=yes -else - ac_cv_header_sys_wait_h=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_fn_c_check_header_compile "$LINENO" "siad.h" "ac_cv_header_siad_h" "$ac_includes_default" +if test "x$ac_cv_header_siad_h" = xyes +then : + printf "%s\n" "#define HAVE_SIAD_H 1" >>confdefs.h + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 -$as_echo "$ac_cv_header_sys_wait_h" >&6; } -if test $ac_cv_header_sys_wait_h = yes; then +ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" +if test "x$ac_cv_header_signal_h" = xyes +then : + printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h -$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h - -fi - - -for ac_header in \ - arpa/inet.h \ - crypt.h \ - dlfcn.h \ - errno.h \ - fcntl.h \ - features.h \ - fnmatch.h \ - getopt.h \ - glob.h \ - grp.h \ - inttypes.h \ - limits.h \ - linux/if_packet.h \ - malloc.h \ - netdb.h \ - netinet/in.h \ - prot.h \ - pwd.h \ - resource.h \ - semaphore.h \ - sia.h \ - siad.h \ - signal.h \ - stdatomic.h \ - stdalign.h \ - stdbool.h \ - stddef.h \ - stdint.h \ - stdio.h \ - sys/event.h \ - sys/fcntl.h \ - sys/prctl.h \ - sys/procctl.h \ - sys/ptrace.h \ - sys/resource.h \ - sys/security.h \ - sys/select.h \ - sys/socket.h \ - sys/time.h \ - sys/types.h \ - sys/un.h \ - sys/wait.h \ - syslog.h \ - unistd.h \ - utime.h \ - utmp.h \ - utmpx.h \ - winsock.h +fi +ac_fn_c_check_header_compile "$LINENO" "stdatomic.h" "ac_cv_header_stdatomic_h" "$ac_includes_default" +if test "x$ac_cv_header_stdatomic_h" = xyes +then : + printf "%s\n" "#define HAVE_STDATOMIC_H 1" >>confdefs.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +fi +ac_fn_c_check_header_compile "$LINENO" "stdalign.h" "ac_cv_header_stdalign_h" "$ac_includes_default" +if test "x$ac_cv_header_stdalign_h" = xyes +then : + printf "%s\n" "#define HAVE_STDALIGN_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default" +if test "x$ac_cv_header_stdbool_h" = xyes +then : + printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h -done +fi +ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" +if test "x$ac_cv_header_stddef_h" = xyes +then : + printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes +then : + printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" +if test "x$ac_cv_header_stdio_h" = xyes +then : + printf "%s\n" "#define HAVE_STDIO_H 1" >>confdefs.h -for ac_header in net/if.h -do : - ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" " +fi +ac_fn_c_check_header_compile "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_event_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_EVENT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/fcntl.h" "ac_cv_header_sys_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_fcntl_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_FCNTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_prctl_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PRCTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/procctl.h" "ac_cv_header_sys_procctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_procctl_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PROCCTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/ptrace.h" "ac_cv_header_sys_ptrace_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_ptrace_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_PTRACE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_resource_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/security.h" "ac_cv_header_sys_security_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_security_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SECURITY_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_select_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_socket_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_types_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_un_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_wait_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" +if test "x$ac_cv_header_syslog_h" = xyes +then : + printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default" +if test "x$ac_cv_header_utime_h" = xyes +then : + printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default" +if test "x$ac_cv_header_utmp_h" = xyes +then : + printf "%s\n" "#define HAVE_UTMP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default" +if test "x$ac_cv_header_utmpx_h" = xyes +then : + printf "%s\n" "#define HAVE_UTMPX_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "winsock.h" "ac_cv_header_winsock_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock_h" = xyes +then : + printf "%s\n" "#define HAVE_WINSOCK_H 1" >>confdefs.h + +fi + + +ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" " #ifdef HAVE_SYS_SOCKET_H # include <sys/socket.h> #endif " -if test "x$ac_cv_header_net_if_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NET_IF_H 1 -_ACEOF +if test "x$ac_cv_header_net_if_h" = xyes +then : + printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h fi -done - if test "x$ac_cv_header_sys_security_h" = "xyes" && test "x$ac_cv_header_prot_h" = "xyes" then -$as_echo "#define OSFC2 /**/" >>confdefs.h +printf "%s\n" "#define OSFC2 /**/" >>confdefs.h fi if test "x$ac_cv_header_sia_h" = "xyes" && test "x$ac_cv_header_siad_h" = "xyes" then -$as_echo "#define OSFSIA /**/" >>confdefs.h +printf "%s\n" "#define OSFSIA /**/" >>confdefs.h fi @@ -8816,34 +10073,35 @@ smart_lib_dir= if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto in $try" >&5 -$as_echo_n "checking for DH_new in -lcrypto in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto in $try" >&5 +printf %s "checking for DH_new in -lcrypto in $try... " >&6; } LIBS="-lcrypto $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char DH_new(); int -main () +main (void) { DH_new() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lcrypto" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -8851,65 +10109,67 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test "x$smart_lib" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto" >&5 -$as_echo_n "checking for DH_new in -lcrypto... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto" >&5 +printf %s "checking for DH_new in -lcrypto... " >&6; } LIBS="-lcrypto $old_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char DH_new(); int -main () +main (void) { DH_new() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lcrypto" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$old_LIBS" fi if test "x$smart_lib" = "x"; then for try in /usr/local/lib /opt/lib; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto in $try" >&5 -$as_echo_n "checking for DH_new in -lcrypto in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DH_new in -lcrypto in $try" >&5 +printf %s "checking for DH_new in -lcrypto in $try... " >&6; } LIBS="-lcrypto $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char DH_new(); int -main () +main (void) { DH_new() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lcrypto" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -8924,7 +10184,7 @@ fi if test "x$ac_cv_lib_crypto_DH_new" = "xyes"; then -$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h OPENSSL_LIBS="$smart_lib" OPENSSL_LDFLAGS="$smart_ldflags" @@ -8942,34 +10202,35 @@ smart_lib_dir= if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl in $try" >&5 -$as_echo_n "checking for SSL_new in -lssl in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl in $try" >&5 +printf %s "checking for SSL_new in -lssl in $try... " >&6; } LIBS="-lssl $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char SSL_new(); int -main () +main (void) { SSL_new() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lssl" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -8977,65 +10238,67 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test "x$smart_lib" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5 -$as_echo_n "checking for SSL_new in -lssl... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5 +printf %s "checking for SSL_new in -lssl... " >&6; } LIBS="-lssl $old_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char SSL_new(); int -main () +main (void) { SSL_new() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lssl" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$old_LIBS" fi if test "x$smart_lib" = "x"; then for try in /usr/local/lib /opt/lib; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl in $try" >&5 -$as_echo_n "checking for SSL_new in -lssl in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl in $try" >&5 +printf %s "checking for SSL_new in -lssl in $try... " >&6; } LIBS="-lssl $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char SSL_new(); int -main () +main (void) { SSL_new() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lssl" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -9049,26 +10312,26 @@ if test "x$smart_lib" != "x"; then fi if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed linking to libssl. Use --with-openssl-lib-dir=<path>, or --with-openssl=no (builds without OpenSSL) See \`config.log' for more details" "$LINENO" 5; } else -$as_echo "#define HAVE_LIBSSL 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBSSL 1" >>confdefs.h OPENSSL_LIBS="$OPENSSL_LIBS $smart_lib" if test "$OPENSSL_LDFLAGS" != "$smart_ldflags"; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "\"inconsistent LDFLAGS between -lssl '$smart_ldflags' and -lcrypto '$OPENSSL_LDFLAGS'\" See \`config.log' for more details" "$LINENO" 5; } fi fi else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed linking to libcrypto. Use --with-openssl-lib-dir=<path>, or --with-openssl=no (builds without OpenSSL) See \`config.log' for more details" "$LINENO" 5; } fi @@ -9096,141 +10359,145 @@ done if test "x$_smart_try_dir" != "x"; then for try in $_smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5 -$as_echo_n "checking for openssl/ssl.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5 +printf %s "checking for openssl/ssl.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <openssl/ssl.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi if test "x$smart_include" = "x"; then for _prefix in $smart_prefix; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/openssl/ssl.h" >&5 -$as_echo_n "checking for ${_prefix}/openssl/ssl.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/openssl/ssl.h" >&5 +printf %s "checking for ${_prefix}/openssl/ssl.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <openssl/ssl.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem ${_prefix}/" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done fi if test "x$smart_include" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h" >&5 -$as_echo_n "checking for openssl/ssl.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h" >&5 +printf %s "checking for openssl/ssl.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <openssl/ssl.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include=" " - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x$smart_include" = "x"; then for try in $_smart_include_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5 -$as_echo_n "checking for openssl/ssl.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5 +printf %s "checking for openssl/ssl.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <openssl/ssl.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi @@ -9245,35 +10512,23 @@ smart_prefix= if test "x$ac_cv_header_openssl_ssl_h" = "xyes"; then -$as_echo "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h - - - for ac_header in \ - openssl/asn1.h \ - openssl/conf.h \ - openssl/crypto.h \ - openssl/err.h \ - openssl/evp.h \ - openssl/hmac.h \ - openssl/md5.h \ - openssl/md4.h \ - openssl/rand.h \ - openssl/sha.h \ - openssl/ssl.h \ - openssl/ocsp.h \ - openssl/engine.h +printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h + + + for ac_header in openssl/asn1.h openssl/conf.h openssl/crypto.h openssl/err.h openssl/evp.h openssl/hmac.h openssl/md5.h openssl/md4.h openssl/rand.h openssl/sha.h openssl/ssl.h openssl/ocsp.h openssl/engine.h do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF OPENSSL_CPPFLAGS="$smart_include" -else +else $as_nop - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed locating OpenSSL headers. Use --with-openssl-include-dir=<path>, or --with-openssl=no (builds without OpenSSL) See \`config.log' for more details" "$LINENO" 5; } @@ -9282,9 +10537,8 @@ fi done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL version >= 1.0.2" >&5 -$as_echo_n "checking for OpenSSL version >= 1.0.2... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL version >= 1.0.2" >&5 +printf %s "checking for OpenSSL version >= 1.0.2... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <openssl/crypto.h> @@ -9294,37 +10548,39 @@ $as_echo_n "checking for OpenSSL version >= 1.0.2... " >&6; } _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : + $EGREP "yes" >/dev/null 2>&1 +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "OpenSSL version too old See \`config.log' for more details" "$LINENO" 5; } fi -rm -f conftest* +rm -rf conftest* old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$OPENSSL_CPPFLAGS $CPPFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library and header version consistency" >&5 -$as_echo_n "checking OpenSSL library and header version consistency... " >&6; } - if test "$cross_compiling" = yes; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OpenSSL library and header version consistency" >&5 +printf %s "checking OpenSSL library and header version consistency... " >&6; } + if test "$cross_compiling" = yes +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling (assuming yes)" >&5 -$as_echo "cross-compiling (assuming yes)" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling (assuming yes)" >&5 +printf "%s\n" "cross-compiling (assuming yes)" >&6; } -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9333,7 +10589,7 @@ else #include <openssl/crypto.h> int -main () +main (void) { printf("library: %lx header: %lx... ", (unsigned long) SSLeay(), (unsigned long) OPENSSL_VERSION_NUMBER); @@ -9348,17 +10604,18 @@ main () return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "OpenSSL library version does not match header version See \`config.log' for more details" "$LINENO" 5; } @@ -9367,27 +10624,60 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - for ac_func in \ - SSL_get_client_random \ - SSL_get_server_random \ - SSL_SESSION_get_master_key \ - HMAC_CTX_new \ - HMAC_CTX_free \ - ASN1_STRING_get0_data \ - CONF_modules_load_file \ - CRYPTO_set_id_callback \ - CRYPTO_set_locking_callback + ac_fn_c_check_func "$LINENO" "SSL_get_client_random" "ac_cv_func_SSL_get_client_random" +if test "x$ac_cv_func_SSL_get_client_random" = xyes +then : + printf "%s\n" "#define HAVE_SSL_GET_CLIENT_RANDOM 1" >>confdefs.h -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "SSL_get_server_random" "ac_cv_func_SSL_get_server_random" +if test "x$ac_cv_func_SSL_get_server_random" = xyes +then : + printf "%s\n" "#define HAVE_SSL_GET_SERVER_RANDOM 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "SSL_SESSION_get_master_key" "ac_cv_func_SSL_SESSION_get_master_key" +if test "x$ac_cv_func_SSL_SESSION_get_master_key" = xyes +then : + printf "%s\n" "#define HAVE_SSL_SESSION_GET_MASTER_KEY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "HMAC_CTX_new" "ac_cv_func_HMAC_CTX_new" +if test "x$ac_cv_func_HMAC_CTX_new" = xyes +then : + printf "%s\n" "#define HAVE_HMAC_CTX_NEW 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "HMAC_CTX_free" "ac_cv_func_HMAC_CTX_free" +if test "x$ac_cv_func_HMAC_CTX_free" = xyes +then : + printf "%s\n" "#define HAVE_HMAC_CTX_FREE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "ASN1_STRING_get0_data" "ac_cv_func_ASN1_STRING_get0_data" +if test "x$ac_cv_func_ASN1_STRING_get0_data" = xyes +then : + printf "%s\n" "#define HAVE_ASN1_STRING_GET0_DATA 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "CONF_modules_load_file" "ac_cv_func_CONF_modules_load_file" +if test "x$ac_cv_func_CONF_modules_load_file" = xyes +then : + printf "%s\n" "#define HAVE_CONF_MODULES_LOAD_FILE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "CRYPTO_set_id_callback" "ac_cv_func_CRYPTO_set_id_callback" +if test "x$ac_cv_func_CRYPTO_set_id_callback" = xyes +then : + printf "%s\n" "#define HAVE_CRYPTO_SET_ID_CALLBACK 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "CRYPTO_set_locking_callback" "ac_cv_func_CRYPTO_set_locking_callback" +if test "x$ac_cv_func_CRYPTO_set_locking_callback" = xyes +then : + printf "%s\n" "#define HAVE_CRYPTO_SET_LOCKING_CALLBACK 1" >>confdefs.h fi -done CPPFLAGS="$old_CPPFLAGS" fi @@ -9400,8 +10690,8 @@ done fi if test "x$PCAP_LIBS" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for pcap.h." >&5 -$as_echo "$as_me: skipping test for pcap.h." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: skipping test for pcap.h." >&5 +printf "%s\n" "$as_me: skipping test for pcap.h." >&6;} else smart_try_dir="$pcap_include_dir" @@ -9426,141 +10716,145 @@ done if test "x$_smart_try_dir" != "x"; then for try in $_smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5 -$as_echo_n "checking for pcap.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5 +printf %s "checking for pcap.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <pcap.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi if test "x$smart_include" = "x"; then for _prefix in $smart_prefix; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcap.h" >&5 -$as_echo_n "checking for ${_prefix}/pcap.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcap.h" >&5 +printf %s "checking for ${_prefix}/pcap.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <pcap.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem ${_prefix}/" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done fi if test "x$smart_include" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h" >&5 -$as_echo_n "checking for pcap.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcap.h" >&5 +printf %s "checking for pcap.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <pcap.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include=" " - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x$smart_include" = "x"; then for try in $_smart_include_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5 -$as_echo_n "checking for pcap.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5 +printf %s "checking for pcap.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <pcap.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi @@ -9575,19 +10869,19 @@ smart_prefix= if test "x$ac_cv_header_pcap_h" = "xyes" && test "x$ac_cv_lib_pcap_pcap_open_live" = "xyes"; then -$as_echo "#define HAVE_LIBPCAP 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBPCAP 1" >>confdefs.h else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pcap headers not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-include-dir=<path>." >&5 -$as_echo "$as_me: WARNING: pcap headers not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-include-dir=<path>." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: pcap headers not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-include-dir=<path>." >&5 +printf "%s\n" "$as_me: WARNING: pcap headers not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-include-dir=<path>." >&2;} fi fi if test "x$COLLECTDC_LIBS" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for collectd/client.h." >&5 -$as_echo "$as_me: skipping test for collectd/client.h." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: skipping test for collectd/client.h." >&5 +printf "%s\n" "$as_me: skipping test for collectd/client.h." >&6;} else smart_try_dir="$collectdclient_include_dir" @@ -9612,141 +10906,145 @@ done if test "x$_smart_try_dir" != "x"; then for try in $_smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5 -$as_echo_n "checking for collectd/client.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5 +printf %s "checking for collectd/client.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <collectd/client.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi if test "x$smart_include" = "x"; then for _prefix in $smart_prefix; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/collectd/client.h" >&5 -$as_echo_n "checking for ${_prefix}/collectd/client.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/collectd/client.h" >&5 +printf %s "checking for ${_prefix}/collectd/client.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <collectd/client.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem ${_prefix}/" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done fi if test "x$smart_include" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h" >&5 -$as_echo_n "checking for collectd/client.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h" >&5 +printf %s "checking for collectd/client.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <collectd/client.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include=" " - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x$smart_include" = "x"; then for try in $_smart_include_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5 -$as_echo_n "checking for collectd/client.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5 +printf %s "checking for collectd/client.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <collectd/client.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi @@ -9761,19 +11059,19 @@ smart_prefix= if test "x$ac_cv_header_collectd_client_h" = "xyes"; then -$as_echo "#define HAVE_COLLECTDC_H 1" >>confdefs.h +printf "%s\n" "#define HAVE_COLLECTDC_H 1" >>confdefs.h else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: collectdclient headers not found. Use --with-collectdclient-include-dir=<path>." >&5 -$as_echo "$as_me: WARNING: collectdclient headers not found. Use --with-collectdclient-include-dir=<path>." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: collectdclient headers not found. Use --with-collectdclient-include-dir=<path>." >&5 +printf "%s\n" "$as_me: WARNING: collectdclient headers not found. Use --with-collectdclient-include-dir=<path>." >&2;} fi fi if test "x$HAVE_LIBCAP" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: skipping test for cap.h." >&5 -$as_echo "$as_me: skipping test for cap.h." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: skipping test for cap.h." >&5 +printf "%s\n" "$as_me: skipping test for cap.h." >&6;} else smart_try_dir="$cap_include_dir" @@ -9798,141 +11096,145 @@ done if test "x$_smart_try_dir" != "x"; then for try in $_smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h in $try" >&5 -$as_echo_n "checking for sys/capability.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h in $try" >&5 +printf %s "checking for sys/capability.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/capability.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi if test "x$smart_include" = "x"; then for _prefix in $smart_prefix; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/sys/capability.h" >&5 -$as_echo_n "checking for ${_prefix}/sys/capability.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/sys/capability.h" >&5 +printf %s "checking for ${_prefix}/sys/capability.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/capability.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem ${_prefix}/" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done fi if test "x$smart_include" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h" >&5 -$as_echo_n "checking for sys/capability.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h" >&5 +printf %s "checking for sys/capability.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/capability.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include=" " - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x$smart_include" = "x"; then for try in $_smart_include_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h in $try" >&5 -$as_echo_n "checking for sys/capability.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/capability.h in $try" >&5 +printf %s "checking for sys/capability.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/capability.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi @@ -9947,85 +11249,112 @@ smart_prefix= if test "x$ac_cv_header_sys_capability_h" = "xyes"; then -$as_echo "#define HAVE_CAPABILITY_H 1" >>confdefs.h +printf "%s\n" "#define HAVE_CAPABILITY_H 1" >>confdefs.h else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cap headers not found, will not perform debugger checks. Use --with-cap-include-dir=<path>." >&5 -$as_echo "$as_me: WARNING: cap headers not found, will not perform debugger checks. Use --with-cap-include-dir=<path>." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cap headers not found, will not perform debugger checks. Use --with-cap-include-dir=<path>." >&5 +printf "%s\n" "$as_me: WARNING: cap headers not found, will not perform debugger checks. Use --with-cap-include-dir=<path>." >&2;} fi fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = xyes; then : +if test "x$ac_cv_type_off_t" = xyes +then : -else +else $as_nop -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF +printf "%s\n" "#define off_t long int" >>confdefs.h fi -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = xyes; then : -else + ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default +" +if test "x$ac_cv_type_pid_t" = xyes +then : + +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #if defined _WIN64 && !defined __CYGWIN__ + LLP64 + #endif + +int +main (void) +{ + + ; + return 0; +} -cat >>confdefs.h <<_ACEOF -#define pid_t int _ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_pid_type='int' +else $as_nop + ac_pid_type='__int64' +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h + fi + ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : +if test "x$ac_cv_type_size_t" = xyes +then : -else +else $as_nop -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF +printf "%s\n" "#define size_t unsigned int" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 -$as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if ${ac_cv_type_uid_t+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +printf %s "checking for uid_t in sys/types.h... " >&6; } +if test ${ac_cv_type_uid_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then : + $EGREP "uid_t" >/dev/null 2>&1 +then : ac_cv_type_uid_t=yes -else +else $as_nop ac_cv_type_uid_t=no fi -rm -f conftest* +rm -rf conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 -$as_echo "$ac_cv_type_uid_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +printf "%s\n" "$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then -$as_echo "#define uid_t int" >>confdefs.h +printf "%s\n" "#define uid_t int" >>confdefs.h -$as_echo "#define gid_t int" >>confdefs.h +printf "%s\n" "#define gid_t int" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 -$as_echo_n "checking for socklen_t... " >&6; } -if ${ac_cv_type_socklen_t+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 +printf %s "checking for socklen_t... " >&6; } +if test ${ac_cv_type_socklen_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_type_socklen_t=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10038,36 +11367,38 @@ else #endif int -main () +main (void) { socklen_t foo ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_type_socklen_t=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_socklen_t" >&5 -$as_echo "$ac_cv_type_socklen_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_socklen_t" >&5 +printf "%s\n" "$ac_cv_type_socklen_t" >&6; } if test "$ac_cv_type_socklen_t" != "yes"; then -$as_echo "#define socklen_t int" >>confdefs.h +printf "%s\n" "#define socklen_t int" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint8_t" >&5 -$as_echo_n "checking for uint8_t... " >&6; } -if ${ac_cv_type_uint8_t+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint8_t" >&5 +printf %s "checking for uint8_t... " >&6; } +if test ${ac_cv_type_uint8_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_type_uint8_t=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10080,36 +11411,38 @@ else #endif int -main () +main (void) { uint8_t foo ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_type_uint8_t=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint8_t" >&5 -$as_echo "$ac_cv_type_uint8_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint8_t" >&5 +printf "%s\n" "$ac_cv_type_uint8_t" >&6; } if test "$ac_cv_type_uint8_t" != "yes"; then -$as_echo "#define uint8_t unsigned char" >>confdefs.h +printf "%s\n" "#define uint8_t unsigned char" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint16_t" >&5 -$as_echo_n "checking for uint16_t... " >&6; } -if ${ac_cv_type_uint16_t+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint16_t" >&5 +printf %s "checking for uint16_t... " >&6; } +if test ${ac_cv_type_uint16_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_type_uint16_t=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10122,36 +11455,38 @@ else #endif int -main () +main (void) { uint16_t foo ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_type_uint16_t=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint16_t" >&5 -$as_echo "$ac_cv_type_uint16_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint16_t" >&5 +printf "%s\n" "$ac_cv_type_uint16_t" >&6; } if test "$ac_cv_type_uint16_t" != "yes"; then -$as_echo "#define uint16_t unsigned short" >>confdefs.h +printf "%s\n" "#define uint16_t unsigned short" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint32_t" >&5 -$as_echo_n "checking for uint32_t... " >&6; } -if ${ac_cv_type_uint32_t+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint32_t" >&5 +printf %s "checking for uint32_t... " >&6; } +if test ${ac_cv_type_uint32_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_type_uint32_t=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10164,36 +11499,38 @@ else #endif int -main () +main (void) { uint32_t foo ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_type_uint32_t=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint32_t" >&5 -$as_echo "$ac_cv_type_uint32_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint32_t" >&5 +printf "%s\n" "$ac_cv_type_uint32_t" >&6; } if test "$ac_cv_type_uint32_t" != "yes"; then -$as_echo "#define uint32_t unsigned int" >>confdefs.h +printf "%s\n" "#define uint32_t unsigned int" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint64_t" >&5 -$as_echo_n "checking for uint64_t... " >&6; } -if ${ac_cv_type_uint64_t+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint64_t" >&5 +printf %s "checking for uint64_t... " >&6; } +if test ${ac_cv_type_uint64_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_type_uint64_t=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10206,34 +11543,36 @@ else #endif int -main () +main (void) { uint64_t foo ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_type_uint64_t=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint64_t" >&5 -$as_echo "$ac_cv_type_uint64_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uint64_t" >&5 +printf "%s\n" "$ac_cv_type_uint64_t" >&6; } if test "$ac_cv_type_uint64_t" != "yes"; then -$as_echo "#define uint64_t unsigned long long" >>confdefs.h +printf "%s\n" "#define uint64_t unsigned long long" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default" -if test "x$ac_cv_type___uint128_t" = xyes; then : +if test "x$ac_cv_type___uint128_t" = xyes +then : -$as_echo "#define HAVE___UINT128_T 1" >>confdefs.h +printf "%s\n" "#define HAVE___UINT128_T 1" >>confdefs.h fi @@ -10249,9 +11588,10 @@ ac_fn_c_check_type "$LINENO" "uint128_t" "ac_cv_type_uint128_t" " " -if test "x$ac_cv_type_uint128_t" = xyes; then : +if test "x$ac_cv_type_uint128_t" = xyes +then : -$as_echo "#define HAVE_UINT128_T 1" >>confdefs.h +printf "%s\n" "#define HAVE_UINT128_T 1" >>confdefs.h fi @@ -10263,9 +11603,10 @@ ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" " " -if test "x$ac_cv_type_struct_in6_addr" = xyes; then : +if test "x$ac_cv_type_struct_in6_addr" = xyes +then : -$as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h +printf "%s\n" "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h fi @@ -10280,9 +11621,10 @@ ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockad #endif " -if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : +if test "x$ac_cv_type_struct_sockaddr_storage" = xyes +then : -$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h +printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h fi @@ -10293,9 +11635,10 @@ ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_i #endif " -if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then : +if test "x$ac_cv_type_struct_sockaddr_in6" = xyes +then : -$as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h +printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h fi @@ -10315,15 +11658,16 @@ ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" " " -if test "x$ac_cv_type_struct_addrinfo" = xyes; then : +if test "x$ac_cv_type_struct_addrinfo" = xyes +then : -$as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h +printf "%s\n" "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sig_t is defined" >&5 -$as_echo_n "checking if sig_t is defined... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sig_t is defined" >&5 +printf %s "checking if sig_t is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10332,7 +11676,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif int -main () +main (void) { sig_t func; @@ -10343,86 +11687,295 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -$as_echo "#define HAVE_SIG_T 1" >>confdefs.h +printf "%s\n" "#define HAVE_SIG_T 1" >>confdefs.h -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -for ac_func in \ - bindat \ - clock_gettime \ - closefrom \ - ctime_r \ - dladdr \ - fcntl \ - fopencookie \ - funopen \ - getaddrinfo \ - getnameinfo \ - getopt_long \ - getpeereid \ - getresuid \ - gettimeofday \ - getusershell \ - gmtime_r \ - if_indextoname \ - inet_aton \ - inet_ntop \ - inet_pton \ - initgroups \ - kqueue \ - localtime_r \ - mallopt \ - mkdirat \ - openat \ - pthread_sigmask \ - setlinebuf \ - setresuid \ - setsid \ - setuid \ - setvbuf \ - sigaction \ - sigprocmask \ - snprintf \ - strcasecmp \ - strlcat \ - strlcpy \ - strncasecmp \ - strsep \ - strsignal \ - unlinkat \ - vdprintf \ - vsnprintf +ac_fn_c_check_func "$LINENO" "bindat" "ac_cv_func_bindat" +if test "x$ac_cv_func_bindat" = xyes +then : + printf "%s\n" "#define HAVE_BINDAT 1" >>confdefs.h -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" +if test "x$ac_cv_func_clock_gettime" = xyes +then : + printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "closefrom" "ac_cv_func_closefrom" +if test "x$ac_cv_func_closefrom" = xyes +then : + printf "%s\n" "#define HAVE_CLOSEFROM 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r" +if test "x$ac_cv_func_ctime_r" = xyes +then : + printf "%s\n" "#define HAVE_CTIME_R 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr" +if test "x$ac_cv_func_dladdr" = xyes +then : + printf "%s\n" "#define HAVE_DLADDR 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" +if test "x$ac_cv_func_fcntl" = xyes +then : + printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "fopencookie" "ac_cv_func_fopencookie" +if test "x$ac_cv_func_fopencookie" = xyes +then : + printf "%s\n" "#define HAVE_FOPENCOOKIE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "funopen" "ac_cv_func_funopen" +if test "x$ac_cv_func_funopen" = xyes +then : + printf "%s\n" "#define HAVE_FUNOPEN 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" +if test "x$ac_cv_func_getaddrinfo" = xyes +then : + printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" +if test "x$ac_cv_func_getnameinfo" = xyes +then : + printf "%s\n" "#define HAVE_GETNAMEINFO 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" +if test "x$ac_cv_func_getopt_long" = xyes +then : + printf "%s\n" "#define HAVE_GETOPT_LONG 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid" +if test "x$ac_cv_func_getpeereid" = xyes +then : + printf "%s\n" "#define HAVE_GETPEEREID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getresuid" "ac_cv_func_getresuid" +if test "x$ac_cv_func_getresuid" = xyes +then : + printf "%s\n" "#define HAVE_GETRESUID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +if test "x$ac_cv_func_gettimeofday" = xyes +then : + printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "getusershell" "ac_cv_func_getusershell" +if test "x$ac_cv_func_getusershell" = xyes +then : + printf "%s\n" "#define HAVE_GETUSERSHELL 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r" +if test "x$ac_cv_func_gmtime_r" = xyes +then : + printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "if_indextoname" "ac_cv_func_if_indextoname" +if test "x$ac_cv_func_if_indextoname" = xyes +then : + printf "%s\n" "#define HAVE_IF_INDEXTONAME 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton" +if test "x$ac_cv_func_inet_aton" = xyes +then : + printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" +if test "x$ac_cv_func_inet_ntop" = xyes +then : + printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton" +if test "x$ac_cv_func_inet_pton" = xyes +then : + printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups" +if test "x$ac_cv_func_initgroups" = xyes +then : + printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue" +if test "x$ac_cv_func_kqueue" = xyes +then : + printf "%s\n" "#define HAVE_KQUEUE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r" +if test "x$ac_cv_func_localtime_r" = xyes +then : + printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "mallopt" "ac_cv_func_mallopt" +if test "x$ac_cv_func_mallopt" = xyes +then : + printf "%s\n" "#define HAVE_MALLOPT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "mkdirat" "ac_cv_func_mkdirat" +if test "x$ac_cv_func_mkdirat" = xyes +then : + printf "%s\n" "#define HAVE_MKDIRAT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "openat" "ac_cv_func_openat" +if test "x$ac_cv_func_openat" = xyes +then : + printf "%s\n" "#define HAVE_OPENAT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask" +if test "x$ac_cv_func_pthread_sigmask" = xyes +then : + printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf" +if test "x$ac_cv_func_setlinebuf" = xyes +then : + printf "%s\n" "#define HAVE_SETLINEBUF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid" +if test "x$ac_cv_func_setresuid" = xyes +then : + printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid" +if test "x$ac_cv_func_setsid" = xyes +then : + printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setuid" "ac_cv_func_setuid" +if test "x$ac_cv_func_setuid" = xyes +then : + printf "%s\n" "#define HAVE_SETUID 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf" +if test "x$ac_cv_func_setvbuf" = xyes +then : + printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction" +if test "x$ac_cv_func_sigaction" = xyes +then : + printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" +if test "x$ac_cv_func_sigprocmask" = xyes +then : + printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" +if test "x$ac_cv_func_snprintf" = xyes +then : + printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes +then : + printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" +if test "x$ac_cv_func_strlcat" = xyes +then : + printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" +if test "x$ac_cv_func_strlcpy" = xyes +then : + printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" +if test "x$ac_cv_func_strncasecmp" = xyes +then : + printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep" +if test "x$ac_cv_func_strsep" = xyes +then : + printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal" +if test "x$ac_cv_func_strsignal" = xyes +then : + printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "unlinkat" "ac_cv_func_unlinkat" +if test "x$ac_cv_func_unlinkat" = xyes +then : + printf "%s\n" "#define HAVE_UNLINKAT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "vdprintf" "ac_cv_func_vdprintf" +if test "x$ac_cv_func_vdprintf" = xyes +then : + printf "%s\n" "#define HAVE_VDPRINTF 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" +if test "x$ac_cv_func_vsnprintf" = xyes +then : + printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h fi -done if test "x$ac_cv_header_utmpx_h" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_xtime in struct utmpx" >&5 -$as_echo_n "checking for ut_xtime in struct utmpx... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ut_xtime in struct utmpx" >&5 +printf %s "checking for ut_xtime in struct utmpx... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10437,41 +11990,42 @@ $as_echo_n "checking for ut_xtime in struct utmpx... " >&6; } #endif int -main () +main (void) { int foo = offsetof(struct utmpx, ut_xtime) ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : has_element=" " -else +else $as_nop has_element= fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_safe_type=`echo "struct utmpx" | sed 'y% %_%'` if test "x$has_element" != "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } eval "ac_cv_type_${ac_safe_type}_has_ut_xtime=yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } eval "ac_cv_type_${ac_safe_type}_has_ut_xtime=" fi if test "x$ac_cv_type_struct_utmpx_has_ut_xtime" = "x"; then -$as_echo "#define ut_xtime ut_tv.tv_sec" >>confdefs.h +printf "%s\n" "#define ut_xtime ut_tv.tv_sec" >>confdefs.h fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipi_addr in struct in_pktinfo" >&5 -$as_echo_n "checking for ipi_addr in struct in_pktinfo... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ipi_addr in struct in_pktinfo" >&5 +printf %s "checking for ipi_addr in struct in_pktinfo... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10486,40 +12040,41 @@ $as_echo_n "checking for ipi_addr in struct in_pktinfo... " >&6; } #endif int -main () +main (void) { int foo = offsetof(struct in_pktinfo, ipi_addr) ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : has_element=" " -else +else $as_nop has_element= fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_safe_type=`echo "struct in_pktinfo" | sed 'y% %_%'` if test "x$has_element" != "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } eval "ac_cv_type_${ac_safe_type}_has_ipi_addr=yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } eval "ac_cv_type_${ac_safe_type}_has_ipi_addr=" fi if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"; then -$as_echo "#define HAVE_IP_PKTINFO /**/" >>confdefs.h +printf "%s\n" "#define HAVE_IP_PKTINFO /**/" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipi6_addr in struct in6_pktinfo" >&5 -$as_echo_n "checking for ipi6_addr in struct in6_pktinfo... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ipi6_addr in struct in6_pktinfo" >&5 +printf %s "checking for ipi6_addr in struct in6_pktinfo... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10534,39 +12089,40 @@ $as_echo_n "checking for ipi6_addr in struct in6_pktinfo... " >&6; } #endif int -main () +main (void) { int foo = offsetof(struct in6_pktinfo, ipi6_addr) ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : has_element=" " -else +else $as_nop has_element= fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_safe_type=`echo "struct in6_pktinfo" | sed 'y% %_%'` if test "x$has_element" != "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } eval "ac_cv_type_${ac_safe_type}_has_ipi6_addr=yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } eval "ac_cv_type_${ac_safe_type}_has_ipi6_addr=" fi if test "x$ac_cv_type_struct_in6_pktinfo_has_ipi6_addr" = "xyes"; then -$as_echo "#define HAVE_IN6_PKTINFO /**/" >>confdefs.h +printf "%s\n" "#define HAVE_IN6_PKTINFO /**/" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if htonll is defined" >&5 -$as_echo_n "checking if htonll is defined... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if htonll is defined" >&5 +printf %s "checking if htonll is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10574,7 +12130,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include <netinet/in.h> int -main () +main (void) { return htonll(0); @@ -10584,26 +12140,27 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -$as_echo "#define HAVE_HTONLL 1" >>confdefs.h +printf "%s\n" "#define HAVE_HTONLL 1" >>confdefs.h -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if htonlll is defined" >&5 -$as_echo_n "checking if htonlll is defined... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if htonlll is defined" >&5 +printf %s "checking if htonlll is defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10611,7 +12168,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include <netinet/in.h> int -main () +main (void) { return htonlll(0); @@ -10621,35 +12178,37 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -$as_echo "#define HAVE_HTONLLL 1" >>confdefs.h +printf "%s\n" "#define HAVE_HTONLLL 1" >>confdefs.h -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +printf %s "checking for an ANSI C-conforming const... " >&6; } +if test ${ac_cv_c_const+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __cplusplus @@ -10662,7 +12221,7 @@ main () /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. + /* IBM XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -10690,7 +12249,7 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; @@ -10706,27 +12265,28 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_const=yes -else +else $as_nop ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -$as_echo "#define const /**/" >>confdefs.h +printf "%s\n" "#define const /**/" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of OS" >&5 -$as_echo_n "checking type of OS... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of OS" >&5 +printf %s "checking type of OS... " >&6; } OS=`uname -s` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OS" >&5 -$as_echo "$OS" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OS" >&5 +printf "%s\n" "$OS" >&6; } if test "$OS" = "OS/2"; then LIBPREFIX= else @@ -10735,15 +12295,16 @@ fi if test "x$developer" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Setting additional developer CFLAGS" >&5 -$as_echo "$as_me: Setting additional developer CFLAGS" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Setting additional developer CFLAGS" >&5 +printf "%s\n" "$as_me: Setting additional developer CFLAGS" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Wdocumentation\"" >&5 -$as_echo_n "checking for the compiler flag \"-Wdocumentation\"... " >&6; } -if ${ax_cv_cc_wdocumentation_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Wdocumentation\"" >&5 +printf %s "checking for the compiler flag \"-Wdocumentation\"... " >&6; } +if test ${ax_cv_cc_wdocumentation_flag+y} +then : + printf %s "(cached) " >&6 +else $as_nop CFLAGS_SAVED=$CFLAGS @@ -10759,19 +12320,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int -main () +main (void) { return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ax_cv_cc_wdocumentation_flag="yes" -else +else $as_nop ax_cv_cc_wdocumentation_flag="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -10782,26 +12344,27 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$CFLAGS_SAVED" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_wdocumentation_flag" >&5 -$as_echo "$ax_cv_cc_wdocumentation_flag" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_wdocumentation_flag" >&5 +printf "%s\n" "$ax_cv_cc_wdocumentation_flag" >&6; } if test "x$ax_cv_cc_wdocumentation_flag" = "xyes"; then devcflags="-Wdocumentation" -$as_echo "#define HAVE_WDOCUMENTATION 1" >>confdefs.h +printf "%s\n" "#define HAVE_WDOCUMENTATION 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Weverything\"" >&5 -$as_echo_n "checking for the compiler flag \"-Weverything\"... " >&6; } -if ${ax_cv_cc_weverything_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Weverything\"" >&5 +printf %s "checking for the compiler flag \"-Weverything\"... " >&6; } +if test ${ax_cv_cc_weverything_flag+y} +then : + printf %s "(cached) " >&6 +else $as_nop CFLAGS_SAVED=$CFLAGS - CFLAGS="$CFLAGS -Werror -Weverything -Wno-unused-macros -Wno-unreachable-code-return" + CFLAGS="$CFLAGS -Werror -Weverything -Wno-reserved-id-macro -Wno-unused-macros -Wno-unreachable-code-return -Wno-poison-system-directories" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -10813,19 +12376,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* end confdefs.h. */ int -main () +main (void) { return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ax_cv_cc_weverything_flag="yes" -else +else $as_nop ax_cv_cc_weverything_flag="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -10836,8 +12400,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$CFLAGS_SAVED" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_weverything_flag" >&5 -$as_echo "$ax_cv_cc_weverything_flag" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_weverything_flag" >&5 +printf "%s\n" "$ax_cv_cc_weverything_flag" >&6; } if test "x$ax_cv_cc_weverything_flag" = "xyes"; then devcflags="$devcflags -W -Weverything -Wformat=2 -Wno-missing-field-initializers -Wno-date-time -Wno-padded -Wno-gnu-zero-variadic-macro-arguments -Wno-shorten-64-to-32 -Wno-sign-conversion -Wno-conversion -Wno-switch-enum -Wno-gnu-statement-expression -Wno-extended-offsetof -Wno-cast-align -Wno-documentation-unknown-command -Wno-covered-switch-default -Wno-packed $verify_ptr $fips" @@ -10857,23 +12421,66 @@ $as_echo "$ax_cv_cc_weverything_flag" >&6; } if test "x$address_sanitizer" = "xyes"; then devcflags="$devcflags -fno-omit-frame-pointer -fno-optimize-sibling-calls" - AX_CC_SANITZE_ADDRESS_USE_AFTER_SCOPE_FLAG + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-fsanitize-address-use-after-scope\"" >&5 +printf %s "checking for the compiler flag \"-fsanitize-address-use-after-scope\"... " >&6; } +if test ${ax_cv_cc_sanitize_address_use_after_scope+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + + CFLAGS_SAVED=$CFLAGS + CFLAGS="$CFLAGS -Werror -fsanitize=address -fsanitize-address-use-after-scope" + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ax_cv_cc_sanitize_address_use_after_scope="yes" +else $as_nop + ax_cv_cc_sanitize_address_use_after_scope="no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + CFLAGS="$CFLAGS_SAVED" + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_sanitize_address_use_after_scope" >&5 +printf "%s\n" "$ax_cv_cc_sanitize_address_use_after_scope" >&6; } + if test "x$ax_cv_cc_sanitize_address_use_after_scope" = "xyes"; then devcflags="$devcflags -fsanitize-address-use-after-scope" fi - for ac_header in sanitizer/lsan_interface.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sanitizer/lsan_interface.h" "ac_cv_header_sanitizer_lsan_interface_h" "$ac_includes_default" -if test "x$ac_cv_header_sanitizer_lsan_interface_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SANITIZER_LSAN_INTERFACE_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "sanitizer/lsan_interface.h" "ac_cv_header_sanitizer_lsan_interface_h" "$ac_includes_default" +if test "x$ac_cv_header_sanitizer_lsan_interface_h" = xyes +then : + printf "%s\n" "#define HAVE_SANITIZER_LSAN_INTERFACE_H 1" >>confdefs.h fi -done - fsanitizeflags="$fsanitizeflags,address" fi @@ -10900,14 +12507,14 @@ done devcflags="$(echo $devcflags | sed -e 's/\\t//g;s/ //g')" devldflags="$(echo $devldflags | sed -e 's/\\t//g;s/ //g')" - { $as_echo "$as_me:${as_lineno-$LINENO}: Developer CFLAGS are \"$devcflags\"" >&5 -$as_echo "$as_me: Developer CFLAGS are \"$devcflags\"" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Developer LDFLAGS are \"$devldflags\"" >&5 -$as_echo "$as_me: Developer LDFLAGS are \"$devldflags\"" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Developer CFLAGS are \"$devcflags\"" >&5 +printf "%s\n" "$as_me: Developer CFLAGS are \"$devcflags\"" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Developer LDFLAGS are \"$devldflags\"" >&5 +printf "%s\n" "$as_me: Developer LDFLAGS are \"$devldflags\"" >&6;} if test "x$EXPERIMENTAL" != "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&5 -$as_echo "$as_me: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&5 +printf "%s\n" "$as_me: is developer build, enabling experimental modules implicitly, disable with --without-experimental-modules" >&6;} EXPERIMENTAL=yes fi else @@ -10917,17 +12524,17 @@ else INSTALLSTRIP="" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if building with -DNDEBUG" >&5 -$as_echo_n "checking if building with -DNDEBUG... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if building with -DNDEBUG" >&5 +printf %s "checking if building with -DNDEBUG... " >&6; } if echo "$CFLAGS" | grep '\-DNDEBUG' > /dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -$as_echo "#define WITH_NDEBUG 1" >>confdefs.h +printf "%s\n" "#define WITH_NDEBUG 1" >>confdefs.h else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi export EXPERIMENTAL @@ -10935,18 +12542,17 @@ export EXPERIMENTAL if test -d $srcdir/.git -a "x$GIT" = "xyes"; then RADIUSD_VERSION_COMMIT=`git log --pretty=format:'%h' -n 1 | cut -c1-9` -cat >>confdefs.h <<_ACEOF -#define RADIUSD_VERSION_COMMIT ${RADIUSD_VERSION_COMMIT} -_ACEOF +printf "%s\n" "#define RADIUSD_VERSION_COMMIT ${RADIUSD_VERSION_COMMIT}" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support in compiler" >&5 -$as_echo_n "checking for __thread support in compiler... " >&6; } - if test "$cross_compiling" = yes; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __thread support in compiler" >&5 +printf %s "checking for __thread support in compiler... " >&6; } + if test "$cross_compiling" = yes +then : have_tls=no -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10958,29 +12564,31 @@ else _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : have_tls=yes -else +else $as_nop have_tls=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5 -$as_echo "$have_tls" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5 +printf "%s\n" "$have_tls" >&6; } if test "x$have_tls" = "xyes"; then -$as_echo "#define TLS_STORAGE_CLASS __thread" >>confdefs.h +printf "%s\n" "#define TLS_STORAGE_CLASS __thread" >>confdefs.h fi if test "x$have_tls" = "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __declspec(thread) support in compiler" >&5 -$as_echo_n "checking for __declspec(thread) support in compiler... " >&6; } - if test "$cross_compiling" = yes; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __declspec(thread) support in compiler" >&5 +printf %s "checking for __declspec(thread) support in compiler... " >&6; } + if test "$cross_compiling" = yes +then : have_tls=no -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10992,29 +12600,31 @@ else _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : have_tls=yes -else +else $as_nop have_tls=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5 -$as_echo "$have_tls" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5 +printf "%s\n" "$have_tls" >&6; } if test "x$have_tls" = "xyes"; then -$as_echo "#define TLS_STORAGE_CLASS __declspec(thread)" >>confdefs.h +printf "%s\n" "#define TLS_STORAGE_CLASS __declspec(thread)" >>confdefs.h fi fi if test "x$have_tls" = "xno"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Thread_local support in compiler" >&5 -$as_echo_n "checking for _Thread_local support in compiler... " >&6; } - if test "$cross_compiling" = yes; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _Thread_local support in compiler" >&5 +printf %s "checking for _Thread_local support in compiler... " >&6; } + if test "$cross_compiling" = yes +then : have_tls=no -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11026,37 +12636,40 @@ else _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : have_tls=yes -else +else $as_nop have_tls=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5 -$as_echo "$have_tls" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_tls" >&5 +printf "%s\n" "$have_tls" >&6; } if test "x$have_tls" = "xyes"; then -$as_echo "#define TLS_STORAGE_CLASS _Thread_local" >>confdefs.h +printf "%s\n" "#define TLS_STORAGE_CLASS _Thread_local" >>confdefs.h fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_choose_expr support in compiler" >&5 -$as_echo_n "checking for __builtin_choose_expr support in compiler... " >&6; } -if ${ax_cv_cc_builtin_choose_expr+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_choose_expr support in compiler" >&5 +printf %s "checking for __builtin_choose_expr support in compiler... " >&6; } +if test ${ax_cv_cc_builtin_choose_expr+y} +then : + printf %s "(cached) " >&6 +else $as_nop - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "$cross_compiling" = yes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11068,9 +12681,10 @@ else _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ax_cv_cc_builtin_choose_expr=yes -else +else $as_nop ax_cv_cc_builtin_choose_expr=no fi @@ -11080,27 +12694,29 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_builtin_choose_expr" >&5 -$as_echo "$ax_cv_cc_builtin_choose_expr" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_builtin_choose_expr" >&5 +printf "%s\n" "$ax_cv_cc_builtin_choose_expr" >&6; } if test "x$ax_cv_cc_builtin_choose_expr" = "xyes"; then -$as_echo "#define HAVE_BUILTIN_CHOOSE_EXPR 1" >>confdefs.h +printf "%s\n" "#define HAVE_BUILTIN_CHOOSE_EXPR 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p support in compiler" >&5 -$as_echo_n "checking for __builtin_types_compatible_p support in compiler... " >&6; } -if ${ax_cv_cc_builtin_types_compatible_p+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p support in compiler" >&5 +printf %s "checking for __builtin_types_compatible_p support in compiler... " >&6; } +if test ${ax_cv_cc_builtin_types_compatible_p+y} +then : + printf %s "(cached) " >&6 +else $as_nop - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "$cross_compiling" = yes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11112,9 +12728,10 @@ else _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ax_cv_cc_builtin_types_compatible_p=yes -else +else $as_nop ax_cv_cc_builtin_types_compatible_p=no fi @@ -11124,27 +12741,29 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_builtin_types_compatible_p" >&5 -$as_echo "$ax_cv_cc_builtin_types_compatible_p" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_builtin_types_compatible_p" >&5 +printf "%s\n" "$ax_cv_cc_builtin_types_compatible_p" >&6; } if test "x$ax_cv_cc_builtin_types_compatible_p" = "xyes"; then -$as_echo "#define HAVE_BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h +printf "%s\n" "#define HAVE_BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64 support in compiler" >&5 -$as_echo_n "checking for __builtin_bswap64 support in compiler... " >&6; } -if ${ax_cv_cc_builtin_bswap64+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64 support in compiler" >&5 +printf %s "checking for __builtin_bswap64 support in compiler... " >&6; } +if test ${ax_cv_cc_builtin_bswap64+y} +then : + printf %s "(cached) " >&6 +else $as_nop - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "$cross_compiling" = yes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11156,9 +12775,10 @@ else _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ax_cv_cc_builtin_bswap64=yes -else +else $as_nop ax_cv_cc_builtin_bswap64=no fi @@ -11168,29 +12788,31 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_builtin_bswap64" >&5 -$as_echo "$ax_cv_cc_builtin_bswap64" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_builtin_bswap64" >&5 +printf "%s\n" "$ax_cv_cc_builtin_bswap64" >&6; } if test "x$ax_cv_cc_builtin_bswap64" = "xyes"; then -$as_echo "#define HAVE_BUILTIN_BSWAP_64 1" >>confdefs.h +printf "%s\n" "#define HAVE_BUILTIN_BSWAP_64 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__bounded__)) support in compiler" >&5 -$as_echo_n "checking for __attribute__((__bounded__)) support in compiler... " >&6; } -if ${ax_cv_cc_bounded_attribute+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__bounded__)) support in compiler" >&5 +printf %s "checking for __attribute__((__bounded__)) support in compiler... " >&6; } +if test ${ax_cv_cc_bounded_attribute+y} +then : + printf %s "(cached) " >&6 +else $as_nop CFLAGS_SAVED=$CFLAGS CFLAGS="$CFLAGS -Werror" - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "$cross_compiling" = yes +then : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11203,9 +12825,10 @@ else _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ax_cv_cc_bounded_attribute=yes -else +else $as_nop ax_cv_cc_bounded_attribute=no fi @@ -11216,21 +12839,22 @@ fi CFLAGS="$CFLAGS_SAVED" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_bounded_attribute" >&5 -$as_echo "$ax_cv_cc_bounded_attribute" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_bounded_attribute" >&5 +printf "%s\n" "$ax_cv_cc_bounded_attribute" >&6; } if test "x$ax_cv_cc_bounded_attribute" = "xyes"; then -$as_echo "#define HAVE_ATTRIBUTE_BOUNDED 1" >>confdefs.h +printf "%s\n" "#define HAVE_ATTRIBUTE_BOUNDED 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc_set_memlimit in -ltalloc" >&5 -$as_echo_n "checking for talloc_set_memlimit in -ltalloc... " >&6; } -if ${ac_cv_lib_talloc_talloc_set_memlimit+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for talloc_set_memlimit in -ltalloc" >&5 +printf %s "checking for talloc_set_memlimit in -ltalloc... " >&6; } +if test ${ac_cv_lib_talloc_talloc_set_memlimit+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ltalloc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11239,44 +12863,44 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char talloc_set_memlimit (); int -main () +main (void) { return talloc_set_memlimit (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_talloc_talloc_set_memlimit=yes -else +else $as_nop ac_cv_lib_talloc_talloc_set_memlimit=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_talloc_talloc_set_memlimit" >&5 -$as_echo "$ac_cv_lib_talloc_talloc_set_memlimit" >&6; } -if test "x$ac_cv_lib_talloc_talloc_set_memlimit" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_talloc_talloc_set_memlimit" >&5 +printf "%s\n" "$ac_cv_lib_talloc_talloc_set_memlimit" >&6; } +if test "x$ac_cv_lib_talloc_talloc_set_memlimit" = xyes +then : -$as_echo "#define HAVE_TALLOC_SET_MEMLIMIT 1" >>confdefs.h +printf "%s\n" "#define HAVE_TALLOC_SET_MEMLIMIT 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 -$as_echo_n "checking for crypt in -lcrypt... " >&6; } -if ${ac_cv_lib_crypt_crypt+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 +printf %s "checking for crypt in -lcrypt... " >&6; } +if test ${ac_cv_lib_crypt_crypt+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11285,30 +12909,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char crypt (); int -main () +main (void) { return crypt (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypt_crypt=yes -else +else $as_nop ac_cv_lib_crypt_crypt=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 -$as_echo "$ac_cv_lib_crypt_crypt" >&6; } -if test "x$ac_cv_lib_crypt_crypt" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 +printf "%s\n" "$ac_cv_lib_crypt_crypt" >&6; } +if test "x$ac_cv_lib_crypt_crypt" = xyes +then : CRYPTLIB="-lcrypt" fi @@ -11316,23 +12939,25 @@ fi if test "$CRYPTLIB" != ""; then -$as_echo "#define HAVE_CRYPT /**/" >>confdefs.h +printf "%s\n" "#define HAVE_CRYPT /**/" >>confdefs.h else ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt" -if test "x$ac_cv_func_crypt" = xyes; then : +if test "x$ac_cv_func_crypt" = xyes +then : -$as_echo "#define HAVE_CRYPT /**/" >>confdefs.h +printf "%s\n" "#define HAVE_CRYPT /**/" >>confdefs.h fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt_r in -lcrypt" >&5 -$as_echo_n "checking for crypt_r in -lcrypt... " >&6; } -if ${ac_cv_lib_crypt_crypt_r+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for crypt_r in -lcrypt" >&5 +printf %s "checking for crypt_r in -lcrypt... " >&6; } +if test ${ac_cv_lib_crypt_crypt_r+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11341,41 +12966,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char crypt_r (); int -main () +main (void) { return crypt_r (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_crypt_crypt_r=yes -else +else $as_nop ac_cv_lib_crypt_crypt_r=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt_r" >&5 -$as_echo "$ac_cv_lib_crypt_crypt_r" >&6; } -if test "x$ac_cv_lib_crypt_crypt_r" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt_r" >&5 +printf "%s\n" "$ac_cv_lib_crypt_crypt_r" >&6; } +if test "x$ac_cv_lib_crypt_crypt_r" = xyes +then : -$as_echo "#define HAVE_CRYPT_R /**/" >>confdefs.h +printf "%s\n" "#define HAVE_CRYPT_R /**/" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setkey in -lcipher" >&5 -$as_echo_n "checking for setkey in -lcipher... " >&6; } -if ${ac_cv_lib_cipher_setkey+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setkey in -lcipher" >&5 +printf %s "checking for setkey in -lcipher... " >&6; } +if test ${ac_cv_lib_cipher_setkey+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcipher $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11384,30 +13009,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char setkey (); int -main () +main (void) { return setkey (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cipher_setkey=yes -else +else $as_nop ac_cv_lib_cipher_setkey=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cipher_setkey" >&5 -$as_echo "$ac_cv_lib_cipher_setkey" >&6; } -if test "x$ac_cv_lib_cipher_setkey" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cipher_setkey" >&5 +printf "%s\n" "$ac_cv_lib_cipher_setkey" >&6; } +if test "x$ac_cv_lib_cipher_setkey" = xyes +then : CRYPTLIB="${CRYPTLIB} -lcipher" fi @@ -11417,7 +13041,8 @@ fi execinfo_lib_dir= # Check whether --with-execinfo-lib-dir was given. -if test "${with_execinfo_lib_dir+set}" = set; then : +if test ${with_execinfo_lib_dir+y} +then : withval=$with_execinfo_lib_dir; case "$withval" in no) as_fn_error $? "Need execinfo-lib-dir" "$LINENO" 5 @@ -11435,7 +13060,8 @@ fi execinfo_include_dir= # Check whether --with-execinfo-include-dir was given. -if test "${with_execinfo_include_dir+set}" = set; then : +if test ${with_execinfo_include_dir+y} +then : withval=$with_execinfo_include_dir; case "$withval" in no) as_fn_error $? "Need execinfo-include-dir" "$LINENO" 5 @@ -11473,141 +13099,145 @@ done if test "x$_smart_try_dir" != "x"; then for try in $_smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5 -$as_echo_n "checking for execinfo.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5 +printf %s "checking for execinfo.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <execinfo.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi if test "x$smart_include" = "x"; then for _prefix in $smart_prefix; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/execinfo.h" >&5 -$as_echo_n "checking for ${_prefix}/execinfo.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/execinfo.h" >&5 +printf %s "checking for ${_prefix}/execinfo.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <execinfo.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem ${_prefix}/" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done fi if test "x$smart_include" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h" >&5 -$as_echo_n "checking for execinfo.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for execinfo.h" >&5 +printf %s "checking for execinfo.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <execinfo.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include=" " - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x$smart_include" = "x"; then for try in $_smart_include_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5 -$as_echo_n "checking for execinfo.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5 +printf %s "checking for execinfo.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <execinfo.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi @@ -11635,34 +13265,35 @@ smart_lib_dir= if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo in $try" >&5 -$as_echo_n "checking for backtrace_symbols in -lexecinfo in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo in $try" >&5 +printf %s "checking for backtrace_symbols in -lexecinfo in $try... " >&6; } LIBS="-lexecinfo $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char backtrace_symbols(); int -main () +main (void) { backtrace_symbols() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lexecinfo" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -11670,65 +13301,67 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test "x$smart_lib" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo" >&5 -$as_echo_n "checking for backtrace_symbols in -lexecinfo... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo" >&5 +printf %s "checking for backtrace_symbols in -lexecinfo... " >&6; } LIBS="-lexecinfo $old_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char backtrace_symbols(); int -main () +main (void) { backtrace_symbols() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lexecinfo" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$old_LIBS" fi if test "x$smart_lib" = "x"; then for try in /usr/local/lib /opt/lib; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo in $try" >&5 -$as_echo_n "checking for backtrace_symbols in -lexecinfo in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for backtrace_symbols in -lexecinfo in $try" >&5 +printf %s "checking for backtrace_symbols in -lexecinfo in $try... " >&6; } LIBS="-lexecinfo $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char backtrace_symbols(); int -main () +main (void) { backtrace_symbols() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lexecinfo" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -11742,15 +13375,15 @@ if test "x$smart_lib" != "x"; then fi if test "x$ac_cv_lib_execinfo_backtrace_symbols" != "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if execinfo provided as part of libc" >&5 -$as_echo_n "checking if execinfo provided as part of libc... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if execinfo provided as part of libc" >&5 +printf %s "checking if execinfo provided as part of libc... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <execinfo.h> int -main () +main (void) { void *sym[1]; @@ -11759,25 +13392,26 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ac_cv_lib_execinfo_backtrace_symbols="yes" -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi if test "x$ac_cv_lib_execinfo_backtrace_symbols" = "xyes"; then -$as_echo "#define HAVE_EXECINFO 1" >>confdefs.h +printf "%s\n" "#define HAVE_EXECINFO 1" >>confdefs.h fi fi @@ -11785,7 +13419,8 @@ fi PCRE=yes # Check whether --with-pcre was given. -if test "${with_pcre+set}" = set; then : +if test ${with_pcre+y} +then : withval=$with_pcre; case "$withval" in no) PCRE=no @@ -11801,7 +13436,8 @@ fi pcre_lib_dir= # Check whether --with-pcre-lib-dir was given. -if test "${with_pcre_lib_dir+set}" = set; then : +if test ${with_pcre_lib_dir+y} +then : withval=$with_pcre_lib_dir; case "$withval" in no) as_fn_error $? "Need pcre-lib-dir" "$LINENO" 5 @@ -11819,7 +13455,8 @@ fi pcre_include_dir= # Check whether --with-pcre-include-dir was given. -if test "${with_pcre_include_dir+set}" = set; then : +if test ${with_pcre_include_dir+y} +then : withval=$with_pcre_include_dir; case "$withval" in no) as_fn_error $? "Need pcre-include-dir" "$LINENO" 5 @@ -11837,7 +13474,8 @@ fi REGEX= # Check whether --with-regex was given. -if test "${with_regex+set}" = set; then : +if test ${with_regex+y} +then : withval=$with_regex; case "$withval" in no) REGEX=no @@ -11873,141 +13511,145 @@ done if test "x$_smart_try_dir" != "x"; then for try in $_smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h in $try" >&5 -$as_echo_n "checking for pcre.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre.h in $try" >&5 +printf %s "checking for pcre.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <pcre.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi if test "x$smart_include" = "x"; then for _prefix in $smart_prefix; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcre.h" >&5 -$as_echo_n "checking for ${_prefix}/pcre.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcre.h" >&5 +printf %s "checking for ${_prefix}/pcre.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <pcre.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem ${_prefix}/" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done fi if test "x$smart_include" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h" >&5 -$as_echo_n "checking for pcre.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre.h" >&5 +printf %s "checking for pcre.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <pcre.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include=" " - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x$smart_include" = "x"; then for try in $_smart_include_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre.h in $try" >&5 -$as_echo_n "checking for pcre.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre.h in $try" >&5 +printf %s "checking for pcre.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <pcre.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi @@ -12035,34 +13677,35 @@ smart_lib_dir= if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre in $try" >&5 -$as_echo_n "checking for pcre_compile in -lpcre in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre in $try" >&5 +printf %s "checking for pcre_compile in -lpcre in $try... " >&6; } LIBS="-lpcre $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char pcre_compile(); int -main () +main (void) { pcre_compile() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lpcre" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -12070,65 +13713,67 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test "x$smart_lib" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5 -$as_echo_n "checking for pcre_compile in -lpcre... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5 +printf %s "checking for pcre_compile in -lpcre... " >&6; } LIBS="-lpcre $old_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char pcre_compile(); int -main () +main (void) { pcre_compile() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lpcre" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$old_LIBS" fi if test "x$smart_lib" = "x"; then for try in /usr/local/lib /opt/lib; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre in $try" >&5 -$as_echo_n "checking for pcre_compile in -lpcre in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre in $try" >&5 +printf %s "checking for pcre_compile in -lpcre in $try... " >&6; } LIBS="-lpcre $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern char pcre_compile(); int -main () +main (void) { pcre_compile() ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : smart_lib="-lpcre" smart_ldflags="-L$try -Wl,-rpath,$try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done LIBS="$old_LIBS" @@ -12144,10 +13789,10 @@ fi if test "x$ac_cv_lib_pcre_pcre_compile" = "xyes"; then REGEX=yes -$as_echo "#define HAVE_PCRE 1" >>confdefs.h +printf "%s\n" "#define HAVE_PCRE 1" >>confdefs.h -$as_echo "#define HAVE_BINSAFE_REGEX 1" >>confdefs.h +printf "%s\n" "#define HAVE_BINSAFE_REGEX 1" >>confdefs.h fi fi @@ -12177,141 +13822,145 @@ done if test "x$_smart_try_dir" != "x"; then for try in $_smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5 -$as_echo_n "checking for regex.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5 +printf %s "checking for regex.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <regex.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi if test "x$smart_include" = "x"; then for _prefix in $smart_prefix; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/regex.h" >&5 -$as_echo_n "checking for ${_prefix}/regex.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/regex.h" >&5 +printf %s "checking for ${_prefix}/regex.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <regex.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem ${_prefix}/" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done fi if test "x$smart_include" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h" >&5 -$as_echo_n "checking for regex.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for regex.h" >&5 +printf %s "checking for regex.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <regex.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include=" " - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x$smart_include" = "x"; then for try in $_smart_include_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5 -$as_echo_n "checking for regex.h in $try... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5 +printf %s "checking for regex.h in $try... " >&6; } CPPFLAGS="-isystem $try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <regex.h> int -main () +main (void) { int a = 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : smart_include="-isystem $try" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } break -else +else $as_nop smart_include= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CPPFLAGS="$old_CPPFLAGS" fi @@ -12326,8 +13975,8 @@ smart_prefix= if test "x$ac_cv_header_regex_h" = "xyes"; then REGEX=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extended regular expressions" >&5 -$as_echo_n "checking for extended regular expressions... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extended regular expressions" >&5 +printf %s "checking for extended regular expressions... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12338,29 +13987,31 @@ $as_echo_n "checking for extended regular expressions... " >&6; } _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : + $EGREP "yes" >/dev/null 2>&1 +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -$as_echo "#define HAVE_REG_EXTENDED 1" >>confdefs.h +printf "%s\n" "#define HAVE_REG_EXTENDED 1" >>confdefs.h -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f conftest* +rm -rf conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regcomp in -lregex" >&5 -$as_echo_n "checking for regcomp in -lregex... " >&6; } -if ${ac_cv_lib_regex_regcomp+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for regcomp in -lregex" >&5 +printf %s "checking for regcomp in -lregex... " >&6; } +if test ${ac_cv_lib_regex_regcomp+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lregex $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12369,30 +14020,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char regcomp (); int -main () +main (void) { return regcomp (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_regex_regcomp=yes -else +else $as_nop ac_cv_lib_regex_regcomp=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_regex_regcomp" >&5 -$as_echo "$ac_cv_lib_regex_regcomp" >&6; } -if test "x$ac_cv_lib_regex_regcomp" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_regex_regcomp" >&5 +printf "%s\n" "$ac_cv_lib_regex_regcomp" >&6; } +if test "x$ac_cv_lib_regex_regcomp" = xyes +then : LIBS="-lregex $LIBS" @@ -12400,24 +14050,22 @@ if test "x$ac_cv_lib_regex_regcomp" = xyes; then : fi - for ac_func in \ - regncomp \ - regnexec + ac_fn_c_check_func "$LINENO" "regncomp" "ac_cv_func_regncomp" +if test "x$ac_cv_func_regncomp" = xyes +then : + printf "%s\n" "#define HAVE_REGNCOMP 1" >>confdefs.h -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +fi +ac_fn_c_check_func "$LINENO" "regnexec" "ac_cv_func_regnexec" +if test "x$ac_cv_func_regnexec" = xyes +then : + printf "%s\n" "#define HAVE_REGNEXEC 1" >>confdefs.h fi -done if test x"$ac_cv_func_regncomp" = x"yes" && test x"$ac_cv_func_regnexec" = x"yes"; then -$as_echo "#define HAVE_BINSAFE_REGEX 1" >>confdefs.h +printf "%s\n" "#define HAVE_BINSAFE_REGEX 1" >>confdefs.h fi fi @@ -12426,11 +14074,12 @@ fi # # Some platforms require an explicit -latomic # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing __atomic_load_4" >&5 -$as_echo_n "checking for library containing __atomic_load_4... " >&6; } -if ${ac_cv_search___atomic_load_4+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing __atomic_load_4" >&5 +printf %s "checking for library containing __atomic_load_4... " >&6; } +if test ${ac_cv_search___atomic_load_4+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12438,46 +14087,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char __atomic_load_4 (); int -main () +main (void) { return __atomic_load_4 (); ; return 0; } _ACEOF -for ac_lib in '' atomic; do +for ac_lib in '' atomic +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO"; then : + if ac_fn_c_try_link "$LINENO" +then : ac_cv_search___atomic_load_4=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search___atomic_load_4+:} false; then : + if test ${ac_cv_search___atomic_load_4+y} +then : break fi done -if ${ac_cv_search___atomic_load_4+:} false; then : +if test ${ac_cv_search___atomic_load_4+y} +then : -else +else $as_nop ac_cv_search___atomic_load_4=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search___atomic_load_4" >&5 -$as_echo "$ac_cv_search___atomic_load_4" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search___atomic_load_4" >&5 +printf "%s\n" "$ac_cv_search___atomic_load_4" >&6; } ac_res=$ac_cv_search___atomic_load_4 -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi @@ -12485,52 +14136,131 @@ fi if test "x$REGEX" = "xyes"; then -$as_echo "#define HAVE_REGEX 1" >>confdefs.h +printf "%s\n" "#define HAVE_REGEX 1" >>confdefs.h fi -$as_echo "#define GNUSTYLE 1" >>confdefs.h +printf "%s\n" "#define GNUSTYLE 1" >>confdefs.h -$as_echo "#define SYSVSTYLE 2" >>confdefs.h +printf "%s\n" "#define SYSVSTYLE 2" >>confdefs.h -$as_echo "#define BSDSTYLE 3" >>confdefs.h +printf "%s\n" "#define BSDSTYLE 3" >>confdefs.h gethostbyaddrrstyle="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyaddr_r() syntax" >&5 -$as_echo_n "checking gethostbyaddr_r() syntax... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyaddr_r() syntax" >&5 +printf %s "checking gethostbyaddr_r() syntax... " >&6; } case "$host" in *-freebsd*) - ac_fn_c_check_decl "$LINENO" "gethostbyaddr_r" "ac_cv_have_decl_gethostbyaddr_r" " + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } +if test ${ac_cv_c_undeclared_builtin_options+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_CFLAGS=$CFLAGS + ac_cv_c_undeclared_builtin_options='cannot detect' + for ac_arg in '' -fno-builtin; do + CFLAGS="$ac_save_CFLAGS $ac_arg" + # This test program should *not* compile successfully. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +(void) strchr; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + # This test program should compile successfully. + # No library function is consistently available on + # freestanding implementations, so test against a dummy + # declaration. Include always-available headers on the + # off chance that they somehow elicit warnings. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <float.h> +#include <limits.h> +#include <stdarg.h> +#include <stddef.h> +extern void ac_decl (int, char *); + +int +main (void) +{ +(void) ac_decl (0, (char *) 0); + (void) ac_decl; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + if test x"$ac_arg" = x +then : + ac_cv_c_undeclared_builtin_options='none needed' +else $as_nop + ac_cv_c_undeclared_builtin_options=$ac_arg +fi + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + CFLAGS=$ac_save_CFLAGS + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 +printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } + case $ac_cv_c_undeclared_builtin_options in #( + 'cannot detect') : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot make $CC report undeclared builtins +See \`config.log' for more details" "$LINENO" 5; } ;; #( + 'none needed') : + ac_c_undeclared_builtin_options='' ;; #( + *) : + ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; +esac + +ac_fn_check_decl "$LINENO" "gethostbyaddr_r" "ac_cv_have_decl_gethostbyaddr_r" " #ifdef HAVE_NETDB_H #include <netdb.h> #endif -" -if test "x$ac_cv_have_decl_gethostbyaddr_r" = xyes; then : +" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_gethostbyaddr_r" = xyes +then : ac_have_decl=1 -else +else $as_nop ac_have_decl=0 fi +printf "%s\n" "#define HAVE_DECL_GETHOSTBYADDR_R $ac_have_decl" >>confdefs.h +if test $ac_have_decl = 1 +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETHOSTBYADDR_R $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : - -else +else $as_nop -$as_echo "#define GETHOSTBYADDRRSTYLE BSDSTYLE" >>confdefs.h +printf "%s\n" "#define GETHOSTBYADDRRSTYLE BSDSTYLE" >>confdefs.h gethostbyaddrrstyle=BSD - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FreeBSD overridden to BSD-style" >&5 -$as_echo "$as_me: WARNING: FreeBSD overridden to BSD-style" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: FreeBSD overridden to BSD-style" >&5 +printf "%s\n" "$as_me: WARNING: FreeBSD overridden to BSD-style" >&2;} fi @@ -12545,22 +14275,23 @@ if test "x$gethostbyaddrrstyle" = "x"; then #include <netdb.h> int -main () +main (void) { gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : -$as_echo "#define GETHOSTBYADDRRSTYLE GNUSTYLE" >>confdefs.h +printf "%s\n" "#define GETHOSTBYADDRRSTYLE GNUSTYLE" >>confdefs.h gethostbyaddrrstyle=GNU fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -12572,22 +14303,23 @@ if test "x$gethostbyaddrrstyle" = "x"; then #include <netdb.h> int -main () +main (void) { gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : -$as_echo "#define GETHOSTBYADDRRSTYLE SYSVSTYLE" >>confdefs.h +printf "%s\n" "#define GETHOSTBYADDRRSTYLE SYSVSTYLE" >>confdefs.h gethostbyaddrrstyle=SYSV fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -12600,41 +14332,42 @@ if test "x$gethostbyaddrrstyle" = "x"; then #include <netdb.h> int -main () +main (void) { gethostbyaddr(NULL, 0, 0) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : -$as_echo "#define GETHOSTBYADDRRSTYLE BSDSTYLE" >>confdefs.h +printf "%s\n" "#define GETHOSTBYADDRRSTYLE BSDSTYLE" >>confdefs.h gethostbyaddrrstyle=BSD fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi if test "x$gethostbyaddrrstyle" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none! It must not exist, here." >&5 -$as_echo "none! It must not exist, here." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none! It must not exist, here." >&5 +printf "%s\n" "none! It must not exist, here." >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gethostbyaddrrstyle}-style" >&5 -$as_echo "${gethostbyaddrrstyle}-style" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${gethostbyaddrrstyle}-style" >&5 +printf "%s\n" "${gethostbyaddrrstyle}-style" >&6; } fi if test "x$gethostbyaddrrstyle" = "xBSD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** " >&5 -$as_echo "$as_me: WARNING: ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** " >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** " >&5 +printf "%s\n" "$as_me: WARNING: ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** " >&2;} fi gethostbynamerstyle="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r() syntax" >&5 -$as_echo_n "checking gethostbyname_r() syntax... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r() syntax" >&5 +printf %s "checking gethostbyname_r() syntax... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12642,22 +14375,23 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include <netdb.h> int -main () +main (void) { gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : -$as_echo "#define GETHOSTBYNAMERSTYLE GNUSTYLE" >>confdefs.h +printf "%s\n" "#define GETHOSTBYNAMERSTYLE GNUSTYLE" >>confdefs.h gethostbynamerstyle=GNU fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "x$gethostbynamerstyle" = "x"; then @@ -12668,22 +14402,23 @@ if test "x$gethostbynamerstyle" = "x"; then #include <netdb.h> int -main () +main (void) { gethostbyname_r(NULL, NULL, NULL, 0, NULL) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : -$as_echo "#define GETHOSTBYNAMERSTYLE SYSVSTYLE" >>confdefs.h +printf "%s\n" "#define GETHOSTBYNAMERSTYLE SYSVSTYLE" >>confdefs.h gethostbynamerstyle=SYSV fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -12695,41 +14430,42 @@ if test "x$gethostbynamerstyle" = "x"; then #include <netdb.h> int -main () +main (void) { gethostbyname(NULL) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : -$as_echo "#define GETHOSTBYNAMERSTYLE BSDSTYLE" >>confdefs.h +printf "%s\n" "#define GETHOSTBYNAMERSTYLE BSDSTYLE" >>confdefs.h gethostbynamerstyle=BSD fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi if test "x$gethostbynamerstyle" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none! It must not exist, here." >&5 -$as_echo "none! It must not exist, here." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none! It must not exist, here." >&5 +printf "%s\n" "none! It must not exist, here." >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${gethostbynamerstyle}-style" >&5 -$as_echo "${gethostbynamerstyle}-style" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${gethostbynamerstyle}-style" >&5 +printf "%s\n" "${gethostbynamerstyle}-style" >&6; } fi if test "x$gethostbynamerstyle" = "xBSD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** BSD-style gethostbyname might NOT be thread-safe! ****** " >&5 -$as_echo "$as_me: WARNING: ****** BSD-style gethostbyname might NOT be thread-safe! ****** " >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ****** BSD-style gethostbyname might NOT be thread-safe! ****** " >&5 +printf "%s\n" "$as_me: WARNING: ****** BSD-style gethostbyname might NOT be thread-safe! ****** " >&2;} fi if test "x$ac_cv_header_pwd_h" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking getpwnam_r" >&5 -$as_echo_n "checking getpwnam_r... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getpwnam_r" >&5 +printf %s "checking getpwnam_r... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12738,34 +14474,35 @@ $as_echo_n "checking getpwnam_r... " >&6; } #include <pwd.h> int -main () +main (void) { getpwnam_r(NULL, NULL, NULL, 0, NULL) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -$as_echo "#define HAVE_GETPWNAM_R 1" >>confdefs.h +printf "%s\n" "#define HAVE_GETPWNAM_R 1" >>confdefs.h -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi if test "x$ac_cv_header_grp_h" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking getgrnam_r" >&5 -$as_echo_n "checking getgrnam_r... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getgrnam_r" >&5 +printf %s "checking getgrnam_r... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12774,63 +14511,65 @@ $as_echo_n "checking getgrnam_r... " >&6; } #include <grp.h> int -main () +main (void) { getgrnam_r(NULL, NULL, NULL, 0, NULL) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -$as_echo "#define HAVE_GETGRNAM_R 1" >>confdefs.h +printf "%s\n" "#define HAVE_GETGRNAM_R 1" >>confdefs.h -else +else $as_nop - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -$as_echo "#define POSIXSTYLE 1" >>confdefs.h +printf "%s\n" "#define POSIXSTYLE 1" >>confdefs.h -$as_echo "#define SOLARISSTYLE 2" >>confdefs.h +printf "%s\n" "#define SOLARISSTYLE 2" >>confdefs.h ctimerstyle="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ctime_r() syntax" >&5 -$as_echo_n "checking ctime_r() syntax... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ctime_r() syntax" >&5 +printf %s "checking ctime_r() syntax... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <time.h> int -main () +main (void) { ctime_r(NULL, NULL, 0) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : -$as_echo "#define CTIMERSTYLE SOLARISSTYLE" >>confdefs.h +printf "%s\n" "#define CTIMERSTYLE SOLARISSTYLE" >>confdefs.h ctimerstyle="SOLARIS" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "x$ctimerstyle" = "x"; then @@ -12840,31 +14579,32 @@ if test "x$ctimerstyle" = "x"; then #include <time.h> int -main () +main (void) { ctime_r(NULL, NULL) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : -$as_echo "#define CTIMERSTYLE POSIXSTYLE" >>confdefs.h +printf "%s\n" "#define CTIMERSTYLE POSIXSTYLE" >>confdefs.h ctimerstyle="POSIX" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi if test "x$ctimerstyle" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none! It must not exist, here." >&5 -$as_echo "none! It must not exist, here." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none! It must not exist, here." >&5 +printf "%s\n" "none! It must not exist, here." >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ctimerstyle}-style" >&5 -$as_echo "${ctimerstyle}-style" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ctimerstyle}-style" >&5 +printf "%s\n" "${ctimerstyle}-style" >&6; } fi HOSTINFO=$host @@ -12873,8 +14613,8 @@ HOSTINFO=$host top_builddir=`pwd` export top_builddir -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: top_builddir=$top_builddir" >&5 -$as_echo "top_builddir=$top_builddir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: top_builddir=$top_builddir" >&5 +printf "%s\n" "top_builddir=$top_builddir" >&6; } @@ -12959,8 +14699,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -12990,15 +14730,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -13012,8 +14752,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -13030,7 +14770,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -13047,8 +14787,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -13071,14 +14811,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (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 +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -13088,46 +14830,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi +if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; 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 || @@ -13136,13 +14878,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -13151,8 +14886,12 @@ case $0 in #(( 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -13164,30 +14903,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -13200,13 +14919,14 @@ 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 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -13233,18 +14953,20 @@ 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 : +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 +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -13256,12 +14978,13 @@ fi # as_fn_append # 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 : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -13292,7 +15015,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -13314,6 +15037,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -13327,6 +15054,12 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -13368,7 +15101,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -13377,7 +15110,7 @@ $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" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -13440,7 +15173,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by freeradius $as_me $Id$, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -13503,14 +15236,16 @@ Report bugs to <http://bugs.freeradius.org>. freeradius home page: <http://www.freeradius.org>." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ freeradius config.status $Id$ -configured by $0, generated by GNU Autoconf 2.69, +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -13547,15 +15282,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -13563,7 +15298,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -13572,7 +15307,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -13600,7 +15335,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -13614,7 +15349,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -13655,9 +15390,9 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -13993,7 +15728,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -14001,17 +15736,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$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" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -14028,7 +15763,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -14052,9 +15787,9 @@ $as_echo X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$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/ ;; @@ -14107,8 +15842,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -14150,9 +15885,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$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' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -14168,27 +15903,27 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} + :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -14271,7 +16006,7 @@ if test "$no_recursion" != yes; then ;; *) case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_sub_configure_args " '$ac_arg'" ;; esac @@ -14281,7 +16016,7 @@ if test "$no_recursion" != yes; then # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" @@ -14302,17 +16037,17 @@ if test "$no_recursion" != yes; then test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" - $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 - $as_echo "$ac_msg" >&6 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 + printf "%s\n" "$ac_msg" >&6 as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$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/ ;; @@ -14342,17 +16077,15 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" - # Check for guested configure; otherwise get Cygnus style configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure - elif test -f "$ac_srcdir/configure.in"; then - # This should be Cygnus configure. - ac_sub_configure=$ac_aux_dir/configure else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 -$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 +printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi @@ -14365,8 +16098,8 @@ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 -$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +printf "%s\n" "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || @@ -14377,8 +16110,8 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach done fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi @@ -14403,3 +16136,4 @@ for module in $module_list; do $as_echo "$module_print $module_status" done + diff --git a/configure.ac b/configure.ac index f8acb87..a24a806 100644 --- a/configure.ac +++ b/configure.ac @@ -484,6 +484,24 @@ if test "x$WITH_ASCEND_BINARY" = "xyes"; then fi dnl # +dnl # extra argument: --with-radiusv11 +dnl # +WITH_RADIUSV11= +AC_ARG_WITH(radiusv11, +[ --with-radiusv11 compile in RADIUSv11 support. (default=no)], +[ case "$withval" in + yes) + WITH_RADIUSV11=yes + ;; + *) + ;; + esac ] +) +if test "x$WITH_RADIUSCV11" = "xyes"; then + AC_DEFINE(WITH_RADIUSV11, [1], [define if you want RADIUSv11 support (For RADSec et al)]) +fi + +dnl # dnl # extra argument: --with-threads dnl # WITH_THREADS=yes diff --git a/doc/ChangeLog b/doc/ChangeLog index 0252302..6b7006e 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,58 @@ +FreeRADIUS 3.2.3 Fri 26 May 2023 12:00:00 EDT urgency=low + Configuration changes + * The rlm_ldap and rlm_sql modules now have a "max_retries" configuration + item in the pool section. This sets a limit on how many times an operation + will be retried if it fails indicating a connection issue. + * Added "check_crl" configuration to rlm_ldap. This only works with OpenSSL. + Many Linux distributions use other TLS libraries, which won't work. + * Note that rlm_ldap does not support "-=" operators. The documentation + disagreed with the code, so we fixed the documentation. + * If checkrad is called from SQL Simultaneous-Use checks it will now be + passed NAS-Port-Id (as stored in the database), rather than NAS-Port. + + Feature improvements + * Add "max_retries" for connection pools. Fixes #4908. Patch from Nick Porter. + * Update dictionary.ciena, dictionary.huawei, dictionary.wifialliance and + dictionary.wispr; add dictionary.eleven. + * You can now list "eap" in the "pre-proxy" section. If the packet + contains a malformed EAP message, then the request will be rejected. + The home server will either reject (or discard) this packet anyways, + so this change can only help with large proxy scenarios. + * Show warnings if libldap is not using OpenSSL. + * Support RADIUS/1.1. See https://datatracker.ietf.org/doc/draft-dekok-radext-radiusv11/ + Disabled by default, can be enabled by passing `--with-radiusv11` to the + configure script. For now, this is for testing interoperability. + * Add extra sanity checks for malformed EAP attributes. + * More TLS debugging output + * Clear old module instance data before HUP reload. Avoids burst memory use + when e.g. using large data files with rlm_files. Patch from Nick Porter. + * `rlm_cache_redis` is now included in the freeradius-redis packages. + * Separate out python2/python3 in Debian Packages. Previously python 2 or 3 + was built depending on the system default which led to confusion. We now build + both freeradius-python2 and freeradius-python3 packages where possible. + + Bug fixes + * Don't leak MD contexts with OpenSSL 3.0. + * Increase internal buffer size for TLS connections, which + can help with high-load proxies. + * Send Status-Server checks for TLS connections + * Give descriptive error if "update CoA" is used with "fake" packets, + as it won't work. i.e. inner-tunnel and virtual home servers. + * Many small ASAN / LSAN fixes from Jorge Pereira. + * Close inbound RADIUS/TLS socket on TLS errors. When a home server + sees a TLS error, it will now close the socket, so proxies do not + have an open (but dead) TLS connection. + * Fix mutex locking issues on inbound RADIUS/TLS connections. + This change avoids random issues with "bad record mac". + * Improve REST encoding loop. Patch from Herwin Weststrate. Closes #4950 + * Correctly report the LDAP group a user was found in. Fixes #3084. + Patch from Nick Porter. + * Force correct packet type when running Post-Auth-Type. Helps with #4980 + * Fix small leak in Client-Lost code. Patch from Terry Burton. PR #4996 + * Fix TCP socket statistics. Closes #4990 + * Use NAS-Port-Id instead of NAS-Port during SQL simultaneous-use + checks. Helps with #5010 + FreeRADIUS 3.2.2 Thu 16 Feb 2023 12:00:00 EDT urgency=low Configuration changes * The linelog module now has a "header" configuration item, @@ -61,7 +116,7 @@ FreeRADIUS 3.2.2 Thu 16 Feb 2023 12:00:00 EDT urgency=low FreeRADIUS 3.2.1 Mon 03 Oct 2022 12:00:00 EDT urgency=low Feature improvements - * Add dictionary.ciena, dictionary.nile, and DHCPv4 dictionaries, + * Add dictionary.ciena, dictionary.nile, and DHCPv4 dictionaries. * Add simultaneous-use queries for MS SQL. * Add radmin command for "stats pool <module-name>" Which prints out statistics about the connection pools diff --git a/doc/antora/antora.yml b/doc/antora/antora.yml index cd4a268..e345e9c 100644 --- a/doc/antora/antora.yml +++ b/doc/antora/antora.yml @@ -5,7 +5,7 @@ # name: freeradius-server title: The FreeRADIUS Server -version: '3.2.2' +version: '3.2.3' start_page: ROOT:index.adoc nav: - modules/ROOT/nav.adoc diff --git a/m4/ax_cc.m4 b/m4/ax_cc.m4 index ecdfd31..88b6987 100644 --- a/m4/ax_cc.m4 +++ b/m4/ax_cc.m4 @@ -15,6 +15,100 @@ AC_DEFUN([AX_CC_IS_CLANG],[ ]) ]) +dnl # +dnl # clang and gcc originally used different flags to specify c11 support +dnl # +AC_DEFUN([AX_CC_STD_C11],[ + AC_CACHE_CHECK([for the compiler flag to enable C11 support], [ax_cv_cc_std_c11_flag],[ + ax_cv_cc_std_c11_flag= + + CFLAGS_SAVED=$CFLAGS + CFLAGS="$CFLAGS -Werror -std=c11" + + AC_LANG_PUSH(C) + AC_TRY_COMPILE( + [], + [ + struct foo { + union { + int a; + int b; + }; + } bar; + ], + [ax_cv_cc_std_c11_flag="-std=c11"]) + + if test "x$ax_cv_cc_std_c11_flag" = x; then + CFLAGS="$CFLAGS_SAVED -std=c1x" + AC_TRY_COMPILE( + [], + [ + struct foo { + union { + int a; + int b; + }; + } bar; + ], + [ax_cv_cc_std_c11_flag="-std=c1x"]) + fi + + AC_LANG_POP + CFLAGS="$CFLAGS_SAVED" + ]) +]) + +dnl # +dnl # clang and gcc originally used different flags to specify c11 support +dnl # +AC_DEFUN([AX_CC_UNWINDLIB_ARG],[ + AC_CACHE_CHECK([if the compiler accepts --unwindlib], [ax_cv_cc_unwindlib_arg],[ + LDFLAGS_SAVED=$LDFLAGS + LDFLAGS="$LDFLAGS -Werror --rtlib=compiler-rt --unwindlib=libunwind" + + AC_LINK_IFELSE( + [ + AC_LANG_SOURCE( + [ + int main(int argc, char **argv) { + return 0; + } + ]) + ], + [ax_cv_cc_unwindlib_arg=yes], + [ax_cv_cc_unwindlib_arg=no] + ) + + LDFLAGS="$LDFLAGS_SAVED" + ]) +]) + + +dnl # +dnl # Check if we have the _Generic construct +dnl # +AC_DEFUN([AX_CC_HAVE_C11_GENERIC], +[ +AC_CACHE_CHECK([for _Generic support in compiler], [ax_cv_cc_c11_generic],[ + AC_COMPILE_IFELSE( + [ + AC_LANG_SOURCE( + [ + int main(int argc, char **argv) { + int foo = 1; + return _Generic(foo, int: 0, char: 1); + } + ]) + ], + [ax_cv_cc_c11_generic=yes], + [ax_cv_cc_c11_generic=no] + ) +]) +if test "x$ax_cv_cc_c11_generic" = "xyes"; then + AC_DEFINE([HAVE_C11_GENERIC],1,[Define if the compiler supports the C11 _Generic construct]) +fi +]) + AC_DEFUN([AX_CC_QUNUSED_ARGUMENTS_FLAG],[ AC_CACHE_CHECK([for the compiler flag "-Qunused-arguments"], [ax_cv_cc_qunused_arguments_flag],[ @@ -38,7 +132,7 @@ AC_DEFUN([AX_CC_NO_UNKNOWN_WARNING_OPTION_FLAG],[ CFLAGS_SAVED=$CFLAGS CFLAGS="-Werror -Wno-unknown-warning-option" - + AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([], [[ /* @@ -47,24 +141,40 @@ AC_DEFUN([AX_CC_NO_UNKNOWN_WARNING_OPTION_FLAG],[ */ #if defined(__GNUC__) && !defined(__clang__) gcc sucks - #endif - + #endif + return 0; ]])], [ax_cv_cc_no_unknown_warning_option_flag=yes], [ax_cv_cc_no_unknown_warning_option_flag=no]) - CFLAGS="$CFLAGS_SAVED" + CFLAGS="$CFLAGS_SAVED" ]) ]) +AC_DEFUN([AX_CC_WDECLARATION_AFTER_STATEMENT_FLAG],[ + AC_CACHE_CHECK([for the compiler flag "-Wdeclaration-after-statement"], [ax_cv_cc_wdeclaration_after_statement_flag],[ + CFLAGS_SAVED=$CFLAGS + CFLAGS="$CFLAGS -Werror -Wdeclaration-after-statement" + + AC_LANG_PUSH(C) + AC_TRY_COMPILE( + [], + [return 0;], + [ax_cv_cc_wdeclaration_after_statement_flag="yes"], + [ax_cv_cc_wdeclaration_after_statement_flag="no"]) + AC_LANG_POP + + CFLAGS="$CFLAGS_SAVED" + ]) +]) AC_DEFUN([AX_CC_WEVERYTHING_FLAG],[ AC_CACHE_CHECK([for the compiler flag "-Weverything"], [ax_cv_cc_weverything_flag],[ CFLAGS_SAVED=$CFLAGS - CFLAGS="$CFLAGS -Werror -Weverything -Wno-unused-macros -Wno-unreachable-code-return" + CFLAGS="$CFLAGS -Werror -Weverything -Wno-reserved-id-macro -Wno-unused-macros -Wno-unreachable-code-return -Wno-poison-system-directories" AC_LANG_PUSH(C) AC_TRY_COMPILE( @@ -96,6 +206,24 @@ AC_DEFUN([AX_CC_WDOCUMENTATION_FLAG],[ ]) ]) +AC_DEFUN([AX_CC_IMPLICIT_FALLTHROUGH_FLAG],[ + AC_CACHE_CHECK([for the compiler flag "-Wimplicit-fallthrough"], [ax_cv_cc_wimplicit_fallthrough_flag],[ + + CFLAGS_SAVED=$CFLAGS + CFLAGS="$CFLAGS -Werror -Wimplicit-fallthrough" + + AC_LANG_PUSH(C) + AC_TRY_COMPILE( + [], + [return 0;], + [ax_cv_cc_wimplicit_fallthrough_flag="yes"], + [ax_cv_cc_wimplicit_fallthrough_flag="no"]) + AC_LANG_POP + + CFLAGS="$CFLAGS_SAVED" + ]) +]) + AC_DEFUN([AX_CC_NO_DATE_TIME_FLAG],[ AC_CACHE_CHECK([for the compiler flag "-Wno-date-time"], [ax_cv_cc_no_date_time_flag],[ @@ -132,6 +260,176 @@ AC_DEFUN([AX_CC_PTHREAD_FLAG],[ ]) ]) +AC_DEFUN([AX_CC_SANITZE_ADDRESS_USE_AFTER_SCOPE_FLAG],[ + AC_CACHE_CHECK([for the compiler flag "-fsanitize-address-use-after-scope"], [ax_cv_cc_sanitize_address_use_after_scope],[ + + dnl # Need -fsanitize=address else we get an unused argument error + CFLAGS_SAVED=$CFLAGS + CFLAGS="$CFLAGS -Werror -fsanitize=address -fsanitize-address-use-after-scope" + + AC_LANG_PUSH(C) + AC_TRY_COMPILE( + [], + [return 0;], + [ax_cv_cc_sanitize_address_use_after_scope="yes"], + [ax_cv_cc_sanitize_address_use_after_scope="no"]) + AC_LANG_POP + + CFLAGS="$CFLAGS_SAVED" + ]) +]) + +dnl # +dnl # Check if we have the choose expr builtin +dnl # +AC_DEFUN([AX_CC_BUILTIN_CHOOSE_EXPR], +[ +AC_CACHE_CHECK([for __builtin_choose_expr support in compiler], [ax_cv_cc_builtin_choose_expr],[ + AC_COMPILE_IFELSE( + [ + AC_LANG_SOURCE( + [ + int main(int argc, char **argv) { + if ((argc < 0) || !argv) return 1; /* -Werror=unused-parameter */ + return __builtin_choose_expr(0, 1, 0); + } + ]) + ], + [ax_cv_cc_builtin_choose_expr=yes], + [ax_cv_cc_builtin_choose_expr=no] + ) +]) +if test "x$ax_cv_cc_builtin_choose_expr" = "xyes"; then + AC_DEFINE([HAVE_BUILTIN_CHOOSE_EXPR],1,[Define if the compiler supports __builtin_choose_expr]) +fi +]) + +dnl # +dnl # Check if we have the types compatible p builtin +dnl # +AC_DEFUN([AX_CC_BUILTIN_TYPES_COMPATIBLE_P], +[ +AC_CACHE_CHECK([for __builtin_types_compatible_p support in compiler], [ax_cv_cc_builtin_types_compatible_p],[ + AC_COMPILE_IFELSE( + [ + AC_LANG_SOURCE( + [ + int main(int argc, char **argv) { + if ((argc < 0) || !argv) return 1; /* -Werror=unused-parameter */ + return !(__builtin_types_compatible_p(char *, char *)); + } + ]) + ], + [ax_cv_cc_builtin_types_compatible_p=yes], + [ax_cv_cc_builtin_types_compatible_p=no] + ) +]) +if test "x$ax_cv_cc_builtin_types_compatible_p" = "xyes"; then + AC_DEFINE([HAVE_BUILTIN_TYPES_COMPATIBLE_P],1,[Define if the compiler supports __builtin_types_compatible_p]) +fi +]) + +dnl # +dnl # Check if we have the bwsap64 builtin +dnl # +AC_DEFUN([AX_CC_BUILTIN_BSWAP64], +[ +AC_CACHE_CHECK([for __builtin_bswap64 support in compiler], [ax_cv_cc_builtin_bswap64],[ + AC_COMPILE_IFELSE( + [ + AC_LANG_SOURCE([ + int main(int argc, char **argv) { + if ((argc < 0) || !argv) return 1; /* -Werror=unused-parameter */ + return (__builtin_bswap64(0)); + } + ]) + ], + [ax_cv_cc_builtin_bswap64=yes], + [ax_cv_cc_builtin_bswap64=no] + ) +]) +if test "x$ax_cv_cc_builtin_bswap64" = "xyes"; then + AC_DEFINE([HAVE_BUILTIN_BSWAP64],1,[Define if the compiler supports __builtin_bswap64]) +fi +]) + +dnl # +dnl # Check if we have the clzll builtin +dnl # +AC_DEFUN([AX_CC_BUILTIN_CLZLL], +[ +AC_CACHE_CHECK([for __builtin_clzll support in compiler], [ax_cv_cc_builtin_clzll],[ + AC_COMPILE_IFELSE( + [ + AC_LANG_SOURCE([ + int main(int argc, char **argv) { + if ((argc < 0) || !argv) return 1; /* -Werror=unused-parameter */ + return (__builtin_clzll(0) - (sizeof(unsigned long long) * 8)); + } + ]) + ], + [ax_cv_cc_builtin_clzll=yes], + [ax_cv_cc_builtin_clzll=no] + ) +]) +if test "x$ax_cv_cc_builtin_clzll" = "xyes"; then + AC_DEFINE([HAVE_BUILTIN_CLZLL],1,[Define if the compiler supports __builtin_clzll]) +fi +]) + +dnl # +dnl # Check if size_t and int64_t are identical +dnl # +AC_DEFUN([AX_CC_SIZE_SAME_AS_UINT64], +[ +AC_CACHE_CHECK([if size_t == uint64_t], [ax_cv_cc_size_same_as_uint64],[ + AC_COMPILE_IFELSE( + [ + AC_LANG_SOURCE([ + #include <stdint.h> + #include <stddef.h> + + int main(int argc, char **argv) { + return _Generic((size_t)(0), uint64_t: 1, size_t: 0); + } + ]) + ], + [ax_cv_cc_size_same_as_uint64=no], + [ax_cv_cc_size_same_as_uint64=yes] + ) +]) +if test "x$ax_cv_cc_size_same_as_uint64" = "xyes"; then + AC_DEFINE([SIZE_SAME_AS_UINT64],1,[Define if the compiler supports size_t has the same underlying type as uint64]) +fi +]) + +dnl # +dnl # Check if ssize_t and int64_t are identical +dnl # +AC_DEFUN([AX_CC_SSIZE_SAME_AS_INT64], +[ +AC_CACHE_CHECK([if ssize_t == int64_t], [ax_cv_cc_ssize_same_as_int64],[ + AC_COMPILE_IFELSE( + [ + AC_LANG_SOURCE([ + #include <stdint.h> + #include <stddef.h> + #include <sys/types.h> + + int main(int argc, char **argv) { + return _Generic((ssize_t)(0), int64_t: 1, ssize_t: 0); + } + ]) + ], + [ax_cv_cc_ssize_same_as_int64=no], + [ax_cv_cc_ssize_same_as_int64=yes] + ) +]) +if test "x$ax_cv_cc_ssize_same_as_int64" = "xyes"; then + AC_DEFINE([SSIZE_SAME_AS_INT64],1,[Define if the compiler supports ssize_t has the same underlying type as int64]) +fi +]) + dnl # dnl # Determine the number of system cores we have dnl # diff --git a/raddb/mods-available/eap b/raddb/mods-available/eap index 62152a6..ee9e539 100644 --- a/raddb/mods-available/eap +++ b/raddb/mods-available/eap @@ -227,6 +227,23 @@ eap { # ca_file = ${cadir}/ca.pem + # + # Directory where multiple CAs are stored. Both + # "ca_file" and "ca_path" can be used at the same time. + # + ca_path = ${cadir} + + # OpenSSL does not reload contents of ca_path dir over time. + # That means that if check_crl is enabled and CRLs are loaded + # from ca_path dir, at some point CRLs will expire and + # the server will stop authenticating users. + # + # If ca_path_reload_interval is non-zero, it will force OpenSSL + # to reload all data from ca_path periodically + # + # Flush ca_path each hour + # ca_path_reload_interval = 3600 + # OpenSSL will automatically create certificate chains, # unless we tell it to not do that. The problem is that # it sometimes gets the chains right from a certificate @@ -323,19 +340,6 @@ eap { # Check if intermediate CAs have been revoked. # check_all_crl = yes - ca_path = ${cadir} - - # OpenSSL does not reload contents of ca_path dir over time. - # That means that if check_crl is enabled and CRLs are loaded - # from ca_path dir, at some point CRLs will expire and - # RADIUSd will stop authenticating users. - # If ca_path_reload_interval is non-zero, it will force OpenSSL - # to reload all data from ca_path periodically - # - # Flush ca_path each hour - # ca_path_reload_interval = 3600 - - # Accept an expired Certificate Revocation List # # allow_expired_crl = no diff --git a/raddb/mods-available/ldap b/raddb/mods-available/ldap index 5d87f84..997d41e 100644 --- a/raddb/mods-available/ldap +++ b/raddb/mods-available/ldap @@ -92,7 +92,7 @@ ldap { # Where: # <radius attr>: Is the attribute you wish to create # with any valid list and request qualifiers. - # <op>: Is any assignment operator (=, :=, +=, -=). + # <op>: Is any assignment operator (=, :=, +=). # <value>: Is the value to parse into the new valuepair. # If the value is wrapped in double quotes it # will be xlat expanded. @@ -618,6 +618,13 @@ ldap { # require_cert = 'demand' # + # Check the CRL, as with the EAP module. + # + # The default is "no". + # +# check_crl = yes + + # # Minimum TLS version to accept. We STRONGLY recommend # setting this to "1.2" # @@ -696,5 +703,10 @@ ldap { # # The solution is to either lower the 'min' connections, # or increase lifetime/idle_timeout. + + # Maximum number of times an operation can be retried + # if it returns an error which indicates the connection + # needs to be restarted. This includes timeouts. + max_retries = 5 } } diff --git a/raddb/mods-available/sql b/raddb/mods-available/sql index 7bcb664..0f435ad 100644 --- a/raddb/mods-available/sql +++ b/raddb/mods-available/sql @@ -325,6 +325,11 @@ sql { # # The solution is to either lower the "min" connections, # or increase lifetime/idle_timeout. + + # Maximum number of times an operation can be retried + # if it returns an error which indicates the connection + # needs to be restarted. This includes timeouts. + max_retries = 5 } # Set to 'yes' to read radius clients from the database ('nas' table) diff --git a/raddb/proxy.conf b/raddb/proxy.conf index c3b7b29..26f620c 100644 --- a/raddb/proxy.conf +++ b/raddb/proxy.conf @@ -814,6 +814,9 @@ realm LOCAL { # Once proxied internally like this, the request CANNOT be proxied # internally or externally. # +# Realms are almost always domain names, and therefore realm names +# are compared in a case-insensitive fashion. +# #realm virtual.example.com { # virtual_server = virtual.example.com #} diff --git a/redhat/freeradius.spec b/redhat/freeradius.spec index cce0b9f..3cb211f 100644 --- a/redhat/freeradius.spec +++ b/redhat/freeradius.spec @@ -30,7 +30,7 @@ Summary: High-performance and highly configurable free RADIUS server Name: freeradius -Version: 3.2.2 +Version: 3.2.3 Release: 1%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Daemons @@ -917,6 +917,7 @@ fi %defattr(-,root,root) %{_libdir}/freeradius/rlm_redis.so %{_libdir}/freeradius/rlm_rediswho.so +%{_libdir}/freeradius/rlm_cache_redis.so %endif %files rest diff --git a/scripts/bin/README.md b/scripts/bin/README.md new file mode 100644 index 0000000..b7f4b5d --- /dev/null +++ b/scripts/bin/README.md @@ -0,0 +1,9 @@ +# Wrapper scripts for binaries + +The build process creates "local" versions of the binaries. These +binaries can be run out of the source / build tree, and do not need to +be installed in order to work. + +However, the "local" binaries require manual mangling of environment +variables in order to work. As such, it's easier to just have shell +script wrappers so people have to remember fewer things. diff --git a/scripts/bin/gdb b/scripts/bin/gdb new file mode 100755 index 0000000..c28b814 --- /dev/null +++ b/scripts/bin/gdb @@ -0,0 +1,5 @@ +#!/bin/sh +export PANIC_ACTION= +export DEBUGGER_ATTACHED=yes + +exec ./build//make/jlibtool --mode=execute gdb --args ./build/bin/local/radiusd -sf -xx -l stdout -d ./raddb -D share/ $@ diff --git a/scripts/bin/lldb b/scripts/bin/lldb new file mode 100755 index 0000000..2634601 --- /dev/null +++ b/scripts/bin/lldb @@ -0,0 +1,5 @@ +#!/bin/sh +export PANIC_ACTION= +export DEBUGGER_ATTACHED=yes + +exec ./build//make/jlibtool --mode=execute lldb -- ./build/bin/local/radiusd -sf -xx -l stdout -d ./raddb -D share/ $@ diff --git a/scripts/bin/radclient b/scripts/bin/radclient new file mode 120000 index 0000000..f3a1360 --- /dev/null +++ b/scripts/bin/radclient @@ -0,0 +1 @@ +radiusd
\ No newline at end of file diff --git a/scripts/bin/radict b/scripts/bin/radict new file mode 100755 index 0000000..cedcad0 --- /dev/null +++ b/scripts/bin/radict @@ -0,0 +1,5 @@ +#!/bin/sh +DIR=$(dirname $0)/../.. +PROGRAM=$(basename $0) + +exec $DIR/build/make/jlibtool --mode=execute $FR_DEBUGGER $DIR/build/bin/local/$PROGRAM -D $DIR/share/ $@ diff --git a/scripts/bin/radiusd b/scripts/bin/radiusd new file mode 100755 index 0000000..7d2e5cb --- /dev/null +++ b/scripts/bin/radiusd @@ -0,0 +1,5 @@ +#!/bin/sh +DIR=$(dirname $0)/../.. +PROGRAM=$(basename $0) + +exec $DIR/build/make/jlibtool --mode=execute $FR_DEBUGGER $DIR/build/bin/local/$PROGRAM -d $DIR/raddb -D $DIR/share/ $@ diff --git a/scripts/bin/radmin b/scripts/bin/radmin new file mode 120000 index 0000000..f3a1360 --- /dev/null +++ b/scripts/bin/radmin @@ -0,0 +1 @@ +radiusd
\ No newline at end of file diff --git a/scripts/bin/radsniff b/scripts/bin/radsniff new file mode 120000 index 0000000..f3a1360 --- /dev/null +++ b/scripts/bin/radsniff @@ -0,0 +1 @@ +radiusd
\ No newline at end of file diff --git a/scripts/bin/unit_test_module b/scripts/bin/unit_test_module new file mode 120000 index 0000000..f3a1360 --- /dev/null +++ b/scripts/bin/unit_test_module @@ -0,0 +1 @@ +radiusd
\ No newline at end of file diff --git a/scripts/jlibtool.c b/scripts/jlibtool.c index 4192ac3..77b7db2 100644 --- a/scripts/jlibtool.c +++ b/scripts/jlibtool.c @@ -2253,7 +2253,11 @@ static int run_mode(command_t *cmd) #ifdef __APPLE__ setenv("DYLD_FALLBACK_LIBRARY_PATH", l, 1); #endif - setenv("FR_LIBRARY_PATH", "./build/lib/local/.libs", 1); + + if (!getenv("FR_LIBRARY_PATH")) { + setenv("FR_LIBRARY_PATH", "./build/lib/local/.libs", 1); + } + rv = run_command(cmd, cmd->arglist); if (rv) goto finish; } diff --git a/share/dictionary b/share/dictionary index 86582f0..f91d6b8 100644 --- a/share/dictionary +++ b/share/dictionary @@ -209,6 +209,7 @@ $INCLUDE dictionary.digium $INCLUDE dictionary.dlink $INCLUDE dictionary.dragonwave $INCLUDE dictionary.efficientip +$INCLUDE dictionary.eleven $INCLUDE dictionary.eltex $INCLUDE dictionary.epygi $INCLUDE dictionary.equallogic diff --git a/share/dictionary.ciena b/share/dictionary.ciena index b0350d5..28e090a 100644 --- a/share/dictionary.ciena +++ b/share/dictionary.ciena @@ -28,6 +28,8 @@ VALUE Ciena-CES-Priv-Level admin 2 VALUE Ciena-CES-Priv-Level super-user 3 VALUE Ciena-CES-Priv-Level diag 4 +ATTRIBUTE Ciena-CES-NACM-Groups 11 string + ATTRIBUTE Ciena-BP-Role 220 string ATTRIBUTE Ciena-NCS-Role 240 integer ATTRIBUTE Ciena-OC-Role 250 string diff --git a/share/dictionary.eleven b/share/dictionary.eleven new file mode 100644 index 0000000..93dabcb --- /dev/null +++ b/share/dictionary.eleven @@ -0,0 +1,52 @@ +# -*- text -*- +# Copyright (C) 2023 The FreeRADIUS Server project and contributors +# This work is licensed under CC-BY version 4.0 https://creativecommons.org/licenses/by/4.0 +# +############################################################################## +# +# Eleven Software +# +# $Id$ +# +############################################################################## + +VENDOR Eleven 52970 + +BEGIN-VENDOR Eleven + +# +# DPSK attributes +# +# The RADIUS server responds with two Cisco-AVPair attributes: +# +# Cisco-AVPair = "psk-mode=ascii" +# Cisco-AVPair = "psk=<passphrase>" +# +# +ATTRIBUTE Eleven-Authentication-Find-Key 3 tlv + +# +# The second EAPoL frame of the 4-way handshake +# +ATTRIBUTE Eleven-EAPOL-Frame-2 3.1 octets + +# +# The first EAPoL frame of the 4-way handshake. +# +ATTRIBUTE Eleven-EAPOL-Anonce 2 octets + +# +# SSID name +# +ATTRIBUTE Eleven-EAPOL-SSID 3 string + +# +# BSSID +# +ATTRIBUTE Eleven-EAPOL-APMAC 4 octets + +# +# Wireless client MAC address. +# +ATTRIBUTE Eleven-EAPOL-STMAC 5 octets + diff --git a/share/dictionary.huawei b/share/dictionary.huawei index 78bc256..8af0011 100644 --- a/share/dictionary.huawei +++ b/share/dictionary.huawei @@ -202,6 +202,13 @@ ATTRIBUTE Huawei-MNG-IPv6 196 integer VALUE Huawei-MNG-IPv6 Unsupported 0 VALUE Huawei-MNG-IPv6 Supported 1 +# +# Huawei supports supplying a DPSK by setting the Attribute HW-DPSK-Info +# +# https://support.huawei.com/hedex/hdx.do?docid=EDOC1100192518&id=EN-US_CONCEPT_0277881327 +# +ATTRIBUTE Huawei-DPSK-Info 206 string + ATTRIBUTE Huawei-Flow-Info 211 string ATTRIBUTE Huawei-Flow-Id 212 integer ATTRIBUTE Huawei-DHCP-Server-IP 214 ipaddr @@ -228,7 +235,7 @@ ATTRIBUTE Huawei-Application-Scene 221 octets ATTRIBUTE Huawei-MS-Maximum-MAC-Study-Number 222 octets # ether?? ATTRIBUTE Huawei-GGSN-Vendor 232 string ATTRIBUTE Huawei-GGSN-Version 233 string -ATTRIBUTE Huawei-Ext-Specific 238 string +ATTRIBUTE Huawei-Ext-Specific 238 string ATTRIBUTE Huawei-Web-URL 253 string ATTRIBUTE Huawei-Version 254 string ATTRIBUTE Huawei-Product-ID 255 string diff --git a/share/dictionary.wifialliance b/share/dictionary.wifialliance index 8f330ad..a895561 100644 --- a/share/dictionary.wifialliance +++ b/share/dictionary.wifialliance @@ -83,4 +83,12 @@ ATTRIBUTE HS20-Deauthentication-Request 4 octets # ATTRIBUTE HS20-Session-Information-URL 5 octets +# Values are: +# +# 5A-03-BA-00-00 OpenRoaming for All Identities, settlement-free, no personal data requested, baseline QoS +# 5A-03-BA-08-00 "OpenRoaming for Educational or Research Identities, settlement-free, no personal data requested, baseline QoS" +ATTRIBUTE HS20-Roaming-Consortium 6 octets + + + END-VENDOR WiFi-Alliance diff --git a/share/dictionary.wispr b/share/dictionary.wispr index 1493c36..42f3707 100644 --- a/share/dictionary.wispr +++ b/share/dictionary.wispr @@ -4,17 +4,14 @@ # # dictionary.wispr # -# VSAs originally by -# "James Underwood" <underwood@comcast.net> +# Attributes from the Wireless Broadband Alliance (used to be Wispr) # -# Version: $Id$ +# Updated attributes are at # -# For documentation on WISPr RADIUS attributes, see: +# https://github.com/wireless-broadband-alliance/RADIUS-VSA # -# Wi-Fi Alliance - Wireless ISP Roaming - Best Current Practices v1, -# Feb 2003, p 14 +# Version: $Id$ # -# http://www.weca.net/OpenSection/downloads/WISPr_V1.0.pdf VENDOR WISPr 14122 @@ -35,4 +32,10 @@ ATTRIBUTE WISPr-Session-Terminate-Time 9 string ATTRIBUTE WISPr-Session-Terminate-End-Of-Day 10 string ATTRIBUTE WISPr-Billing-Class-Of-Service 11 string +ATTRIBUTE WBA-Offered-Service 12 string +ATTRIBUTE WBA-Financial-Clearing-Provider 13 string +ATTRIBUTE WBA-Data-Clearing-Provider 14 string +ATTRIBUTE WBA-Linear-Volume-Rate 15 octets +ATTRIBUTE WBA-Identity-Provider 16 string + END-VENDOR WISPr diff --git a/src/include/atomic_queue.h b/src/include/atomic_queue.h index 7d9be91..9fbcfe7 100644 --- a/src/include/atomic_queue.h +++ b/src/include/atomic_queue.h @@ -21,7 +21,7 @@ * @file atomic_queue.h * @brief Thread-safe queues. * - * @copyright 2016 Alan DeKok <aland@freeradius.org> + * @copyright 2016 Alan DeKok (aland@freeradius.org) */ RCSIDH(atomic_queue_h, "$Id$") @@ -40,14 +40,12 @@ DIAG_ON(documentation) # include <freeradius-devel/stdatomic.h> #endif -#ifdef __cplusplus -extern "C" { -#endif - /* * Some macros to make our life easier. */ +#define atomic_int64_t _Atomic(int64_t) #define atomic_uint32_t _Atomic(uint32_t) +#define atomic_uint64_t _Atomic(uint64_t) #define cas_incr(_store, _var) atomic_compare_exchange_strong_explicit(&_store, &_var, _var + 1, memory_order_release, memory_order_relaxed) #define cas_decr(_store, _var) atomic_compare_exchange_strong_explicit(&_store, &_var, _var - 1, memory_order_release, memory_order_relaxed) @@ -55,11 +53,21 @@ extern "C" { #define aquire(_var) atomic_load_explicit(&_var, memory_order_acquire) #define store(_store, _var) atomic_store_explicit(&_store, _var, memory_order_release); -typedef struct fr_atomic_queue_t fr_atomic_queue_t; +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct fr_atomic_queue_s fr_atomic_queue_t; -fr_atomic_queue_t *fr_atomic_queue_create(TALLOC_CTX *ctx, int size); +fr_atomic_queue_t *fr_atomic_queue_alloc(TALLOC_CTX *ctx, size_t size); +void fr_atomic_queue_free(fr_atomic_queue_t **aq); bool fr_atomic_queue_push(fr_atomic_queue_t *aq, void *data); bool fr_atomic_queue_pop(fr_atomic_queue_t *aq, void **p_data); +size_t fr_atomic_queue_size(fr_atomic_queue_t *aq); + +#ifdef WITH_VERIFY_PTR +void fr_atomic_queue_verify(fr_atomic_queue_t *aq); +#endif #ifndef NDEBUG void fr_atomic_queue_debug(fr_atomic_queue_t *aq, FILE *fp); diff --git a/src/include/autoconf.h.in b/src/include/autoconf.h.in index a2e5333..4774482 100644 --- a/src/include/autoconf.h.in +++ b/src/include/autoconf.h.in @@ -658,6 +658,9 @@ /* define if the server was built with -DNDEBUG */ #undef WITH_NDEBUG +/* define if you want RADIUSv11 support (For RADSec et al) */ +#undef WITH_RADIUSV11 + /* define if you want TCP support (For RADSec et al) */ #undef WITH_TCP diff --git a/src/include/build.h b/src/include/build.h index e1c2a1c..c5eaa45 100644 --- a/src/include/build.h +++ b/src/include/build.h @@ -82,6 +82,7 @@ extern "C" { * Macros for controlling warnings in GCC >= 4.2 and clang >= 2.8 */ #if defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 +# define DIAG_UNKNOWN_PRAGMAS pragmas # define DIAG_PRAGMA(_x) PRAGMA(GCC diagnostic _x) # if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 # define DIAG_OFF(_x) DIAG_PRAGMA(push) DIAG_PRAGMA(ignored JOINSTR(-W,_x)) @@ -91,10 +92,12 @@ extern "C" { # define DIAG_ON(_x) DIAG_PRAGMA(warning JOINSTR(-W,_x)) # endif #elif defined(__clang__) && ((__clang_major__ * 100) + __clang_minor__ >= 208) +# define DIAG_UNKNOWN_PRAGMAS unknown-pragmas # define DIAG_PRAGMA(_x) PRAGMA(clang diagnostic _x) # define DIAG_OFF(_x) DIAG_PRAGMA(push) DIAG_PRAGMA(ignored JOINSTR(-W,_x)) # define DIAG_ON(_x) DIAG_PRAGMA(pop) #else +# define DIAG_UNKNOWN_PRAGMAS # define DIAG_OFF(_x) # define DIAG_ON(_x) #endif @@ -155,6 +158,7 @@ extern "C" { #define PRINTF_LIKE(n) CC_HINT(format(printf, n, n+1)) #define NEVER_RETURNS CC_HINT(noreturn) +#define HIDDEN CC_HINT(visibility("hidden")) #define UNUSED CC_HINT(unused) #define BLANK_FORMAT " " /* GCC_LINT whines about empty formats */ diff --git a/src/include/clients.h b/src/include/clients.h index fc6034a..46b5b3b 100644 --- a/src/include/clients.h +++ b/src/include/clients.h @@ -75,6 +75,11 @@ typedef struct radclient { #endif #ifdef WITH_TLS bool tls_required; //!< whether TLS encryption is required. + +#ifdef WITH_RADIUSV11 + char const *radiusv11_name; + fr_radiusv11_t radiusv11; +#endif #endif #ifdef WITH_DYNAMIC_CLIENTS diff --git a/src/include/connection.h b/src/include/connection.h index e63820d..1fd4be4 100644 --- a/src/include/connection.h +++ b/src/include/connection.h @@ -84,6 +84,8 @@ fr_connection_pool_t *fr_connection_pool_module_init(CONF_SECTION *module, */ int fr_connection_pool_get_num(fr_connection_pool_t *pool); +int fr_connection_pool_get_retries(fr_connection_pool_t *pool); + /* * Pool management */ diff --git a/src/include/features-h b/src/include/features-h index fc5c707..158541f 100644 --- a/src/include/features-h +++ b/src/include/features-h @@ -79,3 +79,19 @@ # error Reverse CoA requests requires TLS # endif #endif + +#ifdef WITH_RADIUSV11_ONLY +# define WITH_RADIUSV11 +#else +# ifndef WITHOUT_RADIUSV11 +# ifdef WITH_TLS +//# define WITH_RADIUSV11 +# endif +# endif +#endif + +#ifdef WITH_RADIUSV11 +# ifndef WITH_TLS +# error RADIUSv11 requires TLS +# endif +#endif diff --git a/src/include/libradius.h b/src/include/libradius.h index e5f2251..777927e 100644 --- a/src/include/libradius.h +++ b/src/include/libradius.h @@ -407,6 +407,9 @@ typedef struct radius_packet { size_t partial; int proto; #endif +#ifdef WITH_RADIUSV11 + bool radiusv11; +#endif } RADIUS_PACKET; typedef enum { @@ -427,6 +430,16 @@ typedef enum { DECODE_FAIL_MAX } decode_fail_t; +#ifdef WITH_RADIUSV11 +typedef enum { + FR_RADIUSV11_FORBID = 0, + FR_RADIUSV11_ALLOW, + FR_RADIUSV11_REQUIRE, +} fr_radiusv11_t; + +extern const FR_NAME_NUMBER radiusv11_types[]; +#endif + /* * Version check. */ @@ -531,6 +544,8 @@ RADIUS_PACKET *rad_alloc_reply(TALLOC_CTX *ctx, RADIUS_PACKET *); RADIUS_PACKET *rad_copy_packet(TALLOC_CTX *ctx, RADIUS_PACKET const *in); void rad_free(RADIUS_PACKET **); + +#ifndef WITH_RADIUSV11_ONLY int rad_pwencode(char *encpw, size_t *len, char const *secret, uint8_t const *vector); int rad_pwdecode(char *encpw, size_t len, char const *secret, @@ -543,6 +558,7 @@ ssize_t rad_tunnel_pwdecode(uint8_t *encpw, size_t *len, char const *secret, uint8_t const *vector); int rad_chap_encode(RADIUS_PACKET *packet, uint8_t *output, int id, VALUE_PAIR *password); +#endif int rad_attr_ok(RADIUS_PACKET const *packet, RADIUS_PACKET const *original, DICT_ATTR *da, uint8_t const *data, size_t length); diff --git a/src/include/listen.h b/src/include/listen.h index 3debec3..a82b91d 100644 --- a/src/include/listen.h +++ b/src/include/listen.h @@ -80,6 +80,7 @@ struct rad_listen { #endif bool nodup; bool synchronous; + bool dead; uint32_t workers; #ifdef WITH_TLS @@ -87,11 +88,13 @@ struct rad_listen { bool check_client_connections; bool nonblock; bool blocked; +#ifdef WITH_RADIUSV11 + fr_radiusv11_t radiusv11; +#endif #ifdef WITH_COA_TUNNEL char const *key; /* Originating-Realm-Key */ bool send_coa; /* to the NAS */ - bool dead; uint32_t coa_irt; uint32_t coa_mrc; @@ -190,6 +193,11 @@ typedef struct listen_socket_t { LISTEN_TLS_SETUP, LISTEN_TLS_RUNNING, } state; + +#ifdef WITH_RADIUSV11 + bool alpn_checked; + bool radiusv11; //!< defaults to "no"! +#endif #endif RADCLIENT_LIST *clients; diff --git a/src/include/math.h b/src/include/math.h new file mode 100644 index 0000000..dc7b197 --- /dev/null +++ b/src/include/math.h @@ -0,0 +1,161 @@ +#pragma once +/* + * 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.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** Various miscellaneous utility functions + * + * @file src/lib/util/misc.h + * + * @copyright 2000,2006 The FreeRADIUS server project + */ +RCSIDH(math_h, "$Id$") + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdio.h> +#include <stdlib.h> +#include <stdint.h> + +/** Find the highest order high bit in an unsigned 64 bit integer + * + * @return 0-64 indicating the position of the highest bit, + * with 0 indicating no high bits, 1 indicating the 1st + * bit and 64 indicating the last bit. + */ +static inline uint8_t fr_high_bit_pos(uint64_t num) +{ + if (num == 0) return 0; /* num being zero is undefined behaviour for __builtin_clzll */ + +#ifdef HAVE_BUILTIN_CLZLL + return (64 - __builtin_clzll(num)); +#else + uint8_t ret = 1; + while (num >>= 1) ret++; + return ret; +#endif +} + +/** Find the lowest order high bit in an unsigned 64 bit integer + * + * @return 0-64 indicating the position of the lowest bit, + * with 0 indicating no high bits, 1 indicating the 1st + * bit and 64 indicating the last bit. + */ +static inline uint8_t fr_low_bit_pos(uint64_t num) +{ + if (num == 0) return 0; + +#ifdef HAVE_BUILTIN_CLZLL + return __builtin_ctzll(num) + 1; +#else + uint8_t ret = 1; + + do { + if (num & 0x01) break; + ret++; + } while (num >>= 1); + + return ret; +#endif +} + +/** Efficient calculation of log10 of a unsigned 64bit integer + * + * @param[in] num to calculate log10 of. + * @return log10 of the integer + */ +static inline uint8_t fr_log10(uint64_t num) +{ + static uint64_t const pow_of_10[] = + { + 1ULL, + 10ULL, + 100ULL, + 1000ULL, + 10000ULL, + 100000ULL, + 1000000ULL, + 10000000ULL, + 100000000ULL, + 1000000000ULL, + 10000000000ULL, + 100000000000ULL, + 1000000000000ULL, + 10000000000000ULL, + 100000000000000ULL, + 1000000000000000ULL, + 10000000000000000ULL, + 100000000000000000ULL, + 1000000000000000000ULL, + 10000000000000000000ULL + }; + uint64_t tmp; + + tmp = (fr_high_bit_pos(num) * 1233) >> 12; + return tmp - (num < pow_of_10[tmp]); +} + +/** Multiplies two integers together + * + * @param[in] _out Where to store the result. + * @param[in] _a first argument to multiply. + * @param[in] _b second argument to multiply. + * @return + * - false on overflow. + * - true if there was no overflow. + */ +#define fr_multiply(_out, _a, _b) !__builtin_mul_overflow(_a, _b, _out) + +/** Adds two integers + * + * @param[in] _out Where to store the result. + * @param[in] _a first argument to add. + * @param[in] _b second argument to add. + * @return + * - false on overflow. + * - true if there was no overflow. + */ +#define fr_add(_out, _a, _b) !__builtin_add_overflow(_a, _b, _out) + +/** Subtracts two integers + * + * @param[in] _out Where to store the result. + * @param[in] _a first argument to subtract. + * @param[in] _b second argument to subtract. + * @return + * - false on overflow. + * - true if there was no overflow. + */ +#define fr_sub(_out, _a, _b) !__builtin_sub_overflow(_a, _b, _out) + +/** Round up - Only works if _mul is a power of 2 but avoids division + */ +#define ROUND_UP_POW2(_num, _mul) (((_num) + ((_mul) - 1)) & ~((_mul) - 1)) + +/** Round up - Works in all cases, but is slower + */ +#define ROUND_UP(_num, _mul) (((((_num) + ((_mul) - 1))) / (_mul)) * (_mul)) + +/** Get the ceiling value of integer division + * + */ +#define ROUND_UP_DIV(_x, _y) (1 + (((_x) - 1) / (_y))) + +#ifdef __cplusplus +} +#endif diff --git a/src/include/packet.h b/src/include/packet.h index 7e41a8d..5b41498 100644 --- a/src/include/packet.h +++ b/src/include/packet.h @@ -55,8 +55,11 @@ bool fr_packet_list_id_alloc(fr_packet_list_t *pl, int proto, bool fr_packet_list_id_free(fr_packet_list_t *pl, RADIUS_PACKET *request, bool yank); bool fr_packet_list_socket_add(fr_packet_list_t *pl, int sockfd, int proto, - fr_ipaddr_t *dst_ipaddr, uint16_t dst_port, - void *ctx); +#ifdef WITH_RADIUSV11 + bool radiusv11, +#endif + fr_ipaddr_t *dst_ipaddr, uint16_t dst_port, + void *ctx); bool fr_packet_list_socket_del(fr_packet_list_t *pl, int sockfd); bool fr_packet_list_socket_freeze(fr_packet_list_t *pl, int sockfd); bool fr_packet_list_socket_thaw(fr_packet_list_t *pl, int sockfd); diff --git a/src/include/radiusd.h b/src/include/radiusd.h index 8deed79..594a6bd 100644 --- a/src/include/radiusd.h +++ b/src/include/radiusd.h @@ -357,8 +357,8 @@ extern char const *radacct_dir; extern char const *radlog_dir; extern char const *radlib_dir; extern bool log_stripped_names; -extern char const *radiusd_version; -extern char const *radiusd_version_short; +extern HIDDEN char const *radiusd_version; +extern HIDDEN char const *radiusd_version_short; void radius_signal_self(int flag); typedef enum { @@ -380,9 +380,9 @@ int rad_accounting(REQUEST *); int rad_coa_recv(REQUEST *request); /* session.c */ -int rad_check_ts(fr_ipaddr_t const *nas_addr, uint32_t nas_port, char const *user, char const *sessionid); +int rad_check_ts(fr_ipaddr_t const *nas_addr, uint32_t nas_port, char const *nas_port_id, char const *user, char const *sessionid); int session_zap(REQUEST *request, fr_ipaddr_t const *nas_addr, - uint32_t nas_port, char const *user, + uint32_t nas_port, char const *nas_port_id, char const *user, char const *sessionid, uint32_t cliaddr, char proto, int session_time); diff --git a/src/include/socket.h b/src/include/socket.h new file mode 100644 index 0000000..821c2a0 --- /dev/null +++ b/src/include/socket.h @@ -0,0 +1,53 @@ +#pragma once + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** Functions for establishing and managing low level sockets + * + * @file src/include/socket.h + * + * @author Arran Cudbard-Bell (a.cudbardb@freeradius.org) + * @author Alan DeKok (aland@freeradius.org) + * + * @copyright 2015 The FreeRADIUS project + */ +RCSIDH(socket_h, "$Id$") + +#ifdef __cplusplus +extern "C" { +#endif + +#include <freeradius-devel/build.h> +#include <freeradius-devel/missing.h> + +#ifdef HAVE_SYS_UN_H +# include <sys/un.h> +/* + * The linux headers define the macro as: + * + * # define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \ + * + strlen ((ptr)->sun_path)) + * + * Which trips UBSAN, because it sees an operation on a NULL pointer. + */ +# undef SUN_LEN +# define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path)) +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/include/talloc.h b/src/include/talloc.h new file mode 100644 index 0000000..b9e6abd --- /dev/null +++ b/src/include/talloc.h @@ -0,0 +1,51 @@ +#pragma once +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** Functions which we wish were included in the standard talloc distribution + * + * @file src/lib/util/talloc.h + * + * @copyright 2017 The FreeRADIUS server project + * @copyright 2017 Arran Cudbard-Bell (a.cudbardb@freeradius.org) + */ +RCSIDH(talloc_h, "$Id$") + +#ifdef __cplusplus +extern "C" { +#endif + +#include <ctype.h> +#include <stdbool.h> +#include <stdint.h> + +#ifdef HAVE_WDOCUMENTATION +DIAG_OFF(documentation) +#endif +#include <talloc.h> +#ifdef HAVE_WDOCUMENTATION +DIAG_ON(documentation) +#endif + +#include <freeradius-devel/autoconf.h> /* Very easy to miss including in special builds */ +#include <freeradius-devel/build.h> +#include <freeradius-devel/missing.h> + +TALLOC_CTX *talloc_aligned_array(TALLOC_CTX *ctx, void **start, size_t alignment, size_t size); + +#ifdef __cplusplus +} +#endif diff --git a/src/include/threads.h b/src/include/threads.h index e36d81d..f2aea77 100644 --- a/src/include/threads.h +++ b/src/include/threads.h @@ -49,6 +49,7 @@ static inline int __fr_thread_local_destructor_##_n(pthread_destructor_t *ctx)\ func(_n);\ return 0;\ }\ +DIAG_OFF(deprecated-declarations) \ static inline _t __fr_thread_local_init_##_n(pthread_destructor_t func)\ {\ static pthread_destructor_t *ctx;\ @@ -58,7 +59,9 @@ static inline _t __fr_thread_local_init_##_n(pthread_destructor_t func)\ *ctx = func;\ }\ return _n;\ -} +} \ +DIAG_ON(deprecated-declarations) + # define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f) # define fr_thread_local_set(_n, _v) ((int)!((_n = _v) || 1)) # define fr_thread_local_get(_n) _n diff --git a/src/include/tls-h b/src/include/tls-h index 7bb994b..4bf1665 100644 --- a/src/include/tls-h +++ b/src/include/tls-h @@ -67,7 +67,7 @@ typedef enum { } fr_tls_status_t; extern FR_NAME_NUMBER const fr_tls_status_table[]; -#define MAX_RECORD_SIZE 16384 +#define MAX_RECORD_SIZE 65536 /* * A single TLS record may be up to 16384 octets in length, but a @@ -89,8 +89,8 @@ extern FR_NAME_NUMBER const fr_tls_status_table[]; * or configure TLS not to exceed MAX_RECORD_SIZE. */ typedef struct _record_t { - uint8_t data[MAX_RECORD_SIZE]; size_t used; + uint8_t data[MAX_RECORD_SIZE]; } record_t; typedef struct _tls_info_t { @@ -438,6 +438,11 @@ struct fr_tls_server_conf_t { fr_hash_table_t *realms; char const *client_hostname; + +#ifdef WITH_RADIUSV11 + char const *radiusv11_name; + fr_radiusv11_t radiusv11; +#endif }; #ifdef __cplusplus diff --git a/src/lib/all.mk b/src/lib/all.mk index 3580fdf..eef85d7 100644 --- a/src/lib/all.mk +++ b/src/lib/all.mk @@ -42,7 +42,8 @@ SOURCES := cbuff.c \ tcp.c \ base64.c \ version.c \ - atomic_queue.c + atomic_queue.c \ + talloc.c SRC_CFLAGS := -D_LIBRADIUS -I$(top_builddir)/src diff --git a/src/lib/atomic_queue.c b/src/lib/atomic_queue.c index 605b3a7..cece3c4 100644 --- a/src/lib/atomic_queue.c +++ b/src/lib/atomic_queue.c @@ -20,7 +20,7 @@ * @brief Thread-safe queues. * @file atomic_queue.c * - * @copyright 2016 Alan DeKok <aland@freeradius.org> + * @copyright 2016 Alan DeKok (aland@freeradius.org) * @copyright 2016 Alister Winfield */ RCSID("$Id$") @@ -34,41 +34,60 @@ RCSID("$Id$") #include <freeradius-devel/autoconf.h> #include <freeradius-devel/atomic_queue.h> +#include <freeradius-devel/talloc.h> -/* - * Some macros to make our life easier. - */ -#define atomic_int64_t _Atomic(int64_t) +#define CACHE_LINE_SIZE 64 -typedef struct fr_atomic_queue_entry_t { - alignas(128) void *data; - atomic_int64_t seq; +/** Entry in the queue + * + * @note This structure is cache line aligned for modern AMD/Intel CPUs. + * This is to avoid contention when the producer and consumer are executing + * on different CPU cores. + */ +typedef struct CC_HINT(packed, aligned(CACHE_LINE_SIZE)) { + atomic_int64_t seq; //!< Must be seq then data to ensure + ///< seq is 64bit aligned for 32bit address + ///< spaces. + void *data; } fr_atomic_queue_entry_t; -struct fr_atomic_queue_t { - alignas(128) atomic_int64_t head; - atomic_int64_t tail; +/** Structure to hold the atomic queue + * + */ +struct fr_atomic_queue_s { + alignas(CACHE_LINE_SIZE) atomic_int64_t head; //!< Head, aligned bytes to ensure + ///< it's in a different cache line to tail + ///< to reduce memory contention. + atomic_int64_t tail; + + size_t size; - int size; + void *chunk; //!< To pass to free. The non-aligned address. - fr_atomic_queue_entry_t entry[1]; + alignas(CACHE_LINE_SIZE) fr_atomic_queue_entry_t entry[]; //!< The entry array, also aligned + ///< to ensure it's not in the same cache + ///< line as tail and size. }; /** Create fixed-size atomic queue * + * @note the queue must be freed explicitly by the ctx being freed, or by using + * the #fr_atomic_queue_free function. + * * @param[in] ctx The talloc ctx to allocate the queue in. * @param[in] size The number of entries in the queue. * @return * - NULL on error. * - fr_atomic_queue_t *, a pointer to the allocated and initialized queue. */ -fr_atomic_queue_t *fr_atomic_queue_create(TALLOC_CTX *ctx, int size) +fr_atomic_queue_t *fr_atomic_queue_alloc(TALLOC_CTX *ctx, size_t size) { - int i; - int64_t seq; - fr_atomic_queue_t *aq; + size_t i; + int64_t seq; + fr_atomic_queue_t *aq; + TALLOC_CTX *chunk; - if (size <= 0) return NULL; + if (size == 0) return NULL; /* * Allocate a contiguous blob for the header and queue. @@ -77,10 +96,12 @@ fr_atomic_queue_t *fr_atomic_queue_create(TALLOC_CTX *ctx, int size) * Since we're allocating a blob, we should also set the * name of the data, too. */ - aq = talloc_size(ctx, sizeof(*aq) + (size - 1) * sizeof(aq->entry[0])); - if (!aq) return NULL; + chunk = talloc_aligned_array(ctx, (void **)&aq, CACHE_LINE_SIZE, + sizeof(*aq) + (size) * sizeof(aq->entry[0])); + if (!chunk) return NULL; + aq->chunk = chunk; - talloc_set_name(aq, "fr_atomic_queue_t"); + talloc_set_name_const(chunk, "fr_atomic_queue_t"); /* * Initialize the array. Data is NULL, and indexes are @@ -106,6 +127,18 @@ fr_atomic_queue_t *fr_atomic_queue_create(TALLOC_CTX *ctx, int size) return aq; } +/** Free an atomic queue if it's not freed by ctx + * + * This function is needed because the atomic queue memory + * must be cache line aligned. + */ +void fr_atomic_queue_free(fr_atomic_queue_t **aq) +{ + if (!*aq) return; + + talloc_free((*aq)->chunk); + *aq = NULL; +} /** Push a pointer into the atomic queue * @@ -184,8 +217,8 @@ bool fr_atomic_queue_push(fr_atomic_queue_t *aq, void *data) */ bool fr_atomic_queue_pop(fr_atomic_queue_t *aq, void **p_data) { - int64_t tail, seq; - fr_atomic_queue_entry_t *entry; + int64_t tail, seq; + fr_atomic_queue_entry_t *entry; if (!p_data) return false; @@ -232,12 +265,27 @@ bool fr_atomic_queue_pop(fr_atomic_queue_t *aq, void **p_data) return true; } +size_t fr_atomic_queue_size(fr_atomic_queue_t *aq) +{ + return aq->size; +} + +#ifdef WITH_VERIFY_PTR +/** Check the talloc chunk is still valid + * + */ +void fr_atomic_queue_verify(fr_atomic_queue_t *aq) +{ + (void)talloc_get_type_abort(aq->chunk, fr_atomic_queue_t); +} +#endif + #ifndef NDEBUG #if 0 -typedef struct fr_control_message_t { +typedef struct { int status; //!< status of this message - size_t data_size; //!< size of the data we're sending + size_t data_size; //!< size of the data we're sending int signal; //!< the signal to send uint64_t ack; //!< or the endpoint.. @@ -255,13 +303,13 @@ typedef struct fr_control_message_t { */ void fr_atomic_queue_debug(fr_atomic_queue_t *aq, FILE *fp) { - int i; + size_t i; int64_t head, tail; head = load(aq->head); tail = load(aq->head); - fprintf(fp, "AQ %p size %d, head %" PRId64 ", tail %" PRId64 "\n", + fprintf(fp, "AQ %p size %zu, head %" PRId64 ", tail %" PRId64 "\n", aq, aq->size, head, tail); for (i = 0; i < aq->size; i++) { @@ -269,7 +317,7 @@ void fr_atomic_queue_debug(fr_atomic_queue_t *aq, FILE *fp) entry = &aq->entry[i]; - fprintf(fp, "\t[%d] = { %p, %" PRId64 " }", + fprintf(fp, "\t[%zu] = { %p, %" PRId64 " }", i, entry->data, load(entry->seq)); #if 0 if (entry->data) { @@ -286,4 +334,4 @@ void fr_atomic_queue_debug(fr_atomic_queue_t *aq, FILE *fp) } #endif -#endif /* HAVE_STDALIGN_H */ +#endif /* HAVE_STDALIGN_H */ diff --git a/src/lib/debug.c b/src/lib/debug.c index be702cf..b000903 100644 --- a/src/lib/debug.c +++ b/src/lib/debug.c @@ -958,6 +958,7 @@ void fr_talloc_fault_setup(void) * @param program Name of program currently executing (argv[0]). * @return 0 on success -1 on failure. */ +DIAG_OFF(deprecated-declarations) int fr_fault_setup(char const *cmd, char const *program) { static bool setup = false; @@ -1105,6 +1106,7 @@ int fr_fault_setup(char const *cmd, char const *program) return 0; } +DIAG_ON(deprecated-declarations) /** Set a callback to be called before fr_fault() * diff --git a/src/lib/dict.c b/src/lib/dict.c index c171abd..d425a67 100644 --- a/src/lib/dict.c +++ b/src/lib/dict.c @@ -1342,7 +1342,7 @@ int dict_addvalue(char const *namestr, char const *attrstr, int value) static int sscanf_i(char const *str, unsigned int *pvalue) { - int rcode = 0; + unsigned int rcode = 0; int base = 10; static char const *tab = "0123456789"; diff --git a/src/lib/event.c b/src/lib/event.c index fefa295..9eb9d1a 100644 --- a/src/lib/event.c +++ b/src/lib/event.c @@ -28,6 +28,8 @@ RCSID("$Id$") #include <freeradius-devel/heap.h> #include <freeradius-devel/event.h> +#include <pthread.h> + #ifdef HAVE_KQUEUE #ifndef HAVE_SYS_EVENT_H #error kqueue requires <sys/event.h> @@ -39,6 +41,7 @@ RCSID("$Id$") typedef struct fr_event_fd_t { int fd; + fr_event_fd_handler_t handler; fr_event_fd_handler_t write_handler; void *ctx; @@ -70,6 +73,7 @@ struct fr_event_list_t { int kq; struct kevent events[FR_EV_MAX_FDS]; /* so it doesn't go on the stack every time */ #endif + fr_event_fd_t readers[FR_EV_MAX_FDS]; }; @@ -667,6 +671,7 @@ int fr_event_loop(fr_event_list_t *el) ts_wake = &ts_when; ts_when.tv_sec = when.tv_sec; ts_when.tv_nsec = when.tv_usec * 1000; + } else { ts_wake = NULL; } @@ -778,7 +783,7 @@ static uint32_t event_rand(void) { uint32_t num; - num = rand_pool.randrsl[rand_pool.randcnt++]; + num = rand_pool.randrsl[rand_pool.randcnt++ & 0xff]; if (rand_pool.randcnt == 256) { fr_isaac(&rand_pool); rand_pool.randcnt = 0; diff --git a/src/lib/hash.c b/src/lib/hash.c index f9d0881..9efff6e 100644 --- a/src/lib/hash.c +++ b/src/lib/hash.c @@ -150,10 +150,17 @@ static uint8_t parent_byte[256] = { */ static uint32_t reverse(uint32_t key) { - return ((reversed_byte[key & 0xff] << 24) | - (reversed_byte[(key >> 8) & 0xff] << 16) | - (reversed_byte[(key >> 16) & 0xff] << 8) | - (reversed_byte[(key >> 24) & 0xff])); + /* + * Cast to uint32_t is required because the + * default type of of the expression is an + * int and ubsan correctly complains that + * the result of 0xff << 24 won't fit in an + * unsigned 32bit integer. + */ + return (((uint32_t)reversed_byte[key & 0xff] << 24) | + ((uint32_t)reversed_byte[(key >> 8) & 0xff] << 16) | + ((uint32_t)reversed_byte[(key >> 16) & 0xff] << 8) | + ((uint32_t)reversed_byte[(key >> 24) & 0xff])); } /* diff --git a/src/lib/misc.c b/src/lib/misc.c index 36378ec..b80b9ce 100644 --- a/src/lib/misc.c +++ b/src/lib/misc.c @@ -1254,6 +1254,7 @@ struct in_addr fr_inaddr_mask(struct in_addr const *ipaddr, uint8_t prefix) struct in6_addr fr_in6addr_mask(struct in6_addr const *ipaddr, uint8_t prefix) { uint64_t const *p = (uint64_t const *) ipaddr; + uint64_t addr; /* Needed for alignment */ uint64_t ret[2], *o = ret; if (prefix > 128) prefix = 128; @@ -1263,14 +1264,17 @@ struct in6_addr fr_in6addr_mask(struct in6_addr const *ipaddr, uint8_t prefix) if (prefix >= 64) { prefix -= 64; - *o++ = 0xffffffffffffffffULL & *p++; /* lhs portion masked */ + memcpy(&addr, p, sizeof(addr)); /* Needed for aligned access (ubsan) */ + *o++ = 0xffffffffffffffffULL & addr; /* lhs portion masked */ + p++; } else { ret[1] = 0; /* rhs portion zeroed */ } /* Max left shift is 63 else we get overflow */ if (prefix > 0) { - *o = htonll(~((uint64_t)(0x0000000000000001ULL << (64 - prefix)) - 1)) & *p; + memcpy(&addr, p, sizeof(addr)); /* Needed for aligned access (ubsan) */ + *o = htonll(~((uint64_t)(0x0000000000000001ULL << (64 - prefix)) - 1)) & addr; } else { *o = 0; } diff --git a/src/lib/packet.c b/src/lib/packet.c index acba8d9..971980b 100644 --- a/src/lib/packet.c +++ b/src/lib/packet.c @@ -41,14 +41,30 @@ int fr_packet_cmp(RADIUS_PACKET const *a, RADIUS_PACKET const *b) { int rcode; + if (a->sockfd < b->sockfd) return -1; + if (a->sockfd > b->sockfd) return +1; + /* - * 256-way fanout. + * IDs should be spread effectively randomly */ if (a->id < b->id) return -1; if (a->id > b->id) return +1; - if (a->sockfd < b->sockfd) return -1; - if (a->sockfd > b->sockfd) return +1; +#ifdef WITH_TCP + /* + * TCP sockets have (by definition) the same src/dst + * IP/port combos. We we can just ignore those fields. + */ + if (a->proto == IPPROTO_TCP) { + return 0; + } +#endif + + /* + * RADIUS can have unconnected UDP sockets, in which case + * the socket FD is the same, but the src/dst IP/ports + * may be different. + */ /* * Source ports are pretty much random. @@ -114,6 +130,12 @@ void fr_request_from_reply(RADIUS_PACKET *request, request->id = reply->id; #ifdef WITH_TCP request->proto = reply->proto; + +#ifdef WITH_RADIUSV11 + if (reply->radiusv11) { + memcpy(request->vector, reply->vector, sizeof(request->vector)); + } +#endif #endif request->src_port = reply->dst_port; request->dst_port = reply->src_port; @@ -249,6 +271,12 @@ typedef struct fr_packet_socket_t { int proto; #endif +#ifdef WITH_RADIUSV11 + bool radiusv11; + + uint32_t counter; +#endif + uint8_t id[32]; } fr_packet_socket_t; @@ -348,8 +376,11 @@ bool fr_packet_list_socket_del(fr_packet_list_t *pl, int sockfd) bool fr_packet_list_socket_add(fr_packet_list_t *pl, int sockfd, int proto, - fr_ipaddr_t *dst_ipaddr, uint16_t dst_port, - void *ctx) +#ifdef WITH_RADIUSV11 + bool radiusv11, +#endif + fr_ipaddr_t *dst_ipaddr, uint16_t dst_port, + void *ctx) { int i, start; struct sockaddr_storage src; @@ -394,6 +425,16 @@ bool fr_packet_list_socket_add(fr_packet_list_t *pl, int sockfd, int proto, ps->ctx = ctx; #ifdef WITH_TCP ps->proto = proto; +#ifdef WITH_RADIUSV11 + ps->radiusv11 = radiusv11; + + /* + * Start our packet counter at a random 64-bit number. + */ + if (radiusv11) { + ps->counter = fr_rand(); + } +#endif #endif /* @@ -563,6 +604,11 @@ RADIUS_PACKET **fr_packet_list_find_byreply(fr_packet_list_t *pl, #ifdef WITH_TCP my_request.proto = reply->proto; #endif + +#ifdef WITH_RADIUSV11 + my_request.radiusv11 = reply->radiusv11; +#endif + request = &my_request; return rbtree_finddata(pl->tree, &request); @@ -692,11 +738,6 @@ bool fr_packet_list_id_alloc(fr_packet_list_t *pl, int proto, */ if (ps->dont_use) continue; - /* - * All IDs are allocated: ignore it. - */ - if (ps->num_outgoing == 256) continue; - #ifdef WITH_TCP if (ps->proto != proto) continue; #endif @@ -756,6 +797,36 @@ bool fr_packet_list_id_alloc(fr_packet_list_t *pl, int proto, (fr_ipaddr_cmp(&request->dst_ipaddr, &ps->dst_ipaddr) != 0)) continue; +#ifdef WITH_RADIUSV11 + /* + * RADIUSV11 matches on src/dst IP/port, but + * doesn't care about num_outgoing or ID allocation. + */ + if (ps->radiusv11) { + request->radiusv11 = true; + + fd = ps->sockfd; + + /* + * Increment the counter. It has to be + * unique, but its exact value doesn't + * matter. i.e. the receiver doesn't + * care if it's a counter or a random + * number. + */ + ps->counter++; + id = 0; + memcpy(request->vector, &ps->counter, sizeof(ps->counter)); + memset(request->vector + sizeof(ps->counter), 0, sizeof(request->vector) - sizeof(ps->counter)); + break; + } +#endif + + /* + * All IDs are allocated: ignore it. + */ + if (ps->num_outgoing == 256) continue; + /* * Otherwise, this socket is OK to use. */ @@ -799,6 +870,9 @@ bool fr_packet_list_id_alloc(fr_packet_list_t *pl, int proto, * Set the ID, source IP, and source port. */ request->id = id; +#ifdef WITH_RADIUSV11 + if (ps->radiusv11) request->id = ps->counter; +#endif request->sockfd = ps->sockfd; request->src_ipaddr = ps->src_ipaddr; @@ -818,7 +892,7 @@ bool fr_packet_list_id_alloc(fr_packet_list_t *pl, int proto, * Mark the ID as free. This is the one line from * id_free() that we care about here. */ - ps->id[(request->id >> 3) & 0x1f] &= ~(1 << (request->id & 0x07)); + ps->id[(id >> 3) & 0x1f] &= ~(1 << (id & 0x07)); request->id = -1; request->sockfd = -1; @@ -846,13 +920,13 @@ bool fr_packet_list_id_free(fr_packet_list_t *pl, ps = fr_socket_find(pl, request->sockfd); if (!ps) return false; -#if 0 - if (!ps->id[(request->id >> 3) & 0x1f] & (1 << (request->id & 0x07))) { - fr_exit(1); - } +#ifdef WITH_RADIUSV11 + /* + * RADIUSV11 packets don't track individual IDs. + */ + if (!ps->radiusv11) #endif - - ps->id[(request->id >> 3) & 0x1f] &= ~(1 << (request->id & 0x07)); + ps->id[(request->id >> 3) & 0x1f] &= ~(1 << (request->id & 0x07)); ps->num_outgoing--; pl->num_outgoing--; @@ -1002,7 +1076,7 @@ void fr_packet_header_print(FILE *fp, RADIUS_PACKET *packet, bool received) * This really belongs in a utility library */ if (is_radius_code(packet->code)) { - fprintf(fp, "%s %s Id %i from %s%s%s:%i to %s%s%s:%i length %zu\n", + fprintf(fp, "%s %s Id %i from %s%s%s:%x to %s%s%s:%u length %zu\n", received ? "Received" : "Sent", fr_packet_codes[packet->code], packet->id, @@ -1020,7 +1094,7 @@ void fr_packet_header_print(FILE *fp, RADIUS_PACKET *packet, bool received) packet->dst_port, packet->data_len); } else { - fprintf(fp, "%s code %u Id %i from %s%s%s:%i to %s%s%s:%i length %zu\n", + fprintf(fp, "%s code %u Id %i from %s%s%s:%u to %s%s%s:%i length %zu\n", received ? "Received" : "Sent", packet->code, packet->id, diff --git a/src/lib/pair.c b/src/lib/pair.c index c86deb8..449e0e1 100644 --- a/src/lib/pair.c +++ b/src/lib/pair.c @@ -2303,6 +2303,8 @@ void fr_pair_value_bstrncpy(VALUE_PAIR *vp, void const *src, size_t len) VERIFY_VP(vp); + if (!src) return; + p = talloc_array(vp, char, len + 1); if (!p) return; diff --git a/src/lib/radius.c b/src/lib/radius.c index 524e680..b2de15b 100644 --- a/src/lib/radius.c +++ b/src/lib/radius.c @@ -89,8 +89,10 @@ typedef struct radius_packet_t { static fr_randctx fr_rand_pool; /* across multiple calls */ static int fr_rand_initialized = 0; +#ifndef WITH_RADIUSV11_ONLY static unsigned int salt_offset = 0; static uint8_t nullvector[AUTH_VECTOR_LEN] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* for CoA decode */ +#endif char const *fr_packet_codes[FR_MAX_PACKET_CODE] = { "", //!< 0 @@ -507,6 +509,7 @@ static ssize_t rad_recvfrom(int sockfd, RADIUS_PACKET *packet, int flags, } +#ifndef WITH_RADIUSV11_ONLY #define AUTH_PASS_LEN (AUTH_VECTOR_LEN) /** Build an encrypted secret value to return in a reply packet * @@ -692,6 +695,7 @@ static void make_tunnel_passwd(uint8_t *output, ssize_t *outlen, fr_md5_destroy(&old); fr_md5_destroy(&context); } +#endif /* WITH_RADIUSV11_ONLY */ static int do_next_tlv(VALUE_PAIR const *vp, VALUE_PAIR const *next, int nest) { @@ -936,6 +940,13 @@ static ssize_t vp2data_any(RADIUS_PACKET const *packet, */ if (len > (ssize_t) room) len = room; +#ifdef WITH_RADIUSV11 + /* + * RADIUSV11 does not encrypt any attributes. + */ + if (packet->radiusv11) goto tag; +#endif + /* * Encrypt the various password styles * @@ -943,6 +954,7 @@ static ssize_t vp2data_any(RADIUS_PACKET const *packet, * 128 bytes long. */ switch (vp->da->flags.encrypt) { +#ifndef WITH_RADIUSV11_ONLY case FLAG_ENCRYPT_USER_PASSWORD: make_passwd(ptr, &len, data, len, secret, packet->vector); @@ -996,9 +1008,12 @@ static ssize_t vp2data_any(RADIUS_PACKET const *packet, make_secret(ptr, packet->vector, secret, data, len); len = AUTH_VECTOR_LEN; break; - +#endif /* WITH_RADIUSV11_ONLY */ default: +#ifdef WITH_RADIUSV11 + tag: +#endif if (vp->da->flags.has_tag && TAG_VALID(vp->tag)) { if (vp->da->type == PW_TYPE_STRING) { if (len > ((ssize_t) (room - 1))) len = room - 1; @@ -1591,6 +1606,16 @@ int rad_vp2rfc(RADIUS_PACKET const *packet, * Message-Authenticator is hard-coded. */ if (vp->da->attr == PW_MESSAGE_AUTHENTICATOR) { +#ifdef WITH_RADIUSV11 + /* + * RADIUSV11 does not encode or verify Message-Authenticator. + */ + if (packet->radiusv11) { + *pvp = (*pvp)->next; + return 0; + } +#endif + if (room < 18) return -1; ptr[0] = PW_MESSAGE_AUTHENTICATOR; @@ -1848,9 +1873,23 @@ int rad_encode(RADIUS_PACKET *packet, RADIUS_PACKET const *original, * Build standard header */ hdr->code = packet->code; - hdr->id = packet->id; - memcpy(hdr->vector, packet->vector, sizeof(hdr->vector)); +#ifdef WITH_RADIUSV11 + if (packet->radiusv11) { + uint32_t id = packet->id; + + hdr->id = 0; + + id = htonl(id); + memcpy(hdr->vector, &id, sizeof(id)); + memset(hdr->vector + sizeof(id), 0, sizeof(hdr->vector) - sizeof(id)); + } else +#endif + { + hdr->id = packet->id; + + memcpy(hdr->vector, packet->vector, sizeof(hdr->vector)); + } total_length = RADIUS_HDR_LEN; @@ -1902,6 +1941,25 @@ int rad_encode(RADIUS_PACKET *packet, RADIUS_PACKET const *original, continue; } +#ifdef WITH_RADIUSV11 + /* + * Do not encode Message-Authenticator for RADIUS/1.1 + */ + if ((reply->da->vendor == 0) && (reply->da->attr == PW_MESSAGE_AUTHENTICATOR)) { + reply = reply->next; + continue; + } + + + /* + * Do not encode Original-Packet-Code for RADIUS/1.1 + */ + if (reply->da->vendor == ((unsigned int) PW_EXTENDED_ATTRIBUTE_1 << 24) && (reply->da->attr == 4)) { + reply = reply->next; + continue; + } +#endif + /* * We allow zero-length strings in "unlang", but * skip them (except for CUI, thanks WiMAX!) on @@ -1926,6 +1984,16 @@ int rad_encode(RADIUS_PACKET *packet, RADIUS_PACKET const *original, * length and initial value. */ if (!reply->da->vendor && (reply->da->attr == PW_MESSAGE_AUTHENTICATOR)) { +#ifdef WITH_RADIUSV11 + /* + * RADIUSV11 does not encode or verify Message-Authenticator. + */ + if (packet->radiusv11) { + reply = reply->next; + continue; + } +#endif + if (room < 18) break; /* @@ -1992,15 +2060,37 @@ int rad_encode(RADIUS_PACKET *packet, RADIUS_PACKET const *original, return 0; } +#ifdef WITH_RADIUSV11_ONLY +#define RADIUSV11_UNUSED UNUSED +#else +#define RADIUSV11_UNUSED +#endif /** Sign a previously encoded packet * */ int rad_sign(RADIUS_PACKET *packet, RADIUS_PACKET const *original, - char const *secret) + RADIUSV11_UNUSED char const *secret) { radius_packet_t *hdr = (radius_packet_t *)packet->data; + if (!packet->data || (packet->data_len < RADIUS_HDR_LEN) || + (packet->offset < 0)) { + fr_strerror_printf("ERROR: You must call rad_encode() before rad_sign()"); + return -1; + } + +#ifdef WITH_RADIUSV11 + /* + * RADIUSV11 uses the authenticator field for matching + * requests to responses, and does not otherwise verify + * it. + */ + if (packet->radiusv11) { + return 0; + } +#endif + /* * It wasn't assigned an Id, this is bad! */ @@ -2009,12 +2099,6 @@ int rad_sign(RADIUS_PACKET *packet, RADIUS_PACKET const *original, return -1; } - if (!packet->data || (packet->data_len < RADIUS_HDR_LEN) || - (packet->offset < 0)) { - fr_strerror_printf("ERROR: You must call rad_encode() before rad_sign()"); - return -1; - } - /* * Set up the authentication vector with zero, or with * the original vector, prior to signing. @@ -2051,6 +2135,7 @@ int rad_sign(RADIUS_PACKET *packet, RADIUS_PACKET const *original, if ((fr_debug_lvl > 3) && fr_log_fp) rad_print_hex(packet); #endif +#ifndef WITH_RADIUSV11_ONLY /* * If there's a Message-Authenticator, update it * now. @@ -2097,12 +2182,14 @@ int rad_sign(RADIUS_PACKET *packet, RADIUS_PACKET const *original, memcpy(packet->data + packet->offset + 2, calc_auth_vector, AUTH_VECTOR_LEN); } +#endif /* WITH_RADIUSV11_ONLY */ /* * Copy the request authenticator over to the packet. */ memcpy(hdr->vector, packet->vector, AUTH_VECTOR_LEN); +#ifndef WITH_RADIUSV11_ONLY /* * Switch over the packet code, deciding how to * sign the packet. @@ -2137,6 +2224,7 @@ int rad_sign(RADIUS_PACKET *packet, RADIUS_PACKET const *original, break; } }/* switch over packet codes */ +#endif /* WITH_RADIUSV11_ONLY */ return 0; } @@ -2229,7 +2317,7 @@ int rad_digest_cmp(uint8_t const *a, uint8_t const *b, size_t length) return result; /* 0 is OK, !0 is !OK, just like memcmp */ } - +#ifndef WITH_RADIUSV11_ONLY /** Validates the requesting client NAS * * Calculates the request Authenticator based on the clients private key. @@ -2307,6 +2395,7 @@ static int calc_replydigest(RADIUS_PACKET *packet, RADIUS_PACKET *original, if (rad_digest_cmp(packet->vector, calc_digest, AUTH_VECTOR_LEN) != 0) return 2; return 0; } +#endif /* WITH_RADIUSV11_ONLY */ /** Check if a set of RADIUS formatted TLVs are OK * @@ -2419,12 +2508,14 @@ bool rad_packet_ok(RADIUS_PACKET *packet, int flags, decode_fail_t *reason) int count; radius_packet_t *hdr; char host_ipaddr[128]; +#ifndef WITH_RADIUSV11_ONLY bool require_ma = false; bool seen_ma = false; - uint32_t num_attributes; - decode_fail_t failure = DECODE_FAIL_NONE; bool eap = false; bool non_eap = false; +#endif + uint32_t num_attributes; + decode_fail_t failure = DECODE_FAIL_NONE; /* * Check for packets smaller than the packet header. @@ -2617,6 +2708,7 @@ bool rad_packet_ok(RADIUS_PACKET *packet, int flags, decode_fail_t *reason) goto finish; } +#ifndef WITH_RADIUSV11_ONLY /* * Sanity check the attributes for length. */ @@ -2640,6 +2732,13 @@ bool rad_packet_ok(RADIUS_PACKET *packet, int flags, decode_fail_t *reason) break; case PW_MESSAGE_AUTHENTICATOR: +#ifdef WITH_RADIUSV11 + /* + * RADIUSV11 does not encode or verify Message-Authenticator. + */ + if (packet->radiusv11) break; +#endif + if (attr[1] != 2 + AUTH_VECTOR_LEN) { FR_DEBUG_STRERROR_PRINTF("Malformed RADIUS packet from host %s: Message-Authenticator has invalid length %d", inet_ntop(packet->src_ipaddr.af, @@ -2652,6 +2751,7 @@ bool rad_packet_ok(RADIUS_PACKET *packet, int flags, decode_fail_t *reason) seen_ma = true; break; } +#endif /* * FIXME: Look up the base 255 attributes in the @@ -2705,7 +2805,14 @@ bool rad_packet_ok(RADIUS_PACKET *packet, int flags, decode_fail_t *reason) * Similarly, Status-Server packets MUST contain * Message-Authenticator attributes. */ - if (require_ma && !seen_ma) { + if (require_ma && +#ifdef WITH_RADIUSV11 + /* + * RADIUSV11 does not encode or verify Message-Authenticator. + */ + !packet->radiusv11 && +#endif + !seen_ma) { FR_DEBUG_STRERROR_PRINTF("Insecure packet from host %s: Packet does not contain required Message-Authenticator attribute", inet_ntop(packet->src_ipaddr.af, &packet->src_ipaddr.ipaddr, @@ -2714,6 +2821,7 @@ bool rad_packet_ok(RADIUS_PACKET *packet, int flags, decode_fail_t *reason) goto finish; } +#ifndef WITH_RADIUSV11_ONLY if (eap && non_eap) { FR_DEBUG_STRERROR_PRINTF("Bad packet from host %s: Packet contains EAP-Message and non-EAP authentication attribute", inet_ntop(packet->src_ipaddr.af, @@ -2722,12 +2830,21 @@ bool rad_packet_ok(RADIUS_PACKET *packet, int flags, decode_fail_t *reason) failure = DECODE_FAIL_TOO_MANY_AUTH; goto finish; } +#endif /* * Fill RADIUS header fields */ packet->code = hdr->code; packet->id = hdr->id; +#ifdef WITH_RADIUSV11 + if (packet->radiusv11) { + uint32_t id; + + memcpy(&id, hdr->vector, sizeof(id)); + packet->id = ntohl(id); + } +#endif memcpy(packet->vector, hdr->vector, AUTH_VECTOR_LEN); @@ -2820,16 +2937,29 @@ RADIUS_PACKET *rad_recv(TALLOC_CTX *ctx, int fd, int flags) /** Verify the Request/Response Authenticator (and Message-Authenticator if present) of a packet * */ -int rad_verify(RADIUS_PACKET *packet, RADIUS_PACKET *original, char const *secret) +int rad_verify(RADIUS_PACKET *packet, RADIUSV11_UNUSED RADIUS_PACKET *original, RADIUSV11_UNUSED char const *secret) { uint8_t *ptr; int length; int attrlen; +#ifndef WITH_RADIUSV11_ONLY int rcode; +#endif char buffer[32]; if (!packet || !packet->data) return -1; +#ifdef WITH_RADIUSV11 + /* + * RADIUSV11 uses the authenticator field for matching + * requests to responses, and does not otherwise verify + * it. + */ + if (packet->radiusv11) { + return 0; + } +#endif + /* * Before we allocate memory for the attributes, do more * sanity checking. @@ -2837,11 +2967,14 @@ int rad_verify(RADIUS_PACKET *packet, RADIUS_PACKET *original, char const *secre ptr = packet->data + RADIUS_HDR_LEN; length = packet->data_len - RADIUS_HDR_LEN; while (length > 0) { +#ifndef WITH_RADIUSV11_ONLY uint8_t msg_auth_vector[AUTH_VECTOR_LEN]; uint8_t calc_auth_vector[AUTH_VECTOR_LEN]; +#endif attrlen = ptr[1]; +#ifndef WITH_RADIUSV11_ONLY switch (ptr[0]) { default: /* don't do anything. */ break; @@ -2851,6 +2984,13 @@ int rad_verify(RADIUS_PACKET *packet, RADIUS_PACKET *original, char const *secre * attribute is invalid. */ case PW_MESSAGE_AUTHENTICATOR: +#ifdef WITH_RADIUSV11 + /* + * Ignore Message-Authenticator for RADIUSV11 packets. + */ + if (packet->radiusv11) break; +#endif + memcpy(msg_auth_vector, &ptr[2], sizeof(msg_auth_vector)); memset(&ptr[2], 0, AUTH_VECTOR_LEN); @@ -2908,6 +3048,7 @@ int rad_verify(RADIUS_PACKET *packet, RADIUS_PACKET *original, char const *secre memcpy(packet->data + 4, packet->vector, AUTH_VECTOR_LEN); break; } /* switch over the attributes */ +#endif /* WITH_RADIUSV11_ONLY */ ptr += attrlen; length -= attrlen; @@ -2928,6 +3069,16 @@ int rad_verify(RADIUS_PACKET *packet, RADIUS_PACKET *original, char const *secre return -1; } +#ifndef WITH_RADIUSV11_ONLY +#ifdef WITH_RADIUSV11 + /* + * RADIUSV11 uses the authenticator field for matching + * requests to responses, and does not otherwise verify + * it. + */ + if (packet->radiusv11) return 0; +#endif + /* * Calculate and/or verify Request or Response Authenticator. */ @@ -2988,6 +3139,7 @@ int rad_verify(RADIUS_PACKET *packet, RADIUS_PACKET *original, char const *secre packet->src_port); return -1; } +#endif return 0; } @@ -3831,8 +3983,12 @@ ssize_t data2vp(TALLOC_CTX *ctx, * then decode the tag. */ if (da->flags.has_tag && (datalen > 1) && - ((data[0] < 0x20) || - (da->flags.encrypt == FLAG_ENCRYPT_TUNNEL_PASSWORD))) { + ((data[0] < 0x20) +#ifndef WITH_RADIUSV11_ONLY + || (da->flags.encrypt == FLAG_ENCRYPT_TUNNEL_PASSWORD) +#endif + )) { + /* * Only "short" attributes can be encrypted. */ @@ -3855,10 +4011,20 @@ ssize_t data2vp(TALLOC_CTX *ctx, data = buffer; } +#ifndef WITH_RADIUSV11_ONLY /* * Decrypt the attribute. */ - if (secret && packet && (da->flags.encrypt != FLAG_ENCRYPT_NONE)) { + if (secret && packet && + +#ifdef WITH_RADIUSV11 + /* + * RADIUSV11 does not encrypt any attributes. + */ + !packet->radiusv11 && +#endif + + (da->flags.encrypt != FLAG_ENCRYPT_NONE)) { VP_TRACE("data2vp: decrypting type %u\n", da->flags.encrypt); /* * Encrypted attributes can only exist for the @@ -3954,6 +4120,7 @@ ssize_t data2vp(TALLOC_CTX *ctx, break; } /* switch over encryption flags */ } +#endif /* WITH_RADIUSV11_ONLY */ /* * Double-check the length after decrypting the @@ -4486,6 +4653,26 @@ int rad_decode(RADIUS_PACKET *packet, RADIUS_PACKET *original, while (packet_length > 0) { ssize_t my_len; +#ifdef WITH_RADIUSV11 + /* + * Don't decode Message-Authenticator + */ + if (ptr[0] == PW_MESSAGE_AUTHENTICATOR) { + packet_length -= ptr[1]; + ptr += ptr[1]; + continue; + } + + /* + * Don't decode Original-Packet-Code + */ + if ((ptr[0] == PW_EXTENDED_ATTRIBUTE_1) && (ptr[1] >= 3) && (ptr[2] == 4)) { + packet_length -= ptr[1]; + ptr += ptr[1]; + continue; + } +#endif + /* * This may return many VPs */ @@ -4545,7 +4732,7 @@ int rad_decode(RADIUS_PACKET *packet, RADIUS_PACKET *original, return 0; } - +#ifndef WITH_RADIUSV11_ONLY /** Encode password * * We assume that the passwd buffer passed is big enough. @@ -4945,6 +5132,7 @@ int rad_chap_encode(RADIUS_PACKET *packet, uint8_t *output, int id, return 0; } +#endif /* WITH_RADIUSV11_ONLYx */ /** Seed the random number generator @@ -4996,7 +5184,7 @@ void fr_rand_seed(void const *data, size_t size) if (!hash) hash = fr_rand(); hash = fr_hash_update(data, size, hash); - fr_rand_pool.randmem[fr_rand_pool.randcnt] ^= hash; + fr_rand_pool.randmem[fr_rand_pool.randcnt & 0xff] ^= hash; } @@ -5014,7 +5202,7 @@ uint32_t fr_rand(void) fr_rand_seed(NULL, 0); } - num = fr_rand_pool.randrsl[fr_rand_pool.randcnt++]; + num = fr_rand_pool.randrsl[fr_rand_pool.randcnt++ & 0xff]; if (fr_rand_pool.randcnt >= 256) { fr_rand_pool.randcnt = 0; fr_isaac(&fr_rand_pool); @@ -5096,6 +5284,9 @@ RADIUS_PACKET *rad_alloc_reply(TALLOC_CTX *ctx, RADIUS_PACKET *packet) #ifdef WITH_TCP reply->proto = packet->proto; +#ifdef WITH_RADIUSV11 + reply->radiusv11 = packet->radiusv11; +#endif #endif return reply; } @@ -5151,3 +5342,13 @@ RADIUS_PACKET *rad_copy_packet(TALLOC_CTX *ctx, RADIUS_PACKET const *in) return out; } + +#ifdef WITH_RADIUSV11 +const FR_NAME_NUMBER radiusv11_types[] = { + { "forbid", FR_RADIUSV11_FORBID }, + { "allow", FR_RADIUSV11_ALLOW }, + { "require", FR_RADIUSV11_REQUIRE }, + { NULL, 0 } + +}; +#endif diff --git a/src/lib/socket.c b/src/lib/socket.c index 3c88b78..970f4f4 100644 --- a/src/lib/socket.c +++ b/src/lib/socket.c @@ -24,14 +24,10 @@ * * @copyright 2015 The FreeRADIUS project */ - #include <freeradius-devel/libradius.h> +#include <freeradius-devel/libradius.h> +#include <freeradius-devel/socket.h> #ifdef HAVE_SYS_UN_H -# include <sys/un.h> -# ifndef SUN_LEN -# define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path)) -# endif - /** Open a Unix socket * * @note If the file doesn't exist then errno will be set to ENOENT. diff --git a/src/lib/talloc.c b/src/lib/talloc.c new file mode 100644 index 0000000..a2af16a --- /dev/null +++ b/src/lib/talloc.c @@ -0,0 +1,74 @@ +/* + * 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.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** Functions which we wish were included in the standard talloc distribution + * + * @file src/lib/talloc.c + * + * @copyright 2017 The FreeRADIUS server project + * @copyright 2017 Arran Cudbard-Bell (a.cudbardb@freeradius.org) + */ +RCSID("$Id$") + +#include <freeradius-devel/math.h> +#include <freeradius-devel/libradius.h> +#include <freeradius-devel/talloc.h> + +/** Return a page aligned talloc memory array + * + * Because we can't intercept talloc's malloc() calls, we need to do some tricks + * in order to get the first allocation in the array page aligned, and to limit + * the size of the array to a multiple of the page size. + * + * The reason for wanting a page aligned talloc array, is it allows us to + * mprotect() the pages that belong to the array. + * + * Talloc chunks appear to be allocated within the protected region, so this should + * catch frees too. + * + * @param[in] ctx to allocate array memory in. + * @param[out] start The first aligned address in the array. + * @param[in] alignment What alignment the memory chunk should have. + * @param[in] size How big to make the array. Will be corrected to a multiple + * of the page size. The actual array size will be size + * rounded to a multiple of the (page_size), + page_size + * @return + * - A talloc chunk on success. + * - NULL on failure. + */ +TALLOC_CTX *talloc_aligned_array(TALLOC_CTX *ctx, void **start, size_t alignment, size_t size) +{ + size_t rounded; + size_t array_size; + void *next; + TALLOC_CTX *array; + + rounded = ROUND_UP(size, alignment); /* Round up to a multiple of the page size */ + if (rounded == 0) rounded = alignment; + + array_size = rounded + alignment; + array = talloc_array(ctx, uint8_t, array_size); /* Over allocate */ + if (!array) { + fr_strerror_printf("Out of memory"); + return NULL; + } + + next = (void *)ROUND_UP((uintptr_t)array, alignment); /* Round up address to the next multiple */ + *start = next; + + return array; +} + diff --git a/src/main/auth.c b/src/main/auth.c index 76f87b7..84889b8 100644 --- a/src/main/auth.c +++ b/src/main/auth.c @@ -318,6 +318,10 @@ int rad_postauth(REQUEST *request) postauth_type = vp->vp_integer; RDEBUG2("Using Post-Auth-Type %s", dict_valnamebyattr(PW_POST_AUTH_TYPE, 0, postauth_type)); + + if (postauth_type == PW_POST_AUTH_TYPE_CHALLENGE) request->reply->code = PW_CODE_ACCESS_CHALLENGE; + + if (postauth_type == PW_POST_AUTH_TYPE_REJECT) request->reply->code = PW_CODE_ACCESS_REJECT; } result = process_post_auth(postauth_type, request); diff --git a/src/main/cb.c b/src/main/cb.c index f8b2edb..db764aa 100644 --- a/src/main/cb.c +++ b/src/main/cb.c @@ -147,7 +147,7 @@ void cbtls_msg(int write_p, int msg_version, int content_type, */ if ((content_type > UINT8_MAX) && (content_type != SSL3_RT_INNER_CONTENT_TYPE)) { #endif - DEBUG4("(TLS) Ignoring cbtls_msg call with pseudo content type %i, version %i", + DEBUG4("(TLS) Ignoring cbtls_msg call with pseudo content type %i, version %08x", content_type, msg_version); return; } diff --git a/src/main/client.c b/src/main/client.c index b5c38d4..12f7824 100644 --- a/src/main/client.c +++ b/src/main/client.c @@ -179,7 +179,8 @@ bool client_add(RADCLIENT_LIST *clients, RADCLIENT *client) * Initialize the global list, if not done already. */ if (!root_clients) { - root_clients = client_list_init(NULL); + root_clients = cf_data_find(main_config.config, "clients"); + if (!root_clients) root_clients = client_list_init(main_config.config); if (!root_clients) { ERROR("Cannot add client - failed creating client list"); return false; @@ -534,6 +535,10 @@ static const CONF_PARSER client_config[] = { { "rate_limit", FR_CONF_OFFSET(PW_TYPE_BOOLEAN, RADCLIENT, rate_limit), NULL }, #endif +#ifdef WITH_RADIUSV11 + { "radiusv1_1", FR_CONF_OFFSET(PW_TYPE_STRING, RADCLIENT, radiusv11_name), NULL }, +#endif + CONF_PARSER_TERMINATOR }; @@ -1044,6 +1049,20 @@ RADCLIENT *client_afrom_cs(TALLOC_CTX *ctx, CONF_SECTION *cs, bool in_server, bo cl_srcipaddr = NULL; } +#ifdef WITH_RADIUSV11 + if (c->tls_required && c->radiusv11_name) { + int rcode; + + rcode = fr_str2int(radiusv11_types, c->radiusv11_name, -1); + if (rcode < 0) { + cf_log_err_cs(cs, "Invalid value for 'radiusv11'"); + goto error; + } + + c->radiusv11 = rcode; + } +#endif + /* * A response_window of zero is OK, and means that it's * ignored by the rest of the server timers. diff --git a/src/main/command.c b/src/main/command.c index 12d1afd..988f43b 100644 --- a/src/main/command.c +++ b/src/main/command.c @@ -28,19 +28,13 @@ #include <freeradius-devel/md5.h> #include <freeradius-devel/channel.h> #include <freeradius-devel/connection.h> +#include <freeradius-devel/socket.h> #include <libgen.h> #ifdef HAVE_INTTYPES_H #include <inttypes.h> #endif -#ifdef HAVE_SYS_UN_H -#include <sys/un.h> -#ifndef SUN_LEN -#define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path)) -#endif -#endif - #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif diff --git a/src/main/conffile.c b/src/main/conffile.c index 8a9297b..7bb206c 100644 --- a/src/main/conffile.c +++ b/src/main/conffile.c @@ -353,6 +353,7 @@ error: file->filename = filename; file->cs = cs; + file->from_dir = from_dir; if (fstat(fd, &file->buf) == 0) { #ifdef S_IWOTH @@ -1803,6 +1804,7 @@ static void cf_section_parse_init(CONF_SECTION *cs, void *base, CONF_PARSER const *variables) { int i; + void *data; for (i = 0; variables[i].name != NULL; i++) { if (variables[i].type == PW_TYPE_SUBSECTION) { @@ -1827,9 +1829,13 @@ static void cf_section_parse_init(CONF_SECTION *cs, void *base, subcs->item.lineno = cs->item.lineno; cf_item_add(cs, &(subcs->item)); } + if (base) { + data = ((uint8_t *)base) + variables[i].offset; + } else { + data = NULL; + } - cf_section_parse_init(subcs, (uint8_t *)base + variables[i].offset, - (CONF_PARSER const *) variables[i].dflt); + cf_section_parse_init(subcs, data, (CONF_PARSER const *) variables[i].dflt); continue; } @@ -1927,8 +1933,13 @@ int cf_section_parse(CONF_SECTION *cs, void *base, CONF_PARSER const *variables) goto finish; } - ret = cf_section_parse(subcs, (uint8_t *)base + variables[i].offset, - (CONF_PARSER const *) variables[i].dflt); + if (base) { + data = ((uint8_t *)base) + variables[i].offset; + } else { + data = NULL; + } + + ret = cf_section_parse(subcs, data, (CONF_PARSER const *) variables[i].dflt); if (ret < 0) goto finish; continue; } /* else it's a CONF_PAIR */ diff --git a/src/main/connection.c b/src/main/connection.c index b5a0eea..7ae4a2a 100644 --- a/src/main/connection.c +++ b/src/main/connection.c @@ -97,6 +97,8 @@ struct fr_connection_pool_t { uint32_t spare; //!< Number of spare connections to try. uint32_t pending; //!< Number of pending open connections. uint32_t retry_delay; //!< seconds to delay re-open after a failed open. + uint32_t max_retries; //!< Maximum number of retries to attempt for any given + //!< operation (e.g. query or bind) uint32_t cleanup_interval; //!< Initial timer for how often we sweep the pool //!< for free connections. (0 is infinite). int delay_interval; //!< When we next do a cleanup. Initialized to @@ -158,6 +160,7 @@ static const CONF_PARSER connection_config[] = { { "cleanup_interval", FR_CONF_OFFSET(PW_TYPE_INTEGER, fr_connection_pool_t, cleanup_interval), "30" }, { "idle_timeout", FR_CONF_OFFSET(PW_TYPE_INTEGER, fr_connection_pool_t, idle_timeout), "60" }, { "retry_delay", FR_CONF_OFFSET(PW_TYPE_INTEGER, fr_connection_pool_t, retry_delay), "1" }, + { "max_retries", FR_CONF_OFFSET(PW_TYPE_INTEGER, fr_connection_pool_t, max_retries), "5" }, { "spread", FR_CONF_OFFSET(PW_TYPE_BOOLEAN, fr_connection_pool_t, spread), "no" }, CONF_PARSER_TERMINATOR }; @@ -1257,6 +1260,18 @@ int fr_connection_pool_get_num(fr_connection_pool_t *pool) return pool->stats.num; } +/** Get the number of times an operation should be retried + * + * The lower of either the number of available connections or + * the configured max_retries. + * + * @param pool to get the retry count for. + * @return the number of times an operation can be retried. + */ +int fr_connection_pool_get_retries(fr_connection_pool_t *pool) +{ + return (pool->max_retries < pool->stats.num) ? pool->max_retries : pool->stats.num; +} /** Get the number of connections currently in the pool * diff --git a/src/main/listen.c b/src/main/listen.c index 53c6079..ee73a57 100644 --- a/src/main/listen.c +++ b/src/main/listen.c @@ -52,6 +52,17 @@ RCSID("$Id$") #include <sys/stat.h> #endif +#ifdef WITH_TLS +#include <netinet/tcp.h> + +# ifdef __APPLE__ +# if !defined(SOL_TCP) && defined(IPPROTO_TCP) +# define SOL_TCP IPPROTO_TCP +# endif +# endif + +#endif + #ifdef DEBUG_PRINT_PACKET static void print_packet(RADIUS_PACKET *packet) { @@ -708,6 +719,159 @@ static int tls_sni_callback(SSL *ssl, UNUSED int *al, void *arg) } #endif +#ifdef WITH_RADIUSV11 +static const unsigned char radiusv11_alpn_protos[] = { + 10, 'r', 'a', 'd', 'i', 'u', 's', '/', '1', '.', '1', +}; + +/* + * On the server, get the ALPN list requested by the client. + */ +static int radiusv11_server_alpn_cb(SSL *ssl, + const unsigned char **out, + unsigned char *outlen, + const unsigned char *in, + unsigned int inlen, + void *arg) +{ + rad_listen_t *this = arg; + listen_socket_t *sock = this->data; + unsigned char **hack; + const unsigned char *server; + unsigned int server_len, i; + int rcode; + REQUEST *request; + + request = (REQUEST *)SSL_get_ex_data(ssl, FR_TLS_EX_INDEX_REQUEST); + fr_assert(request != NULL); + + fr_assert(inlen > 0); + + memcpy(&hack, &out, sizeof(out)); /* const issues */ + + /* + * The RADIUSv11 configuration for this socket is a combination of what we require, and what we + * require of the client. + */ + switch (this->radiusv11) { + /* + * If we forbid RADIUSv11, then we never advertised it via ALPN, and this callback should + * never have been registered. + */ + case FR_RADIUSV11_FORBID: + *out = NULL; + *outlen = 0; + return SSL_TLSEXT_ERR_OK; + + case FR_RADIUSV11_ALLOW: + case FR_RADIUSV11_REQUIRE: + server = radiusv11_alpn_protos; + server_len = sizeof(radiusv11_alpn_protos); + break; + } + + for (i = 0; i < inlen; i += in[0] + 1) { + RDEBUG("(TLS) ALPN sent by client is \"%.*s\"", in[i], &in[i + 1]); + } + + /* + * Select the next protocol. + */ + rcode = SSL_select_next_proto(hack, outlen, server, server_len, in, inlen); + if (rcode == OPENSSL_NPN_NEGOTIATED) { + server = *out; + + /* + * Tell our socket which protocol we negotiated. + */ + fr_assert(*outlen == 10); + sock->radiusv11 = (server[9] == '1'); + + RDEBUG("(TLS) ALPN server negotiated application protocol \"%.*s\"", (int) *outlen, server); + return SSL_TLSEXT_ERR_OK; + } + + /* + * No common ALPN. + */ + RDEBUG("(TLS) ALPN failure - no protocols in common"); + return SSL_TLSEXT_ERR_ALERT_FATAL; +} + +int fr_radiusv11_client_init(fr_tls_server_conf_t *tls); +int fr_radiusv11_client_get_alpn(rad_listen_t *listener); + +int fr_radiusv11_client_init(fr_tls_server_conf_t *tls) +{ + switch (tls->radiusv11) { + case FR_RADIUSV11_ALLOW: + case FR_RADIUSV11_REQUIRE: + if (SSL_CTX_set_alpn_protos(tls->ctx, radiusv11_alpn_protos, sizeof(radiusv11_alpn_protos)) != 0) { + ERROR("Failed setting RADIUSv11 negotiation flags"); + return -1; + } + break; + + default: + break; + } + + return 0; +} + +int fr_radiusv11_client_get_alpn(rad_listen_t *listener) +{ + const unsigned char *data; + unsigned int len; + listen_socket_t *sock = listener->data; + + SSL_get0_alpn_selected(sock->ssn->ssl, &data, &len); + if (!data) { + DEBUG("(TLS) ALPN home server did not send any application protocol"); + if (listener->radiusv11 == FR_RADIUSV11_REQUIRE) { + DEBUG("(TLS) We have 'radiusv11 = require', but the home server has not negotiated it - closing socket"); + return -1; + } + + DEBUG("(TLS) ALPN assuming historical RADIUS"); + return 0; + } + + DEBUG("(TLS) ALPN home server sent application protocol \"%.*s\"", (int) len, data); + + if (len != 10) { + radiusv11_unknown: + DEBUG("(TLS) ALPN home server sent unknown application protocol - closing connection"); + return -1; + } + + /* + * Should always be "radius/1.1". The server MUST echo back one of the strings + * we sent. If it doesn't, it's a bad server. + */ + if (memcmp(data, "radius/1.1", 10) != 0) goto radiusv11_unknown; + + /* + * Double-check what the server sent us. It SHOULD be sane, but it never hurts to check. + */ + switch (listener->radiusv11) { + case FR_RADIUSV11_FORBID: + DEBUG("(TLS) ALPN home server sent \"radius/v1.1\" but we forbid it - closing connection to home server"); + return -1; + + case FR_RADIUSV11_ALLOW: + case FR_RADIUSV11_REQUIRE: + DEBUG("(TLS) ALPN using \"radius/1.1\""); + sock->radiusv11 = true; + break; + } + + sock->alpn_checked = true; + return 0; +} +#endif + + static int dual_tcp_accept(rad_listen_t *listener) { int newfd; @@ -770,6 +934,35 @@ static int dual_tcp_accept(rad_listen_t *listener) close(newfd); return 0; } + +#ifdef WITH_RADIUSV11 + if (listener->tls) { + switch (listener->tls->radiusv11) { + case FR_RADIUSV11_FORBID: + if (client->radiusv11 == FR_RADIUSV11_REQUIRE) { + INFO("Ignoring new connection as client is marked as 'radiusv11 = require', and this socket has 'radiusv11 = forbid'"); + close(newfd); + return 0; + } + break; + + case FR_RADIUSV11_ALLOW: + /* + * We negotiate it as per the client recommendations (forbid, allow, require) + */ + break; + + case FR_RADIUSV11_REQUIRE: + if (client->radiusv11 == FR_RADIUSV11_FORBID) { + INFO("Ignoring new connection as client is marked as 'radiusv11 = forbid', and this socket has 'radiusv11 = require'"); + close(newfd); + return 0; + } + break; + } + } +#endif + #endif /* @@ -862,6 +1055,9 @@ static int dual_tcp_accept(rad_listen_t *listener) #ifdef WITH_TLS if (this->tls) { + this->recv = dual_tls_recv; + this->send = dual_tls_send; + /* * Set up SNI callback. We don't do it * in the main TLS code, because EAP @@ -869,9 +1065,18 @@ static int dual_tcp_accept(rad_listen_t *listener) */ SSL_CTX_set_tlsext_servername_callback(this->tls->ctx, tls_sni_callback); SSL_CTX_set_tlsext_servername_arg(this->tls->ctx, this->tls); - - this->recv = dual_tls_recv; - this->send = dual_tls_send; +#ifdef WITH_RADIUSV11 + /* + * Default is "forbid" (0). In which case we don't set any ALPN callbacks, and + * the ServerHello does not contain an ALPN section. + */ + if (client->radiusv11 != FR_RADIUSV11_FORBID) { + SSL_CTX_set_alpn_select_cb(this->tls->ctx, radiusv11_server_alpn_cb, this); + DEBUG("(TLS) ALPN radiusv11 = allow / require"); + } else { + DEBUG("(TLS) ALPN radiusv11 = forbid"); + } +#endif } #endif } @@ -1270,9 +1475,20 @@ int common_socket_parse(CONF_SECTION *cs, rad_listen_t *this) } #endif - rcode = cf_item_parse(cs, "check_client_connections", FR_ITEM_POINTER(PW_TYPE_BOOLEAN, &this->check_client_connections), "no"); if (rcode < 0) return -1; + +#ifdef WITH_RADIUSV11 + if (this->tls->radiusv11_name) { + rcode = fr_str2int(radiusv11_types, this->tls->radiusv11_name, -1); + if (rcode < 0) { + cf_log_err_cs(cs, "Invalid value for 'radiusv11'"); + return -1; + } + + this->radiusv11 = this->tls->radiusv11 = rcode; + } +#endif } #else /* WITH_TLS */ /* @@ -2343,6 +2559,11 @@ static int client_socket_encode(TLS_UNUSED rad_listen_t *listener, REQUEST *requ */ listen_socket_t *sock = listener->data; if (sock->state == LISTEN_TLS_CHECKING) return 0; + +#ifdef WITH_RADIUSV11 + request->reply->radiusv11 = sock->radiusv11; +#endif + #endif if (!request->reply->code) return 0; @@ -2373,7 +2594,11 @@ static int client_socket_encode(TLS_UNUSED rad_listen_t *listener, REQUEST *requ static int client_socket_decode(UNUSED rad_listen_t *listener, REQUEST *request) { #ifdef WITH_TLS - listen_socket_t *sock; + listen_socket_t *sock = request->listener->data; + +#ifdef WITH_RADIUSV11 + request->packet->radiusv11 = sock->radiusv11; +#endif #endif if (rad_verify(request->packet, NULL, @@ -2382,9 +2607,6 @@ static int client_socket_decode(UNUSED rad_listen_t *listener, REQUEST *request) } #ifdef WITH_TLS - sock = request->listener->data; - rad_assert(sock != NULL); - /* * FIXME: Add the rest of the TLS parameters, too? But * how do we separate EAP-TLS parameters from RADIUS/TLS @@ -2406,8 +2628,20 @@ static int client_socket_decode(UNUSED rad_listen_t *listener, REQUEST *request) } #ifdef WITH_PROXY -static int proxy_socket_encode(UNUSED rad_listen_t *listener, REQUEST *request) +#ifdef WITH_RADIUSV11 +#define RADIUSV11_UNUSED +#else +#define RADIUSV11_UNUSED UNUSED +#endif + +static int proxy_socket_encode(RADIUSV11_UNUSED rad_listen_t *listener, REQUEST *request) { +#ifdef WITH_RADIUSV11 + listen_socket_t *sock = listener->data; + + request->proxy->radiusv11 = sock->radiusv11; +#endif + if (rad_encode(request->proxy, NULL, request->home_server->secret) < 0) { RERROR("Failed encoding proxied packet: %s", fr_strerror()); @@ -2431,6 +2665,12 @@ static int proxy_socket_encode(UNUSED rad_listen_t *listener, REQUEST *request) static int proxy_socket_decode(UNUSED rad_listen_t *listener, REQUEST *request) { +#ifdef WITH_RADIUSV11 + listen_socket_t *sock = listener->data; + + request->proxy_reply->radiusv11 = sock->radiusv11; +#endif + /* * rad_verify is run in event.c, received_proxy_response() */ @@ -3020,6 +3260,7 @@ static rad_listen_t *listen_alloc(TALLOC_CTX *ctx, RAD_LISTEN_TYPE type) this->encode = master_listen[this->type].encode; this->decode = master_listen[this->type].decode; } else { + this->send = NULL; /* proxy packets shouldn't call this! */ this->proxy_send = master_listen[this->type].send; this->proxy_encode = master_listen[this->type].encode; this->proxy_decode = master_listen[this->type].decode; @@ -3033,6 +3274,7 @@ static rad_listen_t *listen_alloc(TALLOC_CTX *ctx, RAD_LISTEN_TYPE type) } #ifdef WITH_PROXY + /* * Externally visible function for creating a new proxy LISTENER. * @@ -3130,6 +3372,10 @@ rad_listen_t *proxy_new_listener(TALLOC_CTX *ctx, home_server_t *home, uint16_t (void) SSL_set_tlsext_host_name(sock->ssn->ssl, (void *) (uintptr_t) home->tls->client_hostname); } +#ifdef WITH_RADIUSV11 + this->radiusv11 = home->tls->radiusv11; +#endif + this->nonblock |= home->nonblock; /* @@ -3147,6 +3393,20 @@ rad_listen_t *proxy_new_listener(TALLOC_CTX *ctx, home_server_t *home, uint16_t ERROR("(TLS) Failed adding tracking informtion for proxy socket '%s'", buffer); goto error; } + +#ifdef TCP_NODELAY + /* + * Also set TCP_NODELAY, to force the data to be written quickly. + */ + if (sock->proto == IPPROTO_TCP) { + int on = 1; + + if (setsockopt(this->fd, SOL_TCP, TCP_NODELAY, &on, sizeof(on)) < 0) { + ERROR("(TLS) Failed to set TCP_NODELAY: %s", fr_syserror(errno)); + goto error; + } + } +#endif } /* @@ -3158,11 +3418,28 @@ rad_listen_t *proxy_new_listener(TALLOC_CTX *ctx, home_server_t *home, uint16_t goto error; } +#ifdef WITH_RADIUSV11 + /* + * Must not have alpn_checked yet. This code only runs for blocking sockets. + */ + if (sock->ssn->connected && (fr_radiusv11_client_get_alpn(this) < 0)) { + goto error; + } +#endif + sock->connect_timeout = home->connect_timeout; this->recv = proxy_tls_recv; this->proxy_send = proxy_tls_send; +#ifdef HAVE_PTHREAD_H + if (pthread_mutex_init(&sock->mutex, NULL) < 0) { + rad_assert(0 == 1); + listen_free(&this); + return 0; + } +#endif + /* * Make sure that this listener is associated with the home server. * diff --git a/src/main/map.c b/src/main/map.c index a1464e3..e59fcec 100644 --- a/src/main/map.c +++ b/src/main/map.c @@ -1108,6 +1108,11 @@ int map_to_request(REQUEST *request, vp_map_t const *map, radius_map_getvalue_t */ if (((map->lhs->tmpl_list == PAIR_LIST_COA) || (map->lhs->tmpl_list == PAIR_LIST_DM)) && !request->coa) { + if (request->parent) { + REDEBUG("You can only do 'update coa' when processing a packet which was received from the network"); + return -2; + } + if ((request->packet->code == PW_CODE_COA_REQUEST) || (request->packet->code == PW_CODE_DISCONNECT_REQUEST)) { REDEBUG("You cannot do 'update coa' when processing a CoA / Disconnect request. Use 'update request' instead."); @@ -1218,9 +1223,10 @@ int map_to_request(REQUEST *request, vp_map_t const *map, radius_map_getvalue_t */ num = map->lhs->tmpl_num; (void) fr_cursor_init(&dst_list, list); - if (num != NUM_ANY) { + if ((num != NUM_ANY) && (num > 0)) { while ((dst = fr_cursor_next_by_da(&dst_list, map->lhs->tmpl_da, map->lhs->tmpl_tag))) { - if (num-- == 0) break; + if (num <= 0) break; + num--; } } else { dst = fr_cursor_next_by_da(&dst_list, map->lhs->tmpl_da, map->lhs->tmpl_tag); diff --git a/src/main/modules.c b/src/main/modules.c index e18977d..fd4334d 100644 --- a/src/main/modules.c +++ b/src/main/modules.c @@ -1639,6 +1639,11 @@ int module_hup_module(CONF_SECTION *cs, module_instance_t *node, time_t when) if ((node->last_hup + 2) >= when) return 1; node->last_hup = when; + /* + * Clear any old instances before attempting to reload + */ + module_instance_free_old(cs, node, when); + cf_log_module(cs, "Trying to reload module \"%s\"", node->name); /* @@ -1662,8 +1667,6 @@ int module_hup_module(CONF_SECTION *cs, module_instance_t *node, time_t when) INFO(" Module: Reloaded module \"%s\"", node->name); - module_instance_free_old(cs, node, when); - /* * Save the old instance handle for later deletion. */ diff --git a/src/main/process.c b/src/main/process.c index 3ca3524..ed77839 100644 --- a/src/main/process.c +++ b/src/main/process.c @@ -2471,6 +2471,9 @@ static int insert_into_proxy_hash(REQUEST *request) sock = this->data; if (!fr_packet_list_socket_add(proxy_list, this->fd, sock->proto, +#ifdef WITH_RADIUSV11 + sock->radiusv11, +#endif &sock->other_ipaddr, sock->other_port, this)) { @@ -2517,7 +2520,9 @@ static int insert_into_proxy_hash(REQUEST *request) return 0; } +#ifndef WITH_RADIUSV11 rad_assert(request->proxy->id >= 0); +#endif request->proxy_listener = proxy_listener; request->in_proxy_hash = true; @@ -2784,11 +2789,17 @@ int request_proxy_reply(RADIUS_PACKET *packet) * ignore it. This does the MD5 calculations in the * server core, but I guess we can fix that later. */ - if (!request->proxy_reply && - (rad_verify(packet, request->proxy, - request->home_server->secret) != 0)) { - DEBUG("Ignoring spoofed proxy reply. Signature is invalid"); - return 0; + if (!request->proxy_reply) { + if (!request->home_server) { + proxy_reply_too_late(request); + return 0; + } + + if (rad_verify(packet, request->proxy, + request->home_server->secret) != 0) { + DEBUG("Ignoring spoofed proxy reply. Signature is invalid"); + return 0; + } } /* @@ -3623,7 +3634,9 @@ static int request_proxy(REQUEST *request) return -1; } +#ifndef WITH_RADIUSV11 rad_assert(request->proxy->id >= 0); +#endif if (rad_debug_lvl) { struct timeval *response_window; @@ -3632,6 +3645,14 @@ static int request_proxy(REQUEST *request) #ifdef WITH_TLS if (request->home_server->tls) { +#ifdef WITH_RADIUSV11 + listen_socket_t *sock = request->proxy_listener->data; + + if (sock->radiusv11) { + fr_pair_delete_by_num(&request->proxy->vps, PW_MESSAGE_AUTHENTICATOR, 0, TAG_ANY); + } +#endif + RDEBUG2("Proxying request to home server %s port %d (TLS) timeout %d.%06d", inet_ntop(request->proxy->dst_ipaddr.af, &request->proxy->dst_ipaddr.ipaddr, @@ -4022,8 +4043,8 @@ static void ping_home_server(void *ctx) rad_assert(request->proxy_listener != NULL); request->proxy_listener->proxy_encode(request->proxy_listener, request); debug_packet(request, request->proxy, false); - request->proxy_listener->send(request->proxy_listener, - request); + request->proxy_listener->proxy_send(request->proxy_listener, + request); /* * Add +/- 2s of jitter, as suggested in RFC 3539 @@ -4355,7 +4376,7 @@ static void proxy_wait_for_reply(REQUEST *request, int action) home->last_packet_sent = now.tv_sec; request->proxy->timestamp = now; debug_packet(request, request->proxy, false); - request->proxy_listener->send(request->proxy_listener, request); + request->proxy_listener->proxy_send(request->proxy_listener, request); break; case FR_ACTION_TIMER: @@ -5331,15 +5352,14 @@ static void event_status(struct timeval *wake) } } -#ifdef WITH_TCP static void listener_free_cb(void *ctx) { rad_listen_t *this = talloc_get_type_abort(ctx, rad_listen_t); + listen_socket_t *sock = this->data; char buffer[1024]; if (this->count > 0) { struct timeval when; - listen_socket_t *sock = this->data; fr_event_now(el, &when); when.tv_sec += 3; @@ -5360,9 +5380,13 @@ static void listener_free_cb(void *ctx) this->print(this, buffer, sizeof(buffer)); DEBUG("... cleaning up socket %s", buffer); rad_assert(this->next == NULL); +#ifdef WITH_TCP + fr_event_delete(el, &sock->ev); +#endif talloc_free(this); } +#ifdef WITH_TCP #ifdef WITH_PROXY static int proxy_eol_cb(void *ctx, void *data) { @@ -5407,6 +5431,7 @@ static int proxy_eol_cb(void *ctx, void *data) static void event_new_fd(rad_listen_t *this) { char buffer[1024]; + listen_socket_t *sock = NULL; ASSERT_MASTER; @@ -5414,10 +5439,12 @@ static void event_new_fd(rad_listen_t *this) this->print(this, buffer, sizeof(buffer)); - if (this->status == RAD_LISTEN_STATUS_INIT) { - listen_socket_t *sock = this->data; - + if (this->type != RAD_LISTEN_DETAIL) { + sock = this->data; rad_assert(sock != NULL); + } + + if (this->status == RAD_LISTEN_STATUS_INIT) { if (just_started) { DEBUG("Listening on %s", buffer); @@ -5464,6 +5491,7 @@ static void event_new_fd(rad_listen_t *this) */ case RAD_LISTEN_PROXY: #ifdef WITH_TCP + rad_assert(sock != NULL); rad_assert((sock->proto == IPPROTO_UDP) || (sock->home != NULL)); /* @@ -5538,6 +5566,9 @@ static void event_new_fd(rad_listen_t *this) PTHREAD_MUTEX_LOCK(&proxy_mutex); if (!fr_packet_list_socket_add(proxy_list, this->fd, sock->proto, +#ifdef WITH_RADIUSV11 + sock->radiusv11, +#endif &sock->other_ipaddr, sock->other_port, this)) { ERROR("Failed adding coa proxy socket"); @@ -5593,7 +5624,6 @@ static void event_new_fd(rad_listen_t *this) */ if (this->count > 0) { struct timeval when; - listen_socket_t *sock = this->data; /* * Try again to clean up the socket in 30 @@ -5655,7 +5685,6 @@ static void event_new_fd(rad_listen_t *this) */ if (this->count > 0) { struct timeval when; - listen_socket_t *sock = this->data; /* * Try again to clean up the socket in 30 @@ -5681,15 +5710,15 @@ static void event_new_fd(rad_listen_t *this) } /* socket is at EOL */ #endif /* WITH_TCP */ + if (this->dead) goto wait_some_more; + /* * Nuke the socket. */ if (this->status == RAD_LISTEN_STATUS_REMOVE_NOW) { int devnull; -#ifdef WITH_TCP - listen_socket_t *sock = this->data; - struct timeval when; -#endif + + this->dead = true; /* * Re-open the socket, pointing it to /dev/null. @@ -5735,6 +5764,7 @@ static void event_new_fd(rad_listen_t *this) #endif ) { home_server_t *home; + sock = this->data; home = sock->home; if (!home || !home->limit.max_connections) { @@ -5788,16 +5818,6 @@ static void event_new_fd(rad_listen_t *this) * EOL all requests using this socket. */ rbtree_walk(pl, RBTREE_DELETE_ORDER, eol_listener, this); - -#ifdef WITH_COA_TUNNEL - /* - * Delete the listener from the set of - * listeners by key. This is done early, - * so that it won't be used while the - * cleanup timers are being run. - */ - if (this->tls) this->dead = true; -#endif } /* @@ -5805,7 +5825,10 @@ static void event_new_fd(rad_listen_t *this) */ if (!spawn_flag) { ASSERT_MASTER; - if (sock->ev) fr_event_delete(el, &sock->ev); + + if (this->type != RAD_LISTEN_DETAIL && sock && sock->ev) { + fr_event_delete(el, &sock->ev); + } listen_free(&this); return; } @@ -5813,14 +5836,8 @@ static void event_new_fd(rad_listen_t *this) /* * Wait until all requests using this socket are done. */ - gettimeofday(&when, NULL); - when.tv_sec += 3; - - ASSERT_MASTER; - if (!fr_event_insert(el, listener_free_cb, this, &when, - &(sock->ev))) { - rad_panic("Failed to insert event"); - } + wait_some_more: + listener_free_cb(this); #endif /* WITH_TCP */ } @@ -6062,6 +6079,9 @@ static void create_default_proxy_listener(int af) sock = this->data; if (!fr_packet_list_socket_add(proxy_list, this->fd, sock->proto, +#ifdef WITH_RADIUSV11 + sock->radiusv11, +#endif &sock->other_ipaddr, sock->other_port, this)) { ERROR("Failed adding proxy socket"); diff --git a/src/main/radattr.c b/src/main/radattr.c index 5789275..8accd0d 100644 --- a/src/main/radattr.c +++ b/src/main/radattr.c @@ -59,6 +59,8 @@ pid_t rad_waitpid(pid_t pid, int *status) } #endif +static TALLOC_CTX *autofree; + static ssize_t xlat_test(UNUSED void *instance, UNUSED REQUEST *request, UNUSED char const *fmt, UNUSED char *out, UNUSED size_t outlen) { @@ -562,10 +564,10 @@ static void parse_xlat(char const *input, char *output, size_t outlen) { ssize_t slen; char const *error = NULL; - char *fmt = talloc_typed_strdup(NULL, input); + char *fmt = talloc_typed_strdup(autofree, input); xlat_exp_t *head; - slen = xlat_tokenize(fmt, fmt, &head, &error); + slen = xlat_tokenize(autofree, fmt, &head, &error); if (slen <= 0) { snprintf(output, outlen, "ERROR offset %d '%s'", (int) -slen, error); return; @@ -573,6 +575,7 @@ static void parse_xlat(char const *input, char *output, size_t outlen) if (input[slen] != '\0') { snprintf(output, outlen, "ERROR offset %d 'Too much text'", (int) slen); + talloc_free(fmt); return; } @@ -724,7 +727,7 @@ static void process_file(const char *root_dir, char const *filename) p += 7; } - if (fr_pair_list_afrom_str(NULL, p, &head) != T_EOL) { + if (fr_pair_list_afrom_str(autofree, p, &head) != T_EOL) { strlcpy(output, fr_strerror(), sizeof(output)); continue; } @@ -742,6 +745,7 @@ static void process_file(const char *root_dir, char const *filename) if (len < 0) { fprintf(stderr, "Failed encoding %s: %s\n", vp->da->name, fr_strerror()); + fr_pair_list_free(&head); exit(1); } @@ -772,7 +776,7 @@ static void process_file(const char *root_dir, char const *filename) my_len = 0; while (len > 0) { vp = NULL; - my_len = rad_attr2vp(NULL, my_packet, my_original, my_secret, attr, len, &vp); + my_len = rad_attr2vp(autofree, my_packet, my_original, my_secret, attr, len, &vp); if (my_len < 0) { fr_pair_list_free(&head); break; @@ -806,7 +810,8 @@ static void process_file(const char *root_dir, char const *filename) vp_prints(p, sizeof(output) - (p - output), vp); p += strlen(p); - if (vp->next) {strcpy(p, ", "); + if (vp->next) { + strcpy(p, ", "); p += 2; } } @@ -818,6 +823,7 @@ static void process_file(const char *root_dir, char const *filename) } else { /* zero-length attribute */ *output = '\0'; } + continue; } @@ -915,6 +921,8 @@ static void process_file(const char *root_dir, char const *filename) } vp_prints(output, sizeof(output), head); + + fr_pair_list_free(&head); continue; } @@ -1034,6 +1042,10 @@ int main(int argc, char *argv[]) char const *dict_dir = DICTDIR; int *inst = &c; +DIAG_OFF(deprecated-declarations) + autofree = talloc_autofree_context(); +DIAG_ON(deprecated-declarations) + cf_new_escape = true; /* fix the tests */ #ifndef NDEBUG diff --git a/src/main/radclient.c b/src/main/radclient.c index 37bd406..49da461 100644 --- a/src/main/radclient.c +++ b/src/main/radclient.c @@ -935,6 +935,9 @@ static int send_one_packet(rc_request_t *request) #endif } if (!fr_packet_list_socket_add(pl, mysockfd, ipproto, +#ifdef WITH_RADIUSV11 + false, +#endif &request->packet->dst_ipaddr, request->packet->dst_port, NULL)) { ERROR("Can't add new socket"); @@ -1202,6 +1205,7 @@ packet_done: return 0; } +DIAG_OFF(deprecated-declarations) int main(int argc, char **argv) { int c; @@ -1524,8 +1528,11 @@ int main(int argc, char **argv) exit(1); } - if (!fr_packet_list_socket_add(pl, sockfd, ipproto, &server_ipaddr, - server_port, NULL)) { + if (!fr_packet_list_socket_add(pl, sockfd, ipproto, +#ifdef WITH_RADIUSV11 + false, +#endif + &server_ipaddr, server_port, NULL)) { ERROR("Out of memory"); exit(1); } @@ -1702,3 +1709,4 @@ int main(int argc, char **argv) exit(0); } +DIAG_ON(deprecated-declarations) diff --git a/src/main/radiusd.c b/src/main/radiusd.c index 06b566d..f2acec7 100644 --- a/src/main/radiusd.c +++ b/src/main/radiusd.c @@ -717,6 +717,7 @@ cleanup: if (main_config.memory_report) { INFO("Allocated memory at time of report:"); fr_log_talloc_report(NULL); + talloc_disable_null_tracking(); } return rcode; diff --git a/src/main/realms.c b/src/main/realms.c index d707f08..2959d82 100644 --- a/src/main/realms.c +++ b/src/main/realms.c @@ -93,6 +93,9 @@ static const FR_NAME_NUMBER home_proto[] = { { NULL, 0 } }; +#ifdef WITH_RADIUSV11 +extern int fr_radiusv11_client_init(fr_tls_server_conf_t *tls); +#endif static realm_config_t *realm_config = NULL; @@ -1129,6 +1132,24 @@ home_server_t *home_server_afrom_cs(TALLOC_CTX *ctx, realm_config_t *rc, CONF_SE home->listeners = rbtree_create(home, listener_cmp, NULL, RBTREE_FLAG_LOCK); if (!home->listeners) goto error; + +#ifdef WITH_RADIUSV11 + if (home->tls->radiusv11_name) { + rcode = fr_str2int(radiusv11_types, home->tls->radiusv11_name, -1); + if (rcode < 0) { + cf_log_err_cs(cs, "Invalid value for 'radiusv11'"); + goto error; + } + + home->tls->radiusv11 = rcode; + + if (fr_radiusv11_client_init(home->tls) < 0) { + cf_log_err_cs(cs, "Failed setting OpenSSL callbacks for radiusv11"); + goto error; + } + } +#endif + } #endif } /* end of parse home server */ @@ -2682,7 +2703,7 @@ void home_server_update_request(home_server_t *home, REQUEST *request) * the 'hints' file. */ request->proxy->vps = fr_pair_list_copy(request->proxy, - request->packet->vps); + request->packet->vps); } /* @@ -2702,6 +2723,9 @@ void home_server_update_request(home_server_t *home, REQUEST *request) * unless one already exists. */ if ((request->packet->code == PW_CODE_ACCESS_REQUEST) && +#ifdef WITH_RADIUSV11 + !request->proxy->radiusv11 && +#endif !fr_pair_find_by_num(request->proxy->vps, PW_MESSAGE_AUTHENTICATOR, 0, TAG_ANY)) { fr_pair_make(request->proxy, &request->proxy->vps, "Message-Authenticator", "0x00", diff --git a/src/main/session.c b/src/main/session.c index 8dbf5a6..ddec8ff 100644 --- a/src/main/session.c +++ b/src/main/session.c @@ -35,7 +35,7 @@ RCSID("$Id$") * End a session by faking a Stop packet to all accounting modules. */ int session_zap(REQUEST *request, fr_ipaddr_t const *nasaddr, uint32_t nas_port, - char const *user, + char const *nas_port_id, char const *user, char const *sessionid, uint32_t cliaddr, char proto, int session_time) { @@ -91,7 +91,11 @@ int session_zap(REQUEST *request, fr_ipaddr_t const *nasaddr, uint32_t nas_port, STRINGPAIR(PW_USER_NAME, user); stopreq->username = vp; - INTPAIR(PW_NAS_PORT, nas_port); + if (!nas_port_id) { + INTPAIR(PW_NAS_PORT, nas_port); + } else { + STRINGPAIR(PW_NAS_PORT_ID, nas_port_id); + } STRINGPAIR(PW_ACCT_SESSION_ID, sessionid); if(proto == 'P') { INTPAIR(PW_SERVICE_TYPE, PW_FRAMED_USER); @@ -134,7 +138,7 @@ int session_zap(REQUEST *request, fr_ipaddr_t const *nasaddr, uint32_t nas_port, * 1 The user is logged in. * 2 Some error occured. */ -int rad_check_ts(fr_ipaddr_t const *nasaddr, uint32_t nas_port, char const *user, +int rad_check_ts(fr_ipaddr_t const *nasaddr, uint32_t nas_port, char const *nas_port_id, char const *user, char const *session_id) { pid_t pid, child_pid; @@ -206,16 +210,20 @@ int rad_check_ts(fr_ipaddr_t const *nasaddr, uint32_t nas_port, char const *user closefrom(3); inet_ntop(nasaddr->af, &(nasaddr->ipaddr), address, sizeof(address)); - snprintf(port, sizeof(port), "%u", nas_port); + + if (!nas_port_id) { + snprintf(port, sizeof(port), "%u", nas_port); + nas_port_id = port; + } #ifdef __EMX__ /* OS/2 can't directly execute scripts then we call the command processor to execute checkrad */ - execl(getenv("COMSPEC"), "", "/C","checkrad", cl->nas_type, address, port, + execl(getenv("COMSPEC"), "", "/C","checkrad", cl->nas_type, address, nas_port_id, user, session_id, NULL); #else - execl(main_config.checkrad, "checkrad", cl->nas_type, address, port, + execl(main_config.checkrad, "checkrad", cl->nas_type, address, nas_port_id, user, session_id, NULL); #endif ERROR("Check-TS: exec %s: %s", main_config.checkrad, fr_syserror(errno)); @@ -238,7 +246,7 @@ int rad_check_ts(fr_ipaddr_t const *nasaddr, UNUSED unsigned int nas_port, /* WITH_SESSION_MGMT */ int session_zap(UNUSED REQUEST *request, fr_ipaddr_t const *nasaddr, UNUSED uint32_t nas_port, - UNUSED char const *user, + UNUSED char const *nas_port_id, UNUSED char const *user, UNUSED char const *sessionid, UNUSED uint32_t cliaddr, UNUSED char proto, UNUSED int session_time) { @@ -246,7 +254,7 @@ int session_zap(UNUSED REQUEST *request, fr_ipaddr_t const *nasaddr, UNUSED uint } int rad_check_ts(fr_ipaddr_t const *nasaddr, UNUSED unsigned int nas_port, - UNUSED char const *user, UNUSED char const *session_id) + UNUSED char const *nas_port_id, UNUSED char const *user, UNUSED char const *session_id) { ERROR("Simultaneous-Use is not supported"); return 2; diff --git a/src/main/state.c b/src/main/state.c index 3694fe6..3700062 100644 --- a/src/main/state.c +++ b/src/main/state.c @@ -270,8 +270,11 @@ static REQUEST *fr_state_cleanup_request(state_entry_t *entry) request->handle = rad_postauth; /* - * Move session-state VPS over + * Move session-state VPS over, after first freeing the + * separately-parented state_ctx that was allocated along with the + * fake request. */ + talloc_free(request->state_ctx); request->state_ctx = entry->ctx; request->state = entry->vps; diff --git a/src/main/stats.c b/src/main/stats.c index c1e4ec9..a5c672e 100644 --- a/src/main/stats.c +++ b/src/main/stats.c @@ -90,6 +90,8 @@ static void stats_time(fr_stats_t *stats, struct timeval *start, void request_stats_final(REQUEST *request) { + rad_listen_t *listener; + if (request->master_state == REQUEST_COUNTED) return; if (!request->listener) return; @@ -108,26 +110,32 @@ void request_stats_final(REQUEST *request) if (request->packet->code == PW_CODE_STATUS_SERVER) return; + /* + * Deal with TCP / TLS issues. The statistics are kept in the parent socket. + */ + listener = request->listener; + if (listener->parent) listener = listener->parent; + #undef INC_AUTH -#define INC_AUTH(_x) radius_auth_stats._x++;request->listener->stats._x++;request->client->auth._x++; +#define INC_AUTH(_x) radius_auth_stats._x++;listener->stats._x++;request->client->auth._x++; #undef INC_ACCT #ifdef WITH_ACCOUNTING -#define INC_ACCT(_x) radius_acct_stats._x++;request->listener->stats._x++;request->client->acct._x++ +#define INC_ACCT(_x) radius_acct_stats._x++;listener->stats._x++;request->client->acct._x++ #else #define INC_ACCT(_x) #endif #undef INC_COA #ifdef WITH_COA -#define INC_COA(_x) radius_coa_stats._x++;request->listener->stats._x++;request->client->coa._x++ +#define INC_COA(_x) radius_coa_stats._x++;listener->stats._x++;request->client->coa._x++ #else #define INC_COA(_x) #endif #undef INC_DSC #ifdef WITH_DSC -#define INC_DSC(_x) radius_dsc_stats._x++;request->listener->stats._x++;request->client->dsc._x++ +#define INC_DSC(_x) radius_dsc_stats._x++;listener->stats._x++;request->client->dsc._x++ #else #define INC_DSC(_x) #endif @@ -156,7 +164,7 @@ void request_stats_final(REQUEST *request) stats_time(&request->client->auth, &request->packet->timestamp, &request->reply->timestamp); - stats_time(&request->listener->stats, + stats_time(&listener->stats, &request->packet->timestamp, &request->reply->timestamp); break; @@ -341,7 +349,6 @@ void request_stats_final(REQUEST *request) if (request->max_time) { - rad_listen_t *listener = request->listener; RADCLIENT *client = request->client; switch (request->packet->code) { @@ -787,6 +794,9 @@ void request_stats_reply(REQUEST *request) * Not found: don't do anything */ this = listener_find_byipaddr(&ipaddr, server_port->vp_integer, IPPROTO_UDP); +#ifdef WITH_TCP + if (!this) this = listener_find_byipaddr(&ipaddr, server_port->vp_integer, IPPROTO_TCP); +#endif if (!this) { stats_error(request, "No such listener"); return; @@ -861,6 +871,9 @@ void request_stats_reply(REQUEST *request) * Not found: don't do anything */ home = home_server_find(&ipaddr, server_port->vp_integer, IPPROTO_UDP); +#ifdef WITH_TCP + if (!home) home = home_server_find(&ipaddr, server_port->vp_integer, IPPROTO_TCP); +#endif if (!home) { stats_error(request, "Failed to find home server IP"); return; diff --git a/src/main/threads.c b/src/main/threads.c index 774affc..a187106 100644 --- a/src/main/threads.c +++ b/src/main/threads.c @@ -234,7 +234,7 @@ static const CONF_PARSER thread_config[] = { }; #endif -#ifdef HAVE_OPENSSL_CRYPTO_H +#if defined(HAVE_OPENSSL_CRYPTO_H) && defined(HAVE_CRYPTO_SET_LOCKING_CALLBACK) /* * If we're linking against OpenSSL, then it is the @@ -247,78 +247,64 @@ static const CONF_PARSER thread_config[] = { * right now, but may in the future, so we will have * to add them at some point. */ - static pthread_mutex_t *ssl_mutexes = NULL; -#ifdef HAVE_CRYPTO_SET_ID_CALLBACK -static unsigned long get_ssl_id(void) -{ - unsigned long ret; - pthread_t thread = pthread_self(); - - if (sizeof(ret) >= sizeof(thread)) { - memcpy(&ret, &thread, sizeof(thread)); - } else { - memcpy(&ret, &thread, sizeof(ret)); - } - - return ret; -} - -/* - * Use preprocessor magic to get the right function and argument - * to use. This avoids ifdef's through the rest of the code. - */ -#if OPENSSL_VERSION_NUMBER < 0x10000000L -#define ssl_id_function get_ssl_id -#define set_id_callback CRYPTO_set_id_callback - -#else -static void ssl_id_function(CRYPTO_THREADID *id) -{ - CRYPTO_THREADID_set_numeric(id, get_ssl_id()); -} -#define set_id_callback CRYPTO_THREADID_set_callback -#endif -#endif - -#ifdef HAVE_CRYPTO_SET_LOCKING_CALLBACK static void ssl_locking_function(int mode, int n, UNUSED char const *file, UNUSED int line) { + rad_assert(&ssl_mutexes[n] != NULL); + if (mode & CRYPTO_LOCK) { - pthread_mutex_lock(&(ssl_mutexes[n])); + pthread_mutex_lock(&ssl_mutexes[n]); } else { - pthread_mutex_unlock(&(ssl_mutexes[n])); + pthread_mutex_unlock(&ssl_mutexes[n]); } } -#endif /* * Create the TLS mutexes. */ int tls_mutexes_init(void) { - int i; + int i, num; - ssl_mutexes = rad_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t)); + rad_assert(ssl_mutexes == NULL); + + num = CRYPTO_num_locks(); + + ssl_mutexes = rad_malloc(num * sizeof(pthread_mutex_t)); if (!ssl_mutexes) { ERROR("Error allocating memory for SSL mutexes!"); return -1; } - for (i = 0; i < CRYPTO_num_locks(); i++) { - pthread_mutex_init(&(ssl_mutexes[i]), NULL); + for (i = 0; i < num; i++) { + pthread_mutex_init(&ssl_mutexes[i], NULL); } -#ifdef HAVE_CRYPTO_SET_ID_CALLBACK - set_id_callback(ssl_id_function); -#endif -#ifdef HAVE_CRYPTO_SET_LOCKING_CALLBACK CRYPTO_set_locking_callback(ssl_locking_function); -#endif return 0; } + +static void tls_mutexes_destroy(void) +{ +#ifdef HAVE_CRYPTO_SET_LOCKING_CALLBACK + int i, num; + + rad_assert(ssl_mutex != NULL); + + num = CRYPTO_num_locks(); + + for (i = 0; i < num; i++) { + pthread_mutex_destroy(&ssl_mutexes[i]); + } + free(ssl_mutexes); + + CRYPTO_set_locking_callback(NULL); +#endif +} +#else +#define tls_mutexes_destroy() #endif #ifdef WNOHANG @@ -1036,6 +1022,7 @@ static int pid_cmp(void const *one, void const *two) * * FIXME: What to do on a SIGHUP??? */ +DIAG_OFF(deprecated-declarations) int thread_pool_init(CONF_SECTION *cs, bool *spawn_flag) { #ifndef WITH_GCD @@ -1046,6 +1033,9 @@ int thread_pool_init(CONF_SECTION *cs, bool *spawn_flag) time_t now; #ifdef HAVE_STDATOMIC_H int num; + TALLOC_CTX *autofree; + + autofree = talloc_autofree_context(); #endif now = time(NULL); @@ -1166,7 +1156,7 @@ int thread_pool_init(CONF_SECTION *cs, bool *spawn_flag) */ for (i = 0; i < NUM_FIFOS; i++) { #ifdef HAVE_STDATOMIC_H - thread_pool.queue[i] = fr_atomic_queue_create(NULL, thread_pool.max_queue_size); + thread_pool.queue[i] = fr_atomic_queue_alloc(autofree, thread_pool.max_queue_size); if (!thread_pool.queue[i]) { ERROR("FATAL: Failed to set up request fifo"); return -1; @@ -1204,7 +1194,7 @@ int thread_pool_init(CONF_SECTION *cs, bool *spawn_flag) pool_initialized = true; return 0; } - +DIAG_ON(deprecated-declarations) /* * Stop all threads in the pool. @@ -1243,7 +1233,7 @@ void thread_pool_stop(void) for (i = 0; i < NUM_FIFOS; i++) { #ifdef HAVE_STDATOMIC_H - talloc_free(thread_pool.queue[i]); + fr_atomic_queue_free(&thread_pool.queue[i]); #else fr_fifo_free(thread_pool.fifo[i]); #endif @@ -1253,21 +1243,11 @@ void thread_pool_stop(void) fr_hash_table_free(thread_pool.waiters); #endif -#ifdef HAVE_OPENSSL_CRYPTO_H /* * We're no longer threaded. Remove the mutexes and free * the memory. */ -#ifdef HAVE_CRYPTO_SET_ID_CALLBACK - set_id_callback(NULL); -#endif -#ifdef HAVE_CRYPTO_SET_LOCKING_CALLBACK - CRYPTO_set_locking_callback(NULL); -#endif - - free(ssl_mutexes); -#endif - + tls_mutexes_destroy(); #endif } diff --git a/src/main/tls.c b/src/main/tls.c index 4f34d70..c8cae3b 100644 --- a/src/main/tls.c +++ b/src/main/tls.c @@ -634,6 +634,9 @@ tls_session_t *tls_new_client_session(TALLOC_CTX *ctx, fr_tls_server_conf_t *con break; case SSL_ERROR_WANT_READ: + ssn->connected = false; + return ssn; + case SSL_ERROR_WANT_WRITE: ssn->connected = false; return ssn; @@ -725,7 +728,7 @@ tls_session_t *tls_new_session(TALLOC_CTX *ctx, fr_tls_server_conf_t *conf, REQU #ifdef TLS1_3_VERSION /* - * Disallow TLS 1.3 for TTLS, PEAP, and FAST. + * Disallow TLS 1.3 for FAST. * * We need another magic configuration option to allow * it. @@ -736,9 +739,6 @@ tls_session_t *tls_new_session(TALLOC_CTX *ctx, fr_tls_server_conf_t *conf, REQU WARN("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); WARN("!! There is no standard for using this EAP method with TLS 1.3"); WARN("!! Please set tls_max_version = \"1.2\""); - WARN("!! FreeRADIUS only supports TLS 1.3 for special builds of wpa_supplicant and Windows"); - WARN("!! This limitation is likely to change in late 2021."); - WARN("!! If you are using this version of FreeRADIUS after 2021, you will probably need to upgrade"); WARN("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); if (SSL_set_max_proto_version(new_tls, TLS1_2_VERSION) == 0) { @@ -1710,6 +1710,10 @@ static CONF_PARSER tls_server_config[] = { #endif }, +#ifdef WITH_RADIUSV11 + { "radiusv1_1", FR_CONF_OFFSET(PW_TYPE_STRING, fr_tls_server_conf_t, radiusv11_name), NULL }, +#endif + { "realm_dir", FR_CONF_OFFSET(PW_TYPE_STRING, fr_tls_server_conf_t, realm_dir), NULL }, { "cache", FR_CONF_POINTER(PW_TYPE_SUBSECTION, NULL), (void const *) cache_config }, @@ -1773,6 +1777,10 @@ static CONF_PARSER tls_client_config[] = { #endif }, +#ifdef WITH_RADIUSV11 + { "radiusv1_1", FR_CONF_OFFSET(PW_TYPE_STRING, fr_tls_server_conf_t, radiusv11_name), NULL }, +#endif + { "hostname", FR_CONF_OFFSET(PW_TYPE_STRING, fr_tls_server_conf_t, client_hostname), NULL }, CONF_PARSER_TERMINATOR @@ -3626,12 +3634,18 @@ static int set_ecdh_curve(SSL_CTX *ctx, char const *ecdh_curve, bool disable_sin #endif #endif +#if defined(HAVE_OPENSSL_CRYPTO_H) && defined(HAVE_CRYPTO_SET_LOCKING_CALLBACK) +#define TLS_UNUSED +#else +#define TLS_UNUSED UNUSED +#endif + /** Add all the default ciphers and message digests reate our context. * * This should be called exactly once from main, before reading the main config * or initialising any modules. */ -int tls_global_init(bool spawn_flag, bool check) +int tls_global_init(TLS_UNUSED bool spawn_flag, TLS_UNUSED bool check) { SSL_load_error_strings(); /* readable error messages (examples show call before library_init) */ SSL_library_init(); /* initialize library */ @@ -3643,6 +3657,7 @@ int tls_global_init(bool spawn_flag, bool check) */ fr_tls_ex_index_certs = SSL_SESSION_get_ex_new_index(0, NULL, NULL, NULL, NULL); +#if defined(HAVE_OPENSSL_CRYPTO_H) && defined(HAVE_CRYPTO_SET_LOCKING_CALLBACK) /* * If we're linking with OpenSSL too, then we need * to set up the mutexes and enable the thread callbacks. @@ -3654,6 +3669,7 @@ int tls_global_init(bool spawn_flag, bool check) ERROR("(TLS) FATAL: Failed to set up SSL mutexes"); return -1; } +#endif #if OPENSSL_VERSION_NUMBER >= 0x30000000L /* @@ -4116,6 +4132,16 @@ post_ca: * time. */ #if defined(TLS1_3_VERSION) +#ifdef WITH_RADIUSV11 + /* + * RADIUS 1.1 requires TLS 1.3 or later. + */ + if (conf->radiusv11) { + max_version = TLS1_3_VERSION; + } else +#endif + + max_version = TLS1_2_VERSION; /* yes, we only use TLS 1.3 if it's EXPLICITELY ENABLED */ #elif defined(TLS1_2_VERSION) max_version = TLS1_2_VERSION; @@ -4136,6 +4162,14 @@ post_ca: return NULL; } } else { +#ifdef WITH_RADIUSV11 + /* + * RADIUS 1.1 requires TLS 1.3 or later. + */ + if (conf->radiusv11) { + min_version = TLS1_3_VERSION; + } else +#endif /* * Allow TLS 1.0. It is horribly insecure, but * some systems still use it. @@ -4258,6 +4292,17 @@ post_ca: if (max_version < TLS1_3_VERSION) ctx_options |= SSL_OP_NO_TLSv1_3; #endif + +#ifdef WITH_RADIUSV11 + /* + * RADIUS 1.1 requires TLS 1.3 or later. + */ + if (conf->radiusv11 && (min_version < TLS1_3_VERSION)) { + ERROR(LOG_PREFIX ": Please set 'tls_min_version = 1.2' or greater to use 'radiusv1_1 = true'"); + return NULL; + } +#endif + /* * Set the cipher list if we were told to do so. We do * this before setting min/max TLS version. In a sane @@ -4336,7 +4381,6 @@ post_ca: ERROR("Failed setting TLS maximum version"); return NULL; } - if (!SSL_CTX_set_min_proto_version(ctx, min_version)) { ERROR("Failed setting TLS minimum version"); return NULL; diff --git a/src/main/tls_listen.c b/src/main/tls_listen.c index b08385f..fa8c382 100644 --- a/src/main/tls_listen.c +++ b/src/main/tls_listen.c @@ -81,15 +81,16 @@ static void tls_socket_close(rad_listen_t *listener) /* * Tell the event handler that an FD has disappeared. */ - DEBUG("(TLS) Client has closed connection"); + DEBUG("(TLS) Closing connection"); radius_update_listener(listener); /* - * Do NOT free the listener here. It's in use by + * Do NOT free the listener here. It may be in use by * a request, and will need to hang around until * all of the requests are done. * - * It is instead free'd in remove_from_request_hash() + * It is instead free'd when all of the requests using it + * are done. */ } @@ -149,12 +150,16 @@ static int CC_HINT(nonnull) tls_socket_write(rad_listen_t *listener) return 0; } -static void tls_write_available(UNUSED fr_event_list_t *el, UNUSED int sock, void *ctx) +static void tls_write_available(UNUSED fr_event_list_t *el, UNUSED int fd, void *ctx) { rad_listen_t *listener = ctx; + listen_socket_t *sock = listener->data; proxy_listener_thaw(listener); + + PTHREAD_MUTEX_LOCK(&sock->mutex); (void) tls_socket_write(listener); + PTHREAD_MUTEX_UNLOCK(&sock->mutex); } @@ -419,6 +424,7 @@ static int tls_socket_recv(rad_listen_t *listener) SSL_set_ex_data(sock->ssn->ssl, FR_TLS_EX_INDEX_REQUEST, (void *)request); SSL_set_ex_data(sock->ssn->ssl, fr_tls_ex_index_certs, (void *) &sock->certs); SSL_set_ex_data(sock->ssn->ssl, FR_TLS_EX_INDEX_TALLOC, sock); + sock->ssn->quick_session_tickets = true; /* we don't have inner-tunnel authentication */ doing_init = true; @@ -500,7 +506,10 @@ static int tls_socket_recv(rad_listen_t *listener) /* * Normal socket close. */ - if (rcode == 0) goto do_close; + if (rcode == 0) { + RDEBUG("(TLS) Client has closed the TCP connection"); + goto do_close; + } sock->ssn->dirty_in.used = rcode; } @@ -574,6 +583,7 @@ check_for_setup: request->packet->data = talloc_zero_array(request->packet, uint8_t, 20); request->packet->data[0] = PW_CODE_STATUS_SERVER; request->packet->data[3] = 20; + request->listener = listener; sock->state = LISTEN_TLS_CHECKING; PTHREAD_MUTEX_UNLOCK(&sock->mutex); @@ -606,6 +616,16 @@ get_application_data: status = tls_application_data(sock->ssn, request); RDEBUG3("(TLS) Application data status %d", status); + /* + * Some kind of failure. Close the socket. + */ + if (status == FR_TLS_FAIL) { + DEBUG("(TLS) Unable to recover from TLS error, closing socket from client port %u", sock->other_port); + tls_socket_close(listener); + PTHREAD_MUTEX_UNLOCK(&sock->mutex); + return 0; + } + if (status == FR_TLS_MORE_FRAGMENTS) { PTHREAD_MUTEX_UNLOCK(&sock->mutex); return 0; @@ -650,6 +670,10 @@ read_application_data: packet->vps = NULL; PTHREAD_MUTEX_UNLOCK(&sock->mutex); +#ifdef WITH_RADIUSV11 + packet->radiusv11 = sock->radiusv11; +#endif + if (!rad_packet_ok(packet, 0, NULL)) { if (DEBUG_ENABLED) ERROR("Receive - %s", fr_strerror()); DEBUG("(TLS) Closing TLS socket from client"); @@ -1009,36 +1033,36 @@ static int try_connect(listen_socket_t *sock) now = time(NULL); if ((sock->opened + sock->connect_timeout) < now) { tls_error_io_log(NULL, sock->ssn, 0, "Timeout in SSL_connect"); - goto fail; + return -1; } ret = SSL_connect(sock->ssn->ssl); - if (ret < 0) { + if (ret <= 0) { switch (SSL_get_error(sock->ssn->ssl, ret)) { default: tls_error_io_log(NULL, sock->ssn, ret, "Failed in " STRINGIFY(__FUNCTION__) " (SSL_connect)"); - break; + return -1; case SSL_ERROR_WANT_READ: + DEBUG3("(TLS) SSL_connect() returned WANT_READ"); + return 2; + case SSL_ERROR_WANT_WRITE: - return 0; + DEBUG3("(TLS) SSL_connect() returned WANT_WRITE"); + return 2; } } - if (ret <= 0) { - fail: - SSL_shutdown(sock->ssn->ssl); - TALLOC_FREE(sock->ssn); - - return -1; - } - sock->ssn->connected = true; return 1; } #ifdef WITH_PROXY +#ifdef WITH_RADIUSV11 +extern int fr_radiusv11_client_get_alpn(rad_listen_t *listener); +#endif + /* * Read from the SSL socket. Safe with either blocking or * non-blocking IO. This level of complexity is probably not @@ -1060,10 +1084,32 @@ static ssize_t proxy_tls_read(rad_listen_t *listener) if (!sock->ssn->connected) { rcode = try_connect(sock); - if (rcode <= 0) { - listener->status = RAD_LISTEN_STATUS_EOL; - radius_update_listener(listener); - return rcode; + if (rcode <= 0) return rcode; + + if (rcode == 2) return 0; /* more negotiation needed */ + +#ifdef WITH_RADIUSV11 + if (!sock->alpn_checked && (fr_radiusv11_client_get_alpn(listener) < 0)) { + tls_socket_close(listener); + return -1; + } +#endif + } + + if (sock->ssn->clean_out.used) { + DEBUG3("(TLS) proxy writing %zu to socket", sock->ssn->clean_out.used); + /* + * Write to SSL. + */ + rcode = SSL_write(sock->ssn->ssl, sock->ssn->clean_out.data, sock->ssn->clean_out.used); + if (rcode > 0) { + if ((size_t) rcode < sock->ssn->clean_out.used) { + memmove(sock->ssn->clean_out.data, sock->ssn->clean_out.data + rcode, + sock->ssn->clean_out.used - rcode); + sock->ssn->clean_out.used -= rcode; + } else { + sock->ssn->clean_out.used = 0; + } } } @@ -1081,9 +1127,14 @@ static ssize_t proxy_tls_read(rad_listen_t *listener) if (rcode <= 0) { int err = SSL_get_error(sock->ssn->ssl, rcode); switch (err) { + case SSL_ERROR_WANT_READ: + DEBUG3("(TLS) OpenSSL returned WANT_READ"); + return 0; + case SSL_ERROR_WANT_WRITE: - return 0; /* do some more work later */ + DEBUG3("(TLS) OpenSSL returned WANT_WRITE"); + return 0; case SSL_ERROR_ZERO_RETURN: /* remote end sent close_notify, send one back */ @@ -1094,6 +1145,10 @@ static ssize_t proxy_tls_read(rad_listen_t *listener) do_close: return -1; + case SSL_ERROR_SSL: + DEBUG("(TLS) Home server has closed the connection"); + goto do_close; + default: tls_error_log(NULL, "Failed in proxy receive with OpenSSL error %d", err); goto do_close; @@ -1132,16 +1187,28 @@ static ssize_t proxy_tls_read(rad_listen_t *listener) rcode = SSL_read(sock->ssn->ssl, data + sock->partial, length - sock->partial); if (rcode <= 0) { - switch (SSL_get_error(sock->ssn->ssl, rcode)) { + int err = SSL_get_error(sock->ssn->ssl, rcode); + switch (err) { + case SSL_ERROR_WANT_READ: + DEBUG3("(TLS) OpenSSL returned WANT_READ"); + return 0; + case SSL_ERROR_WANT_WRITE: + DEBUG3("(TLS) OpenSSL returned WANT_WRITE"); return 0; case SSL_ERROR_ZERO_RETURN: /* remote end sent close_notify, send one back */ SSL_shutdown(sock->ssn->ssl); goto do_close; + + case SSL_ERROR_SSL: + DEBUG("(TLS) Home server has closed the connection"); + goto do_close; + default: + DEBUG("(TLS) Unexpected OpenSSL error %d", err); goto do_close; } } @@ -1183,15 +1250,13 @@ int proxy_tls_recv(rad_listen_t *listener) DEBUG3("Proxy SSL socket has data to read"); PTHREAD_MUTEX_LOCK(&sock->mutex); data_len = proxy_tls_read(listener); - PTHREAD_MUTEX_UNLOCK(&sock->mutex); - if (data_len < 0) { - DEBUG("Closing TLS socket to home server"); - PTHREAD_MUTEX_LOCK(&sock->mutex); tls_socket_close(listener); PTHREAD_MUTEX_UNLOCK(&sock->mutex); + DEBUG("Closing TLS socket to home server"); return 0; } + PTHREAD_MUTEX_UNLOCK(&sock->mutex); if (data_len == 0) return 0; /* not done yet */ @@ -1210,6 +1275,18 @@ int proxy_tls_recv(rad_listen_t *listener) memcpy(packet->data, data, packet->data_len); memcpy(packet->vector, packet->data + 4, 16); +#ifdef WITH_RADIUSV11 + packet->radiusv11 = sock->radiusv11; + + if (sock->radiusv11) { + uint32_t id; + + memcpy(&id, data + 4, sizeof(id)); + packet->id = ntohl(id); + } + +#endif + /* * FIXME: Client MIB updates? */ @@ -1305,32 +1382,109 @@ int proxy_tls_send(rad_listen_t *listener, REQUEST *request) if (!sock->ssn->connected) { PTHREAD_MUTEX_LOCK(&sock->mutex); rcode = try_connect(sock); - PTHREAD_MUTEX_UNLOCK(&sock->mutex); if (rcode <= 0) { + tls_socket_close(listener); + PTHREAD_MUTEX_UNLOCK(&sock->mutex); + return rcode; + } + PTHREAD_MUTEX_UNLOCK(&sock->mutex); + + /* + * More negotiation is needed, but remember to + * save this packet to an intermediate buffer. + * Once the SSL connection is established, the + * later code writes the packet to the + * connection. + */ + if (rcode == 2) { + PTHREAD_MUTEX_LOCK(&sock->mutex); + if ((sock->ssn->clean_out.used + request->proxy->data_len) > MAX_RECORD_SIZE) { + PTHREAD_MUTEX_UNLOCK(&sock->mutex); + RERROR("(TLS) Too much data buffered during SSL_connect()"); + listener->status = RAD_LISTEN_STATUS_EOL; + radius_update_listener(listener); + return -1; + } + + memcpy(sock->ssn->clean_out.data + sock->ssn->clean_out.used, request->proxy->data, request->proxy->data_len); + sock->ssn->clean_out.used += request->proxy->data_len; + RDEBUG3("(TLS) Writing %zu bytes for later (total %zu)", request->proxy->data_len, sock->ssn->clean_out.used); + + PTHREAD_MUTEX_UNLOCK(&sock->mutex); + return 0; + } + +#ifdef WITH_RADIUSV11 + if (!sock->alpn_checked && (fr_radiusv11_client_get_alpn(listener) < 0)) { listener->status = RAD_LISTEN_STATUS_EOL; radius_update_listener(listener); - return rcode; + return -1; } +#endif } DEBUG3("Proxy is writing %u bytes to SSL", (unsigned int) request->proxy->data_len); PTHREAD_MUTEX_LOCK(&sock->mutex); - rcode = SSL_write(sock->ssn->ssl, request->proxy->data, - request->proxy->data_len); + + /* + * We may have previously cached data on SSL_connect(), which now needs to be written to the home server. + */ + if (sock->ssn->clean_out.used > 0) { + if ((sock->ssn->clean_out.used + request->proxy->data_len) > MAX_RECORD_SIZE) { + PTHREAD_MUTEX_UNLOCK(&sock->mutex); + RERROR("(TLS) Too much data buffered after SSL_connect()"); + listener->status = RAD_LISTEN_STATUS_EOL; + radius_update_listener(listener); + return -1; + } + + /* + * Add in our packet. + */ + memcpy(sock->ssn->clean_out.data + sock->ssn->clean_out.used, request->proxy->data, request->proxy->data_len); + sock->ssn->clean_out.used += request->proxy->data_len; + + /* + * Write to SSL. + */ + DEBUG3("(TLS) proxy writing %zu to socket", sock->ssn->clean_out.used); + + rcode = SSL_write(sock->ssn->ssl, sock->ssn->clean_out.data, sock->ssn->clean_out.used); + if (rcode > 0) { + if ((size_t) rcode < sock->ssn->clean_out.used) { + memmove(sock->ssn->clean_out.data, sock->ssn->clean_out.data + rcode, + sock->ssn->clean_out.used - rcode); + sock->ssn->clean_out.used -= rcode; + } else { + sock->ssn->clean_out.used = 0; + } + PTHREAD_MUTEX_UNLOCK(&sock->mutex); + return 1; + } + } else { + rcode = SSL_write(sock->ssn->ssl, request->proxy->data, + request->proxy->data_len); + } if (rcode < 0) { int err; err = ERR_get_error(); switch (err) { case SSL_ERROR_NONE: + break; + case SSL_ERROR_WANT_READ: + DEBUG3("(TLS) OpenSSL returned WANT_READ"); + break; + case SSL_ERROR_WANT_WRITE: - break; /* let someone else retry */ + DEBUG3("(TLS) OpenSSL returned WANT_WRITE"); + break; default: tls_error_log(NULL, "Failed in proxy send with OpenSSL error %d", err); - DEBUG("Closing TLS socket to home server"); + DEBUG("(TLS) Closing socket to home server"); tls_socket_close(listener); PTHREAD_MUTEX_UNLOCK(&sock->mutex); return 0; @@ -1392,6 +1546,7 @@ int proxy_tls_send_reply(rad_listen_t *listener, REQUEST *request) case SSL_ERROR_NONE: case SSL_ERROR_WANT_READ: case SSL_ERROR_WANT_WRITE: + DEBUG3("(TLS) SSL_write() returned %s", ERR_reason_error_string(err)); break; /* let someone else retry */ default: diff --git a/src/main/unittest.c b/src/main/unittest.c index 5a15ee2..72fdadc 100644 --- a/src/main/unittest.c +++ b/src/main/unittest.c @@ -72,6 +72,15 @@ void request_inject(UNUSED REQUEST *request) /* do nothing */ } +#ifdef WITH_RADIUSV11 +int fr_radiusv11_client_init(UNUSED fr_tls_server_conf_t *tls); + +int fr_radiusv11_client_init(UNUSED fr_tls_server_conf_t *tls) +{ + return 0; +} +#endif + static rad_listen_t *listen_alloc(void *ctx) { rad_listen_t *this; diff --git a/src/main/version.c b/src/main/version.c index c7c7659..2fe3428 100644 --- a/src/main/version.c +++ b/src/main/version.c @@ -207,7 +207,7 @@ char const *ssl_version_num(void) return "not linked"; } -char const *ssl_version() +char const *ssl_version(void) { return "not linked"; } diff --git a/src/main/xlat.c b/src/main/xlat.c index 8000aa1..4bd0a37 100644 --- a/src/main/xlat.c +++ b/src/main/xlat.c @@ -203,7 +203,7 @@ static ssize_t xlat_integer(UNUSED void *instance, REQUEST *request, return snprintf(out, outlen, "%u", htonl(vp->vp_ipaddr)); case PW_TYPE_IPV4_PREFIX: - return snprintf(out, outlen, "%u", htonl((*(uint32_t *)(vp->vp_ipv4prefix + 2)))); + return snprintf(out, outlen, "%u", htonl((*(uint32_t *)(&vp->vp_ipv4prefix[2])))); case PW_TYPE_INTEGER: return snprintf(out, outlen, "%u", vp->vp_integer); diff --git a/src/modules/rlm_cache/stable b/src/modules/rlm_cache/stable index c126827..67a303e 100644 --- a/src/modules/rlm_cache/stable +++ b/src/modules/rlm_cache/stable @@ -1 +1,2 @@ rlm_cache_memcached +rlm_cache_redis diff --git a/src/modules/rlm_couchbase/rlm_couchbase.c b/src/modules/rlm_couchbase/rlm_couchbase.c index d011e24..8e8c813 100644 --- a/src/modules/rlm_couchbase/rlm_couchbase.c +++ b/src/modules/rlm_couchbase/rlm_couchbase.c @@ -709,7 +709,7 @@ static rlm_rcode_t mod_checksimul(void *instance, REQUEST *request) { } /* check terminal server */ - int check = rad_check_ts(&nas_addr, nas_port, user_name, session_id); + int check = rad_check_ts(&nas_addr, nas_port, NULL, user_name, session_id); /* take action based on check return */ if (check == 0) { @@ -744,7 +744,7 @@ static rlm_rcode_t mod_checksimul(void *instance, REQUEST *request) { } /* zap session */ - session_zap(request, &nas_addr, nas_port, user_name, session_id, + session_zap(request, &nas_addr, nas_port, NULL, user_name, session_id, framed_ip_addr, framed_proto, session_time); } } else if (check == 1) { diff --git a/src/modules/rlm_eap/libeap/eap_sim.h b/src/modules/rlm_eap/libeap/eap_sim.h index 74dda25..0d92f67 100644 --- a/src/modules/rlm_eap/libeap/eap_sim.h +++ b/src/modules/rlm_eap/libeap/eap_sim.h @@ -108,7 +108,7 @@ struct eapsim_keys { * interfaces in eapsimlib.c */ int eapsim_checkmac(TALLOC_CTX *ctx, VALUE_PAIR *rvps, - uint8_t key[8], + uint8_t key[EAPSIM_AUTH_SIZE], uint8_t *extra, int extralen, uint8_t calcmac[20]); diff --git a/src/modules/rlm_eap/radeapclient.c b/src/modules/rlm_eap/radeapclient.c index 955df1e..ae24f06 100644 --- a/src/modules/rlm_eap/radeapclient.c +++ b/src/modules/rlm_eap/radeapclient.c @@ -191,6 +191,11 @@ rlm_rcode_t process_post_auth(UNUSED int postauth_type, UNUSED REQUEST *request) } +fr_event_list_t *radius_event_list_corral(UNUSED event_corral_t hint) +{ + return NULL; +} + static void NEVER_RETURNS usage(void) { fprintf(stdout, "Usage: radeapclient [options] server[:port] <command> [<secret>]\n"); @@ -1346,7 +1351,11 @@ static void rc_add_socket(fr_ipaddr_t *src_ipaddr, uint16_t src_port, fr_ipaddr_ exit(1); } - if (!fr_packet_list_socket_add(pl, mysockfd, ipproto, dst_ipaddr, dst_port, NULL)) { + if (!fr_packet_list_socket_add(pl, mysockfd, ipproto, +#ifdef WITH_RADIUSV11 + false, +#endif + dst_ipaddr, dst_port, NULL)) { ERROR("Failed to add new socket: %s\n", fr_strerror()); exit(1); } diff --git a/src/modules/rlm_eap/rlm_eap.c b/src/modules/rlm_eap/rlm_eap.c index 24b8c5e..efb9660 100644 --- a/src/modules/rlm_eap/rlm_eap.c +++ b/src/modules/rlm_eap/rlm_eap.c @@ -35,6 +35,7 @@ RCSID("$Id$") static const CONF_PARSER module_config[] = { { "default_eap_type", FR_CONF_OFFSET(PW_TYPE_STRING, rlm_eap_t, default_method_name), "md5" }, { "timer_expire", FR_CONF_OFFSET(PW_TYPE_INTEGER, rlm_eap_t, timer_limit), "60" }, + { "max_eap_type", FR_CONF_OFFSET(PW_TYPE_INTEGER, rlm_eap_t, max_eap_type), "52" }, { "ignore_unknown_eap_types", FR_CONF_OFFSET(PW_TYPE_BOOLEAN, rlm_eap_t, ignore_unknown_types), "no" }, { "cisco_accounting_username_bug", FR_CONF_OFFSET(PW_TYPE_BOOLEAN, rlm_eap_t, mod_accounting_username_bug), "no" }, { "max_sessions", FR_CONF_OFFSET(PW_TYPE_INTEGER, rlm_eap_t, max_sessions), "2048" }, @@ -559,6 +560,49 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(void *instance, REQUEST *reque #ifdef WITH_PROXY +static rlm_rcode_t CC_HINT(nonnull) mod_pre_proxy(void *instance, REQUEST *request) +{ + VALUE_PAIR *vp; + size_t length; + rlm_eap_t *inst = instance; + + vp = fr_pair_find_by_num(request->packet->vps, PW_EAP_MESSAGE, 0, TAG_ANY); + if (!vp) return RLM_MODULE_NOOP; + + if (vp->vp_length < 4) return RLM_MODULE_NOOP; + + if ((vp->vp_octets[0] == 0) ||( vp->vp_octets[0] > 6)) { + RDEBUG("EAP header byte zero has invalid value"); + + add_error_cause: + /* + * Invalid EAP packet (ignored) + */ + pair_make_reply("Error-Cause", "202", T_OP_EQ); + return RLM_MODULE_REJECT; + } + + length = (vp->vp_octets[2] << 8) | vp->vp_octets[3]; + if (length != vp->vp_length) { + RDEBUG("EAP length does not match attribute length"); + return RLM_MODULE_REJECT; + } + + if (vp->vp_octets[0] != PW_EAP_REQUEST) return RLM_MODULE_NOOP; + if (!inst->max_eap_type) return RLM_MODULE_NOOP; + + if (vp->vp_length < 5) return RLM_MODULE_NOOP; + + if (vp->vp_octets[4] == 254) return RLM_MODULE_NOOP; /* allow extended types */ + + if (vp->vp_octets[4] > inst->max_eap_type) { + RDEBUG("EAP method %u is too large", vp->vp_octets[4]); + goto add_error_cause; + } + + return RLM_MODULE_NOOP; +} + /* * If we're proxying EAP, then there may be magic we need * to do. @@ -807,6 +851,7 @@ module_t rlm_eap = { [MOD_AUTHENTICATE] = mod_authenticate, [MOD_AUTHORIZE] = mod_authorize, #ifdef WITH_PROXY + [MOD_PRE_PROXY] = mod_pre_proxy, [MOD_POST_PROXY] = mod_post_proxy, #endif [MOD_POST_AUTH] = mod_post_auth diff --git a/src/modules/rlm_eap/rlm_eap.h b/src/modules/rlm_eap/rlm_eap.h index 384f7f7..0b9311c 100644 --- a/src/modules/rlm_eap/rlm_eap.h +++ b/src/modules/rlm_eap/rlm_eap.h @@ -56,6 +56,7 @@ typedef struct rlm_eap { * Configuration items. */ uint32_t timer_limit; + uint32_t max_eap_type; char const *default_method_name; eap_type_t default_method; diff --git a/src/modules/rlm_example/all.mk.in b/src/modules/rlm_example/all.mk.in index 858b5da..e66afe7 100644 --- a/src/modules/rlm_example/all.mk.in +++ b/src/modules/rlm_example/all.mk.in @@ -17,7 +17,7 @@ ifneq "$(TARGETNAME)" "" TARGET := $(TARGETNAME).a endif -SOURCES := $(TARGETNAME).c other.c +SOURCES := $(TARGETNAME).c SRC_CFLAGS := @mod_cflags@ TGT_LDLIBS := @mod_ldflags@ diff --git a/src/modules/rlm_example/other.c b/src/modules/rlm_example/other.c deleted file mode 100644 index 4485bad..0000000 --- a/src/modules/rlm_example/other.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * other.c - * - * Version: $Id$ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * Copyright 2000,2006 The FreeRADIUS server project - * Copyright 2000 your name <your address> - */ - -RCSID("$Id$") - -#include <stdio.h> - -#include "other.h" - -/* - * This is a sample C file which does nothing. - * - * It's only purpose is to show how to set up the 'Makefile' - * for modules which have more than one C source file. - */ -void other_function(void) -{ - int i = 1; /* do nothing */ - - i++; -} diff --git a/src/modules/rlm_example/other.h b/src/modules/rlm_example/other.h deleted file mode 100644 index 2a02dcb..0000000 --- a/src/modules/rlm_example/other.h +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright 2006 The FreeRADIUS server project */ - -#ifndef _OTHER_H -#define _OTHER_H - -RCSIDH(other_h, "$Id$") - -/* define the function */ - -void other_function(void); - -#endif /*_OTHER_H*/ diff --git a/src/modules/rlm_files/rlm_files.c b/src/modules/rlm_files/rlm_files.c index 1b47dd7..08679e6 100644 --- a/src/modules/rlm_files/rlm_files.c +++ b/src/modules/rlm_files/rlm_files.c @@ -346,8 +346,8 @@ static rlm_rcode_t file_common(rlm_files_t *inst, REQUEST *request, char const * RADIUS_PACKET *request_packet, RADIUS_PACKET *reply_packet) { char const *name; - VALUE_PAIR *check_tmp; - VALUE_PAIR *reply_tmp; + VALUE_PAIR *check_tmp = NULL; + VALUE_PAIR *reply_tmp = NULL; PAIR_LIST const *user_pl, *default_pl; bool found = false; PAIR_LIST my_pl; @@ -411,14 +411,16 @@ static rlm_rcode_t file_common(rlm_files_t *inst, REQUEST *request, char const * default_pl = default_pl->next; } - check_tmp = fr_pair_list_copy(request, pl->check); - for (vp = fr_cursor_init(&cursor, &check_tmp); - vp; - vp = fr_cursor_next(&cursor)) { - if (radius_xlat_do(request, vp) < 0) { - RWARN("Failed parsing expanded value for check item, skipping entry: %s", fr_strerror()); - fr_pair_list_free(&check_tmp); - continue; + if (pl->check) { + check_tmp = fr_pair_list_copy(request, pl->check); + for (vp = fr_cursor_init(&cursor, &check_tmp); + vp; + vp = fr_cursor_next(&cursor)) { + if (radius_xlat_do(request, vp) < 0) { + RWARN("Failed parsing expanded value for check item, skipping entry: %s", fr_strerror()); + fr_pair_list_free(&check_tmp); + continue; + } } } @@ -428,15 +430,15 @@ static rlm_rcode_t file_common(rlm_files_t *inst, REQUEST *request, char const * /* ctx may be reply or proxy */ reply_tmp = fr_pair_list_copy(reply_packet, pl->reply); - radius_pairmove(request, &reply_packet->vps, reply_tmp, true); + if (reply_tmp) radius_pairmove(request, &reply_packet->vps, reply_tmp, true); + fr_pair_list_move(request, &request->config, &check_tmp, T_OP_ADD); fr_pair_list_free(&check_tmp); /* * Fallthrough? */ - if (!fall_through(pl->reply)) - break; + if (!fall_through(pl->reply)) break; } } @@ -448,8 +450,7 @@ static rlm_rcode_t file_common(rlm_files_t *inst, REQUEST *request, char const * /* * See if we succeeded. */ - if (!found) - return RLM_MODULE_NOOP; /* on to the next module */ + if (!found) return RLM_MODULE_NOOP; /* on to the next module */ return RLM_MODULE_OK; diff --git a/src/modules/rlm_ippool/rlm_ippool.c b/src/modules/rlm_ippool/rlm_ippool.c index 7762b15..e289bc2 100644 --- a/src/modules/rlm_ippool/rlm_ippool.c +++ b/src/modules/rlm_ippool/rlm_ippool.c @@ -355,6 +355,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, REQUEST *requ fr_md5_init(&md5_context); fr_md5_update(&md5_context, (uint8_t *)xlat_str, strlen(xlat_str)); fr_md5_final(key_str, &md5_context); + fr_md5_destroy(&md5_context); key_str[16] = '\0'; fr_bin2hex(hex_str, key_str, 16); @@ -494,6 +495,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_post_auth(void *instance, REQUEST *reque fr_md5_init(&md5_context); fr_md5_update(&md5_context, (uint8_t *)xlat_str, strlen(xlat_str)); fr_md5_final(key_str, &md5_context); + fr_md5_destroy(&md5_context); key_str[16] = '\0'; fr_bin2hex(hex_str, key_str, 16); hex_str[32] = '\0'; diff --git a/src/modules/rlm_ldap/attrmap.c b/src/modules/rlm_ldap/attrmap.c index 1e56247..0589697 100644 --- a/src/modules/rlm_ldap/attrmap.c +++ b/src/modules/rlm_ldap/attrmap.c @@ -190,12 +190,11 @@ int rlm_ldap_map_verify(vp_map_t *map, void *instance) } /* - * Only =, :=, += and -= operators are supported for LDAP mappings. + * Only =, :=, and += aoperators are supported for LDAP mappings. */ switch (map->op) { case T_OP_SET: case T_OP_EQ: - case T_OP_SUB: case T_OP_ADD: break; diff --git a/src/modules/rlm_ldap/groups.c b/src/modules/rlm_ldap/groups.c index 205f32d..21fe232 100644 --- a/src/modules/rlm_ldap/groups.c +++ b/src/modules/rlm_ldap/groups.c @@ -283,7 +283,7 @@ rlm_rcode_t rlm_ldap_cacheable_userobj(rlm_ldap_t const *inst, REQUEST *request, TALLOC_CTX *list_ctx, *value_ctx; vp_cursor_t list_cursor, groups_cursor; - int is_dn, i, count; + int is_dn, i, count, to_resolve = 0; rad_assert(entry); rad_assert(attr); @@ -314,7 +314,7 @@ rlm_rcode_t rlm_ldap_cacheable_userobj(rlm_ldap_t const *inst, REQUEST *request, */ fr_cursor_init(&groups_cursor, &groups); - for (i = 0; (i < LDAP_MAX_CACHEABLE) && (i < count); i++) { + for (i = 0; (to_resolve < LDAP_MAX_CACHEABLE) && (i < count); i++) { is_dn = rlm_ldap_is_dn(values[i]->bv_val, values[i]->bv_len); if (inst->cacheable_group_dn) { @@ -331,6 +331,7 @@ rlm_rcode_t rlm_ldap_cacheable_userobj(rlm_ldap_t const *inst, REQUEST *request, */ } else { *name_p++ = rlm_ldap_berval_to_string(value_ctx, values[i]); + to_resolve++; } } @@ -537,6 +538,7 @@ rlm_rcode_t rlm_ldap_check_groupobj_dynamic(rlm_ldap_t const *inst, REQUEST *req { ldap_rcode_t status; + LDAPMessage *result = NULL; char const *base_dn; char base_dn_buff[LDAP_MAX_DN_STR_LEN + 1]; @@ -608,11 +610,19 @@ rlm_rcode_t rlm_ldap_check_groupobj_dynamic(rlm_ldap_t const *inst, REQUEST *req } RINDENT(); - status = rlm_ldap_search(NULL, inst, request, pconn, base_dn, inst->groupobj_scope, filter, NULL, NULL, NULL); + status = rlm_ldap_search(&result, inst, request, pconn, base_dn, inst->groupobj_scope, filter, NULL, NULL, NULL); REXDENT(); switch (status) { case LDAP_PROC_SUCCESS: - RDEBUG("User found in group object \"%s\"", base_dn); + { + LDAPMessage *entry = NULL; + char *dn = NULL; + entry = ldap_first_entry((*pconn)->handle, result); + if (entry) dn = ldap_get_dn((*pconn)->handle, entry); + RDEBUG("User found in group object \"%s\"", dn); + ldap_memfree(dn); + ldap_msgfree(result); + } break; case LDAP_PROC_NO_RESULT: diff --git a/src/modules/rlm_ldap/ldap.c b/src/modules/rlm_ldap/ldap.c index 97fdcbe..c356921 100644 --- a/src/modules/rlm_ldap/ldap.c +++ b/src/modules/rlm_ldap/ldap.c @@ -31,6 +31,10 @@ #include <stdarg.h> #include <ctype.h> +#ifdef HAVE_OPENSSL_SSL_H +# include <openssl/ssl.h> +#endif + #include "ldap.h" /** Converts "bad" strings into ones which are safe for LDAP @@ -717,7 +721,7 @@ ldap_rcode_t rlm_ldap_bind(rlm_ldap_t const *inst, REQUEST *request, ldap_handle * For sanity, for when no connections are viable, * and we can't make a new one. */ - num = retry ? fr_connection_pool_get_num(inst->pool) : 0; + num = retry ? fr_connection_pool_get_retries(inst->pool) : 0; for (i = num; i >= 0; i--) { #ifdef WITH_SASL if (sasl && sasl->mech) { @@ -877,7 +881,7 @@ ldap_rcode_t rlm_ldap_search(LDAPMessage **result, rlm_ldap_t const *inst, REQUE * For sanity, for when no connections are viable, * and we can't make a new one. */ - for (i = fr_connection_pool_get_num(inst->pool); i >= 0; i--) { + for (i = fr_connection_pool_get_retries(inst->pool); i >= 0; i--) { (void) ldap_search_ext((*pconn)->handle, dn, scope, filter, search_attrs, 0, serverctrls, clientctrls, &tv, 0, &msgid); @@ -1004,7 +1008,7 @@ ldap_rcode_t rlm_ldap_modify(rlm_ldap_t const *inst, REQUEST *request, ldap_hand * For sanity, for when no connections are viable, * and we can't make a new one. */ - for (i = fr_connection_pool_get_num(inst->pool); i >= 0; i--) { + for (i = fr_connection_pool_get_retries(inst->pool); i >= 0; i--) { RDEBUG2("Modifying object with DN \"%s\"", dn); (void) ldap_modify_ext((*pconn)->handle, dn, mods, NULL, NULL, &msgid); @@ -1328,7 +1332,6 @@ static int rlm_ldap_rebind(LDAP *handle, LDAP_CONST char *url, UNUSED ber_tag_t return ldap_errno; } - return LDAP_SUCCESS; } #endif @@ -1336,6 +1339,9 @@ static int rlm_ldap_rebind(LDAP *handle, LDAP_CONST char *url, UNUSED ber_tag_t int rlm_ldap_global_init(rlm_ldap_t *inst) { int ldap_errno; +#if defined(LDAP_OPT_X_TLS_PACKAGE) && defined(LDAP_OPT_X_TLS_CTX) && defined(HAVE_OPENSSL_SSL_H) + bool use_openssl = false; +#endif #define do_ldap_global_option(_option, _name, _value) \ if (ldap_set_option(NULL, _option, _value) != LDAP_OPT_SUCCESS) { \ @@ -1363,6 +1369,50 @@ int rlm_ldap_global_init(rlm_ldap_t *inst) */ maybe_ldap_global_option(LDAP_OPT_X_TLS_RANDOM_FILE, "random_file", inst->tls_random_file); #endif + +#ifdef LDAP_OPT_X_TLS_PACKAGE + { + char *name = NULL; + + if (ldap_get_option(NULL, LDAP_OPT_X_TLS_PACKAGE, (void *) &name) == LDAP_OPT_SUCCESS) { + if (strcmp(name, "OpenSSL") != 0) { + WARN("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); + WARN("!! libldap is using %s, while FreeRADIUS is using OpenSSL", name); + WARN("!! There may be random issues with TLS connections due to this conflict."); + WARN("!! The server may also crash."); + WARN("!! See https://wiki.freeradius.org/modules/Rlm_ldap for more information."); + WARN("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); + } +#if defined(LDAP_OPT_X_TLS_CTX) && defined(HAVE_OPENSSL_SSL_H) + else { + use_openssl = true; + } +#endif + + ldap_memfree(name); + } + } +#endif + +#ifdef LDAP_OPT_X_TLS_CTX +#ifdef HAVE_OPENSSL_SSL_H + { + X509_STORE *store; + SSL_CTX *ssl_ctx; + + if (inst->tls_check_crl && +#ifdef LDAP_OPT_X_TLS_PACKAGE + use_openssl && +#endif + + (ldap_get_option(NULL, LDAP_OPT_X_TLS_CTX, (void *) &ssl_ctx) == LDAP_OPT_SUCCESS)) { + store = SSL_CTX_get_cert_store(ssl_ctx); + X509_STORE_set_flags(store, X509_V_FLAG_CRL_CHECK); + } + } +#endif +#endif + return 0; } diff --git a/src/modules/rlm_ldap/ldap.h b/src/modules/rlm_ldap/ldap.h index 2ab8ba3..e2e628d 100644 --- a/src/modules/rlm_ldap/ldap.h +++ b/src/modules/rlm_ldap/ldap.h @@ -82,8 +82,7 @@ USES_APPLE_DEPRECATED_API /* Apple wants us to use OpenDirectory Framework, we d //!< and profile attribute. #define LDAP_MAX_CACHEABLE 64 //!< Maximum number of groups we retrieve from the server for - //!< a given user. If more than this number are retrieve the - //!< module returns invalid. + //!< a given user which need resolving from name to DN. #define LDAP_MAX_GROUP_NAME_LEN 128 //!< Maximum name of a group name. #define LDAP_MAX_ATTR_STR_LEN 256 //!< Maximum length of an xlat expanded LDAP attribute. @@ -266,6 +265,8 @@ typedef struct ldap_instance { int tls_require_cert; //!< OpenLDAP constant representing the require cert string. + bool tls_check_crl; //!< whether we do CRL checks or not + char const *tls_min_version_str; //!< Minimum TLS version int tls_min_version; diff --git a/src/modules/rlm_ldap/rlm_ldap.c b/src/modules/rlm_ldap/rlm_ldap.c index 0e0b3bc..a8df048 100644 --- a/src/modules/rlm_ldap/rlm_ldap.c +++ b/src/modules/rlm_ldap/rlm_ldap.c @@ -113,6 +113,11 @@ static CONF_PARSER tls_config[] = { #ifdef LDAP_OPT_X_TLS_CIPHER_SUITE { "cipher_list", FR_CONF_OFFSET(PW_TYPE_STRING, rlm_ldap_t, tls_cipher_list), NULL }, #endif + +#ifdef LDAP_OPT_X_TLS_CTX + { "check_crl", FR_CONF_OFFSET(PW_TYPE_BOOLEAN, rlm_ldap_t, tls_check_crl), "no" }, +#endif + /* * LDAP Specific TLS attributes */ diff --git a/src/modules/rlm_pap/rlm_pap.c b/src/modules/rlm_pap/rlm_pap.c index 94fbcc8..463ff66 100644 --- a/src/modules/rlm_pap/rlm_pap.c +++ b/src/modules/rlm_pap/rlm_pap.c @@ -611,6 +611,7 @@ static rlm_rcode_t CC_HINT(nonnull) pap_auth_md5(rlm_pap_t *inst, REQUEST *reque fr_md5_update(&md5_context, request->password->vp_octets, request->password->vp_length); fr_md5_final(digest, &md5_context); + fr_md5_destroy(&md5_context); if (rad_digest_cmp(digest, vp->vp_octets, vp->vp_length) != 0) { REDEBUG("MD5 digest does not match \"known good\" digest"); @@ -641,6 +642,7 @@ static rlm_rcode_t CC_HINT(nonnull) pap_auth_smd5(rlm_pap_t *inst, REQUEST *requ request->password->vp_length); fr_md5_update(&md5_context, &vp->vp_octets[16], vp->vp_length - 16); fr_md5_final(digest, &md5_context); + fr_md5_destroy(&md5_context); /* * Compare only the MD5 hash results, not the salt. @@ -902,7 +904,9 @@ static inline rlm_rcode_t CC_HINT(nonnull) pap_auth_pbkdf2_parse(REQUEST *reques goto finish; } - strlcpy(hash_token, (char const *)p, (q - p) + 1); + memcpy(hash_token, (char const *)p, (q - p)); + hash_token[q - p] = '\0'; + digest_type = fr_str2int(hash_names, hash_token, -1); switch (digest_type) { case PW_SSHA1_PASSWORD: diff --git a/src/modules/rlm_passwd/rlm_passwd.c b/src/modules/rlm_passwd/rlm_passwd.c index 77c65e0..cae5f0b 100644 --- a/src/modules/rlm_passwd/rlm_passwd.c +++ b/src/modules/rlm_passwd/rlm_passwd.c @@ -123,10 +123,8 @@ static void destroy_password (struct mypasswd * pass) static unsigned int hash(char const * username, unsigned int tablesize) { - int h=1; - while (*username) { - h = h * 7907 + *username++; - } + uint32_t h = fr_hash_string(username); + return h%tablesize; } diff --git a/src/modules/rlm_perl/rlm_perl.c b/src/modules/rlm_perl/rlm_perl.c index 0c58cc8..59759ae 100644 --- a/src/modules/rlm_perl/rlm_perl.c +++ b/src/modules/rlm_perl/rlm_perl.c @@ -28,6 +28,10 @@ RCSID("$Id$") #include <freeradius-devel/modules.h> #include <freeradius-devel/rad_assert.h> +DIAG_OFF(DIAG_UNKNOWN_PRAGMAS) +DIAG_OFF(compound-token-split-by-macro) /* Perl does horrible things with macros */ +DIAG_ON(DIAG_UNKNOWN_PRAGMAS) + #ifdef INADDR_ANY # undef INADDR_ANY #endif diff --git a/src/modules/rlm_radutmp/rlm_radutmp.c b/src/modules/rlm_radutmp/rlm_radutmp.c index e58f34d..b3d0037 100644 --- a/src/modules/rlm_radutmp/rlm_radutmp.c +++ b/src/modules/rlm_radutmp/rlm_radutmp.c @@ -699,14 +699,14 @@ static rlm_rcode_t CC_HINT(nonnull) mod_checksimul(void *instance, REQUEST *requ * to block everyone else while * that's happening. */ rad_unlockfd(fd, LOCK_LEN); - rcode = rad_check_ts(&nasaddr, u.nas_port, utmp_login, session_id); + rcode = rad_check_ts(&nasaddr, u.nas_port, NULL, utmp_login, session_id); rad_lockfd(fd, LOCK_LEN); if (rcode == 0) { /* * Stale record - zap it. */ - session_zap(request, &nasaddr, u.nas_port, expanded, session_id, + session_zap(request, &nasaddr, u.nas_port, NULL, expanded, session_id, u.framed_address, u.proto, 0); } else if (rcode == 1) { diff --git a/src/modules/rlm_rest/rest.c b/src/modules/rlm_rest/rest.c index 9db0c0f..035f557 100644 --- a/src/modules/rlm_rest/rest.c +++ b/src/modules/rlm_rest/rest.c @@ -964,6 +964,7 @@ static ssize_t rest_request_encode_wrapper(char **buffer, rest_read_t func, size size_t alloc = REST_BODY_INIT; /* Size of buffer to alloc */ size_t used = 0; /* Size of data written */ size_t len = 0; + rlm_rest_request_t *ctx = userdata; while (alloc <= limit) { current = rad_malloc(alloc); @@ -975,7 +976,7 @@ static ssize_t rest_request_encode_wrapper(char **buffer, rest_read_t func, size len = func(current + used, alloc - used, 1, userdata); used += len; - if (!len) { + if (ctx->state == READ_STATE_END || !len) { *buffer = current; return used; } diff --git a/src/modules/rlm_sql/rlm_sql.c b/src/modules/rlm_sql/rlm_sql.c index 24638f0..4989dd4 100644 --- a/src/modules/rlm_sql/rlm_sql.c +++ b/src/modules/rlm_sql/rlm_sql.c @@ -1605,7 +1605,7 @@ static rlm_rcode_t mod_checksimul(void *instance, REQUEST * request) VALUE_PAIR *vp; int ret; fr_ipaddr_t nas_addr; - uint32_t nas_port = 0; + char const *nas_port_id = NULL; char *expanded = NULL; @@ -1734,11 +1734,9 @@ static rlm_rcode_t mod_checksimul(void *instance, REQUEST * request) } } - if (row[4]) { - nas_port = atoi(row[4]); - } + nas_port_id = row[4]; - check = rad_check_ts(&nas_addr, nas_port, row[2], row[1]); + check = rad_check_ts(&nas_addr, 0, nas_port_id, row[2], row[1]); if (check == 0) { /* * Stale record - zap it. @@ -1758,7 +1756,7 @@ static rlm_rcode_t mod_checksimul(void *instance, REQUEST * request) } if ((num_rows > 8) && row[8]) sess_time = atoi(row[8]); - session_zap(request, &nas_addr, nas_port, + session_zap(request, &nas_addr, 0, nas_port_id, row[2], row[1], framed_addr, proto, sess_time); } diff --git a/src/modules/rlm_sql/sql.c b/src/modules/rlm_sql/sql.c index 5cc020e..a18e00b 100644 --- a/src/modules/rlm_sql/sql.c +++ b/src/modules/rlm_sql/sql.c @@ -292,7 +292,7 @@ sql_rcode_t rlm_sql_query(rlm_sql_t *inst, REQUEST *request, rlm_sql_handle_t ** /* * inst->pool may be NULL is this function is called by mod_conn_create. */ - count = inst->pool ? fr_connection_pool_get_num(inst->pool) : 0; + count = inst->pool ? fr_connection_pool_get_retries(inst->pool) : 0; /* * Here we try with each of the existing connections, then try to create @@ -392,7 +392,7 @@ sql_rcode_t rlm_sql_select_query(rlm_sql_t *inst, REQUEST *request, rlm_sql_hand /* * inst->pool may be NULL is this function is called by mod_conn_create. */ - count = inst->pool ? fr_connection_pool_get_num(inst->pool) : 0; + count = inst->pool ? fr_connection_pool_get_retries(inst->pool) : 0; /* * For sanity, for when no connections are viable, and we can't make a new one diff --git a/src/modules/rlm_unbound/configure b/src/modules/rlm_unbound/configure index eba8578..735bbe7 100755 --- a/src/modules/rlm_unbound/configure +++ b/src/modules/rlm_unbound/configure @@ -3005,7 +3005,7 @@ rm "config.report.tmp" mod_ldflags="${SMART_LIBS}" -mod_cflags="${SMART_CFLAGS}" +mod_cflags="${SMART_CPPFLAGS}" diff --git a/src/modules/rlm_unbound/configure.ac b/src/modules/rlm_unbound/configure.ac index 1c6e064..7d2fcff 100644 --- a/src/modules/rlm_unbound/configure.ac +++ b/src/modules/rlm_unbound/configure.ac @@ -6,6 +6,9 @@ FR_INIT_MODULE([rlm_unbound]) FR_MODULE_START_TESTS +AC_PROG_CC +AC_PROG_CPP + dnl extra argument: --with-rlm-unbound-lib-dir rlm_unbound_lib_dir= AC_ARG_WITH(rlm-unbound-lib-dir, @@ -53,7 +56,7 @@ fi FR_MODULE_END_TESTS mod_ldflags="${SMART_LIBS}" -mod_cflags="${SMART_CFLAGS}" +mod_cflags="${SMART_CPPFLAGS}" AC_SUBST(mod_cflags) AC_SUBST(mod_ldflags) diff --git a/src/tests/Makefile b/src/tests/Makefile index fe836c6..2dab5b1 100644 --- a/src/tests/Makefile +++ b/src/tests/Makefile @@ -8,6 +8,17 @@ # include ../../Make.inc +# +# You can watch what it's doing by: +# +# $ VERBOSE=1 make ... args ... +# +ifeq "${VERBOSE}" "" + Q=@ +else + Q= +endif + BUILD_PATH := $(top_builddir)/build # @@ -15,7 +26,7 @@ BUILD_PATH := $(top_builddir)/build # .PHONY: eapol_test eapol_test: $(BUILD_PATH)/tests/eapol_test/eapol_test.mk - @echo EAPOL_TEST=$(EAPOL_TEST) + ${Q}echo EAPOL_TEST=$(EAPOL_TEST) # # If we're doing anything resembling EAP, then make sure that @@ -23,7 +34,7 @@ eapol_test: $(BUILD_PATH)/tests/eapol_test/eapol_test.mk # ifneq "(findstring eap,$(MAKECMDGOALS))" "" $(BUILD_PATH)/tests/eapol_test: - @mkdir -p $@ + ${Q}mkdir -p $@ TEST_PATH := $(top_builddir)/src/tests DICT_PATH := $(TEST_PATH) @@ -49,17 +60,17 @@ override EAPOL_TEST_BIN := $(shell $(top_builddir)/scripts/ci/eapol_test-build.s endif $(BUILD_PATH)/tests/eapol_test/eapol_test.mk: | $(BUILD_PATH)/tests/eapol_test - @echo "EAPOL_TEST=$(EAPOL_TEST_BIN)" > $@ - @echo "TLS1_3=$(shell openssl ciphers -s -v 'ECDHE:!COMPLEMENTOFDEFAULT'| grep -q 'TLSv1.3' && echo yes)" >> $@ - @echo "OPENSSL_OK=$(shell openssl version | grep -v ' 1\.0' >/dev/null && echo yes)" >> $@ - @echo "OPENSSL3_OK=$(shell openssl version | grep -q ' OpenSSL 3\.0' && echo yes)" >> $@ + ${Q}echo "EAPOL_TEST=$(EAPOL_TEST_BIN)" > $@ + ${Q}echo "TLS1_3=$(shell openssl ciphers -s -v 'ECDHE:!COMPLEMENTOFDEFAULT'| grep -q 'TLSv1.3' && echo yes)" >> $@ + ${Q}echo "OPENSSL_OK=$(shell openssl version | grep -v ' 1\.0' >/dev/null && echo yes)" >> $@ + ${Q}echo "OPENSSL3_OK=$(shell openssl version | grep -q ' OpenSSL 3\.0' && echo yes)" >> $@ else # # No OpenSSL means that we don't even try to build eapol_test # .PHONY: $(BUILD_PATH)/tests/eapol_test/eapol_test.mk $(BUILD_PATH)/tests/eapol_test/eapol_test.mk: | $(BUILD_PATH)/tests/eapol_test - @touch $@ + ${Q}touch $@ endif -include $(BUILD_PATH)/tests/eapol_test/eapol_test.mk @@ -120,30 +131,30 @@ dictionary: test.conf: dictionary config/eap-test @echo "# test configuration file. Do not install. Delete at any time." > $@ - @if [ -n "$(LIB_PATH)" ]; then \ + ${Q}if [ -n "$(LIB_PATH)" ]; then \ echo "libdir =" $(LIB_PATH) >> $@; \ fi - @echo "testdir =" $(TEST_PATH) >> $@ - @echo 'logdir = $${testdir}' >> $@ - @echo "maindir =" $(RADDB_PATH) >> $@ - @echo 'radacctdir = $${testdir}' >> $@ - @echo 'pidfile = $${testdir}/radiusd.pid' >> $@ - @echo 'panic_action = "gdb -batch -x $${testdir}/panic.gdb %e %p > $${testdir}/gdb.log 2>&1; cat $${testdir}/gdb.log"' >> $@ - @echo 'security {' >> $@ - @echo ' allow_vulnerable_openssl = yes' >> $@ - @echo '}' >> $@ - @echo >> $@ - @echo 'modconfdir = $${maindir}mods-config' >> $@ - @echo 'certdir = $${maindir}/certs' >> $@ - @echo 'cadir = $${maindir}/certs' >> $@ - @echo '$$INCLUDE $${testdir}/config/' >> $@ - @echo '$$INCLUDE $${maindir}/radiusd.conf' >> $@ + ${Q}echo "testdir =" $(TEST_PATH) >> $@ + ${Q}echo 'logdir = $${testdir}' >> $@ + ${Q}echo "maindir =" $(RADDB_PATH) >> $@ + ${Q}echo 'radacctdir = $${testdir}' >> $@ + ${Q}echo 'pidfile = $${testdir}/radiusd.pid' >> $@ + ${Q}echo 'panic_action = "gdb -batch -x $${testdir}/panic.gdb %e %p > $${testdir}/gdb.log 2>&1; cat $${testdir}/gdb.log"' >> $@ + ${Q}echo 'security {' >> $@ + ${Q}echo ' allow_vulnerable_openssl = yes' >> $@ + ${Q}echo '}' >> $@ + ${Q}echo >> $@ + ${Q}echo 'modconfdir = $${maindir}mods-config' >> $@ + ${Q}echo 'certdir = $${maindir}/certs' >> $@ + ${Q}echo 'cadir = $${maindir}/certs' >> $@ + ${Q}echo '$$INCLUDE $${testdir}/config/' >> $@ + ${Q}echo '$$INCLUDE $${maindir}/radiusd.conf' >> $@ # # Rename "inner-tunnel", and ensure that it only uses the "eap-test" module. # config/eap-test-inner-tunnel: $(RADDB_PATH)sites-available/inner-tunnel - @sed 's/eap/eap-test/;s/server inner-tunnel/server eap-test-inner-tunnel/' < $< > $@ + ${Q}sed 's/eap/eap-test/;s/server inner-tunnel/server eap-test-inner-tunnel/' < $< > $@ # # * Same renames as above @@ -155,7 +166,7 @@ config/eap-test-inner-tunnel: $(RADDB_PATH)sites-available/inner-tunnel # * tell OpenSSL to enable insecure ciphers TLS 1.0 and TLS 1.1 # config/eap-test: $(RADDB_PATH)mods-available/eap config/eap-test-inner-tunnel - @sed -e 's/eap {/eap eap-test {/' \ + ${Q}sed -e 's/eap {/eap eap-test {/' \ -e 's/= inner-tunnel/= eap-test-inner-tunnel/;s/use_tunneled_reply = no/use_tunneled_reply = yes/' \ -e 's/enable = no/enable = yes/' \ -e 's/^\(.*\)persist_dir =/ persist_dir =/' \ @@ -165,21 +176,21 @@ config/eap-test: $(RADDB_PATH)mods-available/eap config/eap-test-inner-tunnel < $< > $@ radiusd.pid: test.conf - @rm -rf $(TEST_PATH)/gdb.log $(TEST_PATH)/radius.log $(TEST_PATH)/tlscache - @mkdir -p $(TEST_PATH)/tlscache - @printf "Starting server... " - @if ! $(RADIUSD_BIN) -Pxxxxml $(TEST_PATH)/radius.log -d ${top_builddir}/src/tests -n test -i 127.0.0.1 -p $(PORT) -D $(DICT_PATH); then \ + ${Q}rm -rf $(TEST_PATH)/gdb.log $(TEST_PATH)/radius.log $(TEST_PATH)/tlscache + ${Q}mkdir -p $(TEST_PATH)/tlscache + ${Q}printf "Starting server... " + ${Q}if ! $(RADIUSD_BIN) -Pxxxxml $(TEST_PATH)/radius.log -d ${top_builddir}/src/tests -n test -i 127.0.0.1 -p $(PORT) -D $(DICT_PATH); then \ echo "failed"; \ echo "Last log entries were:"; \ tail -n 20 "$(TEST_PATH)/radius.log"; \ fi - @echo "ok" + ${Q}echo "ok" # We can't make this depend on radiusd.pid, because then make will create # radiusd.pid when we make radiusd.kill, which we don't want. .PHONY: radiusd.kill radiusd.kill: - @if [ -f radiusd.pid ]; then \ + ${Q}if [ -f radiusd.pid ]; then \ ret=0; \ if ! ps `cat $(TEST_PATH)/radiusd.pid` >/dev/null 2>&1; then \ rm -f radiusd.pid; \ @@ -195,7 +206,7 @@ radiusd.kill: fi; \ exit $$ret; \ fi - @rm -f radiusd.pid + ${Q}rm -f radiusd.pid # # Run eapol_test if it exists and we built with openssl support. @@ -214,11 +225,11 @@ endif .PHONY: $(BUILD_PATH)/tests/eap $(BUILD_PATH)/tests/eap: - @mkdir -p $@ + ${Q}mkdir -p $@ .PHONY: clean.tests.eap clean.tests.eap: - @rm -rf $(BUILD_PATH)/tests/eap config/tlscache config/eap-test config/eap-test-inner-tunnel + ${Q}rm -rf $(BUILD_PATH)/tests/eap config/tlscache config/eap-test config/eap-test-inner-tunnel # # Set target-specific variables, so that the later shell scripts are rather more understandable. @@ -230,8 +241,8 @@ $(BUILD_PATH)/tests/eap/%.ok: CMD = $(EAPOL_TEST) -c $< -p $(PORT) -s $(SECRET) $(BUILD_PATH)/tests/eap/%.ok: LOG = $(patsubst %.ok,%,$@).log $(BUILD_PATH)/tests/eap/%.ok: $(top_builddir)/src/tests/%.conf | radiusd.kill $(BUILD_PATH)/tests/eap radiusd.pid radiusd.kill - @printf 'EAPOL_TEST %s ' $(notdir $(patsubst %.conf,%,$<)) - @if ! $(CMD) > $(LOG) 2>&1; then \ + ${Q}printf 'EAPOL_TEST %s ' $(notdir $(patsubst %.conf,%,$<)) + ${Q}if ! $(CMD) > $(LOG) 2>&1; then \ echo " - " FAILED - command failed; \ echo ">>> cmd -" $(CMD); \ echo ">>> log -" $(LOG); \ @@ -242,7 +253,7 @@ $(BUILD_PATH)/tests/eap/%.ok: $(top_builddir)/src/tests/%.conf | radiusd.kill $( exit 1; \ fi @echo - @touch $@ + ${Q}touch $@ # # Don't run the full TLS version tests for CI post-install. @@ -257,13 +268,13 @@ ifneq "$(prefix)" "" # define EAP_TLS_CONFIG $(BUILD_PATH)/tests/eap/${1}-${2}.conf: $(top_builddir)/src/tests/${1}.conf - @sed -e 's/phase1="/phase1="$(subst $(subst .,_,${2})=1,$(subst .,_,${2})=0,$(EAP_TLS_DISABLE_STRING)) /' \ + ${Q}sed -e 's/phase1="/phase1="$(subst $(subst .,_,${2})=1,$(subst .,_,${2})=0,$(EAP_TLS_DISABLE_STRING)) /' \ -e '/password/s/^//p; /password/s/^.*/ openssl_ciphers="DEFAULT${SECLEVEL}"/' \ < $$< > $$@ $(BUILD_PATH)/tests/eap/${1}-${2}.ok: $(BUILD_PATH)/tests/eap/${1}-${2}.conf - @printf 'EAPOL_TEST %s' $$(notdir $$(patsubst %.ok,%,$$@)) - @if ! $$(CMD) -r 1 > $$(LOG) 2>&1; then \ + ${Q}printf 'EAPOL_TEST %s' $$(notdir $$(patsubst %.ok,%,$$@)) + ${Q}if ! $$(CMD) -r 1 > $$(LOG) 2>&1; then \ echo " - " FAILED - command failed; \ echo ">>> cmd -" $$(CMD) -r 1; \ echo ">>> log -" $$(LOG); \ @@ -286,7 +297,7 @@ $(BUILD_PATH)/tests/eap/${1}-${2}.ok: $(BUILD_PATH)/tests/eap/${1}-${2}.conf exit 1; \ fi @echo - @touch $$@ + ${Q}touch $$@ # EAP-FAST doesn't do TLS 1.3 ifneq "${1}-${2}" "eap-fast-1.3" @@ -300,8 +311,9 @@ endif # there's no "prefix", so we don't run the full EAP tests EAPOL_OK_FILES := $(sort $(addprefix $(BUILD_PATH)/tests/eap/,$(patsubst %.conf,%.ok, $(notdir $(EAP_TLS_FILES) $(EAP_FILES)))) $(EAP_TLS_VERSION_FILES)) tests.eap: $(EAPOL_OK_FILES) | radiusd.kill radiusd.pid - @$(MAKE) radiusd.kill - +else +tests.eap: + ${Q}echo "EAPOL Tests is disabled" endif # we have eapol_test built # kill the server (if it's running) @@ -309,9 +321,8 @@ endif # we have eapol_test built # run the tests (ignoring any failures) # kill the server # remove the changes to raddb/ -tests: test.conf | radiusd.kill radiusd.pid - @chmod a+x runtests.sh - @BIN_PATH="$(BIN_PATH)" PORT="$(PORT)" ./runtests.sh $(TESTS) -ifneq "$(EAPOL_TEST)" "" - @$(MAKE) tests.eap -endif +tests.runtests: test.conf | radiusd.kill radiusd.pid + ${Q}chmod a+x runtests.sh + ${Q}BIN_PATH="$(BIN_PATH)" PORT="$(PORT)" ./runtests.sh $(TESTS) + +tests: tests.runtests tests.eap diff --git a/src/tests/sql_nas_table/all.mk b/src/tests/sql_nas_table/all.mk index da21501..311e93c 100644 --- a/src/tests/sql_nas_table/all.mk +++ b/src/tests/sql_nas_table/all.mk @@ -41,19 +41,19 @@ $(eval $(call RADIUSD_SERVICE,radiusd,$(OUTPUT))) .PHONY: sql_nas_table_bootstrap sql_nas_table_bootstrap: - $(Q)rm -f $(SQL_NASTABLE_DB) - $(Q)mkdir -p $(SQL_NASTABLE_BUILD_DIR) - $(Q)sqlite3 $(SQL_NASTABLE_DB) < ./raddb/mods-config/sql/main/sqlite/schema.sql - $(Q)sqlite3 $(SQL_NASTABLE_DB) < ./src/tests/sql_nas_table/clients.sql + ${Q}rm -f $(SQL_NASTABLE_DB) + ${Q}mkdir -p $(SQL_NASTABLE_BUILD_DIR) + ${Q}sqlite3 $(SQL_NASTABLE_DB) < ./raddb/mods-config/sql/main/sqlite/schema.sql + ${Q}sqlite3 $(SQL_NASTABLE_DB) < ./src/tests/sql_nas_table/clients.sql # # Run the radclient commands against the radiusd. # $(OUTPUT)/%: $(DIR)/% | $(TEST).radiusd_kill sql_nas_table_bootstrap $(TEST).radiusd_start - $(Q)echo "SQL_NASTABLE-TEST" - $(Q)mkdir -p $(dir $@) - $(Q)[ -f $(dir $@)/radiusd.pid ] || exit 1 - $(Q)if ! $(TESTBIN)/radclient $(ARGV) -xf src/tests/sql_nas_table/auth.txt -D share/ 127.0.0.1:$(PORT) auth $(SECRET) 1> $(SQL_NASTABLE_BUILD_DIR)/radclient.log 2>&1; then \ + ${Q}echo "SQL_NASTABLE-TEST" + ${Q}mkdir -p $(dir $@) + ${Q}[ -f $(dir $@)/radiusd.pid ] || exit 1 + ${Q}if ! $(TESTBIN)/radclient $(ARGV) -xf src/tests/sql_nas_table/auth.txt -D share/ 127.0.0.1:$(PORT) auth $(SECRET) 1> $(SQL_NASTABLE_BUILD_DIR)/radclient.log 2>&1; then \ echo "FAILED"; \ rm -f $(BUILD_DIR)/tests/test.sql_nas_table; \ $(MAKE) --no-print-directory test.sql_nas_table.radiusd_kill; \ @@ -65,10 +65,10 @@ $(OUTPUT)/%: $(DIR)/% | $(TEST).radiusd_kill sql_nas_table_bootstrap $(TEST).rad exit 1; \ fi - $(Q)touch $@ + ${Q}touch $@ $(TEST): - $(Q)$(MAKE) --no-print-directory $@.radiusd_stop + ${Q}$(MAKE) --no-print-directory $@.radiusd_stop @touch $(BUILD_DIR)/tests/$@ else # diff --git a/src/tests/tls/README.md b/src/tests/tls/README.md new file mode 100644 index 0000000..e0cb686 --- /dev/null +++ b/src/tests/tls/README.md @@ -0,0 +1,40 @@ +# Tests for TLS + +You will need at least 3 terminal windows: + +1. Home Server + +``` +./radiusd-home.sh +``` + +This server receives Access-Request packets over TLS, and sends Access-Accept. + +2. Proxy server + +``` +./radiusd-proxy.sh +``` + +This server receives Access-Request packets over UDP, and proxies them to the home server. + +3. Client(s) + +Send one packet: + +``` +./radclient.sh +``` + +Send 500,000 packets: + +``` +./radclient.sh -c 500000 +``` + +You can also send accounting packets: + +``` +./radacct.sh +``` + diff --git a/src/tests/tls/acct b/src/tests/tls/acct new file mode 100644 index 0000000..c246714 --- /dev/null +++ b/src/tests/tls/acct @@ -0,0 +1,7 @@ +User-Name = "bob" +Acct-Session-Id := "0000" +Acct-Status-Type = Start +Called-Station-Id := "00:01:02:03" +Calling-Station-Id := "04:05:06:07" +Message-Authenticator = 0x00 +Framed-IP-Address = 127.0.0.1 diff --git a/src/tests/tls/block.sh b/src/tests/tls/block.sh new file mode 100755 index 0000000..20d8bab --- /dev/null +++ b/src/tests/tls/block.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Simple script blocking requests from proxy to home server +# +# This works only on Linux. It can be used to create random networking issues. + +if [ $UID -ne 0 ]; then + echo "Only 'root' can modify 'iptables' rules" + exit 1 +fi + +# avoid keep the server blocked +function trap_ctrlc () +{ + echo "Ctrl-C caught...performing clean up" + + iptables -D INPUT -p tcp --dport 2083 -j REJECT 1> /dev/null 2>&1 + exit 0 +} + +trap "trap_ctrlc" 2 + +MAXWAIT=5 +while true; do + _wait="$((RANDOM % MAXWAIT))" + + echo "(*) Blocking the port 2083 for ${_wait}s" + iptables -A INPUT -p tcp --dport 2083 -j REJECT + sleep $_wait + + echo "(*) Allowing the port 2083 for ${_wait}s" + iptables -D INPUT -p tcp --dport 2083 -j REJECT + sleep $_wait +done diff --git a/src/tests/tls/common.sh b/src/tests/tls/common.sh new file mode 100644 index 0000000..020345b --- /dev/null +++ b/src/tests/tls/common.sh @@ -0,0 +1,12 @@ +# +# Common definitions. +# +DIR=$(dirname $0)/../../.. +PROGRAM=$(basename $0) + +export RADDB=$DIR/raddb +export FR_LOCAL_PREFIX=`cat prefix 2>/dev/null` +export TEST_PATH=$(dirname $0)/ +export LIB_PATH=$DIR/build/lib/local/ +export FR_LIBRARY_PATH=$DIR/build/lib/local/.libs/ + diff --git a/src/tests/tls/home/radiusd.conf b/src/tests/tls/home/radiusd.conf new file mode 100644 index 0000000..69d44f7 --- /dev/null +++ b/src/tests/tls/home/radiusd.conf @@ -0,0 +1,105 @@ +# +# Minimal radiusd.conf for testing +# +raddb = $ENV{RADDB} +modconfdir = ${raddb}/mods-config +testdir = $ENV{TEST_PATH} +pidfile = ${testdir}/radiusd.pid +panic_action = "gdb -batch -x ${raddb}/panic.gdb %e %p > ${testdir}/gdb-radiusd.log 2>&1; cat ${testdir}/gdb-radiusd.log" +certdir = ${raddb}/certs +cadir = ${raddb}/certs +libdir = $ENV{LIB_PATH} + +max_requests = 1048576 + +thread pool { + start_servers = 5 + max_servers = 32 + min_spare_servers = 3 + max_spare_servers = 10 + max_requests_per_server = 0 + cleanup_delay = 5 + max_queue_size = 65536 + auto_limit_acct = no +} + +# +# Referenced by some modules for default thread pool configuration +# +modules { + +$INCLUDE ${raddb}/mods-available/always +} + +clients radsec { + client home { + ipaddr = 127.0.0.1 + proto = tls + } +} + +listen { + type = auth + + ipaddr = 127.0.0.1 + port = $ENV{FR_LOCAL_PREFIX}2083 + proto = tcp + + clients = radsec + + virtual_server = default + + tls { + private_key_password = whatever + private_key_file = ${certdir}/server.pem + certificate_file = ${certdir}/server.pem + ca_file = ${cadir}/ca.pem + fragment_size = 8192 + ca_path = ${cadir} + cipher_list = "DEFAULT" + tls_min_version = "1.2" + tls_max_version = "1.2" + } +} + +listen { + type = acct + + ipaddr = 127.0.0.1 + port = $ENV{FR_LOCAL_PREFIX}2084 + proto = tcp + + clients = radsec + + virtual_server = default + + tls { + private_key_password = whatever + private_key_file = ${certdir}/server.pem + certificate_file = ${certdir}/server.pem + ca_file = ${cadir}/ca.pem + fragment_size = 8192 + ca_path = ${cadir} + cipher_list = "DEFAULT" + tls_min_version = "1.3" + tls_max_version = "1.3" + } +} + +server default { + authorize { + update control { + Auth-Type := accept + } + } + + preacct { + update control { + Response-Packet-Type := Accounting-Response + } + } + + acct { + ok + } +} diff --git a/src/tests/tls/proxy/proxy.conf b/src/tests/tls/proxy/proxy.conf new file mode 100644 index 0000000..e2631c4 --- /dev/null +++ b/src/tests/tls/proxy/proxy.conf @@ -0,0 +1,59 @@ +home_server home { + ipaddr = 127.0.0.1 + port = $ENV{FR_LOCAL_PREFIX}2083 + type = auth + secret = radsec + proto = tcp + status_check = none + + nonblock = yes + + revive_interval = 10 + + tls { + private_key_password = whatever + private_key_file = ${certdir}/client.pem + certificate_file = ${certdir}/client.pem + ca_file = ${cadir}/ca.pem + fragment_size = 8192 + ca_path = ${cadir} + cipher_list = "DEFAULT" + tls_min_version = "1.2" + tls_max_version = "1.2" + } +} + +home_server_pool home { + type = fail-over + home_server = home +} + +home_server home_acct { + ipaddr = 127.0.0.1 + port = $ENV{FR_LOCAL_PREFIX}2084 + type = acct + secret = radsec + proto = tcp + status_check = none + +# nonblock = yes + + revive_interval = 10 + + tls { + private_key_password = whatever + private_key_file = ${certdir}/client.pem + certificate_file = ${certdir}/client.pem + ca_file = ${cadir}/ca.pem + fragment_size = 8192 + ca_path = ${cadir} + cipher_list = "DEFAULT" + tls_min_version = "1.3" + tls_max_version = "1.3" + } +} + +home_server_pool home_acct { + type = fail-over + home_server = home_acct +} diff --git a/src/tests/tls/proxy/radiusd.conf b/src/tests/tls/proxy/radiusd.conf new file mode 100644 index 0000000..8e0577d --- /dev/null +++ b/src/tests/tls/proxy/radiusd.conf @@ -0,0 +1,63 @@ +raddb = $ENV{RADDB} +modconfdir = ${raddb}/mods-config +testdir = $ENV{TEST_PATH}/proxy +pidfile = ${testdir}/radiusd.pid +panic_action = "gdb -batch -x ${raddb}/panic.gdb %e %p > ${testdir}/gdb-radiusd.log 2>&1; cat ${testdir}/gdb-radiusd.log" +certdir = ${raddb}/certs +cadir = ${raddb}/certs +libdir = $ENV{LIB_PATH} + +max_requests = 1048576 + +thread pool { + start_servers = 5 + max_servers = 32 + min_spare_servers = 3 + max_spare_servers = 10 + max_requests_per_server = 0 + cleanup_delay = 5 + max_queue_size = 65536 + auto_limit_acct = no +} + +# +# Minimum configuration for Proxy Server -> SRADIUSD +# +$INCLUDE ${testdir}/proxy.conf + +client local_test { + ipaddr = 127.0.0.1 + secret = testing123 + proto = * +} + +listen { + type = auth + ipaddr = 127.0.0.1 + port = $ENV{FR_LOCAL_PREFIX}1812 + proto = udp + virtual_server = default +} + +listen { + type = acct + ipaddr = 127.0.0.1 + port = $ENV{FR_LOCAL_PREFIX}1813 + proto = udp + virtual_server = default +} + + +server default { + authorize { + update control { + &Home-Server-Pool = "home" + } + } + + preacct { + update control { + &Home-Server-Pool = "home_acct" + } + } +} diff --git a/src/tests/tls/radacct.sh b/src/tests/tls/radacct.sh new file mode 100755 index 0000000..0469727 --- /dev/null +++ b/src/tests/tls/radacct.sh @@ -0,0 +1,7 @@ +#!/bin/sh +. $(dirname $0)/common.sh + +# +# Run radclient acct +# +exec $DIR/build/make/jlibtool --mode=execute $FR_DEBUGGER $DIR/build/bin/local/radclient -d $(dirname $0)/home -D $DIR/share/ -f acct $@ localhost:${FR_LOCAL_PREFIX}1813 acct testing123 diff --git a/src/tests/tls/radclient.sh b/src/tests/tls/radclient.sh new file mode 100755 index 0000000..e82386e --- /dev/null +++ b/src/tests/tls/radclient.sh @@ -0,0 +1,7 @@ +#!/bin/sh +. $(dirname $0)/common.sh + +# +# Run radclient auth +# +exec $DIR/build/make/jlibtool --mode=execute $FR_DEBUGGER $DIR/build/bin/local/radclient -d $(dirname $0)/home -D $DIR/share/ -f user_password $@ localhost:${FR_LOCAL_PREFIX}1812 auth testing123 diff --git a/src/tests/tls/radiusd-home.sh b/src/tests/tls/radiusd-home.sh new file mode 100755 index 0000000..ea2e694 --- /dev/null +++ b/src/tests/tls/radiusd-home.sh @@ -0,0 +1,7 @@ +#!/bin/sh +. $(dirname $0)/common.sh + +# +# Run the home server. +# +exec $DIR/build/make/jlibtool --mode=execute $FR_DEBUGGER $DIR/build/bin/local/radiusd -d $(dirname $0)/home -D $DIR/share/ -fxx -l stdout $@ diff --git a/src/tests/tls/radiusd-proxy.sh b/src/tests/tls/radiusd-proxy.sh new file mode 100755 index 0000000..65f8066 --- /dev/null +++ b/src/tests/tls/radiusd-proxy.sh @@ -0,0 +1,7 @@ +#!/bin/sh +. $(dirname $0)/common.sh + +# +# Run the proxy server. +# +exec $DIR/build/make/jlibtool --mode=execute $FR_DEBUGGER $DIR/build/bin/local/radiusd -d $(dirname $0)/proxy -D $DIR/share/ -fxx -l stdout $@ diff --git a/src/tests/tls/user_password b/src/tests/tls/user_password new file mode 100644 index 0000000..9d0a12c --- /dev/null +++ b/src/tests/tls/user_password @@ -0,0 +1,3 @@ +User-Name = "bob" +User-Password = "bob" +Message-Authenticator = 0x00 diff --git a/suse/freeradius.spec b/suse/freeradius.spec index a048b56..893d4fe 100644 --- a/suse/freeradius.spec +++ b/suse/freeradius.spec @@ -1,5 +1,5 @@ Name: freeradius-server -Version: 3.2.2 +Version: 3.2.3 Release: 0 License: GPLv2 ; LGPLv2.1 Group: Productivity/Networking/Radius/Servers |