-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathconfigure.ac
75 lines (63 loc) · 2.49 KB
/
configure.ac
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([vban_receptor], [v0.8.6], [[email protected]])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/vban/vban.h])
# Checks for programs.
AC_PROG_CC
AC_LANG(C)
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h inttypes.h netinet/in.h stddef.h stdlib.h string.h sys/socket.h unistd.h], [], [AC_MSG_ERROR(Missing some system headers)])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([inet_ntoa memset socket strerror], [], [AC_MSG_ERROR(Missing some system functions)])
# Manage conditional alsa enabling
AC_ARG_ENABLE([alsa],
[ --enable-alsa Turn on alsa backend ],
[case "${enableval}" in
yes) alsa=true ;;
no) alsa=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-alsa. default is yes]) ;;
esac],[alsa=true])
AM_CONDITIONAL([ALSA], [test x$alsa = xtrue])
AM_COND_IF([ALSA],
[AC_CHECK_HEADERS([alsa/asoundlib.h], [], [AC_MSG_ERROR(Missing ALSA headers)])
AC_CHECK_LIB([asound], [snd_pcm_open], [], [AC_MSG_ERROR(Missing ALSA library)])],
[:]
)
# Manage conditional pulseaudio enabling
AC_ARG_ENABLE([pulseaudio],
[ --enable-pulseaudio Turn on pulseaudio backend ],
[case "${enableval}" in
yes) pulseaudio=true ;;
no) pulseaudio=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-pulseaudio. default is yes]) ;;
esac],[pulseaudio=true])
AM_CONDITIONAL([PULSEAUDIO], [test x$pulseaudio = xtrue])
AM_COND_IF([PULSEAUDIO],
[AC_CHECK_HEADERS([pulse/simple.h], [], [AC_MSG_ERROR(Missing pulseaudio headers)])
AC_CHECK_HEADERS([pulse/error.h], [], [AC_MSG_ERROR(Missing pulseaudio headers)])
AC_CHECK_LIB([pulse-simple], [pa_simple_new], [], [AC_MSG_ERROR(Missing pulseaudio library)])
AC_CHECK_LIB([pulse], [pa_strerror], [], [AC_MSG_ERROR(Missing pulseaudio library)])],
[:]
)
# Manage conditional jackd enabling
AC_ARG_ENABLE([jack],
[ --enable-jack Turn on jack backend ],
[case "${enableval}" in
yes) jack=true ;;
no) jack=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-jack. default is yes]) ;;
esac],[jack=true])
AM_CONDITIONAL([JACK], [test x$jack = xtrue])
AM_COND_IF([JACK],
[AC_CHECK_HEADERS([jack/jack.h], [], [AC_MSG_ERROR(Missing jack headers)])
AC_CHECK_LIB([jack], [jack_client_open], [], [AC_MSG_ERROR(Missing jack library)])],
[:]
)
AC_OUTPUT(Makefile src/Makefile)