source:
git/libpolys/libpolys-config.in
@
06df101
Last change on this file since 06df101 was e0ae1c, checked in by , 13 years ago | |
---|---|
|
|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[148d3c] | 1 | #! /bin/bash |
[c5917f1] | 2 | |
3 | prefix=@prefix@ | |
4 | exec_prefix=@exec_prefix@ | |
5 | includedir=@includedir@ | |
6 | libdir=@libdir@ | |
7 | ||
[148d3c] | 8 | ECHO="echo" |
9 | ECHOn="printf" | |
10 | ||
[c5917f1] | 11 | usage() |
12 | { | |
13 | cat <<EOF | |
14 | Usage: libpolys-config [OPTION] | |
15 | ||
16 | Known values for OPTION are: | |
17 | ||
18 | --prefix show libpolys installation prefix | |
19 | --libs print library linking information | |
20 | --cflags print pre-processor and compiler flags | |
21 | --help display this help and exit | |
22 | --version output version information | |
23 | ||
24 | EOF | |
25 | ||
26 | exit $1 | |
27 | } | |
28 | ||
29 | if test $# -eq 0; then | |
30 | usage 1 | |
31 | fi | |
32 | ||
33 | cflags=false | |
34 | libs=false | |
35 | ||
36 | while test $# -gt 0; do | |
37 | case "$1" in | |
[148d3c] | 38 | -*=*) optarg=`${ECHO} "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
[c5917f1] | 39 | *) optarg= ;; |
40 | esac | |
41 | ||
42 | case "$1" in | |
43 | --prefix=*) | |
44 | prefix=$optarg | |
45 | ;; | |
46 | ||
47 | --prefix) | |
[148d3c] | 48 | ${ECHO} $prefix |
[c5917f1] | 49 | ;; |
50 | ||
51 | --version) | |
[148d3c] | 52 | ${ECHO} @VERSION@ |
[c5917f1] | 53 | exit 0 |
54 | ;; | |
55 | ||
56 | --help) | |
57 | usage 0 | |
58 | ;; | |
59 | ||
60 | --cflags) | |
[e0ae1c] | 61 | ${ECHOn} " -I${includedir} -I${includedir}/libpolys @FACTORY_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@" |
[c5917f1] | 62 | ;; |
63 | ||
64 | --libs) | |
[e0ae1c] | 65 | ${ECHOn} " -L${libdir} -lpolys_g -lcoeffs_g -lresources_g -lreporter_g -lmisc_g @FACTORY_LIBS@ -lomalloc_g @NTL_LIBS@ @USEPPROCSDYNAMICLD@ @GMP_LIBS@" |
[c5917f1] | 66 | ;; |
67 | ||
68 | *) | |
69 | usage | |
70 | exit 1 | |
71 | ;; | |
72 | esac | |
73 | shift | |
74 | done | |
[148d3c] | 75 | ${ECHO} |
[c5917f1] | 76 | |
77 | exit 0 |
Note: See TracBrowser
for help on using the repository browser.