Chris@39: dnl Chris@39: dnl portaudio V19 configure.in script Chris@39: dnl Chris@39: dnl Dominic Mazzoni, Arve Knudsen, Stelios Bounanos Chris@39: dnl Chris@39: Chris@39: dnl Require autoconf >= 2.13 Chris@39: AC_PREREQ(2.13) Chris@39: Chris@39: dnl Init autoconf and make sure configure is being called Chris@39: dnl from the right directory Chris@39: AC_INIT([include/portaudio.h]) Chris@39: Chris@39: dnl Define build, build_cpu, build_vendor, build_os Chris@39: AC_CANONICAL_BUILD Chris@39: dnl Define host, host_cpu, host_vendor, host_os Chris@39: AC_CANONICAL_HOST Chris@39: dnl Define target, target_cpu, target_vendor, target_os Chris@39: AC_CANONICAL_TARGET Chris@39: Chris@39: dnl Specify options Chris@39: Chris@39: AC_ARG_WITH(alsa, Chris@39: AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]), Chris@39: [with_alsa=$withval]) Chris@39: Chris@39: AC_ARG_WITH(jack, Chris@39: AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]), Chris@39: [with_jack=$withval]) Chris@39: Chris@39: AC_ARG_WITH(oss, Chris@39: AS_HELP_STRING([--with-oss], [Enable support for OSS @<:@autodetect@:>@]), Chris@39: [with_oss=$withval]) Chris@39: Chris@39: AC_ARG_WITH(asihpi, Chris@39: AS_HELP_STRING([--with-asihpi], [Enable support for ASIHPI @<:@autodetect@:>@]), Chris@39: [with_asihpi=$withval]) Chris@39: Chris@39: AC_ARG_WITH(winapi, Chris@39: AS_HELP_STRING([--with-winapi], Chris@39: [Select Windows API support (@<:@wmme|directx|asio|wasapi|wdmks@:>@@<:@,...@:>@) @<:@wmme@:>@]), Chris@39: [with_winapi=$withval], [with_winapi="wmme"]) Chris@39: case "$target_os" in *mingw* | *cygwin*) Chris@39: with_wmme=no Chris@39: with_directx=no Chris@39: with_asio=no Chris@39: with_wasapi=no Chris@39: with_wdmks=no Chris@39: for api in $(echo $with_winapi | sed 's/,/ /g'); do Chris@39: case "$api" in Chris@39: wmme|directx|asio|wasapi|wdmks) Chris@39: eval with_$api=yes Chris@39: ;; Chris@39: *) Chris@39: AC_MSG_ERROR([unknown Windows API \"$api\" (do you need --help?)]) Chris@39: ;; Chris@39: esac Chris@39: done Chris@39: ;; Chris@39: esac Chris@39: Chris@39: AC_ARG_WITH(asiodir, Chris@39: AS_HELP_STRING([--with-asiodir], [ASIO directory @<:@/usr/local/asiosdk2@:>@]), Chris@39: with_asiodir=$withval, with_asiodir="/usr/local/asiosdk2") Chris@39: Chris@39: AC_ARG_WITH(dxdir, Chris@39: AS_HELP_STRING([--with-dxdir], [DirectX directory @<:@/usr/local/dx7sdk@:>@]), Chris@39: with_dxdir=$withval, with_dxdir="/usr/local/dx7sdk") Chris@39: Chris@39: debug_output=no Chris@39: AC_ARG_ENABLE(debug-output, Chris@39: AS_HELP_STRING([--enable-debug-output], [Enable debug output @<:@no@:>@]), Chris@39: [if test "x$enableval" != "xno" ; then Chris@39: AC_DEFINE(PA_ENABLE_DEBUG_OUTPUT,,[Enable debugging messages]) Chris@39: debug_output=yes Chris@39: fi Chris@39: ]) Chris@39: Chris@39: AC_ARG_ENABLE(cxx, Chris@39: AS_HELP_STRING([--enable-cxx], [Enable C++ bindings @<:@no@:>@]), Chris@39: enable_cxx=$enableval, enable_cxx="no") Chris@39: Chris@39: AC_ARG_ENABLE(mac-debug, Chris@39: AS_HELP_STRING([--enable-mac-debug], [Enable Mac debug @<:@no@:>@]), Chris@39: enable_mac_debug=$enableval, enable_mac_debug="no") Chris@39: Chris@39: AC_ARG_ENABLE(mac-universal, Chris@39: AS_HELP_STRING([--enable-mac-universal], [Build Mac universal binaries @<:@yes@:>@]), Chris@39: enable_mac_universal=$enableval, enable_mac_universal="yes") Chris@39: Chris@39: dnl Continue to accept --host_os for compatibility but do not document Chris@39: dnl it (the correct way to change host_os is with --host=...). Moved Chris@39: dnl here because the empty help string generates a blank line which we Chris@39: dnl can use to separate PA options from libtool options. Chris@39: AC_ARG_WITH(host_os, [], host_os=$withval) Chris@39: Chris@39: dnl Checks for programs. Chris@39: Chris@39: AC_PROG_CC Chris@39: dnl ASIO and CXX bindings need a C++ compiler Chris@39: if [[ "$with_asio" = "yes" ] || [ "$enable_cxx" = "yes" ]] ; then Chris@39: AC_PROG_CXX Chris@39: fi Chris@39: AC_LIBTOOL_WIN32_DLL Chris@39: AC_PROG_LIBTOOL Chris@39: AC_PROG_INSTALL Chris@39: AC_PROG_LN_S Chris@39: AC_PATH_PROG(AR, ar, no) Chris@39: if [[ $AR = "no" ]] ; then Chris@39: AC_MSG_ERROR("Could not find ar - needed to create a library") Chris@39: fi Chris@39: Chris@39: dnl This must be one of the first tests we do or it will fail... Chris@39: AC_C_BIGENDIAN Chris@39: Chris@39: dnl checks for various host APIs and arguments to configure that Chris@39: dnl turn them on or off Chris@39: Chris@39: have_alsa=no Chris@39: if test "x$with_alsa" != "xno"; then Chris@39: AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no) Chris@39: fi Chris@39: have_asihpi=no Chris@39: if test "x$with_asihpi" != "xno"; then Chris@39: AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm) Chris@39: fi Chris@39: have_libossaudio=no Chris@39: have_oss=no Chris@39: if test "x$with_oss" != "xno"; then Chris@39: AC_CHECK_HEADERS([sys/soundcard.h linux/soundcard.h machine/soundcard.h], [have_oss=yes]) Chris@39: if test "x$have_oss" = "xyes"; then Chris@39: AC_CHECK_LIB(ossaudio, _oss_ioctl, have_libossaudio=yes, have_libossaudio=no) Chris@39: fi Chris@39: fi Chris@39: have_jack=no Chris@39: if test "x$with_jack" != "xno"; then Chris@39: PKG_CHECK_MODULES(JACK, jack, have_jack=yes, have_jack=no) Chris@39: fi Chris@39: Chris@39: Chris@39: dnl sizeof checks: we will need a 16-bit and a 32-bit type Chris@39: Chris@39: AC_CHECK_SIZEOF(short) Chris@39: AC_CHECK_SIZEOF(int) Chris@39: AC_CHECK_SIZEOF(long) Chris@39: Chris@39: save_LIBS="${LIBS}" Chris@39: AC_CHECK_LIB(rt, clock_gettime, [rt_libs=" -lrt"]) Chris@39: LIBS="${LIBS}${rt_libs}" Chris@39: DLL_LIBS="${DLL_LIBS}${rt_libs}" Chris@39: AC_CHECK_FUNCS([clock_gettime nanosleep]) Chris@39: LIBS="${save_LIBS}" Chris@39: Chris@39: dnl LT_RELEASE=19 Chris@39: LT_CURRENT=2 Chris@39: LT_REVISION=0 Chris@39: LT_AGE=0 Chris@39: Chris@39: AC_SUBST(LT_CURRENT) Chris@39: AC_SUBST(LT_REVISION) Chris@39: AC_SUBST(LT_AGE) Chris@39: Chris@39: dnl extra variables Chris@39: AC_SUBST(OTHER_OBJS) Chris@39: AC_SUBST(PADLL) Chris@39: AC_SUBST(SHARED_FLAGS) Chris@39: AC_SUBST(THREAD_CFLAGS) Chris@39: AC_SUBST(DLL_LIBS) Chris@39: AC_SUBST(CXXFLAGS) Chris@39: AC_SUBST(NASM) Chris@39: AC_SUBST(NASMOPT) Chris@39: AC_SUBST(INCLUDES) Chris@39: Chris@39: dnl -g is optional on darwin Chris@39: if ( echo "${host_os}" | grep ^darwin >> /dev/null ) && Chris@39: [[ "$enable_mac_universal" = "yes" ] && Chris@39: [ "$enable_mac_debug" != "yes" ]] ; then Chris@39: CFLAGS="-O2 -Wall -pedantic -pipe -fPIC -DNDEBUG" Chris@39: else Chris@39: CFLAGS=${CFLAGS:-"-g -O2 -Wall -pedantic -pipe -fPIC"} Chris@39: fi Chris@39: Chris@39: if [[ $ac_cv_c_bigendian = "yes" ]] ; then Chris@39: CFLAGS="$CFLAGS -DPA_BIG_ENDIAN" Chris@39: else Chris@39: CFLAGS="$CFLAGS -DPA_LITTLE_ENDIAN" Chris@39: fi Chris@39: Chris@39: add_objects() Chris@39: { Chris@39: for o in $@; do Chris@39: test "${OTHER_OBJS#*${o}*}" = "${OTHER_OBJS}" && OTHER_OBJS="$OTHER_OBJS $o" Chris@39: done Chris@39: } Chris@39: Chris@39: INCLUDES=portaudio.h Chris@39: Chris@39: dnl Include directories needed by all implementations Chris@39: CFLAGS="$CFLAGS -I\$(top_srcdir)/include -I\$(top_srcdir)/src/common" Chris@39: Chris@39: case "${host_os}" in Chris@39: darwin* ) Chris@39: dnl Mac OS X configuration Chris@39: Chris@39: AC_DEFINE(PA_USE_COREAUDIO,1) Chris@39: Chris@39: CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Werror" Chris@39: LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon" Chris@39: Chris@39: if test "x$enable_mac_universal" = "xyes" ; then Chris@39: case `xcodebuild -version | sed -n 's/Xcode \(.*\)/\1/p'` in Chris@39: Chris@39: [12]*|3.0|3.1) Chris@39: dnl In pre-3.2 versions of Xcode, xcodebuild doesn't Chris@39: dnl support -sdk, so we can't use that to look for Chris@39: dnl SDKs. However, in those versions of Xcode, the Chris@39: dnl SDKs are under /Developer/SDKs, so we can just look Chris@39: dnl there. Also, we assume they had no SDKs later Chris@39: dnl than 10.5, as 3.2 was the version that came with Chris@39: dnl 10.6, at least if the Wikipedia page for Xcode Chris@39: dnl is to be believed. Chris@39: if [[ -d /Developer/SDKs/MacOSX10.5.sdk ]] ; then Chris@39: mac_version_min="-mmacosx-version-min=10.3" Chris@39: mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk" Chris@39: else Chris@39: mac_version_min="-mmacosx-version-min=10.3" Chris@39: mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" Chris@39: fi Chris@39: ;; Chris@39: Chris@39: *) Chris@39: dnl In 3.2 and later, xcodebuild supports -sdk, and, in Chris@39: dnl 4.3 and later, the SDKs aren't under /Developer/SDKs Chris@39: dnl as there *is* no /Developer, so we use -sdk to check Chris@39: dnl what SDKs are available and to get the full path of Chris@39: dnl the SDKs. Chris@39: if xcodebuild -version -sdk macosx10.5 Path >/dev/null 2>&1 ; then Chris@39: mac_version_min="-mmacosx-version-min=10.3" Chris@39: mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.5 Path`" Chris@39: elif xcodebuild -version -sdk macosx10.6 Path >/dev/null 2>&1 ; then Chris@39: mac_version_min="-mmacosx-version-min=10.4" Chris@39: mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.6 Path`" Chris@39: elif xcodebuild -version -sdk macosx10.7 Path >/dev/null 2>&1 ; then Chris@39: mac_version_min="-mmacosx-version-min=10.4" Chris@39: mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.7 Path`" Chris@39: elif xcodebuild -version -sdk macosx10.8 Path >/dev/null 2>&1 ; then Chris@39: mac_version_min="-mmacosx-version-min=10.4" Chris@39: mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.8 Path`" Chris@39: elif xcodebuild -version -sdk macosx10.9 Path >/dev/null 2>&1 ; then Chris@39: mac_version_min="-mmacosx-version-min=10.4" Chris@39: mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.9 Path`" Chris@39: else Chris@39: AC_MSG_ERROR([Couldn't find 10.5, 10.6, 10.7, 10.8 or 10.9 SDK]) Chris@39: fi Chris@39: esac Chris@39: Chris@39: dnl Pick which architectures to build for based on what Chris@39: dnl the compiler supports. Chris@39: mac_arches="" Chris@39: for arch in i386 x86_64 ppc ppc64 Chris@39: do Chris@39: save_CFLAGS="$CFLAGS" Chris@39: CFLAGS="$CFLAGS -arch $arch" Chris@39: AC_TRY_COMPILE([], [return 0;], Chris@39: [ Chris@39: if [[ -z "$mac_arches" ]] ; then Chris@39: mac_arches="-arch $arch" Chris@39: else Chris@39: mac_arches="$mac_arches -arch $arch" Chris@39: fi Chris@39: ]) Chris@39: CFLAGS="$save_CFLAGS" Chris@39: done Chris@39: else Chris@39: mac_arches="" Chris@39: mac_sysroot="" Chris@39: mac_version="" Chris@39: fi Chris@39: SHARED_FLAGS="$LIBS -dynamiclib $mac_arches $mac_sysroot $mac_version_min" Chris@39: CFLAGS="-std=c99 $CFLAGS $mac_arches $mac_sysroot $mac_version_min" Chris@39: OTHER_OBJS="src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o src/hostapi/coreaudio/pa_mac_core.o src/hostapi/coreaudio/pa_mac_core_utilities.o src/hostapi/coreaudio/pa_mac_core_blocking.o src/common/pa_ringbuffer.o" Chris@39: PADLL="libportaudio.dylib" Chris@39: ;; Chris@39: Chris@39: mingw* ) Chris@39: dnl MingW configuration Chris@39: Chris@39: PADLL="portaudio.dll" Chris@39: THREAD_CFLAGS="-mthreads" Chris@39: SHARED_FLAGS="-shared" Chris@39: CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/win -DPA_USE_WMME=0 -DPA_USE_ASIO=0 -DPA_USE_WDMKS=0 -DPA_USE_DS=0 -DPA_USE_WASAPI=0" Chris@39: Chris@39: if [[ "x$with_directx" = "xyes" ]]; then Chris@39: DXDIR="$with_dxdir" Chris@39: add_objects src/hostapi/dsound/pa_win_ds.o src/hostapi/dsound/pa_win_ds_dynlink.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/os/win/pa_win_waveformat.o Chris@39: LIBS="${LIBS} -lwinmm -lm -ldsound -lole32" Chris@39: DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -ldsound -lole32" Chris@39: #VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\"" Chris@39: #CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO" Chris@39: CFLAGS="$CFLAGS -I$DXDIR/include -UPA_USE_DS -DPA_USE_DS=1" Chris@39: fi Chris@39: Chris@39: if [[ "x$with_asio" = "xyes" ]]; then Chris@39: ASIODIR="$with_asiodir" Chris@39: add_objects src/hostapi/asio/pa_asio.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/hostapi/asio/iasiothiscallresolver.o $ASIODIR/common/asio.o $ASIODIR/host/asiodrivers.o $ASIODIR/host/pc/asiolist.o Chris@39: LIBS="${LIBS} -lwinmm -lm -lole32 -luuid" Chris@39: DLL_LIBS="${DLL_LIBS} -lwinmm -lm -lole32 -luuid" Chris@39: CFLAGS="$CFLAGS -ffast-math -fomit-frame-pointer -I\$(top_srcdir)/src/hostapi/asio -I$ASIODIR/host/pc -I$ASIODIR/common -I$ASIODIR/host -UPA_USE_ASIO -DPA_USE_ASIO=1 -DWINDOWS" Chris@39: Chris@39: dnl Setting the windows version flags below resolves a conflict between Interlocked* Chris@39: dnl definitions in mingw winbase.h and Interlocked* hacks in ASIO SDK combase.h Chris@39: dnl combase.h is included by asiodrvr.h Chris@39: dnl PortAudio does not actually require Win XP (winver 501) APIs Chris@39: CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501" Chris@39: Chris@39: CXXFLAGS="$CFLAGS" Chris@39: fi Chris@39: Chris@39: if [[ "x$with_wdmks" = "xyes" ]]; then Chris@39: DXDIR="$with_dxdir" Chris@39: add_objects src/hostapi/wdmks/pa_win_wdmks.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_wdmks_util.o src/os/win/pa_win_waveformat.o Chris@39: LIBS="${LIBS} -lwinmm -lm -luuid -lsetupapi -lole32" Chris@39: DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32" Chris@39: #VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\"" Chris@39: #CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO" Chris@39: CFLAGS="$CFLAGS -I$DXDIR/include -UPA_USE_WDMKS -DPA_USE_WDMKS=1" Chris@39: fi Chris@39: Chris@39: if [[ "x$with_wmme" = "xyes" ]]; then Chris@39: add_objects src/hostapi/wmme/pa_win_wmme.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_waveformat.o Chris@39: LIBS="${LIBS} -lwinmm -lm -lole32 -luuid" Chris@39: DLL_LIBS="${DLL_LIBS} -lwinmm" Chris@39: CFLAGS="$CFLAGS -UPA_USE_WMME -DPA_USE_WMME=1" Chris@39: fi Chris@39: Chris@39: if [[ "x$with_wasapi" = "xyes" ]]; then Chris@39: add_objects src/hostapi/wasapi/pa_win_wasapi.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_coinitialize.o src/os/win/pa_win_waveformat.o Chris@39: LIBS="${LIBS} -lwinmm -lm -lole32 -luuid" Chris@39: DLL_LIBS="${DLL_LIBS} -lwinmm -lole32" Chris@39: CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hostapi/wasapi/mingw-include -UPA_USE_WASAPI -DPA_USE_WASAPI=1" Chris@39: fi Chris@39: ;; Chris@39: Chris@39: cygwin* ) Chris@39: dnl Cygwin configuration Chris@39: Chris@39: OTHER_OBJS="src/hostapi/wmme/pa_win_wmme.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_waveformat.o" Chris@39: CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/win -DPA_USE_DS=0 -DPA_USE_WDMKS=0 -DPA_USE_ASIO=0 -DPA_USE_WASAPI=0 -DPA_USE_WMME=1" Chris@39: LIBS="-lwinmm -lm" Chris@39: PADLL="portaudio.dll" Chris@39: THREAD_CFLAGS="-mthreads" Chris@39: SHARED_FLAGS="-shared" Chris@39: DLL_LIBS="${DLL_LIBS} -lwinmm" Chris@39: ;; Chris@39: Chris@39: irix* ) Chris@39: dnl SGI IRIX audio library (AL) configuration (Pieter, oct 2-13, 2003). Chris@39: dnl The 'dmedia' library is needed to read the Unadjusted System Time (UST). Chris@39: dnl Chris@39: AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR([IRIX posix thread library not found!])) Chris@39: AC_CHECK_LIB(audio, alOpenPort, , AC_MSG_ERROR([IRIX audio library not found!])) Chris@39: AC_CHECK_LIB(dmedia, dmGetUST, , AC_MSG_ERROR([IRIX digital media library not found!])) Chris@39: Chris@39: dnl See the '#ifdef PA_USE_SGI' in file pa_unix/pa_unix_hostapis.c Chris@39: dnl which selects the appropriate PaXXX_Initialize() function. Chris@39: dnl Chris@39: AC_DEFINE(PA_USE_SGI,1) Chris@39: Chris@39: CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix" Chris@39: Chris@39: dnl The _REENTRANT option for pthread safety. Perhaps not necessary but it 'll do no harm. Chris@39: dnl Chris@39: THREAD_CFLAGS="-D_REENTRANT" Chris@39: Chris@39: OTHER_OBJS="pa_sgi/pa_sgi.o src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o" Chris@39: Chris@39: dnl SGI books say -lpthread should be the last of the libs mentioned. Chris@39: dnl Chris@39: LIBS="-lm -ldmedia -laudio -lpthread" Chris@39: PADLL="libportaudio.so" Chris@39: SHARED_FLAGS="" Chris@39: ;; Chris@39: Chris@39: *) Chris@39: dnl Unix configuration Chris@39: Chris@39: CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix" Chris@39: Chris@39: AC_CHECK_LIB(pthread, pthread_create,[have_pthread="yes"], Chris@39: AC_MSG_ERROR([libpthread not found!])) Chris@39: Chris@39: if [[ "$have_alsa" = "yes" ] && [ "$with_alsa" != "no" ]] ; then Chris@39: DLL_LIBS="$DLL_LIBS -lasound" Chris@39: LIBS="$LIBS -lasound" Chris@39: OTHER_OBJS="$OTHER_OBJS src/hostapi/alsa/pa_linux_alsa.o" Chris@39: INCLUDES="$INCLUDES pa_linux_alsa.h" Chris@39: AC_DEFINE(PA_USE_ALSA,1) Chris@39: fi Chris@39: Chris@39: if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then Chris@39: DLL_LIBS="$DLL_LIBS $JACK_LIBS" Chris@39: CFLAGS="$CFLAGS $JACK_CFLAGS" Chris@39: OTHER_OBJS="$OTHER_OBJS src/hostapi/jack/pa_jack.o src/common/pa_ringbuffer.o" Chris@39: INCLUDES="$INCLUDES pa_jack.h" Chris@39: AC_DEFINE(PA_USE_JACK,1) Chris@39: fi Chris@39: Chris@39: if [[ "$with_oss" != "no" ]] ; then Chris@39: OTHER_OBJS="$OTHER_OBJS src/hostapi/oss/pa_unix_oss.o" Chris@39: if [[ "$have_libossaudio" = "yes" ]] ; then Chris@39: DLL_LIBS="$DLL_LIBS -lossaudio" Chris@39: LIBS="$LIBS -lossaudio" Chris@39: fi Chris@39: AC_DEFINE(PA_USE_OSS,1) Chris@39: fi Chris@39: Chris@39: if [[ "$have_asihpi" = "yes" ] && [ "$with_asihpi" != "no" ]] ; then Chris@39: LIBS="$LIBS -lhpi" Chris@39: DLL_LIBS="$DLL_LIBS -lhpi" Chris@39: OTHER_OBJS="$OTHER_OBJS src/hostapi/asihpi/pa_linux_asihpi.o" Chris@39: AC_DEFINE(PA_USE_ASIHPI,1) Chris@39: fi Chris@39: Chris@39: DLL_LIBS="$DLL_LIBS -lm -lpthread" Chris@39: LIBS="$LIBS -lm -lpthread" Chris@39: PADLL="libportaudio.so" Chris@39: Chris@39: ## support sun cc compiler flags Chris@39: case "${host_os}" in Chris@39: solaris*) Chris@39: SHARED_FLAGS="-G" Chris@39: THREAD_CFLAGS="-mt" Chris@39: ;; Chris@39: *) Chris@39: SHARED_FLAGS="-fPIC" Chris@39: THREAD_CFLAGS="-pthread" Chris@39: ;; Chris@39: esac Chris@39: Chris@39: OTHER_OBJS="$OTHER_OBJS src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o" Chris@39: esac Chris@39: CFLAGS="$CFLAGS $THREAD_CFLAGS" Chris@39: Chris@39: test "$enable_shared" != "yes" && SHARED_FLAGS="" Chris@39: Chris@39: if test "$enable_cxx" = "yes"; then Chris@39: AC_CONFIG_SUBDIRS([bindings/cpp]) Chris@39: ENABLE_CXX_TRUE="" Chris@39: ENABLE_CXX_FALSE="#" Chris@39: else Chris@39: ENABLE_CXX_TRUE="#" Chris@39: ENABLE_CXX_FALSE="" Chris@39: fi Chris@39: AC_SUBST(ENABLE_CXX_TRUE) Chris@39: AC_SUBST(ENABLE_CXX_FALSE) Chris@39: Chris@39: if test "x$with_asio" = "xyes"; then Chris@39: WITH_ASIO_TRUE="" Chris@39: WITH_ASIO_FALSE="@ #" Chris@39: else Chris@39: WITH_ASIO_TRUE="@ #" Chris@39: WITH_ASIO_FALSE="" Chris@39: fi Chris@39: AC_SUBST(WITH_ASIO_TRUE) Chris@39: AC_SUBST(WITH_ASIO_FALSE) Chris@39: Chris@39: AC_OUTPUT([Makefile portaudio-2.0.pc]) Chris@39: Chris@39: AC_MSG_RESULT([ Chris@39: Configuration summary: Chris@39: Chris@39: Target ...................... $target Chris@39: C++ bindings ................ $enable_cxx Chris@39: Debug output ................ $debug_output]) Chris@39: Chris@39: case "$target_os" in *linux*) Chris@39: AC_MSG_RESULT([ Chris@39: ALSA ........................ $have_alsa Chris@39: ASIHPI ...................... $have_asihpi]) Chris@39: ;; Chris@39: esac Chris@39: case "$target_os" in Chris@39: *mingw* | *cygwin*) Chris@39: test "x$with_directx" = "xyes" && with_directx="$with_directx (${with_dxdir})" Chris@39: test "x$with_wdmks" = "xyes" && with_wdmks="$with_wdmks (${with_dxdir})" Chris@39: test "x$with_asio" = "xyes" && with_asio="$with_asio (${with_asiodir})" Chris@39: test "x$with_wasapi" = "xyes" Chris@39: AC_MSG_RESULT([ Chris@39: WMME ........................ $with_wmme Chris@39: DSound ...................... $with_directx Chris@39: ASIO ........................ $with_asio Chris@39: WASAPI ...................... $with_wasapi Chris@39: WDMKS ....................... $with_wdmks Chris@39: ]) Chris@39: ;; Chris@39: *darwin*) Chris@39: AC_MSG_RESULT([ Chris@39: Mac debug flags ............. $enable_mac_debug Chris@39: ]) Chris@39: ;; Chris@39: *) Chris@39: AC_MSG_RESULT([ Chris@39: OSS ......................... $have_oss Chris@39: JACK ........................ $have_jack Chris@39: ]) Chris@39: ;; Chris@39: esac