-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfigure.in
124 lines (101 loc) · 3.46 KB
/
configure.in
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(seq42, [0.1.0], [[email protected]])
AC_CONFIG_SRCDIR([src/event.cpp])
AC_CONFIG_HEADER([src/config.h])
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
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)"
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
AC_OUTPUT(Makefile man/Makefile src/Makefile)