fieker-DuValspielwiese
Last change
on this file since a1b1dd was
35aab3,
checked in by Hans Schönemann <hannes@…>, 21 years ago
|
This commit was generated by cvs2svn to compensate for changes in r6879,
which included commits to RCS files with non-trunk default branches.
git-svn-id: file:///usr/local/Singular/svn/trunk@6880 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100755
|
File size:
607 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') 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.