configure.in 16.1 KB
Newer Older
1
dnl
bjornroche's avatar
bjornroche committed
2
dnl portaudio V19 configure.in script
3
dnl
4
dnl Dominic Mazzoni, Arve Knudsen, Stelios Bounanos
5 6 7 8 9 10 11
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
bjornroche's avatar
bjornroche committed
12 13
AC_INIT([include/portaudio.h])

14 15 16 17 18 19 20
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

bjornroche's avatar
bjornroche committed
21 22
dnl Specify options

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

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

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

AC_ARG_WITH(asihpi,
36 37
            AS_HELP_STRING([--with-asihpi], [Enable support for ASIHPI @<:@autodetect@:>@]),
            [with_asihpi=$withval])
bjornroche's avatar
bjornroche committed
38 39

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

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

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

70
debug_output=no
bjornroche's avatar
bjornroche committed
71
AC_ARG_ENABLE(debug-output,
72 73 74 75 76 77
              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
              ])
bjornroche's avatar
bjornroche committed
78 79

AC_ARG_ENABLE(cxx,
80 81
              AS_HELP_STRING([--enable-cxx], [Enable C++ bindings @<:@no@:>@]),
              enable_cxx=$enableval, enable_cxx="no")
bjornroche's avatar
bjornroche committed
82 83

AC_ARG_ENABLE(mac-debug,
84 85
              AS_HELP_STRING([--enable-mac-debug], [Enable Mac debug @<:@no@:>@]),
              enable_mac_debug=$enableval, enable_mac_debug="no")
bjornroche's avatar
bjornroche committed
86 87

AC_ARG_ENABLE(mac-universal,
88 89 90 91 92 93 94 95
              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)
bjornroche's avatar
bjornroche committed
96 97

dnl Checks for programs.
98 99

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

bjornroche's avatar
bjornroche committed
113 114 115 116 117 118
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

119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
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
bjornroche's avatar
bjornroche committed
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163


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
164
AC_SUBST(OTHER_OBJS)
165 166
AC_SUBST(PADLL)
AC_SUBST(SHARED_FLAGS)
bjornroche's avatar
bjornroche committed
167
AC_SUBST(THREAD_CFLAGS)
168
AC_SUBST(DLL_LIBS)
bjornroche's avatar
bjornroche committed
169 170 171
AC_SUBST(CXXFLAGS)
AC_SUBST(NASM)
AC_SUBST(NASMOPT)
172
AC_SUBST(INCLUDES)
173

bjornroche's avatar
bjornroche committed
174 175 176 177 178 179 180 181 182 183 184 185 186 187
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
188

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

196 197
INCLUDES=portaudio.h

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

201 202
case "${host_os}" in
  darwin* )
bjornroche's avatar
bjornroche committed
203
        dnl Mac OS X configuration
204

205
        AC_DEFINE(PA_USE_COREAUDIO,1)
bjornroche's avatar
bjornroche committed
206

207
        CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Werror"
bjornroche's avatar
bjornroche committed
208 209 210 211
        LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon"

        if test "x$enable_mac_universal" = "xyes" ; then
           if [[ -d /Developer/SDKs/MacOSX10.5.sdk ]] ; then
212
              mac_version_min="-mmacosx-version-min=10.3"
bjornroche's avatar
bjornroche committed
213 214
              mac_arches="-arch i386 -arch ppc -arch x86_64 -arch ppc64"
              mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
215 216 217 218 219 220 221 222
           elif [[ -d /Developer/SDKs/MacOSX10.6.sdk ]] ; then
              mac_version_min="-mmacosx-version-min=10.4"
              mac_arches="-arch i386 -arch x86_64"
              mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.6.sdk"
           elif [[ -d /Developer/SDKs/MacOSX10.7.sdk ]] ; then
              mac_version_min="-mmacosx-version-min=10.4"
              mac_arches="-arch i386 -arch x86_64"
              mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.7.sdk"
bjornroche's avatar
bjornroche committed
223
           else
224
              mac_version_min="-mmacosx-version-min=10.3"
bjornroche's avatar
bjornroche committed
225 226 227 228 229 230 231 232 233 234 235 236 237
              mac_arches="-arch i386 -arch ppc"
              mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
           fi
        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"
        ;;
238

239
  mingw* )
bjornroche's avatar
bjornroche committed
240
        dnl MingW configuration
241

242 243 244
        PADLL="portaudio.dll"
        THREAD_CFLAGS="-mthreads"
        SHARED_FLAGS="-shared"
245
        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"
246 247 248

        if [[ "x$with_directx" = "xyes" ]]; then
            DXDIR="$with_dxdir"
249
            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
bjornroche's avatar
bjornroche committed
250
            LIBS="-lwinmm -lm -ldsound -lole32"
251
            DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -ldsound -lole32"
bjornroche's avatar
bjornroche committed
252 253
            #VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
            #CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
254
            CFLAGS="$CFLAGS -I$DXDIR/include -UPA_USE_DS -DPA_USE_DS=1"
255 256 257 258
        fi

        if [[ "x$with_asio" = "xyes" ]]; then
            ASIODIR="$with_asiodir"
259
            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
260 261
            LIBS="-lwinmm -lm -lole32 -luuid"
            DLL_LIBS="${DLL_LIBS} -lwinmm -lm -lole32 -luuid"
262
            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"
263 264 265 266 267 268 269

            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"
            
bjornroche's avatar
bjornroche committed
270
            CXXFLAGS="$CFLAGS"
271 272 273 274
        fi

        if [[ "x$with_wdmks" = "xyes" ]]; then
            DXDIR="$with_dxdir"
275
            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_util.o src/os/win/pa_win_waveformat.o
bjornroche's avatar
bjornroche committed
276
            LIBS="-lwinmm -lm -luuid -lsetupapi -lole32"
277
            DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32"
bjornroche's avatar
bjornroche committed
278 279
            #VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\""
            #CFLAGS="$CFLAGS -I$VC98 -DPA_NO_WMME -DPA_NO_ASIO"
280
            CFLAGS="$CFLAGS -I$DXDIR/include -UPA_USE_WDMKS -DPA_USE_WDMKS=1"
281 282 283 284 285
        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="-lwinmm -lm -lole32 -luuid"
bjornroche's avatar
bjornroche committed
286
            DLL_LIBS="${DLL_LIBS} -lwinmm"
287
            CFLAGS="$CFLAGS -UPA_USE_WMME -DPA_USE_WMME=1"
bjornroche's avatar
bjornroche committed
288
        fi
dmitrykos's avatar
dmitrykos committed
289 290

        if [[ "x$with_wasapi" = "xyes" ]]; then
291
            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
dmitrykos's avatar
dmitrykos committed
292
            LIBS="-lwinmm -lm -lole32 -luuid"
dmitrykos's avatar
dmitrykos committed
293
            DLL_LIBS="${DLL_LIBS} -lwinmm -lole32"
294
            CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hostapi/wasapi/mingw-include -UPA_USE_WASAPI -DPA_USE_WASAPI=1"
dmitrykos's avatar
dmitrykos committed
295
        fi
bjornroche's avatar
bjornroche committed
296
        ;;
297

298
  cygwin* )
bjornroche's avatar
bjornroche committed
299 300 301
        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"
302
        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"
bjornroche's avatar
bjornroche committed
303 304 305 306 307 308
        LIBS="-lwinmm -lm"
        PADLL="portaudio.dll"
        THREAD_CFLAGS="-mthreads"
        SHARED_FLAGS="-shared"
        DLL_LIBS="${DLL_LIBS} -lwinmm"
        ;;
309

bjornroche's avatar
bjornroche committed
310 311 312 313 314 315 316 317 318 319 320
  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
321 322
        AC_DEFINE(PA_USE_SGI,1)

323
        CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
bjornroche's avatar
bjornroche committed
324 325 326 327 328 329 330 331 332 333 334 335 336

        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=""
        ;;
337

338
  *)
bjornroche's avatar
bjornroche committed
339
        dnl Unix configuration
340

341
        CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix"
342
        
bjornroche's avatar
bjornroche committed
343
        AC_CHECK_LIB(pthread, pthread_create,[have_pthread="yes"],
344 345
                AC_MSG_ERROR([libpthread not found!]))

346
        if [[ "$have_alsa" = "yes" ] && [ "$with_alsa" != "no" ]] ; then
bjornroche's avatar
bjornroche committed
347 348 349
           DLL_LIBS="$DLL_LIBS -lasound"
           LIBS="$LIBS -lasound"
           OTHER_OBJS="$OTHER_OBJS src/hostapi/alsa/pa_linux_alsa.o"
350
           INCLUDES="$INCLUDES pa_linux_alsa.h"
351
           AC_DEFINE(PA_USE_ALSA,1)
bjornroche's avatar
bjornroche committed
352 353
        fi

354
        if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
bjornroche's avatar
bjornroche committed
355 356 357
           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"
358
           INCLUDES="$INCLUDES pa_jack.h"
359
           AC_DEFINE(PA_USE_JACK,1)
bjornroche's avatar
bjornroche committed
360 361
        fi

362
        if [[ "$with_oss" != "no" ]] ; then
bjornroche's avatar
bjornroche committed
363
           OTHER_OBJS="$OTHER_OBJS src/hostapi/oss/pa_unix_oss.o"
364
           if [[ "$have_libossaudio" = "yes" ]] ; then
bjornroche's avatar
bjornroche committed
365 366
                   DLL_LIBS="$DLL_LIBS -lossaudio"
                   LIBS="$LIBS -lossaudio"
367
           fi
368
           AC_DEFINE(PA_USE_OSS,1)
bjornroche's avatar
bjornroche committed
369
        fi
370

371
        if [[ "$have_asihpi" = "yes" ] && [ "$with_asihpi" != "no" ]] ; then
bjornroche's avatar
bjornroche committed
372 373 374
           LIBS="$LIBS -lhpi"
           DLL_LIBS="$DLL_LIBS -lhpi"
           OTHER_OBJS="$OTHER_OBJS src/hostapi/asihpi/pa_linux_asihpi.o"
375
           AC_DEFINE(PA_USE_ASIHPI,1)
bjornroche's avatar
bjornroche committed
376
        fi
377

bjornroche's avatar
bjornroche committed
378 379 380 381 382 383 384 385 386 387 388
        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"
              ;;
           *)
389
              SHARED_FLAGS="-fPIC"
bjornroche's avatar
bjornroche committed
390 391 392 393 394 395 396 397
              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"

398 399
test "$enable_shared" != "yes" && SHARED_FLAGS=""

bjornroche's avatar
bjornroche committed
400 401 402 403 404 405 406 407 408 409
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)
410

411 412 413 414 415 416 417 418 419 420
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)

bjornroche's avatar
bjornroche committed
421
AC_OUTPUT([Makefile portaudio-2.0.pc])
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440

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})"
dmitrykos's avatar
dmitrykos committed
441
        test "x$with_wasapi" = "xyes"
442 443 444 445
        AC_MSG_RESULT([
  WMME ........................ $with_wmme
  DSound ...................... $with_directx
  ASIO ........................ $with_asio
dmitrykos's avatar
dmitrykos committed
446 447
  WASAPI ...................... $with_wasapi
  WDMKS ....................... $with_wdmks
448 449 450 451 452 453 454 455 456 457 458 459 460 461
])
        ;;
    *darwin*)
        AC_MSG_RESULT([
  Mac debug flags ............. $enable_mac_debug
])
        ;;
     *)
	AC_MSG_RESULT([
  OSS ......................... $have_oss
  JACK ........................ $have_jack
])
        ;;
esac