+AC_ARG_WITH([alsa],
+ [AS_HELP_STRING([--without-alsa],
+ [do not build with ALSA support])],
+ [want_alsa=$withval])
+AC_ARG_WITH([oss],
+ [AS_HELP_STRING([--without-oss],
+ [do not build with OSS support])],
+ [want_oss=$withval])
+AC_ARG_WITH([coreaudio],
+ [AS_HELP_STRING([--without-coreaudio],
+ [do not build with Core Audio support])],
+ [want_coreaudio=$withval])
+
+AC_MSG_CHECKING([for a known target platform])
+case "$host" in
+*empeg* )
+ AC_MSG_RESULT([empeg car stereo])
+ AC_DEFINE([EMPEG_HOST],[1],[define if host is an empeg car stereo])
+ # work around broken toolchain
+ AC_CHECK_LIB([gpg-error], [gpg_strerror])
+ AC_CHECK_LIB([pthread], [pthread_create])
+ want_server=no
+ ;;
+*linux* | *Linux* )
+ AC_MSG_RESULT([Linux])
+ want_server=yes
+ ;;
+*-apple-darwin* )
+ AC_MSG_RESULT([Mac OS X])
+ want_server=yes
+ if test $want_coreaudio = yes; then
+ COREAUDIO="-framework CoreAudio"
+ fi
+ ;;
+* )
+ AC_MSG_RESULT([unknown, winging it])
+ want_server=no
+ ;;
+esac
+AC_SUBST([COREAUDIO])
+