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