X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=configure.ac;h=bc1d5ac91356f017977b5fbe54178eac95afdfe5;hb=HEAD;hp=33634a0214f88e9c8bb044c4ce0e587ab68b38af;hpb=598a21f4114a4d49e4403215448ff4156778c616;p=rtaudio-cdist.git diff --git a/configure.ac b/configure.ac index 33634a0..bc1d5ac 100644 --- a/configure.ac +++ b/configure.ac @@ -38,9 +38,9 @@ use_asio="" # configure flags AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],[enable various debug output])]) -AC_ARG_WITH(jack, [AS_HELP_STRING([--with-jack], [choose JACK server support (mac and linux only)])]) +AC_ARG_WITH(jack, [AS_HELP_STRING([--with-jack], [choose JACK server support])]) AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa], [choose native ALSA API support (linux only)])]) -AC_ARG_WITH(pulse, [AS_HELP_STRING([--with-pulse], [choose PulseAudio API support (linux only)])]) +AC_ARG_WITH(pulse, [AS_HELP_STRING([--with-pulse], [choose PulseAudio API support (unixes)])]) AC_ARG_WITH(oss, [AS_HELP_STRING([--with-oss], [choose OSS API support (unixes)])]) AC_ARG_WITH(core, [AS_HELP_STRING([--with-core], [choose CoreAudio API support (mac only)])]) AC_ARG_WITH(asio, [AS_HELP_STRING([--with-asio], [choose ASIO API support (win32 only)])]) @@ -86,8 +86,8 @@ AC_CHECK_HEADERS(sys/ioctl.h unistd.h) AS_IF([test "x${GXX}" = "xyes" ], [ CXXFLAGS="-Wall -Wextra ${CXXFLAGS}" AS_IF([ test "x${enable_debug}" = "xyes" ], [ - # Add -Werror in debug mode - CXXFLAGS="-Werror ${CXXFLAGS}" + # Add -Werror in debug mode (except unused-function) + CXXFLAGS="-Werror -Wno-error=unused-function ${CXXFLAGS}" ], [ # hide private symbols in non-debug mode visibility="-fvisibility=hidden" @@ -119,7 +119,7 @@ AS_IF([test "x$debugflags" != x], # Checks for functions -AC_CHECK_FUNC(gettimeofday, [cppflag="$cppflag -DHAVE_GETTIMEOFDAY"], ) +AC_CHECK_FUNCS(gettimeofday) # Checks for doxygen AC_CHECK_PROG( DOXYGEN, [doxygen], [doxygen] ) @@ -154,7 +154,7 @@ AS_IF([test "x$with_pulse" = "xyes"], [systems="$systems pulse"]) AS_IF([test "x$with_oss" = "xyes"], [systems="$systems oss"]) AS_IF([test "x$with_core" = "xyes"], [systems="$systems core"]) AS_IF([test "x$with_asio" = "xyes"], [systems="$systems asio"]) -AS_IF([test "x$with_dsound" = "xyes"], [systems="$systems ds"]) +AS_IF([test "x$with_dsound" = "xyes"], [systems="$systems dsound"]) AS_IF([test "x$with_wasapi" = "xyes"], [systems="$systems wasapi"]) required=" $systems " @@ -166,7 +166,9 @@ AS_IF([test "x$systems" = "x"], [*-*-freebsd*], [systems="oss"], [*-*-linux*], [systems="alsa pulse jack oss"], [*-apple*], [systems="core jack"], - [*-mingw32*], [systems="asio ds wasapi jack"] + [*-mingw32*], [systems="asio dsound wasapi jack"], + [*-mingw64*], [systems="asio dsound wasapi jack"], + [*-msys*], [systems="asio dsound wasapi jack"], )) # If any were specifically requested disabled, do it. @@ -258,8 +260,16 @@ AS_CASE(["$systems"], [*" asio "*], [ found="$found ASIO" ]) -AS_CASE(["$systems"], [*" ds "*], [ - AC_CHECK_HEADERS(mmsystem.h mmreg.h dsound.h, +AS_CASE(["$systems"], [*" dsound "*], [ + AC_CHECK_HEADERS(windows.h) + AC_CHECK_HEADERS(mmsystem.h mmreg.h dsound.h, [], [], +[#ifdef HAVE_WINDOWS_H +# include +#endif]) + AS_IF([test "x$ac_cv_header_windows_h" = xyes \ + && test "x$ac_cv_header_mmsystem_h" = xyes \ + && test "x$ac_cv_header_mmreg_h" = xyes \ + && test "x$ac_cv_header_dsound_h" = xyes], [api="$api -D__WINDOWS_DS__" need_ole32=yes found="$found DirectSound" @@ -267,12 +277,20 @@ AS_CASE(["$systems"], [*" ds "*], [ ]) AS_CASE(["$systems"], [*" wasapi "*], [ - AC_CHECK_HEADERS(windows.h audioclient.h avrt.h mmdeviceapi.h, + AC_CHECK_HEADERS(windows.h) + AC_CHECK_HEADERS(audioclient.h avrt.h mmdeviceapi.h, [], [], +[#ifdef HAVE_WINDOWS_H +# include +#endif]) + AS_IF([test "x$ac_cv_header_windows_h" = xyes \ + && test "x$ac_cv_header_audioclient_h" = xyes \ + && test "x$ac_cv_header_avrt_h" = xyes \ + && test "x$ac_cv_header_mmdeviceapi_h" = xyes], [api="$api -D__WINDOWS_WASAPI__" CPPFLAGS="-I$srcdir/include $CPPFLAGS" need_ole32=yes found="$found WASAPI" - LIBS="-lwinmm -luuid -lksuser $LIBS"]) + LIBS="-lwinmm -lksuser -lmfplat -lmfuuid -lwmcodecdspuuid $LIBS"]) ]) AS_IF([test -n "$need_ole32"], [LIBS="-lole32 $LIBS"]) @@ -287,7 +305,7 @@ AC_MSG_CHECKING([for audio API]) # Error case: no known realtime systems found. AS_IF([test x"$api" = "x"], [ AC_MSG_RESULT([none]) - AC_MSG_ERROR([Unknown system type for realtime support!]) + AC_MSG_ERROR([No known system type found for realtime support!]) ], [ AC_MSG_RESULT([$found]) ])