source: git/libsingular-config.in @ b89c22f

spielwiese
Last change on this file since b89c22f was b89c22f, checked in by Oleksandr Motsak <motsak@…>, 10 years ago
Use @prefix@, @includedir@ and @libdir@ in lib*-config scripts NOTE: user should do: configure --prefix=FIXED_PATH and make install
  • Property mode set to 100755
File size: 1.8 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@
33includedir=@includedir@
34libdir=@libdir@
35
36ECHO="echo"
37ECHOn="printf"
38
39usage()
40{
41    cat <<EOF
42Usage: libpolys-config [OPTION]
43
44Known values for OPTION are:
45
46  --prefix              show libpolys installation prefix
47  --libs                print library linking information
48  --cflags              print pre-processor and compiler flags
49  --help                display this help and exit
50  --version             output version information
51
52EOF
53
54    exit $1
55}
56
57if test $# -eq 0; then
58    usage 1
59fi
60
61cflags=false
62libs=false
63
64while test $# -gt 0; do
65    case "$1" in
66    -*=*) optarg=`${ECHO} "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
67    *) optarg= ;;
68    esac
69
70    case "$1" in
71    --prefix=*)
72        prefix=$optarg
73        ;;
74
75    --prefix)
76        ${ECHO} $prefix
77        ;;
78
79    --version)
80        ${ECHO} @VERSION@
81        exit 0
82        ;;
83
84    --help)
85        usage 0
86        ;;
87
88    --cflags)
89        ${ECHOn} " -I${includedir} -I${includedir}/singular @FACTORY_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@ -DSING_NDEBUG -DOM_NDEBUG"
90        ;;
91
92    --cflagswithdebug)
93        ${ECHOn} " -I${includedir} -I${includedir}/singular @FACTORY_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@"
94        ;;
95
96    --libs)
97        ${ECHOn} " -L${libdir} -L${libdir}/singular -lSingular -lnumeric -lkernel -lpolys -lcoeffs -lreporter -lmisc @FACTORY_LIBS@ -lomalloc -lresources @NTL_LIBS@ @USEPPROCSDYNAMICLD@ @GMP_LIBS@"
98        ;;
99
100    *)
101        usage
102        exit 1
103        ;;
104    esac
105    shift
106done
107${ECHO}
108
109exit 0
Note: See TracBrowser for help on using the repository browser.