4d00ac0532c8862d8aed9cf15ce6725876ac80e3
[p5sagit/p5-mst-13.2.git] / symbian / sanity.pl
1 use strict;
2
3 if (exists $ENV{'!C:'}) {
4   print "You are running this under Cygwin, aren't you? (found '!C' in %ENV)\n";
5   print "Are you perhaps using Cygwin Perl? (\$^O is '$^O')\n" if $^O =~ /cygwin/;
6   print "I'm sorry but only cmd.exe will work.\n";
7   exit(1);
8 }
9
10 if (# S60 2.x or S80 2.x
11     $ENV{PATH} !~ m!\\program files\\common files\\symbian\\tools!i
12     &&
13     # S60 1.2
14     $ENV{PATH} !~ m!\\symbian\\6.1\\shared\\epoc32\\tools!i
15     &&
16     # UIQ
17     $ENV{PATH} !~ m!\\symbian\\uiq.+?\\epoc32!i
18     ) {
19   print "I do not think you have installed the Symbian SDK.\n";
20   exit(1);
21 }
22
23 unless (-f "symbian/symbianish.h") {
24   print "You must run this in the top level directory.\n";
25   exit(1);
26 }
27
28 if ($] < 5.008) {
29   print "You must configure with Perl 5.8 or later.\n";
30   exit(1);
31 }
32
33 1;