99
If you think configure made a mistake, make sure that you are using the latest
100
version of MythTV from git. If the latest version fails, report the problem to the
101
mythtv-dev@mythtv.org mailing list or IRC #mythtv on irc.freenode.net
104
Include the log file "$logfile" produced by configure as this will help
113
eval "$var=\"\$$var $*\""
119
eval "$var=\"$* \$$var\""
124
"$@" >> $logfile 2>&1
130
filter_cxxppflags=echo
136
check_cmd $CC $CPPFLAGS $CFLAGS "$@" -c -o $TMPO $TMPC
143
check_cmd $CC $CPPFLAGS $CFLAGS "$@" -E -o $TMPO $TMPC
151
test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f"
153
check_cc $($filter_cflags $flags) || return
154
check_cmd $LD $LDFLAGS $flags -o $TMPE $TMPO $libs
158
log check_header "$@"
173
int main(void){ $func(); }
177
check_func_headers(){
178
log check_func_headers "$@"
183
for hdr in $headers; do
189
int main(int argc, char **argv){
200
check_header $header && check_func $func "$@"
208
check_func_headers "$headers" $func "$@"
213
log check_header_cxx "$@"
227
append ECXXFLAGS "$@"
234
check_cmd $CXX $CXXPPFLAGS $ECXXFLAGS "$@" -c -o $TMPO $TMPCXX
238
log check_ld_cxx "$@"
242
test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f"
244
check_cxx $($filter_cxxflags $flags) || return
245
check_cmd $CXX $LDFLAGS $flags -o $TMPE $TMPO $libs
249
log check_func_cxx "$@"
253
disable $(echo $func | sed -e 's/:://g')
254
check_ld_cxx "$@" <<EOF
256
int main(void){ $func(); }
261
log check_lib_cxx "$@"
265
check_header_cxx $header && check_func_cxx $func $header "$@"
96
269
# default parameters for all plugins
282
# set temporary file name
283
if test ! -z "$TMPDIR" ; then
285
elif test ! -z "$TEMPDIR" ; then
291
TMPC="${TMPDIR1}/myth-comp-${RANDOM}-$$-${RANDOM}.c"
292
TMPE="${TMPDIR1}/myth-conf-${RANDOM}-$$-${RANDOM}"
297
if test -f /etc/ld.so.conf ; then
298
LIBPATHS=`cat /etc/ld.so.conf | grep -v "#" | grep -v "include"`
303
LIBPATHS="$LIBPATHS `echo $LD_LIBRARY_PATH | sed s/':'/' '/g` "
304
# Mac OS X has a different variable for this:
305
LIBPATHS="$LIBPATHS `echo $DYLD_LIBRARY_PATH | sed s/':'/' '/g` "
307
# recurse down just one level, should be enough in most cases
308
if test -f /etc/ld.so.conf ; then
309
INCL=`cat /etc/ld.so.conf | grep -v "#" | grep "^include"`
310
SRCH=`echo "$INCL" | sed '{ s/^include \//\//; s/^include /\/etc\//}'`
312
LP_APPEND=`cat $x | grep -v "#" | grep -v "^include"`
313
LIBPATHS="$LIBPATHS $LP_APPEND"
317
LIBPATHS="`echo $LIBPATHS $prefix/$libdir_name $sysroot/$libdir_name $sysroot/usr/$libdir_name $sysroot/usr/local/$libdir_name $sysroot/usr/X11R6/$libdir_name | sed s/'\/ '/' '/g` "
320
for LIBPATH in $LIBPATHS ; do
321
if test x`ls $LIBPATH/$1* 2> /dev/null | head -n 1` != x"" ; then
325
expr $HAS_IT : "yes" > /dev/null
330
HPATHS="$prefix/include $sysroot/usr/local/include $sysroot/usr/include $sysroot/usr/include/g++-v3 $sysroot/usr/X11R6/include $sysroot/"
331
INCL=`echo $DYLD_LIBRARY_PATH $LD_LIBRARY_PATH | sed s/':'/' '/g`
332
HPATHS="$HPATHS `echo $INCL | sed s/$libdir_name/include/g` "
335
for HPATH in $HPATHS ; do
336
if test x`ls $HPATH/$1* 2> /dev/null | head -n 1` != x"" ; then
340
expr $HAS_IT : "yes" > /dev/null
344
462
log check_py_lib "$@"
345
464
check_cmd $python <<EOF
346
465
from distutils.sysconfig import get_python_lib
348
467
sys.path.append(get_python_lib(prefix='${prefix}'))
349
468
#sys.path.append('debian/libmyth-python/usr/lib/python2.6/dist-packages')
477
# set temporary file name
478
: ${TMPDIR:=$TEMPDIR}
482
if ! check_cmd type mktemp; then
483
# simple replacement for missing mktemp
484
# NOT SAFE FOR GENERAL USE
486
echo "${2%XXX*}.${HOSTNAME}.${UID}.$$"
491
tmp=$(mktemp -u "${TMPDIR}/mythplugins_conf.XXXXXXXX")$2 &&
492
(set -C; exec > $tmp) 2>/dev/null ||
493
die "Unable to create temporary file in $TMPDIR."
498
trap 'rm -f -- $TMPFILES' EXIT
499
trap exit HUP INT TERM
514
# make sure we can execute files in $TMPDIR
515
cat > $TMPSH 2>> $logfile <<EOF
518
chmod +x $TMPSH >> $logfile 2>&1
519
if ! $TMPSH >> $logfile 2>&1; then
521
Unable to create and execute files in $TMPDIR. Set the TMPDIR environment
522
variable to another directory and make sure that it is not mounted noexec.
524
die "Sanity test failed."
359
528
$1 --version 2>&1 | egrep -q -e "Qt version 4\.[5-9]\.[0-9]"
531
# bring in mythtv config
532
if [ -e $mythroot$prefix/include/mythtv/mythconfig.mak ] ; then
533
rm mythconfig.mak 2> /dev/null
534
cp $mythroot$prefix/include/mythtv/mythconfig.mak mythconfig.mak
535
sed -i -e "s,^SYSROOT\=.*,SYSROOT=$mythroot,g" mythconfig.mak
536
elif [ -e $prefix/include/mythtv/mythconfig.mak ] ; then
537
rm mythconfig.mak 2> /dev/null
538
${ln_s} $prefix/include/mythtv/mythconfig.mak mythconfig.mak
540
echo "ERROR: mythconfig.mak not found at $prefix/include/mythtv/mythconfig.mak"
541
echo "Did you make AND install MythTV first?"
542
echo "Are you using the correct prefix ($prefix)?"
547
#Set build env variables according to mythconfig.mak
548
LD=$(cat mythconfig.mak | grep -e "^LD=")
550
CC=$(cat mythconfig.mak | grep -e "^CC=")
552
CFLAGS=$(cat mythconfig.mak | grep -e "^CFLAGS=")
553
CFLAGS=${CFLAGS#CFLAGS=}
554
CPPFLAGS=$(cat mythconfig.mak | grep -e "^CPPFLAGS=")
555
CPPFLAGS=${CPPFLAGS#CPPFLAGS=}
556
LDFLAGS=$(cat mythconfig.mak | grep -e "^LDFLAGS=")
557
LDFLAGS=${LDFLAGS#LDFLAGS=}
558
CXX=$(cat mythconfig.mak | grep -e "^QMAKE_CXX=")
559
CXX=${CXX#QMAKE_CXX=}
560
ECXXFLAGS=$(cat mythconfig.mak | grep -e "^ECXXFLAGS=")
561
ECXXFLAGS=${ECXXFLAGS#ECXXFLAGS=}
562
CXXPPFLAGS=$(cat mythconfig.mak | grep -e "^CXXPPFLAGS=")
563
CXXPPFLAGS=${CXXPPFLAGS#CXXPPFLAGS=}
564
OPENGLV=$(cat mythconfig.mak | grep -e "^CONFIG_OPENGL_VIDEO=yes")
362
566
if ! is_qmake4 $qmake; then
363
is_qmake4 qmake-qt4 && qmake=qmake-qt4 || die "qmake for Qt4.5 or newer not found.\nPlease specify the correct qmake with --qmake="
366
if ! expr $($qmake -query QT_VERSION) : "4\.[5-9]\.[0-9]" >/dev/null; then
367
die "Qt4.5 or newer is required to build MythTV."
370
if test "$opengl" != "no" ; then
372
if has_library libGL ; then
375
if test -f $sysroot/System/Library/Frameworks/AGL.framework/Versions/A/AGL ; then
378
if test "`echo ${targetos} | cut -c1-5`" = "MINGW" ; then
383
if ! disabled fftw; then
385
if has_library libfftw3_threads ; then
386
if has_header fftw3.h ; then
392
if test "$exif" != "no" ; then
394
if has_library libexif ; then
395
if has_header libexif/exif-data.h ; then
401
if ! disabled netvision; then
567
is_qmake4 qmake-qt4 && qmake=qmake-qt4 || die "qmake for Qt4.6 or newer not found.\nPlease specify the correct qmake with --qmake="
570
if ! expr $($qmake -query QT_VERSION) : "4\.[6-9]\.[0-9]" >/dev/null; then
571
die "Qt4.6 or newer is required to build MythTV."
574
# rely on what was discover during MythTV configure
575
if enabled opengl && test "$OPENGLV" != "CONFIG_OPENGL_VIDEO=yes"; then
579
#Test if fftw_lib3 is available
580
if enabled fftw &&! check_lib2 fftw3.h fftw_init_threads -lfftw3_threads -lfftw3f -lfftw3 ; then
584
if ! check_lib libexif/exif-data.h exif_loader_new -lexif ; then
588
if enabled netvision; then
402
589
disable_netvision(){
404
591
echo "MythNetvision requires the $msg"
461
if test "$music" != "no" ; then
463
if has_header ogg/ogg.h && has_header vorbis/vorbisenc.h && has_header vorbis/vorbisfile.h && has_header vorbis/codec.h && has_library libogg && has_library libvorbisfile && has_library libvorbisenc && has_library libvorbis ; then
646
if enabled music ; then
647
if ! check_lib vorbis/codec.h vorbis_info_init -lvorbis || ! check_lib vorbis/vorbisenc.h vorbis_encode_setup_vbr -lvorbisenc -lvorbis -logg ; then
466
649
echo "MythMusic requires vorbis."
470
if has_header FLAC/all.h && has_library libFLAC ; then
652
if ! check_lib FLAC/all.h FLAC__stream_decoder_new -lFLAC ;then
473
654
echo "MythMusic requires FLAC."
476
if test "$cdio" != "no" ; then
478
if has_header cdio/cdio.h && has_library libcdio && has_library libcdio_cdda && has_library libcdio_paranoia ; then
657
if ! check_lib cdio/cdio.h cdio_open -lcdio || ! check_lib cdio/cdda.h cdio_cddap_open -lcdio_cdda || ! check_lib cdio/paranoia.h cdio_paranoia_init -lcdio_paranoia ; then
484
if has_header lame/lame.h && has_library libmp3lame ; then
661
if ! check_lib lame/lame.h lame_init -lmp3lame ; then
487
663
echo "MythMusic requires the LAME mp3 encoder."
491
667
if test x`which taglib-config` != x"" ; then
492
668
taglib_minor=`taglib-config --version | cut -d. -f2`
493
669
if test x"$taglib_minor" = x"" ; then
494
670
echo "Can't find taglib-config. Assuming 1.6 or later."
673
tagprefix=`taglib-config --prefix`
674
add_cxxflags "-I${tagprefix}/include"
675
add_ldflags "-L${tagprefix}/lib"
499
if has_library libtag && has_header taglib/fileref.h && test $taglib_minor -ge 6 ; then
678
if test $taglib_minor -lt 6 || ! check_lib_cxx taglib/fileref.h TagLib::FileRef -ltag -lz ; then
502
680
echo "MythMusic requires taglib 1.6 or later."
505
if test "$vorbis" = "no" -o "$flac" = "no" -o "$mp3lame" = "no" -o "$taglib" = "no" ; then
683
if disabled vorbis || disabled flac || disabled mp3lame || disabled taglib ; then
506
684
echo "Disabling MythMusic due to missing dependencies."
511
if test "$zoneminder" != "no" ; then
512
if has_header mysql/mysql.h ; then
689
if enabled zoneminder ; then
690
if ! check_header mysql/mysql.h ; then
515
691
echo "Disabling MythZoneMinder. Requires mysql/mysql.h header"
563
721
echo "# (manual modifications will be overwritten)" >> ./config.pro
564
722
echo "#" >> ./config.pro
566
if test "$archive" = "yes" ; then
724
if enabled archive ; then
567
725
echo " MythArchive plugin will be built"
568
726
echo "SUBDIRS += mytharchive" >> ./config.pro
570
728
echo " MythArchive plugin will not be built"
573
if test "$browser" = "yes" ; then
731
if enabled browser ; then
574
732
echo " MythBrowser plugin will be built"
575
733
echo "SUBDIRS += mythbrowser" >> ./config.pro
577
735
echo " MythBrowser plugin will not be built"
580
if test "$gallery" = "yes" ; then
738
if enabled gallery ; then
581
739
echo " MythGallery plugin will be built"
582
740
echo "SUBDIRS += mythgallery" >> ./config.pro
584
742
echo " MythGallery plugin will not be built"
587
if test "$game" = "yes" ; then
745
if enabled game ; then
588
746
echo " MythGame plugin will be built"
589
747
echo "SUBDIRS += mythgame" >> ./config.pro
591
749
echo " MythGame plugin will not be built"
594
if test "$music" = "yes" ; then
752
if enabled music ; then
595
753
echo " MythMusic plugin will be built"
596
754
echo "SUBDIRS += mythmusic" >> ./config.pro
598
756
echo " MythMusic plugin will not be built"
601
if test "$netvision" = "yes" ; then
759
if enabled netvision ; then
602
760
echo " MythNetvision plugin will be built"
603
761
echo "SUBDIRS += mythnetvision" >> ./config.pro
605
763
echo " MythNetvision plugin will not be built"
608
if test "$news" = "yes" ; then
766
if enabled news ; then
609
767
echo " MythNews plugin will be built"
610
768
echo "SUBDIRS += mythnews" >> ./config.pro
612
770
echo " MythNews plugin will not be built"
615
if test "$weather" = "yes" ; then
773
if enabled weather ; then
616
774
echo " MythWeather plugin will be built"
617
775
echo "SUBDIRS += mythweather" >> ./config.pro
619
777
echo " MythWeather plugin will not be built"
622
if test "$zoneminder" = "yes" ; then
780
if enabled zoneminder ; then
623
781
echo " MythZoneMinder plugin will be built"
624
782
echo "SUBDIRS += mythzoneminder" >> ./config.pro