summaryrefslogtreecommitdiff
path: root/ychat-0.7.0/configure
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-04-06 13:14:41 +0200
committerPaul Buetow <paul@buetow.org>2013-04-06 13:14:41 +0200
commit9cd3ccffd5372dfde3af478e3f832f18db4be3f1 (patch)
tree631c295a4a4a16b57502b847626763a279bf6df7 /ychat-0.7.0/configure
parent13aaf70af703748fe096e0664c305cd202637ad2 (diff)
tagging tags
Diffstat (limited to 'ychat-0.7.0/configure')
-rwxr-xr-xychat-0.7.0/configure51
1 files changed, 51 insertions, 0 deletions
diff --git a/ychat-0.7.0/configure b/ychat-0.7.0/configure
new file mode 100755
index 0000000..0f9f844
--- /dev/null
+++ b/ychat-0.7.0/configure
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+if ! which perl >/dev/null
+then
+ echo You need to have Perl in your PATH
+ exit 1
+fi
+
+perl -e '
+ use strict;
+ $|=1;
+ sub check {
+ my $f = shift;
+ my $s = shift;
+ my $r = 0;
+ print "Checking for GNU G++ $f.$s\n";
+ if ( `g++ -v 2> g++.version && tail -n 1 g++.version` =~ / $f\.$s/ ) {
+ `echo $f.$s >> g++.version`;
+ `echo g++ >> g++.version`;
+ $r = 1;
+ } else {
+ if (`g++$f$s -v 2> g++.version && tail -n 1 g++.version` =~ / $f\.$s/) {
+ `echo $f.$s >> g++.version`;
+ `echo g++$f$s >> g++.version`;
+ $r = 1;
+ }
+ }
+ print "No " if $r == 0;
+ print "GNU G++ $f.$s found!\n";
+ return $r;
+ }
+ print "Checking compiler version\n";
+ my $r = 0;
+ for (my $i = 4; $i > 0 && $r == 0; --$i ) {
+ $r = &check(3,$i);
+ }
+ if ($r == 0) {
+ print "No suitable g++ compiler found!\n";
+ print "Please install a right version of GNU G++!\n";
+ exit(1);
+ }
+
+ system("sh -c \"scripts/config.sh\"");
+ chdir("src");
+ system("./configure ".join(" ", @ARGV));
+ chdir("..");
+
+ exit(0);
+' `echo "$*" | sed "s/-//g"`
+
+echo You are ready to type gmake now!