~ubuntu-branches/debian/stretch/synthv1/stretch

« back to all changes in this revision

Viewing changes to .pc/0001-buildsystem.patch/configure.ac

  • Committer: Package Import Robot
  • Author(s): Jaromír Mikeš
  • Date: 2014-03-11 15:08:33 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20140311150833-hdd95xtc6ks4lwv5
Tags: 0.4.0-1
* Imported Upstream version 0.4.0
* Two patches removed - applied upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Process this file with autoconf to produce a configure script.
2
 
AC_INIT(synthv1, 0.3.6, rncbc@rncbc.org)
3
 
 
4
 
AC_CONFIG_SRCDIR(src/synthv1.cpp)
5
 
AC_CONFIG_HEADERS(src/config.h)
6
 
AC_CONFIG_FILES(Makefile synthv1.spec src/src_jack.pri src/src_lv2.pri src/synthv1.desktop)
7
 
 
8
 
# Set default installation prefix.
9
 
AC_PREFIX_DEFAULT(/usr/local)
10
 
ac_prefix=$prefix
11
 
if test "x$ac_prefix" = "xNONE"; then
12
 
    ac_prefix=$ac_default_prefix
13
 
fi
14
 
AC_SUBST(ac_prefix)
15
 
 
16
 
# Enable debugging argument option.
17
 
AC_ARG_ENABLE(debug,
18
 
  AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]),
19
 
  [ac_debug="$enableval"])
20
 
 
21
 
# Enable JACK standalone build.
22
 
AC_ARG_ENABLE(jack,
23
 
  AC_HELP_STRING([--enable-jack], [enable JACK stand-alone build (default=yes)]),
24
 
  [ac_jack="$enableval"],
25
 
  [ac_jack="yes"])
26
 
 
27
 
# Enable JACK session support.
28
 
AC_ARG_ENABLE(jack-session,
29
 
  AC_HELP_STRING([--enable-jack-session], [enable JACK session support (default=yes)]),
30
 
  [ac_jack_session="$enableval"],
31
 
  [ac_jack_session="yes"])
32
 
 
33
 
# Enable JACK MIDI support option.
34
 
AC_ARG_ENABLE(jack-midi,
35
 
  AC_HELP_STRING([--enable-jack-midi], [enable JACK MIDI support (default=yes)]),
36
 
  [ac_jack_midi="$enableval"],
37
 
  [ac_jack_midi="yes"])
38
 
 
39
 
# Enable ALSA MIDI support option.
40
 
AC_ARG_ENABLE(alsa-midi,
41
 
  AC_HELP_STRING([--enable-alsa-midi], [enable ALSA MIDI support (default=yes)]),
42
 
  [ac_alsa_midi="$enableval"],
43
 
  [ac_alsa_midi="yes"])
44
 
 
45
 
# Enable LV2 plugin build.
46
 
AC_ARG_ENABLE(lv2,
47
 
  AC_HELP_STRING([--enable-lv2], [enable LV2 plug-in build (default=yes)]),
48
 
  [ac_lv2="$enableval"],
49
 
  [ac_lv2="yes"])
50
 
 
51
 
AC_ARG_ENABLE(lv2-external-ui,
52
 
  AC_HELP_STRING([--enable-lv2-external-ui], [enable LV2 plug-in External UI support (default=yes)]),
53
 
  [ac_lv2_external_ui="$enableval"],
54
 
  [ac_lv2_external_ui="yes"])
55
 
 
56
 
# Enable liblo availability.
57
 
AC_ARG_ENABLE(liblo,
58
 
  AC_HELP_STRING([--enable-liblo], [enable liblo interface (default=yes)]),
59
 
  [ac_liblo="$enableval"],
60
 
  [ac_liblo="yes"])
61
 
 
62
 
# Enable NSM support.
63
 
AC_ARG_ENABLE(nsm,
64
 
  AC_HELP_STRING([--enable-nsm], [enable NSM support (default=yes)]),
65
 
  [ac_nsm="$enableval"],
66
 
  [ac_nsm="yes"])
67
 
 
68
 
 
69
 
if test "x$ac_debug" = "xyes"; then
70
 
   AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])
71
 
   ac_debug="debug"
72
 
else
73
 
   ac_debug="release"
74
 
fi
75
 
 
76
 
AC_SUBST(ac_debug)
77
 
 
78
 
 
79
 
# Enable Qt4/5 availability.
80
 
AC_ARG_ENABLE(qt4,
81
 
  AC_HELP_STRING([--enable-qt4], [enable Qt4 build (default=yes)]),
82
 
  [ac_qt4="$enableval"],
83
 
  [ac_qt4="yes"])
84
 
 
85
 
AC_ARG_ENABLE(qt5,
86
 
  AC_HELP_STRING([--enable-qt5], [enable Qt5 build (default=no)]),
87
 
  [ac_qt5="$enableval"],
88
 
  [ac_qt5="no"])
89
 
 
90
 
if test "x$ac_qt4" = "xno"; then
91
 
   ac_qt5="yes"
92
 
fi
93
 
if test "x$ac_qt5" = "xyes"; then
94
 
   ac_qt4="no"
95
 
fi
96
 
 
97
 
# Standard installation base dirs.
98
 
ac_with_paths="/usr /usr/local"
99
 
 
100
 
ac_qtdirs="qt"
101
 
 
102
 
if test "x$ac_qt4" = "xyes"; then
103
 
   ac_qtdirs="qt4 $ac_qtdirs"
104
 
fi
105
 
if test "x$ac_qt5" = "xyes"; then
106
 
   ac_qtdirs="qt5 $ac_qtdirs"
107
 
fi
108
 
 
109
 
# Some a-la-debian alternatives...
110
 
for X in /usr/lib /usr/lib64 /usr/share; do
111
 
  for Y in $ac_qtdirs; do
112
 
    if test -d $X/$Y/bin; then
113
 
      ac_with_paths="$ac_with_paths $X/$Y"
114
 
    fi
115
 
  done
116
 
done
117
 
 
118
 
# Set for alternate Qt installation dir.
119
 
AC_ARG_WITH(qt,
120
 
  AC_HELP_STRING([--with-qt=PATH], [use alternate Qt install path]),
121
 
  [ac_with_paths="$ac_with_paths $withval"])
122
 
 
123
 
# Set for alternate ALSA installation dir.
124
 
AC_ARG_WITH(alsa,
125
 
  AC_HELP_STRING([--with-alsa=PATH], [use alternate ALSA install path]),
126
 
  [ac_with_paths="$ac_with_paths $withval"])
127
 
 
128
 
# Set for alternate JACK installation dir.
129
 
AC_ARG_WITH(jack,
130
 
  AC_HELP_STRING([--with-jack=PATH], [use alternate JACK install path]),
131
 
  [ac_with_paths="$ac_with_paths $withval"])
132
 
 
133
 
# Set for alternate LV2 installation dir.
134
 
AC_ARG_WITH(lv2,
135
 
  AC_HELP_STRING([--with-lv2=PATH], [use alternate LV2 install path]),
136
 
  [ac_with_paths="$ac_with_paths $withval"])
137
 
 
138
 
# Set for alternate liblo installation dir.
139
 
AC_ARG_WITH(liblo,
140
 
  AC_HELP_STRING([--with-liblo=PATH], [use alternate liblo path]),
141
 
  [ac_with_paths="$ac_with_paths $withval"])
142
 
 
143
 
 
144
 
# Check for LV2 support.
145
 
if test "x$ac_lv2" = "xno"; then
146
 
   ac_lv2_external_ui="no"
147
 
fi
148
 
 
149
 
 
150
 
# Checks for programs.
151
 
AC_PROG_CC
152
 
AC_PROG_CPP
153
 
AC_PROG_CXX
154
 
AC_PROG_CXXCPP
155
 
AC_PROG_GCC_TRADITIONAL
156
 
 
157
 
# Checks for languages.
158
 
AC_LANG_C
159
 
AC_LANG_CPLUSPLUS
160
 
 
161
 
# Prepend alternate dependencies paths.
162
 
ac_path=$PATH
163
 
for X in $ac_with_paths; do
164
 
  if test -d $X/bin; then
165
 
    ac_path="$X/bin:$ac_path"
166
 
  fi
167
 
# if test -x $X/qmake; then
168
 
#   ac_path="$X:$ac_path"
169
 
# fi
170
 
  if test -d $X/include; then
171
 
    for Y in $ac_qtdirs; do
172
 
      if test -d $X/include/$Y; then
173
 
        CFLAGS="-I$X/include/$Y $CFLAGS"
174
 
        CPPFLAGS="-I$X/include/$Y $CPPFLAGS"
175
 
        ac_incpath="$X/include/$Y $ac_incpath"
176
 
      fi
177
 
    done
178
 
    CFLAGS="-I$X/include $CFLAGS"
179
 
    CPPFLAGS="-I$X/include $CPPFLAGS"
180
 
    ac_incpath="$X/include $ac_incpath"
181
 
  fi
182
 
  if test -d $X/lib64; then
183
 
    LIBS="-L$X/lib64 $LIBS"
184
 
    ac_libs="-L$X/lib64 $ac_libs"
185
 
  fi
186
 
  if test -d $X/lib; then
187
 
    LIBS="-L$X/lib $LIBS"
188
 
    ac_libs="-L$X/lib $ac_libs"
189
 
  fi
190
 
done
191
 
 
192
 
 
193
 
# Check for proper flags.
194
 
ac_arch=`uname -m`
195
 
if test "x$ac_arch" = "xx86_64"; then
196
 
   CFLAGS="-fPIC $CFLAGS"
197
 
   CPPFLAGS="-fPIC $CPPFLAGS"
198
 
fi
199
 
 
200
 
# Check for proper Qt version.
201
 
AC_CACHE_CHECK([for Qt library version >= 4.4],
202
 
   ac_cv_qtversion, [
203
 
   AC_TRY_LINK([#include "QtCore/qglobal.h"], [
204
 
      #if QT_VERSION < 0x040400
205
 
      #error Qt library 4.4 or greater required.
206
 
      #endif
207
 
   ], ac_cv_qtversion="yes", [
208
 
      echo "no; Qt 4.4 or greater is required"
209
 
      exit 1
210
 
   ])
211
 
])
212
 
 
213
 
 
214
 
ac_cflags="-ffast-math $ac_cflags"
215
 
AC_SUBST(ac_cflags)
216
 
 
217
 
 
218
 
# A common error message:
219
 
ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)."
220
 
 
221
 
# Check for Qt qmake utility.
222
 
AC_PATH_PROG(ac_qmake, qmake, [no], $ac_path)
223
 
if test "x$ac_qmake" = "xno"; then
224
 
   AC_MSG_ERROR([qmake $ac_errmsg])
225
 
fi
226
 
AC_SUBST(ac_qmake)
227
 
 
228
 
# Check for Qt moc utility.
229
 
AC_PATH_PROG(ac_moc, moc, [no], $ac_path)
230
 
if test "x$ac_moc" = "xno"; then
231
 
   AC_MSG_ERROR([moc $ac_errmsg])
232
 
fi
233
 
AC_SUBST(ac_moc)
234
 
 
235
 
# Check for Qt uic utility.
236
 
AC_PATH_PROG(ac_uic, uic, [no], $ac_path)
237
 
if test "x$ac_uic" = "xno"; then
238
 
   AC_MSG_ERROR([uic $ac_errmsg])
239
 
fi
240
 
AC_SUBST(ac_uic)
241
 
 
242
 
 
243
 
# Checks for libraries.
244
 
AC_CHECK_LIB(m, main)
245
 
AC_CHECK_LIB(X11, main)
246
 
AC_CHECK_LIB(Xext, main)
247
 
 
248
 
ac_jack_libs="$ac_libs"
249
 
ac_lv2_libs="$ac_libs"
250
 
 
251
 
# Check for JACK libraries.
252
 
if test "x$ac_jack" = "xyes"; then
253
 
   AC_CHECK_LIB(jack, main, [ac_jack="yes"], [ac_jack="no"])
254
 
   if test "x$ac_jack" = "xno"; then
255
 
      AC_MSG_WARN([*** JACK library not found.])
256
 
      AC_MSG_WARN([*** JACK stand-alone build will be disabled.])
257
 
   else
258
 
      ac_jack_libs="$ac_jack_libs -ljack"
259
 
   fi
260
 
fi
261
 
 
262
 
if test "x$ac_jack" = "xyes"; then
263
 
   # Check for JACK session event callback availability.
264
 
   if test "x$ac_jack_session" = "xyes"; then
265
 
      AC_CHECK_LIB(jack, jack_set_session_callback, [ac_jack_session="yes"], [ac_jack_session="no"])
266
 
   else
267
 
      AC_MSG_WARN([*** JACK session support will be disabled.])
268
 
   fi
269
 
   # Check for ALSA libraries.
270
 
   if test "x$ac_alsa_midi" = "xyes"; then
271
 
      AC_CHECK_LIB(pthread, main, [ac_alsa_midi="yes"], [ac_alsa_midi="no"])
272
 
   fi
273
 
   if test "x$ac_alsa_midi" = "xyes"; then
274
 
      AC_CHECK_LIB(asound, main, [ac_alsa_midi="yes"], [ac_alsa_midi="no"])
275
 
      if test "x$ac_alsa_midi" = "xno"; then
276
 
         AC_MSG_WARN([*** ALSA library not found.])
277
 
         AC_MSG_WARN([*** ALSA MIDI support will be disabled.])
278
 
      else
279
 
         ac_jack_libs="$ac_jack_libs -lasound -lpthread"
280
 
      fi
281
 
   fi
282
 
fi
283
 
 
284
 
# Check for optional liblo library.
285
 
if test "x$ac_liblo" = "xyes"; then
286
 
   AC_CHECK_LIB(lo, main, [ac_liblo="yes"], [ac_liblo="no"])
287
 
   if test "x$ac_liblo" = "xyes"; then
288
 
      AC_DEFINE(CONFIG_LIBLO, 1, [Define if liblo is available.])
289
 
      ac_jack_libs="$ac_jack_libs -llo"
290
 
   else
291
 
      AC_MSG_WARN([*** liblo library not found.])
292
 
      AC_MSG_WARN([*** OSC service support will be disabled.])
293
 
      ac_nsm="no"
294
 
   fi
295
 
else
296
 
   ac_nsm="no"
297
 
fi
298
 
 
299
 
AC_SUBST(ac_jack_libs)
300
 
AC_SUBST(ac_lv2_libs)
301
 
 
302
 
 
303
 
# Checks for header files.
304
 
AC_HEADER_STDC
305
 
AC_HEADER_SYS_WAIT
306
 
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/stat.h unistd.h signal.h)
307
 
 
308
 
ac_jack_incpath="$ac_incpath"
309
 
ac_lv2_incpath="$ac_incpath"
310
 
 
311
 
ac_all_targets=""
312
 
ac_install_targets=""
313
 
ac_uninstall_targets=""
314
 
ac_clean_targets=""
315
 
 
316
 
# Check for JACK headers.
317
 
if test "x$ac_jack" = "xyes"; then
318
 
   AC_CHECK_HEADERS(jack/jack.h, [ac_jack="yes"], [ac_jack="no"])
319
 
   if test "x$ac_jack" = "xno"; then
320
 
      AC_MSG_WARN([*** JACK header files not found.])
321
 
      AC_MSG_WARN([*** JACK stand-alone build will be disabled.])
322
 
   else
323
 
      AC_DEFINE(CONFIG_JACK, 1, [Define if JACK stand-alone build is enabled.])
324
 
      ac_all_targets="jack $ac_all_targets"
325
 
      ac_install_targets="install_jack $ac_install_targets"
326
 
      ac_uninstall_targets="uninstall_jack $ac_uninstall_targets"
327
 
      ac_clean_targets="clean_jack $ac_clean_targets"
328
 
   fi
329
 
fi
330
 
 
331
 
if test "x$ac_jack" = "xno"; then
332
 
  ac_jack_session="no"
333
 
  ac_jack_midi="no"
334
 
  ac_alsa_midi="no"
335
 
  ac_liblo="no"
336
 
  ac_nsm="no"
337
 
fi
338
 
 
339
 
# Check for JACK session headers availability.
340
 
if test "x$ac_jack_session" = "xyes"; then
341
 
   AC_CHECK_HEADER(jack/session.h, [ac_jack_session="yes"], [ac_jack_session="no"])
342
 
   if test "x$ac_jack_session" = "xyes"; then
343
 
      AC_DEFINE(CONFIG_JACK_SESSION, 1, [Define if JACK session support is available.])
344
 
   else
345
 
      AC_MSG_WARN([*** JACK session header file not found.])
346
 
      AC_MSG_WARN([*** JACK session support will be disabled.])
347
 
   fi
348
 
fi
349
 
 
350
 
# Check for JACK MIDI headers availability.
351
 
if test "x$ac_jack_midi" = "xyes"; then
352
 
   AC_CHECK_HEADER(jack/midiport.h, [ac_jack_midi="yes"], [ac_jack_midi="no"])
353
 
   if test "x$ac_jack_midi" = "xyes"; then
354
 
      AC_DEFINE(CONFIG_JACK_MIDI, 1, [Define if JACK MIDI support is enabled.])
355
 
   else
356
 
      AC_MSG_WARN([*** JACK MIDI header files not found.])
357
 
      AC_MSG_WARN([*** JACK MIDI support will be disabled.])
358
 
   fi
359
 
fi
360
 
 
361
 
# Check for ALSA MIDI headers availability.
362
 
if test "x$ac_alsa_midi" = "xyes"; then
363
 
   AC_CHECK_HEADER(alsa/asoundlib.h, [ac_alsa_midi="yes"], [ac_alsa_midi="no"])
364
 
   if test "x$ac_alsa_midi" = "xyes"; then
365
 
      AC_DEFINE(CONFIG_ALSA_MIDI, 1, [Define if ALSA MIDI support is enabled.])
366
 
   else
367
 
      AC_MSG_WARN([*** ALSA MIDI header files not found.])
368
 
      AC_MSG_WARN([*** ALSA MIDI support will be disabled.])
369
 
   fi
370
 
fi
371
 
 
372
 
# Check for LV2 headers.
373
 
if test "x$ac_lv2" = "xyes"; then
374
 
   AC_CHECK_HEADERS(lv2.h, [ac_lv2="yes"], [ac_lv2="no"])
375
 
   if test "x$ac_lv2" = "xno"; then
376
 
      AC_MSG_WARN([*** LV2 header files not found.])
377
 
   else
378
 
      AC_DEFINE(CONFIG_LV2, 1, [Define if LV2 plug-in build is enabled.])
379
 
      ac_all_targets="lv2 lv2ui $ac_all_targets"
380
 
      ac_install_targets="install_lv2 $ac_install_targets"
381
 
      ac_uninstall_targets="uninstall_lv2 $ac_uninstall_targets"
382
 
      ac_clean_targets="clean_lv2 $ac_clean_targets"
383
 
   fi
384
 
fi
385
 
 
386
 
if test "x$ac_lv2" = "xno"; then
387
 
   lv2_external_ui="no"
388
 
fi
389
 
 
390
 
if test "x$ac_lv2_external_ui" = "xyes"; then
391
 
   CFLAGS="$CFLAGS -Isrc/lv2"
392
 
   CPPFLAGS="$CPPFLAGS -Isrc/lv2"
393
 
   AC_CHECK_HEADER(lv2_external_ui.h, [ac_lv2_external_ui="yes"], [ac_lv2_external_ui="no"])
394
 
   if test "x$ac_lv2_external_ui" = "xyes"; then
395
 
      AC_DEFINE(CONFIG_LV2_EXTERNAL_UI, 1, [Define if LV2 External UI extension is available.])
396
 
      ac_lv2_incpath="lv2 $ac_lv2_incpath"
397
 
   else
398
 
      AC_MSG_WARN([*** LV2 External UI extension will be disabled.])
399
 
   fi
400
 
fi
401
 
 
402
 
# Check for liblo headers.
403
 
if test "x$ac_liblo" = "xyes"; then
404
 
   AC_CHECK_HEADER(lo/lo.h, [ac_lo_h="yes"], [ac_lo_h="no"])
405
 
   if test "x$ac_lo_h" = "xno"; then
406
 
      AC_MSG_ERROR([lo.h header file not found.])
407
 
      ac_liblo="no"
408
 
      ac_nsm="no"
409
 
   fi
410
 
fi
411
 
 
412
 
AC_SUBST(ac_all_targets)
413
 
AC_SUBST(ac_install_targets)
414
 
AC_SUBST(ac_uninstall_targets)
415
 
AC_SUBST(ac_clean_targets)
416
 
 
417
 
AC_SUBST(ac_jack_incpath)
418
 
AC_SUBST(ac_lv2_incpath)
419
 
 
420
 
 
421
 
# Check for NSM support.
422
 
if test "x$ac_nsm" = "xyes"; then
423
 
   AC_DEFINE(CONFIG_NSM, 1, [Define if NSM support is available.])
424
 
fi
425
 
 
426
 
 
427
 
# Checks for build targets
428
 
if test "x$ac_jack" = "xno" -a "x$ac_lv2" = "xno"; then
429
 
   AC_MSG_ERROR([*** JACK and LV2 build options disabled.])
430
 
fi
431
 
 
432
 
if test "x$ac_jack" = "xyes"; then
433
 
   if test "x$ac_jack_midi" = "xno" -a "x$ac_alsa_midi" = "xno"; then
434
 
      AC_MSG_ERROR([*** JACK MIDI and ALSA MIDI support disabled.])
435
 
   fi
436
 
fi
437
 
 
438
 
 
439
 
# Checks for typedefs, structures, and compiler characteristics.
440
 
# AC_C_CONST
441
 
 
442
 
# Finally produce a configure header file and the makefiles.
443
 
AC_OUTPUT
444
 
 
445
 
# make clean > /dev/null 2>&1
446
 
 
447
 
# Output summary message
448
 
 
449
 
echo
450
 
echo "  $PACKAGE_NAME $PACKAGE_VERSION"
451
 
echo
452
 
echo "  Build target . . . . . . . . . . . . . . . . . . .: $ac_debug"
453
 
echo
454
 
echo "  JACK stand-alone build . . . . . . . . . . . . . .: $ac_jack"
455
 
echo "  JACK session support . . . . . . . . . . . . . . .: $ac_jack_session"
456
 
echo "  JACK MIDI support  . . . . . . . . . . . . . . . .: $ac_jack_midi"
457
 
echo "  ALSA MIDI support  . . . . . . . . . . . . . . . .: $ac_alsa_midi"
458
 
echo "  LV2 plug-in build  . . . . . . . . . . . . . . . .: $ac_lv2"
459
 
echo "  LV2 plug-in External UI support  . . . . . . . . .: $ac_lv2_external_ui"
460
 
echo "  OSC service support (liblo)  . . . . . . . . . . .: $ac_liblo"
461
 
echo "  NSM (Non Session Management) support . . . . . . .: $ac_nsm"
462
 
echo
463
 
echo "  Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix"
464
 
echo
465
 
echo "Now type 'make', followed by 'make install' as root."
466
 
echo