forked from Stazed/seq42
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
144 lines (117 loc) · 4.19 KB
/
configure.ac
File metadata and controls
144 lines (117 loc) · 4.19 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
dnl Process this file with autoconf to produce a configure script.
AC_INIT(seq42, [1.1.3], [stazed@mapson.com])
AC_CONFIG_SRCDIR([src/event.cpp])
AC_CONFIG_HEADER([src/config.h])
AC_CONFIG_MACRO_DIRS([m4])
AM_INIT_AUTOMAKE([dist-bzip2])
AC_DEFINE(_GNU_SOURCE, 1, [gnu source])
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AX_CXX_COMPILE_STDCXX_11(noext,mandatory)
dnl Do we have -Wl,--as-needed?
AC_MSG_CHECKING(if --as-needed works)
AC_ARG_ENABLE(as_needed,[ --enable-as-needed enable -Wl,--as-needed],
[
case "${enableval}" in
yes) as_needed="1";;
no) as_needed="";;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-as_needed);;
esac
],[
as_needed="unknown"
])
if test x"${as_needed}" = x"unknown"; then
ac_old_ldflags="${LDFLAGS}"
LDFLAGS="-Wl,--as-needed"
AC_TRY_LINK(
[],
[],
[as_needed="1"],
[as_needed=""])
LDFLAGS="${ac_old_ldflags}"
fi
if test -n "$as_needed"; then
AC_MSG_RESULT(yes)
LDFLAGS="${LDFLAGS} -Wl,--as-needed"
else
AC_MSG_RESULT(no)
fi
dnl Checks for libraries.
AC_CHECK_LIB(rt, main, ,
AC_MSG_ERROR([POSIX.1b RealTime Library Missing -lrt]))
AC_CHECK_LIB(gtkmm-2.4, _init,,
AC_MSG_ERROR(Essential library libgtkmm-2.4 not found))
AC_CHECK_LIB(sigc-2.0, main,,
AC_MSG_ERROR(Essential library libsigc++-2.0 not found))
AC_CHECK_LIB(asound, snd_pcm_open,,
AC_MSG_ERROR(Essential library asound not found))
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
dnl Checks for library functions.
AC_CHECK_FUNCS(select)
AM_PATH_ALSA(0.9.0)
####AM_PATH_GTKMM(1.2.0) OLD
PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.4.0)
AC_SUBST(GTKMM_CFLAGS)
AC_SUBST(GTKMM_LIBS)
dnl
dnl JACK SUPPORT
dnl
jack_support=yes
AC_ARG_ENABLE(jack-support, [AS_HELP_STRING(--disable-jack-support, [Compile without JACK support])], [jack_support=$enableval])
JACK_SUPPORT=0
if test "$jack_support" != "no"; then
PKG_CHECK_MODULES(JACK, jack >= 0.90.0, jack_found="yes", jack_found="no")
if test "$jack_found" = "yes"; then
JACK_SUPPORT=1
AC_DEFINE(JACK_SUPPORT, 1, [Define to enable JACK driver])
USER_LDFLAGS="${USER_LDFLAGS} $(pkg-config --libs jack )"
features_list="${features_list} (Jack)"
AC_CHECK_HEADER(jack/session.h, jack_session_found="yes", jack_session_found="no")
if test "$jack_session_found" = "yes"; then
AC_DEFINE(JACK_SESSION, 1, [Define to enable jack session support])
fi
else
AC_MSG_WARN([ *** Could not find the JACK library, disabling JACK support])
fi
fi
AC_SUBST(JACK_CFLAGS)
AC_SUBST(JACK_LIBS)
dnl
dnl LASH SUPPORT
dnl
lash_support="yes"
AC_ARG_ENABLE(lash,
[AS_HELP_STRING(--enable-lash, [Enable LASH session management support (true)])],
[ if test x$enable_lash = xno ; then lash_support=no ; fi ])
lash_found="no"
if test "$lash_support" = "yes"; then
PKG_CHECK_MODULES(LASH, lash-1.0 >= 0.5.0, lash_found="yes", lash_found="no")
if test "$lash_found" = "yes"; then
AC_DEFINE(LASH_SUPPORT, 1, [Define to enable LASH support])
AC_SUBST(LASH_CFLAGS)
AC_SUBST(LASH_LIBS)
else
AC_MSG_WARN([ *** LASH not found, session support will not be built.])
fi
else
AC_MSG_WARN([ *** LASH support not enabled.]);
fi
dnl
dnl MIDI CONTROL SUPPORT
dnl
midi_control="yes"
AC_ARG_ENABLE(midi_control, [AS_HELP_STRING(--disable-midi-control, [Disable MIDI transport control support])], [midi_control=$enableval])
if test "$midi_control" = "yes"; then
AC_DEFINE(MIDI_CONTROL_SUPPORT, 1, [Define to enable MIDI transport control support])
else
AC_MSG_WARN([ *** MIDI control support not enabled.]);
fi
AC_OUTPUT(Makefile man/Makefile icons/Makefile src/Makefile src/pixmaps/Makefile)