jengelh-datetimespielwiese
Last change
on this file since 76f3a18 was
76f3a18,
checked in by Oleksandr Motsak <motsak@…>, 11 years ago
|
added building binary programs from IntegerProgramming: toric_ideal, solve_IP, change_cost, gen_test and LLL
ADD: IntegerProgramming is a SUBPACKAGE of the main package
CHG: removing obsolette stuff (gccversion.sh)
CHG: use gmp.h instead of si_gmp.h!
TODO: install help files properly (only distributed for now)
|
-
Property mode set to
100755
|
File size:
690 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # |
---|
3 | # FILE: gccversion |
---|
4 | # USAGE: gccversion |
---|
5 | # PURPOSE: creates si_gcc_v.h with SI_GCC2 or SI_GCC_3 defined |
---|
6 | # AUTHOR: hannes |
---|
7 | # CREATED: June 2008 |
---|
8 | # |
---|
9 | ##################################################### |
---|
10 | |
---|
11 | if test "x$CC" = x |
---|
12 | then |
---|
13 | CC=cc |
---|
14 | fi |
---|
15 | cat >tmp.c <<EOF |
---|
16 | #include <stdio.h> |
---|
17 | int main() { |
---|
18 | FILE *f=fopen("si_gcc_v.h","w"); |
---|
19 | #ifdef __GNUC__ |
---|
20 | char *p=__VERSION__; |
---|
21 | if (p[0]=='2') fprintf(f,"#define SI_GCC2\n"); |
---|
22 | else if ((p[0]=='3')||(p[0]=='4')) fprintf(f,"#define SI_GCC3\n"); |
---|
23 | #endif |
---|
24 | fclose(f); |
---|
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 |
---|
37 | touch si_gcc_v.h |
---|
Note: See
TracBrowser
for help on using the repository browser.