File: configure.ac

package info (click to toggle)
audacious-plugins 2.3+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 16,416 kB
  • ctags: 21,904
  • sloc: ansic: 109,325; cpp: 60,916; sh: 3,476; makefile: 1,315
file content (1700 lines) | stat: -rwxr-xr-x 50,484 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
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
dnl Process this file with autoconf to produce a configure script.

AC_INIT([audacious-plugins], [2.3], [bugs+audacious-plugins@atheme.org])
AC_PREREQ([2.59])

AC_CANONICAL_HOST
AC_CANONICAL_TARGET

AC_CONFIG_HEADERS([config.h])

dnl libbeep
LIBBEEP_MAJOR_VERSION=2
LIBBEEP_MINOR_VERSION=0
LIBBEEP_MICRO_VERSION=0
LIBBEEP_VERSION=$LIBBEEP_MAJOR_VERSION.$LIBBEEP_MINOR_VERSION.$LIBBEEP_MICRO_VERSION
AC_SUBST(LIBBEEP_MAJOR_VERSION)
AC_SUBST(LIBBEEP_MINOR_VERSION)
AC_SUBST(LIBBEEP_MICRO_VERSION)

dnl XXX kludge for FreeBSD
if test -d "/usr/X11R6/include"; then
	CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
fi

dnl append audacious header path to CPPFLAGS when --prefix is specified.
if test "x$prefix" != "xNONE" ; then
   CPPFLAGS="$CPPFLAGS -I${includedir}"
fi

dnl OMK bootstrap
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])
AC_SUBST([VERSION], [AC_PACKAGE_VERSION])

AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])

dnl Check for C compiler

AC_PROG_CC
AC_PROG_CXX
AC_ISC_POSIX
AC_C_BIGENDIAN

if test "x$GCC" = "xyes"; then
	CFLAGS="$CFLAGS -pipe -Wall"
	CXXFLAGS="$CXXFLAGS -pipe -Wall"
fi

dnl Debug support

AC_SUBST(DEBUG)
AUD_ARG_ENABLE([debug], [no],
[additional debugging output],
[
    AC_DEFINE([DEBUG], 1, [Define if debugging output is required])
])
AUD_CONDITIONAL([DEBUG], [enable_debug])

dnl Locate a program and check that its version is acceptable.
dnl AC_PROG_CHECK_VER(var, namelist, version-switch,
dnl 		      [version-extract-regexp], version-glob [, do-if-fail])
AC_DEFUN([AC_CHECK_PROG_VER],
[AC_CHECK_PROGS([$1], [$2])
if test -z "[$]$1"; then
  ac_verc_fail=yes
else
  # Found it, now check the version.
  AC_MSG_CHECKING([version of [$]$1])
changequote(<<,>>)dnl
  ac_prog_version=`<<$>>$1 $3 2>&1 ifelse(<<$4>>,,,
                   <<| sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'>>)`
  case $ac_prog_version in
    '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
    <<$5>>)
changequote([,])dnl
       ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
    *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;

  esac
  AC_MSG_RESULT([$ac_prog_version])
fi
ifelse([$6],,,
[if test $ac_verc_fail = yes; then
  $6
fi])
])

GCC42_CFLAGS="-fgnu89-inline"
AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
  [version \([egcygnustpi-]*[0-9.]*\)], [4.[2-9]* ],
  GCC42_CFLAGS="")

dnl Check for assembler

AM_PROG_AS

dnl Checks for various programs

AC_PROG_LN_S
AC_PROG_MAKE_SET

AC_PATH_PROG(RM, rm)
AC_PATH_PROG(MV, mv)
AC_PATH_PROG(CP, cp)
AC_PATH_PROG(AR, ar)
AC_PATH_PROG(TR, tr)
AC_PATH_PROG(RANLIB, ranlib)

dnl Gettext -nenolod
AM_GNU_GETTEXT([external])

AC_CHECK_FUNC(strnlen, [AC_DEFINE(HAVE_STRNLEN, 1, [Whether we have strnlen])],)

dnl Path settings

AC_ARG_WITH(dev-dsp,
    [  --with-dev-dsp=path            Path to OSS DSP data pipe, default is /dev/dsp.],
    [dev_dsp=$withval],
    [dev_dsp=/dev/dsp]
)
AC_DEFINE_UNQUOTED(DEV_DSP, "$dev_dsp",
    [Path to OSS DSP, really just a data pipe, default is /dev/dsp.]
)

AC_ARG_WITH(dev-mixer,
    [  --with-dev-mixer=path          Path to OSS sound mixer, default is /dev/mixer.],
    [dev_mixer=$withval],
    [dev_mixer=/dev/mixer]
)
AC_DEFINE_UNQUOTED(DEV_MIXER, "$dev_mixer",
    [Path to OSS mixer, default is /dev/mixer.]
)

dnl These plugins are always built.

INPUT_PLUGINS="tonegen console xsf metronom vtx"
OUTPUT_PLUGINS="crossfade null"
EFFECT_PLUGINS="compressor crystalizer ladspa voice_removal sndstretch stereo_plugin echo_plugin"
GENERAL_PLUGINS="song_change alarm skins vfstrace gtkui"
VISUALIZATION_PLUGINS="blur_scope spectrum"
CONTAINER_PLUGINS="m3u pls"
TRANSPORT_PLUGINS="unix-io"

dnl Check for Audacious

PKG_CHECK_MODULES(AUDACIOUS, [audacious >= 2.3],
    [ADD_PC_REQUIRES([audacious >= 2.3])],
    [AC_MSG_ERROR([Cannot find Audacious 2.3 or later, have you installed audacious yet?])]
)

CFLAGS="$CFLAGS $AUDACIOUS_CFLAGS"
CPPFLAGS="$CPPFLAGS $AUDACIOUS_CPPFLAGS"
LDFLAGS="$LDFLAGS $AUDACIOUS_LIBS"

dnl Check for GTK/GLib/GThread/Pango/DBus

PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.12.0 gthread-2.0],
    [ADD_PC_REQUIRES([glib-2.0 >= 2.12.0])],
    [AC_MSG_ERROR([Cannot find Glib2 >= 2.12.0])]
)

PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.8.0],
    [ADD_PC_REQUIRES([gtk+-2.0 >= 2.8.0])],
    [AC_MSG_ERROR([Cannot find Gtk+2 >= 2.8.0])]
)

AC_ARG_ENABLE(gio, [  --disable-gio           disable GIO support (default=enabled if GIO present)],
 enable_gio=$enableval, enable_gio=yes)

if test "x$enable_gio" = "xyes"; then
    PKG_CHECK_MODULES(GIO, [gio-2.0 >= 2.0], [ADD_PC_REQUIRES([gio-2.0 >=
     2.0])], [enable_gio=no])
fi

if test "x$enable_gio" = "xyes"; then
    TRANSPORT_PLUGINS="$TRANSPORT_PLUGINS gio"
fi

PKG_CHECK_MODULES(PANGO, [pango >= 1.8.0],
    [ADD_PC_REQUIRES([pango >= 1.8.0])],
    [AC_MSG_ERROR([Cannot find Pango >= 1.8.0])]
)

AC_ARG_ENABLE(dbus,
	[  --disable-dbus          disable DBus support (default=enabled)],
			enable_dbus=$enableval, enable_dbus=yes)
if test "x$enable_dbus" = "xyes"; then
	PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60 dbus-glib-1 >= 0.60],
	    [ADD_PC_REQUIRES([dbus-1 >= 0.60 dbus-glib-1 >= 0.60])
	     AC_DEFINE(USE_DBUS, 1, [Define if D-Bus support enabled])],
	    [AC_MSG_ERROR([Cannot find dbus-glib >= 0.60])]
	])
fi


dnl Check for libmowgli.

PKG_CHECK_MODULES(MOWGLI, [libmowgli >= 0.4.0],
    [ADD_PC_REQUIRES([libmowgli >= 0.4.0])],
    [AC_MSG_ERROR([Cannot find libmowgli >= 0.4.0, try http://www.atheme.org/projects/mowgli.shtml])]
)

dnl IPv6 support
dnl ========================
AC_ARG_ENABLE(ipv6,
	[  --enable-ipv6		  enable IPv6 support (default=no)],
			enable_ipv6=$enableval, enable_ipv6=no)
if test "x$enable_ipv6" = "xyes"; then
    AC_DEFINE(USE_IPV6,, [Define if building with IPv6 support] )
fi
AM_CONDITIONAL(USE_IPV6,test "x$enable_ipv6" = "xyes")
AC_SUBST(USE_IPV6)

dnl chardet support
dnl ========================
AC_ARG_ENABLE(chardet,
	[  --enable-chardet	  enable character set detection support (default=no)],
			enable_chardet=$enableval, enable_chardet=no)
if test "x$enable_chardet" = "xyes"; then
    AC_DEFINE(USE_CHARDET, 1, [Define if character set detection enabled] )
fi
AM_CONDITIONAL(USE_CHARDET,test "x$enable_chardet" = "xyes")
AC_SUBST(USE_CHARDET)

dnl plugin stuff
dnl ========================

BUILDSYS_SHARED_LIB
BUILDSYS_PROG_IMPLIB
test "x$PROG_IMPLIB_NEEDED" = "xyes" && LIBS="$LIBS -L\${libdir} -laudacious.exe"

AC_MSG_CHECKING([if you are running Apple-GCC])
case "$target" in
	*-apple-*)
		AC_MSG_RESULT([yes, sorry you poor bastard])
		LDFLAGS="$LDFLAGS -Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices"
		;;
	*)
		AC_MSG_RESULT([no])
		;;
esac

dnl Check for esound

AC_ARG_ENABLE( esd,
    [  --disable-esd           disable esound output plugin (default=enabled)],
    [enable_esd=$enableval],
    [enable_esd="yes"]
)

if test "x$enable_esd" = "xyes"; then
    PKG_CHECK_MODULES(ESD, [esound >= 0.2],
        [have_esd=yes
         OUTPUT_PLUGINS="$OUTPUT_PLUGINS esd"],
        [have_esd=no]
    )
else
    AC_MSG_RESULT([*** esound plugin disabled per user request ***])
    have_esd=no
fi

dnl *** PulseAudio

AC_ARG_ENABLE( pulse,
    [  --disable-pulse         disable PulseAudio output plugin (default=enabled)],
    [enable_pulse=$enableval],
    [enable_pulse="yes"]
)

if test "x$enable_pulse" = "xyes"; then
    PKG_CHECK_MODULES(PULSE, [libpulse >= 0.9.9],
         [have_pulse=yes
          OUTPUT_PLUGINS="$OUTPUT_PLUGINS pulse_audio"],
         [have_pulse=no]
    )
else
    AC_MSG_RESULT([*** pulseaudio output plugin disabled per user request ***])
    have_pulse=no
fi

dnl *** CoreAudio

AC_ARG_ENABLE(coreaudio,
    [  --disable-coreaudio     disable CoreAudio output plugin (default=enabled)],
    [enable_coreaudio=$enableval],
    [enable_coreaudio="yes"]
)

if test "x$enable_coreaudio" = "xyes"; then
	AC_CHECK_HEADERS([CoreServices/CoreServices.h],
		[have_coreaudio=yes
		 OUTPUT_PLUGINS="$OUTPUT_PLUGINS CoreAudio"],
		[have_coreaudio=no])
else
	AC_MSG_RESULT([*** CoreAudio output plugin disabled per user request ***])
	have_coreaudio=no
fi

dnl *** Icecast

AC_ARG_ENABLE( icecast,
    [  --disable-icecast       disable Icecast output plugin (default=enabled)],
    [enable_icecast=$enableval],
    [enable_icecast="yes"]
)

if test "x$enable_icecast" = "xyes"; then
    PKG_CHECK_MODULES(SHOUT, [shout >= 2.0],
         [have_shout=yes
	  enable_filewriter=yes],
         [have_shout=no]
    )
else
    AC_MSG_RESULT([*** icecast output plugin disabled per user request ***])
    have_shout=no
fi

AC_SUBST(SHOUT_CFLAGS)
AC_SUBST(SHOUT_LIBS)

dnl *** Dock Album Art (MacOS)

AC_ARG_ENABLE(dockalbumart,
    [  --disable-dockalbumart  disable MacOS dock albumart plugin (default=guess)],
    [enable_dockalbumart=$enableval],
    [enable_dockalbumart="yes"]
)

if test "x$enable_dockalbumart" = "xyes"; then
	AC_CHECK_HEADERS([Carbon/Carbon.h],
		[have_dockalbumart=yes
		 GENERAL_PLUGINS="$GENERAL_PLUGINS dockalbumart"],
		[have_dockalbumart=no])
else
	AC_MSG_RESULT([*** DockAlbumArt plugin disabled per user request ***])
	have_dockalbumart=no
fi

dnl *** AltiVec

AC_ARG_ENABLE(altivec,
    [  --disable-altivec       disable AltiVec support. (default=enabled) ],
    [enable_altivec=$enableval],
    [enable_altivec=yes]
)
if test "x$enable_altivec" = "xyes"; then
  AC_CHECK_HEADERS(altivec.h,
      [AC_DEFINE(HAVE_ALTIVEC, 1, [Define to 1 if your system has AltiVec.])
       AC_DEFINE(HAVE_ALTIVEC_H, 1, [Define to 1 if your system has an altivec.h file.])
       AC_DEFINE(ARCH_POWERPC, 1, [Define to 1 if your system is a PowerPC.])
       DCT64=dct64_altivec.c
       SIMD_CFLAGS=-maltivec
       AC_SUBST(SIMD_CFLAGS)],
      [DCT64=dct64.c]
  )
fi
AC_SUBST(DCT64)

dnl *** SSE2

AC_ARG_ENABLE(sse2,
    [  --disable-sse2          disable SSE2 support. (default=enabled) ],
    [enable_sse2=$enableval],
    [enable_sse2=yes]
)
if test "x$enable_sse2" = "xyes"; then
  AC_MSG_CHECKING(SSE2)
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS="-msse2"
  AC_TRY_RUN([
  #include <emmintrin.h>
  int main()
  {
    _mm_setzero_pd();
    asm volatile("xorpd %xmm0,%xmm0\n\t");
    return 0;
  }
  ],
  [AC_MSG_RESULT(SSE2 yes)
  AC_DEFINE(HAVE_SSE2, 1, [Define to 1 if your system has SSE2])
  SIMD_CFLAGS=-msse2],
  [AC_MSG_RESULT(SSE2 no)],
  )
fi
AC_SUBST(SIMD_CFLAGS)
CFLAGS="$ac_save_CFLAGS"

dnl *** USF

AC_ARG_ENABLE(usf,
    [  --enable-usf            enable the USF input plugin (default=disabled)],
    [enable_usf=$enableval],
    [enable_usf=no]
)

if test "x$enable_usf" = "xyes"; then
    AC_MSG_CHECKING([if your platform is supported for the USF plugin])
    case "$target" in
	x86_64-*-linux-gnu)
		AC_MSG_RESULT([yes, AMD64 Linux])
		enable_usf=yes
		;;
	i*86-*-linux-gnu)
		AC_MSG_RESULT([yes, X86 Linux])
		enable_usf=yes
		;;
	*)
		AC_MSG_RESULT([no])
		enable_usf=no
		;;
    esac

    if test "x$enable_usf" = "xyes"; then
        INPUT_PLUGINS="$INPUT_PLUGINS usf"
    fi
fi

dnl *** MP3

AC_ARG_ENABLE(mp3,
    [  --disable-mp3           disable mp3 plugin. (default=enabled) ],
    [enable_mp3=$enableval],
    [enable_mp3=yes]
)

if test "x$enable_mp3" = "xyes"; then
    AM_PATH_LIBMAD([enable_mp3=yes],
        [AC_MSG_WARN([*** Cannot find libmad, mp3 plugin will not be built ***])
         enable_mp3=no]
    )
else
    AC_MSG_RESULT([*** mp3 plugin disabled per user request ***])
    enable_mp3=no
fi

if test "x$enable_mp3" = "xyes"; then
	INPUT_PLUGINS="$INPUT_PLUGINS madplug"
fi

AC_SUBST(MAD_CFLAGS)
AC_SUBST(MAD_LIBS)

dnl *** Rocklight

AC_ARG_ENABLE(rocklight,
    AS_HELP_STRING([--disable-rocklight], [disable Rocklight vis plugin (default=enabled)]),
    [enable_rocklight="$enableval"],
    [enable_rocklight="yes"]
)

if test "x$enable_rocklight" = "xyes"; then
    VISUALIZATION_PLUGINS="$VISUALIZATION_PLUGINS rocklight"
fi

dnl *** LIRC client libraries

AC_ARG_ENABLE(lirc,
    [  --disable-lirc          disable LIRC plugin (default=enabled)],
    [enable_lirc=$enableval],
    [enable_lirc="yes"]
)

if test "x$enable_lirc" = "xyes"; then
    AC_CHECK_LIB([lirc_client],[lirc_init],[have_lirc=yes],[have_lirc=no])
else
    AC_MSG_RESULT([*** LIRC plugin disabled per user request ***])
    have_lirc="no"
fi

if test "x$have_lirc" = "xyes"; then
	AC_CHECK_HEADER(lirc/lirc_client.h,[],[have_lirc=no])
fi

if test "x$have_lirc" = "xyes"; then
	GENERAL_PLUGINS="$GENERAL_PLUGINS lirc"
fi

dnl *** EvDev-Plug general plugin (only built on Linux)

AC_ARG_ENABLE(evdevplug,
    [  --disable-evdevplug     disable Linux evdev plugin (default=enabled)],
    [enable_evdevplug=$enableval],
    [enable_evdevplug="yes"]
)

if test "x$enable_evdevplug" = "xyes"; then
    case "$target" in
        *-*-linux*)
            have_evdevplug="yes"
        ;;
        *)
            AC_MSG_RESULT([*** Linux evdev plugin disabled (host does not run linux) ***])
            have_evdevplug="no"
        ;;
    esac
else
    AC_MSG_RESULT([*** Linux evdev plugin disabled per user request ***])
    have_evdevplug="no"
fi

if test "x$have_evdevplug" = "xyes"; then
    GENERAL_PLUGINS="$GENERAL_PLUGINS evdev-plug"
fi

dnl *** Global Hotkey general plugin (only built on X11)

AC_ARG_ENABLE(hotkey,
    [  --disable-hotkey        disable global hotkey plugin (default=enabled)],
    [enable_hotkey=$enableval],
    [enable_hotkey="yes"]
)

if test "x$enable_hotkey" = "xyes"; then
    have_hotkey="yes"
    PKG_CHECK_MODULES(GDKX11,[gdk-x11-2.0 >= 2.6.0],,[have_hotkey="no"])
else
    AC_MSG_RESULT([*** X11 Global Hotkey plugin disabled per user request ***])
    have_hotkey="no"
fi

if test "x$have_hotkey" = "xyes"; then
    GENERAL_PLUGINS="$GENERAL_PLUGINS hotkey"
fi

dnl *** Gnome Shortcuts Plugin

AC_ARG_ENABLE(gnomeshortcuts,
    [  --disable-gnomeshortcuts        disable gnome shortcuts (default=enabled)],
    [enable_gnomeshortcuts=$enableval],
    [enable_gnomeshortcuts="yes"]
)

if test "x$enable_gnomeshortcuts" = "xyes"; then
    have_gnomeshortcuts="yes"
    PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60 dbus-glib-1 >= 0.60],,
         [AC_MSG_ERROR([Cannot find dbus-glib >= 0.60 for gnomeshortcuts plugin])])
else
    AC_MSG_RESULT([*** Gnome Shortcuts Plugin disabled per user request ***])
    have_gnomeshortcuts="no"
fi

if test "x$have_gnomeshortcuts" = "xyes"; then
    GENERAL_PLUGINS="$GENERAL_PLUGINS gnomeshortcuts"
fi

dnl *** Status Icon plugin (for X11 only)

AC_ARG_ENABLE(statusicon,
    [  --disable-statusicon    disable X11 Status Icon plugin (default=enabled)],
    [enable_statusicon=$enableval],
    [enable_statusicon="yes"]
)

if test "x$enable_statusicon" = "xyes"; then
    have_statusicon="yes"
    PKG_CHECK_MODULES(GDKX11,[gdk-x11-2.0 >= 2.6.0],,[have_statusicon="no"])
else
    AC_MSG_RESULT([*** X11 Status Icon plugin disabled per user request ***])
    have_statusicon="no"
fi

if test "x$have_statusicon" = "xyes"; then
    GENERAL_PLUGINS="$GENERAL_PLUGINS statusicon"
fi

dnl *** Audacious OSD plugin (pangocairo-based)

AC_ARG_ENABLE(aosd,
    [  --disable-aosd          disable Audacious OSD plugin (default=enabled)],
    [enable_aosd=$enableval],
    [enable_aosd="guess"]
)

AC_ARG_ENABLE(aosd_xcomp,
    [  --disable-aosd-xcomp    disable Audacious OSD X Composite Support (default=enabled)],
    [enable_aosd_xcomp=$enableval],
    [enable_aosd_xcomp="yes"]
)

if test "x$enable_aosd" = "xguess"; then
    have_aosd="yes"
    PKG_CHECK_MODULES(PANGO,[pango >= 1.14.7],,
        [have_aosd="no"
        AC_MSG_RESULT([*** pango >= 1.14.7 is required for Audacious OSD plugin ***])]
    )
    PKG_CHECK_MODULES(CAIRO,[cairo >= 1.2.6],,
        [have_aosd="no"
        AC_MSG_RESULT([*** cairo >= 1.2.6 is required for Audacious OSD plugin ***])]
    )
    PKG_CHECK_MODULES(PANGOCAIRO,[pangocairo >= 1.14.7],,
        [have_aosd="no"
        AC_MSG_RESULT([*** pangocairo >= 1.14.7 is required for Audacious OSD plugin ***])]
    )
    PKG_CHECK_MODULES(XRENDER, xrender,,
        [have_aosd="no"
        AC_MSG_RESULT([*** X Render extension is required for Audacious OSD plugin ***])]
    )
    if test "x$enable_aosd_xcomp" = "xyes"; then
        have_aosd_xcomp="yes"
        PKG_CHECK_MODULES(XCOMPOSITE, xcomposite,
            [AC_DEFINE([HAVE_XCOMPOSITE],[],[X Composite extension available])],
            [have_aosd_xcomp="no"
            AC_MSG_RESULT([*** X Composite extension not found, composite support for Audacious OSD will not be compiled ***])]
        )
    else
        AC_MSG_RESULT([*** X Composite support for Audacious OSD plugin disabled per user request ***])
        have_aosd_xcomp="no"
    fi
else
    if test "x$enable_aosd" = "xyes"; then
        AC_MSG_RESULT([*** Audacious OSD plugin has been forcefully enabled ***])
        have_aosd="yes"
        if test "x$enable_aosd_xcomp" = "xyes"; then
            have_aosd_xcomp="yes"
            PKG_CHECK_MODULES(XCOMPOSITE, xcomposite,
                [AC_DEFINE([HAVE_XCOMPOSITE],[],[X Composite extension available])],
                [have_aosd_xcomp="no"
                AC_MSG_RESULT([*** X Composite extension not found, composite support for Audacious OSD will not be compiled ***])]
            )
        else
            AC_MSG_RESULT([*** X Composite support for Audacious OSD plugin disabled per user request ***])
            have_aosd_xcomp="no"
        fi
    else
        AC_MSG_RESULT([*** Audacious OSD plugin disabled per user request ***])
        have_aosd="no"
    fi
fi

if test "x$have_aosd" = "xyes"; then
    GENERAL_PLUGINS="$GENERAL_PLUGINS aosd"
fi

dnl *** AdPlug requirement (libbinio)

AC_ARG_ENABLE(adplug,
    [  --disable-adplug        disable AdPlug plugin (default=enabled)],
    [enable_adplug=$enableval],
    [enable_adplug="yes"]
)

if test "x$enable_adplug" = "xyes"; then
    have_adplug="yes"
    PKG_CHECK_MODULES(BINIO,[libbinio >= 1.4],,[have_adplug=no])
else
    AC_MSG_RESULT([*** AdPlug plugin disabled per user request ***])
    have_adplug="no"
fi

if test "x$have_adplug" = "xyes"; then
	INPUT_PLUGINS="$INPUT_PLUGINS adplug"
	AC_SUBST(BINIO_CFLAGS)
fi

dnl *** Ogg Vorbis

AC_ARG_ENABLE(vorbis,
    [  --disable-vorbis        disable Ogg Vorbis input plugin (default=enabled)],
    [enable_vorbis=$enableval],
    [enable_vorbis="yes"]
)

if test "x$enable_vorbis" = "xyes"; then
    PKG_CHECK_MODULES(OGG_VORBIS, [ogg >= 1.0 vorbis >= 1.1 vorbisfile >= 1.1],
        [have_oggvorbis=yes],
        [AC_MSG_WARN([*** Cannot find libogg/libvorbis, Ogg Vorbis support will not be built ***])
         have_oggvorbis=no]
    )
else
    AC_MSG_RESULT([*** Ogg Vorbis plugin disabled per user request ***])
    have_oggvorbis=no
fi

if test "x$have_oggvorbis" = "xyes"; then
	INPUT_PLUGINS="$INPUT_PLUGINS vorbis"
fi

dnl *** FLACng (in progress replacement to XMMS-flac port)

AC_ARG_ENABLE(flacng,
    [  --disable-flacng        disable flac input plugin (default=enabled)],
    [enable_flacng=$enableval],
    [enable_flacng="yes"]
)

if test "x$enable_flacng" = "xyes"; then
    AM_PATH_LIBFLAC([have_flacng=yes],
        [AC_MSG_WARN([*** Cannot find libFLAC, FLACng will not be built ***])
         have_flacng=no]
    )
else
    AC_MSG_RESULT([*** FLACng plugin disabled per user request ***])
    have_flacng=no
fi

if test "x$have_flacng" = "xyes"; then
	INPUT_PLUGINS="$INPUT_PLUGINS flacng"
fi

dnl *** WavPack 4.31 support

AC_ARG_ENABLE(wavpack,
    [  --disable-wavpack       disable WavPack input plugin (default=enabled)],
    [enable_wavpack=$enableval],
    [enable_wavpack="yes"]
)

if test "x$enable_wavpack" = "xyes"; then
    PKG_CHECK_MODULES(WAVPACK, [wavpack >= 4.31],
        [have_wavpack=yes],
        [AC_MSG_WARN([*** Cannot find WavPack 4.31+, WavPack support will not be built ***])
         have_wavpack=no]
    )
else
    AC_MSG_RESULT([*** WavPack plugin disabled per user request ***])
    have_wavpack=no
fi

if test "x$have_wavpack" = "xyes"; then
	INPUT_PLUGINS="$INPUT_PLUGINS wavpack"
fi

dnl *** AAC

AC_ARG_ENABLE(aac,
    [  --disable-aac           disable aac plugin (default=enabled) ],
    [enable_aac=$enableval],
    [enable_aac=yes]
)

if test x$enable_aac = xyes; then
	FAAD_LIBS="-lfaad"
	FAAD_CFLAGS=

	AC_CHECK_HEADER(faad.h,,enable_aac=no)
	if test x$enable_aac = xyes; then
		AC_CHECK_DECL(FAAD2_VERSION,,enable_aac=no,[#include <neaacdec.h>])
	fi
	if test x$enable_aac = xyes; then
		AC_CHECK_DECL(NeAACDecInit2,,enable_aac=no,[#include <neaacdec.h>])
	fi
	if test x$enable_aac = xyes; then
		AC_CHECK_LIB(faad,NeAACDecInit2,enable_aac=yes,enable_aac=no)
	fi
fi

if test x$enable_aac = xyes; then
    AC_SUBST(FAAD_CFLAGS)
    AC_SUBST(FAAD_LIBS)
    INPUT_PLUGINS="$INPUT_PLUGINS aac"
fi

dnl *** sndfile

AC_ARG_ENABLE(sndfile,
    [  --disable-sndfile       disable sndfile extensions. [default=enabled] ],
    [enable_sndfile=$enableval],
    [enable_sndfile=yes]
)

if test "x$enable_sndfile" = "xyes"; then
    PKG_CHECK_MODULES(SNDFILE, [sndfile >= 0.19],
        [enable_sndfile=yes],
        [enable_sndfile=no]
    )
else
    AC_MSG_RESULT([*** libsndfile extensions disabled per user request ***])
    enable_sndfile=no
fi

if test "x$enable_sndfile" = "xyes"; then
	INPUT_PLUGINS="$INPUT_PLUGINS sndfile"
fi

dnl *** modplug

AC_ARG_ENABLE(modplug,
    [  --disable-modplug       disable ModPlug plugin (default=enabled)],
    [enable_modplug=$enableval],
    [enable_modplug="yes"]
)

if test "x$enable_modplug" = "xyes"; then
    INPUT_PLUGINS="$INPUT_PLUGINS modplug"
    have_modplug="yes"
else
    AC_MSG_RESULT([*** ModPlug plugin disabled per user request ***])
    have_modplug="no"
fi

dnl *** FFaudio

have_ffaudio="no"
AC_ARG_ENABLE(ffaudio,
    [  --disable-ffaudio       disable ffaudio plugin (default=enabled)],
    [enable_ffaudio=$enableval],
    [enable_ffaudio="yes"]
)

if test "x$enable_ffaudio" = "xyes"; then
    PKG_CHECK_MODULES(FFMPEG, [libavformat >= 52.31.0  libavcodec >= 52.20.0  libavutil >= 49.15.0],
                      [have_ffaudio="yes"], [have_ffaudio="no"])
fi

if test "x$have_ffaudio" = "xyes"; then
    INPUT_PLUGINS="$INPUT_PLUGINS ffaudio"
fi

dnl *** jack output plugin
AC_ARG_ENABLE( jack,
[  --disable-jack          disable jack output plugin (default=enabled)], [enable_jack=$enableval],
                [enable_jack="yes"])

if test "x$enable_jack" = "xyes"; then
        AM_PATH_JACK(have_jack=yes, have_jack=no)
else
        AC_MSG_RESULT([*** jack plugin disabled per user request ***])
        have_jack=no
fi

if test "x$have_jack" = "xyes"; then
	OUTPUT_PLUGINS="$OUTPUT_PLUGINS jack"
fi

dnl *** sid
AC_ARG_ENABLE( sid,
[  --disable-sid           disable SID input plugin (default=enabled)],,
                enable_sid="yes")

if test "x$enable_sid" = "xyes"; then
        AM_PATH_SIDPLAY(have_sidplay=yes, have_sidplay=no)
else
        AC_MSG_RESULT([*** SID plugin disabled per user request ***])
        have_sidplay=no
fi

if test "x$have_sidplay" = "xyes"; then
	INPUT_PLUGINS="$INPUT_PLUGINS sid"
fi

dnl *** OSS output

AC_ARG_ENABLE(oss,
    [  --disable-oss           disable the OSS output plugin (default=enabled)],
    [enable_oss=$enableval],
    [enable_oss=yes]
)

have_oss=no
if test "x$enable_oss" = "xyes"; then
    AC_MSG_CHECKING(for OSS include dir)
    OSS_CFLAGS=""
    if test -f "/etc/oss.conf" ; then
        for i in `cat /etc/oss.conf`; do
            t=`echo $i | sed -e 's/OSSLIBDIR=//'`
            if test "x$i" != "x$t" ; then
                if test -f "$t/include/sys/soundcard.h" -o -f "$i/include/soundcard.h" ; then
                    OSS_CFLAGS="-I$t/include"
                fi
            fi
        done
    fi
    if test -n "$OSS_CFLAGS" ; then
        AC_MSG_RESULT([$OSS_CFLAGS])
    else
        AC_MSG_RESULT([not found])
    fi
    CFLAGS_save=$CFLAGS
    CFLAGS="$CFLAGS $OSS_CFLAGS"
    AC_CHECK_HEADERS(soundcard.h)
    AC_CHECK_HEADERS(sys/soundcard.h)
    AC_CHECK_HEADERS(machine/soundcard.h)
    CFLAGS=$CFLAGS_save

    if test "x${ac_cv_header_soundcard_h}" = "xyes" || test "x${ac_cv_header_sys_soundcard_h}" = "xyes" || test "x${ac_cv_header_machine_soundcard_h}" = "xyes"; then
        have_oss=yes
    fi

    if test "x${have_oss}" = "xyes"; then
	AC_MSG_CHECKING(whether we need -lossaudio)
        AC_TRY_LINK([
		#include <sys/ioctl.h>
		#ifdef HAVE_SYS_SOUNDCARD_H
		#include <sys/soundcard.h>
		#else
		#include <soundcard.h>
		#endif
        ], [
		int fd, value;
		ioctl(fd, SOUND_MIXER_READ_VOLUME, &value);
	], AC_MSG_RESULT(no), [
		OSS_LIBS="-lossaudio"
		AC_MSG_RESULT(yes)
        ])
   fi
fi

if test "x$have_oss" = "xyes"; then
    AC_DEFINE(HAVE_OSS, 1, [Define if the OSS output plugin should be built])
else
    have_oss=no
fi

if test "x$have_oss" = "xyes"; then
	OUTPUT_PLUGINS="$OUTPUT_PLUGINS OSS"
fi
AC_SUBST(OSS_CFLAGS)
AC_SUBST(OSS_LIBS)


dnl *** OSS4 output

AC_ARG_ENABLE(oss4,
    [  --enable-oss4           enable the OSS4 output plugin (default=disabled)],
    [enable_oss4=$enableval],
    [enable_oss4=no]
)

have_oss4=no
if test "x$enable_oss4" = "xyes"; then
    AC_MSG_CHECKING(for OSS4 include dir)
    OSS4_CFLAGS=""
    if test -f "/etc/oss.conf" ; then
        for i in `cat /etc/oss.conf`; do
            t=`echo $i | sed -e 's/OSSLIBDIR=//'`
            if test "x$i" != "x$t" ; then
                if test -f "$t/include/sys/soundcard.h" -o -f "$i/include/soundcard.h" ; then
                    OSS4_CFLAGS="-I$t/include"
                fi
            fi
        done
    fi
    if test -n "$OSS4_CFLAGS" ; then
        AC_MSG_RESULT([$OSS4_CFLAGS])
    else
        AC_MSG_RESULT([not found])
    fi
    CFLAGS_save=$CFLAGS
    CFLAGS="$CFLAGS $OSS4_CFLAGS"
    AC_CHECK_HEADERS(soundcard.h)
    AC_CHECK_HEADERS(sys/soundcard.h)
    AC_CHECK_HEADERS(machine/soundcard.h)
    CFLAGS=$CFLAGS_save

    if test "x${ac_cv_header_soundcard_h}" = "xyes" || test "x${ac_cv_header_sys_soundcard_h}" = "xyes" || test "x${ac_cv_header_machine_soundcard_h}" = "xyes"; then
        have_oss4=yes
    fi

    if test "x${have_oss4}" = "xyes"; then
	AC_MSG_CHECKING(whether we need -lossaudio)
        AC_TRY_LINK([
		#include <sys/ioctl.h>
		#ifdef HAVE_SYS_SOUNDCARD_H
		#include <sys/soundcard.h>
		#else
		#include <soundcard.h>
		#endif
        ], [
		int fd, value;
		ioctl(fd, SOUND_MIXER_READ_VOLUME, &value);
	], AC_MSG_RESULT(no), [
		OSS_LIBS="-lossaudio"
		AC_MSG_RESULT(yes)
        ])
   fi
fi

if test "x$have_oss4" = "xyes"; then
    AC_DEFINE(HAVE_OSS4, 1, [Define if the OSS4 output plugin should be built])
else
    have_oss4=no
fi

if test "x$have_oss4" = "xyes"; then
	OUTPUT_PLUGINS="$OUTPUT_PLUGINS OSS4"
fi

AC_SUBST(OSS_LIBS)

dnl *** ALSA output plugin

AC_ARG_ENABLE(alsa,
    [  --disable-alsa          disable ALSA input plugin (default=enabled)],
    [enable_alsa=$enableval],
    [enable_alsa=yes]
)

if test "x$enable_alsa" = "xyes"; then
    PKG_CHECK_MODULES([ALSA], [alsa >= 1.0], [have_alsa=yes], [have_alsa=no])
else
    AC_MSG_RESULT([*** ALSA output plugin disabled per user request ***])
    have_alsa=no
fi

if test "x$have_alsa" = "xyes"; then
	OUTPUT_PLUGINS="$OUTPUT_PLUGINS alsa"
fi


dnl *** amidi-plug (note: to avoid checking twice ALSA, this should appear somewhere after the alsa output plugin check)

AC_ARG_ENABLE(amidiplug,
    [  --disable-amidiplug     disable amidi-plug input plugin (default=check) ],
    [enable_amidiplug=$enableval],
    [enable_amidiplug=check]
)

AC_ARG_ENABLE(amidiplug-alsa,
    [  --disable-amidiplug-alsa    disable amidi-plug ALSA backend (default=enabled) ],
    [enable_amidiplug_alsa=$enableval],
    [enable_amidiplug_alsa=auto]
)

AC_ARG_ENABLE(amidiplug-flsyn,
    [  --disable-amidiplug-flsyn   disable amidi-plug FluidSynth backend (default=enabled) ],
    [enable_amidiplug_fluidsynth=$enableval],
    [enable_amidiplug_fluidsynth=auto]
)

if test "x$enable_amidiplug" = "xno"; then
  AC_MSG_RESULT([*** amidi-plug disabled per user request ***])
  enable_amidiplug=no
else
  if test "x$enable_amidiplug_alsa" != "xauto"; then
    enable_amidiplug=yes
  elif test "x$enable_amidiplug_fluidsynth" != "xauto"; then
    enable_amidiplug=yes
  fi
fi

if test "x$have_alsa" = "xyes"; then
  AUD_TRY_COMPILE([ALSA MIDI support], [alsalib_cv_hasmidi],
[#include <alsa/asoundlib.h>],
[snd_seq_t *seq = NULL;],
  [alsalib_midi=yes], [alsalib_midi=no])
fi


if test "x$enable_amidiplug" = "xcheck"; then
  if test "x$alsalib_midi" = "xyes"; then
    enable_amidiplug=yes
  else
    PKG_CHECK_MODULES(FLUIDSYNTH, [fluidsynth >= 1.0.6],
      [fluidsynth_available=yes],[fluidsynth_available=no])
    if test "x$fluidsynth_available" = "xyes"; then
      enable_amidiplug=yes
    else
      enable_amidiplug=no
      AC_MSG_WARN([*** Neither ALSA or FluidSynth software synth (>= 1.0.6) have been found, so amidi-plug won't be compiled unless you explicitly request it with --enable-amidiplug ***])
    fi
  fi
fi

if test "x$enable_amidiplug" = "xyes"; then
  INPUT_PLUGINS="$INPUT_PLUGINS amidi-plug"
  PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.6.0],,)
  PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.6.0],,)
  AMIDIPLUG_BACKEND_DIR=amidi-plug
  AC_SUBST(AMIDIPLUG_BACKEND_DIR)
  if test "x$enable_amidiplug_alsa" = "xauto" -o "x$enable_amidiplug_alsa" = "xyes"; then
    if test "x$alsalib_midi" = "xyes"; then
      AMIDIPLUG_BACKENDS="$AMIDIPLUG_BACKENDS backend-alsa"
      enable_amidiplug_alsa=yes
    else
      if test "x$enable_amidiplug_alsa" = "xyes"; then
        AC_MSG_ERROR([Cannot find ALSA development files (ver >= 1.0), but compilation of AMIDI-Plug ALSA backend has been explicitly requested; please install ALSA dev files and run configure again])
        enable_amidiplug_alsa=no
      else
        enable_amidiplug_alsa=no
      fi
    fi
  fi
  if test "x$enable_amidiplug_fluidsynth" = "xauto" -o "x$enable_amidiplug_fluidsynth" = "xyes"; then
    if test "x$fluidsynth_available" != "xyes" -a "x$fluidsynth_available" != "xno"; then
      PKG_CHECK_MODULES(FLUIDSYNTH, [fluidsynth >= 1.0.6],
        [fluidsynth_available=yes],[fluidsynth_available=no])
    fi
    if test "x$fluidsynth_available" = "xyes"; then
      AMIDIPLUG_BACKENDS="$AMIDIPLUG_BACKENDS backend-fluidsynth"
      enable_amidiplug_fluidsynth=yes
    else
      if test "x$enable_amidiplug_fluidsynth" = "xyes"; then
        AC_MSG_ERROR([Cannot find FluidSynth development files (ver >= 1.0.6), but compilation of AMIDI-Plug FluidSynth backend has been explicitly requested; please install FluidSynth dev files and run configure again])
        enable_amidiplug_fluidsynth=no
      else
        enable_amidiplug_fluidsynth=no
      fi
    fi
  fi
  AC_SUBST(AMIDIPLUG_BACKENDS)
fi

dnl FreeBSD newpcm driver detection

AC_CACHE_CHECK(for FreeBSD newpcm driver, beep_cv_newpcm_driver,
    if test -r "/dev/sndstat"; then
        grep 'newpcm' /dev/sndstat 2>/dev/null 1>/dev/null
        if test "x$?" = "x0"; then
            beep_cv_newpcm_driver="yes"
        else
            beep_cv_newpcm_driver="no"
        fi
    else
        beep_cv_newpcm_driver="no"
    fi
)

if test "x$beep_cv_newpcm_driver" = "xyes"; then
    AC_DEFINE(HAVE_NEWPCM, 1, [Define if you have the FreeBSD newpcm driver])
fi


AC_CHECK_HEADERS(linux/joystick.h)
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(fcntl.h)
AC_CHECK_HEADERS(sys/ioctl.h)
AC_CHECK_HEADERS(fnmatch.h)
AC_CHECK_HEADERS(limits.h)
AC_CHECK_HEADERS(wchar.h)
AC_CHECK_HEADERS(fts.h)

AC_CHECK_DECL([lrintf],[AC_DEFINE(HAVE_LRINTF,1)],[AC_CHECK_FUNCS([lrintf])],[
#define _ISOC9X_SOURCE
#include <math.h>
], [AC_CHECK_FUNCS([lrintf])])
AC_CHECK_FUNCS([mkdtemp getmntinfo statvfs strtoul])


dnl CD-Audio New Generation

AC_ARG_ENABLE(cdaudio,
    [  --disable-cdaudio       disable cdaudio-ng input plugin (default=enabled) ],
    [enable_cdaudio_ng=$enableval],
    [enable_cdaudio_ng=yes]
)

if test "$enable_cdaudio_ng" = "yes"; then
   PKG_CHECK_MODULES(CDIO, [libcdio >= 0.70],
   ,
   [AC_MSG_WARN([*** Cannot find libcdio 0.70 or newer, cdaudio-ng will not be built ***])
   enable_cdaudio_ng=no]
)
fi

if test "$enable_cdaudio_ng" = "yes"; then
   PKG_CHECK_MODULES(CDIO, [libcdio_cdda >= 0.70],
   [CDIO_LIBS=`pkg-config --libs libcdio_cdda`
   CDIO_CFLAGS=`pkg-config --cflags libcdio_cdda`
   AC_SUBST(CDIO_LIBS)
   AC_SUBST(CDIO_CFLAGS)],
   [AC_MSG_WARN([*** Cannot find libcdio_cdda 0.70 or newer, cdaudio-ng will not be built ***])
   enable_cdaudio_ng=no]
)
fi

if test "$enable_cdaudio_ng" = "yes"; then
   PKG_CHECK_MODULES(CDDB, [libcddb >= 1.2.1],
   [INPUT_PLUGINS="$INPUT_PLUGINS cdaudio-ng"
   GENERAL_PLUGINS="$GENERAL_PLUGINS cd-menu-items"
   CDDB_LIBS=`pkg-config --libs libcddb`
   CDDB_CFLAGS=`pkg-config --cflags libcddb`
   AC_SUBST(CDDB_LIBS)
   AC_SUBST(CDDB_CFLAGS)],
   [AC_MSG_WARN([*** Cannot find libcddb 1.2.1 or newer, cdaudio-ng will not be built ***])
   enable_cdaudio_ng=no]
)
fi

AC_ARG_ENABLE(streambrowser,
    [  --disable-streambrowser       disable streambrowser general plugin (default=enabled) ],
    [enable_streambrowser=$enableval],
    [enable_streambrowser=yes]
)

if test "$enable_streambrowser" = "yes"; then
   GENERAL_PLUGINS="$GENERAL_PLUGINS streambrowser"
fi

AM_CONDITIONAL(HAVE_CDROM, test "${ac_cv_header_linux_cdrom_h}" = "yes" || test "${ac_cv_header_sys_cdio_h}" = "yes")
AM_CONDITIONAL(HAVE_LINUX_JOYSTICK,test "${ac_cv_header_linux_joystick_h}" = "yes")

CPPFLAGS="$CPPFLAGS $AUDACIOUS_CFLAGS $DBUS_CFLAGS"

AC_MSG_CHECKING(if __ELF__ is defined)
AC_EGREP_CPP(yes,
    [#ifdef __ELF__
        yes
     #endif
    ],
    [is_elf=yes],
    [is_elf=no]
)
AC_MSG_RESULT([${is_elf}])


have_solaris=no
have_sun=no
ARCH_DEFINES=""
case "$host" in
    *-*-openbsd* | *-*-netbsd* | *-*-mirbsd*)
        have_sun=yes
        if test "${is_elf}" = "no"
        then
            AC_DEFINE(SYMBOL_PREFIX, "_", [Define to symbol prefix, if any])
        fi
        OUTPUT_PLUGINS="$OUTPUT_PLUGINS sun"
    ;;
    *-*-darwin*)
        AC_DEFINE(SYMBOL_PREFIX, "_", [Define to symbol prefix, if any])
    ;;
    *-hpux-*)
        ARCH_DEFINES="-DHPUX"
    ;;
    *-*-solaris* | *-*-sunos*)
        have_solaris=yes
    ;;
esac

arch_type=other
x86_asm=no
case "$host" in
    i386-*-* | i486-*-* | i586-*-* | i686-*-* | i86pc-*-*)
        arch_type=ix86
        case "$host" in
            *-*-netbsd* | *-*openbsd* | *-*-mirbsd*)
            ;;
            *)
                ARCH_DEFINES="-DI386_ASSEM"
                x86_asm=yes
            ;;
        esac
    ;;
esac

dnl *** neon http plugin ***

AC_ARG_ENABLE(neon,
[  --disable-neon          disable neon HTTP support (default=enabled)],
[have_neon=$enableval],
[have_neon=yes])

if test "x$have_neon" = "xyes"; then
    PKG_CHECK_MODULES(NEON, [neon >= 0.26], [TRANSPORT_PLUGINS="$TRANSPORT_PLUGINS neon" ], [have_neon="no"])
    AC_CHECK_LIB([neon], [ne_set_connect_timeout], [AC_DEFINE(HAVE_NE_SET_CONNECT_TIMEOUT, 1, [Whether we have ne_set_connect_timeout])], [], [$NEON_LIBS])
else
    have_neon="no"
fi
AC_SUBST([NEON_LIBS])
AC_SUBST([NEON_CFLAGS])


dnl *** MMS

AC_ARG_ENABLE(mms,
[  --disable-mms           disable mms support. (default=enabled)],
[have_mms=$enableval],
[have_mms=yes])

if test "x$have_mms" = "xyes"; then
    have_mms=yes
    PKG_CHECK_MODULES(MMS, [libmms >= 0.3], [TRANSPORT_PLUGINS="$TRANSPORT_PLUGINS mms" ], [have_mms="no"])
else
    have_mms=no
    AC_MSG_RESULT([*** mms plugin disabled by request ***])
fi


dnl *** MTP Upload

AC_ARG_ENABLE(mtp_up,
[  --disable-mtp_up           disable mtp upload support. (default=enabled)],
[have_mtp_up=$enableval],
[have_mtp_up=yes])

if test "x$have_mtp_up" = "xyes"; then
    have_mtp_up=yes
    PKG_CHECK_MODULES(MTP, [libmtp >= 0.1.3], [GENERAL_PLUGINS="$GENERAL_PLUGINS mtp_up" ], [have_mtp_up="no"])
    MTP_LIBS=`pkg-config --libs libmtp`
    MTP_CFLAGS=`pkg-config --cflags libmtp`
    dnl Check for libmtp 0.3.0+
    PKG_CHECK_EXISTS(libmtp >= 0.3.0, libmtp_030_pkg=yes, libmtp_030_pkg=no)
    if test x"$libmtp_030_pkg" = "xyes" ; then
       AC_DEFINE([HAVE_LIBMTP_030], 1, [indidaces if libmtp 0.3.0 is installed])
    fi
else
    have_mtp_up=no
    AC_MSG_RESULT([*** mtp upload plugin disabled by request ***])
fi
AC_SUBST(MTP_LIBS)
AC_SUBST(MTP_CFLAGS)

dnl *** Bluetooth audio support

AC_ARG_ENABLE(bluetooth,
[  --disable-bluetooth           disable bluetooth audio support. (default=enabled)],
[have_bluetooth=$enableval],
[have_bluetooth=yes])

dnl This has been broken by the output plugin on-demand work
have_bluetooth=no
if test "x$have_bluetooth" = "xyes" -a "x$have_alsa" = "xyes"; then
    have_bluetooth=yes
    PKG_CHECK_MODULES(BLUEZ, [bluez >= 2.22],
    [GENERAL_PLUGINS="$GENERAL_PLUGINS bluetooth" ], [have_bluetooth="no"])
    BLUEZ_LIBS=`pkg-config --libs bluez`
    BLUEZ_CFLAGS=`pkg-config --cflags bluez`
else
    have_bluetooth=no
    AC_MSG_RESULT([*** bluetooth audio support plugin disabled by request ***])
fi
AC_SUBST(BLUEZ_LIBS)
AC_SUBST(BLUEZ_CFLAGS)

dnl *** libparanormal checks

AC_ARG_ENABLE(paranormal,
[  --disable-paranormal    disable paranormal vis plugin. (default=enabled)],
[have_paranormal=$enableval],
[have_paranormal=yes])

if test "x$have_paranormal" = "xyes"; then
    have_paranormal=yes
    AM_PATH_SDL(1.2.5, , [
	AC_MSG_WARN([*** SDL is not installed. Paranormal will not be built. ***])
	have_paranormal="no"
    ])
else
    have_paranormal=no
    AC_MSG_RESULT([*** paranormal plugin disabled by request ***])
fi

if test "x$have_paranormal" = "xyes"; then
	VISUALIZATION_PLUGINS="$VISUALIZATION_PLUGINS paranormal"
fi

AM_PATH_XML2(2.0.0, , [
	AC_MSG_ERROR([*** libxml2 is not found! It is required for certain essential plugins. ***])
])


have_xspf="yes"
CONTAINER_PLUGINS="$CONTAINER_PLUGINS xspf"

dnl *** CUE

AC_ARG_ENABLE(cue,
[  --disable-cue           disable cue support. (default=enabled)],
[have_cue=$enableval],
[have_cue=yes])

if test "x$have_cue" = "xyes"; then
    have_cue=yes
    PKG_CHECK_MODULES(CUE, [libcue], [CONTAINER_PLUGINS="$CONTAINER_PLUGINS cue" ], [have_cue="no"])
else
    have_cue=no
    AC_MSG_RESULT([*** cue plugin disabled by request ***])
fi

dnl *** projectM (GL Milkdrop port)

AC_ARG_ENABLE(projectm,
[  --disable-projectm      disable projectM vis plugin. (default=enabled)],
[have_projectm=$enableval],
[have_projectm=yes])

if test "x$have_projectm" = "xyes"; then
	PKG_CHECK_MODULES(LIBPROJECTM, libprojectM < 1.0, [have_projectm="yes"], [have_projectm="no"])
	AM_PATH_SDL(1.2.5, , [
		AC_MSG_WARN([*** SDL is not installed. projectM will not be built. ***])
		have_projectm="no"
	])
	if test "x$libprjM" = "xno"; then
	        AC_MSG_WARN([*** libprojectM not found.
	                        libprojectM is needed to build this package.
	                        You can download libprojectM at http://projectm.sf.net/])
	fi
	LIBPROJECTM_datadir=`pkg-config --variable=pkgdatadir libprojectM`;
	LIBPROJECTM_sysconfdir=`pkg-config --variable=sysconfdir libprojectM`;
	LIBPROJECTM_CFLAGS="$LIBPROJECTM_CFLAGS -DPROJECTM_DATADIR=\\\"$LIBPROJECTM_datadir\\\" -DPROJECTM_SYSCONFDIR=\\\"$LIBPROJECTM_sysconfdir\\\"";
fi
AC_SUBST(LIBPROJECTM_LIBS)
AC_SUBST(LIBPROJECTM_CFLAGS)

if test "x$have_projectm" = "xyes"; then
	VISUALIZATION_PLUGINS="$VISUALIZATION_PLUGINS projectm"
fi

dnl *** projectM (GL Milkdrop port)

AC_ARG_ENABLE(projectm-1.0,
[  --disable-projectm-1.0      disable projectM 1.0+ vis plugin. (default=enabled)],
[have_projectm1=$enableval],
[have_projectm1=yes])

if test "$have_projectm1" = "yes"; then
	PKG_CHECK_MODULES(LIBPROJECTM1, [libprojectM >= 1.1], [have_projectm1="yes"], [have_projectm1="no"])
	PKG_CHECK_MODULES(GTKGLEXT, [gtkglext-1.0], [have_projectm1="yes"], [have_projectm1="no"])
	if test "xhave_projectm1" = "xno"; then
	        AC_MSG_WARN([*** libprojectM not found.
	                        libprojectM is needed to build this package.
	                        You can download libprojectM at http://projectm.sf.net/])
	fi
	LIBPROJECTM1_datadir=`pkg-config --variable=pkgdatadir libprojectM`;
	LIBPROJECTM1_sysconfdir=`pkg-config --variable=sysconfdir libprojectM`;
        LIBPROJECTM1_prefix=`pkg-config --variable=prefix libprojectM`;
	LIBPROJECTM1_CFLAGS="$LIBPROJECTM1_CFLAGS -DPROJECTM_DATADIR=\\\"$LIBPROJECTM1_datadir\\\" -DPROJECTM_SYSCONFDIR=\\\"$LIBPROJECTM1_sysconfdir\\\" -DPROJECTM_PREFIX=\\\"$LIBPROJECTM1_prefix\\\"";
fi
AC_SUBST(LIBPROJECTM1_LIBS)
AC_SUBST(LIBPROJECTM1_CFLAGS)
AC_SUBST(GTKGLEXT_LIBS)
AC_SUBST(GTKGLEXT_CFLAGS)

if test "x$have_projectm1" = "xyes"; then
	VISUALIZATION_PLUGINS="$VISUALIZATION_PLUGINS projectm-1.0"
fi

dnl *** FileWriter

AC_ARG_ENABLE(filewriter,
    [  --disable-filewriter    disable FileWriter output plugin (default=enabled) ],
    [enable_filewriter=$enableval],
    [enable_filewriter=yes]
)

if test "x$enable_filewriter" = "xyes"; then
	OUTPUT_PLUGINS="$OUTPUT_PLUGINS filewriter"
fi


AC_ARG_ENABLE(filewriter_mp3,
    [  --disable-filewriter_mp3    disable FileWriter MP3 output part (default=enabled) ],
    [enable_filewriter_mp3=$enableval], [enable_filewriter_mp3=yes]
)

if test "x$enable_filewriter_mp3" = "xyes"; then
   AC_CHECK_LIB(mp3lame -lm, lame_get_id3v2_tag, [have_lame=yes], [have_lame=no])
   if test "x$have_lame" = "xyes"; then
      AC_DEFINE(FILEWRITER_MP3, 1, [Define if MP3 output part should be built])
	  FILEWRITER_LIBS="$FILEWRITER_LIBS -lmp3lame"
   fi
fi


AC_ARG_ENABLE(filewriter_vorbis,
    [  --disable-filewriter_vorbis disable FileWriter Vorbis output part (default=enabled) ],
    [enable_filewriter_vorbis=$enableval], [enable_filewriter_vorbis=yes]
)

if test "x$enable_filewriter_vorbis" = "xyes"; then
   PKG_CHECK_MODULES(OGG_VORBIS, [ogg >= 1.0 vorbis >= 1.0 vorbisfile >= 1.0],
   [have_vorbisenc=yes], [have_vorbisenc=no])
   if test "x$have_vorbisenc" = "xyes"; then
      AC_DEFINE(FILEWRITER_VORBIS, 1, [Define if Vorbis output part should be built])
      FILEWRITER_CFLAGS="$FILEWRITER_CFLAGS  `pkg-config --cflags vorbisenc`"
      FILEWRITER_LIBS="$FILEWRITER_LIBS  `pkg-config --libs vorbisenc`"
   fi
fi


AC_ARG_ENABLE(filewriter_flac,
    [  --disable-filewriter_flac   disable FileWriter FLAC output part (default=enabled) ],
    [enable_filewriter_flac=$enableval], [enable_filewriter_flac=yes]
)

if test "x$enable_filewriter_flac" = "xyes"; then
   PKG_CHECK_MODULES(FLAC, [flac >= 1.1.2],
      [have_writer_flac=yes], [have_writer_flac=no]
   )
   if test "x$have_writer_flac" = "xyes"; then
      AC_DEFINE(FILEWRITER_FLAC, 1, [Define if FLAC output part should be built])
	  FILEWRITER_CFLAGS="$FILEWRITER_CFLAGS  `pkg-config --cflags flac`"
	  FILEWRITER_LIBS="$FILEWRITER_LIBS  `pkg-config --libs flac`"
   fi
fi

if test "x$enable_filewriter" != "xyes"; then
   have_lame=no
   have_vorbisenc=no
   have_writer_flac=no
   FILEWRITER_LIBS=""
fi
AC_SUBST(FILEWRITER_CFLAGS)
AC_SUBST(FILEWRITER_LIBS)

if test "x$have_shout" = "xyes"; then
   OUTPUT_PLUGINS="$OUTPUT_PLUGINS icecast"
fi

dnl *** BS2B effect plugin

AC_ARG_ENABLE(bs2b,
    [  --disable-bs2b          disable BS2B effect plugin (default=enabled)],
    [enable_bs2b=$enableval],
    [enable_bs2b=yes]
)

if test "x$enable_bs2b" = "xyes"; then
    PKG_CHECK_MODULES([BS2B], [libbs2b >= 3.0.0], [have_bs2b=yes], [have_bs2b=no])
else
    AC_MSG_RESULT([*** BS2B effect plugin disabled per user request ***])
    have_bs2b=no
fi

if test "x$have_bs2b" = "xyes"; then
	EFFECT_PLUGINS="$EFFECT_PLUGINS bs2b"
fi


dnl *** Resample effect plugin

AC_ARG_ENABLE(resample,
 [  --disable-resample      disable resample effect plugin (default=enabled)],
 [enable_resample=$enableval], [enable_resample=yes]
)

if test "x$enable_resample" = "xyes"; then
    AC_CHECK_LIB([samplerate], [src_process], [enable_resample=yes],
     [enable_resample=no])
fi

if test "x$enable_resample" = "xyes"; then
	EFFECT_PLUGINS="$EFFECT_PLUGINS resample"
fi

dnl *** End of all plugin checks ***

AC_SUBST(ARCH_DEFINES)

dnl XXX delete ASAP -nenolod
AM_CONDITIONAL(ARCH_X86, test "x$arch_type" = "xix86")
AM_CONDITIONAL(USE_X86ASM, test "x$x86_asm" = xyes)
AM_CONDITIONAL(HAVE_SOLARIS, test "x$have_solaris" = xyes)
AM_CONDITIONAL(HAVE_SUN, test "x$have_sun" = xyes)

plugindir=`pkg-config audacious --variable=plugin_dir`
AC_SUBST(plugindir)

dnl XXX

INPUT_PLUGIN_DIR=Input
OUTPUT_PLUGIN_DIR=Output
EFFECT_PLUGIN_DIR=Effect
GENERAL_PLUGIN_DIR=General
VISUALIZATION_PLUGIN_DIR=Visualization
CONTAINER_PLUGIN_DIR=Container
TRANSPORT_PLUGIN_DIR=Transport

AC_SUBST(INPUT_PLUGIN_DIR)
AC_SUBST(OUTPUT_PLUGIN_DIR)
AC_SUBST(EFFECT_PLUGIN_DIR)
AC_SUBST(GENERAL_PLUGIN_DIR)
AC_SUBST(VISUALIZATION_PLUGIN_DIR)
AC_SUBST(CONTAINER_PLUGIN_DIR)
AC_SUBST(TRANSPORT_PLUGIN_DIR)
AC_SUBST(pluginsubs)

dnl XXX Work around some autoconf bugs.
if test "x$prefix" = "xNONE"; then
        prefix="${ac_default_prefix}"
fi

if test -z "$datadir"; then
	datadir="${prefix}/share"
fi

localedir="$datadir/locale"
AC_SUBST(localedir)

BEEP_DEFINES="$CFLAGS -DDATA_DIR=\\\"$datadir/audacious\\\" -DPLUGIN_DIR=\\\"$plugindir\\\" -DPLUGINSUBS=$pluginsubs -DLOCALEDIR=\\\"$localedir\\\""
CFLAGS="$CFLAGS $EXTRA_CFLAGS"

if test "x$enable_user_plugin_dir" = "xno"; then
    AC_DEFINE(DISABLE_USER_PLUGIN_DIR,, [Define to disable per user plugin directory])
fi

AC_DEFINE(BMP_RCPATH, ".audacious", [Config dir to use])

AC_SUBST(BEEP_DEFINES)

AC_SUBST(beepdir)
AC_SUBST(plugindir)

AC_SUBST(EFFECT_PLUGINS)
AC_SUBST(GENERAL_PLUGINS)
AC_SUBST(INPUT_PLUGINS)
AC_SUBST(OUTPUT_PLUGINS)
AC_SUBST(VISUALIZATION_PLUGINS)
AC_SUBST(CONTAINER_PLUGINS)
AC_SUBST(TRANSPORT_PLUGINS)
AC_SUBST(GCC42_CFLAGS)

AC_CONFIG_FILES([
	buildsys.mk
	extra.mk
])

BUILDSYS_TOUCH_DEPS
AC_OUTPUT

echo
echo "Configuration:"
echo
echo "  Install path:                           ${audacious_plugin_root}"
echo "  Additional debugging output:            $enable_debug"
echo
echo "  Output Plugins"
echo "  --------------"
echo "  Open Sound System (oss):                $have_oss"
echo "  Open Sound System v4 (oss4):            $have_oss4"
echo "  Advanced Linux Sound Arch. (alsa):      $have_alsa"
echo "  PulseAudio (pulse):                     $have_pulse"
echo "  Enlightenment Sound Daemon (esd):       $have_esd"
echo "  Jack Audio Connection Kit (jack):       $have_jack"
echo "  BSD/SUN audio output (sun):             $have_sun"
echo "  Mac OS X sound support (CoreAudio):     $have_coreaudio"
echo "  FileWriter:                             $enable_filewriter"
echo "    -> FileWriter MP3 output part:        $have_lame"
echo "    -> FileWriter Vorbis output part:     $have_vorbisenc"
echo "    -> FileWriter FLAC output part:       $have_writer_flac"
echo "  Icecast audio output (icecast):         $have_shout"
echo "  Null Audio output (null):               yes"
echo
echo "  Input Plugins"
echo "  -------------"
echo "  MPEG 1/2/3 (madplug):                   $enable_mp3"
echo "  MPEG 4 Audio (AAC):                     $enable_aac"
echo "  FFaudio (ffaudio):                      $have_ffaudio"
echo "  Module decoder (modplug):               $have_modplug"
echo "  MIDI modular plugin (amidi-plug):       $enable_amidiplug"
echo "    -> ALSA backend:                      $enable_amidiplug_alsa"
echo "    -> FluidSynth backend:                $enable_amidiplug_fluidsynth"
echo "  CD Digital Audio (cdaudio_ng):          $enable_cdaudio_ng"
echo "  sndfile extensions:                     $enable_sndfile"
echo "  Tone Generator:                         yes"
echo "  Ogg Vorbis (vorbis):                    $have_oggvorbis"
echo "  Free Lossless Audio Codec (flacng):     $have_flacng"
echo "  Commodore 64 audio (SID):               $have_sidplay $xs_have_sidplay2_api"
echo "    -> libSIDPlay1 support:               $xs_have_sidplay1"
echo "    -> libSIDPlay2 support:               $xs_have_sidplay2"
echo "    -> distortion patched libSIDPlay2:    $xs_have_distortion"
echo "  Game music (spc, nsf & gbs):            yes"
echo "  PlayStation (psf/psf2) audio (psf):     no"
echo "  Nintendo 64 audio (usf):                $enable_usf"
echo "  Nintendo DS audio (xsf):                yes [experimental]"
echo "  AdLib synthesizer (adplug):             $have_adplug"
echo "  Apple Lossless Audio Codec (alac):      $have_ffaudio"
echo "  WavPack 4.31+ (wavpack):                $have_wavpack"
echo "  Metronom:                               yes"
echo
echo "  General"
echo "  -------"
echo "  Alarm:                                  yes"
echo "  Song Change:                            yes"
echo "  Status Icon:                            $have_statusicon"
echo "  Audacious OSD:                          $have_aosd"
echo "    -> X Composite support:               $have_aosd_xcomp"
echo "  Control via event device (evdev-plug):  $have_evdevplug"
echo "  Global Hotkey Plugin:                   $have_hotkey"
echo "  Gnome Shortcuts Plugin:                 $have_gnomeshortcuts"
echo "  LIRC:                                   $have_lirc"
echo "  Upload to MTP device:                   $have_mtp_up"
echo "  Bluetooth audio support:                $have_bluetooth"
echo "  MacOS Dock Album Art plugin:            $have_dockalbumart"
echo "  Streambrowser:                          $enable_streambrowser"
echo
echo "  Effect"
echo "  ------"
echo "  Dynamic Range Compressor:               yes"
echo "  LADSPA effects host (ladspa):           yes"
echo "  Voice Removal:                          yes"
echo "  Extra Stereo:                           yes"
echo "  Echo/Surround:                          yes"
echo "  SndStretch:                             yes"
echo "  Crystalizer:                            yes"
echo "  Icecast effect plugin (icecast):        $have_shout"
echo "  Bauer stereophonic-to-binaural (bs2b):  $have_bs2b"
echo "  Sample Rate Converter (resample):       $enable_resample"
echo
echo "  Visualization"
echo "  -------------"
echo "  Blur Scope:                             yes"
echo "  Spectrum Analyzer:                      yes"
echo "  Paranormal Visualization Library:       $have_paranormal"
echo "  projectM 0.x (GL milkdrop):             $have_projectm"
echo "  projectM 1.x (GL milkdrop):             $have_projectm1"
echo
echo "  Transport"
echo "  ---------"
echo "  gio transport:                          $enable_gio"
echo "  neon-based http/https:                  $have_neon"
echo "  libmms-based mms:                       $have_mms"
echo
echo "  Container"
echo "  ---------"
echo "  Winamp PLS playlist format (pls):       yes"
echo "  M3U playlist format (m3u):              yes"
echo "  XML Sharable Playlist Format (xspf):    $have_xspf"
echo "  CUE playlist format (cue):              $have_cue"
echo