~ubuntu-branches/ubuntu/oneiric/toonloop/oneiric

« back to all changes in this revision

Viewing changes to .pc/fix-depend.patch/configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2011-05-05 11:29:40 UTC
  • mfrom: (2.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110505112940-xd11qcg983eklwgb
Tags: 2.0.6-2
* Team upload.
* Import patches from Ubuntu:
  - Add debian/patches/0001-clutter_gst_1.0.patch to make this build with
    new libclutter.
  - debian/rules:
    + Tune CPPFLAGS to fix FTBFS with new libboost (Closes: #625056).
  - debian/control.in:
    + s/libclutter-gst-0.10-dev/libclutter-gst-dev/ in Build-Depends.
* debian/patches/0002-help2man.patch:
  - Call help2man with --no-discard-stderr to avoid build failures.
* Bump Standards.
* Re-generate debian/control.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#                                               -*- Autoconf -*-
2
 
# Process this file with autoconf to produce a configure script.
3
 
 
4
 
AC_PREREQ(2.61)
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
8
 
AC_PROG_LIBTOOL
9
 
AM_INIT_AUTOMAKE()
10
 
 
11
 
# Check for C++ compiler
12
 
AC_PROG_CXX
13
 
 
14
 
# Checks for header files.
15
 
AC_HEADER_STDC
16
 
AC_CHECK_HEADERS([arpa/inet.h stdlib.h string.h sys/ioctl.h unistd.h])
17
 
 
18
 
# Checks for typedefs, structures, and compiler characteristics.
19
 
AC_HEADER_STDBOOL
20
 
AC_C_CONST
21
 
PKG_PROG_PKG_CONFIG
22
 
 
23
 
AC_PROG_GCC_TRADITIONAL
24
 
AC_CHECK_FUNCS([inet_ntoa memset socket])
25
 
 
26
 
AC_CHECK_LIB([pthread],[pthread_exit],[AC_SUBST([LIBTHREAD_CXXFLAGS],["-lpthread"])])
27
 
AC_CHECK_LIB([m],[sin],[AC_SUBST([LIBM_CXXFLAGS],["-lm"])])
28
 
 
29
 
# STK
30
 
# TODO: print some message when configuring STK is OK
31
 
AC_LANG_PUSH(C++)
32
 
# save original flags
33
 
SAVED_LIBS=$LIBS
34
 
LIBS="$LIBS -lstk"
35
 
AC_LINK_IFELSE(
36
 
        [AC_LANG_PROGRAM([ #include <stk/RtMidi.h> ],
37
 
        [RtMidiIn input])],
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__")
42
 
AC_LANG_POP(C++)
43
 
 
44
 
 
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])
49
 
fi
50
 
 
51
 
# GTK and GST
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])
54
 
 
55
 
AC_SUBST([GTK_LIBS])
56
 
AC_SUBST([GTK_CFLAGS])
57
 
AC_SUBST([GST_LIBS])
58
 
AC_SUBST([GST_CFLAGS])
59
 
 
60
 
# GST appsink 
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])
64
 
fi
65
 
AC_SUBST([GSTAPP_LIBS])
66
 
 
67
 
# Clutter
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])
71
 
fi
72
 
AC_SUBST([CLUTTER_LIBS])
73
 
AC_SUBST([CLUTTER_CFLAGS])
74
 
# Clutter depends on:
75
 
# libjson-glib-dev and others
76
 
 
77
 
# Clutter-GTK
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])
81
 
fi
82
 
AC_SUBST([CLUTTERGTK_LIBS])
83
 
AC_SUBST([CLUTTERGTK_CFLAGS])
84
 
 
85
 
# Clutter-GST
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])
89
 
fi
90
 
AC_SUBST([CLUTTERGST_LIBS])
91
 
AC_SUBST([CLUTTERGST_CFLAGS])
92
 
 
93
 
# TODO: maybe check explicitely for libxml2
94
 
 
95
 
# BOOST
96
 
AX_BOOST_BASE([1.35])
97
 
 
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])
101
 
fi
102
 
 
103
 
AX_BOOST_FILESYSTEM
104
 
if test "x${ax_cv_boost_filesystem}" = "xno" ; then
105
 
        AC_MSG_ERROR([missing package: libboost-filesystem-dev])
106
 
fi
107
 
 
108
 
AX_BOOST_THREAD
109
 
if test "x${ax_cv_boost_thread}" = "xno" ; then
110
 
    AC_MSG_ERROR([missing package: libboost-thread-dev])
111
 
fi
112
 
 
113
 
AX_BOOST_DATE_TIME
114
 
if test "x${ax_cv_boost_date_time}" = "xno" ; then
115
 
        AC_MSG_ERROR([missing package: libboost-date-time-dev])
116
 
fi
117
 
 
118
 
AX_BOOST_SYSTEM
119
 
if test "x${ax_cv_boost_system}" = "xno" ; then
120
 
        AC_MSG_ERROR([missing package: libboost-system-dev])
121
 
fi
122
 
 
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)
130
 
else
131
 
    HELP2MAN=:
132
 
fi
133
 
 
134
 
AS_AC_EXPAND(DATADIR, $datadir)
135
 
AC_MSG_NOTICE(Storing data files in $DATADIR)
136
 
 
137
 
PIXMAPS_DIR=$DATADIR/pixmaps
138
 
AC_SUBST(PIXMAPS_DIR)
139
 
AC_MSG_NOTICE(Storing pixmaps files in $PIXMAPS_DIR)
140
 
 
141
 
AC_SUBST(CXXFLAGS, " -O2 -Wall -Werror -Wextra -Wfatal-errors") 
142
 
 
143
 
AC_CONFIG_FILES([
144
 
    Makefile
145
 
    src/Makefile
146
 
    src/doxyfile
147
 
    man/Makefile
148
 
    tests/Makefile
149
 
    pixmaps/Makefile
150
 
    completion/Makefile
151
 
    ])
152
 
AC_OUTPUT
153