Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cgestes/pulseaudio
  • andika/pulseaudio
  • huwei-eaco/pulseaudio
  • Shinigami072/pulseaudio
  • zero2165/pulseaudio
  • to1ne/pulseaudio
  • BtbN/pulseaudio
  • vanschelven/pulseaudio
  • Hyperion/pulseaudio
  • lordee/pulseaudio
  • ricotz/pulseaudio
  • iljavs/pulseaudio
  • nazar-pc/pulseaudio
  • flyingOwl/pulseaudio
  • ktosiek/pulseaudio
  • chengyi/pulseaudio
  • Marzal/pulseaudio
  • eenurkka/pulseaudio
  • tomty89/pulseaudio
  • lnicola/pulseaudio
  • iamdrq/pulseaudio
  • pseyfert/pulseaudio
  • hstefan/pulseaudio
  • muzena/pulseaudio
  • dengbo/pulseaudio
  • zenbooster/pulseaudio
  • Ganjing0224/pulseaudio
  • jejb/pulseaudio
  • jnqnfe/pulseaudio
  • chewi/pulseaudio
  • pulseaudio/pulseaudio
  • kovdan01/pulseaudio
  • Redcroft/pulseaudio
  • Tormen/pulseaudio
  • m.shakthi.prashanth/pulseaudio
  • shdown/pulseaudio
  • paravoid/pulseaudio
  • Mathy/pulseaudio
  • nelhage/pulseaudio
  • rhkdtlr0/pulseaudio
  • aspotashev/pulseaudio
  • WhyNotHugo/pulseaudio
  • mrdengbo/pulseaudio
  • c33howard/pulseaudio
  • jusa/pulseaudio
  • mlink/pulseaudio
  • bert/pulseaudio
  • leio/pulseaudio
  • manschwetus/pulseaudio
  • johanneswolf/pulseaudio
  • roshal/pulseaudio
  • wegank/pulseaudio
  • Twitch0125/pulseaudio
  • heitbaum/pulseaudio
  • juimonen/pulseaudio
  • Isopod/pulseaudio
  • olani/pulseaudio
  • kode54/pulseaudio
  • sthibaul/pulseaudio
  • pgaskin/pulseaudio
  • t-8ch/pulseaudio
  • nostrad/pulseaudio
  • pan93412/pulseaudio
  • jpalus/pulseaudio
  • alldarrenamee007/pulseaudio
  • libinyang/pulseaudio
  • jprvita/pulseaudio
  • zootboy/pulseaudio
  • mikhailnov/pulseaudio
  • wtaymans/pulseaudio
  • carlosg/pulseaudio
  • rogierreerink/pulseaudio
  • takaswie/pulseaudio
  • renuac/pulseaudio
  • gioele/pulseaudio
  • mohd-akram/pulseaudio
  • acheronfail/pulseaudio
  • nbrownus/pulseaudio
  • Mr-Tao/pulseaudio
  • a-wai/pulseaudio
  • nick.moriarty/pulseaudio
  • imaami/pulseaudio
  • qyliss/pulseaudio
  • ranolfi/pulseaudio
  • dlahoti/pulseaudio
  • dannyob/pulseaudio
  • SpotlightKid/pulseaudio
  • jcsing.lee/pulseaudio
  • welaq/pulseaudio
  • antoinegirardvallee/pulseaudio
  • guest271314/pulseaudio
  • chutz/pulseaudio
  • codedninja/pulseaudio
  • jorisc90/pulseaudio
  • yarikoptic/pulseaudio
  • mr-sour/pulseaudio
  • ueni/pulseaudio
  • zdave/pulseaudio
  • gebner/pulseaudio
  • lynxeye/pulseaudio
  • arp242/pulseaudio
  • kkang/pulseaudio
  • venam/pulseaudio
  • morrishoresh/pulseaudio
  • dongsibo/pulseaudio
  • arun/pulseaudio
  • plevine457/pulseaudio
  • tryone144/pulseaudio
  • tensorknower69/pulseaudio
  • philipp-s/pulseaudio
  • marcin.iwaniak/pulseaudio
  • evanmiller/pulseaudio
  • mfilion/pulseaudio
  • smesgr/pulseaudio
  • ammgws/pulseaudio
  • hubenchang0515/pulseaudio
  • alesliehughes/pulseaudio-alh
  • beniamin.kalinowski/pulseaudio
  • rebemlix/pulseaudio
  • sunyuechi/pulseaudio
  • kapiwko/pulseaudio
  • JulianoSC/pulseaudio
  • akostadinov/pulseaudio
  • felixonmars/pulseaudio
  • torotil/pulseaudio
  • perexg/pulseaudio
  • acinonyx/pulseaudio
  • bobokjan77/pulseaudio
  • Leihognlun/pulseaudio
  • rytone/pulseaudio
  • SimonPilkington/pulseaudio
  • nilninull/pulseaudio
  • diegoakechi/pulseaudio
  • topimiettinen/pulseaudio
  • time-river/pulseaudio
  • l631197874/pulseaudio
  • SanchayanMaity/pulseaudio
  • hutsts/pulseaudio
  • jibecfed/pulseaudio
  • agowa338/pulseaudio
  • upsuper/pulseaudio
  • nicolasfella/pulseaudio
  • piotrdrag/pulseaudio
  • mwilck/pulseaudio
  • shlevy/pulseaudio
  • thanghn90/pulseaudio
  • ZakharyH/pulseaudio
  • georgyo1/pulseaudio
  • pwithnall/pulseaudio
  • unusual-thoughts/pulseaudio
  • ckdo/pulseaudio
  • e45lee/pulseaudio
  • kekek/pulseaudio
  • Hawk777/pulseaudio
  • SergioJun/pulseaudio
  • igor.v.kovalenko/pulseaudio
  • hanklank/pulseaudio
  • sparkyb/pulseaudio
  • rafaelff/pulseaudio
  • sascha_silbe/pulseaudio
  • wwmm/pulseaudio
  • somdoron/pulseaudio
  • seb128/pulseaudio
  • smarter/pulseaudio
  • QuestofIranon/pulseaudio
  • dylanvanassche/pulseaudio
  • skierpage/pulseaudio
  • mathieutournier/pulseaudio
  • andrey.semashev/pulseaudio
  • vest.niklas/pulseaudio
  • fsateler/pulseaudio
  • chiluk/pulseaudio
  • f.wasil/pulseaudio
  • elijahflowers/pulseaudio
  • yurchor/pulseaudio
  • ogayot/pulseaudio
  • ra1nst0rm3d/pulseaudio
  • fran.dieguez/pulseaudio
  • ssahb05/pulseaudio
  • paulyc/pulseaudio
  • imposeren/pulseaudio
  • kraj/pulseaudio
  • yu-re-ka/pulseaudio
  • liaohanqin/pulseaudio
  • alanc/pulseaudio
  • alpernebbi/pulseaudio
  • peat-psuwit/pulseaudio
  • grafi-tt/pulseaudio
  • benpicco/pulseaudio
  • matoro1/pulseaudio
  • redfast00/pulseaudio
  • peijiankang/pulseaudio
  • peterh/pulseaudio
  • hongphongn884/pulseaudio
  • pmeerw/pulseaudio
  • rtreleaven/pulseaudio
  • marcan/pulseaudio
  • niveditharau/pulseaudio
  • jordimas/pulseaudio
  • intelfx/pulseaudio
  • khfeng/pulseaudio
  • tanuk/pulseaudio
  • felixdoerre/pulseaudio
  • worldofpeace/pulseaudio
  • valpackett/pulseaudio
  • djoooooe/pulseaudio
  • dos/pulseaudio
  • MacTavishAO/pulseaudio
  • rmader/pulseaudio
  • scootergrisen/pulseaudio
  • Cogitri/pulseaudio
  • aerostitch/pulseaudio
  • heftig/pulseaudio
  • caitao-/pulseaudio
  • StefanBruens/pulseaudio
  • bigon/pulseaudio
  • dh/pulseaudio
  • taahm/pulseaudio
  • jan.staffel/pulseaudio
  • fwolfff/pulseaudio
  • vudentz/pulseaudio
  • jarnos/pulseaudio
  • qarmin/pulseaudio
  • rseichter/pulseaudio
  • hashitaku/pulseaudio
  • neochapay/pulseaudio
  • tuxist/pulseaudio
  • sangchul1011/pulseaudio
  • tart/pulseaudio
  • mangix/pulseaudio
  • gchini/pulseaudio
  • Marv-CZ/pulseaudio
  • pvir/pulseaudio
  • MiloCasagrande/pulseaudio
  • baurzhanm/pulseaudio
  • speidy/pulseaudio
  • ahlinc/pulseaudio
  • NicoHood/pulseaudio
  • wengyingjie/pulseaudio
  • MarijnS95/pulseaudio
  • jwrdegoede/pulseaudio
  • cavallar/pulseaudio
  • chuck/pulseaudio
  • X1aomu/pulseaudio
  • wjt/pulseaudio
  • opoplawski/pulseaudio
  • jason77wang/pulseaudio
  • kwg/pulseaudio
  • Am1GO/pulseaudio
  • weblate/pulseaudio
250 results
Show changes
Commits on Source (2)
......@@ -6,9 +6,9 @@
# infrastructure on fd.o GitLab.
#
# Once the container stage is done, we move on to the 'build' stage where we
# run an autotools and meson build in parallel. Currently, tests are also run
# as part of the build stage as there doesn't seem to be significant value to
# splitting the stages at the moment.
# run meson build. Currently, tests are also run as part of the build stage as
# there doesn't seem to be significant value to splitting the stages at the
# moment.
stages:
- container
......@@ -19,7 +19,7 @@ variables:
# CI runs, for example when adding new packages to FDO_DISTRIBUTION_PACKAGES.
# The tag is an arbitrary string that identifies the exact container
# contents.
FDO_DISTRIBUTION_TAG: '2020-03-07-01'
FDO_DISTRIBUTION_TAG: '2021-03-01-02'
FDO_DISTRIBUTION_VERSION: '18.04'
FDO_UPSTREAM_REPO: 'pulseaudio/pulseaudio'
UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
......@@ -43,8 +43,6 @@ build-container:
# Otherwise the changes won't have effect since an old container image will
# be used.
FDO_DISTRIBUTION_PACKAGES: >-
autoconf
automake
autopoint
bash-completion
check
......@@ -74,7 +72,6 @@ build-container:
libssl-dev
libsystemd-dev
libtdb-dev
libtool
libudev-dev
libwebrtc-audio-processing-dev
libwrap0-dev
......@@ -83,31 +80,13 @@ build-container:
libxml-parser-perl
libxml2-utils
libxtst-dev
make
m4
ninja-build
pkg-config
python3-setuptools
systemd
wget
build-autotools:
stage: build
image: $UBUNTU_IMAGE
script:
- export MAKEFLAGS="-j$(nproc)"
- NOCONFIGURE=1 ./bootstrap.sh
- mkdir build
- cd build
- ../configure --localstatedir=/var
- make
- make check
- make check-daemon
- ulimit -c 0 # don't dump core files on tests that are supposed to assert
- make distcheck
artifacts:
paths:
- build/
build-meson:
stage: build
image: $UBUNTU_IMAGE
......@@ -122,8 +101,10 @@ build-meson:
- meson build
- cd build
- ninja
- ulimit -c 0 # don't dump core files on tests that are supposed to assert
- ninja test
- ninja test-daemon
- ninja dist
artifacts:
paths:
- build/
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio 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 Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = \
bootstrap.sh \
coverity/model.c \
.gitlab-ci.yml \
.gitlab/issue_templates/Bug.md \
git-version-gen \
LICENSE \
pulseaudio.supp \
GPL \
LGPL \
doxygen/Makefile.am \
doxygen/Makefile.in \
doxygen/doxygen.conf.in \
PROTOCOL \
README \
CODE_OF_CONDUCT.md \
scripts/benchmark_memory_usage.sh \
scripts/plot_memory_usage.gp \
scripts/benchmarks/README \
todo \
.gitignore \
doxygen/.gitignore \
m4/.gitignore \
man/.gitignore \
po/.gitignore \
scripts/benchmarks/.gitignore \
src/.gitignore \
src/daemon/.gitignore \
src/pulse/.gitignore \
meson.build \
meson_options.txt \
doxygen/meson.build \
man/meson.build \
po/meson.build \
shell-completion/bash/meson.build \
shell-completion/zsh/meson.build \
src/daemon/meson.build \
src/meson.build \
src/modules/alsa/meson.build \
src/modules/alsa/mixer/meson.build \
src/modules/bluetooth/meson.build \
src/modules/echo-cancel/meson.build \
src/modules/gsettings/meson.build \
src/modules/gsettings/meson_post_install.py \
src/modules/meson.build \
src/modules/oss/meson.build \
src/modules/raop/meson.build \
src/modules/rtp/meson.build \
src/pulsecore/meson.build \
src/pulse/meson.build \
src/tests/meson.build \
src/tests/test-daemon.meson.sh \
src/utils/meson.build \
vala/meson.build
SUBDIRS = src doxygen man po
MAINTAINERCLEANFILES =
noinst_DATA =
vapidir = $(datadir)/vala/vapi
dist_vapi_DATA = \
vala/libpulse.deps vala/libpulse.vapi \
vala/libpulse-mainloop-glib.deps vala/libpulse-mainloop-glib.vapi \
vala/libpulse-simple.deps vala/libpulse-simple.vapi
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libpulse.pc libpulse-simple.pc
if HAVE_GLIB20
pkgconfig_DATA += \
libpulse-mainloop-glib.pc
endif
cmakedir = $(libdir)/cmake/PulseAudio
cmake_DATA = PulseAudioConfig.cmake PulseAudioConfigVersion.cmake
bashcompletiondir=@bashcompletiondir@
dist_bashcompletion_DATA = shell-completion/bash/pulseaudio
install-bashcompletion-aliases:
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pactl
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pacmd
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pasuspender
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio padsp
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pacat
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio paplay
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio parec
cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio parecord
install-data-hook: install-bashcompletion-aliases
zshcompletiondir=@zshcompletiondir@
dist_zshcompletion_DATA = shell-completion/zsh/_pulseaudio
homepage: all dist doxygen
test -d $$HOME/homepage/private
mkdir -p $$HOME/homepage/private/projects/pulseaudio $$HOME/homepage/private/projects/pulseaudio/doxygen
cp pulseaudio-@PACKAGE_VERSION@.tar.gz $$HOME/homepage/private/projects/pulseaudio
cp pulseaudio-@PACKAGE_VERSION@.tar.gz $$HOME/git.fedora/pulseaudio
cp -a doxygen/html/* $$HOME/homepage/private/projects/pulseaudio/doxygen
doxygen:
$(MAKE) -C doxygen doxygen
eolspace:
find \( -name '*.c' -o -name '*.h' -o -name 'Makefile.am' \) -exec perl -i -pe 's/\s+\n$$/\1\n/;' \{\} \;
untabify:
find \( -name '*.c' -o -name '*.h' \) -exec perl -i -pe 's/\t/ /g;' \{\} \;
fedora-snapshot: dist
cp $(distdir).tar.gz $$HOME/git.fedora/pulseaudio/$(distdir).tar.gz
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
echo $(VERSION) > $(distdir)/.version
check-daemon:
$(MAKE) -C src check-daemon
check-daemon-long:
$(MAKE) -C src check-daemon-long
.PHONY: homepage distcleancheck doxygen
# see git-version-gen
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
DISTCHECK_CONFIGURE_FLAGS = --with-udev-rules-dir="$$dc_install_base/lib/udev/rules.d" --with-systemduserunitdir="$$dc_install_base/lib/systemd/user" --with-bash-completion-dir="$$dc_install_base/share/bash-completion/completions"
......@@ -31,13 +31,10 @@ AUTHORS:
Several
HACKING:
In order to run pulseaudio from the build dir __OPTIMIZE__ should be
disabled (look at src/pulsecore/core-util.h::pa_run_from_build_tree()),
this can be done by passing "CFLAGS=-O0" to the configure script:
./autogen.sh
CFLAGS="-ggdb3 -O0" LDFLAGS="-ggdb3" ./configure
make
./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/
In order to run pulseaudio from the build dir:
meson build
meson compile -C build
build/src/daemon/pulseaudio -n -F build/src/daemon/default.pa -p $(pwd)/build/src/modules/
SPELLING:
PulseAudio
#!/bin/sh
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio 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 Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
# Only there to make jhbuild happy
NOCONFIGURE=1 ./bootstrap.sh
exec ./configure "$@"
#!/usr/bin/env bash
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio 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 Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
chmod +x .git/hooks/pre-commit && \
echo "Activated pre-commit hook."
fi
if [ -f .tarball-version ]; then
echo "Marking tarball version as modified."
echo -n `cat .tarball-version | sed 's/-rebootstrapped$//'`-rebootstrapped >.tarball-version
fi
# We check for this here, because if pkg-config is not found in the
# system, it's likely that the pkg.m4 macro file is also not present,
# which will make PKG_PROG_PKG_CONFIG be undefined and the generated
# configure file faulty.
if ! pkg-config --version &>/dev/null; then
echo "pkg-config is required to bootstrap this program"
exit 1
fi
# Other necessary programs
if ! autopoint --version &>/dev/null ; then
echo "autopoint is required to bootstrap this program"
exit 1
fi
autoreconf --force --install --verbose
if test "x$NOCONFIGURE" = "x"; then
CFLAGS="$CFLAGS -g -O0" ./configure --enable-force-preopen "$@" && \
make clean
fi
This diff is collapsed.
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio 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 Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
doxygen: doxygen.conf
doxygen $<
clean-local:
-rm -rf html
.PHONY: all doxygen
codeset.m4
extern-inline.m4
fcntl-o.m4
gettext.m4
glibc2.m4
glibc21.m4
iconv.m4
intdiv0.m4
intl.m4
intldir.m4
intlmacosx.m4
intmax.m4
inttypes-pri.m4
inttypes_h.m4
lcmessage.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
libtool.m4
lock.m4
longlong.m4
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
nls.m4
po.m4
printf-posix.m4
progtest.m4
size_max.m4
stdint_h.m4
threadlib.m4
uintmax_t.m4
visibility.m4
wchar_t.m4
wint_t.m4
xsize.m4
AC_DEFUN([ACX_LIBWRAP], [
LIBWRAP_LIBS=
saved_LIBS="$LIBS"
LIBS="$LIBS -lwrap"
AC_MSG_CHECKING([for tcpwrap library and headers])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <tcpd.h>
#include <syslog.h>
int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;],
[struct request_info *req;
return hosts_access (req);])],
[AC_DEFINE(HAVE_LIBWRAP, [], [Have tcpwrap?])
LIBWRAP_LIBS="-lwrap"
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
LIBS="$saved_LIBS"
])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's compiler
# or gives an error. (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 4
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_define.html
# ===========================================================================
#
# SYNOPSIS
#
# AC_CHECK_DEFINE([symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
# AX_CHECK_DEFINE([includes],[symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
#
# DESCRIPTION
#
# Complements AC_CHECK_FUNC but it does not check for a function but for a
# define to exist. Consider a usage like:
#
# AC_CHECK_DEFINE(__STRICT_ANSI__, CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500")
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 8
AU_ALIAS([AC_CHECK_DEFINED], [AC_CHECK_DEFINE])
AC_DEFUN([AC_CHECK_DEFINE],[
AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$1])dnl
AC_CACHE_CHECK([for $1 defined], ac_var,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
#ifdef $1
int ok;
#else
choke me
#endif
]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
AS_IF([test AS_VAR_GET(ac_var) != "no"], [$2], [$3])dnl
AS_VAR_POPDEF([ac_var])dnl
])
AU_ALIAS([AX_CHECK_DEFINED], [AX_CHECK_DEFINE])
AC_DEFUN([AX_CHECK_DEFINE],[
AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$2_$1])dnl
AC_CACHE_CHECK([for $2 defined in $1], ac_var,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <$1>]], [[
#ifdef $2
int ok;
#else
choke me
#endif
]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
AS_IF([test AS_VAR_GET(ac_var) != "no"], [$3], [$4])dnl
AS_VAR_POPDEF([ac_var])dnl
])
AC_DEFUN([AX_CHECK_FUNC],
[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$2])dnl
AC_CACHE_CHECK([for $2], ac_var,
dnl AC_LANG_FUNC_LINK_TRY
[AC_LINK_IFELSE([AC_LANG_PROGRAM([$1
#undef $2
char $2 ();],[
char (*f) () = $2;
return f != $2; ])],
[AS_VAR_SET(ac_var, yes)],
[AS_VAR_SET(ac_var, no)])])
AS_IF([test AS_VAR_GET(ac_var) = yes], [$3], [$4])dnl
AS_VAR_POPDEF([ac_var])dnl
])# AC_CHECK_FUNC
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_PREPROC_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's
# preprocessor/compiler/linker, or whether they give an error. (Warnings,
# however, are ignored.)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check us thus made
# with the following flags: "CFLAGS EXTRA-FLAGS FLAG". EXTRA-FLAGS can
# for example be used to force the compiler to issue an error when a bad
# flag is given.
#
# AX_APPEND_FLAG appends the FLAG to the FLAG-VARIABLE shell variable or
# the current language's flags if not specified. FLAG is not added to
# FLAG-VARIABLE if it is already in the shell variable.
#
# AX_APPEND_COMPILE_FLAGS checks for each FLAG1, FLAG2, etc. using
# AX_CHECK_COMPILE_FLAG and if the check is successful the flag is added
# to the appropriate FLAGS variable with AX_APPEND_FLAG. The
# FLAGS-VARIABLE and EXTRA-FLAGS arguments are the same as in the other
# macros. AX_APPEND_LINK_FLAGS does the same for linker flags.
#
# NOTE: Based on AX_CHECK_COMPILER_FLAGS and AX_CFLAGS_GCC_OPTION.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2009 Matteo Frigo
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 2
AC_DEFUN([AX_CHECK_PREPROC_FLAG],
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]cppflags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG preprocessor accepts $1], CACHEVAR, [
ax_check_save_flags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $4 $1"
AC_PREPROC_IFELSE([AC_LANG_PROGRAM()],
[AS_VAR_SET([CACHEVAR],[yes])],
[AS_VAR_SET([CACHEVAR],[no])])
CPPFLAGS=$ax_check_save_flags])
AS_VAR_IF([CACHEVAR], "yes",
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_PREPROC_FLAGS
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[AS_VAR_SET([CACHEVAR],[yes])],
[AS_VAR_SET([CACHEVAR],[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_VAR_IF([CACHEVAR], "yes",
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS
AC_DEFUN([AX_CHECK_LINK_FLAG],
[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
ax_check_save_flags=$LDFLAGS
LDFLAGS="$LDFLAGS $4 $1"
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
[AS_VAR_SET([CACHEVAR],[yes])],
[AS_VAR_SET([CACHEVAR],[no])])
LDFLAGS=$ax_check_save_flags])
AS_VAR_IF([CACHEVAR], "yes",
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_LINK_FLAGS
AC_DEFUN([AX_APPEND_FLAG],
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AC_REQUIRE([AC_PROG_GREP])
AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[]FLAGS)])dnl
AS_VAR_SET_IF([FLAGS],
[AS_IF([AS_ECHO(" $[]FLAGS ") | $GREP " $1 " 2>&1 >/dev/null],
[AC_RUN_LOG([: FLAGS already contains $1])],
[AC_RUN_LOG([: FLAGS="$FLAGS $1"])
AS_VAR_APPEND([FLAGS], [" $1"])])],
[AS_VAR_SET([FLAGS],[$1])])
AS_VAR_POPDEF([FLAGS])dnl
])dnl AX_APPEND_FLAG
AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
[for flag in $1; do
AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3])
done
])dnl AX_APPEND_COMPILE_FLAGS
AC_DEFUN([AX_APPEND_LINK_FLAGS],
[for flag in $1; do
AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3])
done
])dnl AX_APPEND_LINK_FLAGS
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the specified
# version of the C++ standard. If necessary, add switches to CXXFLAGS to
# enable support. VERSION may be '11' (for the C++11 standard) or '14'
# (for the C++14 standard).
#
# The second argument, if specified, indicates whether you insist on an
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
# -std=c++11). If neither is specified, you get whatever works, with
# preference for an extended mode.
#
# The third argument, if specified 'mandatory' or if left unspecified,
# indicates that baseline support for the specified C++ standard is
# required and that the macro should error out if no mode with that
# support is found. If specified 'optional', then configuration proceeds
# regardless, after defining HAVE_CXX${VERSION} if and only if a
# supporting mode is found.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 1
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
dnl (serial version number 13).
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [],
[$1], [14], [],
[$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])],
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$2], [], [],
[$2], [ext], [],
[$2], [noext], [],
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
[$3], [optional], [ax_cxx_compile_cxx$1_required=false],
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
AC_LANG_PUSH([C++])dnl
ac_success=no
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
ax_cv_cxx_compile_cxx$1,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[ax_cv_cxx_compile_cxx$1=yes],
[ax_cv_cxx_compile_cxx$1=no])])
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
ac_success=yes
fi
m4_if([$2], [noext], [], [dnl
if test x$ac_success = xno; then
for switch in -std=gnu++$1 -std=gnu++0x; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXXFLAGS="$ac_save_CXXFLAGS"])
if eval test x\$$cachevar = xyes; then
CXXFLAGS="$CXXFLAGS $switch"
ac_success=yes
break
fi
done
fi])
m4_if([$2], [ext], [], [dnl
if test x$ac_success = xno; then
dnl HP's aCC needs +std=c++11 according to:
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
dnl Cray's crayCC needs "-h std=c++11"
for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXXFLAGS="$ac_save_CXXFLAGS"])
if eval test x\$$cachevar = xyes; then
CXXFLAGS="$CXXFLAGS $switch"
ac_success=yes
break
fi
done
fi])
AC_LANG_POP([C++])
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
if test x$ac_success = xno; then
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
fi
else
if test x$ac_success = xno; then
HAVE_CXX$1=0
AC_MSG_NOTICE([No compiler with C++$1 support was found])
else
HAVE_CXX$1=1
AC_DEFINE(HAVE_CXX$1,1,
[define if the compiler supports basic C++$1 syntax])
fi
AC_SUBST(HAVE_CXX$1)
fi
])
dnl Test body for checking C++11 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
)
dnl Test body for checking C++14 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
)
dnl Tests for new features in C++11
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
// If the compiler admits that it is not ready for C++11, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201103L
#error "This is not a C++11 compiler"
#else
namespace cxx11
{
namespace test_static_assert
{
template <typename T>
struct check
{
static_assert(sizeof(int) <= sizeof(T), "not big enough");
};
}
namespace test_final_override
{
struct Base
{
virtual void f() {}
};
struct Derived : public Base
{
virtual void f() override {}
};
}
namespace test_double_right_angle_brackets
{
template < typename T >
struct check {};
typedef check<void> single_type;
typedef check<check<void>> double_type;
typedef check<check<check<void>>> triple_type;
typedef check<check<check<check<void>>>> quadruple_type;
}
namespace test_decltype
{
int
f()
{
int a = 1;
decltype(a) b = 2;
return a + b;
}
}
namespace test_type_deduction
{
template < typename T1, typename T2 >
struct is_same
{
static const bool value = false;
};
template < typename T >
struct is_same<T, T>
{
static const bool value = true;
};
template < typename T1, typename T2 >
auto
add(T1 a1, T2 a2) -> decltype(a1 + a2)
{
return a1 + a2;
}
int
test(const int c, volatile int v)
{
static_assert(is_same<int, decltype(0)>::value == true, "");
static_assert(is_same<int, decltype(c)>::value == false, "");
static_assert(is_same<int, decltype(v)>::value == false, "");
auto ac = c;
auto av = v;
auto sumi = ac + av + 'x';
auto sumf = ac + av + 1.0;
static_assert(is_same<int, decltype(ac)>::value == true, "");
static_assert(is_same<int, decltype(av)>::value == true, "");
static_assert(is_same<int, decltype(sumi)>::value == true, "");
static_assert(is_same<int, decltype(sumf)>::value == false, "");
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
return (sumf > 0.0) ? sumi : add(c, v);
}
}
namespace test_noexcept
{
int f() { return 0; }
int g() noexcept { return 0; }
static_assert(noexcept(f()) == false, "");
static_assert(noexcept(g()) == true, "");
}
namespace test_constexpr
{
template < typename CharT >
unsigned long constexpr
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
{
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
}
template < typename CharT >
unsigned long constexpr
strlen_c(const CharT *const s) noexcept
{
return strlen_c_r(s, 0UL);
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("1") == 1UL, "");
static_assert(strlen_c("example") == 7UL, "");
static_assert(strlen_c("another\0example") == 7UL, "");
}
namespace test_rvalue_references
{
template < int N >
struct answer
{
static constexpr int value = N;
};
answer<1> f(int&) { return answer<1>(); }
answer<2> f(const int&) { return answer<2>(); }
answer<3> f(int&&) { return answer<3>(); }
void
test()
{
int i = 0;
const int c = 0;
static_assert(decltype(f(i))::value == 1, "");
static_assert(decltype(f(c))::value == 2, "");
static_assert(decltype(f(0))::value == 3, "");
}
}
namespace test_uniform_initialization
{
struct test
{
static const int zero {};
static const int one {1};
};
static_assert(test::zero == 0, "");
static_assert(test::one == 1, "");
}
namespace test_lambdas
{
void
test1()
{
auto lambda1 = [](){};
auto lambda2 = lambda1;
lambda1();
lambda2();
}
int
test2()
{
auto a = [](int i, int j){ return i + j; }(1, 2);
auto b = []() -> int { return '0'; }();
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
const auto identity = [](int y){ return y; };
for (auto i = 0; i < a; ++i)
a += b--;
return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
int
test3()
{
const auto nullary = [](){ return 0; };
const auto unary = [](int x){ return x; };
using nullary_t = decltype(nullary);
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
}
namespace test_variadic_templates
{
template <int...>
struct sum;
template <int N0, int... N1toN>
struct sum<N0, N1toN...>
{
static constexpr auto value = N0 + sum<N1toN...>::value;
};
template <>
struct sum<>
{
static constexpr auto value = 0;
};
static_assert(sum<>::value == 0, "");
static_assert(sum<1>::value == 1, "");
static_assert(sum<23>::value == 23, "");
static_assert(sum<1, 2>::value == 3, "");
static_assert(sum<5, 5, 11>::value == 21, "");
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
}
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
// because of this.
namespace test_template_alias_sfinae
{
struct foo {};
template<typename T>
using member = typename T::member_type;
template<typename T>
void func(...) {}
template<typename T>
void func(member<T>*) {}
void test();
void test() { func<foo>(0); }
}
} // namespace cxx11
#endif // __cplusplus >= 201103L
]])
dnl Tests for new features in C++14
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
// If the compiler admits that it is not ready for C++14, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201402L
#error "This is not a C++14 compiler"
#else
namespace cxx14
{
namespace test_polymorphic_lambdas
{
int
test()
{
const auto lambda = [](auto&&... args){
const auto istiny = [](auto x){
return (sizeof(x) == 1UL) ? 1 : 0;
};
const int aretiny[] = { istiny(args)... };
return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
}
namespace test_binary_literals
{
constexpr auto ivii = 0b0000000000101010;
static_assert(ivii == 42, "wrong value");
}
namespace test_generalized_constexpr
{
template < typename CharT >
constexpr unsigned long
strlen_c(const CharT *const s) noexcept
{
auto length = 0UL;
for (auto p = s; *p; ++p)
++length;
return length;
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("x") == 1UL, "");
static_assert(strlen_c("test") == 4UL, "");
static_assert(strlen_c("another\0test") == 7UL, "");
}
namespace test_lambda_init_capture
{
int
test()
{
auto x = 0;
const auto lambda1 = [a = x](int b){ return a + b; };
const auto lambda2 = [a = lambda1(x)](){ return a; };
return lambda2();
}
}
namespace test_digit_seperators
{
constexpr auto ten_million = 100'000'000;
static_assert(ten_million == 100000000, "");
}
namespace test_return_type_deduction
{
auto f(int& x) { return x; }
decltype(auto) g(int& x) { return x; }
template < typename T1, typename T2 >
struct is_same
{
static constexpr auto value = false;
};
template < typename T >
struct is_same<T, T>
{
static constexpr auto value = true;
};
int
test()
{
auto x = 0;
static_assert(is_same<int, decltype(f(x))>::value, "");
static_assert(is_same<int&, decltype(g(x))>::value, "");
return x;
}
}
} // namespace cxx14
#endif // __cplusplus >= 201402L
]])
# ============================================================================
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
# ============================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the C++11
# standard; if necessary, add switches to CXXFLAGS to enable support.
#
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
# macro with the version set to C++11. The two optional arguments are
# forwarded literally as the second and third argument respectively.
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
# more information. If you want to use this macro, you also need to
# download the ax_cxx_compile_stdcxx.m4 file.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 14
include([ax_cxx_compile_stdcxx.m4])
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_define_dir.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
#
# DESCRIPTION
#
# This macro sets VARNAME to the expansion of the DIR variable, taking
# care of fixing up ${prefix} and such.
#
# VARNAME is then offered as both an output variable and a C preprocessor
# symbol.
#
# Example:
#
# AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
#
# LICENSE
#
# Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz>
# Copyright (c) 2008 Andreas Schwab <schwab@suse.de>
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2008 Alexandre Oliva
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 6
AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR])
AC_DEFUN([AX_DEFINE_DIR], [
prefix_NONE=
exec_prefix_NONE=
test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
dnl refers to ${prefix}. Thus we have to use `eval' twice.
eval ax_define_dir="\"[$]$2\""
eval ax_define_dir="\"$ax_define_dir\""
AC_SUBST($1, "$ax_define_dir")
AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3])
test "$prefix_NONE" && prefix=NONE
test "$exec_prefix_NONE" && exec_prefix=NONE
])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
#
# DESCRIPTION
#
# This macro figures out how to build C programs using POSIX threads. It
# sets the PTHREAD_LIBS output variable to the threads library and linker
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
# flags that are needed. (The user can also force certain compiler
# flags/libs to be tested by setting these environment variables.)
#
# Also sets PTHREAD_CC to any special C compiler that is needed for
# multi-threaded programs (defaults to the value of CC otherwise). (This
# is necessary on AIX to use the special cc_r compiler alias.)
#
# NOTE: You are assumed to not only compile your program with these flags,
# but also link it with them as well. e.g. you should link with
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
#
# If you are only building threads programs, you may wish to use these
# variables in your default LIBS, CFLAGS, and CC:
#
# LIBS="$PTHREAD_LIBS $LIBS"
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# CC="$PTHREAD_CC"
#
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
#
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
# PTHREAD_CFLAGS.
#
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
# is not found. If ACTION-IF-FOUND is not specified, the default action
# will define HAVE_PTHREAD.
#
# Please let the authors know if this macro fails on any platform, or if
# you have any other suggestions or comments. This macro was based on work
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
# grateful for the helpful feedback of numerous users.
#
# Updated for Autoconf 2.68 by Daniel Richard G.
#
# LICENSE
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 20
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_PUSH([C])
ax_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
AC_MSG_RESULT($ax_pthread_ok)
if test x"$ax_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# ... -mt is also the pthreads flag for HP/aCC
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case ${host_os} in
solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
;;
darwin*)
ax_pthread_flags="-pthread $ax_pthread_flags"
;;
esac
if test x"$ax_pthread_ok" = xno; then
for flag in $ax_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
pthread-config)
AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
if test x"$ax_pthread_config" = xno; then continue; fi
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
static void routine(void *a) { a = 0; }
static void *start_routine(void *a) { return a; }],
[pthread_t th; pthread_attr_t attr;
pthread_create(&th, 0, start_routine, 0);
pthread_join(th, 0);
pthread_attr_init(&attr);
pthread_cleanup_push(routine, 0);
pthread_cleanup_pop(0) /* ; */])],
[ax_pthread_ok=yes],
[])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($ax_pthread_ok)
if test "x$ax_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$ax_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
AC_MSG_CHECKING([for joinable pthread attribute])
attr_name=unknown
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
[int attr = $attr; return attr /* ; */])],
[attr_name=$attr; break],
[])
done
AC_MSG_RESULT($attr_name)
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
[Define to necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case ${host_os} in
aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
osf* | hpux*) flag="-D_REENTRANT";;
solaris*)
if test "$GCC" = "yes"; then
flag="-D_REENTRANT"
else
flag="-mt -D_REENTRANT"
fi
;;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
ax_cv_PTHREAD_PRIO_INHERIT, [
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
[ax_cv_PTHREAD_PRIO_INHERIT=no])
])
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: compile with *_r variant
if test "x$GCC" != xyes; then
case $host_os in
aix*)
AS_CASE(["x/$CC"],
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
[#handle absolute path differently from PATH based program lookup
AS_CASE(["x$CC"],
[x/*],
[AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
[AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
;;
esac
fi
fi
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$ax_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
ax_pthread_ok=no
$2
fi
AC_LANG_POP
])dnl AX_PTHREAD
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_tls.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_TLS([action-if-found], [action-if-not-found])
#
# DESCRIPTION
#
# Provides a test for the compiler support of thread local storage (TLS)
# extensions. Defines TLS if it is found. Currently knows about GCC/ICC
# and MSVC. I think SunPro uses the same as GCC, and Borland apparently
# supports either.
#
# LICENSE
#
# Copyright (c) 2008 Alan Woodland <ajw05@aber.ac.uk>
# Copyright (c) 2010 Diego Elio Petteno` <flameeyes@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 10
AC_DEFUN([AX_TLS], [
AC_MSG_CHECKING(for thread local storage (TLS) class)
AC_CACHE_VAL(ac_cv_tls, [
ax_tls_keywords="__thread __declspec(thread) none"
for ax_tls_keyword in $ax_tls_keywords; do
AS_CASE([$ax_tls_keyword],
[none], [ac_cv_tls=none ; break],
[AC_TRY_COMPILE(
[#include <stdlib.h>
static void
foo(void) {
static ] $ax_tls_keyword [ int bar;
exit(1);
}],
[],
[ac_cv_tls=$ax_tls_keyword ; break],
ac_cv_tls=none
)])
done
])
AC_MSG_RESULT($ac_cv_tls)
AS_IF([test "$ac_cv_tls" != "none"],
AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
m4_ifnblank([$1], [$1]),
m4_ifnblank([$2], [$2])
)
])
dnl pkg-config-based checks for Orc
dnl specific:
dnl ORC_CHECK([REQUIRED_VERSION])
AC_DEFUN([ORC_CHECK],
[
ORC_REQ=ifelse([$1], , "0.4.6", [$1])
AC_ARG_ENABLE(orc,
AC_HELP_STRING([--enable-orc],[use Orc if installed]),
[case "${enableval}" in
auto) enable_orc=auto ;;
yes) enable_orc=yes ;;
no) enable_orc=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-orc) ;;
esac
],
[enable_orc=auto]) dnl Default value
if test "x$enable_orc" != "xno" ; then
PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [
AC_DEFINE(HAVE_ORC, 1, [Use Orc])
HAVE_ORC=yes
if test "x$ORCC" = "x" ; then
AC_MSG_CHECKING(for usable orcc)
ORCC=`$PKG_CONFIG --variable=orcc orc-0.4`
dnl check whether the orcc found by pkg-config can be run from the build environment
dnl if this is not the case (e.g. when cross-compiling) fall back to orcc from PATH
AS_IF([$ORCC --version 1> /dev/null 2> /dev/null], [], [ORCC=`which orcc`])
AC_MSG_RESULT($ORCC)
fi
AC_SUBST(ORCC)
ORCC_FLAGS="--compat $ORC_REQ"
AC_SUBST(ORCC_FLAGS)
AS_IF([test "x$ORCC" = "x"], [HAVE_ORCC=no], [HAVE_ORCC=yes])
], [
if test "x$enable_orc" = "xyes" ; then
AC_MSG_ERROR([--enable-orc specified, but Orc >= $ORC_REQ not found])
fi
AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
HAVE_ORC=no
HAVE_ORCC=no
])
else
AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
HAVE_ORC=no
HAVE_ORCC=no
fi
AM_CONDITIONAL(HAVE_ORC, [test "x$HAVE_ORC" = "xyes"])
AM_CONDITIONAL(HAVE_ORCC, [test "x$HAVE_ORCC" = "xyes"])
]))
AC_DEFUN([ORC_OUTPUT],
[
if test "$HAVE_ORC" = yes ; then
printf "configure: *** Orc acceleration enabled.\n"
else
if test "x$enable_orc" = "xno" ; then
printf "configure: *** Orc acceleration disabled by --disable-orc. Slower code paths\n"
printf " will be used.\n"
else
printf "configure: *** Orc acceleration disabled. Requires Orc >= $ORC_REQ, which was\n"
printf " not found. Slower code paths will be used.\n"
fi
fi
printf "\n"
])
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio 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 Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
DISTCLEANFILES = \
$(noinst_DATA)
noinst_DATA = \
pulseaudio.1.xml \
pax11publish.1.xml \
pacat.1.xml \
pacmd.1.xml \
pactl.1.xml \
pasuspender.1.xml \
padsp.1.xml \
pulse-daemon.conf.5.xml \
pulse-client.conf.5.xml \
default.pa.5.xml \
pulse-cli-syntax.5.xml \
start-pulseaudio-x11.1.xml
if HAVE_ESOUND
noinst_DATA += esdcompat.1.xml
endif
xmllint: $(noinst_DATA)
for f in $(noinst_DATA) ; do \
xmllint --noout --valid "$$f" || exit 1 ; \
done
if BUILD_MANPAGES
dist_man_MANS = \
pulseaudio.1 \
pax11publish.1 \
pacat.1 \
pacmd.1 \
pactl.1 \
pasuspender.1 \
padsp.1 \
pulse-daemon.conf.5 \
pulse-client.conf.5 \
default.pa.5 \
pulse-cli-syntax.5 \
start-pulseaudio-x11.1
if HAVE_ESOUND
dist_man_MANS += esdcompat.1
endif
CLEANFILES = \
$(dist_man_MANS)
%: %.xml Makefile
$(AM_V_GEN) perl $(srcdir)/xmltoman $< > $@ || rm -f $@
if OS_IS_WIN32
SYMLINK_PROGRAM=cd $(DESTDIR)$(man1dir) && cp
else
SYMLINK_PROGRAM=ln -sf
endif
install-data-hook:
$(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/paplay.1
$(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/parec.1
$(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/parecord.1
$(SYMLINK_PROGRAM) pacat.1 $(DESTDIR)$(man1dir)/pamon.1
uninstall-hook:
rm -f $(DESTDIR)$(man1dir)/paplay.1
rm -f $(DESTDIR)$(man1dir)/parec.1
rm -f $(DESTDIR)$(man1dir)/parecord.1
rm -f $(DESTDIR)$(man1dir)/pamon.1
endif
EXTRA_DIST = \
pulseaudio.1.xml.in \
esdcompat.1.xml.in \
pax11publish.1.xml.in \
pacat.1.xml.in \
pacmd.1.xml.in \
pactl.1.xml.in \
pasuspender.1.xml.in \
padsp.1.xml.in \
pulse-daemon.conf.5.xml.in \
pulse-client.conf.5.xml.in \
default.pa.5.xml.in \
pulse-cli-syntax.5.xml.in \
start-pulseaudio-x11.1.xml.in \
xmltoman \
xmltoman.css \
xmltoman.xsl \
xmltoman.dtd
......@@ -4,6 +4,8 @@ project('pulseaudio', 'c', 'cpp',
default_options : [ 'c_std=gnu11', 'cpp_std=c++11' ]
)
meson.add_dist_script('scripts/save-tarball-version.sh', meson.project_version())
pa_version_str = meson.project_version()
# For tarballs, the first split will do nothing, but for builds in git, we
# split out suffixes when there are commits since the last tag
......