fieker-DuValspielwiese
Last change
on this file since c8c436 was
dae1ed,
checked in by Hans Schönemann <hannes@…>, 16 years ago
|
*hannes: sh on sun: no -e
git-svn-id: file:///usr/local/Singular/svn/trunk@10432 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100755
|
File size:
624 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # |
---|
3 | # FILE: gccversion |
---|
4 | # USAGE: gccversion |
---|
5 | # PURPOSE: prints to stdout the gcc version type |
---|
6 | # AUTHOR: hannes |
---|
7 | # CREATED: May 2003 |
---|
8 | # |
---|
9 | ##################################################### |
---|
10 | |
---|
11 | if test "x$CC" = x |
---|
12 | then |
---|
13 | CC=cc |
---|
14 | fi |
---|
15 | cat >tmp.c <<EOF |
---|
16 | int main() { |
---|
17 | #ifdef __GNUC__ |
---|
18 | char *p=__VERSION__; |
---|
19 | if (p[0]=='2') printf("gcc2\n"); |
---|
20 | else if ((p[0]=='3')||(p[0]=='4')) printf("gcc3\n"); |
---|
21 | else printf("gcc_unknown\n"); |
---|
22 | #else |
---|
23 | printf("unknown\n"); |
---|
24 | #endif |
---|
25 | exit(0); } |
---|
26 | EOF |
---|
27 | $CC tmp.c |
---|
28 | if test -f ./a.out; then |
---|
29 | ./a.out |
---|
30 | /bin/rm -f a.out tmp.c |
---|
31 | elif test -f a.exe; then |
---|
32 | ./a.exe |
---|
33 | /bin/rm -f tmp.c a.exe |
---|
34 | else |
---|
35 | echo run_unknown |
---|
36 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.