source: git/libpolys/libpolys-config.in @ f0af17

spielwiese
Last change on this file since f0af17 was f4cb99a, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
Updating the BS + search pathes for better binary distribution (due to Hans)
  • Property mode set to 100755
File size: 1.8 KB
Line 
1#! /bin/bash
2
3C="$0"
4C=`readlink -f "$C"`
5C=`dirname "$C"`
6C=`ls -d1 "$C"`
7
8prefix="$C/../"
9
10# NOTE: if you moved this config please either use the above or
11# make sure the following variables are up to date
12#prefix=@prefix@
13
14exec_prefix=@exec_prefix@
15includedir=@includedir@
16libdir=@libdir@
17
18ECHO="echo"
19ECHOn="printf"
20
21usage()
22{
23    cat <<EOF
24Usage: libpolys-config [OPTION]
25
26Known values for OPTION are:
27
28  --prefix              show libpolys installation prefix
29  --libsg               print library linking information (with debug)
30  --cflagsg             print pre-processor and compiler flags (with debug)
31  --libs                print library linking information
32  --cflags              print pre-processor and compiler flags
33  --help                display this help and exit
34  --version             output version information
35
36EOF
37
38    exit $1
39}
40
41if test $# -eq 0; then
42    usage 1
43fi
44
45cflags=false
46libs=false
47
48while test $# -gt 0; do
49    case "$1" in
50    -*=*) optarg=`${ECHO} "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
51    *) optarg= ;;
52    esac
53
54    case "$1" in
55    --prefix=*)
56        prefix=$optarg
57        ;;
58
59    --prefix)
60        ${ECHO} $prefix
61        ;;
62
63    --version)
64        ${ECHO} @VERSION@
65        exit 0
66        ;;
67
68    --help)
69        usage 0
70        ;;
71
72    --cflagsg)
73        ${ECHOn} " -I${includedir} -I${includedir}/singular @FACTORY_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@"
74        ;;
75
76    --cflags)
77        ${ECHOn} " -I${includedir} -I${includedir}/singular @FACTORY_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@ -DNDEBUG -DOM_NDEBUG"
78        ;;
79
80    --libsg)
81        ${ECHOn} " -L${libdir} -L${libdir}/singular -lpolys_g -lcoeffs_g -lreporter_g -lmisc_g @FACTORY_LIBS@ -lomalloc_g -lfindexec_g @NTL_LIBS@ @USEPPROCSDYNAMICLD@ @GMP_LIBS@"
82        ;;
83
84    --libs)
85        ${ECHOn} " -L${libdir} -L${libdir}/singular -lpolys -lcoeffs -lreporter -lmisc @FACTORY_LIBS@ -lomalloc -lfindexec @NTL_LIBS@ @USEPPROCSDYNAMICLD@ @GMP_LIBS@"
86        ;;
87
88    *)
89        usage
90        exit 1
91        ;;
92    esac
93    shift
94done
95${ECHO}
96
97exit 0
Note: See TracBrowser for help on using the repository browser.