source: git/libsingular-config.in @ 662704

spielwiese
Last change on this file since 662704 was ab7174f, checked in by Max Horn <max@…>, 4 years ago
Remove executable bit from some files ... and ensure that libpolys-config is always executable
  • Property mode set to 100644
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: libsingular-config [OPTION]
45
46Known values for OPTION are:
47
48  --prefix              show libsingular 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    #### @FACTORY_INCLUDES@
92        ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@  @GMP_CPPFLAGS@ "
93        ;;
94
95    --libs)
96        ${ECHOn} " -L${libdir} -lSingular -lpolys -lsingular_resources -lfactory -lomalloc @USEPPROCSDYNAMICLD@"
97        ;;
98
99    *)
100        usage
101        exit 1
102        ;;
103    esac
104    shift
105done
106${ECHO}
107
108exit 0
Note: See TracBrowser for help on using the repository browser.