source: git/libsingular-config.in @ 16f511

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