source: git/libpolys/libpolys-config.in @ 276a00

spielwiese
Last change on this file since 276a00 was 276a00, checked in by Oleksandr Motsak <motsak@…>, 10 years ago
Use @SINGULAR_CFLAGS@ instead of '-D(SING|OM)_NDEBUG' in lib*-config/*.pc (according to --enable-debug/--disable-optimization!) chg: also some minor BS cleanup
  • Property mode set to 100755
File size: 1.6 KB
Line 
1#! /bin/bash
2
3#C="$0"
4#O=`pwd`
5#
6###C=`readlink -f "$C"`:::
7#cd `dirname "$C"`
8#C=`basename "$C"`
9#
10## Iterate down a (possible) chain of symlinks
11#while [ -L "$C" ] 
12#do                 
13#    C=`readlink "$C"`
14#    cd `dirname "$C"`
15#    C=`basename "$C"`
16#done
17#
18#cd `dirname "$C"`
19#C=`pwd`
20#C=`dirname "$C"`
21#C=`ls -d1 "$C"`
22#
23#cd "$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
27#prefix="$C"
28#exec_prefix=${prefix}
29#includedir=${prefix}/include
30#libdir=${exec_prefix}/lib
31
32prefix=@prefix@
33exec_prefix=@exec_prefix@
34
35includedir=@includedir@
36libdir=@libdir@
37
38ECHO="echo"
39ECHOn="printf"
40
41usage()
42{
43    cat <<EOF
44Usage: libpolys-config [OPTION]
45
46Known values for OPTION are:
47
48  --prefix              show libpolys installation prefix
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
54EOF
55
56    exit $1
57}
58
59if test $# -eq 0; then
60    usage 1
61fi
62
63cflags=false
64libs=false
65
66while 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)
91        ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FACTORY_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@ "
92        ;;
93
94    --libs)
95        ${ECHOn} " -L${libdir} -lpolys"
96        ;;
97
98    *)
99        usage
100        exit 1
101        ;;
102    esac
103    shift
104done
105${ECHO}
106
107exit 0
Note: See TracBrowser for help on using the repository browser.