File: configure.ac

package info (click to toggle)
ghostess 20120105-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch, wheezy
  • size: 1,704 kB
  • ctags: 642
  • sloc: sh: 10,958; ansic: 5,995; makefile: 53
file content (98 lines) | stat: -rw-r--r-- 2,599 bytes parent folder | download
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
dnl Process this file with autoconf to produce a configure script.

AC_INIT(ghostess, 20120105, musound-at-jps-dot-net)

AC_CONFIG_SRCDIR(src/ghostess.c)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)

AC_PROG_CC

dnl AC_ENABLE_STATIC(no)
dnl AC_ENABLE_SHARED(yes)
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL

AC_C_BIGENDIAN

dnl Check for GTK+
AM_PATH_GTK_2_0(2.8.0)

dnl OS specific checks
case "${host_os}" in
darwin*)
  darwin=yes
  AC_DEFINE(MIDI_COREMIDI, 1, [Define for CoreMIDI support on Mac OS X])
  PKG_CHECK_MODULES(ALSA, libdssialsacompat)
  ;;
*)
  darwin=no
  PKG_CHECK_MODULES(ALSA, alsa >= 0.9.0)
  ;;
esac
AM_CONDITIONAL(DARWIN, test x$darwin = xyes)

dnl Check for LADSPA
AC_CHECK_HEADERS(ladspa.h)

dnl Require DSSI and liblo
PKG_CHECK_MODULES(MODULE, dssi >= 0.9 liblo >= 0.12)

dnl Check for JACK: need jack 0.99.14+ for jack_client_open()
PKG_CHECK_MODULES(JACK, jack >= 0.99.14)
AC_SUBST(JACK_CFLAGS)
AC_SUBST(JACK_LIBS)

dnl Check for JACK MIDI support
AC_ARG_WITH(jackmidi,AC_HELP_STRING([--with-jackmidi], [default=yes]),
	[ if test $withval = "yes";then with_jack_midi=yes;
		else with_jack_midi=no; fi ])
if test x${with_jack_midi} = 'xyes'; then
AC_CHECK_LIB(jack, jack_midi_get_event_count,
             [with_jack_midi=yes
              AC_DEFINE(MIDI_JACK, 1, [Define for JACK MIDI support])],
             with_jack_midi=no, $JACK_LIBS)
else if test x${darwin} = 'xno'; then
	AC_DEFINE(MIDI_ALSA, 1, [Define for ALSA MIDI support on Linux])
fi fi
AM_CONDITIONAL(MIDI_JACK, test x$with_jack_midi = xyes)

saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $JACK_CFLAGS"
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $JACK_CFLAGS"
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $JACK_LIBS"
AC_CHECK_HEADER( jack/session.h, have_jack_session="yes", have_jack_session="no" )
if test x${have_jack_session} = 'xyes'; then
	AC_DEFINE(JACK_SESSION, 1, [Define for JACK session support])
fi
CFLAGS="$saved_CFLAGS"
CPPFLAGS="$saved_CPPFLAGS"
LDFLAGS="$saved_LDFLAGS"

dnl Use lotsa flags if we have gcc.
CFLAGS="$CFLAGS $ALSA_CFLAGS $MODULE_CFLAGS"
LDFLAGS="$LDFLAGS $ALSA_LIBS $MODULE_LIBS"
changequote(,)dnl
if test "x$GCC" = "xyes"; then
  case " $CFLAGS " in
  *[\ \	]-Wall[\ \	]*) ;;
  *) CFLAGS="$CFLAGS -Wall" ;;
  esac
  case " $CFLAGS " in
  *[\ \	]-O[1-9][\ \	]*) ;;
  *) CFLAGS="$CFLAGS -O2 -s -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math -Winline" ;;
  esac
  # add '-finline-limit=...' only for GCC 3.x:
  #case `$CC -dumpversion 2>/dev/null` in
  #3.*) CFLAGS="$CFLAGS -finline-limit=5000" ;;
  #esac
fi
changequote([,])dnl

AC_OUTPUT([
Makefile
src/Makefile
])