~ubuntu-branches/ubuntu/vivid/drumkv1/vivid

« back to all changes in this revision

Viewing changes to .pc/0004-fix_install_path.patch/configure.ac

  • Committer: Package Import Robot
  • Author(s): Jaromír Mikeš
  • Date: 2014-01-25 10:11:58 UTC
  • Revision ID: package-import@ubuntu.com-20140125101158-wgzxxyrm9dru85yo
Tags: 0.3.6-2
Fixed install path.

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(drumkv1, 0.3.6, rncbc@rncbc.org)
 
3
 
 
4
AC_CONFIG_SRCDIR(src/drumkv1.cpp)
 
5
AC_CONFIG_HEADERS(src/config.h)
 
6
AC_CONFIG_FILES(Makefile drumkv1.spec src/src_jack.pri src/src_lv2.pri src/drumkv1.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/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 libsndfile installation dir.
 
139
AC_ARG_WITH(sndfile,
 
140
  AC_HELP_STRING([--with-sndfile=PATH], [use alternate libsndfile path]),
 
141
  [ac_with_paths="$ac_with_paths $withval"])
 
142
 
 
143
# Set for alternate liblo installation dir.
 
144
AC_ARG_WITH(liblo,
 
145
  AC_HELP_STRING([--with-liblo=PATH], [use alternate liblo path]),
 
146
  [ac_with_paths="$ac_with_paths $withval"])
 
147
 
 
148
 
 
149
# Check for LV2 support.
 
150
if test "x$ac_lv2" = "xno"; then
 
151
   ac_lv2_external_ui="no"
 
152
fi
 
153
 
 
154
 
 
155
# Checks for programs.
 
156
AC_PROG_CC
 
157
AC_PROG_CPP
 
158
AC_PROG_CXX
 
159
AC_PROG_CXXCPP
 
160
AC_PROG_GCC_TRADITIONAL
 
161
 
 
162
# Checks for languages.
 
163
AC_LANG_C
 
164
AC_LANG_CPLUSPLUS
 
165
 
 
166
# Prepend alternate dependencies paths.
 
167
ac_path=$PATH
 
168
for X in $ac_with_paths; do
 
169
  if test -d $X/bin; then
 
170
    ac_path="$X/bin:$ac_path"
 
171
  fi
 
172
# if test -x $X/qmake; then
 
173
#   ac_path="$X:$ac_path"
 
174
# fi
 
175
  if test -d $X/include; then
 
176
    for Y in $ac_qtdirs; do
 
177
      if test -d $X/include/$Y; then
 
178
        CFLAGS="-I$X/include/$Y $CFLAGS"
 
179
        CPPFLAGS="-I$X/include/$Y $CPPFLAGS"
 
180
        ac_incpath="$X/include/$Y $ac_incpath"
 
181
      fi
 
182
    done
 
183
    CFLAGS="-I$X/include $CFLAGS"
 
184
    CPPFLAGS="-I$X/include $CPPFLAGS"
 
185
    ac_incpath="$X/include $ac_incpath"
 
186
  fi
 
187
  if test -d $X/lib; then
 
188
    LIBS="-L$X/lib $LIBS"
 
189
    ac_libs="-L$X/lib $ac_libs"
 
190
  fi
 
191
done
 
192
 
 
193
 
 
194
# Check for proper flags.
 
195
ac_arch=`uname -m`
 
196
if test "x$ac_arch" = "xx86_64"; then
 
197
   CFLAGS="-fPIC $CFLAGS"
 
198
   CPPFLAGS="-fPIC $CPPFLAGS"
 
199
fi
 
200
 
 
201
# Check for proper Qt version.
 
202
AC_CACHE_CHECK([for Qt library version >= 4.4],
 
203
   ac_cv_qtversion, [
 
204
   AC_TRY_LINK([#include "QtCore/qglobal.h"], [
 
205
      #if QT_VERSION < 0x040400
 
206
      #error Qt library 4.4 or greater required.
 
207
      #endif
 
208
   ], ac_cv_qtversion="yes", [
 
209
      echo "no; Qt 4.4 or greater is required"
 
210
      exit 1
 
211
   ])
 
212
])
 
213
 
 
214
 
 
215
ac_cflags="-ffast-math $ac_cflags"
 
216
AC_SUBST(ac_cflags)
 
217
 
 
218
 
 
219
# A common error message:
 
220
ac_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt-devel)."
 
221
 
 
222
# Check for Qt qmake utility.
 
223
AC_PATH_PROG(ac_qmake, qmake, [no], $ac_path)
 
224
if test "x$ac_qmake" = "xno"; then
 
225
   AC_MSG_ERROR([qmake $ac_errmsg])
 
226
fi
 
227
AC_SUBST(ac_qmake)
 
228
 
 
229
# Check for Qt moc utility.
 
230
AC_PATH_PROG(ac_moc, moc, [no], $ac_path)
 
231
if test "x$ac_moc" = "xno"; then
 
232
   AC_MSG_ERROR([moc $ac_errmsg])
 
233
fi
 
234
AC_SUBST(ac_moc)
 
235
 
 
236
# Check for Qt uic utility.
 
237
AC_PATH_PROG(ac_uic, uic, [no], $ac_path)
 
238
if test "x$ac_uic" = "xno"; then
 
239
   AC_MSG_ERROR([uic $ac_errmsg])
 
240
fi
 
241
AC_SUBST(ac_uic)
 
242
 
 
243
 
 
244
# Checks for libraries.
 
245
AC_CHECK_LIB(m, main)
 
246
AC_CHECK_LIB(X11, main)
 
247
AC_CHECK_LIB(Xext, main)
 
248
 
 
249
ac_jack_libs="$ac_libs"
 
250
ac_lv2_libs="$ac_libs"
 
251
 
 
252
# Check for JACK libraries.
 
253
if test "x$ac_jack" = "xyes"; then
 
254
   AC_CHECK_LIB(jack, main, [ac_jack="yes"], [ac_jack="no"])
 
255
   if test "x$ac_jack" = "xno"; then
 
256
      AC_MSG_WARN([*** JACK library not found.])
 
257
      AC_MSG_WARN([*** JACK stand-alone build will be disabled.])
 
258
   else
 
259
      ac_jack_libs="$ac_jack_libs -ljack"
 
260
   fi
 
261
fi
 
262
 
 
263
if test "x$ac_jack" = "xyes"; then
 
264
   # Check for JACK session event callback availability.
 
265
   if test "x$ac_jack_session" = "xyes"; then
 
266
      AC_CHECK_LIB(jack, jack_set_session_callback, [ac_jack_session="yes"], [ac_jack_session="no"])
 
267
   else
 
268
      AC_MSG_WARN([*** JACK session support will be disabled.])
 
269
   fi
 
270
   # Check for ALSA libraries.
 
271
   if test "x$ac_alsa_midi" = "xyes"; then
 
272
      AC_CHECK_LIB(pthread, main, [ac_alsa_midi="yes"], [ac_alsa_midi="no"])
 
273
   fi
 
274
   if test "x$ac_alsa_midi" = "xyes"; then
 
275
      AC_CHECK_LIB(asound, main, [ac_alsa_midi="yes"], [ac_alsa_midi="no"])
 
276
      if test "x$ac_alsa_midi" = "xno"; then
 
277
         AC_MSG_WARN([*** ALSA library not found.])
 
278
         AC_MSG_WARN([*** ALSA MIDI support will be disabled.])
 
279
      else
 
280
         ac_jack_libs="$ac_jack_libs -lasound -lpthread"
 
281
      fi
 
282
   fi
 
283
fi
 
284
 
 
285
# Check for sndfile library.
 
286
AC_CHECK_LIB(sndfile, main, [ac_sndfile="yes"], [ac_sndfile="no"])
 
287
if test "x$ac_sndfile" = "xno"; then
 
288
   AC_MSG_ERROR([*** sndfile library not found.])
 
289
else
 
290
   ac_jack_libs="$ac_jack_libs -lsndfile"
 
291
   ac_lv2_libs="$ac_lv2_libs -lsndfile"
 
292
fi
 
293
 
 
294
# Check for optional liblo library.
 
295
if test "x$ac_liblo" = "xyes"; then
 
296
   AC_CHECK_LIB(lo, main, [ac_liblo="yes"], [ac_liblo="no"])
 
297
   if test "x$ac_liblo" = "xyes"; then
 
298
      AC_DEFINE(CONFIG_LIBLO, 1, [Define if liblo is available.])
 
299
      ac_jack_libs="$ac_jack_libs -llo"
 
300
   else
 
301
      AC_MSG_WARN([*** liblo library not found.])
 
302
      AC_MSG_WARN([*** OSC service support will be disabled.])
 
303
      ac_nsm="no"
 
304
   fi
 
305
else
 
306
   ac_nsm="no"
 
307
fi
 
308
 
 
309
AC_SUBST(ac_jack_libs)
 
310
AC_SUBST(ac_lv2_libs)
 
311
 
 
312
 
 
313
# Checks for header files.
 
314
AC_HEADER_STDC
 
315
AC_HEADER_SYS_WAIT
 
316
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/stat.h unistd.h signal.h)
 
317
 
 
318
ac_jack_incpath="$ac_incpath"
 
319
ac_lv2_incpath="$ac_incpath"
 
320
 
 
321
ac_all_targets=""
 
322
ac_install_targets=""
 
323
ac_uninstall_targets=""
 
324
ac_clean_targets=""
 
325
 
 
326
# Check for JACK headers.
 
327
if test "x$ac_jack" = "xyes"; then
 
328
   AC_CHECK_HEADERS(jack/jack.h, [ac_jack="yes"], [ac_jack="no"])
 
329
   if test "x$ac_jack" = "xno"; then
 
330
      AC_MSG_WARN([*** JACK header files not found.])
 
331
      AC_MSG_WARN([*** JACK stand-alone build will be disabled.])
 
332
   else
 
333
      AC_DEFINE(CONFIG_JACK, 1, [Define if JACK stand-alone build is enabled.])
 
334
      ac_all_targets="jack $ac_all_targets"
 
335
      ac_install_targets="install_jack $ac_install_targets"
 
336
      ac_uninstall_targets="uninstall_jack $ac_uninstall_targets"
 
337
      ac_clean_targets="clean_jack $ac_clean_targets"
 
338
   fi
 
339
fi
 
340
 
 
341
if test "x$ac_jack" = "xno"; then
 
342
  ac_jack_session="no"
 
343
  ac_jack_midi="no"
 
344
  ac_alsa_midi="no"
 
345
  ac_liblo="no"
 
346
  ac_nsm="no"
 
347
fi
 
348
 
 
349
# Check for JACK session headers availability.
 
350
if test "x$ac_jack_session" = "xyes"; then
 
351
   AC_CHECK_HEADER(jack/session.h, [ac_jack_session="yes"], [ac_jack_session="no"])
 
352
   if test "x$ac_jack_session" = "xyes"; then
 
353
      AC_DEFINE(CONFIG_JACK_SESSION, 1, [Define if JACK session support is available.])
 
354
   else
 
355
      AC_MSG_WARN([*** JACK session header file not found.])
 
356
      AC_MSG_WARN([*** JACK session support will be disabled.])
 
357
   fi
 
358
fi
 
359
 
 
360
# Check for JACK MIDI headers availability.
 
361
if test "x$ac_jack_midi" = "xyes"; then
 
362
   AC_CHECK_HEADER(jack/midiport.h, [ac_jack_midi="yes"], [ac_jack_midi="no"])
 
363
   if test "x$ac_jack_midi" = "xyes"; then
 
364
      AC_DEFINE(CONFIG_JACK_MIDI, 1, [Define if JACK MIDI support is enabled.])
 
365
   else
 
366
      AC_MSG_WARN([*** JACK MIDI header files not found.])
 
367
      AC_MSG_WARN([*** JACK MIDI support will be disabled.])
 
368
   fi
 
369
fi
 
370
 
 
371
# Check for ALSA MIDI headers availability.
 
372
if test "x$ac_alsa_midi" = "xyes"; then
 
373
   AC_CHECK_HEADER(alsa/asoundlib.h, [ac_alsa_midi="yes"], [ac_alsa_midi="no"])
 
374
   if test "x$ac_alsa_midi" = "xyes"; then
 
375
      AC_DEFINE(CONFIG_ALSA_MIDI, 1, [Define if ALSA MIDI support is enabled.])
 
376
   else
 
377
      AC_MSG_WARN([*** ALSA MIDI header files not found.])
 
378
      AC_MSG_WARN([*** ALSA MIDI support will be disabled.])
 
379
   fi
 
380
fi
 
381
 
 
382
# Check for LV2 headers.
 
383
if test "x$ac_lv2" = "xyes"; then
 
384
   AC_CHECK_HEADERS(lv2.h, [ac_lv2="yes"], [ac_lv2="no"])
 
385
   if test "x$ac_lv2" = "xno"; then
 
386
      AC_MSG_WARN([*** LV2 header files not found.])
 
387
   else
 
388
      AC_DEFINE(CONFIG_LV2, 1, [Define if LV2 plug-in build is enabled.])
 
389
      ac_all_targets="lv2 lv2ui $ac_all_targets"
 
390
      ac_install_targets="install_lv2 $ac_install_targets"
 
391
      ac_uninstall_targets="uninstall_lv2 $ac_uninstall_targets"
 
392
      ac_clean_targets="clean_lv2 $ac_clean_targets"
 
393
   fi
 
394
fi
 
395
 
 
396
if test "x$ac_lv2" = "xno"; then
 
397
   lv2_external_ui="no"
 
398
fi
 
399
 
 
400
if test "x$ac_lv2_external_ui" = "xyes"; then
 
401
   CFLAGS="$CFLAGS -Isrc/lv2"
 
402
   CPPFLAGS="$CPPFLAGS -Isrc/lv2"
 
403
   AC_CHECK_HEADER(lv2_external_ui.h, [ac_lv2_external_ui="yes"], [ac_lv2_external_ui="no"])
 
404
   if test "x$ac_lv2_external_ui" = "xyes"; then
 
405
      AC_DEFINE(CONFIG_LV2_EXTERNAL_UI, 1, [Define if LV2 External UI extension is available.])
 
406
      ac_lv2_incpath="lv2 $ac_lv2_incpath"
 
407
   else
 
408
      AC_MSG_WARN([*** LV2 External UI extension will be disabled.])
 
409
   fi
 
410
fi
 
411
 
 
412
# Check for liblo headers.
 
413
if test "x$ac_liblo" = "xyes"; then
 
414
   AC_CHECK_HEADER(lo/lo.h, [ac_lo_h="yes"], [ac_lo_h="no"])
 
415
   if test "x$ac_lo_h" = "xno"; then
 
416
      AC_MSG_ERROR([lo.h header file not found.])
 
417
      ac_liblo="no"
 
418
      ac_nsm="no"
 
419
   fi
 
420
fi
 
421
 
 
422
AC_SUBST(ac_all_targets)
 
423
AC_SUBST(ac_install_targets)
 
424
AC_SUBST(ac_uninstall_targets)
 
425
AC_SUBST(ac_clean_targets)
 
426
 
 
427
AC_SUBST(ac_jack_incpath)
 
428
AC_SUBST(ac_lv2_incpath)
 
429
 
 
430
 
 
431
# Check for NSM support.
 
432
if test "x$ac_nsm" = "xyes"; then
 
433
   AC_DEFINE(CONFIG_NSM, 1, [Define if NSM support is available.])
 
434
fi
 
435
 
 
436
 
 
437
# Checks for build targets
 
438
if test "x$ac_jack" = "xno" -a "x$ac_lv2" = "xno"; then
 
439
   AC_MSG_ERROR([*** JACK and LV2 build options disabled.])
 
440
fi
 
441
 
 
442
if test "x$ac_jack" = "xyes"; then
 
443
   if test "x$ac_jack_midi" = "xno" -a "x$ac_alsa_midi" = "xno"; then
 
444
      AC_MSG_ERROR([*** JACK MIDI and ALSA MIDI support disabled.])
 
445
   fi
 
446
fi
 
447
 
 
448
 
 
449
# Checks for typedefs, structures, and compiler characteristics.
 
450
# AC_C_CONST
 
451
 
 
452
# Finally produce a configure header file and the makefiles.
 
453
AC_OUTPUT
 
454
 
 
455
# make clean > /dev/null 2>&1
 
456
 
 
457
# Output summary message
 
458
 
 
459
echo
 
460
echo "  $PACKAGE_NAME $PACKAGE_VERSION"
 
461
echo
 
462
echo "  Build target . . . . . . . . . . . . . . . . . . .: $ac_debug"
 
463
echo
 
464
echo "  JACK stand-alone build . . . . . . . . . . . . . .: $ac_jack"
 
465
echo "  JACK session support . . . . . . . . . . . . . . .: $ac_jack_session"
 
466
echo "  JACK MIDI support  . . . . . . . . . . . . . . . .: $ac_jack_midi"
 
467
echo "  ALSA MIDI support  . . . . . . . . . . . . . . . .: $ac_alsa_midi"
 
468
echo "  LV2 plug-in build  . . . . . . . . . . . . . . . .: $ac_lv2"
 
469
echo "  LV2 plug-in External UI support  . . . . . . . . .: $ac_lv2_external_ui"
 
470
echo "  OSC service support (liblo)  . . . . . . . . . . .: $ac_liblo"
 
471
echo "  NSM (Non Session Management) support . . . . . . .: $ac_nsm"
 
472
echo
 
473
echo "  Install prefix . . . . . . . . . . . . . . . . . .: $ac_prefix"
 
474
echo
 
475
echo "Now type 'make', followed by 'make install' as root."
 
476
echo