2
# Process this file with autoconf to produce a configure script.
5
AC_INIT(TOONLOOP, 2.0.6, [support@toonloop.com], [toonloop], [http://www.toonloop.com])
6
AC_CONFIG_HEADER([src/config.h])
7
AC_CONFIG_MACRO_DIR([m4]) # check for m4 macros in directory m4
11
# Check for C++ compiler
14
# Checks for header files.
16
AC_CHECK_HEADERS([arpa/inet.h stdlib.h string.h sys/ioctl.h unistd.h])
18
# Checks for typedefs, structures, and compiler characteristics.
23
AC_PROG_GCC_TRADITIONAL
24
AC_CHECK_FUNCS([inet_ntoa memset socket])
26
AC_CHECK_LIB([pthread],[pthread_exit],[AC_SUBST([LIBTHREAD_CXXFLAGS],["-lpthread"])])
27
AC_CHECK_LIB([m],[sin],[AC_SUBST([LIBM_CXXFLAGS],["-lm"])])
30
# TODO: print some message when configuring STK is OK
36
[AC_LANG_PROGRAM([ #include <stk/RtMidi.h> ],
38
[AC_SUBST(STK_LIBS," -lstk -lrt -lm")],
39
[AC_MSG_ERROR([libstk is not installed: alsa])])
40
LIBS=$SAVED_LIBS # restore them
41
AC_SUBST(STK_CXXFLAGS, "-D__LINUX_ALSA__ -D__UNIX_JACK__ -D__LITTLE_ENDIAN__")
45
#Set LIBLO with pkg-config
46
PKG_CHECK_MODULES(LIBLO, liblo, have_liblo=true, have_liblo=false)
47
if test "x${have_liblo}" = "xfalse" ; then
48
AC_MSG_ERROR([Missing liblo])
52
PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.12.9 glib-2.0 >= 2.16.6 gdk-2.0])
53
PKG_CHECK_MODULES([GST], [gstreamer-0.10 >= 0.10.0 gstreamer-interfaces-0.10 >= 0.10.19])
56
AC_SUBST([GTK_CFLAGS])
58
AC_SUBST([GST_CFLAGS])
61
PKG_CHECK_MODULES(GSTAPP, gstreamer-app-0.10, have_gstreamer_app=true, have_gstreamer_app=false)
62
if test "x${have_gstreamer_app}" = "xfalse" ; then
63
AC_MSG_ERROR([missing package: libgstreamer-plugins-base0.10-dev])
65
AC_SUBST([GSTAPP_LIBS])
68
PKG_CHECK_MODULES([CLUTTER], [clutter-1.0 >= 1.0], have_clutter=true, have_clutter=false)
69
if test "x${have_clutter}" = "xfalse" ; then
70
AC_MSG_ERROR([missing package: libclutter-1.0-dev])
72
AC_SUBST([CLUTTER_LIBS])
73
AC_SUBST([CLUTTER_CFLAGS])
75
# libjson-glib-dev and others
78
PKG_CHECK_MODULES([CLUTTERGTK], [clutter-gtk-0.10 >= 0.10], have_clutter_gtk=true, have_clutter_gtk=false)
79
if test "x${have_clutter_gtk}" = "xfalse" ; then
80
AC_MSG_ERROR([missing package: libclutter-gtk-0.10-dev])
82
AC_SUBST([CLUTTERGTK_LIBS])
83
AC_SUBST([CLUTTERGTK_CFLAGS])
86
PKG_CHECK_MODULES([CLUTTERGST], [clutter-gst-0.10 >= 0.10], have_clutter_gst=true, have_clutter_gst=false)
87
if test "x${have_clutter_gst}" = "xfalse" ; then
88
AC_MSG_ERROR([missing package: libclutter-gst-0.10-dev])
90
AC_SUBST([CLUTTERGST_LIBS])
91
AC_SUBST([CLUTTERGST_CFLAGS])
93
# TODO: maybe check explicitely for libxml2
98
AX_BOOST_PROGRAM_OPTIONS
99
if test "x${ax_cv_boost_program_options}" = "xno" ; then
100
AC_MSG_ERROR([missing package: libboost-program-options-dev])
104
if test "x${ax_cv_boost_filesystem}" = "xno" ; then
105
AC_MSG_ERROR([missing package: libboost-filesystem-dev])
109
if test "x${ax_cv_boost_thread}" = "xno" ; then
110
AC_MSG_ERROR([missing package: libboost-thread-dev])
114
if test "x${ax_cv_boost_date_time}" = "xno" ; then
115
AC_MSG_ERROR([missing package: libboost-date-time-dev])
119
if test "x${ax_cv_boost_system}" = "xno" ; then
120
AC_MSG_ERROR([missing package: libboost-system-dev])
123
# GNU help2man creates man pages from --help output; in many cases, this
124
# is sufficient, and obviates the need to maintain man pages separately.
125
# However, this means invoking executables, which we generally cannot do
126
# when cross-compiling, so we test to avoid that (the variable
127
# "cross_compiling" is set by AC_PROG_CC).
128
if test $cross_compiling = no; then
129
AM_MISSING_PROG(HELP2MAN, help2man)
134
AS_AC_EXPAND(DATADIR, $datadir)
135
AC_MSG_NOTICE(Storing data files in $DATADIR)
137
PIXMAPS_DIR=$DATADIR/pixmaps
138
AC_SUBST(PIXMAPS_DIR)
139
AC_MSG_NOTICE(Storing pixmaps files in $PIXMAPS_DIR)
141
AC_SUBST(CXXFLAGS, " -O2 -Wall -Werror -Wextra -Wfatal-errors")