fieker-DuValspielwiese
Last change
on this file since 66b5b8 was
66b5b8,
checked in by Hans Schönemann <hannes@…>, 18 years ago
|
*hannes: solaris port
git-svn-id: file:///usr/local/Singular/svn/trunk@8916 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100755
|
File size:
609 bytes
|
Rev | Line | |
---|
[35aab3] | 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 | |
---|
[66b5b8] | 11 | if test "x$CC" = x |
---|
[35aab3] | 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') 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 -e ./a.out; then |
---|
| 29 | ./a.out |
---|
| 30 | /bin/rm -f a.out tmp.c |
---|
| 31 | elif test -e 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.