To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

The primary repository for this project is hosted at https://github.com/sonic-visualiser/sv-dependency-builds .
This repository is a read-only copy which is updated automatically every hour.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / src / portaudio_20161030_catalina_patch / configure.in @ 162:d43aab368df9

History | View | Annotate | Download (19.1 KB)

1
dnl
2
dnl portaudio V19 configure.in script
3
dnl
4
dnl Dominic Mazzoni, Arve Knudsen, Stelios Bounanos
5
dnl
6

    
7
dnl Require autoconf >= 2.13
8
AC_PREREQ(2.13)
9

    
10
dnl Init autoconf and make sure configure is being called
11
dnl from the right directory
12
AC_INIT([include/portaudio.h])
13

    
14
dnl Define build, build_cpu, build_vendor, build_os
15
AC_CANONICAL_BUILD
16
dnl Define host, host_cpu, host_vendor, host_os
17
AC_CANONICAL_HOST
18
dnl Define target, target_cpu, target_vendor, target_os
19
AC_CANONICAL_TARGET
20

    
21
dnl Specify options
22

    
23
AC_ARG_WITH(alsa,
24
            AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),
25
            [with_alsa=$withval])
26

    
27
AC_ARG_WITH(jack,
28
            AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),
29
            [with_jack=$withval])
30

    
31
AC_ARG_WITH(oss,
32
            AS_HELP_STRING([--with-oss], [Enable support for OSS @<:@autodetect@:>@]),
33
            [with_oss=$withval])
34

    
35
AC_ARG_WITH(asihpi,
36
            AS_HELP_STRING([--with-asihpi], [Enable support for ASIHPI @<:@autodetect@:>@]),
37
            [with_asihpi=$withval])
38

    
39
AC_ARG_WITH(winapi,
40
            AS_HELP_STRING([--with-winapi],
41
                           [Select Windows API support (@<:@wmme|directx|asio|wasapi|wdmks@:>@@<:@,...@:>@) @<:@wmme@:>@]),
42
            [with_winapi=$withval], [with_winapi="wmme"])
43
case "$target_os" in *mingw* | *cygwin*)
44
     with_wmme=no
45
     with_directx=no
46
     with_asio=no
47
     with_wasapi=no
48
     with_wdmks=no
49
     for api in $(echo $with_winapi | sed 's/,/ /g'); do
50
         case "$api" in
51
             wmme|directx|asio|wasapi|wdmks)
52
                 eval with_$api=yes
53
                 ;;
54
             *)
55
                 AC_MSG_ERROR([unknown Windows API \"$api\" (do you need --help?)])
56
                 ;;
57
         esac
58
     done
59
     ;;
60
esac
61

    
62
AC_ARG_WITH(asiodir,
63
            AS_HELP_STRING([--with-asiodir], [ASIO directory @<:@/usr/local/asiosdk2@:>@]),
64
            with_asiodir=$withval, with_asiodir="/usr/local/asiosdk2")
65

    
66
AC_ARG_WITH(dxdir,
67
            AS_HELP_STRING([--with-dxdir], [DirectX directory @<:@/usr/local/dx7sdk@:>@]),
68
            with_dxdir=$withval, with_dxdir="/usr/local/dx7sdk")
69

    
70
debug_output=no
71
AC_ARG_ENABLE(debug-output,
72
              AS_HELP_STRING([--enable-debug-output], [Enable debug output @<:@no@:>@]),
73
              [if test "x$enableval" != "xno" ; then
74
                  AC_DEFINE(PA_ENABLE_DEBUG_OUTPUT,,[Enable debugging messages])
75
                  debug_output=yes
76
               fi
77
              ])
78

    
79
AC_ARG_ENABLE(cxx,
80
              AS_HELP_STRING([--enable-cxx], [Enable C++ bindings @<:@no@:>@]),
81
              enable_cxx=$enableval, enable_cxx="no")
82

    
83
AC_ARG_ENABLE(mac-debug,
84
              AS_HELP_STRING([--enable-mac-debug], [Enable Mac debug @<:@no@:>@]),
85
              enable_mac_debug=$enableval, enable_mac_debug="no")
86

    
87
AC_ARG_ENABLE(mac-universal,
88
              AS_HELP_STRING([--enable-mac-universal], [Build Mac universal binaries @<:@yes@:>@]),
89
              enable_mac_universal=$enableval, enable_mac_universal="yes")
90

    
91
dnl Continue to accept --host_os for compatibility but do not document
92
dnl it (the correct way to change host_os is with --host=...).  Moved
93
dnl here because the empty help string generates a blank line which we
94
dnl can use to separate PA options from libtool options.
95
AC_ARG_WITH(host_os, [], host_os=$withval)
96

    
97
dnl Checks for programs.
98

    
99
AC_PROG_CC
100
dnl ASIO and CXX bindings need a C++ compiler
101
if [[ "$with_asio" = "yes" ] || [ "$enable_cxx" = "yes" ]] ; then
102
       AC_PROG_CXX
103
fi
104
AC_LIBTOOL_WIN32_DLL
105
AC_PROG_LIBTOOL
106
AC_PROG_INSTALL
107
AC_PROG_LN_S
108
AC_PATH_PROG(AR, ar, no)
109
if [[ $AR = "no" ]] ; then
110
    AC_MSG_ERROR("Could not find ar - needed to create a library")
111
fi
112

    
113
dnl This must be one of the first tests we do or it will fail...
114
AC_C_BIGENDIAN
115

    
116
dnl checks for various host APIs and arguments to configure that
117
dnl turn them on or off
118

    
119
have_alsa=no
120
if test "x$with_alsa" != "xno"; then
121
    AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
122
fi
123
have_asihpi=no
124
if test "x$with_asihpi" != "xno"; then
125
    AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
126
fi
127
have_libossaudio=no
128
have_oss=no
129
if test "x$with_oss" != "xno"; then
130
    AC_CHECK_HEADERS([sys/soundcard.h linux/soundcard.h machine/soundcard.h], [have_oss=yes])
131
    if test "x$have_oss" = "xyes"; then
132
        AC_CHECK_LIB(ossaudio, _oss_ioctl, have_libossaudio=yes, have_libossaudio=no)
133
    fi
134
fi
135
have_jack=no
136
if test "x$with_jack" != "xno"; then
137
    PKG_CHECK_MODULES(JACK, jack, have_jack=yes, have_jack=no)
138
fi
139

    
140

    
141
dnl sizeof checks: we will need a 16-bit and a 32-bit type
142

    
143
AC_CHECK_SIZEOF(short)
144
AC_CHECK_SIZEOF(int)
145
AC_CHECK_SIZEOF(long)
146

    
147
save_LIBS="${LIBS}"
148
AC_CHECK_LIB(rt, clock_gettime, [rt_libs=" -lrt"])
149
LIBS="${LIBS}${rt_libs}"
150
DLL_LIBS="${DLL_LIBS}${rt_libs}"
151
AC_CHECK_FUNCS([clock_gettime nanosleep])
152
LIBS="${save_LIBS}"
153

    
154
dnl LT_RELEASE=19
155
LT_CURRENT=2
156
LT_REVISION=0
157
LT_AGE=0
158

    
159
AC_SUBST(LT_CURRENT)
160
AC_SUBST(LT_REVISION)
161
AC_SUBST(LT_AGE)
162

    
163
dnl extra variables
164
AC_SUBST(OTHER_OBJS)
165
AC_SUBST(PADLL)
166
AC_SUBST(SHARED_FLAGS)
167
AC_SUBST(THREAD_CFLAGS)
168
AC_SUBST(DLL_LIBS)
169
AC_SUBST(CXXFLAGS)
170
AC_SUBST(NASM)
171
AC_SUBST(NASMOPT)
172
AC_SUBST(INCLUDES)
173

    
174
dnl -g is optional on darwin
175
if ( echo "${host_os}" | grep ^darwin >> /dev/null ) &&
176
      [[ "$enable_mac_universal" = "yes" ] &&
177
       [ "$enable_mac_debug" != "yes" ]] ; then
178
   CFLAGS="-O2 -Wall -pedantic -pipe -fPIC -DNDEBUG"
179
else
180
   CFLAGS=${CFLAGS:-"-g -O2 -Wall -pedantic -pipe -fPIC"}
181
fi
182

    
183
if [[ $ac_cv_c_bigendian = "yes" ]] ; then
184
   CFLAGS="$CFLAGS -DPA_BIG_ENDIAN"
185
else
186
   CFLAGS="$CFLAGS -DPA_LITTLE_ENDIAN"
187
fi
188

    
189
add_objects()
190
{
191
    for o in $@; do
192
        test "${OTHER_OBJS#*${o}*}" = "${OTHER_OBJS}" && OTHER_OBJS="$OTHER_OBJS $o"
193
    done
194
}
195

    
196
INCLUDES=portaudio.h
197

    
198
dnl Include directories needed by all implementations
199
CFLAGS="$CFLAGS -I\$(top_srcdir)/include -I\$(top_srcdir)/src/common"
200

    
201
case "${host_os}" in
202
  darwin* )
203
        dnl Mac OS X configuration
204

    
205
        AC_DEFINE(PA_USE_COREAUDIO,1)
206

    
207
        CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Wno-deprecated -Werror"
208
        LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon"
209

    
210
        if test "x$enable_mac_universal" = "xyes" ; then
211
           case `xcodebuild -version | sed -n 's/Xcode \(.*\)/\1/p'` in
212

    
213
           [12]*|3.0|3.1)
214
              dnl In pre-3.2 versions of Xcode, xcodebuild doesn't
215
              dnl support -sdk, so we can't use that to look for
216
              dnl SDKs.  However, in those versions of Xcode, the
217
              dnl SDKs are under /Developer/SDKs, so we can just look
218
              dnl there.  Also, we assume they had no SDKs later
219
              dnl than 10.5, as 3.2 was the version that came with
220
              dnl 10.6, at least if the Wikipedia page for Xcode
221
              dnl is to be believed.
222
              if [[ -d /Developer/SDKs/MacOSX10.5.sdk ]] ; then
223
                 mac_version_min="-mmacosx-version-min=10.3"
224
                 mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
225
              else
226
                 mac_version_min="-mmacosx-version-min=10.3"
227
                 mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
228
              fi
229
              ;;
230

    
231
           *)
232
              dnl In 3.2 and later, xcodebuild supports -sdk, and, in
233
              dnl 4.3 and later, the SDKs aren't under /Developer/SDKs
234
              dnl as there *is* no /Developer, so we use -sdk to check
235
              dnl what SDKs are available and to get the full path of
236
              dnl the SDKs.
237
              if xcodebuild -version -sdk macosx10.5 Path >/dev/null 2>&1 ; then
238
                 mac_version_min="-mmacosx-version-min=10.3"
239
                 mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.5 Path`"
240
              elif xcodebuild -version -sdk macosx10.6 Path >/dev/null 2>&1 ; then
241
                 mac_version_min="-mmacosx-version-min=10.4"
242
                 mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.6 Path`"
243
              elif xcodebuild -version -sdk macosx10.7 Path >/dev/null 2>&1 ; then
244
                 mac_version_min="-mmacosx-version-min=10.4"
245
                 mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.7 Path`"
246
              elif xcodebuild -version -sdk macosx10.8 Path >/dev/null 2>&1 ; then
247
                 mac_version_min="-mmacosx-version-min=10.4"
248
                 mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.8 Path`"
249
              elif xcodebuild -version -sdk macosx10.9 Path >/dev/null 2>&1 ; then
250
                 mac_version_min="-mmacosx-version-min=10.4"
251
                 mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.9 Path`"
252
              elif xcodebuild -version -sdk macosx10.10 Path >/dev/null 2>&1 ; then
253
                 mac_version_min="-mmacosx-version-min=10.4"
254
                 mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.10 Path`"
255
              elif xcodebuild -version -sdk macosx10.11 Path >/dev/null 2>&1 ; then
256
                 mac_version_min="-mmacosx-version-min=10.4"
257
                 mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.11 Path`"
258
              elif xcodebuild -version -sdk macosx10.12 Path >/dev/null 2>&1 ; then
259
                 mac_version_min="-mmacosx-version-min=10.4"
260
                 mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.12 Path`"
261
              else
262
                 AC_MSG_ERROR([Could not find 10.5 to 10.12 SDK.])
263
              fi
264
           esac
265

    
266
           dnl Pick which architectures to build for based on what
267
           dnl the compiler supports.
268
           mac_arches=""
269
           for arch in i386 x86_64 ppc ppc64
270
           do
271
              save_CFLAGS="$CFLAGS"
272
              CFLAGS="$CFLAGS -arch $arch"
273
              AC_TRY_COMPILE([], [return 0;],
274
                 [
275
                    if [[ -z "$mac_arches" ]] ; then
276
                       mac_arches="-arch $arch"
277
                    else
278
                       mac_arches="$mac_arches -arch $arch"
279
                    fi
280
                 ])
281
              CFLAGS="$save_CFLAGS"
282
           done
283
        else
284
           mac_arches=""
285
           mac_sysroot=""
286
           mac_version=""
287
        fi
288
        SHARED_FLAGS="$LIBS -dynamiclib $mac_arches $mac_sysroot $mac_version_min"
289
        CFLAGS="-std=c99 $CFLAGS $mac_arches $mac_sysroot $mac_version_min"
290
        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"
291
        PADLL="libportaudio.dylib"
292
        ;;
293

    
294
  mingw* )
295
        dnl MingW configuration
296

    
297
        PADLL="portaudio.dll"
298
        THREAD_CFLAGS="-mthreads"
299
        SHARED_FLAGS="-shared"
300
        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"
301

    
302
        if [[ "x$with_directx" = "xyes" ]]; then
303
            DXDIR="$with_dxdir"
304
            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
305
            LIBS="${LIBS} -lwinmm -lm -ldsound -lole32"
306
            DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -ldsound -lole32"
307
            #VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
308
            #CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
309
            CFLAGS="$CFLAGS -I$DXDIR/include -UPA_USE_DS -DPA_USE_DS=1"
310
        fi
311

    
312
        if [[ "x$with_asio" = "xyes" ]]; then
313
            ASIODIR="$with_asiodir"
314
            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
315
            LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
316
            DLL_LIBS="${DLL_LIBS} -lwinmm -lm -lole32 -luuid"
317
            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"
318

    
319
            dnl Setting the windows version flags below resolves a conflict between Interlocked* 
320
            dnl definitions in mingw winbase.h and Interlocked* hacks in ASIO SDK combase.h 
321
            dnl combase.h is included by asiodrvr.h
322
            dnl PortAudio does not actually require Win XP (winver 501) APIs 
323
            CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501"
324
            
325
            CXXFLAGS="$CFLAGS"
326
        fi
327

    
328
        if [[ "x$with_wdmks" = "xyes" ]]; then
329
            DXDIR="$with_dxdir"
330
            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
331
            LIBS="${LIBS} -lwinmm -lm -luuid -lsetupapi -lole32"
332
            DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
333
            #VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
334
            #CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
335
            CFLAGS="$CFLAGS -I$DXDIR/include -UPA_USE_WDMKS -DPA_USE_WDMKS=1"
336
        fi
337

    
338
        if [[ "x$with_wmme" = "xyes" ]]; then
339
            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
340
            LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
341
            DLL_LIBS="${DLL_LIBS} -lwinmm"
342
            CFLAGS="$CFLAGS -UPA_USE_WMME -DPA_USE_WMME=1"
343
        fi
344

    
345
        if [[ "x$with_wasapi" = "xyes" ]]; then
346
            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
347
            LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
348
            DLL_LIBS="${DLL_LIBS} -lwinmm -lole32"
349
            CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hostapi/wasapi/mingw-include -UPA_USE_WASAPI -DPA_USE_WASAPI=1"
350
        fi
351
        ;;
352

    
353
  cygwin* )
354
        dnl Cygwin configuration
355

    
356
        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"
357
        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"
358
        LIBS="-lwinmm -lm"
359
        PADLL="portaudio.dll"
360
        THREAD_CFLAGS="-mthreads"
361
        SHARED_FLAGS="-shared"
362
        DLL_LIBS="${DLL_LIBS} -lwinmm"
363
        ;;
364

    
365
  irix* )
366
        dnl SGI IRIX audio library (AL) configuration (Pieter, oct 2-13, 2003).
367
        dnl The 'dmedia' library is needed to read the Unadjusted System Time (UST).
368
        dnl
369
        AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR([IRIX posix thread library not found!]))
370
        AC_CHECK_LIB(audio,   alOpenPort,     , AC_MSG_ERROR([IRIX audio library not found!]))
371
        AC_CHECK_LIB(dmedia,  dmGetUST,       , AC_MSG_ERROR([IRIX digital media library not found!]))
372

    
373
        dnl See the '#ifdef PA_USE_SGI' in file pa_unix/pa_unix_hostapis.c
374
        dnl which selects the appropriate PaXXX_Initialize() function.
375
        dnl
376
        AC_DEFINE(PA_USE_SGI,1)
377

    
378
        CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
379

    
380
        dnl The _REENTRANT option for pthread safety. Perhaps not necessary but it 'll do no harm.
381
        dnl
382
        THREAD_CFLAGS="-D_REENTRANT"
383
    
384
        OTHER_OBJS="pa_sgi/pa_sgi.o src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o"
385

    
386
        dnl SGI books say -lpthread should be the last of the libs mentioned.
387
        dnl
388
        LIBS="-lm -ldmedia -laudio -lpthread"
389
        PADLL="libportaudio.so"
390
        SHARED_FLAGS=""
391
        ;;
392

    
393
  *)
394
        dnl Unix configuration
395

    
396
        CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
397
        
398
        AC_CHECK_LIB(pthread, pthread_create,[have_pthread="yes"],
399
                AC_MSG_ERROR([libpthread not found!]))
400

    
401
        if [[ "$have_alsa" = "yes" ] && [ "$with_alsa" != "no" ]] ; then
402
           DLL_LIBS="$DLL_LIBS -lasound"
403
           LIBS="$LIBS -lasound"
404
           OTHER_OBJS="$OTHER_OBJS src/hostapi/alsa/pa_linux_alsa.o"
405
           INCLUDES="$INCLUDES pa_linux_alsa.h"
406
           AC_DEFINE(PA_USE_ALSA,1)
407
        fi
408

    
409
        if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
410
           DLL_LIBS="$DLL_LIBS $JACK_LIBS"
411
           CFLAGS="$CFLAGS $JACK_CFLAGS"
412
           OTHER_OBJS="$OTHER_OBJS src/hostapi/jack/pa_jack.o src/common/pa_ringbuffer.o"
413
           INCLUDES="$INCLUDES pa_jack.h"
414
           AC_DEFINE(PA_USE_JACK,1)
415
        fi
416

    
417
        if [[ "$with_oss" != "no" ]] ; then
418
           OTHER_OBJS="$OTHER_OBJS src/hostapi/oss/pa_unix_oss.o"
419
           if [[ "$have_libossaudio" = "yes" ]] ; then
420
                   DLL_LIBS="$DLL_LIBS -lossaudio"
421
                   LIBS="$LIBS -lossaudio"
422
           fi
423
           AC_DEFINE(PA_USE_OSS,1)
424
        fi
425

    
426
        if [[ "$have_asihpi" = "yes" ] && [ "$with_asihpi" != "no" ]] ; then
427
           LIBS="$LIBS -lhpi"
428
           DLL_LIBS="$DLL_LIBS -lhpi"
429
           OTHER_OBJS="$OTHER_OBJS src/hostapi/asihpi/pa_linux_asihpi.o"
430
           AC_DEFINE(PA_USE_ASIHPI,1)
431
        fi
432

    
433
        DLL_LIBS="$DLL_LIBS -lm -lpthread"
434
        LIBS="$LIBS -lm -lpthread"
435
        PADLL="libportaudio.so"
436

    
437
        ## support sun cc compiler flags
438
        case "${host_os}" in
439
           solaris*)
440
              SHARED_FLAGS="-G"
441
              THREAD_CFLAGS="-mt"
442
              ;;
443
           *)
444
              SHARED_FLAGS="-fPIC"
445
              THREAD_CFLAGS="-pthread"
446
              ;;
447
        esac
448

    
449
        OTHER_OBJS="$OTHER_OBJS src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o"
450
esac
451
CFLAGS="$CFLAGS $THREAD_CFLAGS"
452

    
453
test "$enable_shared" != "yes" && SHARED_FLAGS=""
454

    
455
if test "$enable_cxx" = "yes"; then
456
   AC_CONFIG_SUBDIRS([bindings/cpp])
457
   ENABLE_CXX_TRUE=""
458
   ENABLE_CXX_FALSE="#"
459
else
460
   ENABLE_CXX_TRUE="#"
461
   ENABLE_CXX_FALSE=""
462
fi
463
AC_SUBST(ENABLE_CXX_TRUE)
464
AC_SUBST(ENABLE_CXX_FALSE)
465

    
466
if test "x$with_asio" = "xyes"; then
467
   WITH_ASIO_TRUE=""
468
   WITH_ASIO_FALSE="@ #"
469
else
470
   WITH_ASIO_TRUE="@ #"
471
   WITH_ASIO_FALSE=""
472
fi
473
AC_SUBST(WITH_ASIO_TRUE)
474
AC_SUBST(WITH_ASIO_FALSE)
475

    
476
AC_OUTPUT([Makefile portaudio-2.0.pc])
477

    
478
AC_MSG_RESULT([
479
Configuration summary:
480

    
481
  Target ...................... $target
482
  C++ bindings ................ $enable_cxx
483
  Debug output ................ $debug_output])
484

    
485
case "$target_os" in *linux*)
486
    AC_MSG_RESULT([
487
  ALSA ........................ $have_alsa
488
  ASIHPI ...................... $have_asihpi])
489
    ;;
490
esac
491
case "$target_os" in
492
    *mingw* | *cygwin*)
493
        test "x$with_directx" = "xyes" && with_directx="$with_directx (${with_dxdir})"
494
        test "x$with_wdmks" = "xyes" && with_wdmks="$with_wdmks (${with_dxdir})"
495
        test "x$with_asio" = "xyes" && with_asio="$with_asio (${with_asiodir})"
496
        test "x$with_wasapi" = "xyes"
497
        AC_MSG_RESULT([
498
  WMME ........................ $with_wmme
499
  DSound ...................... $with_directx
500
  ASIO ........................ $with_asio
501
  WASAPI ...................... $with_wasapi
502
  WDMKS ....................... $with_wdmks
503
])
504
        ;;
505
    *darwin*)
506
        AC_MSG_RESULT([
507
  Mac debug flags ............. $enable_mac_debug
508
])
509
        ;;
510
     *)
511
	AC_MSG_RESULT([
512
  OSS ......................... $have_oss
513
  JACK ........................ $have_jack
514
])
515
        ;;
516
esac