source: git/libsingular-config.in @ abe5c8

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