2 # Process this file with autoconf to produce a configure script.
4 # This file is part of gmidimonitor
6 # Copyright (C) 2007,2008 Nedko Arnaudov <nedko@arnaudov.name>
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; version 2 of the License
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
23 AC_INIT(gmidimonitor, 3.4)
24 AC_CONFIG_AUX_DIR(config)
25 AM_INIT_AUTOMAKE(gmidimonitor, 3.4)
26 AC_CONFIG_HEADER([config.h])
28 #AS_AC_EXPAND(DATADIR, $datadir)
31 # Checks for programs.
35 # Checks for libraries.
37 PKG_CHECK_MODULES(GTK, gtk+-2.0)
39 PKG_CHECK_MODULES(LIBGLADE, libglade-2.0)
41 PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
43 PKG_CHECK_MODULES(GMODULE, gmodule-2.0)
46 have_alsamidi="unknown"
47 AC_ARG_ENABLE(alsamidi, [AS_HELP_STRING(--disable-alsamidi, [Force disable ALSA MIDI support [default=no]])], [ have_alsamidi="no" ])
48 if test "$have_alsamidi" = "unknown"
50 PKG_CHECK_MODULES(ALSA, alsa, AC_DEFINE([HAVE_ALSA_MIDI], [], [Defined if we have ALSA MIDI support.]) have_alsamidi="yes")
53 AM_CONDITIONAL(HAVE_ALSA_MIDI, test "$have_alsamidi" = "yes")
56 have_jackmidi="unknown"
57 AC_ARG_ENABLE(jackmidi, [AS_HELP_STRING(--disable-jackmidi, [Force disable JACK MIDI support [default=no]])], [ have_jackmidi="no" ])
58 if test "$have_jackmidi" = "unknown"
60 PKG_CHECK_MODULES(JACK_MIDI, jack >= 0.102.0, AC_DEFINE([HAVE_JACK_MIDI], [], [Defined if we have JACK MIDI support.]) have_jackmidi="yes")
61 if test "$have_jackmidi" = "yes"
63 PKG_CHECK_MODULES(OLD_JACK_MIDI, jack < 0.102.27, have_jackmidi="yes (old one)" AC_DEFINE(HAVE_OLD_JACK_MIDI, 1, [whether or not we building against old JACK MIDI (0.102.20)]), echo -n)
67 AM_CONDITIONAL(HAVE_JACK_MIDI, test "$have_jackmidi" = "yes" -o "$have_jackmidi" = "yes (old one)")
69 if test "$have_alsamidi" != "yes" -a "$have_jackmidi" != "yes" -a "$have_jackmidi" != "yes (old one)"
71 AC_MSG_ERROR([Neighter ALSA nor JACK MIDI is available.])
73 AC_JACK_MIDI_NFRAMES_CHECK()
74 if test "$jackmidi_nframes" = "yes"
76 AC_DEFINE([JACK_MIDI_NEEDS_NFRAMES], 1, [Defined if we JACK MIDI functions need nframes parameter.])
82 AC_ARG_ENABLE(lash, [AS_HELP_STRING(--disable-lash, [Force disable LASH support [default=no]])], [ have_lash="no" ])
83 if test "$have_lash" = "unknown"
85 PKG_CHECK_MODULES(LASH, lash-1.0, AC_DEFINE([HAVE_LASH], [], [Defined if we have LASH support.]) have_lash="yes")
88 AC_CONFIG_FILES([Makefile])
92 AC_MSG_RESULT([**********************************************************************])
94 AC_MSG_RESULT([Prefix: $prefix])
96 AC_MSG_RESULT([JACK MIDI support: $have_jackmidi])
97 AC_MSG_RESULT([ALSA MIDI support: $have_alsamidi])
98 AC_MSG_RESULT([LASH support: $have_lash])
100 AC_MSG_RESULT([**********************************************************************])