~ubuntu-branches/ubuntu/hardy/mplayerplug-in/hardy-proposed

« back to all changes in this revision

Viewing changes to whatoptions.sh

  • Committer: Bazaar Package Importer
  • Author(s): Adrien Cunin
  • Date: 2007-05-21 21:16:39 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070521211639-szqlzo6izljq9xa4
Tags: 3.40-4ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
   - debian/{control,mozilla-mplayer.links}: s/iceweasel/firefox/
   - debian/control: s/iceape/mozilla/
   - debian/mozilla-mplayer.links: removed mozilla->iceape symlinks
* Modify Maintainer value to match Debian-Maintainer-Field Spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
gtk1=no
3
3
gtk2=no
4
4
debian=no
 
5
fedora=no
5
6
geckosdk=yes
6
 
MOZ=`which mozilla`
7
 
MOZHOME=`grep MOZILLA_FIVE_HOME= ${MOZ} | awk  -F \" '{ print $2 }'`
8
 
if [ -z ${MOZHOME} ]; then MOZHOME=`grep moz_libdir= ${MOZ} | awk  -F \" '{ print $2 }'`; fi
9
 
if [ -z ${MOZHOME} ]; then MOZHOME=`grep moz_libdir= ${MOZ} | nawk  -F \= '{ print $2 }'`; fi
10
 
if [ -z ${MOZHOME} ]; then
11
 
    if [ -d /usr/lib/firefox ]; then
12
 
        debian=yes;
13
 
        MOZHOME=/usr/lib/firefox;
14
 
    elif [ -d /usr/lib/mozilla ]; then
15
 
        debian=yes;
16
 
        MOZHOME=/usr/lib/mozilla;
17
 
    else
18
 
        echo "Can't find MOZILLA HOME. Please install manually";
19
 
        exit 1;
20
 
    fi
21
 
fi
22
 
if [ ${MOZHOME} != "/usr/lib/firefox" ]; then
23
 
    if [ `ldd ${MOZHOME}/mozilla-bin | grep gtk-x11 | wc -l` != 0 ]; then gtk2=yes; fi
24
 
    if [ `ldd ${MOZHOME}/mozilla-bin | grep gtk-1 | wc -l` != 0 ]; then gtk1=yes; fi
25
 
else
26
 
    if [ `ldd ${MOZHOME}/firefox-bin | grep gtk-x11 | wc -l` != 0 ]; then gtk2=yes; fi;
27
 
fi
 
7
package=none
 
8
prefix=none
 
9
 
28
10
pkg-config --exists mozilla-plugin
29
 
if [ $? == 0 ]; then geckosdk=no; fi
 
11
if [ $? -eq 0 ]; then package=mozilla; geckosdk=no; fi
 
12
pkg-config --exists firefox-plugin
 
13
if [ $? -eq 0 ]; then package=firefox; geckosdk=no; fi
 
14
pkg-config --exists seamonkey-plugin
 
15
if [ $? -eq 0 ]; then package=seamonkey; geckosdk=no; fi
 
16
pkg-config --exists xulrunner-plugin
 
17
if [ $? -eq 0 ]; then package=xulrunner; geckosdk=no; fi
 
18
pkg-config --exists iceape-plugin
 
19
if [ $? -eq 0 ]; then package=iceape; geckosdk=no; fi
 
20
 
 
21
if [ ${package} != "none" ]; then
 
22
        # ok we have development packages, this is good
 
23
        #echo ${package}
 
24
        libdir=`pkg-config --variable=libdir ${package}-plugin`
 
25
        #echo ${libdir}
 
26
        prefix=`pkg-config --variable=prefix ${package}-plugin`
 
27
 
 
28
 
 
29
        if [ `ldd ${libdir}/${package}-bin | grep gtk-x11 | wc -l` != 0 ]; then gtk2=yes; fi
 
30
        if [ `ldd ${libdir}/${package}-bin | grep gtk-1 | wc -l` != 0 ]; then gtk1=yes; fi
 
31
 
 
32
 
 
33
else
 
34
        pkg-config --exists gtk+-2.0;
 
35
        if [ $? -eq 0 ]; then gtk2=yes; fi ;
 
36
        pkg-config --exists gtk+;
 
37
        if [ $? -eq 0 ]; then gtk1=yes; fi ;
 
38
 
 
39
 
 
40
        
 
41
fi
 
42
 
 
43
# Detecting GNU/Linux distribution
 
44
if [ -f /etc/debian_version ]; then
 
45
        debian=yes;
 
46
        if [ -d /usr/lib/iceweasel ]; then 
 
47
                MOZ_HOME=/usr/lib/iceweasel;
 
48
        elif [ -d /usr/lib/firefox ]; then 
 
49
                MOZ_HOME=/usr/lib/firefox;
 
50
        elif [ -d /usr/lib/mozilla ]; then
 
51
                MOZ_HOME=/usr/lib/mozilla;
 
52
        elif [ -d /usr/lib/iceape ]; then
 
53
                MOZ_HOME=/usr/lib/iceape;
 
54
        fi
 
55
fi 
 
56
 
 
57
#echo "GTK2 = ${gtk2}"
 
58
#echo "GTK1 = ${gtk1}"
 
59
#echo "geckosdk = ${geckosdk}"
30
60
 
31
61
echo "Run configure with the following options"
32
62
echo ""
33
63
echo -n "./configure"
 
64
if [ $prefix != none ]; then echo -n " --prefix=${prefix}"; fi
34
65
if [ $gtk1 == yes ]; then echo -n " --enable-gtk1"; fi
35
66
if [ $gtk2 == no -a $gtk1 == no ]; then echo -n " --enable-x"; fi
36
 
if [ $debian == yes ]; then echo -n " --with-mozilla-home={/usr/lib/mozilla or /usr/lib/firefox}"; fi
 
67
if [ $debian == yes ]; then 
 
68
        echo -n " --with-mozilla-home=${MOZ_HOME}"; 
 
69
else
 
70
        echo;
 
71
        echo;
 
72
        echo "Optional: --with-mozilla-home=${libdir}";
 
73
fi
37
74
if [ $geckosdk == yes ]; then echo " --with-gecko-sdk={path to gecko sdk}"; echo ; echo "You need to install the gecko-sdk"; fi
38
75
echo 
39
 
 
40
 
 
41