source:
git/libpolys/libpolys-config.in
@
276a00
Last change on this file since 276a00 was 276a00, checked in by , 10 years ago | |
---|---|
|
|
File size: 1.6 KB |
Rev | Line | |
---|---|---|
[148d3c] | 1 | #! /bin/bash |
[c5917f1] | 2 | |
[b89c22f] | 3 | #C="$0" |
4 | #O=`pwd` | |
5 | # | |
6 | ###C=`readlink -f "$C"`::: | |
7 | #cd `dirname "$C"` | |
8 | #C=`basename "$C"` | |
9 | # | |
10 | ## Iterate down a (possible) chain of symlinks | |
11 | #while [ -L "$C" ] | |
12 | #do | |
13 | # C=`readlink "$C"` | |
14 | # cd `dirname "$C"` | |
15 | # C=`basename "$C"` | |
16 | #done | |
17 | # | |
18 | #cd `dirname "$C"` | |
19 | #C=`pwd` | |
20 | #C=`dirname "$C"` | |
21 | #C=`ls -d1 "$C"` | |
22 | # | |
23 | #cd "$O" | |
[3940139] | 24 | |
25 | # NOTE: if you moved this config please either use the above or | |
26 | # make sure the following variables are up to date | |
[b89c22f] | 27 | #prefix="$C" |
28 | #exec_prefix=${prefix} | |
29 | #includedir=${prefix}/include | |
30 | #libdir=${exec_prefix}/lib | |
31 | ||
32 | prefix=@prefix@ | |
[0955dc] | 33 | exec_prefix=@exec_prefix@ |
34 | ||
[b89c22f] | 35 | includedir=@includedir@ |
36 | libdir=@libdir@ | |
[c5917f1] | 37 | |
[148d3c] | 38 | ECHO="echo" |
39 | ECHOn="printf" | |
40 | ||
[c5917f1] | 41 | usage() |
42 | { | |
43 | cat <<EOF | |
44 | Usage: libpolys-config [OPTION] | |
45 | ||
46 | Known values for OPTION are: | |
47 | ||
48 | --prefix show libpolys installation prefix | |
49 | --libs print library linking information | |
50 | --cflags print pre-processor and compiler flags | |
51 | --help display this help and exit | |
52 | --version output version information | |
53 | ||
54 | EOF | |
55 | ||
56 | exit $1 | |
57 | } | |
58 | ||
59 | if test $# -eq 0; then | |
60 | usage 1 | |
61 | fi | |
62 | ||
63 | cflags=false | |
64 | libs=false | |
65 | ||
66 | while test $# -gt 0; do | |
67 | case "$1" in | |
[148d3c] | 68 | -*=*) optarg=`${ECHO} "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
[c5917f1] | 69 | *) optarg= ;; |
70 | esac | |
71 | ||
72 | case "$1" in | |
73 | --prefix=*) | |
74 | prefix=$optarg | |
75 | ;; | |
76 | ||
77 | --prefix) | |
[148d3c] | 78 | ${ECHO} $prefix |
[c5917f1] | 79 | ;; |
80 | ||
81 | --version) | |
[148d3c] | 82 | ${ECHO} @VERSION@ |
[c5917f1] | 83 | exit 0 |
84 | ;; | |
85 | ||
86 | --help) | |
87 | usage 0 | |
88 | ;; | |
89 | ||
90 | --cflags) | |
[276a00] | 91 | ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FACTORY_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@ " |
[458fe5] | 92 | ;; |
93 | ||
[c5917f1] | 94 | --libs) |
[276a00] | 95 | ${ECHOn} " -L${libdir} -lpolys" |
[c5917f1] | 96 | ;; |
97 | ||
98 | *) | |
99 | usage | |
100 | exit 1 | |
101 | ;; | |
102 | esac | |
103 | shift | |
104 | done | |
[148d3c] | 105 | ${ECHO} |
[c5917f1] | 106 | |
107 | exit 0 |
Note: See TracBrowser
for help on using the repository browser.