+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
+ browser=open
+ ;;
+* )
+ AC_MSG_RESULT([unknown, winging it])
+ want_server=no
+ ;;
+esac
+AC_SUBST([COREAUDIO])
+
+AC_ARG_WITH([browser],
+ [AS_HELP_STRING([--with-browser=BROWSER],
+ [use BROWSER to display HTML])],
+ [browser=$withval])
+
+AC_CACHE_CHECK([default HTML viewer],[rjk_cv_browser],[
+ rjk_cv_browser=UNKNOWN
+ for candidate in x-www-browser firefox mozilla konqueror netscape; do
+ if type $candidate >/dev/null 2>&1; then
+ rjk_cv_browser="$candidate"
+ break
+ fi
+ done
+])
+if test -z "$browser"; then
+ browser="$rjk_cv_browser"
+fi
+AC_DEFINE_UNQUOTED([BROWSER],["$browser"],[HTML viewer])
+