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 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# prereq & init
AC_PREREQ(2.60)
AC_INIT([giada], [0.16], [giadaloopmachine@gmail.com])
AC_CONFIG_SRCDIR([src/main.cpp])
AM_INIT_AUTOMAKE([subdir-objects])
# ------------------------------------------------------------------------------
# test the build environment. These vars are used in Makefile.am during
# the linking of the libraries.
# Usage: ./configure --target=[windows | linux | osx]
if test "$target" = ""; then
AC_MSG_ERROR(["target OS not specified. Please run ./configure --target=<windows | linux | freebsd | osx>"])
fi
case "$target" in
linux)
os=linux
;;
freebsd)
os=freebsd
;;
windows)
os=windows
;;
osx)
os=osx
;;
freebsd)
os=freebsd
;;
*)
AC_MSG_ERROR(["Unrecognised target OS: $target"])
;;
esac
AM_CONDITIONAL(LINUX, test "x$os" = "xlinux")
AM_CONDITIONAL(WINDOWS, test "x$os" = "xwindows")
AM_CONDITIONAL(OSX, test "x$os" = "xosx")
AM_CONDITIONAL(FREEBSD, test "x$os" = "xfreebsd")
# ------------------------------------------------------------------------------
# --enable-vst. VST compilation is disabled by default
#
# WITH_VST, if present, will be passed to gcc as -DWITH_VST
#
# AC_ARG_ENABLE (
# feature, [--enable-] + [feature], eg --enable-vst
# help-string,
# [action-if-given], == gcc ... -DWITH_VST
# [action-if-not-given]) not used here
AC_ARG_ENABLE(
[vst],
AS_HELP_STRING([--enable-vst], [enable vst support]),
[AC_DEFINE(WITH_VST) AM_CONDITIONAL(WITH_VST, true)],
[AM_CONDITIONAL(WITH_VST, false)]
)
# ------------------------------------------------------------------------------
# --enable-system-catch. If enabled, use the system-provided Catch. Use bundled
# version otherwise (default mode).
AC_ARG_ENABLE(
[system-catch],
AS_HELP_STRING([--enable-system-catch], [use system-provided Catch library]),
[AC_DEFINE(WITH_SYSTEM_CATCH) AM_CONDITIONAL(WITH_SYSTEM_CATCH, true)],
[AM_CONDITIONAL(WITH_SYSTEM_CATCH, false)]
)
# ------------------------------------------------------------------------------
# --debug. Enable debug compilation
AC_ARG_ENABLE(
[debug],
AS_HELP_STRING([--enable-debug], [enable debug mode (asserts, ...)]),
[],
[AC_DEFINE(NDEBUG)]
)
# ------------------------------------------------------------------------------
# Check for C++ compiler
AC_PROG_CXX
# Check for Objective-C++ compiler
AC_PROG_OBJCXX
# Check for make
AC_PROG_MAKE_SET
# ------------------------------------------------------------------------------
# Check for libraries.
AC_CHECK_LIB(
[pthread],
[pthread_exit],
[],
[AC_MSG_ERROR([error: library 'pthread' not found!])]
)
# ------------------------------------------------------------------------------
# Check for generic headers (fltk, rtaudio and libsndfile are static,
# we ask if headers are available)
AC_LANG_PUSH([C++])
AC_CHECK_HEADER(
[FL/Fl.H],
[],
[AC_MSG_ERROR([library 'fltk' not found!])]
)
AC_LANG_POP
PKG_CHECK_MODULES([RTMIDI], [rtmidi])
AC_LANG_PUSH([C++])
AC_CHECK_HEADER(
[sndfile.h],
[],
[AC_MSG_ERROR([library 'libsndfile' not found!])]
)
AC_LANG_POP
AC_LANG_PUSH([C++])
AC_CHECK_HEADER(
[samplerate.h],
[],
[AC_MSG_ERROR([library 'samplerate' not found!])]
)
AC_LANG_POP
# ------------------------------------------------------------------------------
# Check for linux header files.
if test "x$os" = "xlinux" || test "x$os" = "xfreebsd"; then
AC_LANG_PUSH([C++])
AC_CHECK_HEADER(
[X11/xpm.h],
[],
[AC_MSG_ERROR([missing xpm.h, maybe you need to install the libxpm-dev package?])]
)
AC_LANG_POP
fi
# ------------------------------------------------------------------------------
# finalizing
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
|