- dnl needed for NetBSD
- dnl FIXME: conditionalize on NetBSD platform
- dnl AC_HAVE_LIBRARY(ossaudio,[],[succeeded=no])
-
- AC_CHECK_HEADER(sys/soundcard.h,[],[succeeded=no])
- if test $succeeded = yes; then
+ dnl If execution gets to here, $passed will be:
+ dnl with : if the --with code didn't error out
+ dnl yes : if the --enable code passed muster and all dependencies are met
+ dnl no : otherwise
+ if test $passed = yes; then
+ dnl Make sure the correct library and/or headers are available.
+ case $host_os in
+ netbsd*)
+ AC_HAVE_LIBRARY(ossaudio,[],
+ [passed=no;AC_MSG_RESULT([gr-audio-oss requires library ossaudio, not found.])])
+ if test $passed != no; then
+ OSS_LIBS=-lossaudio
+ AC_SUBST(OSS_LIBS)
+ AC_MSG_RESULT([Using OSS library $OSS_LIBS])
+ fi
+ ;;
+ darwin*)
+ dnl OSX / Darwin can't use OSS
+ passed=no
+ ;;
+ *)
+ AC_CHECK_HEADER(sys/soundcard.h,[],
+ [passed=no;AC_MSG_RESULT([gr-audio-oss requires sys/soundcard.h, not found.])])
+ esac
+ fi