openbsd-ports/audio/libcanberra/patches/patch-configure_ac
2010-04-22 16:29:49 +00:00

195 lines
5.6 KiB
Plaintext

$OpenBSD: patch-configure_ac,v 1.6 2010/04/22 16:29:49 ajacoutot Exp $
--- configure.ac.orig Mon Apr 19 17:07:05 2010
+++ configure.ac Thu Apr 22 18:16:26 2010
@@ -23,14 +23,14 @@ m4_define([ca_major],[0])
m4_define([ca_minor],[24])
m4_define([ca_version],[ca_major.ca_minor])
-AC_PREREQ(2.63)
+AC_PREREQ(2.62)
AC_INIT([libcanberra],[ca_version],[mzyvopnaoreen (at) 0pointer (dot) de])
AC_CONFIG_SRCDIR([src/common.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR(m4)
-AM_INIT_AUTOMAKE([foreign 1.10 -Wall])
+AM_INIT_AUTOMAKE([foreign 1.9 -Wall])
AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/libcanberra/])
AC_SUBST(LIBCANBERRA_VERSION_INFO, [2:3:2])
@@ -90,7 +90,7 @@ dnl can give the proper place to find libltdl through
dnl variables like LDFLAGS and CPPFLAGS.
AC_CHECK_HEADER([ltdl.h],
- [AC_CHECK_LIB([ltdl], [lt_dladvise_init], [LIBLTDL=-lltdl], [LIBLTDL=])],
+ [AC_CHECK_LIB([ltdl], [lt_dlopen], [LIBLTDL=-lltdl], [LIBLTDL=])],
[LIBLTDL=])
AS_IF([test "x$LIBLTDL" = "x"],
@@ -245,6 +245,36 @@ else
HAVE_OSS=0
fi
+### SNDIO support (optional) ###
+
+AC_ARG_ENABLE([sndio],
+ AC_HELP_STRING([--disable-sndio], [Disable optional sndio support]),
+ [
+ case "${enableval}" in
+ yes) sndio=yes ;;
+ no) sndio=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-sndio) ;;
+ esac
+ ],
+ [sndio=auto])
+
+if test "x${sndio}" != xno ; then
+ AC_CHECK_HEADERS(sndio.h)
+ if test "${ac_cv_header_sndio_h}" = "yes"; then
+ HAVE_SNDIO=1
+ AC_DEFINE([HAVE_SNDIO], 1, [Have sndio?])
+ SNDIO_LIBS='-lsndio'
+ else
+ HAVE_SNDIO=0
+ if test "x$sndio" = xyes ; then
+ AC_MSG_ERROR([*** sndio not found ***])
+ fi
+ fi
+else
+ HAVE_SNDIO=0
+fi
+AC_SUBST(SNDIO_LIBS)
+
### PulseAudio (optional) ####
AC_ARG_ENABLE([pulse],
@@ -467,6 +497,7 @@ BUILTIN_DSO=0
BUILTIN_PULSE=0
BUILTIN_ALSA=0
BUILTIN_OSS=0
+BUILTIN_SNDIO=0
BUILTIN_GSTREAMER=0
BUILTIN_NULL=0
@@ -479,6 +510,7 @@ case "x$with_builtin" in
BUILTIN_PULSE=1
HAVE_ALSA=0
HAVE_OSS=0
+ HAVE_SNDIO=0
HAVE_GSTREAMER=0
HAVE_NULL=0
;;
@@ -490,6 +522,7 @@ case "x$with_builtin" in
BUILTIN_ALSA=1
HAVE_OSS=0
+ HAVE_SNDIO=0
HAVE_PULSE=0
HAVE_GSTREAMER=0
HAVE_NULL=0
@@ -503,6 +536,7 @@ case "x$with_builtin" in
BUILTIN_GSTREAMER=1
HAVE_ALSA=0
HAVE_OSS=0
+ HAVE_SNDIO=0
HAVE_PULSE=0
HAVE_NULL=0
;;
@@ -514,11 +548,25 @@ case "x$with_builtin" in
BUILTIN_OSS=1
HAVE_ALSA=0
+ HAVE_SNDIO=0
HAVE_PULSE=0
HAVE_GSTREAMER=0
HAVE_NULL=0
;;
+ xsndio)
+ if test "x$HAV_SNDIO" != x1 ; then
+ AC_MSG_ERROR([*** sndio selected for builtin driver, but not enabled. ***])
+ fi
+
+ BUILTIN_SNDIO=1
+ HAVE_ALSA=0
+ HAVE_OSS=0
+ HAVE_PULSE=0
+ HAVE_GSTREAMER=0
+ HAVE_NULL=0
+ ;;
+
xnull)
if test "x$HAVE_NULL" != x1 ; then
AC_MSG_ERROR([*** Null output selected for builtin driver, but not enabled. ***])
@@ -526,6 +574,7 @@ case "x$with_builtin" in
BUILTIN_NULL=1
HAVE_PULSE=0
+ HAVE_SNDIO=0
HAVE_ALSA=0
HAVE_OSS=0
HAVE_GSTREAMER=0
@@ -541,7 +590,7 @@ case "x$with_builtin" in
AC_MSG_ERROR([*** Unknown driver $with_builtin selected for builtin ***])
esac
-if test "x$HAVE_PULSE" != x1 -a "x$HAVE_ALSA" != x1 -a "x$HAVE_OSS" != x1 -a "x$HAVE_GSTREAMER" != x1 -a "x$HAVE_NULL" != x1 ; then
+if test "x$HAVE_PULSE" != x1 -a "x$HAVE_ALSA" != x1 -a "x$HAVE_OSS" != x1 -a "x$HAVE_SNDIO" != x1 -a "x$HAVE_GSTREAMER" != x1 -a "x$HAVE_NULL" != x1 ; then
AC_MSG_ERROR([*** No backend enabled. ***])
fi
@@ -549,23 +598,27 @@ AC_SUBST(HAVE_DSO)
AC_SUBST(HAVE_PULSE)
AC_SUBST(HAVE_ALSA)
AC_SUBST(HAVE_OSS)
+AC_SUBST(HAVE_SNDIO)
AC_SUBST(HAVE_GSTREAMER)
AC_SUBST(HAVE_NULL)
AC_SUBST(BUILTIN_DSO)
AC_SUBST(BUILTIN_PULSE)
AC_SUBST(BUILTIN_ALSA)
AC_SUBST(BUILTIN_OSS)
+AC_SUBST(BUILTIN_SNDIO)
AC_SUBST(BUILTIN_GSTREAMER)
AC_SUBST(BUILTIN_NULL)
AM_CONDITIONAL([HAVE_PULSE], [test "x$HAVE_PULSE" = x1])
AM_CONDITIONAL([HAVE_ALSA], [test "x$HAVE_ALSA" = x1])
AM_CONDITIONAL([HAVE_OSS], [test "x$HAVE_OSS" = x1])
+AM_CONDITIONAL([HAVE_SNDIO], [test "x$HAVE_SNDIO" = x1])
AM_CONDITIONAL([HAVE_GSTREAMER], [test "x$HAVE_GSTREAMER" = x1])
AM_CONDITIONAL([HAVE_NULL], [test "x$HAVE_NULL" = x1])
AM_CONDITIONAL([BUILTIN_DSO], [test "x$BUILTIN_DSO" = x1])
AM_CONDITIONAL([BUILTIN_PULSE], [test "x$BUILTIN_PULSE" = x1])
AM_CONDITIONAL([BUILTIN_ALSA], [test "x$BUILTIN_ALSA" = x1])
AM_CONDITIONAL([BUILTIN_OSS], [test "x$BUILTIN_OSS" = x1])
+AM_CONDITIONAL([BUILTIN_SNDIO], [test "x$BUILTIN_SNDIO" = x1])
AM_CONDITIONAL([BUILTIN_GSTREAMER], [test "x$BUILTIN_GSTREAMER" = x1])
AM_CONDITIONAL([BUILTIN_NULL], [test "x$BUILTIN_NULL" = x1])
@@ -623,6 +676,15 @@ if test "x$BUILTIN_OSS" = "x1" ; then
ENABLE_BUILTIN_OSS=yes
fi
+ENABLE_SNDIO=no
+if test "x$HAVE_SNDIO" = "x1" ; then
+ ENABLE_SNDIO=yes
+fi
+ENABLE_BUILTIN_SNDIO=no
+if test "x$BUILTIN_SNDIO" = "x1" ; then
+ ENABLE_BUILTIN_SNDIO=yes
+fi
+
ENABLE_GSTREAMER=no
if test "x$HAVE_GSTREAMER" = "x1" ; then
ENABLE_GSTREAMER=yes
@@ -673,6 +735,8 @@ echo "
Builtin ALSA: ${ENABLE_BUILTIN_ALSA}
Enable OSS: ${ENABLE_OSS}
Builtin OSS: ${ENABLE_BUILTIN_OSS}
+ Enable SNDIO: ${ENABLE_SNDIO}
+ Builtin SNDIO: ${ENABLE_BUILTIN_SNDIO}
Enable GStreamer: ${ENABLE_GSTREAMER}
Builtin GStreamer: ${ENABLE_BUILTIN_GSTREAMER}
Enable Null Output: ${ENABLE_NULL}