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 @ 166:cbd6d7e562c7

History | View | Annotate | Download (19.5 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
        AC_DEFINE(AUDIO_COMPONENT_FIX,1)
207

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

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

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

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

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

    
301
  mingw* )
302
        dnl MingW configuration
303

    
304
        PADLL="portaudio.dll"
305
        THREAD_CFLAGS="-mthreads"
306
        SHARED_FLAGS="-shared"
307
        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"
308

    
309
        if [[ "x$with_directx" = "xyes" ]]; then
310
            DXDIR="$with_dxdir"
311
            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
312
            LIBS="${LIBS} -lwinmm -lm -ldsound -lole32"
313
            DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -ldsound -lole32"
314
            #VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
315
            #CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
316
            CFLAGS="$CFLAGS -I$DXDIR/include -UPA_USE_DS -DPA_USE_DS=1"
317
        fi
318

    
319
        if [[ "x$with_asio" = "xyes" ]]; then
320
            ASIODIR="$with_asiodir"
321
            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
322
            LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
323
            DLL_LIBS="${DLL_LIBS} -lwinmm -lm -lole32 -luuid"
324
            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"
325

    
326
            dnl Setting the windows version flags below resolves a conflict between Interlocked* 
327
            dnl definitions in mingw winbase.h and Interlocked* hacks in ASIO SDK combase.h 
328
            dnl combase.h is included by asiodrvr.h
329
            dnl PortAudio does not actually require Win XP (winver 501) APIs 
330
            CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501"
331
            
332
            CXXFLAGS="$CFLAGS"
333
        fi
334

    
335
        if [[ "x$with_wdmks" = "xyes" ]]; then
336
            DXDIR="$with_dxdir"
337
            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
338
            LIBS="${LIBS} -lwinmm -lm -luuid -lsetupapi -lole32"
339
            DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
340
            #VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
341
            #CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
342
            CFLAGS="$CFLAGS -I$DXDIR/include -UPA_USE_WDMKS -DPA_USE_WDMKS=1"
343
        fi
344

    
345
        if [[ "x$with_wmme" = "xyes" ]]; then
346
            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
347
            LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
348
            DLL_LIBS="${DLL_LIBS} -lwinmm"
349
            CFLAGS="$CFLAGS -UPA_USE_WMME -DPA_USE_WMME=1"
350
        fi
351

    
352
        if [[ "x$with_wasapi" = "xyes" ]]; then
353
            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
354
            LIBS="${LIBS} -lwinmm -lm -lole32 -luuid"
355
            DLL_LIBS="${DLL_LIBS} -lwinmm -lole32"
356
            CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hostapi/wasapi/mingw-include -UPA_USE_WASAPI -DPA_USE_WASAPI=1"
357
        fi
358
        ;;
359

    
360
  cygwin* )
361
        dnl Cygwin configuration
362

    
363
        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"
364
        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"
365
        LIBS="-lwinmm -lm"
366
        PADLL="portaudio.dll"
367
        THREAD_CFLAGS="-mthreads"
368
        SHARED_FLAGS="-shared"
369
        DLL_LIBS="${DLL_LIBS} -lwinmm"
370
        ;;
371

    
372
  irix* )
373
        dnl SGI IRIX audio library (AL) configuration (Pieter, oct 2-13, 2003).
374
        dnl The 'dmedia' library is needed to read the Unadjusted System Time (UST).
375
        dnl
376
        AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR([IRIX posix thread library not found!]))
377
        AC_CHECK_LIB(audio,   alOpenPort,     , AC_MSG_ERROR([IRIX audio library not found!]))
378
        AC_CHECK_LIB(dmedia,  dmGetUST,       , AC_MSG_ERROR([IRIX digital media library not found!]))
379

    
380
        dnl See the '#ifdef PA_USE_SGI' in file pa_unix/pa_unix_hostapis.c
381
        dnl which selects the appropriate PaXXX_Initialize() function.
382
        dnl
383
        AC_DEFINE(PA_USE_SGI,1)
384

    
385
        CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
386

    
387
        dnl The _REENTRANT option for pthread safety. Perhaps not necessary but it 'll do no harm.
388
        dnl
389
        THREAD_CFLAGS="-D_REENTRANT"
390
    
391
        OTHER_OBJS="pa_sgi/pa_sgi.o src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o"
392

    
393
        dnl SGI books say -lpthread should be the last of the libs mentioned.
394
        dnl
395
        LIBS="-lm -ldmedia -laudio -lpthread"
396
        PADLL="libportaudio.so"
397
        SHARED_FLAGS=""
398
        ;;
399

    
400
  *)
401
        dnl Unix configuration
402

    
403
        CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
404
        
405
        AC_CHECK_LIB(pthread, pthread_create,[have_pthread="yes"],
406
                AC_MSG_ERROR([libpthread not found!]))
407

    
408
        if [[ "$have_alsa" = "yes" ] && [ "$with_alsa" != "no" ]] ; then
409
           DLL_LIBS="$DLL_LIBS -lasound"
410
           LIBS="$LIBS -lasound"
411
           OTHER_OBJS="$OTHER_OBJS src/hostapi/alsa/pa_linux_alsa.o"
412
           INCLUDES="$INCLUDES pa_linux_alsa.h"
413
           AC_DEFINE(PA_USE_ALSA,1)
414
        fi
415

    
416
        if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
417
           DLL_LIBS="$DLL_LIBS $JACK_LIBS"
418
           CFLAGS="$CFLAGS $JACK_CFLAGS"
419
           OTHER_OBJS="$OTHER_OBJS src/hostapi/jack/pa_jack.o src/common/pa_ringbuffer.o"
420
           INCLUDES="$INCLUDES pa_jack.h"
421
           AC_DEFINE(PA_USE_JACK,1)
422
        fi
423

    
424
        if [[ "$with_oss" != "no" ]] ; then
425
           OTHER_OBJS="$OTHER_OBJS src/hostapi/oss/pa_unix_oss.o"
426
           if [[ "$have_libossaudio" = "yes" ]] ; then
427
                   DLL_LIBS="$DLL_LIBS -lossaudio"
428
                   LIBS="$LIBS -lossaudio"
429
           fi
430
           AC_DEFINE(PA_USE_OSS,1)
431
        fi
432

    
433
        if [[ "$have_asihpi" = "yes" ] && [ "$with_asihpi" != "no" ]] ; then
434
           LIBS="$LIBS -lhpi"
435
           DLL_LIBS="$DLL_LIBS -lhpi"
436
           OTHER_OBJS="$OTHER_OBJS src/hostapi/asihpi/pa_linux_asihpi.o"
437
           AC_DEFINE(PA_USE_ASIHPI,1)
438
        fi
439

    
440
        DLL_LIBS="$DLL_LIBS -lm -lpthread"
441
        LIBS="$LIBS -lm -lpthread"
442
        PADLL="libportaudio.so"
443

    
444
        ## support sun cc compiler flags
445
        case "${host_os}" in
446
           solaris*)
447
              SHARED_FLAGS="-G"
448
              THREAD_CFLAGS="-mt"
449
              ;;
450
           *)
451
              SHARED_FLAGS="-fPIC"
452
              THREAD_CFLAGS="-pthread"
453
              ;;
454
        esac
455

    
456
        OTHER_OBJS="$OTHER_OBJS src/os/unix/pa_unix_hostapis.o src/os/unix/pa_unix_util.o"
457
esac
458
CFLAGS="$CFLAGS $THREAD_CFLAGS"
459

    
460
test "$enable_shared" != "yes" && SHARED_FLAGS=""
461

    
462
if test "$enable_cxx" = "yes"; then
463
   AC_CONFIG_SUBDIRS([bindings/cpp])
464
   ENABLE_CXX_TRUE=""
465
   ENABLE_CXX_FALSE="#"
466
else
467
   ENABLE_CXX_TRUE="#"
468
   ENABLE_CXX_FALSE=""
469
fi
470
AC_SUBST(ENABLE_CXX_TRUE)
471
AC_SUBST(ENABLE_CXX_FALSE)
472

    
473
if test "x$with_asio" = "xyes"; then
474
   WITH_ASIO_TRUE=""
475
   WITH_ASIO_FALSE="@ #"
476
else
477
   WITH_ASIO_TRUE="@ #"
478
   WITH_ASIO_FALSE=""
479
fi
480
AC_SUBST(WITH_ASIO_TRUE)
481
AC_SUBST(WITH_ASIO_FALSE)
482

    
483
AC_OUTPUT([Makefile portaudio-2.0.pc])
484

    
485
AC_MSG_RESULT([
486
Configuration summary:
487

    
488
  Target ...................... $target
489
  C++ bindings ................ $enable_cxx
490
  Debug output ................ $debug_output])
491

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