~ubuntu-branches/ubuntu/dapper/gnupod-tools/dapper

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
AC_INIT(GNUpod, 0.98.3, bug-gnupod@nongnu.org)

echo $ECHO_N $PACKAGE_VERSION > .gnupod_version

if test -d CVS; then
 echo " *** THIS IS A CVS VERSION OF GNUPOD ***"
 echo $ECHO_N "-CVS" >> .gnupod_version
fi

AC_PATH_PROGS(PERL, perl-5.8 perl-5.6 perl)


if test $PERL; then
echo "GNUpod will use $PERL"
else
echo "** Unable to find an usable Perl binary"
echo "** Please install Perl 5.6 or a newer version"
exit 1
fi

dnl Basic modules
ALL_MODULES="Digest::MD5 XML::Parser Unicode::String MP3::Info File::Copy"
OPT_MODULES="Audio::FLAC::Header Ogg::Vorbis::Header::PurePerl"

dnl Ugly check for modules
IFS=" "
for i in $ALL_MODULES
do

 echo -n "checking for $i..."
 $PERL -e "use $i" 2> /dev/null
 if test $? = 0; then
  echo " ok"
 else
  echo " failed!"
  echo "** You need to install $i"
  echo "** Visit <http://search.cpan.org> to get the module"
  echo "** Or try this:"
  echo "# perl -MCPAN -e 'install $i'"
  exit 1
 fi
done

for i in $OPT_MODULES
do

 echo -n "checking for optional $i..."
 $PERL -e "use $i" 2> /dev/null
 if test $? = 0; then
  echo " ok"
 else
  echo " failed!"
  echo "** $i not found. You can install it using this command:"
  echo "** # perl -MCPAN -e 'install $i'"
  echo "** ..but GNUpod will also work without $i"
  echo
 fi
done

#Test if user installed both
 $PERL -e "use Audio::FLAC" 2> /dev/null
 if test $? = 0; then
   echo "NOTE: 'Audio::FLAC' is installed, looks like this module is"
   echo "      depricated and got renamed into 'Audio::FLAC::Header'"
   echo "      GNUpod still works with 'Audio::FLAC' but maybe it would"
   echo "      be a good idea to replace the 'Audio::FLAC' installation"
   echo "      with 'Audio::FLAC::Header'"
 fi



$PERL -e "use MP3::Info; exit(1) if(\$MP3::Info::VERSION < 1.01); exit(0);"
 if test $? = 0; then
echo "installed version of MP3::Info looks good"
 else
  echo " ** PLEASE UPGRADE MP3::Info TO VERSION 1.01 OR NEWER ** "
  echo " ** YOU CAN USE GNUPOD WITH YOUR CURRENT VERSION BUT  ** "
  echo " ** UTF8 SUPPORT FOR MP3 FILES WILL BE BROKEN !       **"
 fi

AC_SUBST(PERL)
AC_OUTPUT(Makefile)

echo
echo
echo "Settings:"
echo
echo $ECHO_N "Release:        "
 cat .gnupod_version
echo

echo $ECHO_N "Perl Version:   "
 $PERL tools/getVERSION.pl
echo


echo    "Prefix:         $prefix";

echo $ECHO_N "Perl INC:       "
 $PERL tools/getINC.pl
 XPINC=`$PERL tools/getINC.pl`;
echo


echo
echo "-> use 'make install' to install $PACKAGE_NAME"
echo "-> use 'info $PACKAGE_NAME' to read the documentation after you installed $PACKAGE_NAME"
echo "-> use 'make uninstall' to remove $PACKAGE_NAME from $prefix"