-
Notifications
You must be signed in to change notification settings - Fork 64
/
configure.ac
811 lines (740 loc) · 25.6 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
dnl configure.ac
dnl
dnl Autoconf configuration for Rivendell.
dnl Use autoconf to process this into a configure script
dnl
dnl (C) Copyright 2002-2024 Fred Gleason <[email protected]>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License version 2 as
dnl published by the Free Software Foundation.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public
dnl License along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
AC_INIT([rivendell],m4_esyscmd(cat versions/PACKAGE_VERSION))
AM_INIT_AUTOMAKE([1.9 tar-pax])
AC_SUBST(RPM_RELEASE,1)
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_CONFIG_MACRO_DIR([m4])
#
# API Versioning
#
AC_SUBST(PYTHONAPI_VERSION,m4_esyscmd(cat versions/PYTHONAPI_VERSION))
RIVWEBCAPI_CURRENT=m4_esyscmd(cat versions/RIVWEBCAPI_CURRENT)
RIVWEBCAPI_REVISION=m4_esyscmd(cat versions/RIVWEBCAPI_REVISION)
RIVWEBCAPI_AGE=m4_esyscmd(cat versions/RIVWEBCAPI_AGE)
RIVWEBCAPI_POINT=$(($RIVWEBCAPI_CURRENT - $RIVWEBCAPI_AGE))
AC_SUBST(INTERFACE_RIVWEBCAPI_CURRENT,$RIVWEBCAPI_CURRENT)
AC_SUBST(INTERFACE_RIVWEBCAPI_REVISION,$RIVWEBCAPI_REVISION)
AC_SUBST(INTERFACE_RIVWEBCAPI_AGE,$RIVWEBCAPI_AGE)
AC_SUBST(INTERFACE_RIVWEBCAPI_MAJOR,$RIVWEBCAPI_POINT)
AC_SUBST(INTERFACE_RIVWEBCAPI_MINOR,$RIVWEBCAPI_AGE)
AC_SUBST(INTERFACE_RIVWEBCAPI_POINT,$RIVWEBCAPI_REVISION)
#
# Basic Compiler Checks
#
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_LANG(C++)
# to avoid rpath usage :
# http://wiki.debian.net/index.cgi?RpathIssue
case ${host} in
*-pc-linux-gnu)
AC_MSG_RESULT([Fixing libtool for -rpath problems.])
sed < libtool > libtool-2 \
's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
mv libtool-2 libtool
chmod 755 libtool
;;
esac
#
# Option Switches
#
AC_ARG_ENABLE(hpi,[ --disable-hpi disable AudioScience HPI sound support],
[HPI_DISABLED=yes],[])
AC_ARG_ENABLE(jack,[ --disable-jack disable JACK sound support],
[JACK_DISABLED=yes],[])
AC_ARG_ENABLE(alsa,[ --disable-alsa disable direct ALSA sound support],
[ALSA_DISABLED=yes],[])
AC_ARG_ENABLE(docbook,[ --disable-docbook disable building of documentation],[DOCBOOK_DISABLED=yes],[])
AC_ARG_ENABLE(gpio,[ --disable-gpio disable General Purpose Input/Output GPIO support],
[GPIO_DISABLED=yes],[])
AC_ARG_ENABLE(mad,[ --disable-mad disable MPEG decode support],
[MAD_DISABLED=yes],[])
AC_ARG_ENABLE(twolame,[ --disable-twolame disable MPEG Layer 2 encode support],
[TWOLAME_DISABLED=yes],[])
AC_ARG_ENABLE(lame,[ --disable-lame disable MPEG Layer 3 encode support],
[LAME_DISABLED=yes],[])
AC_ARG_ENABLE(flac,[ --disable-flac disable FLAC encode/decode support],
[FLAC_DISABLED=yes],[])
AC_ARG_ENABLE(mp4v2,[ --disable-mp4 disable M4A decode support],
[MP4V2_DISABLED=yes],[])
AC_ARG_ENABLE(rdxport-debug,[ --enable-rdxport-debug enable DEBUG support for RDXport services],
[RDXPORT_DEBUG_ENABLED=yes],[])
AC_ARG_ENABLE(i18n-updates,[ --enable-i18n-updates enable I18N metadata updates],
[I18N_ENABLED=yes],[])
#
# Check for Qt5 (Mandatory)
#
PKG_CHECK_MODULES(QT5,Qt5Core Qt5Widgets Qt5Gui Qt5Network Qt5Sql Qt5Xml Qt5WebKitWidgets,,[AC_MSG_ERROR([*** Qt5 not found ***])])
PKG_CHECK_MODULES(QT5_CLI,Qt5Core Qt5Network Qt5Sql Qt5Xml,,[AC_MSG_ERROR([*** Qt5 not found ***])])
AC_CHECK_PROG(MOC_NAME,moc-qt5,[moc-qt5],[moc])
AC_SUBST(QT_MOC,$MOC_NAME)
AC_CHECK_PROG(LUPDATE_NAME,lupdate-qt5,[lupdate-qt5],[lupdate])
AC_SUBST(QT_LUPDATE,$LUPDATE_NAME)
AC_CHECK_PROG(LRELEASE_NAME,lrelease-qt5,[lrelease-qt5],[lrelease])
AC_SUBST(QT_LRELEASE,$LRELEASE_NAME)
#
# Determine the target architecture
#
AR_GCC_TARGET()
AC_SUBST(VENDOR,$ar_gcc_distro)
AC_SUBST(ARCH,$ar_gcc_arch)
#
# Determine number of available CPU cores for building packages
#
AX_COUNT_CPUS([],[])
if test $CPU_COUNT -lt 2 ; then
AC_SUBST(CPUS_AVAIL,1)
else
if test $CPU_COUNT -gt 16 ; then
AC_SUBST(CPUS_AVAIL,16)
else
AC_SUBST(CPUS_AVAIL,$(($CPU_COUNT-1)))
fi
fi
#
# Determine Distro
#
AR_GET_DISTRO()
AC_SUBST(DISTRO,$ar_gcc_distro)
AC_MSG_NOTICE($ar_distro_id)
DISTRO_NAME="| Distribution Name ... Unknown |"
case "$ar_distro_id" in
debian)
AC_MSG_NOTICE([Distro is Debian-ish])
DISTRO_FAMILY="| Distribution Family ... Debian |"
DISTRO_IS_DEBIANISH=yes
DISTRO_NAME="| Distribution Name ... Debian |"
AC_SUBST(APACHE_PKG,"apache2")
AC_SUBST(APACHE_CONFIG_DIR,"/etc/apache2/conf.d")
AC_SUBST(USERMODE_PKG,"")
AC_SUBST(MYSQL_PKG,"mariadb-client")
AC_SUBST(QT_MYSQL_PKG,"libqt5sql5-mysql")
AC_SUBST(DOC_PATH,"/usr/share/doc/rivendell")
AC_SUBST(HAVE_USERMODE,"no")
AC_SUBST(RDALSACONFIG_DESKTOP_FILE,"rivendell-rdalsaconfig-sudo.desktop")
AC_SUBST(RDDBCONFIG_DESKTOP_FILE,"rivendell-rddbconfig-sudo.desktop")
AC_SUBST(PYPAD_DEPS,"python3 python3-pycurl python3-requests python3-pyserial python3-mysql python3-urllib3")
AC_SUBST(RIVENDELL_PAM_FILE,"rivendell-ubuntu.pam")
;;
raspbian)
AC_MSG_NOTICE([Distro is Debian-ish])
DISTRO_FAMILY="| Distribution Family ... Debian |"
DISTRO_IS_DEBIANISH=yes
DISTRO_NAME="| Distribution Name ... Raspberry Pi OS |"
AC_SUBST(APACHE_PKG,"apache2")
AC_SUBST(APACHE_CONFIG_DIR,"/etc/apache2/conf.d")
AC_SUBST(USERMODE_PKG,"")
AC_SUBST(MYSQL_PKG,"mariadb-client")
AC_SUBST(QT_MYSQL_PKG,"libqt5sql5-mysql")
AC_SUBST(DOC_PATH,"/usr/share/doc/rivendell")
AC_SUBST(HAVE_USERMODE,"no")
AC_SUBST(RDALSACONFIG_DESKTOP_FILE,"rivendell-rdalsaconfig-sudo.desktop")
AC_SUBST(RDDBCONFIG_DESKTOP_FILE,"rivendell-rddbconfig-sudo.desktop")
AC_SUBST(PYPAD_DEPS,"python3 python3-pycurl python3-requests python3-pyserial python3-mysql python3-urllib3")
AC_SUBST(RIVENDELL_PAM_FILE,"rivendell-ubuntu.pam")
;;
linuxmint)
AC_MSG_NOTICE([Distro is Debian-ish])
DISTRO_FAMILY="| Distribution Family ... Debian |"
DISTRO_IS_DEBIANISH=yes
DISTRO_NAME="| Distribution Name ... Linux Mint|"
AC_SUBST(APACHE_PKG,"apache2")
AC_SUBST(APACHE_CONFIG_DIR,"/etc/apache2/conf.d")
AC_SUBST(USERMODE_PKG,"")
AC_SUBST(MYSQL_PKG,"mariadb-client")
AC_SUBST(QT_MYSQL_PKG,"libqt5sql5-mysql")
AC_SUBST(DOC_PATH,"/usr/share/doc/rivendell")
AC_SUBST(HAVE_USERMODE,"no")
AC_SUBST(RDALSACONFIG_DESKTOP_FILE,"rivendell-rdalsaconfig-sudo.desktop")
AC_SUBST(RDDBCONFIG_DESKTOP_FILE,"rivendell-rddbconfig-sudo.desktop")
AC_SUBST(PYPAD_DEPS,"python3 python3-pycurl python3-requests python3-pyserial python3-mysql python3-urllib3")
AC_SUBST(RIVENDELL_PAM_FILE,"rivendell-ubuntu.pam")
;;
ubuntu)
AC_MSG_NOTICE([Distro is Debian-ish])
DISTRO_FAMILY="| Distribution Family ... Debian |"
DISTRO_IS_DEBIANISH=yes
DISTRO_NAME="| Distribution Name ... Ubuntu |"
AC_SUBST(APACHE_PKG,"apache2")
AC_SUBST(APACHE_CONFIG_DIR,"/etc/apache2/conf.d")
AC_SUBST(USERMODE_PKG,"")
AC_SUBST(MYSQL_PKG,"mariadb-client")
AC_SUBST(QT_MYSQL_PKG,"libqt5sql5-mysql")
AC_SUBST(DOC_PATH,"/usr/share/doc/rivendell")
AC_SUBST(HAVE_USERMODE,"no")
AC_SUBST(RDALSACONFIG_DESKTOP_FILE,"rivendell-rdalsaconfig-sudo.desktop")
AC_SUBST(RDDBCONFIG_DESKTOP_FILE,"rivendell-rddbconfig-sudo.desktop")
AC_SUBST(PYPAD_DEPS,"python3 python3-pycurl python3-requests python3-pyserial python3-mysql python3-urllib3")
AC_SUBST(RIVENDELL_PAM_FILE,"rivendell-ubuntu.pam")
;;
centos|fedora|rhel|rocky)
AC_MSG_NOTICE([Distro is RedHat-ish])
DISTRO_FAMILY="| Distribution Family ... RedHat |"
if test $ar_distro_id = "centos" ; then
DISTRO_NAME="| Distribution Name ... CentOS |"
fi
if test $ar_distro_id = "fedora" ; then
DISTRO_NAME="| Distribution Name ... Fedora |"
fi
if test $ar_distro_id = "rhel" ; then
DISTRO_NAME="| Distribution Name ... RHEL |"
fi
if test $ar_distro_id = "rocky" ; then
DISTRO_NAME="| Distribution Name ... Rocky |"
fi
AC_SUBST(APACHE_PKG,"httpd")
AC_SUBST(APACHE_CONFIG_DIR,"/etc/httpd/conf.d")
AC_SUBST(USERMODE_PKG,"usermode usermode-gtk")
AC_SUBST(MYSQL_PKG,"mariadb")
AC_SUBST(QT_MYSQL_PKG,"qt5-qtbase-mysql")
AC_SUBST(DOC_PATH,"/usr/share/doc/rivendell-$PACKAGE_VERSION")
AC_SUBST(HAVE_USERMODE,"yes")
AC_SUBST(RDALSACONFIG_DESKTOP_FILE,"rivendell-rdalsaconfig-root.desktop")
AC_SUBST(RDDBCONFIG_DESKTOP_FILE,"rivendell-rddbconfig-root.desktop")
if test $ar_distro_major -lt 8 ; then
AC_SUBST(PYPAD_DEPS,"python36 python36-pycurl python36-requests python36-pyserial python36-mysql python36-urllib3")
else
if test $ar_distro_major -lt 9 ; then
AC_SUBST(PYPAD_DEPS,"python3 python3-pycurl python3-requests python3-pyserial python3-mysql python3-urllib3")
else
AC_SUBST(PYPAD_DEPS,"python3 python3-pycurl python3-requests python3-pyserial python3-mysqlclient python3-urllib3")
fi
fi
AC_SUBST(RIVENDELL_PAM_FILE,"rivendell-rhel.pam")
;;
*)
AC_MSG_NOTICE([Distro is unknown])
DISTRO_FAMILY="| Distribution Family ... Unknown |"
AC_SUBST(APACHE_PKG,"apache2")
AC_SUBST(APACHE_CONFIG_DIR,"/etc/apache2/conf.d")
AC_SUBST(USERMODE_PKG,"")
AC_SUBST(MYSQL_PKG,"mysql")
AC_SUBST(QT_MYSQL_PKG,"qt-mysql")
AC_SUBST(DOC_PATH,"/usr/share/doc/rivendell")
AC_SUBST(HAVE_USERMODE,"no")
AC_SUBST(RDALSACONFIG_DESKTOP_FILE,"rivendell-rdalsaconfig.desktop")
AC_SUBST(RDDBCONFIG_DESKTOP_FILE,"rivendell-rddbconfig.desktop")
AC_SUBST(PYPAD_DEPS,"python3 python3-pycurl python3-requests python3-pyserial python3-mysql python3-urllib3")
AC_SUBST(RIVENDELL_PAM_FILE,"rivendell-rhel.pam")
;;
esac
#
# Internationalization
#
if test $I18N_ENABLED ; then
AC_SUBST(I18N_ACTIVE,1)
else
AC_SUBST(I18N_ACTIVE,0)
fi
#
# Check for Expat
#
AC_CHECK_HEADER(expat.h,[],[AC_MSG_ERROR([*** Expat not found ***])])
#
# Check for OpenSSL
#
AC_CHECK_HEADER(openssl/sha.h,[],[AC_MSG_ERROR([*** OpenSSL not found ***])])
#
# Check for OggVorbis
#
AC_CHECK_HEADER(vorbis/vorbisfile.h,[VORBIS_FOUND=yes],[])
if test $VORBIS_FOUND = yes ; then
AC_DEFINE(HAVE_VORBIS)
AC_SUBST(LIBVORBIS,"-lvorbisfile -lvorbisenc")
else
AC_SUBST(LIBVORBIS,"")
fi
#
# Check for Secret Rabbit Code
#
AC_CHECK_HEADER(samplerate.h,[SRC_FOUND=yes],[AC_MSG_ERROR([*** LibSampleRate not found ***])])
AC_CHECK_FUNC(src_short_to_float_array,[SRC_CONV_FOUND=yes],[])
#
# Check for Libsndfile
#
AC_CHECK_HEADER(sndfile.h,[],[AC_MSG_ERROR([*** Libsndfile not found ***])])
#
# Check for LibParanoia
#
AC_CHECK_HEADER(cdda_interface.h,[PARANOIA_FOUND=yes],[])
if test $PARANOIA_FOUND ; then
AC_SUBST(PARANOIA_INCLUDES,"<cdda_interface.h>")
else
# RedHat/CentOS puts this in a subdirectory
AC_CHECK_HEADER(cdda/cdda_interface.h,[PARANOIA_FOUND=yes],[])
if test $PARANOIA_FOUND ; then
AC_SUBST(PARANOIA_INCLUDES,"<cdda/cdda_interface.h>")
else
AC_MSG_ERROR([*** LibParanoia not found ***])
fi
fi
#
# Check for MusicBrainz support libraries
# (libdiscid, libmusicbrainz and libcoverart)
#
PKG_CHECK_MODULES(MUSICBRAINZ,libdiscid libmusicbrainz5 libcoverart,,[AC_MSG_ERROR([*** One or more MusicBrainz libraries not found ***])])
#
# Check for Id3Lib
#
AC_CHECK_HEADER(id3/tag.h,[],[AC_MSG_ERROR([*** Id3Lib not found ***])])
#
# Check for TagLib
#
AC_CHECK_HEADER(taglib/taglib.h,[],[AC_MSG_ERROR([*** TagLib not found ***])])
#
# Check for LibCurl
#
AC_CHECK_HEADER(curl/curl.h,[],[AC_MSG_ERROR([*** LibCurl not found ***])])
#
# Check for PAM
#
AC_CHECK_HEADER(security/pam_appl.h,[],[AC_MSG_ERROR([*** PAM not found ***])])
#
# Check for SoundTouch
#
AC_CHECK_HEADER(soundtouch/SoundTouch.h,[],[AC_MSG_ERROR([*** SoundTouch not found ***])])
#
# Check for ImageMagick
#
PKG_CHECK_MODULES(IMAGEMAGICK,Magick++-6.Q16,[],[AC_MSG_ERROR([*** ImageMagick 6 Magick++ binding not found ***])])
#
# Check for Python
#
if test -z $DISTRO_IS_DEBIANISH ; then
AM_PATH_PYTHON([3])
#echo -n $pythondir | sed "s^\${prefix}^/usr^" > debian/pythondir
AC_SUBST(PYTHON_BASE_DEP,"python"`echo $PYTHON_VERSION | sed -e s/3./3/`)
else
#
# FIXME: Horrible hack to make Python install correctly on Debianish setups
#
AC_MSG_NOTICE([Configuring Debian-style Python installation])
PYTHON="/usr/bin/python3"
AC_ARG_VAR(PYTHON,[the Python interpreter])
pythondir="/usr/lib/python3/dist-packages"
AC_ARG_VAR(pythondir,[the Python modules directory])
pyexecdir="/usr/lib/python3/dist-packages"
AC_ARG_VAR(pyexecdir,[the Python extension modules directory])
fi
#
# Check for FLAC
#
if test -z $FLAC_DISABLED ; then
AC_CHECK_HEADER(FLAC++/encoder.h,[FLAC_FOUND=yes],[])
if test $FLAC_FOUND ; then
FLAC_LIBS="-lFLAC -lFLAC++"
AC_DEFINE(HAVE_FLAC)
fi
AC_CHECK_LIB(FLAC,FLAC__metadata_get_tags,[FLAC_METADATA_FOUND=yes],[])
fi
#
# Check for MP4V2
#
if test -z $MP4V2_DISABLED ; then
AC_CHECK_HEADER(mp4v2/mp4v2.h,[MP4V2_HEADER_FOUND=yes],[])
if test $MP4V2_HEADER_FOUND ; then
AC_CHECK_HEADER(neaacdec.h,[MP4V2_FOUND=yes],[])
if test $MP4V2_FOUND ; then
AC_DEFINE(HAVE_MP4_LIBS)
fi
fi
fi
#
# DocBook
#
if test -z $DOCBOOK_DISABLED ; then
USING_DOCBOOK=yes
fi
AM_CONDITIONAL([DOCBOOK_AM], [test "$USING_DOCBOOK" = yes])
if test $DOCBOOK_STYLESHEETS ; then
ln -s $DOCBOOK_STYLESHEETS helpers/docbook
fi
#
# RDXport Debug
#
if test $RDXPORT_DEBUG_ENABLED ; then
AC_DEFINE(RDXPORT_DEBUG)
AC_SUBST(RDXPORTDEBUG,--enable-rdxport-debug)
else
AC_SUBST(RDXPORTDEBUG,"")
fi
#
# Set Hard Library Dependencies
#
AC_SUBST(LIB_RDLIBS,"-lm -lpthread -lrd -lcurl -lid3 -ltag $FLAC_LIBS -lsndfile -lsamplerate -lcdda_interface -lcdda_paranoia -lcrypt -ldl -lpam -lSoundTouch -lcrypto")
#
# Setup MPEG Dependencies
#
AC_CHECK_HEADER(mad.h,[MAD_FOUND=yes],[])
AC_CHECK_HEADER(twolame.h,[TWOLAME_FOUND=yes],[])
AC_CHECK_HEADER(lame/lame.h,[LAME_FOUND=yes],[])
if test $MAD_FOUND ; then
if test -z $MAD_DISABLED ; then
AC_DEFINE(HAVE_MAD)
USING_MAD=yes
fi
fi
if test $TWOLAME_FOUND ; then
if test -z $TWOLAME_DISABLED ; then
AC_DEFINE(HAVE_TWOLAME)
USING_TWOLAME=yes
fi
fi
if test $LAME_FOUND ; then
if test -z $LAME_DISABLED ; then
AC_DEFINE(HAVE_LAME)
USING_LAME=yes
fi
fi
#
# Setup Sound API Dependencies
#
AC_CHECK_HEADER(asihpi/hpi.h,[HPI_FOUND=yes],[])
PKG_CHECK_MODULES(LIBJACK,jack,[JACK_FOUND=yes],[JACK_NOT_FOUND=yes])
PKG_CHECK_MODULES(ASOUNDLIB,alsa,[ALSA_FOUND=yes],[ALSA_NOT_FOUND=yes])
if test $HPI_FOUND ; then
if test -z $HPI_DISABLED ; then
USING_HPI=yes
AC_DEFINE(HPI,yes)
AC_SUBST(LIBHPI,"-lrdhpi -lhpi")
AC_SUBST(HPI_FILE1,${libdir}/librdhpi-$VERSION.so)
AC_SUBST(HPI_FILE2,${libdir}/librdhpi.a)
AC_SUBST(HPI_FILE3,${libdir}/librdhpi.la)
AC_SUBST(HPI_FILE4,${libdir}/librdhpi.so)
else
AC_SUBST(LIBHPI,"")
AC_SUBST(HPI_FILE1,"")
AC_SUBST(HPI_FILE2,"")
AC_SUBST(HPI_FILE3,"")
AC_SUBST(HPI_FILE4,"")
fi
else
AC_SUBST(LIBHPI,"")
AC_SUBST(HPI_FILE1,"")
AC_SUBST(HPI_FILE2,"")
AC_SUBST(HPI_FILE3,"")
AC_SUBST(HPI_FILE4,"")
fi
AM_CONDITIONAL([HPI_RD_AM], [test "$USING_HPI" = yes])
if test $JACK_FOUND ; then
if test -z $JACK_DISABLED ; then
if test -z $SRC_FOUND ; then
AC_MSG_ERROR([*** libsamplerate not found, but is needed for JACK support ***])
fi
AC_DEFINE(JACK,yes)
SRC_NEEDED=yes
USING_JACK=yes
else
AC_SUBST(JACK_CFLAGS,"")
AC_SUBST(JACK_LIBS,"")
fi
else
AC_SUBST(JACK_CFLAGS,"")
AC_SUBST(JACK_LIBS,"")
fi
if test $ALSA_FOUND ; then
if test -z $ALSA_DISABLED ; then
if test -z $SRC_FOUND ; then
AC_MSG_ERROR([*** libsamplerate not found, but is needed for ALSA support ***])
fi
AC_DEFINE(ALSA,yes)
AC_SUBST(LIBALSA,-lasound)
SRC_NEEDED=yes
USING_ALSA=yes
else
AC_SUBST(LIBALSA,"")
fi
else
AC_SUBST(LIBALSA,"")
fi
AM_CONDITIONAL([ALSA_RD_AM], [test "$USING_ALSA" = yes])
if test -z $SRC_NEEDED ; then
AC_SUBST(LIBSRC,"")
else
AC_DEFINE(SRC,yes)
AC_SUBST(LIBSRC,-lsamplerate)
fi
if test -z $SRC_CONV_FOUND ; then
AC_MSG_NOTICE([Using local format converters])
else
AC_MSG_NOTICE([Using SRC format converters])
AC_DEFINE(HAVE_SRC_CONV,yes)
fi
if test -z $FLAC_METADATA_FOUND ; then
AC_MSG_NOTICE([Ogg Metadata tags will not be supported])
else
AC_DEFINE(HAVE_FLAC_METADATA,yes)
fi
#
# Configure RPM Build
#
AC_CHECK_PROG(RPMBUILD_FOUND,rpmbuild,[yes],[])
if test -z $RPMBUILD_FOUND ; then
AC_SUBST(RPMBUILD,rpm)
else
AC_SUBST(RPMBUILD,rpmbuild)
fi
if test -d /usr/src/redhat ; then
AC_SUBST(VENDOR,redhat)
else
AC_SUBST(VENDOR,suse)
fi
AC_SUBST(RPM_DATESTAMP,`date +%a\ %b\ %d\ %Y`)
#
# Generated File Warnings
#
AC_SUBST_FILE(GENERATED_C_FILE_WARNING)
GENERATED_C_FILE_WARNING=$srcdir/helpers/c_file_warning
AC_SUBST_FILE(GENERATED_SCRIPT_FILE_WARNING)
GENERATED_SCRIPT_FILE_WARNING=$srcdir/helpers/script_file_warning
AC_SUBST_FILE(GENERATED_XML_FILE_WARNING)
GENERATED_XML_FILE_WARNING=$srcdir/helpers/xml_file_warning
#
# Create icon symlinks for Operations Guide
#
rm -f docs/opsguide/chain.png
ln -s ../../icons/chain.png docs/opsguide/chain.png
rm -f docs/opsguide/mic16.png
ln -s ../../icons/mic16.png docs/opsguide/mic16.png
rm -f docs/opsguide/music.png
ln -s ../../icons/music.png docs/opsguide/music.png
rm -f docs/opsguide/notemarker.png
ln -s ../../icons/notemarker.png docs/opsguide/notemarker.png
rm -f docs/opsguide/play.png
ln -s ../../icons/play.png docs/opsguide/play.png
rm -f docs/opsguide/rml5.png
ln -s ../../icons/rml5.png docs/opsguide/rml5.png
rm -f docs/opsguide/track_cart.png
ln -s ../../icons/track_cart.png docs/opsguide/track_cart.png
rm -f docs/opsguide/traffic.png
ln -s ../../icons/traffic.png docs/opsguide/traffic.png
rm -f docs/opsguide/trashcan-32x32.png
ln -s ../../icons/trashcan-32x32.png docs/opsguide/trashcan-32x32.png
rm -f docs/opsguide/blueball.png
ln -s ../../icons/blueball.png docs/opsguide/blueball.png
rm -f docs/opsguide/greenball.png
ln -s ../../icons/greenball.png docs/opsguide/greenball.png
rm -f docs/opsguide/redball.png
ln -s ../../icons/redball.png docs/opsguide/redball.png
rm -f docs/opsguide/whiteball.png
ln -s ../../icons/whiteball.png docs/opsguide/whiteball.png
rm -f docs/opsguide/greencheckmark.png
ln -s ../../icons/greencheckmark.png docs/opsguide/greencheckmark.png
rm -f docs/opsguide/redx.png
ln -s ../../icons/redx.png docs/opsguide/redx.png
AC_CONFIG_FILES([rivendell.spec \
versions/Makefile \
debian/Makefile \
debian/source/Makefile \
Makefile \
conf/rd-bin.conf \
icons/Makefile \
helpers/Makefile \
helpers/install_python.sh \
helpers/rdi18n_helper.sh \
LICENSES/Makefile \
apis/setup.cfg \
apis/Makefile \
apis/cdn/scripts/Makefile \
apis/cdn/Makefile \
apis/pypad/Makefile \
apis/pypad/api/Makefile \
apis/pypad/scripts/Makefile \
apis/pypad/tests/Makefile \
apis/rivwebcapi/Makefile \
apis/rivwebcapi/rivwebcapi.pc \
apis/rivwebcapi/rivwebcapi/Makefile \
apis/rivwebcapi/tests/Makefile \
apis/rivwebpyapi/Makefile \
apis/rivwebpyapi/api/Makefile \
apis/rivwebpyapi/tests/Makefile \
lib/rdpaths.h \
lib/Makefile \
rdhpi/Makefile \
cae/Makefile \
web/Makefile \
web/common/Makefile \
web/rdxport/Makefile \
web/stylesheets/Makefile \
web/tests/Makefile \
web/webget/Makefile \
conf/Makefile \
docs/Makefile \
docs/apis/Makefile \
docs/dtds/Makefile \
docs/examples/Makefile \
docs/manpages/Makefile \
docs/misc/Makefile \
docs/opsguide/frontspiece.xml \
docs/opsguide/Makefile \
docs/rivwebcapi/Makefile \
docs/stylesheets/Makefile \
docs/tables/Makefile \
importers/Makefile \
ios/Makefile \
ios/rmlsend/Makefile \
ios/rmlsend/Classes/Makefile \
ios/rmlsend/RMLSend.xcodeproj/Makefile \
rdadmin/Makefile \
ripcd/Makefile \
rdairplay/Makefile \
rdcartslots/Makefile \
rdcastmanager/Makefile \
rdcatch/Makefile \
rdcatchd/Makefile \
rdlibrary/Makefile \
rdlogin/Makefile \
rdlogedit/Makefile \
rdlogmanager/Makefile \
rdmonitor/Makefile \
rdpanel/Makefile \
rdrepld/Makefile \
rdpadd/Makefile \
rdpadengined/Makefile \
rdrssd/Makefile \
rdselect/Makefile \
rdservice/Makefile \
rdvairplayd/Makefile \
scripts/Makefile \
systemd/Makefile \
systemd/rivendell.service \
tests/Makefile \
utils/Makefile \
utils/rdalsaconfig/Makefile \
utils/rdautoback/Makefile \
utils/rdautocheck/Makefile \
utils/rdautorest/Makefile \
utils/rdcheckcuts/Makefile \
utils/rdcleandirs/Makefile \
utils/rdclilogedit/Makefile \
utils/rdcollect/Makefile \
utils/rdconvert/Makefile \
utils/rddbconfig/Makefile \
utils/rddbmgr/Makefile \
utils/rddelete/Makefile \
utils/rdexport/Makefile \
utils/rdgen/Makefile \
utils/rdgpimon/Makefile \
utils/rdimport/Makefile \
utils/rdmaint/Makefile \
utils/rdmarkerset/Makefile \
utils/rdmetadata/Makefile \
utils/rdpopup/Makefile \
utils/rdrender/Makefile \
utils/rdselect_helper/Makefile \
utils/rdsinglestart/Makefile \
utils/rdsoftkeys/Makefile \
utils/rmlsend/Makefile \
xdg/Makefile \
xdg/install_usermode.sh \
xdg/rdalsaconfig-root-consolehelper \
xdg/rddbconfig-root-consolehelper \
build_debs.sh \
])
AC_OUTPUT()
chmod 755 helpers/rdi18n_helper.sh
chmod 755 helpers/install_python.sh
chmod 755 xdg/install_usermode.sh
chmod 755 build_debs.sh
#
# Create symlinks in 'utils/rdselect_helper/'
#
rm -f utils/rdselect_helper/rd.h
ln -s ../../lib/rd.h utils/rdselect_helper/rd.h
rm -f utils/rdselect_helper/rdconfig.cpp
ln -s ../../lib/rdconfig.cpp utils/rdselect_helper/rdconfig.cpp
rm -f utils/rdselect_helper/rdconfig.h
ln -s ../../lib/rdconfig.h utils/rdselect_helper/rdconfig.h
rm -f utils/rdselect_helper/rdprofile.cpp
ln -s ../../lib/rdprofile.cpp utils/rdselect_helper/rdprofile.cpp
rm -f utils/rdselect_helper/rdprofile.h
ln -s ../../lib/rdprofile.h utils/rdselect_helper/rdprofile.h
#
# Configuration Results
#
AC_MSG_NOTICE()
AC_MSG_NOTICE("|---------------------------------------------------------|")
AC_MSG_NOTICE("| *** RIVENDELL CONFIGURATION SUMMARY *** |")
AC_MSG_NOTICE("|---------------------------------------------------------|")
AC_MSG_NOTICE("| Platform Information: |")
AC_MSG_NOTICE("$DISTRO_NAME")
AC_MSG_NOTICE("$DISTRO_FAMILY")
if test $I18N_ENABLED ; then
AC_MSG_NOTICE("| Update I18N Data ... Yes |")
else
AC_MSG_NOTICE("| Update I18N Data ... No |")
fi
AC_MSG_NOTICE("| |")
AC_MSG_NOTICE("| Configured Audio Drivers: |")
if test -z $USING_ALSA ; then
AC_MSG_NOTICE("| Advanced Linux Sound Architecture (ALSA) ... No |")
else
AC_MSG_NOTICE("| Advanced Linux Sound Architecture (ALSA) ... Yes |")
fi
if test -z $USING_HPI ; then
AC_MSG_NOTICE("| AudioScience HPI ... No |")
else
AC_MSG_NOTICE("| AudioScience HPI ... Yes |")
fi
if test -z $USING_JACK ; then
AC_MSG_NOTICE("| JACK Audio Connection Kit ... No |")
else
AC_MSG_NOTICE("| JACK Audio Connection Kit ... Yes |")
fi
AC_MSG_NOTICE("| |")
AC_MSG_NOTICE("| Audio Codecs: |")
if test -z $FLAC_FOUND ; then
AC_MSG_NOTICE("| FLAC Encoding/Decoding Support ... No |")
else
AC_MSG_NOTICE("| FLAC Encoding/Decoding Support ... Yes |")
fi
if test -z $USING_MAD ; then
AC_MSG_NOTICE("| MPEG Decoding Support ... No |")
else
AC_MSG_NOTICE("| MPEG Decoding Support ... Yes |")
fi
if test -z $USING_TWOLAME ; then
AC_MSG_NOTICE("| MPEG Layer 2 Encoding Support ... No |")
else
AC_MSG_NOTICE("| MPEG Layer 2 Encoding Support ... Yes |")
fi
if test -z $USING_LAME ; then
AC_MSG_NOTICE("| MPEG Layer 3 Encoding Support ... No |")
else
AC_MSG_NOTICE("| MPEG Layer 3 Encoding Support ... Yes |")
fi
if test -z $VORBIS_FOUND ; then
AC_MSG_NOTICE("| OggVorbis Encoding/Decoding Support ... No |")
else
AC_MSG_NOTICE("| OggVorbis Encoding/Decoding Support ... Yes |")
fi
if test -z $MP4V2_FOUND ; then
AC_MSG_NOTICE("| M4A Decoding Support ... No |")
else
AC_MSG_NOTICE("| M4A Decoding Support ... Yes |")
fi
AC_MSG_NOTICE("|---------------------------------------------------------|")
AC_MSG_NOTICE()
AC_MSG_NOTICE()
AC_MSG_NOTICE(Now enter 'make' to build the software.)
AC_MSG_NOTICE()