Fix crash on device reconnect. Use less ad-hoc method to display warnings on bad...
[calfbox.git] / configure.ac
blobe0625f3217dbfe635110b40638a44fcce3f98eaf
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ(2.63)
5 AC_INIT([calfbox],[0.0.3],[wdev@foltman.com])
6 AC_CONFIG_HEADER([config.h])
7 LT_LANG([C])
9 AM_INIT_AUTOMAKE(1.8)
11 if test "x$prefix" = "xNONE"; then 
12   prefix=$ac_default_prefix
15 # Checks for programs.
16 AC_PROG_CC_C99
17 AC_PROG_INSTALL
19 # Checks for headers.
20 AC_HEADER_STDC
22 # Set initial parameters
23 PYTHON_ENABLED="yes"
25 # Check options
27 AC_ARG_WITH(python,
28 AC_HELP_STRING([--without-python],[disable Python embedding]),
29   [if test "$withval" = "no"; then PYTHON_ENABLED="no"; fi],[])
30 AC_MSG_RESULT($PYTHON_ENABLED)
33 # Check dependencies
34 PKG_CHECK_MODULES(JACK_DEPS, jack >= 0.116.0, true, AC_MSG_ERROR([JACK is required]))
35 AC_CHECK_HEADER(jack/jack.h, true, AC_MSG_ERROR([JACK is required]))
36 AC_CHECK_HEADER(uuid/uuid.h, true, AC_MSG_ERROR([libuuid header (uuid/uuid.h) is required]))
37 AC_CHECK_LIB(uuid, uuid_unparse, true, AC_MSG_ERROR([libuuid is required]))
38 PKG_CHECK_MODULES(GLIB_DEPS, glib-2.0 >= 2.6, true, AC_MSG_ERROR([libglib-2.0 is required]))
39 PKG_CHECK_MODULES(FLUIDSYNTH_DEPS, fluidsynth >= 1.0.8, true, AC_MSG_ERROR([fluidsynth 1.0.8 is required]))
40 PKG_CHECK_MODULES(LIBUSB_DEPS, libusb-1.0 >= 1.0, true, AC_MSG_ERROR([libusb-1.0 is required]))
41 PKG_CHECK_MODULES(LIBSMF_DEPS, smf >= 1.3, true, AC_MSG_ERROR([libsmf 1.3 is required (libsmf.sourceforge.net)]))
42 PKG_CHECK_MODULES(LIBSNDFILE_DEPS, sndfile, true, AC_MSG_ERROR([libsndfile is required]))
44 if test "$PYTHON_ENABLED" = "yes"; then
45     PKG_CHECK_MODULES(PYTHON_DEPS, python3 >= 3.0, true, AC_MSG_ERROR([python 3.0 or newer is required (or use --without-python)]))
48 # Generate Automake conditionals
49 AM_CONDITIONAL(USE_PYTHON, test "$PYTHON_ENABLED" = "yes")
51 # Generate config.h conditionals
52 if test "$PYTHON_ENABLED" = "yes"; then
53     AC_DEFINE(USE_PYTHON, 1, [Python will be included])
57 # Generate files
58 AC_CONFIG_FILES([Makefile])
60 AC_OUTPUT