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
|
--- rtaudio-4.0.12/configure.ac
+++ rtaudio-4.0.12/configure.ac
@@ -25,9 +25,9 @@
AC_PROG_CXX(g++ CC c++ cxx)
AC_PROG_RANLIB
AC_PATH_PROG(AR, ar, no)
-if [[ $AR = "no" ]] ; then
- AC_MSG_ERROR("Could not find ar - needed to create a library");
-fi
+AS_IF([test "x$AR" == "x" ], [
+ AC_MSG_ERROR("Could not find ar - needed to create a library")
+])
# Checks for header files.
AC_HEADER_STDC
@@ -83,39 +83,46 @@
;;
*-*-linux*)
- AC_ARG_WITH(jack, [ --with-jack = choose JACK server support (mac and linux only)], [
+ AC_ARG_WITH([jack], AS_HELP_STRING([--with-jack], [choose JACK server support (mac and linux only)]))
+
+ AS_IF([test "x$with_jack" != "xno"], [
api="$api -D__UNIX_JACK__"
AC_MSG_RESULT(using JACK)
AC_CHECK_LIB(jack, jack_client_open, , AC_MSG_ERROR(JACK support requires the jack library!))
- AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(Jack support also requires the asound library!))], )
+ AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(Jack support also requires the asound library!))])
# Look for ALSA flag
- AC_ARG_WITH(alsa, [ --with-alsa = choose native ALSA API support (linux only)], [
+ AC_ARG_WITH([alsa], AS_HELP_STRING([--with-alsa], [choose native ALSA API support (linux only)]))
+
+ AS_IF([test "x$with_alsa" != "xno"], [
api="$api -D__LINUX_ALSA__"
req="$req alsa"
AC_MSG_RESULT(using ALSA)
- AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))], )
+ AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))])
# Look for PULSE flag
- AC_ARG_WITH(pulse, [ --with-pulse = choose PulseAudio API support (linux only)], [
+ AC_ARG_WITH([pulse], AS_HELP_STRING([--with-pulse], [choose PulseAudio API support (linux only)]))
+
+ AS_IF([test "x$with_pulse" != "xno"], [
api="$api -D__LINUX_PULSE__"
req="$req libpulse-simple"
AC_MSG_RESULT(using PulseAudio)
PKG_CHECK_MODULES([PULSE], [libpulse-simple], , AC_MSG_ERROR(PulseAudio support requires the pulse-simple library!))
- LIBS="$LIBS `pkg-config --libs libpulse-simple`" ], )
+ LIBS="$LIBS `pkg-config --libs libpulse-simple`" ])
# Look for OSS flag
- AC_ARG_WITH(oss, [ --with-oss = choose OSS API support (linux only)], [
+ AC_ARG_WITH([oss], AS_HELP_STRING([--with-oss], [choose OSS API support (linux only)]))
+
+ AS_IF([test "x$with_oss" != "xno"], [
api="$api -D__LINUX_OSS__"
- AC_MSG_RESULT(using OSS)], )
+ AC_MSG_RESULT(using OSS)])
# If no audio api flags specified, use ALSA
- if [test "$api" == "";] then
+ AS_IF([test "x$api" == "x"], [
AC_MSG_RESULT(using ALSA)
AC_SUBST( api, [-D__LINUX_ALSA__] )
req="$req alsa"
- AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))
- fi
+ AC_CHECK_LIB(asound, snd_pcm_open, , AC_MSG_ERROR(ALSA support requires the asound library!))])
AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtAudio requires the pthread library!))
;;
|