File: configure.in

package info (click to toggle)
denemo 0.9.2-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 26,724 kB
  • sloc: ansic: 59,006; lisp: 13,874; sh: 11,666; makefile: 2,082; xml: 634; sed: 16
file content (252 lines) | stat: -rw-r--r-- 5,816 bytes parent folder | download
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
dnl Process this file with autoconf to produce a configure script. 
AC_INIT([denemo], [0.9.2], [denemo-devel@gnu.org])
AC_CONFIG_SRCDIR([src/main.c])
AM_INIT_AUTOMAKE([tar-pax]) 
dnl AM_INIT_AUTOMAKE([foreign -Wall -Werror gnu tar-pax])
dnl AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)

AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
AM_BINRELOC
dnl ALL_LINGUAS="es fr sv"
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.18)
AC_PROG_LN_S
AC_PROG_MKDIR_P
AM_PROG_CC_C_O

dnl Checks for programs.
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_YACC
AM_PROG_LEX
GUILE_FLAGS

AM_PROG_LIBTOOL

PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3)
CFLAGS="$CFLAGS $GTK2_CFLAGS"
LIBS="$GTK2_LIBS"

PKG_CHECK_MODULES(GUILE, guile-1.8 >= 1.8)
LIBS="$LIBS $GUILE_LIBS"
CFLAGS="$CFLAGS $GUILE_CFLAGS"

PKG_CHECK_MODULES(XML2, libxml-2.0 >= 2.3.10)
CFLAGS="$CFLAGS $XML2_CFLAGS"
LIBS="$LIBS $XML2_LIBS"

PKG_CHECK_MODULES(GTKSOURCEVIEW, gtksourceview-2.0 >= 2.0)
CFLAGS="$CFLAGS $GTKSOURCEVIEW_CFLAGS"
LIBS="$LIBS $GTKSOURCEVIEW_LIBS"

PKG_CHECK_MODULES(RSVG, librsvg-2.0 >= 2.0)
CFLAGS="$CFLAGS $RSVG_CFLAGS"
LIBS="$LIBS $RSVG_LIBS"

PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.2.0)
CFLAGS="$CFLAGS $FONTCONFIG_CFLAGS"
LIBS="$LIBS $FONTCONFIG_LIBS"

AC_ARG_WITH(
  included-smf,
  AC_HELP_STRING([--with-included-smf], [use SMF @<:@default=check@:>@]),
  [ ], [ withsmf=no ])

if test "x$withsmf" = "xno"; then
  PKG_CHECK_MODULES(SMF, smf >= 1.3)
  CFLAGS="$CFLAGS $SMF_CFLAGS"
  LIBS="$LIBS $SMF_LIBS"
  WHICH_SMF=''
  SMF_LDD=''
  SMF_INCLUDE=''
else
  WHICH_SMF='libsmf'
  SMF_LDD='../libsmf/libsmf.a'
  SMF_INCLUDE='-I$(top_srcdir)/libsmf'
fi
  AC_SUBST([WHICH_SMF])
  AC_SUBST([SMF_LDD])
  AC_SUBST([SMF_INCLUDE])

AC_ARG_ENABLE(
  jack,
  AC_HELP_STRING([--enable-jack], [use JACK @<:@default=no@:>@]),
  [
    if test "x$enableval" != "xno"; then
      usejack=yes
    fi
  ])

if test "x$usejack" = "xyes"; then
  PKG_CHECK_MODULES(JACK, jack >= 0.102.0)
  CFLAGS="$CFLAGS -D_HAVE_JACK_ $JACK_CFLAGS"
  LIBS="$LIBS -D_HAVE_JACK_ $JACK_LIBS"
fi

AC_ARG_ENABLE(
  fluidsynth,
  AC_HELP_STRING([--enable-fluidsynth], [use FLUIDSYNTH @<:@default=yes@:>@]),
  [ 
    if test "x$enableval" != "xno"; then
      usefluidsynth=yes
    fi 
  ], [ usefluidsynth=yes ])

if test "x$usefluidsynth" = "xyes"; then
  PKG_CHECK_MODULES(FLUIDSYNTH, fluidsynth >= 1.0.8)
  CFLAGS="$CFLAGS -D_HAVE_FLUIDSYNTH_ $FLUIDSYNTH_CFLAGS"
  LIBS="$LIBS -D_HAVE_FLUIDSYNTH_ $FLUIDSYNTH_LIBS"
fi

AC_ARG_ENABLE(
  portaudio,
  AC_HELP_STRING([--enable-portaudio], [use PORTAUDIO @<:@default=yes@:>@]),
  [ 
    if test "x$enableval" != "xno"; then
      useportaudio=yes
    fi 
  ], [ useportaudio=yes ])

if test "x$useportaudio" = "xyes"; then
  PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= 19)
  CFLAGS="$CFLAGS -D_HAVE_PORTAUDIO_ $PORTAUDIO_CFLAGS"
  dnl CFLAGS="$CFLAGS $PORTAUDIO_CFLAGS"
  LIBS="$LIBS $PORTAUDIO_LIBS"

  PKG_CHECK_MODULES(LIBAUBIO, aubio >= 0.3.2)
  CFLAGS="$CFLAGS $LIBAUBIO_CFLAGS"
  LIBS="$LIBS $LIBAUBIO_LIBS"

  PKG_CHECK_MODULES(FFTW, fftw3 >= 3.1.2)
  CFLAGS="$CFLAGS $FFTW_CFLAGS"
  LIBS="$LIBS $FFTW_LIBS"

  PKG_CHECK_MODULES(samplerate, samplerate >= 0.1.2)
  CFLAGS="$CFLAGS $samplerate_CFLAGS"
  LIBS="$LIBS $samplerate_LIBS"
fi

dnl Options for configuration
build_debug=no
AC_ARG_ENABLE(
  debug,
  AC_HELP_STRING([--enable-debug], [enable debug code @<:@default=no@:>@]),
  [
    if test "x$enableval" != "xno"; then
      build_debug=yes
      CFLAGS="$CFLAGS -DDEBUG -g"
      CXXFLAGS="$CXXFLAGS -DDEBUG -g"
    fi
  ])


dnl Memory debugging
mem_debug=no
AC_ARG_ENABLE(
  mem,
  AC_HELP_STRING([--enable-mem], [enable memory debugging @<:@default=no@:>@]),
  [
    if test "x$enableval" != "xno"; then
      mem_debug=yes
    fi
  ])
if test "x$mem_debug" = "xyes"; then LDFLAGS="$LDFLAGS -lefence"; fi


dnl Build documentation
build_doc=no
AC_ARG_ENABLE(
  doc,
  AC_HELP_STRING(
    [--enable-doc],[enable documentation build @<:@default=no@:>@]),
  [
    if test "x$enableval" != "xno"; then
      build_doc=yes
    fi
  ])
AM_CONDITIONAL(DENEMO_BUILD_DOC,[test "$build_doc" = "yes"])


dnl Checks for header files.

AC_CHECK_HEADERS(sys/soundcard.h)
AC_CHECK_HEADERS(errno.h)
AC_CHECK_HEADERS(getopt.h sys/wait.h wait.h sys/time.h sys/resource.h)

AC_TRY_COMPILE(
  [#include <signal.h>], [int mysignal = SIGCHLD;],
  [AC_DEFINE(HAVE_SIGCHLD, 1, [Define to 1 if SIGCHLD signal is available])])

AC_TRY_LINK(
  [#include <stdio.h>],
  [
    FILE * fp;
    flockfile (fp);
    ftrylockfile (fp);
    funlockfile (fp);
  ],
  [AC_DEFINE(HAVE_FILE_LOCKS, 1, [Define to 1 if file locking is available])])

dnl Checks for typedefs, structures, and compiler characteristics.
dnl AC_HEADER_TIME

dnl Checks for library functions.

dnl Set PACKAGE_LOCALE_DIR in config.h.


if test "${prefix}" = "NONE"; then
  prefix=${ac_default_prefix}
  AC_SUBST(prefix)
fi

pkgdatadir=${datadir}/${PACKAGE}
PACKAGE_DATA_DIR=${datadir}/${PACKAGE}
AC_SUBST(pkgdatadir)
AC_SUBST(PACKAGE_DATA_DIR)
 
dnl
dnl Append the package name to sysconfdir.
dnl
sysconfdir=$sysconfdir/${PACKAGE}
AC_SUBST(sysconfdir)

dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED(
  PACKAGE_SOURCE_DIR, "${packagesrcdir}", [set package source dir])

dnl path magic for denemo guile modules
denemo_load_path=${PACKAGE_DATA_DIR}/modules
denemo_bin_path=${libdir}/${PACKAGE}/modules
AC_SUBST(denemo_load_path)
AC_SUBST(denemo_bin_path)

dnl Gettext stuff

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)


AC_OUTPUT(
[
  m4/Makefile 
  Makefile 
  denemo.spec
  src/Makefile 
  pixmaps/Makefile 
  doc/Makefile
  doc/transformations/Makefile
  doc/images/Makefile
  actions/Makefile
  examples/Makefile
  templates/Makefile
  po/Makefile.in
  fonts/Makefile
  soundfonts/Makefile
  libsmf/Makefile
])