source: git/libpolys/libpolys-config.in @ 7fe9e13

spielwiese
Last change on this file since 7fe9e13 was 7fe9e13, checked in by Oleksandr Motsak <motsak@…>, 10 years ago
Renamed NDEBUG -> SING_NDEBUG in order to avoid confusion with GCC macro
  • Property mode set to 100755
File size: 1.7 KB
Line 
1#! /bin/bash
2
3C="$0"
4
5O=`pwd`
6
7##C=`readlink -f "$C"`:::
8cd `dirname "$C"`
9C=`basename "$C"`
10
11# Iterate down a (possible) chain of symlinks
12while [ -L "$C" ] 
13do                 
14    C=`readlink "$C"`
15    cd `dirname "$C"`
16    C=`basename "$C"`
17done
18
19cd `dirname "$C"`
20C=`pwd`
21C=`dirname "$C"`
22C=`ls -d1 "$C"`
23
24cd "$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
29prefix="$C"
30exec_prefix=${prefix}
31includedir=${prefix}/include
32libdir=${exec_prefix}/lib
33
34#prefix=@prefix@
35#exec_prefix=@exec_prefix@
36#includedir=@includedir@
37#libdir=@libdir@
38
39ECHO="echo"
40ECHOn="printf"
41
42usage()
43{
44    cat <<EOF
45Usage: libpolys-config [OPTION]
46
47Known 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
55EOF
56
57    exit $1
58}
59
60if test $# -eq 0; then
61    usage 1
62fi
63
64cflags=false
65libs=false
66
67while 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    --libs)
96        ${ECHOn} " -L${libdir} -L${libdir}/singular -lpolys -lcoeffs -lreporter -lmisc @FACTORY_LIBS@ -lomalloc -lresources @NTL_LIBS@ @USEPPROCSDYNAMICLD@ @GMP_LIBS@"
97        ;;
98
99    *)
100        usage
101        exit 1
102        ;;
103    esac
104    shift
105done
106${ECHO}
107
108exit 0
Note: See TracBrowser for help on using the repository browser.