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.
root / src / portaudio_20161030_catalina_patch / bindings / cpp / build / gnu / configure.ac @ 162:d43aab368df9
History | View | Annotate | Download (6.04 KB)
| 1 |
# |
|---|---|
| 2 |
# PortAudioCpp V19 autoconf input file |
| 3 |
# Shamelessly ripped from the PortAudio one by Dominic Mazzoni |
| 4 |
# Ludwig Schwardt |
| 5 |
# |
| 6 |
|
| 7 |
# Require autoconf >= 2.13 |
| 8 |
AC_PREREQ(2.13) |
| 9 |
|
| 10 |
AC_INIT([PortAudioCpp], [12]) |
| 11 |
AC_CONFIG_SRCDIR([../../include/portaudiocpp/PortAudioCpp.hxx]) |
| 12 |
|
| 13 |
###### Top-level directory of pacpp |
| 14 |
###### This makes it easy to shuffle the build directories |
| 15 |
###### Also edit AC_CONFIG_SRCDIR above (wouldn't accept this variable)! |
| 16 |
PACPP_ROOT="../.." |
| 17 |
|
| 18 |
###### |
| 19 |
###### SET THIS TO PORTAUDIO DIRECTORY |
| 20 |
###### |
| 21 |
PORTAUDIO="$PACPP_ROOT/../portaudio" |
| 22 |
|
| 23 |
# Various other variables and flags |
| 24 |
|
| 25 |
PACPP_INC="$PACPP_ROOT/include" |
| 26 |
INCLUDES="-I$PACPP_INC -I$PORTAUDIO -I$PORTAUDIO/pa_common" |
| 27 |
CFLAGS="-g -O2 -Wall -ansi -pedantic $INCLUDES" |
| 28 |
CXXFLAGS="$CFLAGS" |
| 29 |
PALIBDIR="$PORTAUDIO/lib" |
| 30 |
|
| 31 |
# Checks for programs |
| 32 |
|
| 33 |
AC_PROG_CC |
| 34 |
AC_PROG_CXX |
| 35 |
AC_PROG_LN_S |
| 36 |
AC_PROG_RANLIB |
| 37 |
AC_PROG_INSTALL |
| 38 |
AC_PATH_PROG(AR, ar, no) |
| 39 |
if [[ $AR = "no" ]] ; then |
| 40 |
AC_MSG_ERROR("Could not find ar - needed to create a library");
|
| 41 |
fi |
| 42 |
|
| 43 |
# This must be one of the first tests we do or it will fail... |
| 44 |
AC_C_BIGENDIAN |
| 45 |
|
| 46 |
# Transfer these variables to the Makefile |
| 47 |
AC_SUBST(PACPP_ROOT) |
| 48 |
AC_SUBST(PORTAUDIO) |
| 49 |
AC_SUBST(PADLL) |
| 50 |
AC_SUBST(PACPP_DLL) |
| 51 |
AC_SUBST(PACPP_INC) |
| 52 |
AC_SUBST(SHARED_FLAGS) |
| 53 |
AC_SUBST(DLL_LIBS) |
| 54 |
AC_SUBST(CXXFLAGS) |
| 55 |
|
| 56 |
##################### CHECK FOR INSTALLED PACKAGES ############################ |
| 57 |
|
| 58 |
# checks for various host APIs and arguments to configure that |
| 59 |
# turn them on or off |
| 60 |
|
| 61 |
AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no) |
| 62 |
|
| 63 |
# Determine the host description for the subsequent test. |
| 64 |
# PKG_CHECK_MODULES seems to check and set the host variable also, but |
| 65 |
# that then requires pkg-config availability which is not standard on |
| 66 |
# MinGW systems and can be a pain to install. |
| 67 |
AC_CANONICAL_HOST |
| 68 |
|
| 69 |
PKG_CHECK_MODULES(JACK, jack, have_jack=yes, have_jack=no) |
| 70 |
|
| 71 |
AC_ARG_WITH(alsa, |
| 72 |
[ --with-alsa (default=auto)], |
| 73 |
with_alsa=$withval, with_alsa="yes") |
| 74 |
|
| 75 |
AC_ARG_WITH(jack, |
| 76 |
[ --with-jack (default=auto)], |
| 77 |
with_jack=$withval, with_jack="yes") |
| 78 |
|
| 79 |
AC_ARG_WITH(oss, |
| 80 |
[ --with-oss (default=yes)], |
| 81 |
with_oss=$withval, with_oss="yes") |
| 82 |
|
| 83 |
AC_ARG_WITH(host_os, |
| 84 |
[ --with-host_os (no default)], |
| 85 |
host_os=$withval) |
| 86 |
|
| 87 |
AC_ARG_WITH(winapi, |
| 88 |
[ --with-winapi ((wmme/directx/asio) default=wmme)], |
| 89 |
with_winapi=$withval, with_winapi="wmme") |
| 90 |
|
| 91 |
# Mac API added for ASIO, can have other api's listed |
| 92 |
AC_ARG_WITH(macapi, |
| 93 |
[ --with-macapi (asio) default=asio)], |
| 94 |
with_macapi=$withval, with_macapi="asio") |
| 95 |
|
| 96 |
AC_ARG_WITH(asiodir, |
| 97 |
[ --with-asiodir (default=/usr/local/asiosdk2)], |
| 98 |
with_asiodir=$withval, with_asiodir="/usr/local/asiosdk2") |
| 99 |
|
| 100 |
AC_ARG_WITH(dxdir, |
| 101 |
[ --with-dxdir (default=/usr/local/dx7sdk)], |
| 102 |
with_dxdir=$withval, with_dxdir="/usr/local/dx7sdk") |
| 103 |
|
| 104 |
|
| 105 |
##################### HOST-SPECIFIC LIBRARY SETTINGS ########################## |
| 106 |
|
| 107 |
case "${host_os}" in
|
| 108 |
darwin* ) |
| 109 |
# Mac OS X configuration |
| 110 |
|
| 111 |
LIBS="-framework AudioUnit -framework AudioToolbox -framework CoreAudio"; |
| 112 |
PADLL="libportaudio.dylib"; |
| 113 |
PACPP_DLL="libportaudiocpp.dylib"; |
| 114 |
SHARED_FLAGS="-framework AudioUnit -framework AudioToolbox"; |
| 115 |
SHARED_FLAGS="$SHARED_FLAGS -framework CoreAudio -dynamiclib"; |
| 116 |
if [[ $with_macapi = "asio" ]] ; then |
| 117 |
if [[ $with_asiodir ]] ; then |
| 118 |
ASIODIR="$with_asiodir"; |
| 119 |
else |
| 120 |
ASIODIR="/usr/local/asiosdk2"; |
| 121 |
fi |
| 122 |
echo "ASIODIR: $ASIODIR"; |
| 123 |
fi |
| 124 |
;; |
| 125 |
|
| 126 |
mingw* ) |
| 127 |
# MingW configuration |
| 128 |
|
| 129 |
echo "WINAPI: $with_winapi" |
| 130 |
if [[ $with_winapi = "directx" ]] ; then |
| 131 |
if [[ $with_dxdir ]] ; then |
| 132 |
DXDIR="$with_dxdir"; |
| 133 |
else |
| 134 |
DXDIR="/usr/local/dx7sdk"; |
| 135 |
fi |
| 136 |
echo "DXDIR: $DXDIR" |
| 137 |
LIBS="-L$PALIBDIR -lportaudio" |
| 138 |
LIBS="$LIBS -lwinmm -lm -ldsound -lole32"; |
| 139 |
PADLL="portaudio.dll"; |
| 140 |
PACPP_DLL="portaudiocpp.dll"; |
| 141 |
SHARED_FLAGS="-shared -mthreads"; |
| 142 |
DLL_LIBS="-lwinmm -lm -L./dx7sdk/lib -ldsound -lole32"; |
| 143 |
CFLAGS="$CFLAGS -DPA_NO_WMME -DPA_NO_ASIO"; |
| 144 |
CXXFLAGS="$CFLAGS" |
| 145 |
elif [[ $with_winapi = "asio" ]] ; then |
| 146 |
if [[ $with_asiodir ]] ; then |
| 147 |
ASIODIR="$with_asiodir"; |
| 148 |
else |
| 149 |
ASIODIR="/usr/local/asiosdk2"; |
| 150 |
fi |
| 151 |
echo "ASIODIR: $ASIODIR" |
| 152 |
|
| 153 |
LIBS="-L$PALIBDIR -lportaudio" |
| 154 |
LIBS="$LIBS -lwinmm -lm -lstdc++ -lole32 -luuid"; |
| 155 |
PADLL="portaudio.dll"; |
| 156 |
PACPP_DLL="portaudiocpp.dll"; |
| 157 |
SHARED_FLAGS="-shared -mthreads"; |
| 158 |
DLL_LIBS="-lwinmm -lm -lstdc++ -lole32 -luuid"; |
| 159 |
CFLAGS="$CFLAGS -ffast-math -fomit-frame-pointer -DPA_NO_WMME -DPA_NO_DS -DWINDOWS"; |
| 160 |
CXXFLAGS="$CFLAGS"; |
| 161 |
else # WMME default |
| 162 |
LIBS="-L$PALIBDIR -lportaudio" |
| 163 |
LIBS="$LIBS -lwinmm -lm -lstdc++ -lole32 -luuid"; |
| 164 |
PADLL="portaudio.dll"; |
| 165 |
PACPP_DLL="portaudiocpp.dll"; |
| 166 |
SHARED_FLAGS="-shared -mthreads"; |
| 167 |
DLL_LIBS="-lwinmm"; |
| 168 |
CFLAGS="$CFLAGS -DPA_NO_DS -DPA_NO_ASIO"; |
| 169 |
CXXFLAGS="$CFLAGS"; |
| 170 |
fi |
| 171 |
;; |
| 172 |
|
| 173 |
cygwin* ) |
| 174 |
# Cygwin configuration |
| 175 |
|
| 176 |
LIBS="-L$PALIBDIR -lportaudio" |
| 177 |
LIBS="$LIBS -lwinmm -lm"; |
| 178 |
PADLL="portaudio.dll"; |
| 179 |
PACPP_DLL="portaudiocpp.dll"; |
| 180 |
SHARED_FLAGS="-shared -mthreads"; |
| 181 |
DLL_LIBS="-lwinmm"; |
| 182 |
;; |
| 183 |
|
| 184 |
*) |
| 185 |
# Unix OSS configuration |
| 186 |
|
| 187 |
AC_CHECK_LIB(pthread, pthread_create, |
| 188 |
, |
| 189 |
AC_MSG_ERROR([libpthread not found!])) |
| 190 |
|
| 191 |
LIBS="$LIBS -L$PALIBDIR -lportaudio" |
| 192 |
|
| 193 |
if [[ $have_jack = "yes" ] && [ $with_jack != "no" ]] ; then |
| 194 |
LIBS="$LIBS $JACK_LIBS" |
| 195 |
CFLAGS="$CFLAGS $JACK_CFLAGS" |
| 196 |
AC_DEFINE(PA_USE_JACK) |
| 197 |
fi |
| 198 |
|
| 199 |
if [[ $have_alsa = "yes" ] && [ $with_alsa != "no" ]] ; then |
| 200 |
LIBS="$LIBS -lasound" |
| 201 |
AC_DEFINE(PA_USE_ALSA) |
| 202 |
fi |
| 203 |
|
| 204 |
if [[ $with_oss != "no" ]] ; then |
| 205 |
AC_DEFINE(PA_USE_OSS) |
| 206 |
fi |
| 207 |
LIBS="$LIBS -lm -lpthread"; |
| 208 |
PADLL="libportaudio.so"; |
| 209 |
PACPP_DLL="libportaudiocpp.so"; |
| 210 |
SHARED_FLAGS="-shared"; |
| 211 |
esac |
| 212 |
|
| 213 |
AC_CONFIG_FILES([Makefile]) |
| 214 |
AC_OUTPUT |