forked from rncbc/qtractor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
1516 lines (1351 loc) · 49.2 KB
/
configure.ac
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
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Process this file with autoconf to produce a configure script.
AC_INIT(Qtractor, 0.7.8, [email protected], qtractor)
AC_CONFIG_SRCDIR(src/qtractor.cpp)
AC_CONFIG_HEADERS(src/config.h)
AC_CONFIG_FILES(Makefile qtractor.spec src/src.pri src/qtractor.desktop)
AC_CONFIG_FILES(src/qtractor_vst_scan.pri)
# Set default installation prefix.
AC_PREFIX_DEFAULT(/usr/local)
ac_prefix=$prefix
if test "x$ac_prefix" = "xNONE"; then
ac_prefix=$ac_default_prefix
fi
AC_SUBST(ac_prefix)
AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_prefix"], [Default installation prefix.])
# Set default library/plugin prefix.
if test "x$exec_prefix" = "xNONE"; then
exec_prefix=$ac_prefix
fi
eval ac_libdir=$libdir
AC_SUBST(ac_libdir)
AC_DEFINE_UNQUOTED(CONFIG_LIBDIR, ["$ac_libdir"], [Default library path.])
# Enable debugging argument option.
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug], [enable debugging (default=no)]),
[ac_debug="$enableval"])
if test "x$ac_debug" = "xyes"; then
AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])
ac_stacktrace="yes"
ac_debug="debug"
else
ac_stacktrace="no"
ac_debug="release"
fi
AC_SUBST(ac_debug)
# Enable Qt4/5 availability.
AC_ARG_ENABLE(qt4,
AC_HELP_STRING([--enable-qt4], [enable Qt4 build (default=no)]),
[ac_qt4="$enableval"],
[ac_qt4="no"])
# Enable libvorbis(file) availability.
AC_ARG_ENABLE(libvorbis,
AC_HELP_STRING([--enable-libvorbis], [enable libvorbis interface (default=yes)]),
[ac_libvorbis="$enableval"],
[ac_libvorbis="yes"])
# Enable libmad availability.
AC_ARG_ENABLE(libmad,
AC_HELP_STRING([--enable-libmad], [enable libmad interface (default=yes)]),
[ac_libmad="$enableval"],
[ac_libmad="yes"])
# Enable libsamplerate availability.
AC_ARG_ENABLE(libsamplerate,
AC_HELP_STRING([--enable-libsamplerate], [enable libsamplerate interface (default=yes)]),
[ac_libsamplerate="$enableval"],
[ac_libsamplerate="yes"])
# Enable librubberband availability.
AC_ARG_ENABLE(librubberband,
AC_HELP_STRING([--enable-librubberband], [enable librubberband interface (default=yes)]),
[ac_librubberband="$enableval"],
[ac_librubberband="yes"])
# Enable liblo availability.
AC_ARG_ENABLE(liblo,
AC_HELP_STRING([--enable-liblo], [enable liblo interface (default=yes)]),
[ac_liblo="$enableval"],
[ac_liblo="yes"])
# Enable libz availability.
AC_ARG_ENABLE(libz,
AC_HELP_STRING([--enable-libz], [enable libz interface (default=yes)]),
[ac_libz="$enableval"],
[ac_libz="yes"])
# Enable LILV support.
AC_ARG_ENABLE(lilv,
AC_HELP_STRING([--enable-lilv], [enable LILV interface support (default=yes)]),
[ac_lilv="$enableval"],
[ac_lilv="yes"])
# Enable SUIL support.
AC_ARG_ENABLE(suil,
AC_HELP_STRING([--enable-suil], [enable SUIL interface support (default=yes)]),
[ac_suil="$enableval"],
[ac_suil="yes"])
# Enable SSE optimization.
AC_ARG_ENABLE(sse,
AC_HELP_STRING([--enable-sse], [enable SSE optimization (default=yes)]),
[ac_sse="$enableval"],
[ac_sse="yes"])
# Enable LADSPA support.
AC_ARG_ENABLE(ladspa,
AC_HELP_STRING([--enable-ladspa], [enable LADSPA plug-in support (default=yes)]),
[ac_ladspa="$enableval"],
[ac_ladspa="yes"])
# Enable DSSI support.
AC_ARG_ENABLE(dssi,
AC_HELP_STRING([--enable-dssi], [enable DSSI plug-in support (default=yes)]),
[ac_dssi="$enableval"],
[ac_dssi="yes"])
# Enable VST support.
AC_ARG_ENABLE(vst,
AC_HELP_STRING([--enable-vst], [enable VST plug-in support (default=yes)]),
[ac_vst="$enableval"],
[ac_vst="yes"])
AC_ARG_ENABLE(vestige,
AC_HELP_STRING([--enable-vestige], [enable VeSTige header support (default=yes)]),
[ac_vestige="$enableval"],
[ac_vestige="yes"])
# Enable LV2 support.
AC_ARG_ENABLE(lv2,
AC_HELP_STRING([--enable-lv2], [enable LV2 plug-in support (default=yes)]),
[ac_lv2="$enableval"],
[ac_lv2="yes"])
AC_ARG_ENABLE(lv2-event,
AC_HELP_STRING([--enable-lv2-event], [enable LV2 plug-in MIDI/Event support (default=no)]),
[ac_lv2_event="$enableval"],
[ac_lv2_event="no"])
AC_ARG_ENABLE(lv2-atom,
AC_HELP_STRING([--enable-lv2-atom], [enable LV2 plug-in MIDI/Atom support (default=yes)]),
[ac_lv2_atom="$enableval"],
[ac_lv2_atom="yes"])
AC_ARG_ENABLE(lv2-worker,
AC_HELP_STRING([--enable-lv2-worker], [enable LV2 plug-in Worker/schedule support (default=yes)]),
[ac_lv2_worker="$enableval"],
[ac_lv2_worker="yes"])
AC_ARG_ENABLE(lv2-ui,
AC_HELP_STRING([--enable-lv2-ui], [enable LV2 plug-in UI support (default=yes)]),
[ac_lv2_ui="$enableval"],
[ac_lv2_ui="yes"])
AC_ARG_ENABLE(lv2-external-ui,
AC_HELP_STRING([--enable-lv2-external-ui], [enable LV2 plug-in External UI support (default=yes)]),
[ac_lv2_external_ui="$enableval"],
[ac_lv2_external_ui="yes"])
AC_ARG_ENABLE(lv2-state,
AC_HELP_STRING([--enable-lv2-state], [enable LV2 plug-in State support (default=yes)]),
[ac_lv2_state="$enableval"],
[ac_lv2_state="yes"])
AC_ARG_ENABLE(lv2-state-files,
AC_HELP_STRING([--enable-lv2-state-files], [enable LV2 plug-in State Files support (default=yes)]),
[ac_lv2_state_files="$enableval"],
[ac_lv2_state_files="yes"])
AC_ARG_ENABLE(lv2-state-make-path,
AC_HELP_STRING([--enable-lv2-state-make-path], [enable LV2 plug-in State Make Path support (default=no)]),
[ac_lv2_state_make_path="$enableval"],
[ac_lv2_state_make_path="no"])
AC_ARG_ENABLE(lv2-programs,
AC_HELP_STRING([--enable-lv2-programs], [enable LV2 plug-in Programs support (default=yes)]),
[ac_lv2_programs="$enableval"],
[ac_lv2_programs="yes"])
AC_ARG_ENABLE(lv2-presets,
AC_HELP_STRING([--enable-lv2-presets], [enable LV2 plug-in Presets support (default=yes)]),
[ac_lv2_presets="$enableval"],
[ac_lv2_presets="yes"])
AC_ARG_ENABLE(lv2-patch,
AC_HELP_STRING([--enable-lv2-patch], [enable LV2 plug-in Patch support (default=yes)]),
[ac_lv2_patch="$enableval"],
[ac_lv2_patch="yes"])
AC_ARG_ENABLE(lv2-time,
AC_HELP_STRING([--enable-lv2-time], [enable LV2 plug-in Time support (default=yes)]),
[ac_lv2_time="$enableval"],
[ac_lv2_time="yes"])
AC_ARG_ENABLE(lv2-time-position,
AC_HELP_STRING([--enable-lv2-time-position], [enable LV2 plug-in Time/position support (default=yes)]),
[ac_lv2_time_position="$enableval"],
[ac_lv2_time_position="yes"])
AC_ARG_ENABLE(lv2-options,
AC_HELP_STRING([--enable-lv2-options], [enable LV2 plug-in Options support (default=yes)]),
[ac_lv2_options="$enableval"],
[ac_lv2_options="yes"])
AC_ARG_ENABLE(lv2-buf-size,
AC_HELP_STRING([--enable-lv2-buf-size], [enable LV2 plug-in Buf-size support (default=yes)]),
[ac_lv2_buf_size="$enableval"],
[ac_lv2_buf_size="yes"])
AC_ARG_ENABLE(lv2-ui-touch,
AC_HELP_STRING([--enable-lv2-ui-touch], [enable LV2 plug-in UI Touch interface support (default=yes)]),
[ac_lv2_ui_touch="$enableval"],
[ac_lv2_ui_touch="yes"])
AC_ARG_ENABLE(lv2-ui-idle,
AC_HELP_STRING([--enable-lv2-ui-idle], [enable LV2 plug-in UI Idle interface support (default=yes)]),
[ac_lv2_ui_idle="$enableval"],
[ac_lv2_ui_idle="yes"])
AC_ARG_ENABLE(lv2-ui-show,
AC_HELP_STRING([--enable-lv2-ui-show], [enable LV2 plug-in UI Show interface support (default=yes)]),
[ac_lv2_ui_show="$enableval"],
[ac_lv2_ui_show="yes"])
AC_ARG_ENABLE(lv2-ui-gtk2,
AC_HELP_STRING([--enable-lv2-ui-gtk2], [enable LV2 plug-in UI GTK2 native support (default=yes)]),
[ac_lv2_ui_gtk2="$enableval"],
[ac_lv2_ui_gtk2="yes"])
AC_ARG_ENABLE(lv2-ui-x11,
AC_HELP_STRING([--enable-lv2-ui-x11], [enable LV2 plug-in UI X11 native support (default=yes)]),
[ac_lv2_ui_x11="$enableval"],
[ac_lv2_ui_x11="yes"])
# Enable JACK session support.
AC_ARG_ENABLE(jack-session,
AC_HELP_STRING([--enable-jack-session], [enable JACK session support (default=yes)]),
[ac_jack_session="$enableval"],
[ac_jack_session="yes"])
# Enable JACK latency support.
AC_ARG_ENABLE(jack-latency,
AC_HELP_STRING([--enable-jack-latency], [enable JACK latency support (default=yes)]),
[ac_jack_latency="$enableval"],
[ac_jack_latency="yes"])
# Enable JACK metadata support.
AC_ARG_ENABLE(jack_metadata,
AC_HELP_STRING([--enable-jack-metadata], [enable JACK metadata support (default=yes)]),
[ac_jack_metadata="$enableval"],
[ac_jack_metadata="yes"])
# Enable NSM support.
AC_ARG_ENABLE(nsm,
AC_HELP_STRING([--enable-nsm], [enable NSM support (default=yes)]),
[ac_nsm="$enableval"],
[ac_nsm="yes"])
# Enable X11 unique/single instance.
AC_ARG_ENABLE(xunique,
AC_HELP_STRING([--enable-xunique], [enable X11 unique/single instance (default=no)]),
[ac_xunique="$enableval"],
[ac_xunique="no"])
# Enable gradient eye-candy.
AC_ARG_ENABLE(gradient,
AC_HELP_STRING([--enable-gradient], [enable gradient eye-candy (default=yes)]),
[ac_gradient="$enableval"],
[ac_gradient="yes"])
# Enable debugger stack-trace option (assumes --enable-debug).
AC_ARG_ENABLE(stacktrace,
AC_HELP_STRING([--enable-stacktrace], [enable debugger stack-trace (default=no)]),
[ac_stacktrace="$enableval"])
# Standard installation base dirs.
ac_with_paths=""
# Set for alternate Qt4/5 installation dir.
AC_ARG_WITH(qt4,
AC_HELP_STRING([--with-qt4=PATH], [use alternate Qt4 install path]),
[ac_qt4_path="$withval"], [ac_qt4_path="no"])
AC_ARG_WITH(qt5,
AC_HELP_STRING([--with-qt5=PATH], [use alternate Qt5 install path]),
[ac_qt5_path="$withval"], [ac_qt5_path="no"])
if test "x$ac_qt4_path" != "xno"; then
ac_with_paths="$ac_with_paths $ac_qt4_path"
ac_qt4="yes"
fi
if test "x$ac_qt5_path" != "xno"; then
ac_with_paths="$ac_with_paths $ac_qt5_path"
ac_qt4="no"
fi
# Set for alternate JACK installation dir.
AC_ARG_WITH(jack,
AC_HELP_STRING([--with-jack=PATH], [use alternate JACK install path]),
[ac_with_paths="$ac_with_paths $withval"])
# Set for alternate ALSA installation dir.
AC_ARG_WITH(alsa,
AC_HELP_STRING([--with-alsa=PATH], [use alternate ALSA install path]),
[ac_with_paths="$ac_with_paths $withval"])
# Set for alternate libsndfile installation dir.
AC_ARG_WITH(libsndfile,
AC_HELP_STRING([--with-libsndfile=PATH], [use alternate libsndfile path]),
[ac_with_paths="$ac_with_paths $withval"])
# Set for alternate libvorbis installation dir.
AC_ARG_WITH(libvorbis,
AC_HELP_STRING([--with-libvorbis=PATH], [use alternate libvorbis path]),
[ac_with_paths="$ac_with_paths $withval"])
# Set for alternate libmad installation dir.
AC_ARG_WITH(libmad,
AC_HELP_STRING([--with-libmad=PATH], [use alternate libmad path]),
[ac_with_paths="$ac_with_paths $withval"])
# Set for alternate libsamplerate installation dir.
AC_ARG_WITH(libsamplerate,
AC_HELP_STRING([--with-libsamplerate=PATH], [use alternate libsamplerate path]),
[ac_with_paths="$ac_with_paths $withval"])
# Set for alternate librubberband installation dir.
AC_ARG_WITH(librubberband,
AC_HELP_STRING([--with-librubberband=PATH], [use alternate librubberband path]),
[ac_with_paths="$ac_with_paths $withval"])
# Set for alternate liblo installation dir.
AC_ARG_WITH(liblo,
AC_HELP_STRING([--with-liblo=PATH], [use alternate liblo path]),
[ac_with_paths="$ac_with_paths $withval"])
# Set for alternate libz installation dir.
AC_ARG_WITH(libz,
AC_HELP_STRING([--with-libz=PATH], [use alternate libz path]),
[ac_with_paths="$ac_with_paths $withval"])
# Set for alternate liblilv installation dir.
AC_ARG_WITH(liblilv,
AC_HELP_STRING([--with-liblilv=PATH], [use alternate liblilv path]),
[ac_with_paths="$ac_with_paths $withval"])
# Set for alternate libsuil installation dir.
AC_ARG_WITH(libsuil,
AC_HELP_STRING([--with-libsuil=PATH], [use alternate libsuil path]),
[ac_with_paths="$ac_with_paths $withval"])
# Set for alternate LADSPA include dir.
AC_ARG_WITH(ladspa,
AC_HELP_STRING([--with-ladspa=PATH], [use alternate LADSPA header path]),
[ac_with_ladspa="$withval"])
# Set for alternate DSSI include dir.
AC_ARG_WITH(dssi,
AC_HELP_STRING([--with-dssi=PATH], [use alternate DSSI header path]),
[ac_with_dssi="$withval"])
# Set for alternate VST include dir.
AC_ARG_WITH(vst,
AC_HELP_STRING([--with-vst=PATH], [use alternate VST header path]),
[ac_with_vst="$withval"])
# Set for alternate LV2 include dir.
AC_ARG_WITH(lv2,
AC_HELP_STRING([--with-lv2=PATH], [use alternate LV2 header path]),
[ac_with_lv2="$withval"])
# Honor user specified flags.
ac_cflags=$CFLAGS
ac_ldflags=$LDFLAGS
# Checks for programs.
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_CXXCPP
# Checks for languages.
AC_LANG_CPLUSPLUS
# Check for proper flags.
ac_arch=`uname -m`
# Check for install paths and alternatives...
ac_libdirs="lib"
if test "x$ac_arch" = "xx86_64"; then
ac_libdirs="$ac_libdirs lib64"
fi
CFLAGS="-fPIC $CFLAGS"
CPPFLAGS="-fPIC $CPPFLAGS"
# Prepend alternate dependencies paths.
ac_path=$PATH
for X in $ac_with_paths; do
if test -d $X/bin; then
ac_path="$X/bin:$ac_path"
fi
if test -d $X/include; then
CFLAGS="-I$X/include $CFLAGS "
CPPFLAGS="-I$X/include $CPPFLAGS"
ac_incpath="$X/include $ac_incpath"
fi
for Y in $ac_libdirs; do
if test -d $X/$Y; then
LIBS="-L$X/$Y $LIBS"
ac_libs="-L$X/$Y $ac_libs"
fi
done
done
# A common error message:
ac_errmsg="not found in current PATH. Maybe QT development environment isn't available."
if test "x$ac_qt4" = "xyes"; then
AC_PATH_PROG(ac_qmake, qmake-qt4, [no], $ac_path)
else
AC_PATH_PROG(ac_qmake, qmake-qt5, [no], $ac_path)
fi
if test "x$ac_qmake" = "xno"; then
AC_PATH_PROG(ac_cv_qmake, qmake, [no], $ac_path)
ac_qmake=$ac_cv_qmake
fi
if test "x$ac_qmake" = "xno"; then
AC_MSG_ERROR([qmake $ac_errmsg])
fi
# Check for proper Qt4/5 major version.
ac_qt_version_major=`$ac_qmake -query QT_VERSION | cut -d. -f1`
if test "x$ac_qt4" = "xyes"; then
if test "x$ac_qt_version_major" != "x4"; then
AC_MSG_ERROR([qmake-qt4 $ac_errmsg (qt4-devel)])
fi
else
if test "x$ac_qt_version_major" != "x5"; then
AC_MSG_ERROR([qmake-qt5 $ac_errmsg (qt5-devel)])
fi
fi
ac_qt_install_bins=`$ac_qmake -query QT_INSTALL_BINS`
if test -d $ac_qt_install_bins; then
ac_path="$ac_qt_install_bins:$ac_path"
fi
# Check it again, now with updated PATH, just in case...
AC_PATH_PROG(ac_cv_qmake, qmake, [no], $ac_path)
ac_qmake=$ac_cv_qmake
if test "x$ac_qmake" = "xno"; then
AC_MSG_ERROR([qmake $ac_errmsg])
fi
AC_SUBST(ac_qmake)
ac_qt_install_headers=`$ac_qmake -query QT_INSTALL_HEADERS`
if test -d $ac_qt_install_headers; then
CFLAGS="-I$ac_qt_install_headers $CFLAGS "
CPPFLAGS="-I$ac_qt_install_headers $CPPFLAGS"
ac_incpath="$ac_qt_install_headers $ac_incpath"
fi
ac_qt_install_libs=`$ac_qmake -query QT_INSTALL_LIBS`
if test -d $ac_qt_install_libs; then
LIBS="-L$ac_qt_install_libs $LIBS"
ac_libs="-L$ac_qt_install_libs $ac_libs"
fi
# Check for proper Qt4/5 version.
if test "x$ac_qt4" = "xyes"; then
AC_CACHE_CHECK([for Qt library version >= 4.4],
ac_cv_qtversion, [
AC_TRY_COMPILE([#include "QtCore/qglobal.h"], [
#if QT_VERSION < 0x040400 || QT_VERSION >= 0x050000
#error Qt library 4.4 or greater required.
#endif
], ac_cv_qtversion="yes", [
echo "no; Qt 4.4 or greater is required"
exit 1
])
])
else
AC_CACHE_CHECK([for Qt library version >= 5.1],
ac_cv_qtversion, [
AC_TRY_COMPILE([#include "QtCore/qglobal.h"], [
#if QT_VERSION < 0x050100 || QT_VERSION >= 0x060000
#error Qt library 5.1 or greater required.
#endif
], ac_cv_qtversion="yes", [
echo "no; Qt 5.1 or greater is required"
exit 1
])
])
fi
# Check for Qt moc utility.
AC_PATH_PROG(ac_moc, moc, [no], $ac_path)
if test "x$ac_moc" = "xno"; then
AC_MSG_ERROR([moc $ac_errmsg])
fi
AC_SUBST(ac_moc)
# Check for Qt uic utility.
AC_PATH_PROG(ac_uic, uic, [no], $ac_path)
if test "x$ac_uic" = "xno"; then
AC_MSG_ERROR([uic $ac_errmsg])
fi
AC_SUBST(ac_uic)
# Check for Qt lupdate utility.
AC_PATH_PROG(ac_lupdate, lupdate, [no], $ac_path)
if test "x$ac_lupdate" = "xno"; then
AC_MSG_ERROR([lupdate $ac_errmsg])
fi
AC_SUBST(ac_lupdate)
# Check for Qt lrelease utility.
AC_PATH_PROG(ac_lrelease, lrelease, [no], $ac_path)
if test "x$ac_release" = "xno"; then
AC_MSG_ERROR([lrelease $ac_errmsg])
fi
AC_SUBST(ac_lrelease)
# Check for IEEE 32bit float optimizations.
AC_CACHE_CHECK([for IEEE 32bit float optimizations],
ac_cv_float32, [
AC_TRY_RUN([
int main() { return (sizeof(float) == 4 ? 0 : 1); }
], ac_cv_float32="yes", ac_cv_float32="no")
])
ac_float32=$ac_cv_float32
if test "x$ac_float32" = "xyes"; then
AC_DEFINE(CONFIG_FLOAT32, 1, [Define if IEEE 32bit float optimizations are enabled.])
fi
# Check for SSE optimization.
if test "x$ac_sse" = "xyes"; then
ac_sse_cflags="-msse -mfpmath=sse -ffast-math"
ac_old_cflags=$CFLAGS
ac_old_cppflags=$CPPFLAGS
CFLAGS="$ac_sse_cflags $CFLAGS"
CPPFLAGS="$ac_sse_cflags $CPPFLAGS"
AC_CACHE_CHECK([for SSE optimization],
ac_cv_sse, [
AC_TRY_RUN([
#include <xmmintrin.h>
#if !defined(__SSE__)
#error SSE optimization disabled.
#endif
int main() {
unsigned int a, b, c, d;
__asm__ __volatile__ (
"movl %%ebx, %%esi\n\t" \
"cpuid\n\t" \
"xchgl %%ebx, %%esi" \
: "=a" (a), "=S" (b), "=c" (c), "=d" (d) : "0" (1));
return ((d & (1 << 25)) ? 0 : 1);
}
], ac_cv_sse="yes", ac_cv_sse="no")
])
ac_sse=$ac_cv_sse
if test "x$ac_sse" = "xyes"; then
ac_cflags="$ac_sse_cflags $ac_cflags"
else
CPPFLAGS=$ac_old_cppflags
CFLAGS=$ac_old_cflags
fi
fi
# Check for pkg-config utility (needed for LV2 GTK UI support).
AC_PATH_PROG(ac_pkg_config, pkg-config, [no], $ac_path)
if test "x$ac_pkg_config" = "xno"; then
ac_lv2="no"
ac_lilv="no"
ac_suil="no"
fi
# Checks for libraries.
AC_CHECK_LIB(m, main)
AC_CHECK_LIB(X11, main)
AC_CHECK_LIB(Xext, main)
# Check for round math function.
AC_CHECK_LIB(m, round, [ac_round="yes"], [ac_round="no"])
if test "x$ac_round" = "xyes"; then
AC_DEFINE(CONFIG_ROUND, 1, [Define if round is available.])
fi
# Check for JACK libraries.
AC_CHECK_LIB(jack, main, [ac_libjack="yes"], [ac_libjack="no"])
if test "x$ac_libjack" = "xno"; then
AC_MSG_ERROR([JACK library not found.])
else
ac_libs="$ac_libs -ljack"
fi
# Check for ALSA libraries.
AC_CHECK_LIB(asound, main, [ac_libasound="yes"], [ac_libasound="no"])
if test "x$ac_libasound" = "xno"; then
AC_MSG_ERROR([ALSA library not found.])
else
ac_libs="$ac_libs -lasound"
fi
# Check for sndfile library.
AC_CHECK_LIB(sndfile, main, [ac_libsndfile="yes"], [ac_libsndfile="no"])
if test "x$ac_libsndfile" = "xno"; then
AC_MSG_ERROR([sndfile library not found.])
else
ac_libs="$ac_libs -lsndfile"
fi
# Check for option libvorbis libraries.
if test "x$ac_libvorbis" = "xyes"; then
AC_CHECK_LIB(ogg, main, [ac_libvorbis="yes"], [ac_libvorbis="no"])
if test "x$ac_libvorbis" = "xyes"; then
ac_libs="$ac_libs -logg"
else
AC_MSG_WARN([*** ogg library not found.])
fi
fi
if test "x$ac_libvorbis" = "xyes"; then
AC_CHECK_LIB(vorbis, main, [ac_libvorbis="yes"], [ac_libvorbis="no"])
if test "x$ac_libvorbis" = "xyes"; then
ac_libs="$ac_libs -lvorbis"
else
AC_MSG_WARN([*** vorbis library not found.])
fi
fi
if test "x$ac_libvorbis" = "xyes"; then
AC_CHECK_LIB(vorbisenc, main, [ac_libvorbis="yes"], [ac_libvorbis="no"])
if test "x$ac_libvorbis" = "xyes"; then
ac_libs="$ac_libs -lvorbisenc"
else
AC_MSG_WARN([*** vorbisenc library not found.])
fi
fi
if test "x$ac_libvorbis" = "xyes"; then
AC_CHECK_LIB(vorbisfile, main, [ac_libvorbis="yes"], [ac_libvorbis="no"])
if test "x$ac_libvorbis" = "xyes"; then
ac_libs="$ac_libs -lvorbisfile"
else
AC_MSG_WARN([*** vorbisfile library not found.])
fi
fi
if test "x$ac_libvorbis" = "xyes"; then
AC_DEFINE(CONFIG_LIBVORBIS, 1, [Define if libvorbis is available.])
else
AC_MSG_WARN([*** Ogg Vorbis audio file support will be disabled.])
fi
# Check for optional libmad library.
if test "x$ac_libmad" = "xyes"; then
AC_CHECK_LIB(mad, main, [ac_libmad="yes"], [ac_libmad="no"])
if test "x$ac_libmad" = "xyes"; then
AC_DEFINE(CONFIG_LIBMAD, 1, [Define if libmad is available.])
ac_libs="$ac_libs -lmad"
else
AC_MSG_WARN([*** mad library not found.])
AC_MSG_WARN([*** MPEG Layer III audio file support will be disabled.])
fi
fi
# Check for optional libsamplerate library.
if test "x$ac_libsamplerate" = "xyes"; then
AC_CHECK_LIB(samplerate, main, [ac_libsamplerate="yes"], [ac_libsamplerate="no"])
if test "x$ac_libsamplerate" = "xyes"; then
AC_DEFINE(CONFIG_LIBSAMPLERATE, 1, [Define if libsamplerate is available.])
ac_libs="$ac_libs -lsamplerate"
else
AC_MSG_WARN([*** samplerate library not found.])
AC_MSG_WARN([*** Sample-rate conversion support will be disabled.])
fi
fi
# Check for optional librubberband library.
if test "x$ac_librubberband" = "xyes"; then
AC_CHECK_LIB(rubberband, main, [ac_librubberband="yes"], [ac_librubberband="no"])
if test "x$ac_librubberband" = "xyes"; then
AC_DEFINE(CONFIG_LIBRUBBERBAND, 1, [Define if librubberband is available.])
ac_libs="$ac_libs -lrubberband"
else
AC_MSG_WARN([*** rubberband library not found.])
AC_MSG_WARN([*** Pitch-shifting support will be disabled.])
fi
fi
# Check for optional liblo library.
if test "x$ac_liblo" = "xyes"; then
AC_CHECK_LIB(lo, main, [ac_liblo="yes"], [ac_liblo="no"])
if test "x$ac_liblo" = "xyes"; then
AC_DEFINE(CONFIG_LIBLO, 1, [Define if liblo is available.])
ac_libs="$ac_libs -llo"
else
AC_MSG_WARN([*** lo library not found.])
AC_MSG_WARN([*** OSC service support will be disabled.])
ac_nsm="no"
fi
else
ac_nsm="no"
fi
# Check for optional libz library.
if test "x$ac_libz" = "xyes"; then
AC_CHECK_LIB(z, main, [ac_libz="yes"], [ac_libz="no"])
if test "x$ac_libz" = "xyes"; then
AC_DEFINE(CONFIG_LIBZ, 1, [Define if libz is available.])
ac_libs="$ac_libs -lz"
else
AC_MSG_WARN([*** z library not found.])
AC_MSG_WARN([*** Archive/Zip file support will be disabled.])
fi
fi
# Check for LV2 support.
if test "x$ac_lv2" = "xno"; then
ac_lilv="no"
ac_lv2_ui="no"
fi
if test "x$ac_lv2_ui" = "xno"; then
ac_suil="no"
ac_lv2_external_ui="no"
ac_lv2_ui_touch="no"
ac_lv2_ui_idle="no"
ac_lv2_ui_show="no"
ac_lv2_ui_gtk2="no"
ac_lv2_ui_x11="no"
fi
if test "x$ac_qt5" = "xno"; then
ac_lv2_ui_gtk2="no"
ac_lv2_ui_x11="no"
fi
# Check for optional liblilv library.
if test "x$ac_lilv" = "xyes"; then
AC_CHECK_LIB(lilv-0, main, [ac_lilv="yes"], [ac_lilv="no"])
fi
if test "x$ac_lilv" = "xyes"; then
ac_lilv_libs=`$ac_pkg_config --libs lilv-0 2>/dev/null`
if test -n "$ac_lilv_libs"; then
ac_libs="$ac_libs $ac_lilv_libs"
AC_DEFINE(CONFIG_LIBLILV, 1, [Define if liblilv is available.])
else
AC_MSG_WARN([*** lilv library not found.])
ac_lilv="no"
fi
fi
if test "x$ac_lilv" = "xyes"; then
AC_CHECK_LIB(lilv-0, lilv_file_uri_parse,
[ac_lilv_file_uri_parse="yes"],
[ac_lilv_file_uri_parse="no"])
if test "x$ac_lilv_file_uri_parse" = "xyes"; then
AC_DEFINE(CONFIG_LILV_FILE_URI_PARSE, 1, [Define if lilv_file_uri_parse is available.])
fi
AC_CHECK_LIB(lilv-0, lilv_world_unload_resource,
[ac_lilv_world_unload_resource="yes"],
[ac_lilv_world_unload_resource="no"])
if test "x$ac_lilv_world_unload_resource" = "xyes"; then
AC_DEFINE(CONFIG_LILV_WORLD_UNLOAD_RESOURCE, 1, [Define if lilv_world_unload_resource is available.])
fi
fi
# Check for LV2 new UI instantiation availability (libsuil).
if test "x$ac_suil" = "xyes"; then
AC_CHECK_LIB(suil-0, main, [ac_suil="yes"], [ac_suil="no"])
fi
if test "x$ac_suil" = "xyes"; then
ac_suil_libs=`$ac_pkg_config --libs suil-0 2>/dev/null`
if test -n "$ac_suil_libs"; then
ac_libs="$ac_libs $ac_suil_libs"
AC_DEFINE(CONFIG_LIBSUIL, 1, [Define if libsuil is available.])
else
AC_MSG_WARN([*** suil library not found.])
ac_suil="no"
fi
fi
if test "x$ac_suil" = "xyes"; then
AC_CHECK_LIB(suil-0, suil_instance_get_handle,
[ac_suil_instance_get_handle="yes"],
[ac_suil_instance_get_handle="no"])
if test "x$ac_suil_instance_get_handle" = "xyes"; then
AC_DEFINE(CONFIG_SUIL_INSTANCE_GET_HANDLE, 1, [Define if suil_instance_get_handle is available.])
fi
fi
# Check for LV2 host library (liblilv).
if test "x$ac_lilv" = "xno"; then
ac_lv2="no"
ac_lv2_ui="no"
ac_lv2_event="no"
ac_lv2_atom="no"
ac_lv2_worker="no"
ac_lv2_external_ui="no"
ac_lv2_state="no"
ac_lv2_state_files="no"
ac_lv2_state_make_path="no"
ac_lv2_programs="no"
ac_lv2_presets="no"
ac_lv2_patch="no"
ac_lv2_time="no"
ac_lv2_time_position="no";
ac_lv2_options="no"
ac_lv2_buf_size="no"
ac_lv2_ui_touch="no"
ac_lv2_ui_idle="no"
ac_lv2_ui_show="no"
ac_lv2_ui_gtk2="no"
ac_lv2_ui_x11="no"
fi
# Check for JACK session event callback availability.
if test "x$ac_jack_session" = "xyes"; then
AC_CHECK_LIB(jack, jack_set_session_callback, [ac_jack_session="yes"], [ac_jack_session="no"])
else
AC_MSG_WARN([*** JACK session support will be disabled.])
fi
# Check for (new) JACK latency support availability.
if test "x$ac_jack_latency" = "xyes"; then
AC_CHECK_LIB(jack, jack_port_get_latency_range, [ac_jack_latency="yes"], [ac_jack_latency="no"])
if test "x$ac_jack_latency" = "xyes"; then
AC_DEFINE(CONFIG_JACK_LATENCY, 1, [Define if JACK latency support is available.])
else
AC_MSG_WARN([*** JACK latency support will be disabled.])
fi
fi
# Check for JACK metadata support availability.
if test "x$ac_jack_metadata" = "xyes"; then
AC_CHECK_LIB(jack, jack_get_property, [ac_jack_metadata="yes"], [ac_jack_metadata="no"])
else
AC_MSG_WARN([*** JACK metadata support will be disabled.])
fi
# Some recent distros (eg. fedora, debian) require this.
ac_libs="$ac_libs -lX11"
AC_SUBST(ac_libs)
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/stat.h unistd.h signal.h)
# Check for JACK headers.
AC_CHECK_HEADER(jack/jack.h, [ac_jack_h="yes"], [ac_jack_h="no"])
if test "x$ac_jack_h" = "xno"; then
AC_MSG_ERROR([JACK headers not found.])
fi
# Check for ALSA headers.
AC_CHECK_HEADER(alsa/asoundlib.h, [ac_alsa_h="yes"], [ac_alsa_h="no"])
if test "x$ac_alsa_h" = "xno"; then
AC_MSG_ERROR([ALSA headers not found.])
fi
# Check for sndfile headers.
AC_CHECK_HEADER(sndfile.h, [ac_sndfile_h="yes"], [ac_sndfile_h="no"])
if test "x$ac_sndfile_h" = "xno"; then
AC_MSG_ERROR([sndfile.h header file not found.])
fi
# Check for vorbisfile headers.
if test "x$ac_libvorbis" = "xyes"; then
AC_CHECK_HEADER(vorbis/vorbisenc.h, [ac_vorbisenc_h="yes"], [ac_vorbisenc_h="no"])
if test "x$ac_vorbisenc_h" = "xno"; then
AC_MSG_ERROR([vorbisenc.h header file not found.])
fi
AC_CHECK_HEADER(vorbis/vorbisfile.h, [ac_vorbisfile_h="yes"], [ac_vorbisfile_h="no"])
if test "x$ac_vorbisfile_h" = "xno"; then
AC_MSG_ERROR([vorbisfile.h header file not found.])
fi
fi
# Check for mad headers.
if test "x$ac_libmad" = "xyes"; then
AC_CHECK_HEADER(mad.h, [ac_mad_h="yes"], [ac_mad_h="no"])
if test "x$ac_mad_h" = "xno"; then
AC_MSG_ERROR([mad.h header file not found.])
fi
fi
# Check for samplerate headers.
if test "x$ac_libsamplerate" = "xyes"; then
AC_CHECK_HEADER(samplerate.h, [ac_samplerate_h="yes"], [ac_samplerate_h="no"])
if test "x$ac_samplerate_h" = "xno"; then
AC_MSG_ERROR([samplerate.h header file not found.])
fi
fi
# Check for rubberband headers.
if test "x$ac_librubberband" = "xyes"; then
AC_CHECK_HEADER(rubberband/RubberBandStretcher.h, [ac_rubberband_h="yes"], [ac_rubberband_h="no"])
if test "x$ac_rubberband_h" = "xno"; then
AC_MSG_ERROR([RubberBandStretcher.h header file not found.])
fi
fi
# Check for lo headers.
if test "x$ac_liblo" = "xyes"; then
AC_CHECK_HEADER(lo/lo.h, [ac_lo_h="yes"], [ac_lo_h="no"])
if test "x$ac_lo_h" = "xno"; then
AC_MSG_ERROR([lo.h header file not found.])
ac_nsm="no"
fi
fi
# Check for zlib headers.
if test "x$ac_libz" = "xyes"; then
AC_CHECK_HEADER(zlib.h, [ac_zlib_h="yes"], [ac_zlib_h="no"])
if test "x$ac_zlib_h" = "xno"; then
AC_MSG_ERROR([zlib.h header file not found.])
fi
fi
# Check for lilv headers.
if test "x$ac_lilv" = "xyes"; then
ac_lilv_cflags=`$ac_pkg_config --cflags lilv-0 2>/dev/null`
if test -n "$ac_lilv_cflags"; then
CFLAGS="$ac_lilv_cflags $CFLAGS"
CPPFLAGS="$ac_lilv_cflags $CPPFLAGS"
fi
AC_CHECK_HEADER(lilv/lilv.h, [ac_lilv_h="yes"], [ac_lilv_h="no"])
if test "x$ac_lilv_h" = "xno"; then
AC_MSG_ERROR([lilv.h header file not found.])
else
ac_cflags="$ac_lilv_cflags $ac_cflags"
fi
fi
# Check for suil headers.
if test "x$ac_suil" = "xyes"; then
ac_suil_cflags=`$ac_pkg_config --cflags suil-0 2>/dev/null`
if test -n "$ac_suil_cflags"; then
CFLAGS="$ac_suil_cflags $CFLAGS"
CPPFLAGS="$ac_suil_cflags $CPPFLAGS"
fi
AC_CHECK_HEADER(suil/suil.h, [ac_suil_h="yes"], [ac_suil_h="no"])
if test "x$ac_suil_h" = "xno"; then
AC_MSG_ERROR([suil.h header file not found.])
else
ac_cflags="$ac_suil_cflags $ac_cflags"
fi
fi
# Check for LADSPA headers.
if test -n "$ac_with_ladspa"; then
CFLAGS="-I$ac_with_ladspa $CFLAGS"
CPPFLAGS="-I$ac_with_ladspa $CPPFLAGS"
ac_ladspa="yes"
fi
if test "x$ac_ladspa" = "xyes"; then
AC_CHECK_HEADER(ladspa.h, [ac_ladspa="yes"], [ac_ladspa="no"])
if test "x$ac_ladspa" = "xyes"; then
AC_DEFINE(CONFIG_LADSPA, 1, [Define if LADSPA header is available.])
ac_incpath="$ac_with_ladspa $ac_incpath"
else
AC_MSG_WARN([*** ladspa.h header file not found.])
AC_MSG_WARN([*** LADSPA plug-in support will be disabled.])
fi
fi
# Check for DSSI headers.
if test -n "$ac_with_dssi"; then
CFLAGS="-I$ac_with_dssi $CFLAGS"
CPPFLAGS="-I$ac_with_dssi $CPPFLAGS"
ac_dssi="yes"
fi
if test "x$ac_dssi" = "xyes"; then
AC_CHECK_HEADER(dssi.h, [ac_dssi="yes"], [ac_dssi="no"])
if test "x$ac_dssi" = "xyes"; then
AC_DEFINE(CONFIG_DSSI, 1, [Define if DSSI header is available.])
ac_incpath="$ac_with_dssi $ac_incpath"
else
AC_MSG_WARN([*** dssi.h header file not found.])
AC_MSG_WARN([*** DSSI plug-in support will be disabled.])
fi
fi
# Pre-check for VeSTige header.
if test "$ac_vestige" = "xyes"; then
ac_vst="yes"
fi