blob: d3a9946c7ff99c868a46cd9385fee210b7eedc6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
dnl
dnl PortAudio 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 Extra variables we want to substitute
AC_SUBST(OTHER_OBJS)
AC_SUBST(PADLL)
AC_SUBST(SHARED_FLAGS)
AC_SUBST(DLL_LIBS)
dnl Determine the host operating system / platform
AC_CANONICAL_HOST
case "${host_os}" in
darwin* )
dnl Mac OS X configuration
OTHER_OBJS="pa_mac_core/pa_mac_core.o";
LIBS="-framework CoreAudio -lm";
PADLL="libportaudio.dylib";
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!]))
OTHER_OBJS="pa_unix_oss/pa_unix_oss.o pa_unix_oss/pa_unix.o";
LIBS="-lm -lpthread";
PADLL="libportaudio.so";
SHARED_FLAGS="-shared";
esac
AC_OUTPUT([Makefile])
echo ""
echo "Finished configure."
echo ""
echo "Type 'make' to build PortAudio and examples."
|