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