forked from MythTV/myththemes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·62 lines (53 loc) · 1.44 KB
/
configure
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
#!/bin/sh
#
# Configure script for myththemes
#
prefix="/usr/local"
sysroot=""
qmake="qmake"
for opt do
case "$opt" in
--prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
;;
--sysroot=*) sysroot=`echo $opt | cut -d '=' -f 2`
;;
--qmake=*) qmake=`echo $opt | cut -d '=' -f 2`
;;
esac
done
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
cat << EOF
Usage: configure [options]
Options: [defaults in brackets after descriptions]
Generic options:
--prefix=PREFIX MythTV install location PREFIX [$prefix]
--sysroot=SYSROOT sysroot location SYSROOT [$sysroot]
--qmake=QMAKE use specified qmake [$qmake]
--help print this message
EOF
exit 1
fi
# bring in mythtv config
if [ -e $sysroot$prefix/include/mythtv/mythconfig.mak ] ; then
rm mythconfig.mak 2> /dev/null
ln -s $sysroot$prefix/include/mythtv/mythconfig.mak mythconfig.mak
else
echo "ERROR: mythconfig.mak not found at $sysroot$prefix/include/mythtv/mythconfig.mak"
echo "Did you make AND install MythTV first?"
echo "Are you using the correct prefix ($prefix) and sysroot ($sysroot)?"
echo "Bailing out!!"
exit
fi
is_qmake4()
{
$1 --version 2>&1 | grep -q "Qt version 4"
}
if ! is_qmake4 $qmake; then
if is_qmake4 qmake-qt4; then
qmake=qmake-qt4
else
echo "qmake for Qt4 not found. Please specify the correct qmake with --qmake="
exit 1
fi
fi
${qmake} QMAKE=$(which ${qmake}) myththemes.pro