Browse Source

Imported Upstream version 0.99.1

tags/debian/0.99.1-1
Sjoerd Simons 10 years ago
parent
commit
c9e69b0e35
100 changed files with 42118 additions and 28697 deletions
  1. +1
    -1
      .tarball-version
  2. +1
    -1
      .version
  3. +2
    -7
      Makefile.am
  4. +48
    -43
      Makefile.in
  5. +14
    -11
      aclocal.m4
  6. +9
    -5
      bootstrap.sh
  7. +89
    -11
      config.h.in
  8. +12192
    -11282
      configure
  9. +701
    -1000
      configure.ac
  10. +37
    -28
      doxygen/Makefile.in
  11. +1
    -1
      doxygen/doxygen.conf.in
  12. +15
    -7
      git-version-gen
  13. +0
    -12
      libpulse-browse.pc.in
  14. +1
    -1
      libpulse-mainloop-glib.pc.in
  15. +1
    -1
      libpulse-simple.pc.in
  16. +1
    -1
      libpulse.pc.in
  17. +0
    -6
      m4/acx_lirc.m4
  18. +0
    -348
      m4/acx_pthread.m4
  19. +0
    -311
      m4/attributes.m4
  20. +92
    -0
      m4/ax_check_define.m4
  21. +147
    -0
      m4/ax_check_flag.m4
  22. +49
    -0
      m4/ax_define_dir.m4
  23. +302
    -0
      m4/ax_pthread.m4
  24. +76
    -0
      m4/ax_tls.m4
  25. +0
    -13
      m4/check_define.m4
  26. +69
    -0
      m4/orc.m4
  27. +0
    -17
      m4/tls.m4
  28. +11
    -15
      man/Makefile.am
  29. +97
    -46
      man/Makefile.in
  30. +2
    -2
      man/default.pa.5.xml.in
  31. +0
    -14
      man/pabrowse.1
  32. +1
    -1
      man/pax11publish.1.xml.in
  33. +5
    -1
      man/pulse-client.conf.5
  34. +20
    -3
      man/pulse-client.conf.5.xml.in
  35. +14
    -6
      man/pulse-daemon.conf.5
  36. +42
    -12
      man/pulse-daemon.conf.5.xml.in
  37. +3
    -3
      man/pulseaudio.1.xml.in
  38. +14
    -0
      man/start-pulseaudio-kde.1
  39. +8
    -7
      man/start-pulseaudio-kde.1.xml.in
  40. +14
    -0
      man/start-pulseaudio-x11.1
  41. +50
    -0
      man/start-pulseaudio-x11.1.xml.in
  42. +162
    -0
      mkinstalldirs
  43. +46
    -0
      orc.mak
  44. +40
    -0
      po/ChangeLog
  45. +6
    -3
      po/LINGUAS
  46. +4
    -5
      po/POTFILES.in
  47. +2
    -0
      po/POTFILES.skip
  48. +696
    -582
      po/as.po
  49. +468
    -355
      po/bn_IN.po
  50. +413
    -293
      po/ca.po
  51. +414
    -287
      po/cs.po
  52. +575
    -687
      po/de.po
  53. +412
    -292
      po/de_CH.po
  54. +546
    -391
      po/el.po
  55. +415
    -293
      po/es.po
  56. +419
    -300
      po/fi.po
  57. +666
    -577
      po/fr.po
  58. +468
    -355
      po/gu.po
  59. +2357
    -0
      po/he.po
  60. +467
    -353
      po/hi.po
  61. +707
    -458
      po/hu.po
  62. +414
    -287
      po/it.po
  63. +1130
    -671
      po/ja.po
  64. +468
    -355
      po/kn.po
  65. +466
    -353
      po/ml.po
  66. +466
    -353
      po/mr.po
  67. +436
    -307
      po/nl.po
  68. +467
    -353
      po/or.po
  69. +468
    -355
      po/pa.po
  70. +414
    -287
      po/pl.po
  71. +412
    -287
      po/pt.po
  72. +782
    -478
      po/pt_BR.po
  73. +2700
    -0
      po/ru.po
  74. +414
    -287
      po/sr.po
  75. +414
    -287
      po/sr@latin.po
  76. +405
    -290
      po/sv.po
  77. +467
    -353
      po/ta.po
  78. +467
    -353
      po/te.po
  79. +439
    -300
      po/uk.po
  80. +651
    -772
      po/zh_CN.po
  81. +2367
    -0
      po/zh_TW.po
  82. +611
    -507
      src/Makefile.am
  83. +2864
    -2326
      src/Makefile.in
  84. +0
    -20
      src/daemon/Makefile.am
  85. +0
    -506
      src/daemon/Makefile.in
  86. +0
    -3
      src/daemon/caps.c
  87. +3
    -4
      src/daemon/cmdline.c
  88. +3
    -8
      src/daemon/cpulimit.c
  89. +103
    -16
      src/daemon/daemon-conf.c
  90. +7
    -1
      src/daemon/daemon-conf.h
  91. +12
    -2
      src/daemon/daemon.conf.in
  92. +43
    -6
      src/daemon/default.pa.in
  93. +0
    -43
      src/daemon/default.pa.win32
  94. +2
    -1
      src/daemon/dumpmodules.c
  95. +1
    -1
      src/daemon/esdcompat.in
  96. +4
    -0
      src/daemon/ltdl-bind-now.c
  97. +244
    -75
      src/daemon/main.c
  98. +522
    -0
      src/daemon/server-lookup.c
  99. +40
    -0
      src/daemon/server-lookup.h
  100. +0
    -2
      src/daemon/start-pulseaudio-x11.in

+ 1
- 1
.tarball-version View File

@@ -1 +1 @@
0.9.23
0.99.1

+ 1
- 1
.version View File

@@ -1 +1 @@
0.9.23
0.99.1

+ 2
- 7
Makefile.am View File

@@ -46,11 +46,6 @@ vapi_DATA = \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libpulse.pc libpulse-simple.pc

if HAVE_AVAHI
pkgconfig_DATA += \
libpulse-browse.pc
endif

if HAVE_GLIB20
pkgconfig_DATA += \
libpulse-mainloop-glib.pc
@@ -77,8 +72,8 @@ fedora-snapshot: dist

dist-hook:
if test -d .git ; then \
test -z $$SKIP_GIT && git pull ; \
chmod u+w ${distdir}/ChangeLog || true ; \
test -z $$USE_GIT || git pull ; \
test -f ${distdir}/ChangeLog && chmod u+w ${distdir}/ChangeLog ; \
( git-changelog.perl || echo "git-changelog.perl failed." ) > ${distdir}/ChangeLog 2>&1 ; \
fi
echo $(VERSION) > $(distdir)/.tarball-version


+ 48
- 43
Makefile.in View File

@@ -51,39 +51,38 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@HAVE_AVAHI_TRUE@am__append_1 = \
@HAVE_AVAHI_TRUE@ libpulse-browse.pc

@HAVE_GLIB20_TRUE@am__append_2 = \
@HAVE_GLIB20_TRUE@am__append_1 = \
@HAVE_GLIB20_TRUE@ libpulse-mainloop-glib.pc

subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(srcdir)/libpulse-browse.pc.in \
$(srcdir)/libpulse-mainloop-glib.pc.in \
$(srcdir)/libpulse-simple.pc.in $(srcdir)/libpulse.pc.in \
$(top_srcdir)/configure ABOUT-NLS compile config.guess \
config.rpath config.sub depcomp install-sh ltmain.sh missing
$(top_srcdir)/configure $(top_srcdir)/src/pulse/version.h.in \
ABOUT-NLS compile config.guess config.rpath config.sub depcomp \
install-sh ltmain.sh missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_libwrap.m4 \
$(top_srcdir)/m4/acx_lirc.m4 $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/attributes.m4 \
$(top_srcdir)/m4/check_define.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/tls.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/ax_check_define.m4 \
$(top_srcdir)/m4/ax_check_flag.m4 \
$(top_srcdir)/m4/ax_define_dir.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/ax_tls.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intltool.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/orc.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = libpulse.pc libpulse-simple.pc libpulse-browse.pc \
libpulse-mainloop-glib.pc
CONFIG_CLEAN_FILES = libpulse.pc libpulse-simple.pc \
libpulse-mainloop-glib.pc src/pulse/version.h
CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
@@ -205,6 +204,8 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FFTW_CFLAGS = @FFTW_CFLAGS@
FFTW_LIBS = @FFTW_LIBS@
FGREP = @FGREP@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
@@ -220,25 +221,17 @@ GTK20_CFLAGS = @GTK20_CFLAGS@
GTK20_LIBS = @GTK20_LIBS@
HAL_CFLAGS = @HAL_CFLAGS@
HAL_LIBS = @HAL_LIBS@
HAVE_AF_UNIX = @HAVE_AF_UNIX@
HAVE_ALSA = @HAVE_ALSA@
HAVE_AVAHI = @HAVE_AVAHI@
HAVE_BLUEZ = @HAVE_BLUEZ@
HAVE_DBUS = @HAVE_DBUS@
HAVE_GCONF = @HAVE_GCONF@
HAVE_GDBM = @HAVE_GDBM@
HAVE_GLIB20 = @HAVE_GLIB20@
HAVE_GTK20 = @HAVE_GTK20@
HAVE_HAL = @HAVE_HAL@
HAVE_HAL_COMPAT = @HAVE_HAL_COMPAT@
HAVE_JACK = @HAVE_JACK@
HAVE_LIBASYNCNS = @HAVE_LIBASYNCNS@
HAVE_LIBSAMPLERATE = @HAVE_LIBSAMPLERATE@
HAVE_OPENSSL = @HAVE_OPENSSL@
HAVE_OSS = @HAVE_OSS@
HAVE_SIMPLEDB = @HAVE_SIMPLEDB@
HAVE_SOLARIS = @HAVE_SOLARIS@
HAVE_TDB = @HAVE_TDB@
HAVE_MKFIFO = @HAVE_MKFIFO@
HAVE_OSS_OUTPUT = @HAVE_OSS_OUTPUT@
HAVE_SYS_RESOURCE_H = @HAVE_SYS_RESOURCE_H@
HAVE_UDEV = @HAVE_UDEV@
HAVE_WAVEOUT = @HAVE_WAVEOUT@
HAVE_X11 = @HAVE_X11@
IMMEDIATE_LDFLAGS = @IMMEDIATE_LDFLAGS@
INSTALL = @INSTALL@
@@ -256,10 +249,11 @@ JACK_CFLAGS = @JACK_CFLAGS@
JACK_LIBS = @JACK_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LDFLAGS_NOUNDEFINED = @LDFLAGS_NOUNDEFINED@
LIBASYNCNS_CFLAGS = @LIBASYNCNS_CFLAGS@
LIBASYNCNS_LIBS = @LIBASYNCNS_LIBS@
LIBICONV = @LIBICONV@
LIBJSON_CFLAGS = @LIBJSON_CFLAGS@
LIBJSON_LIBS = @LIBJSON_LIBS@
LIBLTDL = @LIBLTDL@
LIBOBJS = @LIBOBJS@
LIBPULSE_BROWSE_VERSION_INFO = @LIBPULSE_BROWSE_VERSION_INFO@
@@ -292,10 +286,16 @@ MSGMERGE = @MSGMERGE@
NM = @NM@
NMEDIT = @NMEDIT@
NODELETE_LDFLAGS = @NODELETE_LDFLAGS@
NOUNDEFINED_LDFLAGS = @NOUNDEFINED_LDFLAGS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
OPENSSL_LIBS = @OPENSSL_LIBS@
ORCC = @ORCC@
ORCC_FLAGS = @ORCC_FLAGS@
ORC_CFLAGS = @ORC_CFLAGS@
ORC_LIBS = @ORC_LIBS@
OS_IS_WIN32 = @OS_IS_WIN32@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -305,15 +305,19 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PACTL_BINARY = @PACTL_BINARY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PA_ACCESS_GROUP = @PA_ACCESS_GROUP@
PA_API_VERSION = @PA_API_VERSION@
PA_BINARY = @PA_BINARY@
PA_DEFAULT_CONFIG_DIR = @PA_DEFAULT_CONFIG_DIR@
PA_DLSEARCHPATH = @PA_DLSEARCHPATH@
PA_MACHINE_ID = @PA_MACHINE_ID@
PA_MAJOR = @PA_MAJOR@
PA_MAJORMINOR = @PA_MAJORMINOR@
PA_MAJORMINORMICRO = @PA_MAJORMINORMICRO@
PA_MICRO = @PA_MICRO@
PA_MINOR = @PA_MINOR@
PA_PROTOCOL_VERSION = @PA_PROTOCOL_VERSION@
PA_SOEXT = @PA_SOEXT@
PA_SYSTEM_CONFIG_PATH = @PA_SYSTEM_CONFIG_PATH@
PA_SYSTEM_GROUP = @PA_SYSTEM_GROUP@
PA_SYSTEM_RUNTIME_PATH = @PA_SYSTEM_RUNTIME_PATH@
@@ -330,10 +334,12 @@ PREOPEN_MODS = @PREOPEN_MODS@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
PULSE_LOCALEDIR = @PULSE_LOCALEDIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STOW = @STOW@
STRIP = @STRIP@
TDB_CFLAGS = @TDB_CFLAGS@
TDB_LIBS = @TDB_LIBS@
@@ -352,12 +358,12 @@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@@ -391,7 +397,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pulselocaledir = @pulselocaledir@
pulseconfdir = @pulseconfdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -427,8 +433,7 @@ vapi_DATA = \
vala/libpulse-mainloop-glib.deps vala/libpulse-mainloop-glib.vapi

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libpulse.pc libpulse-simple.pc $(am__append_1) \
$(am__append_2)
pkgconfig_DATA = libpulse.pc libpulse-simple.pc $(am__append_1)

# see git-version-gen
BUILT_SOURCES = $(top_srcdir)/.version
@@ -495,10 +500,10 @@ libpulse.pc: $(top_builddir)/config.status $(srcdir)/libpulse.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
libpulse-simple.pc: $(top_builddir)/config.status $(srcdir)/libpulse-simple.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
libpulse-browse.pc: $(top_builddir)/config.status $(srcdir)/libpulse-browse.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
libpulse-mainloop-glib.pc: $(top_builddir)/config.status $(srcdir)/libpulse-mainloop-glib.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
src/pulse/version.h: $(top_builddir)/config.status $(top_srcdir)/src/pulse/version.h.in
cd $(top_builddir) && $(SHELL) ./config.status $@

mostlyclean-libtool:
-rm -f *.lo
@@ -1014,8 +1019,8 @@ fedora-snapshot: dist

dist-hook:
if test -d .git ; then \
test -z $$SKIP_GIT && git pull ; \
chmod u+w ${distdir}/ChangeLog || true ; \
test -z $$USE_GIT || git pull ; \
test -f ${distdir}/ChangeLog && chmod u+w ${distdir}/ChangeLog ; \
( git-changelog.perl || echo "git-changelog.perl failed." ) > ${distdir}/ChangeLog 2>&1 ; \
fi
echo $(VERSION) > $(distdir)/.tarball-version


+ 14
- 11
aclocal.m4 View File

@@ -480,7 +480,8 @@ fi])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
@@ -526,7 +527,8 @@ m4_define([_PKG_CONFIG],
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
@@ -574,9 +576,9 @@ if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
@@ -589,7 +591,7 @@ $$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

_PKG_TEXT])
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
@@ -600,7 +602,7 @@ path to pkg-config.

_PKG_TEXT

To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
@@ -1620,10 +1622,11 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR

m4_include([m4/acx_libwrap.m4])
m4_include([m4/acx_lirc.m4])
m4_include([m4/acx_pthread.m4])
m4_include([m4/attributes.m4])
m4_include([m4/check_define.m4])
m4_include([m4/ax_check_define.m4])
m4_include([m4/ax_check_flag.m4])
m4_include([m4/ax_define_dir.m4])
m4_include([m4/ax_pthread.m4])
m4_include([m4/ax_tls.m4])
m4_include([m4/iconv.m4])
m4_include([m4/intltool.m4])
m4_include([m4/lib-ld.m4])
@@ -1635,4 +1638,4 @@ m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
m4_include([m4/nls.m4])
m4_include([m4/tls.m4])
m4_include([m4/orc.m4])

+ 9
- 5
bootstrap.sh View File

@@ -45,6 +45,7 @@ case $(uname) in
LIBTOOLIZE="glibtoolize"
;;
esac
test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize

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 && \
@@ -63,9 +64,15 @@ fi
# configure file faulty.
if ! pkg-config --version &>/dev/null; then
echo "pkg-config is required to bootstrap this program" &>/dev/null
exit 1
DIE=1
fi

# Other necessary programs
glib-gettextize --version >/dev/null || DIE=1
intltoolize --version >/dev/null || DIE=1
$LIBTOOLIZE --version >/dev/null || DIE=1
test "$DIE" = 1 && exit 1

if type -p colorgcc > /dev/null ; then
export CC=colorgcc
fi
@@ -78,14 +85,11 @@ else
rm -f config.cache

rm -f Makefile.am~ configure.ac~
# Evil, evil, evil, evil hack
sed 's/read dummy/\#/' `which gettextize` | bash -s -- --copy --force
glib-gettextize --copy --force
test -f Makefile.am~ && mv Makefile.am~ Makefile.am
test -f configure.ac~ && mv configure.ac~ configure.ac

touch config.rpath
test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize

intltoolize --copy --force --automake
"$LIBTOOLIZE" -c --force
run_versioned aclocal "$VERSION" -I m4


+ 89
- 11
config.h.in View File

@@ -23,6 +23,12 @@
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA

/* Disable Orc */
#undef DISABLE_ORC

/* Legacy database entry format */
#undef ENABLE_LEGACY_DATABASE_ENTRY_FORMAT

/* Legacy runtime dir */
#undef ENABLE_LEGACY_RUNTIME_DIR

@@ -36,6 +42,9 @@
/* Gettext package */
#undef GETTEXT_PACKAGE

/* Define to 1 if you have the `accept4' function. */
#undef HAVE_ACCEPT4

/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA

@@ -73,6 +82,9 @@
/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME

/* Define to 1 if you have the <CoreAudio/CoreAudio.h> header file. */
#undef HAVE_COREAUDIO_COREAUDIO_H

/* Define to 1 if you have the `ctime_r' function. */
#undef HAVE_CTIME_R

@@ -164,18 +176,15 @@
/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV

/* Define to 1 if you have the `inet_ntop' function. */
#undef HAVE_INET_NTOP

/* Define to 1 if you have the `inet_pton' function. */
#undef HAVE_INET_PTON

/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* Define this to enable IPv6 connection support */
#undef HAVE_IPV6

/* Define to 1 if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H

/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES

@@ -218,6 +227,9 @@
/* Define to 1 if you have the `mlock' function. */
#undef HAVE_MLOCK

/* Define to 1 if you have the <mmsystem.h> header file. */
#undef HAVE_MMSYSTEM_H

/* Define to 1 if you have the `nanosleep' function. */
#undef HAVE_NANOSLEEP

@@ -242,15 +254,24 @@
/* Have OpenSSL */
#undef HAVE_OPENSSL

/* Use Orc */
#undef HAVE_ORC

/* Have OSS output? */
#undef HAVE_OSS_OUTPUT

/* Have OSS wrapper (padsp)? */
#undef HAVE_OSS_WRAPPER

/* Define to 1 if you have the <pcreposix.h> header file. */
#undef HAVE_PCREPOSIX_H

/* Define to 1 if you have the `pipe' function. */
#undef HAVE_PIPE

/* Define to 1 if you have the `pipe2' function. */
#undef HAVE_PIPE2

/* Define to 1 if you have the <poll.h> header file. */
#undef HAVE_POLL_H

@@ -269,18 +290,27 @@
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD

/* Define to 1 if you have the `pthread_getname_np' function. */
#undef HAVE_PTHREAD_GETNAME_NP

/* Have PTHREAD_PRIO_INHERIT. */
#undef HAVE_PTHREAD_PRIO_INHERIT

/* Define to 1 if you have the `pthread_setaffinity_np' function. */
#undef HAVE_PTHREAD_SETAFFINITY_NP

/* Define to 1 if you have the `pthread_setname_np' function. */
#undef HAVE_PTHREAD_SETNAME_NP

/* Define to 1 if you have the <pwd.h> header file. */
#undef HAVE_PWD_H

/* Define to 1 if you have the `readlink' function. */
#undef HAVE_READLINK

/* Define to 1 if you have the `regexec' function. */
#undef HAVE_REGEXEC

/* Define to 1 if you have the <regex.h> header file. */
#undef HAVE_REGEX_H

@@ -362,6 +392,9 @@
/* Define to 1 if you have the `strtof_l' function. */
#undef HAVE_STRTOF_L

/* Define to 1 if you have the `symlink' function. */
#undef HAVE_SYMLINK

/* Define to 1 if you have the `sysconf' function. */
#undef HAVE_SYSCONF

@@ -431,6 +464,9 @@
/* Have UDEV. */
#undef HAVE_UDEV

/* Define to 1 if you have the `uname' function. */
#undef HAVE_UNAME

/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

@@ -446,6 +482,9 @@
/* Define to 1 if you have the <vfork.h> header file. */
#undef HAVE_VFORK_H

/* Have WaveOut audio? */
#undef HAVE_WAVEOUT

/* Define to 1 if you have the <windows.h> header file. */
#undef HAVE_WINDOWS_H

@@ -474,12 +513,12 @@
*/
#undef LT_OBJDIR

/* netbsd implementation */
#undef NETBSD_ATOMIC_OPS

/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O

/* Build target is Darwin. */
#undef OS_IS_DARWIN

/* Build target is Windows. */
#undef OS_IS_WIN32

@@ -504,15 +543,42 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION

/* Location of pactl binary */
#undef PACTL_BINARY

/* Access group */
#undef PA_ACCESS_GROUP

/* Location of pulseaudio binary */
#undef PA_BINARY

/* Location of uninstalled binaries */
#undef PA_BUILDDIR

/* The CFLAGS used during compilation */
#undef PA_CFLAGS

/* Location of configuration files */
#undef PA_DEFAULT_CONFIG_DIR

/* Modules dir */
#undef PA_DLSEARCHPATH

/* D-Bus machine-id file */
#undef PA_MACHINE_ID

/* System config dir */
#undef PA_SYSTEM_CONFIG_PATH

/* Group for the PulseAudio system daemon */
#undef PA_SYSTEM_GROUP

/* System runtime dir */
#undef PA_SYSTEM_RUNTIME_PATH

/* System state dir */
#undef PA_SYSTEM_STATE_PATH

/* User for running the PulseAudio system daemon */
#undef PA_SYSTEM_USER

@@ -520,6 +586,9 @@
your system. */
#undef PTHREAD_CREATE_JOINABLE

/* Gettext locale dir */
#undef PULSE_LOCALEDIR

/* Define to the type of arg 1 for `select'. */
#undef SELECT_TYPE_ARG1

@@ -543,6 +612,9 @@
/* Define this if the compiler supports __thread for Thread-Local Storage */
#undef SUPPORT_TLS___THREAD

/* If the compiler supports a TLS storage class define it to that here */
#undef TLS

/* Define this if you want per-user esound socket directories */
#undef USE_PER_USER_ESOUND_SOCKET

@@ -571,6 +643,12 @@
/* Version number of package */
#undef VERSION

/* Just a test. */
#undef WIBBLE

/* Needed to avoid including unnecessary headers on Windows */
#undef WIN32_LEAN_AND_MEAN

/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
@@ -599,8 +677,8 @@
this defined. */
#undef _POSIX_1_SOURCE

/* Needed to get clock_gettime on Mac OS X */
#undef _POSIX_C_SOURCE
/* Needed on Solaris */
#undef _POSIX_PTHREAD_SEMANTICS

/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE


+ 12192
- 11282
configure
File diff suppressed because it is too large
View File


+ 701
- 1000
configure.ac
File diff suppressed because it is too large
View File


+ 37
- 28
doxygen/Makefile.in View File

@@ -55,18 +55,20 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/doxygen.conf.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_libwrap.m4 \
$(top_srcdir)/m4/acx_lirc.m4 $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/attributes.m4 \
$(top_srcdir)/m4/check_define.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/tls.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/ax_check_define.m4 \
$(top_srcdir)/m4/ax_check_flag.m4 \
$(top_srcdir)/m4/ax_define_dir.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/ax_tls.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intltool.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/orc.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = doxygen.conf
CONFIG_CLEAN_VPATH_FILES =
@@ -117,6 +119,8 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FFTW_CFLAGS = @FFTW_CFLAGS@
FFTW_LIBS = @FFTW_LIBS@
FGREP = @FGREP@
GCONF_CFLAGS = @GCONF_CFLAGS@
GCONF_LIBS = @GCONF_LIBS@
@@ -132,25 +136,17 @@ GTK20_CFLAGS = @GTK20_CFLAGS@
GTK20_LIBS = @GTK20_LIBS@
HAL_CFLAGS = @HAL_CFLAGS@
HAL_LIBS = @HAL_LIBS@
HAVE_AF_UNIX = @HAVE_AF_UNIX@
HAVE_ALSA = @HAVE_ALSA@
HAVE_AVAHI = @HAVE_AVAHI@
HAVE_BLUEZ = @HAVE_BLUEZ@
HAVE_DBUS = @HAVE_DBUS@
HAVE_GCONF = @HAVE_GCONF@
HAVE_GDBM = @HAVE_GDBM@
HAVE_GLIB20 = @HAVE_GLIB20@
HAVE_GTK20 = @HAVE_GTK20@
HAVE_HAL = @HAVE_HAL@
HAVE_HAL_COMPAT = @HAVE_HAL_COMPAT@
HAVE_JACK = @HAVE_JACK@
HAVE_LIBASYNCNS = @HAVE_LIBASYNCNS@
HAVE_LIBSAMPLERATE = @HAVE_LIBSAMPLERATE@
HAVE_OPENSSL = @HAVE_OPENSSL@
HAVE_OSS = @HAVE_OSS@
HAVE_SIMPLEDB = @HAVE_SIMPLEDB@
HAVE_SOLARIS = @HAVE_SOLARIS@
HAVE_TDB = @HAVE_TDB@
HAVE_MKFIFO = @HAVE_MKFIFO@
HAVE_OSS_OUTPUT = @HAVE_OSS_OUTPUT@
HAVE_SYS_RESOURCE_H = @HAVE_SYS_RESOURCE_H@
HAVE_UDEV = @HAVE_UDEV@
HAVE_WAVEOUT = @HAVE_WAVEOUT@
HAVE_X11 = @HAVE_X11@
IMMEDIATE_LDFLAGS = @IMMEDIATE_LDFLAGS@
INSTALL = @INSTALL@
@@ -168,10 +164,11 @@ JACK_CFLAGS = @JACK_CFLAGS@
JACK_LIBS = @JACK_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LDFLAGS_NOUNDEFINED = @LDFLAGS_NOUNDEFINED@
LIBASYNCNS_CFLAGS = @LIBASYNCNS_CFLAGS@
LIBASYNCNS_LIBS = @LIBASYNCNS_LIBS@
LIBICONV = @LIBICONV@
LIBJSON_CFLAGS = @LIBJSON_CFLAGS@
LIBJSON_LIBS = @LIBJSON_LIBS@
LIBLTDL = @LIBLTDL@
LIBOBJS = @LIBOBJS@
LIBPULSE_BROWSE_VERSION_INFO = @LIBPULSE_BROWSE_VERSION_INFO@
@@ -204,10 +201,16 @@ MSGMERGE = @MSGMERGE@
NM = @NM@
NMEDIT = @NMEDIT@
NODELETE_LDFLAGS = @NODELETE_LDFLAGS@
NOUNDEFINED_LDFLAGS = @NOUNDEFINED_LDFLAGS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
OPENSSL_LIBS = @OPENSSL_LIBS@
ORCC = @ORCC@
ORCC_FLAGS = @ORCC_FLAGS@
ORC_CFLAGS = @ORC_CFLAGS@
ORC_LIBS = @ORC_LIBS@
OS_IS_WIN32 = @OS_IS_WIN32@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -217,15 +220,19 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PACTL_BINARY = @PACTL_BINARY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PA_ACCESS_GROUP = @PA_ACCESS_GROUP@
PA_API_VERSION = @PA_API_VERSION@
PA_BINARY = @PA_BINARY@
PA_DEFAULT_CONFIG_DIR = @PA_DEFAULT_CONFIG_DIR@
PA_DLSEARCHPATH = @PA_DLSEARCHPATH@
PA_MACHINE_ID = @PA_MACHINE_ID@
PA_MAJOR = @PA_MAJOR@
PA_MAJORMINOR = @PA_MAJORMINOR@
PA_MAJORMINORMICRO = @PA_MAJORMINORMICRO@
PA_MICRO = @PA_MICRO@
PA_MINOR = @PA_MINOR@
PA_PROTOCOL_VERSION = @PA_PROTOCOL_VERSION@
PA_SOEXT = @PA_SOEXT@
PA_SYSTEM_CONFIG_PATH = @PA_SYSTEM_CONFIG_PATH@
PA_SYSTEM_GROUP = @PA_SYSTEM_GROUP@
PA_SYSTEM_RUNTIME_PATH = @PA_SYSTEM_RUNTIME_PATH@
@@ -242,10 +249,12 @@ PREOPEN_MODS = @PREOPEN_MODS@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
PULSE_LOCALEDIR = @PULSE_LOCALEDIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STOW = @STOW@
STRIP = @STRIP@
TDB_CFLAGS = @TDB_CFLAGS@
TDB_LIBS = @TDB_LIBS@
@@ -264,12 +273,12 @@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@@ -303,7 +312,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pulselocaledir = @pulselocaledir@
pulseconfdir = @pulseconfdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@


+ 1
- 1
doxygen/doxygen.conf.in View File

@@ -417,7 +417,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.

INPUT = ../src/pulse/context.h ../src/pulse/stream.h ../src/pulse/pulseaudio.h ../src/pulse/sample.h ../src/pulse/def.h ../src/pulse/subscribe.h ../src/pulse/introspect.h ../src/pulse/scache.h ../src/pulse/mainloop-api.h ../src/pulse/glib-mainloop.h ../src/pulse/mainloop.h ../src/pulse/mainloop-signal.h ../src/pulse/error.h ../src/pulse/operation.h ../src/pulse/simple.h ../src/pulse/version.h ../src/pulse/volume.h ../src/pulse/channelmap.h ../src/pulse/thread-mainloop.h ../src/pulse/xmalloc.h ../src/pulse/utf8.h ../src/pulse/util.h ../src/pulse/timeval.h ../src/pulse/proplist.h ../src/pulse/gccmacro.h ../src/pulse/ext-stream-restore.h ../src/pulse/rtclock.h
INPUT = ../src/pulse/context.h ../src/pulse/stream.h ../src/pulse/pulseaudio.h ../src/pulse/sample.h ../src/pulse/def.h ../src/pulse/subscribe.h ../src/pulse/introspect.h ../src/pulse/scache.h ../src/pulse/mainloop-api.h ../src/pulse/glib-mainloop.h ../src/pulse/mainloop.h ../src/pulse/mainloop-signal.h ../src/pulse/error.h ../src/pulse/operation.h ../src/pulse/simple.h ../src/pulse/version.h ../src/pulse/volume.h ../src/pulse/channelmap.h ../src/pulse/thread-mainloop.h ../src/pulse/xmalloc.h ../src/pulse/utf8.h ../src/pulse/util.h ../src/pulse/timeval.h ../src/pulse/proplist.h ../src/pulse/gccmacro.h ../src/pulse/ext-stream-restore.h ../src/pulse/rtclock.h ../src/pulse/format.h

# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp


+ 15
- 7
git-version-gen View File

@@ -1,6 +1,6 @@
#!/bin/sh
# Print a version string.
scriptversion=2008-04-08.07
scriptversion=2008-04-08.07.01

# Copyright (C) 2007-2008 Free Software Foundation
#
@@ -77,6 +77,7 @@ esac
tarball_version_file=$1
nl='
'
v=

# First see if there is a tarball-only version file.
# then try "git describe", then default.
@@ -96,13 +97,20 @@ 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
&& v=`git describe --abbrev=4 --match='v[0-9]*' HEAD 2>/dev/null` \
&& [ -n "$v" ]
then
# If we are on a "dev" tag, we need to check that it is not the same
# reference as the a previous version tag (this only happens when we are
# working with a release tag).
# NB The below trick relies on the $v being an exact tag to work which
# will only work when HEAD == tag. When further commits have been made on top
# of the tag, the $v will be supplimented with the number of commits since
# that tag and the commit ref of the most recent commit and thus will
# fail the test below (as intended)
v2=`git describe --abbrev=4 --match='v[0-9]\.[0-9]' --contains $v 2>/dev/null | cut -d'^' -f1`
[ -n "$v2" ] && v=$v2

# 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


+ 0
- 12
libpulse-browse.pc.in View File

@@ -1,12 +0,0 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: libpulse-browse
Description: PulseAudio Network Browsing Interface
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpulse-browse @PTHREAD_LIBS@
Libs.private: -lpulsecommon-@PA_MAJORMINORMICRO@
Cflags: -I${includedir} -D_REENTRANT
Requires: libpulse

+ 1
- 1
libpulse-mainloop-glib.pc.in View File

@@ -7,6 +7,6 @@ Name: libpulse-mainloop-glib
Description: PulseAudio GLib 2.0 Main Loop Wrapper
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpulse-mainloop-glib @PTHREAD_LIBS@
Libs.private: -lpulsecommon-@PA_MAJORMINORMICRO@
Libs.private: -lpulsecommon-@PA_MAJORMINOR@
Cflags: -I${includedir} -D_REENTRANT
Requires: libpulse glib-2.0

+ 1
- 1
libpulse-simple.pc.in View File

@@ -7,6 +7,6 @@ Name: libpulse-simple
Description: PulseAudio Simplified Synchronous Client Interface
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpulse-simple @PTHREAD_LIBS@
Libs.private: -lpulsecommon-@PA_MAJORMINORMICRO@
Libs.private: -lpulsecommon-@PA_MAJORMINOR@
Cflags: -I${includedir} -D_REENTRANT
Requires: libpulse

+ 1
- 1
libpulse.pc.in View File

@@ -8,5 +8,5 @@ Name: libpulse
Description: PulseAudio Client Interface
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpulse @PTHREAD_LIBS@
Libs.private: -lpulsecommon-@PA_MAJORMINORMICRO@
Libs.private: -lpulsecommon-@PA_MAJORMINOR@
Cflags: -I${includedir} -D_REENTRANT

+ 0
- 6
m4/acx_lirc.m4 View File

@@ -1,6 +0,0 @@
AC_DEFUN([ACX_LIRC], [
LIRC_CFLAGS=
LIRC_LIBS=
AC_CHECK_HEADER(lirc/lirc_client.h,[AC_CHECK_LIB(lirc_client,lirc_init,[HAVE_LIRC=1
LIRC_LIBS=-llirc_client],HAVE_LIRC=0)],HAVE_LIRC=0)
])

+ 0
- 348
m4/acx_pthread.m4 View File

@@ -1,348 +0,0 @@
dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
dnl
dnl @summary figure out how to build C programs using POSIX threads
dnl
dnl This macro figures out how to build C programs using POSIX threads.
dnl It sets the PTHREAD_LIBS output variable to the threads library and
dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
dnl C compiler flags that are needed. (The user can also force certain
dnl compiler flags/libs to be tested by setting these environment
dnl variables.)
dnl
dnl Also sets PTHREAD_CC to any special C compiler that is needed for
dnl multi-threaded programs (defaults to the value of CC otherwise).
dnl (This is necessary on AIX to use the special cc_r compiler alias.)
dnl
dnl NOTE: You are assumed to not only compile your program with these
dnl flags, but also link it with them as well. e.g. you should link
dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
dnl $LIBS
dnl
dnl If you are only building threads programs, you may wish to use
dnl these variables in your default LIBS, CFLAGS, and CC:
dnl
dnl LIBS="$PTHREAD_LIBS $LIBS"
dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
dnl CC="$PTHREAD_CC"
dnl
dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
dnl
dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
dnl default action will define HAVE_PTHREAD.
dnl
dnl Please let the authors know if this macro fails on any platform, or
dnl if you have any other suggestions or comments. This macro was based
dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
dnl We are also grateful for the helpful feedback of numerous users.
dnl
dnl @category InstalledPackages
dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
dnl @version 2006-05-29
dnl @license GPLWithACException
dnl
dnl Checks for GCC shared/pthread inconsistency based on work by
dnl Marcin Owsiany <marcin@owsiany.pl>


AC_DEFUN([ACX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_SAVE
AC_LANG_C
acx_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, acx_pthread_ok=yes)
AC_MSG_RESULT($acx_pthread_ok)
if test x"$acx_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.

acx_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_cpu}-${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:

acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
;;
esac

if test x"$acx_pthread_ok" = xno; then
for flag in $acx_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(acx_pthread_config, pthread-config, yes, no)
if test x"$acx_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_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes])

LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"

AC_MSG_RESULT($acx_pthread_ok)
if test "x$acx_pthread_ok" = xyes; then
break;
fi

PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi

# Various other checks:
if test "x$acx_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_TRY_LINK([#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_cpu}-${host_os}" in
*-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi

LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with xlc_r or cc_r
if test x"$GCC" != xyes; then
AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
else
PTHREAD_CC=$CC
fi

# The next part tries to detect GCC inconsistency with -shared on some
# architectures and systems. The problem is that in certain
# configurations, when -shared is specified, GCC "forgets" to
# internally use various flags which are still necessary.

AC_MSG_CHECKING([whether to check for GCC pthread/shared inconsistencies])
check_inconsistencies=yes
case "${host_cpu}-${host_os}" in
*-darwin*) check_inconsistencies=no ;;
esac
if test x"$GCC" != xyes -o "x$check_inconsistencies" != xyes ; then
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])

# In order not to create several levels of indentation, we test
# the value of "$ok" until we find out the cure or run out of
# ideas.
ok="no"

#
# Prepare the flags
#
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
save_CC="$CC"
# Try with the flags determined by the earlier checks.
#
# -Wl,-z,defs forces link-time symbol resolution, so that the
# linking checks with -shared actually have any value
#
# FIXME: -fPIC is required for -shared on many architectures,
# so we specify it here, but the right way would probably be to
# properly detect whether it is actually required.
CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CC="$PTHREAD_CC"

AC_MSG_CHECKING([whether -pthread is sufficient with -shared])
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[ok=yes])

if test "x$ok" = xyes; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi

#
# Linux gcc on some architectures such as mips/mipsel forgets
# about -lpthread
#
if test x"$ok" = xno; then
AC_MSG_CHECKING([whether -lpthread fixes that])
LIBS="-lpthread $PTHREAD_LIBS $save_LIBS"
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[ok=yes])

if test "x$ok" = xyes; then
AC_MSG_RESULT([yes])
PTHREAD_LIBS="-lpthread $PTHREAD_LIBS"
else
AC_MSG_RESULT([no])
fi
fi
#
# FreeBSD 4.10 gcc forgets to use -lc_r instead of -lc
#
if test x"$ok" = xno; then
AC_MSG_CHECKING([whether -lc_r fixes that])
LIBS="-lc_r $PTHREAD_LIBS $save_LIBS"
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[ok=yes])

if test "x$ok" = xyes; then
AC_MSG_RESULT([yes])
PTHREAD_LIBS="-lc_r $PTHREAD_LIBS"
else
AC_MSG_RESULT([no])
fi
fi
if test x"$ok" = xno; then
# OK, we have run out of ideas
AC_MSG_WARN([Impossible to determine how to use pthreads with shared libraries])

# so it's not safe to assume that we may use pthreads
acx_pthread_ok=no
fi

CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
CC="$save_CC"
fi
else
PTHREAD_CC="$CC"
fi

AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)

# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$acx_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
acx_pthread_ok=no
$2
fi
AC_LANG_RESTORE
])dnl ACX_PTHREAD

+ 0
- 311
m4/attributes.m4 View File

@@ -1,311 +0,0 @@
dnl Macros to check the presence of generic (non-typed) symbols.
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
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
dnl 02110-1301, USA.
dnl
dnl As a special exception, the copyright owners of the
dnl macro gives unlimited permission to copy, distribute and modify the
dnl configure scripts that are the output of Autoconf when processing the
dnl Macro. You need not follow the terms of the GNU General Public
dnl License when using or distributing such scripts, even though portions
dnl of the text of the Macro appear in them. The GNU General Public
dnl License (GPL) does govern all other use of the material that
dnl constitutes the Autoconf Macro.
dnl
dnl This special exception to the GPL applies to versions of the
dnl Autoconf Macro released by this project. When you make and
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"
CFLAGS="$CFLAGS $1"
AC_COMPILE_IFELSE([int a;],
[eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"],
[eval "AS_TR_SH([cc_cv_cflags_$1])='no'"])
CFLAGS="$ac_save_CFLAGS"
])

AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
[$2], [$3])
])

dnl Check if the flag is supported by compiler (cacheable)
dnl CC_CHECK_CFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])

AC_DEFUN([CC_CHECK_CFLAGS], [
AC_CACHE_CHECK([if $CC supports $1 flag],
AS_TR_SH([cc_cv_cflags_$1]),
CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here!
)

AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
[$2], [$3])
])

dnl CC_CHECK_CFLAG_APPEND(FLAG, [action-if-found], [action-if-not-found])
dnl Check for CFLAG and appends them to CFLAGS if supported
AC_DEFUN([CC_CHECK_CFLAG_APPEND], [
AC_CACHE_CHECK([if $CC supports $1 flag],
AS_TR_SH([cc_cv_cflags_$1]),
CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here!
)

AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
[CFLAGS="$CFLAGS $1"; DEBUG_CFLAGS="$DEBUG_CFLAGS $1"; $2], [$3])
])

dnl CC_CHECK_CFLAGS_APPEND([FLAG1 FLAG2], [action-if-found], [action-if-not])
AC_DEFUN([CC_CHECK_CFLAGS_APPEND], [
for flag in $1; do
CC_CHECK_CFLAG_APPEND($flag, [$2], [$3])
done
])

dnl Check if the flag is supported by linker (cacheable)
dnl CC_CHECK_LDFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])

AC_DEFUN([CC_CHECK_LDFLAGS], [
AC_CACHE_CHECK([if $CC supports $1 flag],
AS_TR_SH([cc_cv_ldflags_$1]),
[ac_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $1"
AC_LINK_IFELSE([int main() { return 1; }],
[eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
[eval "AS_TR_SH([cc_cv_ldflags_$1])="])
LDFLAGS="$ac_save_LDFLAGS"
])

AS_IF([eval test x$]AS_TR_SH([cc_cv_ldflags_$1])[ = xyes],
[$2], [$3])
])

dnl define the LDFLAGS_NOUNDEFINED variable with the correct value for
dnl the current linker to avoid undefined references in a shared object.
AC_DEFUN([CC_NOUNDEFINED], [
dnl We check $host for which systems to enable this for.
AC_REQUIRE([AC_CANONICAL_HOST])

case $host in
dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads
dnl are requested, as different implementations are present; to avoid problems
dnl use -Wl,-z,defs only for those platform not behaving this way.
*-freebsd* | *-openbsd*) ;;
*)
dnl First of all check for the --no-undefined variant of GNU ld. This allows
dnl for a much more readable commandline, so that people can understand what
dnl it does without going to look for what the heck -z defs does.
for possible_flags in "-Wl,--no-undefined" "-Wl,-z,defs"; do
CC_CHECK_LDFLAGS([$possible_flags], [LDFLAGS_NOUNDEFINED="$possible_flags"])
break
done
;;
esac

AC_SUBST([LDFLAGS_NOUNDEFINED])
])

dnl Check for a -Werror flag or equivalent. -Werror is the GCC
dnl and ICC flag that tells the compiler to treat all the warnings
dnl as fatal. We usually need this option to make sure that some
dnl constructs (like attributes) are not simply ignored.
dnl
dnl Other compilers don't support -Werror per se, but they support
dnl an equivalent flag:
dnl - Sun Studio compiler supports -errwarn=%all
AC_DEFUN([CC_CHECK_WERROR], [
AC_CACHE_CHECK(
[for $CC way to treat warnings as errors],
[cc_cv_werror],
[CC_CHECK_CFLAGS_SILENT([-Werror], [cc_cv_werror=-Werror],
[CC_CHECK_CFLAGS_SILENT([-errwarn=%all], [cc_cv_werror=-errwarn=%all])])
])
])

AC_DEFUN([CC_CHECK_ATTRIBUTE], [
AC_REQUIRE([CC_CHECK_WERROR])
AC_CACHE_CHECK([if $CC supports __attribute__(( ifelse([$2], , [$1], [$2]) ))],
AS_TR_SH([cc_cv_attribute_$1]),
[ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $cc_cv_werror"
AC_COMPILE_IFELSE([$3],
[eval "AS_TR_SH([cc_cv_attribute_$1])='yes'"],
[eval "AS_TR_SH([cc_cv_attribute_$1])='no'"])
CFLAGS="$ac_save_CFLAGS"
])

AS_IF([eval test x$]AS_TR_SH([cc_cv_attribute_$1])[ = xyes],
[AC_DEFINE(
AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1,
[Define this if the compiler supports __attribute__(( ifelse([$2], , [$1], [$2]) ))]
)
$4],
[$5])
])

AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
CC_CHECK_ATTRIBUTE(
[constructor],,
[void __attribute__((constructor)) ctor() { int a; }],
[$1], [$2])
])

AC_DEFUN([CC_ATTRIBUTE_FORMAT], [
CC_CHECK_ATTRIBUTE(
[format], [format(printf, n, n)],
[void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; }],
[$1], [$2])
])

AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [
CC_CHECK_ATTRIBUTE(
[format_arg], [format_arg(printf)],
[char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; }],
[$1], [$2])
])

AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [
CC_CHECK_ATTRIBUTE(
[visibility_$1], [visibility("$1")],
[void __attribute__((visibility("$1"))) $1_function() { }],
[$2], [$3])
])

AC_DEFUN([CC_ATTRIBUTE_NONNULL], [
CC_CHECK_ATTRIBUTE(
[nonnull], [nonnull()],
[void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = (void*)0; bar = (void*)0; }],
[$1], [$2])
])

AC_DEFUN([CC_ATTRIBUTE_UNUSED], [
CC_CHECK_ATTRIBUTE(
[unused], ,
[void some_function(void *foo, __attribute__((unused)) void *bar);],
[$1], [$2])
])

AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [
CC_CHECK_ATTRIBUTE(
[sentinel], ,
[void some_function(void *foo, ...) __attribute__((sentinel));],
[$1], [$2])
])

AC_DEFUN([CC_ATTRIBUTE_DEPRECATED], [
CC_CHECK_ATTRIBUTE(
[deprecated], ,
[void some_function(void *foo, ...) __attribute__((deprecated));],
[$1], [$2])
])

AC_DEFUN([CC_ATTRIBUTE_ALIAS], [
CC_CHECK_ATTRIBUTE(
[alias], [weak, alias],
[void other_function(void *foo) { }
void some_function(void *foo) __attribute__((weak, alias("other_function")));],
[$1], [$2])
])

AC_DEFUN([CC_ATTRIBUTE_MALLOC], [
CC_CHECK_ATTRIBUTE(
[malloc], ,
[void * __attribute__((malloc)) my_alloc(int n);],
[$1], [$2])
])

AC_DEFUN([CC_ATTRIBUTE_PACKED], [
CC_CHECK_ATTRIBUTE(
[packed], ,
[struct astructure { char a; int b; long c; void *d; } __attribute__((packed));],
[$1], [$2])
])

AC_DEFUN([CC_ATTRIBUTE_CONST], [
CC_CHECK_ATTRIBUTE(
[const], ,
[int __attribute__((const)) twopow(int n) { return 1 << n; } ],
[$1], [$2])
])

AC_DEFUN([CC_FLAG_VISIBILITY], [
AC_REQUIRE([CC_CHECK_WERROR])
AC_CACHE_CHECK([if $CC supports -fvisibility=hidden],
[cc_cv_flag_visibility],
[cc_flag_visibility_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $cc_cv_werror"
CC_CHECK_CFLAGS_SILENT([-fvisibility=hidden],
cc_cv_flag_visibility='yes',
cc_cv_flag_visibility='no')
CFLAGS="$cc_flag_visibility_save_CFLAGS"])
AS_IF([test "x$cc_cv_flag_visibility" = "xyes"],
[AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1,
[Define this if the compiler supports the -fvisibility flag])
$1],
[$2])
])

AC_DEFUN([CC_FUNC_EXPECT], [
AC_REQUIRE([CC_CHECK_WERROR])
AC_CACHE_CHECK([if compiler has __builtin_expect function],
[cc_cv_func_expect],
[ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $cc_cv_werror"
AC_COMPILE_IFELSE(
[int some_function() {
int a = 3;
return (int)__builtin_expect(a, 3);
}],
[cc_cv_func_expect=yes],
[cc_cv_func_expect=no])
CFLAGS="$ac_save_CFLAGS"
])

AS_IF([test "x$cc_cv_func_expect" = "xyes"],
[AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1,
[Define this if the compiler supports __builtin_expect() function])
$1],
[$2])
])

AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
AC_REQUIRE([CC_CHECK_WERROR])
AC_CACHE_CHECK([highest __attribute__ ((aligned ())) supported],
[cc_cv_attribute_aligned],
[ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $cc_cv_werror"
for cc_attribute_align_try in 64 32 16 8 4 2; do
AC_COMPILE_IFELSE([
int main() {
static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0;
return c;
}], [cc_cv_attribute_aligned=$cc_attribute_align_try; break])
done
CFLAGS="$ac_save_CFLAGS"
])

if test "x$cc_cv_attribute_aligned" != "x"; then
AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned],
[Define the highest alignment supported])
fi
])

+ 92
- 0
m4/ax_check_define.m4 View File

@@ -0,0 +1,92 @@
# ===========================================================================
# 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

+ 147
- 0
m4/ax_check_flag.m4 View File

@@ -0,0 +1,147 @@
# ===========================================================================
# 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

+ 49
- 0
m4/ax_define_dir.m4 View File

@@ -0,0 +1,49 @@
# ===========================================================================
# 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
])

+ 302
- 0
m4/ax_pthread.m4 View File

@@ -0,0 +1,302 @@
# ===========================================================================
# 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.