You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

520 lines
19KB

  1. dnl
  2. dnl portaudio V19 configure.in script
  3. dnl
  4. dnl Dominic Mazzoni, Arve Knudsen, Stelios Bounanos
  5. dnl
  6. dnl Require autoconf >= 2.13
  7. AC_PREREQ(2.13)
  8. dnl Init autoconf and make sure configure is being called
  9. dnl from the right directory
  10. AC_INIT([include/portaudio.h])
  11. dnl Define build, build_cpu, build_vendor, build_os
  12. AC_CANONICAL_BUILD
  13. dnl Define host, host_cpu, host_vendor, host_os
  14. AC_CANONICAL_HOST
  15. dnl Define target, target_cpu, target_vendor, target_os
  16. AC_CANONICAL_TARGET
  17. dnl Specify options
  18. AC_ARG_WITH(alsa,
  19. AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),
  20. [with_alsa=$withval])
  21. AC_ARG_WITH(jack,
  22. AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),
  23. [with_jack=$withval])
  24. AC_ARG_WITH(oss,
  25. AS_HELP_STRING([--with-oss], [Enable support for OSS @<:@autodetect@:>@]),
  26. [with_oss=$withval])
  27. AC_ARG_WITH(asihpi,
  28. AS_HELP_STRING([--with-asihpi], [Enable support for ASIHPI @<:@autodetect@:>@]),
  29. [with_asihpi=$withval])
  30. AC_ARG_WITH(winapi,
  31. AS_HELP_STRING([--with-winapi],
  32. [Select Windows API support (@<:@wmme|directx|asio|wasapi|wdmks@:>@@<:@,...@:>@) @<:@wmme@:>@]),
  33. [with_winapi=$withval], [with_winapi="wmme"])
  34. case "$target_os" in *mingw* | *cygwin*)
  35. with_wmme=no
  36. with_directx=no
  37. with_asio=no
  38. with_wasapi=no
  39. with_wdmks=no
  40. for api in $(echo $with_winapi | sed 's/,/ /g'); do
  41. case "$api" in
  42. wmme|directx|asio|wasapi|wdmks)
  43. eval with_$api=yes
  44. ;;
  45. *)
  46. AC_MSG_ERROR([unknown Windows API \"$api\" (do you need --help?)])
  47. ;;
  48. esac
  49. done
  50. ;;
  51. esac
  52. AC_ARG_WITH(asiodir,
  53. AS_HELP_STRING([--with-asiodir], [ASIO directory @<:@/usr/local/asiosdk2@:>@]),
  54. with_asiodir=$withval, with_asiodir="/usr/local/asiosdk2")
  55. AC_ARG_WITH(dxdir,
  56. AS_HELP_STRING([--with-dxdir], [DirectX directory @<:@/usr/local/dx7sdk@:>@]),
  57. with_dxdir=$withval, with_dxdir="/usr/local/dx7sdk")
  58. debug_output=no
  59. AC_ARG_ENABLE(debug-output,
  60. AS_HELP_STRING([--enable-debug-output], [Enable debug output @<:@no@:>@]),
  61. [if test "x$enableval" != "xno" ; then
  62. AC_DEFINE(PA_ENABLE_DEBUG_OUTPUT,,[Enable debugging messages])
  63. debug_output=yes
  64. fi
  65. ])
  66. AC_ARG_ENABLE(cxx,
  67. AS_HELP_STRING([--enable-cxx], [Enable C++ bindings @<:@no@:>@]),
  68. enable_cxx=$enableval, enable_cxx="no")
  69. AC_ARG_ENABLE(mac-debug,
  70. AS_HELP_STRING([--enable-mac-debug], [Enable Mac debug @<:@no@:>@]),
  71. enable_mac_debug=$enableval, enable_mac_debug="no")
  72. AC_ARG_ENABLE(mac-universal,
  73. AS_HELP_STRING([--enable-mac-universal], [Build Mac universal binaries @<:@yes@:>@]),
  74. enable_mac_universal=$enableval, enable_mac_universal="yes")
  75. dnl Continue to accept --host_os for compatibility but do not document
  76. dnl it (the correct way to change host_os is with --host=...). Moved
  77. dnl here because the empty help string generates a blank line which we
  78. dnl can use to separate PA options from libtool options.
  79. AC_ARG_WITH(host_os, [], host_os=$withval)
  80. dnl Checks for programs.
  81. AC_PROG_CC
  82. dnl ASIO and CXX bindings need a C++ compiler
  83. if [[ "$with_asio" = "yes" ] || [ "$enable_cxx" = "yes" ]] ; then
  84. AC_PROG_CXX
  85. fi
  86. AC_LIBTOOL_WIN32_DLL
  87. AC_PROG_LIBTOOL
  88. AC_PROG_INSTALL
  89. AC_PROG_LN_S
  90. AC_PATH_PROG(AR, ar, no)
  91. if [[ $AR = "no" ]] ; then
  92. AC_MSG_ERROR("Could not find ar - needed to create a library")
  93. fi
  94. dnl This must be one of the first tests we do or it will fail...
  95. AC_C_BIGENDIAN
  96. dnl checks for various host APIs and arguments to configure that
  97. dnl turn them on or off
  98. have_alsa=no
  99. if test "x$with_alsa" != "xno"; then
  100. AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
  101. fi
  102. have_asihpi=no
  103. if test "x$with_asihpi" != "xno"; then
  104. AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
  105. fi
  106. have_libossaudio=no
  107. have_oss=no
  108. if test "x$with_oss" != "xno"; then
  109. AC_CHECK_HEADERS([sys/soundcard.h linux/soundcard.h machine/soundcard.h], [have_oss=yes])
  110. if test "x$have_oss" = "xyes"; then
  111. AC_CHECK_LIB(ossaudio, _oss_ioctl, have_libossaudio=yes, have_libossaudio=no)
  112. fi
  113. fi
  114. have_jack=no
  115. if test "x$with_jack" != "xno"; then
  116. PKG_CHECK_MODULES(JACK, jack, have_jack=yes, have_jack=no)
  117. fi
  118. dnl sizeof checks: we will need a 16-bit and a 32-bit type
  119. AC_CHECK_SIZEOF(short)
  120. AC_CHECK_SIZEOF(int)
  121. AC_CHECK_SIZEOF(long)
  122. save_LIBS="${LIBS}"
  123. AC_CHECK_LIB(rt, clock_gettime, [rt_libs=" -lrt"])
  124. LIBS="${LIBS}${rt_libs}"
  125. DLL_LIBS="${DLL_LIBS}${rt_libs}"
  126. AC_CHECK_FUNCS([clock_gettime nanosleep])
  127. LIBS="${save_LIBS}"
  128. dnl LT_RELEASE=19
  129. LT_CURRENT=2
  130. LT_REVISION=0
  131. LT_AGE=0
  132. AC_SUBST(LT_CURRENT)
  133. AC_SUBST(LT_REVISION)
  134. AC_SUBST(LT_AGE)
  135. dnl extra variables
  136. AC_SUBST(OTHER_OBJS)
  137. AC_SUBST(PADLL)
  138. AC_SUBST(SHARED_FLAGS)
  139. AC_SUBST(THREAD_CFLAGS)
  140. AC_SUBST(DLL_LIBS)
  141. AC_SUBST(CXXFLAGS)
  142. AC_SUBST(NASM)
  143. AC_SUBST(NASMOPT)
  144. AC_SUBST(INCLUDES)
  145. dnl -g is optional on darwin
  146. if ( echo "${host_os}" | grep ^darwin >> /dev/null ) &&
  147. [[ "$enable_mac_universal" = "yes" ] &&
  148. [ "$enable_mac_debug" != "yes" ]] ; then
  149. CFLAGS="-O2 -Wall -pedantic -pipe -fPIC -DNDEBUG"
  150. else
  151. CFLAGS=${CFLAGS:-"-g -O2 -Wall -pedantic -pipe -fPIC"}
  152. fi
  153. if [[ $ac_cv_c_bigendian = "yes" ]] ; then
  154. CFLAGS="$CFLAGS -DPA_BIG_ENDIAN"
  155. else
  156. CFLAGS="$CFLAGS -DPA_LITTLE_ENDIAN"
  157. fi
  158. add_objects()
  159. {
  160. for o in $@; do
  161. test "${OTHER_OBJS#*${o}*}" = "${OTHER_OBJS}" && OTHER_OBJS="$OTHER_OBJS $o"
  162. done
  163. }
  164. INCLUDES=portaudio.h
  165. dnl Include directories needed by all implementations
  166. CFLAGS="$CFLAGS -I\$(top_srcdir)/include -I\$(top_srcdir)/src/common"
  167. case "${host_os}" in
  168. darwin* )
  169. dnl Mac OS X configuration
  170. AC_DEFINE(PA_USE_COREAUDIO,1)
  171. CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Wno-deprecated -Werror"
  172. LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon"
  173. if test "x$enable_mac_universal" = "xyes" ; then
  174. case `xcodebuild -version | sed -n 's/Xcode \(.*\)/\1/p'` in
  175. [12]*|3.0|3.1)
  176. dnl In pre-3.2 versions of Xcode, xcodebuild doesn't
  177. dnl support -sdk, so we can't use that to look for
  178. dnl SDKs. However, in those versions of Xcode, the
  179. dnl SDKs are under /Developer/SDKs, so we can just look
  180. dnl there. Also, we assume they had no SDKs later
  181. dnl than 10.5, as 3.2 was the version that came with
  182. dnl 10.6, at least if the Wikipedia page for Xcode
  183. dnl is to be believed.
  184. if [[ -d /Developer/SDKs/MacOSX10.5.sdk ]] ; then
  185. mac_version_min="-mmacosx-version-min=10.3"
  186. mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
  187. else
  188. mac_version_min="-mmacosx-version-min=10.3"
  189. mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
  190. fi
  191. ;;
  192. *)
  193. dnl In 3.2 and later, xcodebuild supports -sdk, and, in
  194. dnl 4.3 and later, the SDKs aren't under /Developer/SDKs
  195. dnl as there *is* no /Developer, so we use -sdk to check
  196. dnl what SDKs are available and to get the full path of
  197. dnl the SDKs.
  198. if xcodebuild -version -sdk macosx10.5 Path >/dev/null 2>&1 ; then
  199. mac_version_min="-mmacosx-version-min=10.3"
  200. mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.5 Path`"
  201. elif xcodebuild -version -sdk macosx10.6 Path >/dev/null 2>&1 ; then
  202. mac_version_min="-mmacosx-version-min=10.4"
  203. mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.6 Path`"
  204. elif xcodebuild -version -sdk macosx10.7 Path >/dev/null 2>&1 ; then
  205. mac_version_min="-mmacosx-version-min=10.4"
  206. mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.7 Path`"
  207. elif xcodebuild -version -sdk macosx10.8 Path >/dev/null 2>&1 ; then
  208. mac_version_min="-mmacosx-version-min=10.4"
  209. mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.8 Path`"
  210. elif xcodebuild -version -sdk macosx10.9 Path >/dev/null 2>&1 ; then
  211. mac_version_min="-mmacosx-version-min=10.4"
  212. mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.9 Path`"
  213. elif xcodebuild -version -sdk macosx10.10 Path >/dev/null 2>&1 ; then
  214. mac_version_min="-mmacosx-version-min=10.4"
  215. mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.10 Path`"
  216. elif xcodebuild -version -sdk macosx10.11 Path >/dev/null 2>&1 ; then
  217. mac_version_min="-mmacosx-version-min=10.4"
  218. mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.11 Path`"
  219. elif xcodebuild -version -sdk macosx10.12 Path >/dev/null 2>&1 ; then
  220. mac_version_min="-mmacosx-version-min=10.4"
  221. mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.12 Path`"
  222. elif xcodebuild -version -sdk macosx10.13 Path >/dev/null 2>&1 ; then
  223. mac_version_min="-mmacosx-version-min=10.4"
  224. mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.13 Path`"
  225. else
  226. AC_MSG_ERROR([Could not find 10.5 to 10.13 SDK.])
  227. fi
  228. esac
  229. dnl Pick which architectures to build for based on what
  230. dnl the compiler supports.
  231. mac_arches=""
  232. for arch in i386 x86_64 ppc ppc64
  233. do
  234. save_CFLAGS="$CFLAGS"
  235. CFLAGS="$CFLAGS -arch $arch"
  236. AC_TRY_COMPILE([], [return 0;],
  237. [
  238. if [[ -z "$mac_arches" ]] ; then
  239. mac_arches="-arch $arch"
  240. else
  241. mac_arches="$mac_arches -arch $arch"
  242. fi
  243. ])
  244. CFLAGS="$save_CFLAGS"
  245. done
  246. else
  247. mac_arches=""
  248. mac_sysroot=""
  249. mac_version=""
  250. fi
  251. SHARED_FLAGS="$LIBS -dynamiclib $mac_arches $mac_sysroot $mac_version_min"
  252. CFLAGS="-std=c99 $CFLAGS $mac_arches $mac_sysroot $mac_version_min"
  253. 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"
  254. PADLL="libportaudio.dylib"
  255. ;;
  256. mingw* )
  257. dnl MingW configuration
  258. PADLL="portaudio.dll"
  259. THREAD_CFLAGS="-mthreads"
  260. SHARED_FLAGS="-shared"
  261. 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"
  262. if [[ "x$with_directx" = "xyes" ]]; then
  263. DXDIR="$with_dxdir"
  264. 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
  265. LIBS="${LIBS} -lwinmm -lm -ldsound -lole32"
  266. DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -ldsound -lole32"
  267. #VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
  268. #CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
  269. CFLAGS="$CFLAGS -I$DXDIR/include -UPA_USE_DS -DPA_USE_DS=1"
  270. fi
  271. if [[ "x$with_asio" = "xyes" ]]; then
  272. ASIODIR="$with_asiodir"
  273. 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
  274. LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
  275. DLL_LIBS="${DLL_LIBS} -lwinmm -lm -lole32 -luuid"
  276. 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"
  277. dnl Setting the windows version flags below resolves a conflict between Interlocked*
  278. dnl definitions in mingw winbase.h and Interlocked* hacks in ASIO SDK combase.h
  279. dnl combase.h is included by asiodrvr.h
  280. dnl PortAudio does not actually require Win XP (winver 501) APIs
  281. CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501"
  282. CXXFLAGS="$CFLAGS"
  283. fi
  284. if [[ "x$with_wdmks" = "xyes" ]]; then
  285. DXDIR="$with_dxdir"
  286. 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
  287. LIBS="${LIBS} -lwinmm -lm -luuid -lsetupapi -lole32"
  288. DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
  289. #VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
  290. #CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
  291. CFLAGS="$CFLAGS -I$DXDIR/include -UPA_USE_WDMKS -DPA_USE_WDMKS=1"
  292. fi
  293. if [[ "x$with_wmme" = "xyes" ]]; then
  294. 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
  295. LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
  296. DLL_LIBS="${DLL_LIBS} -lwinmm"
  297. CFLAGS="$CFLAGS -UPA_USE_WMME -DPA_USE_WMME=1"
  298. fi
  299. if [[ "x$with_wasapi" = "xyes" ]]; then
  300. 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
  301. LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
  302. DLL_LIBS="${DLL_LIBS} -lwinmm -lole32"
  303. CFLAGS="$CFLAGS -UPA_USE_WASAPI -DPA_USE_WASAPI=1"
  304. fi
  305. ;;
  306. cygwin* )
  307. dnl Cygwin configuration
  308. 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"
  309. 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"
  310. LIBS="-lwinmm -lm"
  311. PADLL="portaudio.dll"
  312. THREAD_CFLAGS="-mthreads"
  313. SHARED_FLAGS="-shared"
  314. DLL_LIBS="${DLL_LIBS} -lwinmm"
  315. ;;
  316. irix* )
  317. dnl SGI IRIX audio library (AL) configuration (Pieter, oct 2-13, 2003).
  318. dnl The 'dmedia' library is needed to read the Unadjusted System Time (UST).
  319. dnl
  320. AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR([IRIX posix thread library not found!]))
  321. AC_CHECK_LIB(audio, alOpenPort, , AC_MSG_ERROR([IRIX audio library not found!]))
  322. AC_CHECK_LIB(dmedia, dmGetUST, , AC_MSG_ERROR([IRIX digital media library not found!]))
  323. dnl See the '#ifdef PA_USE_SGI' in file pa_unix/pa_unix_hostapis.c
  324. dnl which selects the appropriate PaXXX_Initialize() function.
  325. dnl
  326. AC_DEFINE(PA_USE_SGI,1)
  327. CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
  328. dnl The _REENTRANT option for pthread safety. Perhaps not necessary but it 'll do no harm.
  329. dnl
  330. THREAD_CFLAGS="-D_REENTRANT"
  331. OTHER_OBJS="pa_sgi/pa_sgi.o src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o"
  332. dnl SGI books say -lpthread should be the last of the libs mentioned.
  333. dnl
  334. LIBS="-lm -ldmedia -laudio -lpthread"
  335. PADLL="libportaudio.so"
  336. SHARED_FLAGS=""
  337. ;;
  338. *)
  339. dnl Unix configuration
  340. CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
  341. AC_CHECK_LIB(pthread, pthread_create,[have_pthread="yes"],
  342. AC_MSG_ERROR([libpthread not found!]))
  343. if [[ "$have_alsa" = "yes" ] && [ "$with_alsa" != "no" ]] ; then
  344. DLL_LIBS="$DLL_LIBS -lasound"
  345. LIBS="$LIBS -lasound"
  346. OTHER_OBJS="$OTHER_OBJS src/hostapi/alsa/pa_linux_alsa.o"
  347. INCLUDES="$INCLUDES pa_linux_alsa.h"
  348. AC_DEFINE(PA_USE_ALSA,1)
  349. fi
  350. if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
  351. DLL_LIBS="$DLL_LIBS $JACK_LIBS"
  352. CFLAGS="$CFLAGS $JACK_CFLAGS"
  353. OTHER_OBJS="$OTHER_OBJS src/hostapi/jack/pa_jack.o src/common/pa_ringbuffer.o"
  354. INCLUDES="$INCLUDES pa_jack.h"
  355. AC_DEFINE(PA_USE_JACK,1)
  356. fi
  357. if [[ "$with_oss" != "no" ]] ; then
  358. OTHER_OBJS="$OTHER_OBJS src/hostapi/oss/pa_unix_oss.o"
  359. if [[ "$have_libossaudio" = "yes" ]] ; then
  360. DLL_LIBS="$DLL_LIBS -lossaudio"
  361. LIBS="$LIBS -lossaudio"
  362. fi
  363. AC_DEFINE(PA_USE_OSS,1)
  364. fi
  365. if [[ "$have_asihpi" = "yes" ] && [ "$with_asihpi" != "no" ]] ; then
  366. LIBS="$LIBS -lhpi"
  367. DLL_LIBS="$DLL_LIBS -lhpi"
  368. OTHER_OBJS="$OTHER_OBJS src/hostapi/asihpi/pa_linux_asihpi.o"
  369. AC_DEFINE(PA_USE_ASIHPI,1)
  370. fi
  371. DLL_LIBS="$DLL_LIBS -lm -lpthread"
  372. LIBS="$LIBS -lm -lpthread"
  373. PADLL="libportaudio.so"
  374. ## support sun cc compiler flags
  375. case "${host_os}" in
  376. solaris*)
  377. SHARED_FLAGS="-G"
  378. THREAD_CFLAGS="-mt"
  379. ;;
  380. *)
  381. SHARED_FLAGS="-fPIC"
  382. THREAD_CFLAGS="-pthread"
  383. ;;
  384. esac
  385. OTHER_OBJS="$OTHER_OBJS src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o"
  386. esac
  387. CFLAGS="$CFLAGS $THREAD_CFLAGS"
  388. test "$enable_shared" != "yes" && SHARED_FLAGS=""
  389. if test "$enable_cxx" = "yes"; then
  390. AC_CONFIG_SUBDIRS([bindings/cpp])
  391. ENABLE_CXX_TRUE=""
  392. ENABLE_CXX_FALSE="#"
  393. else
  394. ENABLE_CXX_TRUE="#"
  395. ENABLE_CXX_FALSE=""
  396. fi
  397. AC_SUBST(ENABLE_CXX_TRUE)
  398. AC_SUBST(ENABLE_CXX_FALSE)
  399. if test "x$with_asio" = "xyes"; then
  400. WITH_ASIO_TRUE=""
  401. WITH_ASIO_FALSE="@ #"
  402. else
  403. WITH_ASIO_TRUE="@ #"
  404. WITH_ASIO_FALSE=""
  405. fi
  406. AC_SUBST(WITH_ASIO_TRUE)
  407. AC_SUBST(WITH_ASIO_FALSE)
  408. AC_OUTPUT([Makefile portaudio-2.0.pc])
  409. AC_MSG_RESULT([
  410. Configuration summary:
  411. Target ...................... $target
  412. C++ bindings ................ $enable_cxx
  413. Debug output ................ $debug_output])
  414. case "$target_os" in *linux*)
  415. AC_MSG_RESULT([
  416. ALSA ........................ $have_alsa
  417. ASIHPI ...................... $have_asihpi])
  418. ;;
  419. esac
  420. case "$target_os" in
  421. *mingw* | *cygwin*)
  422. test "x$with_directx" = "xyes" && with_directx="$with_directx (${with_dxdir})"
  423. test "x$with_wdmks" = "xyes" && with_wdmks="$with_wdmks (${with_dxdir})"
  424. test "x$with_asio" = "xyes" && with_asio="$with_asio (${with_asiodir})"
  425. test "x$with_wasapi" = "xyes"
  426. AC_MSG_RESULT([
  427. WMME ........................ $with_wmme
  428. DSound ...................... $with_directx
  429. ASIO ........................ $with_asio
  430. WASAPI ...................... $with_wasapi
  431. WDMKS ....................... $with_wdmks
  432. ])
  433. ;;
  434. *darwin*)
  435. AC_MSG_RESULT([
  436. Mac debug flags ............. $enable_mac_debug
  437. ])
  438. ;;
  439. *)
  440. AC_MSG_RESULT([
  441. OSS ......................... $have_oss
  442. JACK ........................ $have_jack
  443. ])
  444. ;;
  445. esac