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