summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-20 20:34:43 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-20 20:35:06 +0100
commit56650db1e4d6f39d11167c308b23e70507b05a5c (patch)
treec50916ed257a6509e1b52849f182ef58a5fc285f /configure.ac
parent2de981752d99dfb192a765a770fee3aab46ecaea (diff)
oss build fixes
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac57
1 files changed, 20 insertions, 37 deletions
diff --git a/configure.ac b/configure.ac
index 49073c8c..f51d527a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,7 +39,7 @@ dnl INSANE_CFLAGS="-Wcomment -Wchar-subscripts -Wunused-function -Wunused-value
dnl INSANE_CXXFLAGS="-Wcomment -Wchar-subscripts -Wunused-function -Wunused-value -Wuninitialized -Wtype-limits"
CXXFLAGS="$CXXFLAGS $INSANE_CXXFLAGS -D_GNU_SOURCE -DLIBDIR=\\\"$libdir\\\" -DPREFIX=\\\"$prefix\\\" -DDOCDIR=\\\"$docdir\\\""
-CFLAGS="$CFLAGS $INSANE_CFLAGS -D_GNU_SOURCE -DLIBDIR=\\\"$libdir\\\" -DPREFIX=\\\"$prefix\\\" -DDOCDIR=\\\"$docdir\\\""
+CFLAGS="$CFLAGS $INSANE_CFLAGS -D_GNU_SOURCE -DLIBDIR=\\\"$libdir\\\" -DPREFIX=\\\"$prefix\\\" -DDOCDIR=\\\"$docdir\\\" -std=c99"
PKG_CHECK_MODULES(DEPS, samplerate)
PKG_CHECK_MODULES(GTKUI_DEPS, gtk+-2.0 >= 2.12 gthread-2.0 glib-2.0, HAVE_GTK=1, NO_GTK=1)
@@ -187,57 +187,40 @@ if test -f "/etc/oss.conf" ; then
if test "x$i" != "x$t" ; then
if test -f "$t/include/sys/soundcard.h" -o -f "$i/include/soundcard.h" ; then
OSS4_CFLAGS="-I$t/include"
+ AC_MSG_RESULT([$OSS4_CFLAGS])
+ have_oss4=yes
fi
fi
done
-fi
-if test -n "$OSS4_CFLAGS" ; then
- AC_MSG_RESULT([$OSS4_CFLAGS])
else
AC_MSG_RESULT([not found])
fi
-CFLAGS_save=$CFLAGS
-CFLAGS="$CFLAGS $OSS4_CFLAGS"
-AC_CHECK_HEADERS(soundcard.h)
-AC_CHECK_HEADERS(sys/soundcard.h)
-AC_CHECK_HEADERS(machine/soundcard.h)
-CFLAGS=$CFLAGS_save
-
-if test "x${ac_cv_header_soundcard_h}" = "xyes" || test "x${ac_cv_header_sys_soundcard_h}" = "xyes" || test "x${ac_cv_header_machine_soundcard_h}" = "xyes"; then
- have_oss4=yes
-fi
-if test "x${have_oss4}" = "xyes"; then
-AC_MSG_CHECKING(whether we need -lossaudio)
- AC_TRY_LINK([
- #include <sys/ioctl.h>
- #ifdef HAVE_SYS_SOUNDCARD_H
- #include <sys/soundcard.h>
- #else
- #include <soundcard.h>
- #endif
- ], [
- int fd, value;
- ioctl(fd, SOUND_MIXER_READ_VOLUME, &value);
-], AC_MSG_RESULT(no), [
- OSS4_LIBS="-lossaudio"
- AC_MSG_RESULT(yes)
- ])
+if test "x$have_oss4" != "xyes"; then
+ AC_MSG_CHECKING(for /usr/include/sys/soundcard.h)
+ AC_CHECK_HEADERS(sys/soundcard.h)
+ if test "x${ac_cv_header_sys_soundcard_h}" = "xyes" ; then
+ have_oss4=yes
+ AC_MSG_RESULT([found])
+ else
+ AC_MSG_RESULT([not found])
+ fi
fi
-if test "x$have_oss4" = "xyes"; then
- AC_DEFINE(HAVE_OSS4, 1, [Define if the OSS4 output plugin should be built])
-else
- have_oss4=no
-fi
if test "x$have_oss4" = "xyes"; then
OSS4_DIR="plugins/oss"
AC_SUBST(OSS4_CFLAGS)
AC_SUBST(OSS4_DIR)
- AC_SUBST(OSS4_LIBS)
fi
+echo
+echo "have_oss4=$have_oss4"
+echo "OSS4_CFLAGS=$OSS4_CFLAGS"
+echo "OSS4_LIBS=$OSS4_LIBS"
+echo "OSS4_DIR=$OSS4_DIR"
+echo
+
dnl print summary
echo
@@ -274,7 +257,7 @@ dnl PRINT_PLUGIN_INFO([faad2],[aac/mp4 player],[test $HAVE_FAAD && test $HAVE_MP
PRINT_PLUGIN_INFO([cdda],[cd audio player],[test $HAVE_CDIO && test $HAVE_CDDB])
PRINT_PLUGIN_INFO([gtkui],[GTK user interface],[test $HAVE_GTK])
PRINT_PLUGIN_INFO([ffmpeg],[ffmpeg codecs],[test $HAVE_FFMPEG])
-PRINT_PLUGIN_INFO([oss],[oss4 output plugin],[test "x$have_oss"="xyes"])
+PRINT_PLUGIN_INFO([oss],[oss4 output plugin],[test "x$have_oss4" = "xyes"])
echo
AC_OUTPUT([