aboutsummaryrefslogtreecommitdiff
path: root/pd/portaudio/configure.in
diff options
context:
space:
mode:
authorGuenter Geiger <ggeiger@users.sourceforge.net>2003-05-09 16:04:00 +0000
committerGuenter Geiger <ggeiger@users.sourceforge.net>2003-05-09 16:04:00 +0000
commit9c0e19a3be2288db79e2502e5fa450c3e20a668d (patch)
treeca97ce615e037a533304fc4660dcf372ca3b9cd6 /pd/portaudio/configure.in
parentef50dd62804d54af7da18d8bd8413c0dccd729b8 (diff)
This commit was generated by cvs2svn to compensate for changes in r610,
which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=611
Diffstat (limited to 'pd/portaudio/configure.in')
-rw-r--r--pd/portaudio/configure.in123
1 files changed, 123 insertions, 0 deletions
diff --git a/pd/portaudio/configure.in b/pd/portaudio/configure.in
new file mode 100644
index 00000000..edb0fe11
--- /dev/null
+++ b/pd/portaudio/configure.in
@@ -0,0 +1,123 @@
+dnl
+dnl portaudio V19 configure.in script
+dnl
+dnl Dominic Mazzoni
+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
+AC_INIT([pa_common/portaudio.h])
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_PROG_INSTALL
+AC_PATH_PROG(AR, ar, no)
+if [[ $AR = "no" ]] ; then
+ AC_MSG_ERROR("Could not find ar - needed to create a library");
+fi
+
+dnl This must be one of the first tests we do or it will fail...
+AC_C_BIGENDIAN
+
+dnl extra variables
+AC_SUBST(OTHER_OBJS)
+AC_SUBST(PADLL)
+AC_SUBST(SHARED_FLAGS)
+AC_SUBST(DLL_LIBS)
+
+dnl checks for various host APIs and arguments to configure that
+dnl turn them on or off
+
+AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
+
+PKG_CHECK_MODULES(JACK, jack, have_jack=yes, have_jack=no)
+
+AC_ARG_WITH(alsa,
+ [ --with-alsa (default=auto)],
+ with_alsa=$withval, with_alsa="yes")
+
+AC_ARG_WITH(jack,
+ [ --with-jack (default=auto)],
+ with_jack=$withval, with_jack="yes")
+
+AC_ARG_WITH(oss,
+ [ --with-oss (default=yes)],
+ with_oss=$withval, with_oss="yes")
+
+CFLAGS="-g -O2 -Wall"
+
+if [[ $ac_cv_c_bigendian = "yes" ]] ; then
+ CFLAGS="$CFLAGS -DPA_BIG_ENDIAN"
+else
+ CFLAGS="$CFLAGS -DPA_LITTLE_ENDIAN"
+fi
+
+case "${host_os}" in
+ darwin* )
+ dnl Mac OS X configuration
+
+ OTHER_OBJS="pa_mac_core/pa_mac_core.o";
+ LIBS="-framework AudioUnit -framework AudioToolbox -framework CoreAudio";
+ PADLL="libportaudio.dylib";
+ SHARED_FLAGS="-framework AudioUnit -framework AudioToolbox";
+ SHARED_FLAGS="$SHARED_FLAGS -framework CoreAudio -dynamiclib";
+ ;;
+
+ mingw* )
+ dnl MingW configuration
+
+ OTHER_OBJS="pa_win_wmme/pa_win_wmme.o";
+ LIBS="-lwinmm -lm";
+ PADLL="portaudio.dll";
+ SHARED_FLAGS="-shared -mthreads";
+ DLL_LIBS="-lwinmm";
+ ;;
+
+ cygwin* )
+ dnl Cygwin configuration
+
+ OTHER_OBJS="pa_win_wmme/pa_win_wmme.o";
+ LIBS="-lwinmm -lm";
+ PADLL="portaudio.dll";
+ SHARED_FLAGS="-shared -mthreads";
+ DLL_LIBS="-lwinmm";
+ ;;
+
+ *)
+ dnl Unix OSS configuration
+
+ AC_CHECK_LIB(pthread, pthread_create,
+ ,
+ AC_MSG_ERROR([libpthread not found!]))
+
+ if [[ $have_alsa = "yes" ] && [ $with_alsa != "no" ]] ; then
+ LIBS="$LIBS -lasound"
+ OTHER_OBJS="$OTHER_OBJS pa_linux_alsa/pa_linux_alsa.o"
+ OTHER_OBJS="$OTHER_OBJS pa_linux_alsa/callback_thread.o"
+ OTHER_OBJS="$OTHER_OBJS pa_linux_alsa/blocking_calls.o"
+ AC_DEFINE(PA_USE_ALSA)
+ fi
+
+ if [[ $have_jack = "yes" ] && [ $with_jack != "no" ]] ; then
+ LIBS="$LIBS $JACK_LIBS"
+ CFLAGS="$CFLAGS $JACK_CFLAGS"
+ OTHER_OBJS="$OTHER_OBJS pa_jack/pa_jack.o"
+ AC_DEFINE(PA_USE_JACK)
+ fi
+
+ if [[ $with_oss != "no" ]] ; then
+ OTHER_OBJS="$OTHER_OBJS pa_unix_oss/pa_unix_oss.o"
+ AC_DEFINE(PA_USE_OSS)
+ fi
+ LIBS="$LIBS -lm -lpthread";
+ PADLL="libportaudio.so";
+ SHARED_FLAGS="-shared";
+
+ OTHER_OBJS="$OTHER_OBJS pa_unix/pa_unix_hostapis.o pa_unix/pa_unix_util.o"
+esac
+
+AC_OUTPUT([Makefile])