File: configure.ac

package info (click to toggle)
muse 0.8.1a-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 14,128 kB
  • ctags: 8,595
  • sloc: cpp: 68,637; sh: 8,640; ansic: 1,457; makefile: 854; python: 579
file content (534 lines) | stat: -rw-r--r-- 12,424 bytes parent folder | download | duplicates (3)
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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
dnl --------------------------------------------------
dnl configure.ac for the MusE
dnl --------------------------------------------------

AC_INIT(MusE, 0.8.1)
AC_CONFIG_SRCDIR(muse/app.cpp)
AM_INIT_AUTOMAKE(0.8.1)
AM_CONFIG_HEADER(config.h)
### AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(m4)

dnl ***** Check for programs *****
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_PROG_LN_S

###############
### DocBook ###
###############
PGAC_PROG_JADE
if test -n "$JADE"; then
  PGAC_CHECK_DOCBOOK(4.1)
  if test "$pgac_cv_check_docbook" = "yes"; then
    PGAC_PATH_DOCBOOK_STYLESHEETS
    if test -n "$DOCBOOKSTYLE"; then
      DOCBOOKTARGETS="book1.html"
    else
      AC_MSG_WARN([DocBook stylesheets not found or not usable - documentation will not be built])
    fi
  else
    AC_MSG_WARN([DocBook 4.1 DTD not found or not usable - documentation will not be built])
  fi
else
  AC_MSG_WARN([jade not found - documentation will not be built])
fi
AC_SUBST(DOCBOOKTARGETS)

###############
### doxygen ###
###############
AC_ARG_VAR(DOXYGEN, Doxygen)
AC_PATH_PROG(DOXYGEN, doxygen, no)

################
### graphviz ###
################
AC_ARG_VAR(DOT, The "dot" program from graphviz)
AC_PATH_PROG(DOT, dot, no)
if test "$DOT" != "no"; then
  HAVEDOT=YES
  DOTPATH=$( dirname "$DOT" )
else
  HAVEDOT=NO
fi
AC_SUBST(HAVEDOT)
AC_SUBST(DOTPATH)

############
### perl ###
############
AC_ARG_VAR(PERL, Perl)
AC_PATH_PROG(PERL, perl, no)
if test "$PERL" == "no"; then
  AC_MSG_WARN([you don't have perl installed!  wierdo!  (and doxygen might not like this)])
fi

dnl ***** Check for libraries *****

#########
### X ###
#########
AC_PATH_XTRA
if test "$X_DISPLAY_MISSING" != ""; then
  AC_MSG_ERROR([X required])
fi

##########
### QT ###
##########
CONFIGURE_QT(3.2.0, , AC_MSG_ERROR([need qt >= 3.2.0]))
if test "$muse_qttest" = "yes"; then
  AC_LANG_PUSH([C++])
  muse_save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS $QT_CFLAGS"
  muse_save_CXXFLAGS="$CXXFLAGS"
  CXXFLAGS="$CXXFLAGS $QT_CFLAGS"
  muse_save_LDFLAGS="$LDFLAGS"
  LDFLAGS="$LDFLAGS $QT_LIBS"
  AC_CHECK_LIB(qt-mt, qt_selection_property, [
    true
  ],[
    AC_MSG_ERROR([

  MusE requires thread enabled QT (qt-mt) >= 3.2.0

  You can either compile your own version of QT (making sure you enable
  threading!) or install the appropriate package for your distribution.
])
  ])
  CFLAGS="$muse_save_CFLAGS"
  CXXFLAGS="$muse_save_CXXFLAGS"
  LDFLAGS="$muse_save_LDFLAGS"
  unset muse_save_CFLAGS
  unset muse_save_CXXFLAGS
  unset muse_save_LDFLAGS
  AC_LANG_POP([C++])
fi

############
### ALSA ###
############
AM_PATH_ALSA(0.9.0,
  true,
  AC_MSG_ERROR([latest alsa (0.9.x) is required])
)

#################
### fluidsynth ###
#################
LIBFLUIDSYNTH=
muse_enable_fluidlib="yes"
synth_fluidsynth="fluidsynth"
synth_fluid="fluid"
synth_fluidsynth_build="yes"
AC_ARG_ENABLE(fluidsynth,
[  --disable-fluidsynth    disable fluidsynth softsynth plugin],[
  case "$enableval" in
    "yes")
      synth_fluidsynth_build="yes"
      synth_fluidsynth="fluidsynth"
      synth_fluid="fluid"
      ;;
    "no")
      muse_enable_fluidlib="no"
      synth_fluidsynth=""
      synth_fluid=""
      synth_fluidsynth_build="no"

      ;;
    *)
      AC_MSG_ERROR([must use --enable-fluidsynth(=yes/no) or --disable-fluidsynth])
      ;;
  esac
])
AM_CONDITIONAL(ENABLEFLUIDSYNTH, test "$muse_enable_fluidlib" = "yes")

if test "$muse_enable_fluidlib" = "yes"; then
  PKG_CHECK_MODULES(Fluidsynth, fluidsynth,
    [FLUIDSYNTHDIRS="fluid fluidsynth"; AC_DEFINE(ENABLEFLUIDSYNTH, 1, [Compile fluidsynth])],
    [AC_MSG_WARN([libfluidsynth not found; disabling fluidsynth plugins]) ;
    muse_enable_fluidlib="no"]
    )
fi
AC_SUBST(FLUIDSYNTHDIRS)
AC_SUBST(synth_fluidsynth)
AC_SUBST(synth_fluid)


###############
### sndfile ###
###############
PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.0,
  true,
  AC_MSG_ERROR([need libsndfile >= 1.0.0])
)

###############
### libsamplerate ###
###############
PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.1.0,
  true,
  AC_MSG_ERROR([need libsamplerate])
)

############
### JACK ###
############

PKG_CHECK_MODULES(JACK,
    jack >= 0.98.0,
    true,
    AC_MSG_ERROR([need JACK >= 0.98.0])
  )

##############
### LASH ###
##############
muse_enable_lash="no"
AC_ARG_ENABLE(lash,
[  --enable-lash         enable LASH support],[
  case "$enableval" in
    "yes")
      muse_enable_lash="yes"
      ;;
    "no")
      muse_enable_lash="no"
      ;;
    *)
      AC_MSG_ERROR([must use --enable-lash(=yes/no) or --disable-lash])
      ;;
  esac
])

if test "$muse_enable_lash" = "yes"; then
  PKG_CHECK_MODULES(LASH, lash-1.0 >= 0.2, LASH_FOUND="yes", LASH_FOUND="no")
  AC_SUBST(LASH_CFLAGS)
  AC_SUBST(LASH_LIBS)

  if test "$LASH_FOUND" = "yes"; then
    AC_DEFINE(HAVE_LASH, 1, [whether or not we are supporting lash])
    LASH_VERSION=$( pkg-config --modversion lash-1.0 )
    AC_DEFINE_UNQUOTED(LASH_VERSION, "$LASH_VERSION", [The version of lash we're compiling against])
  fi
else
  AC_MSG_WARN([LASH support is disabled])
  LASH_FOUND="no"
fi
AM_CONDITIONAL(HAVE_LASH, test "$LASH_FOUND" = "yes")


dnl ***** Check for header files *****

dnl ***** Check for options *****

#################
### givertcap ###
#################

GIVERTCAP=
report_rtcap="no"
AC_ARG_ENABLE(rtcap,
[  --enable-rtcap          use Tommi Ilmonen's "givertcap" to give
                          realtime capabilities],[
  case "$enableval" in
    "yes")
      AC_DEFINE(RTCAP, 1, [Use givertcap])
      MUSECXXFLAGS="$MUSECXXFLAGS -DRTCAP"
      GIVERTCAP="givertcap"

      AC_CHECK_HEADER(sys/capability.h,
               report_rtcap="yes",
               AC_MSG_ERROR([Missing sys/capability.h]))
      ;;
    "no")
      ;;
    *)
      AC_MSG_ERROR([must use --enable-rtcap(=yes/no) or --disable-rtcap])
  esac
])
AM_CONDITIONAL(RTCAP, test "$report_rtcap" = "yes")
AC_SUBST(GIVERTCAP)


####################
### suid-install ###
####################

SUIDINSTALL="no"
AC_ARG_ENABLE(suid-install,
[  --enable-suid-install    install MusE setuid root (with kernel 2.6, use realtime-lsm instead)],[
  case "$enableval" in
    "yes")
      SUIDINSTALL="yes"
      ;;
    "no")
      ;;
    *)
      AC_MSG_ERROR([must use --enable-suid-install(=yes/no) or --disable-suid-install])
      ;;
  esac
])
AC_SUBST(SUIDINSTALL)

##################
### suid-build ###
##################
SUIDBUILD="no"
AC_ARG_ENABLE(suid-build,
[  --enable-suid-build    build MusE setuid root(with kernel 2.6, use realtime-lsm instead)],[
  case "$enableval" in
    "yes")
      SUIDBUILD="yes"
      ;;
    "no")
      SUIDBUILD="no"
      ;;
    *)
      AC_MSG_ERROR([must use --enable-suid-build(=yes/no) or --disable-suid-build])
      ;;
  esac
])
AC_SUBST(SUIDBUILD)


########################
### doxygen-treeview ###
########################
DOXYGEN_TREEVIEW="YES"
report_doxy_treeview="yes";
AC_ARG_ENABLE(doxy-treeview,
[  --disable-doxy-treeview stop Doxygen from generating java-ified
                          treeview menus in its HTML output],[
  case "$enableval" in
    "yes")
      ;;
    "no")
      DOXYGEN_TREEVIEW="NO"
      report_doxy_treeview="no";
      ;;
    *)
      AC_MSG_ERROR([must use --enable-doxy-treeview(=yes/no) or --disable-doxy-treeview])
      ;;
  esac
])
AC_SUBST(DOXYGEN_TREEVIEW)

################
### patchbay ###
################
###PATCHBAY="no"
###AC_SUBST(PATCHBAY)
###AM_CONDITIONAL(PATCHBAY, test "$PATCHBAY" == "yes")

## -DQT_NO_CAST_ASCII
MUSECXXFLAGS="-g -fno-exceptions -Wall -W -D_GNU_SOURCE -D_REENTRANT \
  -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT \
  -I\$(top_srcdir) -I\$(top_srcdir)/muse/widgets \$(QT_CFLAGS)"

#MUSEOPTCXXFLAGS="-O6 -fomit-frame-pointer -ffast-math -fstrength-reduce \
#-funroll-loops"
#MUSEOPTCXXFLAGS="-O2"
MUSEOPTCXXFLAGS="-O3 -fomit-frame-pointer -ffast-math -fstrength-reduce -funroll-loops"

# -fmove-all-movables

################
### optimize ###
################
report_optimise="no"
AC_ARG_ENABLE(optimize,
  [  --enable-optimize       ask the compiler for its best optimizations (possibly only i386)],[
    case "$enableval" in
      "yes")
        report_optimise="yes"
        CXXFLAGS="$( echo "$CXXFLAGS" | sed "s/-O.[ ]*//" )"
        MUSECXXFLAGS="$MUSECXXFLAGS $MUSEOPTCXXFLAGS"
        ;;
      "no")
        ;;
      *)
        AC_MSG_ERROR([must use --enable-optimize(=yes/no) or --disable-optimize])
        ;;
    esac
  ])

#############
### debug ###
#############
report_debug="no"
AC_ARG_ENABLE(debug,
  [  --enable-debug          disable optimizations],[
    case "$enableval" in
      "yes")
        report_debug="yes"
        CXXFLAGS=""
        ;;
      "no")
        ;;
      *)
        AC_MSG_ERROR([must use --enable-debug(=yes/no) or --disable-debug])
        ;;
    esac
  ])

###########################
### PCH                 ###
### precompiled headers ###
###########################

AC_ARG_ENABLE(pch,
  [  --enable-pch            enable precompiled headers (gcc 3.4 required)],[
    case "$enableval" in
      "yes")
        MUSECXXFLAGS="$MUSECXXFLAGS -Winvalid-pch"
        PCH="yes"
        AC_SUBST(PCH)
        AC_DEFINE(PCH, 1, [whether or not we use precompiled headers])
        ;;
      "no")
        ;;
      *)
        AC_MSG_ERROR([must use --enable-pch(=yes/no) or --disable-pch])
        ;;
    esac
  ])
AM_CONDITIONAL(PCH, test "$PCH" = "yes")

############
### arch ###
############

report_march="none"
AC_ARG_ENABLE(arch,
  [  --enable-arch=ARCH      use -march=ARCH and -mcpu=ARCH argument to CXX
                          choose from: 386, 486, 586, 686, pentium, pentiumpro,
                                       and k6.  gcc 3.0 gives you athlon as well],[
    case "$enableval" in
      "no")
        ;;
      *)
        report_march="$enableval"
        MUSECXXFLAGS="$MUSECXXFLAGS -mcpu=$enableval -march=$enableval"
        ;;
    esac
  ])

###################
### vst plugins ###
###################

vst_possible=no
VST="no"
PKG_CHECK_MODULES(FST,libfst, [ vst_possible=yes ], [ vst_possible=no ])
AC_ARG_ENABLE(vst,[  --enable-vst            build VST/win support. (disabled by default) ],
        [ if test x$enable_vst = xyes ; then
            vst_requested=yes;
        fi
        ]
)

if test x$vst_possible = xyes -a x$vst_requested = xyes ; then
      AC_MSG_CHECKING([support for VST/win plugins])
      VST_CFLAGS="$FST_CFLAGS"
      VST_LIBS="$FST_LIBS"
      VST="yes"
      AC_DEFINE(VST_SUPPORT, 1, [support for VST/win plugins])
fi

AM_CONDITIONAL(VST_SUPPORT, test x$vst_possible = xyes -a x$vst_requested = xyes)


AC_DEFINE(HAVE_AUDIO, 1, [Make audio-specific code])
AM_CONDITIONAL(HAVE_AUDIO, test "yes" = "yes")
AC_SUBST(MUSECXXFLAGS)

if test -n "$GIVERTCAP"; then
      SUIDINSTALL="no"
      SUIDBUILD="no"
      fi


AC_OUTPUT([
Makefile
m4/Makefile
doc/Makefile
xpm/Makefile
demos/Makefile
grepmidi/Makefile
packaging/Makefile
muse/Makefile
muse/widgets/Makefile
muse/master/Makefile
muse/midiedit/Makefile
muse/arranger/Makefile
muse/liste/Makefile
muse/driver/Makefile
muse/waveedit/Makefile
muse/ctrl/Makefile
muse/instruments/Makefile
muse/mixer/Makefile
muse/cliplist/Makefile
muse/marker/Makefile
muse/mplugins/Makefile
share/Makefile
share/drummaps/Makefile
share/html/Makefile
share/locale/Makefile
share/wallpapers/Makefile
share/instruments/Makefile
share/plugins/Makefile
share/templates/Makefile
synti/Makefile
synti/libsynti/Makefile
synti/fluidsynth/Makefile
synti/fluid/Makefile
synti/organ/Makefile
synti/s1/Makefile
synti/vam/Makefile
synti/deicsonze/Makefile
synti/simpledrums/Makefile
lib/Makefile
lib/synthi/Makefile
lib/plugins/Makefile
plugins/Makefile
plugins/freeverb/Makefile
Doxyfile
])

######## Show a configuration report ########
if test -n "$JADE"; then
  jade_report="$JADE";
else
  jade_report="not present"
fi
AC_MSG_NOTICE([

  MusE configured

  using rtcap:         $report_rtcap
  LASH support:      $LASH_FOUND
  setuid root install: $SUIDINSTALL
  setuid root build:   $SUIDBUILD
  VST/win support:     $VST

  jade:                $jade_report
  doxygen:             $DOXYGEN
  graphviz:            $DOT
  perl:                $PERL
  treeviews in doxygen
  html output:         $report_doxy_treeview

  C++ compiler:        $CXX
  optimizing:          $report_optimise
  debug:               $report_debug
  optimise for arch:   $report_march

  installation prefix: $prefix

  Software synths
  ---------------
  FluidSynth:        $synth_fluidsynth_build

])