source:
git/libsingular-config.in
Last change on this file was 244674, checked in by , 2 years ago | |
---|---|
|
|
File size: 1.6 KB |
Rev | Line | |
---|---|---|
[584f6b0] | 1 | #! /bin/bash |
2 | ||
[b89c22f] | 3 | #C="$0" |
4 | #O=`pwd` | |
5 | # | |
6 | ###C=`readlink -f "$C"`::: | |
7 | #cd `dirname "$C"` | |
8 | #C=`basename "$C"` | |
9 | # | |
[75f460] | 10 | ## Iterate down a (possible) chain of symlinks |
11 | #while [ -L "$C" ] | |
12 | #do | |
[b89c22f] | 13 | # C=`readlink "$C"` |
14 | # cd `dirname "$C"` | |
15 | # C=`basename "$C"` | |
16 | #done | |
17 | # | |
[75f460] | 18 | #cd `dirname "$C"` |
[b89c22f] | 19 | #C=`pwd` |
20 | #C=`dirname "$C"` | |
21 | #C=`ls -d1 "$C"` | |
22 | # | |
23 | #cd "$O" | |
[882d5f] | 24 | |
[3940139] | 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 | ||
[75f460] | 32 | prefix=@prefix@ |
[0955dc] | 33 | exec_prefix=@exec_prefix@ |
34 | ||
[b89c22f] | 35 | includedir=@includedir@ |
36 | libdir=@libdir@ | |
[584f6b0] | 37 | |
38 | ECHO="echo" | |
39 | ECHOn="printf" | |
40 | ||
41 | usage() | |
42 | { | |
43 | cat <<EOF | |
[bf701ae] | 44 | Usage: libsingular-config [OPTION] |
[584f6b0] | 45 | |
46 | Known values for OPTION are: | |
47 | ||
[75f460] | 48 | --prefix show libsingular installation prefix |
[584f6b0] | 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 | |
68 | -*=*) optarg=`${ECHO} "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
69 | *) optarg= ;; | |
70 | esac | |
71 | ||
72 | case "$1" in | |
73 | --prefix=*) | |
74 | prefix=$optarg | |
75 | ;; | |
76 | ||
77 | --prefix) | |
78 | ${ECHO} $prefix | |
79 | ;; | |
80 | ||
81 | --version) | |
82 | ${ECHO} @VERSION@ | |
83 | exit 0 | |
84 | ;; | |
85 | ||
86 | --help) | |
87 | usage 0 | |
88 | ;; | |
89 | ||
90 | --cflags) | |
[75f460] | 91 | #### @FACTORY_INCLUDES@ |
[244674] | 92 | ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FLINT_CFLAGS@ @NTL_CPPFLAGS@ @GMP_CPPFLAGS@ " |
[458fe5] | 93 | ;; |
94 | ||
[584f6b0] | 95 | --libs) |
[14c01e] | 96 | ${ECHOn} " -L${libdir} -lSingular -lpolys -lsingular_resources -lfactory -lomalloc @USEPPROCSDYNAMICLD@" |
[584f6b0] | 97 | ;; |
98 | ||
99 | *) | |
100 | usage | |
101 | exit 1 | |
102 | ;; | |
103 | esac | |
104 | shift | |
105 | done | |
106 | ${ECHO} | |
107 | ||
108 | exit 0 |
Note: See TracBrowser
for help on using the repository browser.