Commit 18e975fc authored by Lennart Poettering's avatar Lennart Poettering
Browse files

merged

parent 3a09a88f
shave
shave-libtool
.version
.*.swp
ABOUT-NLS
intltool-extract.in
......
......@@ -17,7 +17,7 @@
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = bootstrap.sh LICENSE GPL LGPL doxygen/Makefile.am doxygen/Makefile.in doxygen/doxygen.conf.in README todo
EXTRA_DIST = bootstrap.sh git-version-gen LICENSE GPL LGPL doxygen/Makefile.am doxygen/Makefile.in doxygen/doxygen.conf.in README todo
SUBDIRS = src doxygen man po
MAINTAINERCLEANFILES =
......@@ -52,7 +52,7 @@ untabify:
find \( -name '*.c' -o -name '*.h' \) -exec perl -i -pe 's/\t/ /g;' \{\} \;
fedora-snapshot: dist
cp $(distdir).tar.gz $$HOME/cvs.fedora/pulseaudio/devel/$(distdir).git`date +%Y%m%d`.tar.gz
cp $(distdir).tar.gz $$HOME/cvs.fedora/pulseaudio/devel/$(distdir).tar.gz
dist-hook:
if test -d .git ; then \
......@@ -60,14 +60,14 @@ dist-hook:
chmod u+w ${distdir}/ChangeLog || true ; \
( git-changelog.perl || echo "git-changelog.perl failed." ) > ${distdir}/ChangeLog 2>&1 ; \
fi
update-shave:
for i in shave.in shave.m4 shave-libtool.in; do \
wget -O $$i http://git.lespiau.name/cgit/shave/blob/\?path=shave/$$i ; \
done
mv shave.m4 m4/
echo $(VERSION) > $(distdir)/.tarball-version
.PHONY: homepage distcleancheck doxygen
# see git-version-gen
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
DISTCLEANFILES = \
po/.intltool-merge-cache
......@@ -168,3 +168,23 @@ PA_COMMAND_GET_MODULE_INFO_LIST
remove bool auto_unload
add proplist at the end
new messages:
PA_COMMAND_GET_CARD_INFO
PA_COMMAND_GET_CARD_INFO_LIST
PA_COMMAND_SET_CARD_PROFILE
PA_COMMAND_CLIENT_EVENT
PA_COMMAND_PLAYBACK_STREAM_EVENT
PA_COMMAND_RECORD_STREAM_EVENT
PA_COMMAND_PLAYBACK_BUFFER_ATTR_CHANGED
PA_COMMAND_RECORD_BUFFER_ATTR_CHANGED
### v16, implemented by >= 0.9.15
new messages:
PA_COMMAND_SET_SINK_PORT
PA_COMMAND_SET_SOURCE_PORT
......@@ -16,7 +16,7 @@
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
VERSION=1.10
VERSION=1.11
run_versioned() {
local P
......@@ -40,6 +40,17 @@ run_versioned() {
set -ex
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
echo "Activating pre-commit hook."
cp -av .git/hooks/pre-commit.sample .git/hooks/pre-commit
chmod -c +x .git/hooks/pre-commit
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
......@@ -77,7 +88,7 @@ else
run_versioned automake "$VERSION" --copy --foreign --add-missing
if test "x$NOCONFIGURE" = "x"; then
CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen --enable-shave "$@"
CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen "$@"
make clean
fi
fi
......@@ -22,15 +22,16 @@
AC_PREREQ(2.63)
m4_define(pa_major, [0])
m4_define(pa_minor, [9])
m4_define(pa_micro, [15])
AC_INIT([pulseaudio],[pa_major.pa_minor.pa_micro-test5],[mzchyfrnhqvb (at) 0pointer (dot) net])
AC_INIT([pulseaudio], m4_esyscmd([./git-version-gen .tarball-version]),
[mzchyfrnhqvb (at) 0pointer (dot) net])
AC_CONFIG_SRCDIR([src/daemon/main.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign 1.10 -Wall -Wno-portability])
AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax])
m4_define(pa_major, `echo $VERSION | cut -d. -f1 | cut -d- -f1`)
m4_define(pa_minor, `echo $VERSION | cut -d. -f2 | cut -d- -f1`)
m4_define(pa_micro, `echo $VERSION | cut -d. -f3 | cut -d- -f1`)
AC_SUBST(PA_MAJOR, pa_major)
AC_SUBST(PA_MINOR, pa_minor)
......@@ -40,7 +41,7 @@ AC_SUBST(PA_MAJORMINORMICRO, pa_major.pa_minor.pa_micro)
AC_SUBST(PACKAGE_URL, [http://pulseaudio.org/])
AC_SUBST(PA_API_VERSION, 12)
AC_SUBST(PA_PROTOCOL_VERSION, 15)
AC_SUBST(PA_PROTOCOL_VERSION, 16)
# The stable ABI for client applications, for the version info x:y:z
# always will hold y=z
......@@ -75,6 +76,8 @@ case $host in
;;
esac
AM_SILENT_RULES([yes])
#### Checks for programs. ####
# mkdir -p
......@@ -97,11 +100,7 @@ if test "x$M4" = xno ; then
fi
dnl Compiler flags
DESIRED_FLAGS="-Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option"
for flag in $DESIRED_FLAGS ; do
CC_CHECK_CFLAGS([$flag], [CFLAGS="$CFLAGS $flag"])
done
CC_CHECK_CFLAGS_APPEND([-Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option])
dnl Linker flags.
dnl Check whether the linker supports the -version-script option.
......@@ -114,6 +113,11 @@ CC_CHECK_LDFLAGS([${tmp_ldflag}],
[VERSIONING_LDFLAGS='-Wl,-version-script=$(srcdir)/map-file'])
AC_SUBST([VERSIONING_LDFLAGS])
dnl Check for the proper way to build libraries that have no undefined
dnl symbols; on some hosts this needs to be avoided but the macro
dnl takes care of it.
CC_NOUNDEFINED
dnl Check whether to build tests by default (as compile-test) or not
AC_ARG_ENABLE([default-build-tests],
AS_HELP_STRING([--disable-default-build-tests], [Build test programs only during make check]))
......@@ -274,7 +278,7 @@ AC_CHECK_HEADER([ltdl.h],
[LIBLTDL=])
AS_IF([test "x$LIBLTDL" = "x"],
[AC_MSG_ERROR([Unable to find libltdl.])])
[AC_MSG_ERROR([Unable to find libltdl version 2. Makes sure you have libtool 2.2 or later installed.])])
AC_SUBST([LIBLTDL])
#### Determine build environment ####
......@@ -300,7 +304,7 @@ AM_CONDITIONAL(OS_IS_WIN32, test "x$os_is_win32" = "x1")
AC_HEADER_STDC
# POSIX
AC_CHECK_HEADERS([arpa/inet.h glob.h grp.h netdb.h netinet/in.h \
AC_CHECK_HEADERS_ONCE([arpa/inet.h glob.h grp.h netdb.h netinet/in.h \
netinet/in_systm.h netinet/tcp.h poll.h pwd.h sched.h \
sys/mman.h sys/resource.h sys/select.h sys/socket.h sys/wait.h \
sys/uio.h syslog.h sys/dl.h dlfcn.h linux/sockios.h])
......@@ -324,23 +328,23 @@ AC_CHECK_HEADERS([linux/input.h], [HAVE_EVDEV=1], [HAVE_EVDEV=0])
AM_CONDITIONAL([HAVE_EVDEV], [test "x$HAVE_EVDEV" = "x1"])
AC_CHECK_HEADERS([sys/prctl.h])
AC_CHECK_HEADERS_ONCE([sys/prctl.h])
# Solaris
AC_CHECK_HEADERS([sys/filio.h])
AC_CHECK_HEADERS_ONCE([sys/filio.h])
# Windows
AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h])
AC_CHECK_HEADERS_ONCE([windows.h winsock2.h ws2tcpip.h])
# NetBSD
AC_CHECK_HEADERS([sys/atomic.h])
AC_CHECK_HEADERS_ONCE([sys/atomic.h])
# Other
AC_CHECK_HEADERS([sys/ioctl.h])
AC_CHECK_HEADERS([byteswap.h])
AC_CHECK_HEADERS([sys/syscall.h])
AC_CHECK_HEADERS([sys/eventfd.h])
AC_CHECK_HEADERS([execinfo.h])
AC_CHECK_HEADERS_ONCE([sys/ioctl.h])
AC_CHECK_HEADERS_ONCE([byteswap.h])
AC_CHECK_HEADERS_ONCE([sys/syscall.h])
AC_CHECK_HEADERS_ONCE([sys/eventfd.h])
AC_CHECK_HEADERS_ONCE([execinfo.h])
#### Typdefs, structures, etc. ####
......@@ -391,19 +395,16 @@ AC_SEARCH_LIBS([connect], [socket])
# build, disabling its ability to make dlls.
AC_CHECK_FUNCS([getopt_long], [], [AC_CHECK_LIB([iberty], [getopt_long])])
AC_CHECK_LIB(gdbm, gdbm_open)
AC_CHECK_HEADERS(gdbm.h, [], [AC_MSG_ERROR([gdbm.h not found])])
#### Check for functions ####
# ISO
AC_CHECK_FUNCS([lrintf strtof])
AC_CHECK_FUNCS_ONCE([lrintf strtof])
# POSIX
AC_FUNC_FORK
AC_FUNC_GETGROUPS
AC_FUNC_SELECT_ARGTYPES
AC_CHECK_FUNCS([chmod chown clock_gettime getaddrinfo getgrgid_r getgrnam_r \
AC_CHECK_FUNCS_ONCE([chmod chown clock_gettime getaddrinfo getgrgid_r getgrnam_r \
getpwnam_r getpwuid_r gettimeofday getuid inet_ntop inet_pton mlock nanosleep \
pipe posix_fadvise posix_madvise posix_memalign setpgid setsid shm_open \
sigaction sleep sysconf pthread_setaffinity_np])
......@@ -412,20 +413,20 @@ AC_CHECK_FUNCS([mkfifo], [HAVE_MKFIFO=1], [HAVE_MKFIFO=0])
AM_CONDITIONAL(HAVE_MKFIFO, test "x$HAVE_MKFIFO" = "x1")
# X/OPEN
AC_CHECK_FUNCS([readlink])
AC_CHECK_FUNCS_ONCE([readlink])
# SUSv2
AC_CHECK_FUNCS([ctime_r usleep])
AC_CHECK_FUNCS_ONCE([ctime_r usleep])
# SUSv3
AC_CHECK_FUNCS([strerror_r])
AC_CHECK_FUNCS_ONCE([strerror_r])
# BSD
AC_CHECK_FUNCS([lstat])
AC_CHECK_FUNCS_ONCE([lstat])
# Non-standard
AC_CHECK_FUNCS([setresuid setresgid setreuid setregid seteuid setegid ppoll strsignal sig2str strtof_l])
AC_CHECK_FUNCS_ONCE([setresuid setresgid setreuid setregid seteuid setegid ppoll strsignal sig2str strtof_l])
AC_FUNC_ALLOCA
......@@ -458,7 +459,7 @@ AC_DEFINE_UNQUOTED(PA_CFLAGS,"$CFLAGS", [The CFLAGS used during compilation])
AC_SYS_LARGEFILE
# Check for open64 to know if the current system does have open64() and similar functions
AC_CHECK_FUNCS([open64])
AC_CHECK_FUNCS_ONCE([open64])
#### [lib]iconv ####
......@@ -537,11 +538,11 @@ fi
#### Valgrind (optional) ####
AC_CHECK_HEADERS([valgrind/memcheck.h])
AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h])
#### Sound file ####
PKG_CHECK_MODULES(LIBSNDFILE, [ sndfile >= 1.0.10 ])
PKG_CHECK_MODULES(LIBSNDFILE, [ sndfile >= 1.0.20 ])
AC_SUBST(LIBSNDFILE_CFLAGS)
AC_SUBST(LIBSNDFILE_LIBS)
......@@ -601,6 +602,65 @@ AC_SUBST(LIBSAMPLERATE_LIBS)
AC_SUBST(HAVE_LIBSAMPLERATE)
AM_CONDITIONAL([HAVE_LIBSAMPLERATE], [test "x$HAVE_LIBSAMPLERATE" = x1])
#### Database support ####
HAVE_TDB=0
HAVE_GDBM=0
AC_ARG_WITH(
[database],
AS_HELP_STRING([--with-database=auto|tdb|gdbm],[Choose database backend.]),[],[with_database=auto])
if test "x${with_database}" = "xauto" -o "x${with_database}" = "xtdb" ; then
PKG_CHECK_MODULES(TDB, [ tdb ],
[
HAVE_TDB=1
with_database=tdb
], [
if test "x${with_database}" = "xtdb" ; then
AC_MSG_ERROR([*** tdb not found])
fi
])
fi
if test "x${with_database}" = "xauto" -o "x${with_database}" = "xgdbm" ; then
have_gdbm=yes
AC_CHECK_LIB(gdbm, gdbm_open, [], [have_gdbm=no])
AC_CHECK_HEADERS(gdbm.h, [], [have_gdbm=no])
if test "x${have_gdbm}" = "xyes" ; then
HAVE_GDBM=1
GDBM_CFLAGS=
GDBM_LIBS=-lgdbm
with_database=gdbm
elif test "x${with_database}" = "xgdbm"; then
AC_MSG_ERROR([*** gdbm not found])
fi
fi
if test "x${HAVE_TDB}" != x1 -a "x${HAVE_GDBM}" != x1; then
AC_MSG_ERROR([*** missing database backend])
fi
if test "x${HAVE_TDB}" = x1 ; then
AC_DEFINE([HAVE_TDB], 1, [Have tdb?])
fi
if test "x${HAVE_GDBM}" = x1 ; then
AC_DEFINE([HAVE_GDBM], 1, [Have gdbm?])
fi
AC_SUBST(TDB_CFLAGS)
AC_SUBST(TDB_LIBS)
AC_SUBST(HAVE_TDB)
AM_CONDITIONAL([HAVE_TDB], [test "x$HAVE_TDB" = x1])
AC_SUBST(GDBM_CFLAGS)
AC_SUBST(GDBM_LIBS)
AC_SUBST(HAVE_GDBM)
AM_CONDITIONAL([HAVE_GDBM], [test "x$HAVE_GDBM" = x1])
#### OSS support (optional) ####
AC_ARG_ENABLE([oss],
......@@ -1000,7 +1060,7 @@ AC_ARG_ENABLE([udev],
],
[udev=auto])
if test "x${udev}" != xno -a \( "x$HAVE_OSS" = "x1" -o "x$HAVE_ALSA" = "x1" \) ; then
PKG_CHECK_MODULES(UDEV, [ libudev >= 137 ],
PKG_CHECK_MODULES(UDEV, [ libudev >= 143 ],
[
HAVE_UDEV=1
AC_DEFINE([HAVE_UDEV], 1, [Have UDEV.])
......@@ -1095,44 +1155,6 @@ AC_SUBST(DBUS_LIBS)
AC_SUBST(HAVE_DBUS)
AM_CONDITIONAL([HAVE_DBUS], [test "x$HAVE_DBUS" = x1])
#### PolicyKit support (optional) ####
AC_ARG_ENABLE([polkit],
AS_HELP_STRING([--disable-polkit],[Disable optional PolicyKit support]),
[
case "${enableval}" in
yes) polkit=yes ;;
no) polkit=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-polkit) ;;
esac
],
[polkit=auto])
if test "x${polkit}" != xno ; then
PKG_CHECK_MODULES(POLKIT, [ polkit-dbus >= 0.7 ],
[
HAVE_POLKIT=1
AC_DEFINE([HAVE_POLKIT], 1, [Have PolicyKit])
policydir=`pkg-config polkit-dbus --variable prefix`/share/PolicyKit/policy/
AC_SUBST(policydir)
],
[
HAVE_POLKIT=0
if test "x$polkit" = xyes ; then
AC_MSG_ERROR([*** PolicyKit support not found])
fi
])
else
HAVE_POLKIT=0
fi
AC_SUBST(POLKIT_CFLAGS)
AC_SUBST(POLKIT_LIBS)
AC_SUBST(HAVE_POLKIT)
AM_CONDITIONAL([HAVE_POLKIT], [test "x$HAVE_POLKIT" = x1])
### IPv6 connection support (optional) ###
AC_ARG_ENABLE([ipv6],
......@@ -1219,15 +1241,6 @@ fi
AC_SUBST(PA_SYSTEM_GROUP)
AC_DEFINE_UNQUOTED(PA_SYSTEM_GROUP,"$PA_SYSTEM_GROUP", [Group for the PulseAudio system daemon])
AC_ARG_WITH(realtime_group,AS_HELP_STRING([--with-realtime-group=<group>],[Group for users that are allowed to start the PulseAudio daemon with realtime scheduling (realtime)]))
if test -z "$with_realtime_group" ; then
PA_REALTIME_GROUP=pulse-rt
else
PA_REALTIME_GROUP=$with_realtime_group
fi
AC_SUBST(PA_REALTIME_GROUP)
AC_DEFINE_UNQUOTED(PA_REALTIME_GROUP,"$PA_REALTIME_GROUP", [Realtime group])
AC_ARG_WITH(access_group,AS_HELP_STRING([--with-access-group=<group>],[Group which is allowed access to a system-wide PulseAudio daemon (pulse-access)]))
if test -z "$with_access_group" ; then
PA_ACCESS_GROUP=pulse-access
......@@ -1293,8 +1306,8 @@ fi
AC_ARG_WITH(
[module-dir],
AS_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINORMICRO}/modules/]),
[modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINORMICRO}/modules/"])
AS_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINORMICRO}/modules]),
[modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINORMICRO}/modules"])
AC_SUBST(modlibexecdir)
......@@ -1306,8 +1319,6 @@ AM_CONDITIONAL([FORCE_PREOPEN], [test "x$FORCE_PREOPEN" = "xyes"])
AC_CONFIG_FILES([
Makefile
shave
shave-libtool
src/Makefile
man/Makefile
libpulse.pc
......@@ -1320,9 +1331,7 @@ src/pulse/version.h
po/Makefile.in
])
SHAVE_INIT
AC_OUTPUT
SHAVE_OUTPUT
# ==========================================================================
ENABLE_X11=no
......@@ -1405,9 +1414,14 @@ if test "x${HAVE_BLUEZ}" = "x1" ; then
ENABLE_BLUEZ=yes
fi
ENABLE_POLKIT=no
if test "x${HAVE_POLKIT}" = "x1" ; then
ENABLE_POLKIT=yes
ENABLE_GDBM=no
if test "x${HAVE_GDBM}" = "x1" ; then
ENABLE_GDBM=yes
fi
ENABLE_TDB=no
if test "x${HAVE_TDB}" = "x1" ; then
ENABLE_TDB=yes
fi
ENABLE_OPENSSL=no
......@@ -1453,13 +1467,13 @@ echo "
Enable BlueZ: ${ENABLE_BLUEZ}
Enable TCP Wrappers: ${ENABLE_TCPWRAP}
Enable libsamplerate: ${ENABLE_LIBSAMPLERATE}
Enable PolicyKit: ${ENABLE_POLKIT}
Enable IPv6: ${ENABLE_IPV6}
Enable OpenSSL (for Airtunes): ${ENABLE_OPENSSL}
Enable tdb: ${ENABLE_TDB}
Enable gdbm: ${ENABLE_GDBM}
System User: ${PA_SYSTEM_USER}
System Group: ${PA_SYSTEM_GROUP}
Realtime Group: ${PA_REALTIME_GROUP}
Access Group: ${PA_ACCESS_GROUP}
Enable per-user EsounD socket: ${ENABLE_PER_USER_ESOUND_SOCKET}
Force preopen: ${FORCE_PREOPEN}
......
#!/bin/sh
# Print a version string.
scriptversion=2008-04-08.07
# Copyright (C) 2007-2008 Free Software Foundation
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
# It may be run two ways:
# - from a git repository in which the "git describe" command below
# produces useful output (thus requiring at least one signed tag)
# - from a non-git-repo directory containing a .tarball-version file, which
# presumes this script is invoked like "./git-version-gen .tarball-version".
# In order to use intra-version strings in your project, you will need two
# separate generated version string files:
#
# .tarball-version - present only in a distribution tarball, and not in
# a checked-out repository. Created with contents that were learned at
# the last time autoconf was run, and used by git-version-gen. Must not
# be present in either $(srcdir) or $(builddir) for git-version-gen to
# give accurate answers during normal development with a checked out tree,
# but must be present in a tarball when there is no version control system.
# Therefore, it cannot be used in any dependencies. GNUmakefile has
# hooks to force a reconfigure at distribution time to get the value
# correct, without penalizing normal development with extra reconfigures.
#
# .version - present in a checked-out repository and in a distribution
# tarball. Usable in dependencies, particularly for files that don't
# want to depend on config.h but do want to track version changes.
# Delete this file prior to any autoconf run where you want to rebuild
# files to pick up a version string change; and leave it stale to
# minimize rebuild time after unrelated changes to configure sources.
#
# It is probably wise to add these two files to .gitignore, so that you
# don't accidentally commit either generated file.
#
# Use the following line in your configure.ac, so that $(VERSION) will
# automatically be up-to-date each time configure is run (and note that
# since configure.ac no longer includes a version string, Makefile rules
# should not depend on configure.ac for version updates).
#
# AC_INIT([GNU project],
# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
# [bug-project@example])
#
# Then use the following lines in your Makefile.am, so that .version
# will be present for dependencies, and so that .tarball-version will
# exist in distribution tarballs.
#
# BUILT_SOURCES = $(top_srcdir)/.version
# $(top_srcdir)/.version:
# echo $(VERSION) > $@-t && mv $@-t $@
# dist-hook:
# echo $(VERSION) > $(distdir)/.tarball-version
case $# in
1) ;;
*) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version"; exit 1;;
esac
tarball_version_file=$1
nl='
'
# First see if there is a tarball-only version file.
# then try "git describe", then default.
if test -f $tarball_version_file
then
v=`cat $tarball_version_file` || exit 1
case $v in
*$nl*) v= ;; # reject multi-line output
[0-9]*) ;;
*) v= ;;
esac
test -z "$v" \
&& echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2
fi
if test -n "$v"
then
: # use $v
elif test -d .git \
&& v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
|| git describe --abbrev=4 HEAD 2>/dev/null` \
&& case $v in
v[0-9]*) ;;
*) (exit 1) ;;
esac
then
# Is this a new git that lists number of commits since the last
# tag or the previous older version that did not?
# Newer: v6.10-77-g0f8faeb
# Older: v6.10-g0f8faeb
# case $v in
# *-*-*) : git describe is okay three part flavor ;;
# *-*)
# : git describe is older two part flavor
# # Recreate the number of commits and rewrite such that the
# # result is the same as if we were using the newer version
# # of git describe.
# vtag=`echo "$v" | sed 's/-.*//'`
# numcommits=`git rev-list "$vtag"..HEAD | wc -l`
# v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
# ;;
# esac
# Change the first '-' to a '.', so version-comparing tools work properly.
# Remove the "g" in git describe's output string, to save a byte.
# v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
:
else
v=UNKNOWN
fi
v=`echo "$v" |sed 's/^v//'`
# Don't declare a version "dirty" merely because a time stamp has changed.
git status > /dev/null 2>&1
dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
case "$dirty" in
'') ;;
*) # Append the suffix only if there isn't one already.
case $v in
*-dirty) ;;
*) v="$v-dirty" ;;
esac ;;
esac
# Omit the trailing newline, so that m4_esyscmd can use the result directly.
echo "$v" | tr -d '\012'
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
dnl Macros to check the presence of generic (non-typed) symbols.
dnl Copyright (c) 2006-2007 Diego Pettenò <flameeyes@gmail.com>
dnl Copyright (c) 2006-2007 xine project
dnl Copyright (c) 2006-2008 Diego Pettenò <flameeyes@gmail.com>
dnl Copyright (c) 2006-2008 xine project
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
......@@ -32,6 +32,9 @@ dnl distribute a modified version of the Autoconf Macro, you may extend
dnl this special exception to the GPL to apply to your modified version as
dnl well.
dnl Check if the flag is supported by compiler
dnl CC_CHECK_CFLAGS_SILENT([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]),
[ac_save_CFLAGS="$CFLAGS"
......@@ -46,6 +49,9 @@ AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
[$2], [$3])
])
dnl Check if the flag is supported by compiler (cacheable)