mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
------------------------------------------------------------------------ r1966 | philburk | 2016-02-15 11:06:54 -0600 (Mon, 15 Feb 2016) | 3 lines Update docs for building on Linux ------------------------------------------------------------------------ r1965 | philburk | 2016-01-04 11:22:56 -0600 (Mon, 04 Jan 2016) | 6 lines Files needed for compiling on El Capitan. These files were autogenerated using autoreconf based on changes from the previous commit. ------------------------------------------------------------------------ r1964 | philburk | 2016-01-04 11:22:00 -0600 (Mon, 04 Jan 2016) | 9 lines Add support for 10.11 SDK so PortAudio can compile on Mac. Also allow deprecated APIs until we can remove them. Note that this commit only includes the source files that were changed. The next commit will include the files that are generated by autoreconf. So look at this commit to see what really changed. ------------------------------------------------------------------------ r1963 | dmitrykos | 2015-10-21 09:25:07 -0500 (Wed, 21 Oct 2015) | 1 line wasapi: correction to the previous commit ------------------------------------------------------------------------ r1962 | dmitrykos | 2015-10-20 11:02:39 -0500 (Tue, 20 Oct 2015) | 1 line wasapi: workaround to avoid PaWasapi_Initialize() failure when enumerating devices and device fails to report min/default periods with IAudioClient::GetDevicePeriod(): ignore error and assign WASAPI common known period values for min/default ------------------------------------------------------------------------ r1961 | dmitrykos | 2015-10-19 06:03:31 -0500 (Mon, 19 Oct 2015) | 1 line wasapi: support for setting the WASAPI's AudioClientProperties options via PaWasapiStreamInfo struct (__IAudioClient2_INTERFACE_DEFINED__ must be defined by Windows SDK (for Windows 8 and up) to have effect from these new options, otherwise it will be noop) ------------------------------------------------------------------------ r1960 | rbencina | 2015-09-06 08:17:05 -0500 (Sun, 06 Sep 2015) | 1 line update doxygen main page to reference developer guidelines and implementation style guidelines on the Wiki ------------------------------------------------------------------------ r1959 | rbencina | 2015-09-06 07:43:06 -0500 (Sun, 06 Sep 2015) | 1 line checkfiledocs.py: blacklist mingw-include from doc check ------------------------------------------------------------------------ r1958 | rbencina | 2015-09-06 07:37:38 -0500 (Sun, 06 Sep 2015) | 1 line checkfiledocs.py: only check source code under src and include ------------------------------------------------------------------------ r1957 | rbencina | 2015-09-06 05:55:01 -0500 (Sun, 06 Sep 2015) | 1 line Issue #234 fixed typo in configure and configure.in affecting mingw builds. Rename: pa_win_wdmks_util.o --> pa_win_wdmks_utils.o ------------------------------------------------------------------------ r1956 | rbencina | 2015-09-06 05:26:16 -0500 (Sun, 06 Sep 2015) | 1 line removed bindings/java from doxygen generated documentation ------------------------------------------------------------------------ r1954 | gineera | 2015-04-19 13:48:38 -0500 (Sun, 19 Apr 2015) | 1 line Pa_process: Fix output channel adaption by not skipping the conversion when the host and user number-of-channels are not equal. Reported by Leif Asbrink when using an envy24 soundcard on Linux at it's native Int32 format with 1 or 2 channels. Corresponding fix for input already in r1913. ------------------------------------------------------------------------ r1953 | philburk | 2015-04-09 23:00:09 -0500 (Thu, 09 Apr 2015) | 4 lines Add Pa_GetVersionInfo() Add scripts to update pa_svnrevision.h ------------------------------------------------------------------------ r1952 | philburk | 2015-03-12 11:23:11 -0500 (Thu, 12 Mar 2015) | 3 lines Test adding a second file with SVN keywords. ------------------------------------------------------------------------ r1951 | philburk | 2015-03-12 11:21:04 -0500 (Thu, 12 Mar 2015) | 3 lines Used propset to enable SVN keywords on test file. ------------------------------------------------------------------------ r1950 | philburk | 2015-03-12 11:16:44 -0500 (Thu, 12 Mar 2015) | 3 lines Experiment with the SVN version keywords. ------------------------------------------------------------------------ r1949 | philburk | 2015-03-03 11:28:15 -0600 (Tue, 03 Mar 2015) | 4 lines Add version numbering with major.minor.subminor format. Bump version to 19.5.0 ------------------------------------------------------------------------ r1948 | rbencina | 2015-01-21 00:52:11 -0600 (Wed, 21 Jan 2015) | 1 line pa/wmme: avoid potential (but highly unlikely) overflow in buffer size in call to WideCharToMultiByte if a device name length exceeds INT_MAX. should also fix compiler warning about size_t to int assignment. ------------------------------------------------------------------------ r1947 | rbencina | 2015-01-21 00:32:29 -0600 (Wed, 21 Jan 2015) | 1 line removed declaration of unused variable ------------------------------------------------------------------------ r1946 | rbencina | 2015-01-21 00:30:53 -0600 (Wed, 21 Jan 2015) | 1 line fixed compiler warning: conversion from 'double' to 'float', possible loss of data ------------------------------------------------------------------------ r1945 | rbencina | 2015-01-21 00:24:32 -0600 (Wed, 21 Jan 2015) | 1 line disabled deprecated API warning for GetVersionEx in dsound, wmme and wdmks host APIs. ------------------------------------------------------------------------ r1944 | rbencina | 2015-01-20 23:35:39 -0600 (Tue, 20 Jan 2015) | 1 line Removed MSVC dependence on ksguid.lib from src/os/win/pa_win_wdmks_utils.c (ksguid.lib is no longer in Platform SDK 8.0). Always use static instances of GUIDs like the GCC builds do. Removed ksguid.lib from MSVC project file. The following symbols are no longer used: PA_WDMKS_NO_KSGUID_LIB, PAWIN_WDMKS_NO_KSGUID_LIB; removed them from CMakeLists.txt and the MSVC project file. ------------------------------------------------------------------------ r1943 | rbencina | 2015-01-19 23:10:17 -0600 (Mon, 19 Jan 2015) | 1 line cpp binding: make operator == and != const. thanks to Riot for this patch. ticket #230 ------------------------------------------------------------------------ r1934 | rbencina | 2014-11-04 19:03:57 -0600 (Tue, 04 Nov 2014) | 1 line PA/CoreAudio: fixed copy-pasto: last host error was being associated with paInDevelopment host api not paCoreAudio ------------------------------------------------------------------------ r1933 | robiwan | 2014-08-28 00:59:40 -0500 (Thu, 28 Aug 2014) | 1 line Added more debugging info in wdmks/pa_win_wdmks.c ------------------------------------------------------------------------ r1932 | robiwan | 2014-08-15 01:35:32 -0500 (Fri, 15 Aug 2014) | 1 line Committing Lelands patch for WDM-KS, should take care of some of the problems referenced here http://music.columbia.edu/pipermail/portaudio/2014-August/016246.html ------------------------------------------------------------------------ r1930 | bejayoharen | 2014-06-28 11:28:17 -0500 (Sat, 28 Jun 2014) | 1 line olivier's device name patch for os x ------------------------------------------------------------------------ r1928 | rbencina | 2014-04-11 00:46:40 -0500 (Fri, 11 Apr 2014) | 1 line pa_win_ds.c converted tabs to spaces (only a small amount of code was incorrectly using tabs). ------------------------------------------------------------------------ r1927 | rbencina | 2014-04-11 00:44:50 -0500 (Fri, 11 Apr 2014) | 1 line DirectSound: correctly output device names as UTF-8 when compiled with UNICODE defined. Note that this patch may not be correct if UNICODE is not defined. Patch from Tobias Erichsen. See ticket #224 for details. ------------------------------------------------------------------------ r1926 | rbencina | 2014-04-11 00:31:13 -0500 (Fri, 11 Apr 2014) | 1 line pa_win_wmme.c: converted tabs to spaces (just a few sections) ------------------------------------------------------------------------ r1925 | rbencina | 2014-04-11 00:25:48 -0500 (Fri, 11 Apr 2014) | 1 line WMME: correctly convert device names to UTF-8, see ticket #224. Thanks to Tobias Erichsen for the patch. ------------------------------------------------------------------------ r1924 | robiwan | 2014-04-09 09:27:21 -0500 (Wed, 09 Apr 2014) | 4 lines CMake: Added PA_WDMKS_NO_KSGUID_LIB to WDMKS and solution folders WDMKS: Support for default device (see caveat for input devices though in ScanDeviceInfos) Added possibility to set channel mask ------------------------------------------------------------------------ r1920 | bejayoharen | 2014-02-05 12:43:31 -0600 (Wed, 05 Feb 2014) | 1 line Clarified safety of operations in callback (doc) ------------------------------------------------------------------------ r1919 | rbencina | 2014-01-30 05:46:42 -0600 (Thu, 30 Jan 2014) | 1 line updated Windows+ASIO build tutorial: Building Portaudio for Windows with ASIO support using MSVC. The tutorial was out of date and contained a number of errors that broke the build process. ------------------------------------------------------------------------ r1918 | rbencina | 2014-01-30 04:12:02 -0600 (Thu, 30 Jan 2014) | 1 line tweaked Windows build tutorial: Building PortAudio for Windows using Microsoft Visual Studio - various improvements to clarity of text. Fixed broken ASIO SDK URL. ------------------------------------------------------------------------ r1916 | philburk | 2014-01-16 21:45:15 -0600 (Thu, 16 Jan 2014) | 6 lines Add stub to pa_trace.c to eliminate warning. "make install" was causing a warning if PA_TRACE_REALTIME_EVENTS was not defined. ------------------------------------------------------------------------ r1915 | philburk | 2014-01-16 11:51:26 -0600 (Thu, 16 Jan 2014) | 5 lines [tests] Add EOL to patest_mono.c Build was failing on Mac because of the missing end-of-line. ------------------------------------------------------------------------ r1914 | philburk | 2014-01-16 11:49:33 -0600 (Thu, 16 Jan 2014) | 6 lines [macosx] Add support for SDK 10.8 and 10.9. This was required to fix a broken build caused by not having SDK 10.7 or earlier. ------------------------------------------------------------------------ r1913 | gineera | 2013-11-18 05:42:27 -0600 (Mon, 18 Nov 2013) | 1 line Pa_process: Fix input channel adaption by not skipping the input conversion when the host and user number-of-channels are not equal. The bug manifested when recording mono from a stereo-only device (eg with Alsa hw: devices on some sound-cards), and was reported by the Mixxx team -see https://bugs.launchpad.net/mixxx/+bug/900364. (In the long-term, some refactoring may be preferable.) Also fixed copy-paste typos in comments. ------------------------------------------------------------------------ r1912 | gineera | 2013-11-15 06:27:07 -0600 (Fri, 15 Nov 2013) | 1 line Jack: Add a port-type filter expression to calls to jack_get_ports() so that only audio ports are listed (removing eg Midi etc) as reported by 'sqweek'. ------------------------------------------------------------------------ r1911 | gineera | 2013-10-17 07:44:09 -0500 (Thu, 17 Oct 2013) | 1 line Alsa: Revise the use of the environment variable 'PA_ALSA_PLUGHW' so it correctly influences the Device-List and the capabilities reported. Also rename a mis-leading variable and add one additional DEBUG line.
517 lines
19 KiB
Plaintext
517 lines
19 KiB
Plaintext
dnl
|
|
dnl portaudio V19 configure.in script
|
|
dnl
|
|
dnl Dominic Mazzoni, Arve Knudsen, Stelios Bounanos
|
|
dnl
|
|
|
|
dnl Require autoconf >= 2.13
|
|
AC_PREREQ(2.13)
|
|
|
|
dnl Init autoconf and make sure configure is being called
|
|
dnl from the right directory
|
|
AC_INIT([include/portaudio.h])
|
|
|
|
dnl Define build, build_cpu, build_vendor, build_os
|
|
AC_CANONICAL_BUILD
|
|
dnl Define host, host_cpu, host_vendor, host_os
|
|
AC_CANONICAL_HOST
|
|
dnl Define target, target_cpu, target_vendor, target_os
|
|
AC_CANONICAL_TARGET
|
|
|
|
dnl Specify options
|
|
|
|
AC_ARG_WITH(alsa,
|
|
AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),
|
|
[with_alsa=$withval])
|
|
|
|
AC_ARG_WITH(jack,
|
|
AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),
|
|
[with_jack=$withval])
|
|
|
|
AC_ARG_WITH(oss,
|
|
AS_HELP_STRING([--with-oss], [Enable support for OSS @<:@autodetect@:>@]),
|
|
[with_oss=$withval])
|
|
|
|
AC_ARG_WITH(asihpi,
|
|
AS_HELP_STRING([--with-asihpi], [Enable support for ASIHPI @<:@autodetect@:>@]),
|
|
[with_asihpi=$withval])
|
|
|
|
AC_ARG_WITH(winapi,
|
|
AS_HELP_STRING([--with-winapi],
|
|
[Select Windows API support (@<:@wmme|directx|asio|wasapi|wdmks@:>@@<:@,...@:>@) @<:@wmme@:>@]),
|
|
[with_winapi=$withval], [with_winapi="wmme"])
|
|
case "$target_os" in *mingw* | *cygwin*)
|
|
with_wmme=no
|
|
with_directx=no
|
|
with_asio=no
|
|
with_wasapi=no
|
|
with_wdmks=no
|
|
for api in $(echo $with_winapi | sed 's/,/ /g'); do
|
|
case "$api" in
|
|
wmme|directx|asio|wasapi|wdmks)
|
|
eval with_$api=yes
|
|
;;
|
|
*)
|
|
AC_MSG_ERROR([unknown Windows API \"$api\" (do you need --help?)])
|
|
;;
|
|
esac
|
|
done
|
|
;;
|
|
esac
|
|
|
|
AC_ARG_WITH(asiodir,
|
|
AS_HELP_STRING([--with-asiodir], [ASIO directory @<:@/usr/local/asiosdk2@:>@]),
|
|
with_asiodir=$withval, with_asiodir="/usr/local/asiosdk2")
|
|
|
|
AC_ARG_WITH(dxdir,
|
|
AS_HELP_STRING([--with-dxdir], [DirectX directory @<:@/usr/local/dx7sdk@:>@]),
|
|
with_dxdir=$withval, with_dxdir="/usr/local/dx7sdk")
|
|
|
|
debug_output=no
|
|
AC_ARG_ENABLE(debug-output,
|
|
AS_HELP_STRING([--enable-debug-output], [Enable debug output @<:@no@:>@]),
|
|
[if test "x$enableval" != "xno" ; then
|
|
AC_DEFINE(PA_ENABLE_DEBUG_OUTPUT,,[Enable debugging messages])
|
|
debug_output=yes
|
|
fi
|
|
])
|
|
|
|
AC_ARG_ENABLE(cxx,
|
|
AS_HELP_STRING([--enable-cxx], [Enable C++ bindings @<:@no@:>@]),
|
|
enable_cxx=$enableval, enable_cxx="no")
|
|
|
|
AC_ARG_ENABLE(mac-debug,
|
|
AS_HELP_STRING([--enable-mac-debug], [Enable Mac debug @<:@no@:>@]),
|
|
enable_mac_debug=$enableval, enable_mac_debug="no")
|
|
|
|
AC_ARG_ENABLE(mac-universal,
|
|
AS_HELP_STRING([--enable-mac-universal], [Build Mac universal binaries @<:@yes@:>@]),
|
|
enable_mac_universal=$enableval, enable_mac_universal="yes")
|
|
|
|
dnl Continue to accept --host_os for compatibility but do not document
|
|
dnl it (the correct way to change host_os is with --host=...). Moved
|
|
dnl here because the empty help string generates a blank line which we
|
|
dnl can use to separate PA options from libtool options.
|
|
AC_ARG_WITH(host_os, [], host_os=$withval)
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
dnl ASIO and CXX bindings need a C++ compiler
|
|
if [[ "$with_asio" = "yes" ] || [ "$enable_cxx" = "yes" ]] ; then
|
|
AC_PROG_CXX
|
|
fi
|
|
AC_LIBTOOL_WIN32_DLL
|
|
AC_PROG_LIBTOOL
|
|
AC_PROG_INSTALL
|
|
AC_PROG_LN_S
|
|
AC_PATH_PROG(AR, ar, no)
|
|
if [[ $AR = "no" ]] ; then
|
|
AC_MSG_ERROR("Could not find ar - needed to create a library")
|
|
fi
|
|
|
|
dnl This must be one of the first tests we do or it will fail...
|
|
AC_C_BIGENDIAN
|
|
|
|
dnl checks for various host APIs and arguments to configure that
|
|
dnl turn them on or off
|
|
|
|
have_alsa=no
|
|
if test "x$with_alsa" != "xno"; then
|
|
AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
|
|
fi
|
|
have_asihpi=no
|
|
if test "x$with_asihpi" != "xno"; then
|
|
AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
|
|
fi
|
|
have_libossaudio=no
|
|
have_oss=no
|
|
if test "x$with_oss" != "xno"; then
|
|
AC_CHECK_HEADERS([sys/soundcard.h linux/soundcard.h machine/soundcard.h], [have_oss=yes])
|
|
if test "x$have_oss" = "xyes"; then
|
|
AC_CHECK_LIB(ossaudio, _oss_ioctl, have_libossaudio=yes, have_libossaudio=no)
|
|
fi
|
|
fi
|
|
have_jack=no
|
|
if test "x$with_jack" != "xno"; then
|
|
PKG_CHECK_MODULES(JACK, jack, have_jack=yes, have_jack=no)
|
|
fi
|
|
|
|
|
|
dnl sizeof checks: we will need a 16-bit and a 32-bit type
|
|
|
|
AC_CHECK_SIZEOF(short)
|
|
AC_CHECK_SIZEOF(int)
|
|
AC_CHECK_SIZEOF(long)
|
|
|
|
save_LIBS="${LIBS}"
|
|
AC_CHECK_LIB(rt, clock_gettime, [rt_libs=" -lrt"])
|
|
LIBS="${LIBS}${rt_libs}"
|
|
DLL_LIBS="${DLL_LIBS}${rt_libs}"
|
|
AC_CHECK_FUNCS([clock_gettime nanosleep])
|
|
LIBS="${save_LIBS}"
|
|
|
|
dnl LT_RELEASE=19
|
|
LT_CURRENT=2
|
|
LT_REVISION=0
|
|
LT_AGE=0
|
|
|
|
AC_SUBST(LT_CURRENT)
|
|
AC_SUBST(LT_REVISION)
|
|
AC_SUBST(LT_AGE)
|
|
|
|
dnl extra variables
|
|
AC_SUBST(OTHER_OBJS)
|
|
AC_SUBST(PADLL)
|
|
AC_SUBST(SHARED_FLAGS)
|
|
AC_SUBST(THREAD_CFLAGS)
|
|
AC_SUBST(DLL_LIBS)
|
|
AC_SUBST(CXXFLAGS)
|
|
AC_SUBST(NASM)
|
|
AC_SUBST(NASMOPT)
|
|
AC_SUBST(INCLUDES)
|
|
|
|
dnl -g is optional on darwin
|
|
if ( echo "${host_os}" | grep ^darwin >> /dev/null ) &&
|
|
[[ "$enable_mac_universal" = "yes" ] &&
|
|
[ "$enable_mac_debug" != "yes" ]] ; then
|
|
CFLAGS="-O2 -Wall -pedantic -pipe -fPIC -DNDEBUG"
|
|
else
|
|
CFLAGS=${CFLAGS:-"-g -O2 -Wall -pedantic -pipe -fPIC"}
|
|
fi
|
|
|
|
if [[ $ac_cv_c_bigendian = "yes" ]] ; then
|
|
CFLAGS="$CFLAGS -DPA_BIG_ENDIAN"
|
|
else
|
|
CFLAGS="$CFLAGS -DPA_LITTLE_ENDIAN"
|
|
fi
|
|
|
|
add_objects()
|
|
{
|
|
for o in $@; do
|
|
test "${OTHER_OBJS#*${o}*}" = "${OTHER_OBJS}" && OTHER_OBJS="$OTHER_OBJS $o"
|
|
done
|
|
}
|
|
|
|
INCLUDES=portaudio.h
|
|
|
|
dnl Include directories needed by all implementations
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/include -I\$(top_srcdir)/src/common"
|
|
|
|
case "${host_os}" in
|
|
darwin* )
|
|
dnl Mac OS X configuration
|
|
|
|
AC_DEFINE(PA_USE_COREAUDIO,1)
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Wno-deprecated -Werror"
|
|
LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon"
|
|
|
|
if test "x$enable_mac_universal" = "xyes" ; then
|
|
case `xcodebuild -version | sed -n 's/Xcode \(.*\)/\1/p'` in
|
|
|
|
[12]*|3.0|3.1)
|
|
dnl In pre-3.2 versions of Xcode, xcodebuild doesn't
|
|
dnl support -sdk, so we can't use that to look for
|
|
dnl SDKs. However, in those versions of Xcode, the
|
|
dnl SDKs are under /Developer/SDKs, so we can just look
|
|
dnl there. Also, we assume they had no SDKs later
|
|
dnl than 10.5, as 3.2 was the version that came with
|
|
dnl 10.6, at least if the Wikipedia page for Xcode
|
|
dnl is to be believed.
|
|
if [[ -d /Developer/SDKs/MacOSX10.5.sdk ]] ; then
|
|
mac_version_min="-mmacosx-version-min=10.3"
|
|
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
|
|
else
|
|
mac_version_min="-mmacosx-version-min=10.3"
|
|
mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
|
|
fi
|
|
;;
|
|
|
|
*)
|
|
dnl In 3.2 and later, xcodebuild supports -sdk, and, in
|
|
dnl 4.3 and later, the SDKs aren't under /Developer/SDKs
|
|
dnl as there *is* no /Developer, so we use -sdk to check
|
|
dnl what SDKs are available and to get the full path of
|
|
dnl the SDKs.
|
|
if xcodebuild -version -sdk macosx10.5 Path >/dev/null 2>&1 ; then
|
|
mac_version_min="-mmacosx-version-min=10.3"
|
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.5 Path`"
|
|
elif xcodebuild -version -sdk macosx10.6 Path >/dev/null 2>&1 ; then
|
|
mac_version_min="-mmacosx-version-min=10.4"
|
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.6 Path`"
|
|
elif xcodebuild -version -sdk macosx10.7 Path >/dev/null 2>&1 ; then
|
|
mac_version_min="-mmacosx-version-min=10.4"
|
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.7 Path`"
|
|
elif xcodebuild -version -sdk macosx10.8 Path >/dev/null 2>&1 ; then
|
|
mac_version_min="-mmacosx-version-min=10.4"
|
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.8 Path`"
|
|
elif xcodebuild -version -sdk macosx10.9 Path >/dev/null 2>&1 ; then
|
|
mac_version_min="-mmacosx-version-min=10.4"
|
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.9 Path`"
|
|
elif xcodebuild -version -sdk macosx10.10 Path >/dev/null 2>&1 ; then
|
|
mac_version_min="-mmacosx-version-min=10.4"
|
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.10 Path`"
|
|
elif xcodebuild -version -sdk macosx10.11 Path >/dev/null 2>&1 ; then
|
|
mac_version_min="-mmacosx-version-min=10.4"
|
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.11 Path`"
|
|
elif xcodebuild -version -sdk macosx10.12 Path >/dev/null 2>&1 ; then
|
|
mac_version_min="-mmacosx-version-min=10.4"
|
|
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.12 Path`"
|
|
else
|
|
AC_MSG_ERROR([Could not find 10.5 to 10.12 SDK.])
|
|
fi
|
|
esac
|
|
|
|
dnl Pick which architectures to build for based on what
|
|
dnl the compiler supports.
|
|
mac_arches=""
|
|
for arch in i386 x86_64 ppc ppc64
|
|
do
|
|
save_CFLAGS="$CFLAGS"
|
|
CFLAGS="$CFLAGS -arch $arch"
|
|
AC_TRY_COMPILE([], [return 0;],
|
|
[
|
|
if [[ -z "$mac_arches" ]] ; then
|
|
mac_arches="-arch $arch"
|
|
else
|
|
mac_arches="$mac_arches -arch $arch"
|
|
fi
|
|
])
|
|
CFLAGS="$save_CFLAGS"
|
|
done
|
|
else
|
|
mac_arches=""
|
|
mac_sysroot=""
|
|
mac_version=""
|
|
fi
|
|
SHARED_FLAGS="$LIBS -dynamiclib $mac_arches $mac_sysroot $mac_version_min"
|
|
CFLAGS="-std=c99 $CFLAGS $mac_arches $mac_sysroot $mac_version_min"
|
|
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"
|
|
PADLL="libportaudio.dylib"
|
|
;;
|
|
|
|
mingw* )
|
|
dnl MingW configuration
|
|
|
|
PADLL="portaudio.dll"
|
|
THREAD_CFLAGS="-mthreads"
|
|
SHARED_FLAGS="-shared"
|
|
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"
|
|
|
|
if [[ "x$with_directx" = "xyes" ]]; then
|
|
DXDIR="$with_dxdir"
|
|
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
|
|
LIBS="${LIBS} -lwinmm -lm -ldsound -lole32"
|
|
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -ldsound -lole32"
|
|
#VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
|
|
#CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
|
|
CFLAGS="$CFLAGS -I$DXDIR/include -UPA_USE_DS -DPA_USE_DS=1"
|
|
fi
|
|
|
|
if [[ "x$with_asio" = "xyes" ]]; then
|
|
ASIODIR="$with_asiodir"
|
|
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
|
|
LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
|
|
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -lole32 -luuid"
|
|
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"
|
|
|
|
dnl Setting the windows version flags below resolves a conflict between Interlocked*
|
|
dnl definitions in mingw winbase.h and Interlocked* hacks in ASIO SDK combase.h
|
|
dnl combase.h is included by asiodrvr.h
|
|
dnl PortAudio does not actually require Win XP (winver 501) APIs
|
|
CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501"
|
|
|
|
CXXFLAGS="$CFLAGS"
|
|
fi
|
|
|
|
if [[ "x$with_wdmks" = "xyes" ]]; then
|
|
DXDIR="$with_dxdir"
|
|
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_utils.o src/os/win/pa_win_waveformat.o
|
|
LIBS="${LIBS} -lwinmm -lm -luuid -lsetupapi -lole32"
|
|
DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
|
|
#VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
|
|
#CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
|
|
CFLAGS="$CFLAGS -I$DXDIR/include -UPA_USE_WDMKS -DPA_USE_WDMKS=1"
|
|
fi
|
|
|
|
if [[ "x$with_wmme" = "xyes" ]]; then
|
|
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
|
|
LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
|
|
DLL_LIBS="${DLL_LIBS} -lwinmm"
|
|
CFLAGS="$CFLAGS -UPA_USE_WMME -DPA_USE_WMME=1"
|
|
fi
|
|
|
|
if [[ "x$with_wasapi" = "xyes" ]]; then
|
|
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
|
|
LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
|
|
DLL_LIBS="${DLL_LIBS} -lwinmm -lole32"
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hostapi/wasapi/mingw-include -UPA_USE_WASAPI -DPA_USE_WASAPI=1"
|
|
fi
|
|
;;
|
|
|
|
cygwin* )
|
|
dnl Cygwin configuration
|
|
|
|
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"
|
|
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"
|
|
LIBS="-lwinmm -lm"
|
|
PADLL="portaudio.dll"
|
|
THREAD_CFLAGS="-mthreads"
|
|
SHARED_FLAGS="-shared"
|
|
DLL_LIBS="${DLL_LIBS} -lwinmm"
|
|
;;
|
|
|
|
irix* )
|
|
dnl SGI IRIX audio library (AL) configuration (Pieter, oct 2-13, 2003).
|
|
dnl The 'dmedia' library is needed to read the Unadjusted System Time (UST).
|
|
dnl
|
|
AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR([IRIX posix thread library not found!]))
|
|
AC_CHECK_LIB(audio, alOpenPort, , AC_MSG_ERROR([IRIX audio library not found!]))
|
|
AC_CHECK_LIB(dmedia, dmGetUST, , AC_MSG_ERROR([IRIX digital media library not found!]))
|
|
|
|
dnl See the '#ifdef PA_USE_SGI' in file pa_unix/pa_unix_hostapis.c
|
|
dnl which selects the appropriate PaXXX_Initialize() function.
|
|
dnl
|
|
AC_DEFINE(PA_USE_SGI,1)
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
|
|
|
|
dnl The _REENTRANT option for pthread safety. Perhaps not necessary but it 'll do no harm.
|
|
dnl
|
|
THREAD_CFLAGS="-D_REENTRANT"
|
|
|
|
OTHER_OBJS="pa_sgi/pa_sgi.o src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o"
|
|
|
|
dnl SGI books say -lpthread should be the last of the libs mentioned.
|
|
dnl
|
|
LIBS="-lm -ldmedia -laudio -lpthread"
|
|
PADLL="libportaudio.so"
|
|
SHARED_FLAGS=""
|
|
;;
|
|
|
|
*)
|
|
dnl Unix configuration
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
|
|
|
|
AC_CHECK_LIB(pthread, pthread_create,[have_pthread="yes"],
|
|
AC_MSG_ERROR([libpthread not found!]))
|
|
|
|
if [[ "$have_alsa" = "yes" ] && [ "$with_alsa" != "no" ]] ; then
|
|
DLL_LIBS="$DLL_LIBS -lasound"
|
|
LIBS="$LIBS -lasound"
|
|
OTHER_OBJS="$OTHER_OBJS src/hostapi/alsa/pa_linux_alsa.o"
|
|
INCLUDES="$INCLUDES pa_linux_alsa.h"
|
|
AC_DEFINE(PA_USE_ALSA,1)
|
|
fi
|
|
|
|
if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
|
|
DLL_LIBS="$DLL_LIBS $JACK_LIBS"
|
|
CFLAGS="$CFLAGS $JACK_CFLAGS"
|
|
OTHER_OBJS="$OTHER_OBJS src/hostapi/jack/pa_jack.o src/common/pa_ringbuffer.o"
|
|
INCLUDES="$INCLUDES pa_jack.h"
|
|
AC_DEFINE(PA_USE_JACK,1)
|
|
fi
|
|
|
|
if [[ "$with_oss" != "no" ]] ; then
|
|
OTHER_OBJS="$OTHER_OBJS src/hostapi/oss/pa_unix_oss.o"
|
|
if [[ "$have_libossaudio" = "yes" ]] ; then
|
|
DLL_LIBS="$DLL_LIBS -lossaudio"
|
|
LIBS="$LIBS -lossaudio"
|
|
fi
|
|
AC_DEFINE(PA_USE_OSS,1)
|
|
fi
|
|
|
|
if [[ "$have_asihpi" = "yes" ] && [ "$with_asihpi" != "no" ]] ; then
|
|
LIBS="$LIBS -lhpi"
|
|
DLL_LIBS="$DLL_LIBS -lhpi"
|
|
OTHER_OBJS="$OTHER_OBJS src/hostapi/asihpi/pa_linux_asihpi.o"
|
|
AC_DEFINE(PA_USE_ASIHPI,1)
|
|
fi
|
|
|
|
DLL_LIBS="$DLL_LIBS -lm -lpthread"
|
|
LIBS="$LIBS -lm -lpthread"
|
|
PADLL="libportaudio.so"
|
|
|
|
## support sun cc compiler flags
|
|
case "${host_os}" in
|
|
solaris*)
|
|
SHARED_FLAGS="-G"
|
|
THREAD_CFLAGS="-mt"
|
|
;;
|
|
*)
|
|
SHARED_FLAGS="-fPIC"
|
|
THREAD_CFLAGS="-pthread"
|
|
;;
|
|
esac
|
|
|
|
OTHER_OBJS="$OTHER_OBJS src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o"
|
|
esac
|
|
CFLAGS="$CFLAGS $THREAD_CFLAGS"
|
|
|
|
test "$enable_shared" != "yes" && SHARED_FLAGS=""
|
|
|
|
if test "$enable_cxx" = "yes"; then
|
|
AC_CONFIG_SUBDIRS([bindings/cpp])
|
|
ENABLE_CXX_TRUE=""
|
|
ENABLE_CXX_FALSE="#"
|
|
else
|
|
ENABLE_CXX_TRUE="#"
|
|
ENABLE_CXX_FALSE=""
|
|
fi
|
|
AC_SUBST(ENABLE_CXX_TRUE)
|
|
AC_SUBST(ENABLE_CXX_FALSE)
|
|
|
|
if test "x$with_asio" = "xyes"; then
|
|
WITH_ASIO_TRUE=""
|
|
WITH_ASIO_FALSE="@ #"
|
|
else
|
|
WITH_ASIO_TRUE="@ #"
|
|
WITH_ASIO_FALSE=""
|
|
fi
|
|
AC_SUBST(WITH_ASIO_TRUE)
|
|
AC_SUBST(WITH_ASIO_FALSE)
|
|
|
|
AC_OUTPUT([Makefile portaudio-2.0.pc])
|
|
|
|
AC_MSG_RESULT([
|
|
Configuration summary:
|
|
|
|
Target ...................... $target
|
|
C++ bindings ................ $enable_cxx
|
|
Debug output ................ $debug_output])
|
|
|
|
case "$target_os" in *linux*)
|
|
AC_MSG_RESULT([
|
|
ALSA ........................ $have_alsa
|
|
ASIHPI ...................... $have_asihpi])
|
|
;;
|
|
esac
|
|
case "$target_os" in
|
|
*mingw* | *cygwin*)
|
|
test "x$with_directx" = "xyes" && with_directx="$with_directx (${with_dxdir})"
|
|
test "x$with_wdmks" = "xyes" && with_wdmks="$with_wdmks (${with_dxdir})"
|
|
test "x$with_asio" = "xyes" && with_asio="$with_asio (${with_asiodir})"
|
|
test "x$with_wasapi" = "xyes"
|
|
AC_MSG_RESULT([
|
|
WMME ........................ $with_wmme
|
|
DSound ...................... $with_directx
|
|
ASIO ........................ $with_asio
|
|
WASAPI ...................... $with_wasapi
|
|
WDMKS ....................... $with_wdmks
|
|
])
|
|
;;
|
|
*darwin*)
|
|
AC_MSG_RESULT([
|
|
Mac debug flags ............. $enable_mac_debug
|
|
])
|
|
;;
|
|
*)
|
|
AC_MSG_RESULT([
|
|
OSS ......................... $have_oss
|
|
JACK ........................ $have_jack
|
|
])
|
|
;;
|
|
esac
|