source: git/libpolys/libpolys-config.in @ 121fd9

spielwiese
Last change on this file since 121fd9 was c5917f1, checked in by Bradford Hovinen <hovinen@…>, 13 years ago
* Add libpolys/libpolys-config.in as prototype for script to make it easier to link against libpolys * Generate libpolys/libpolys-config from configure
  • Property mode set to 100644
File size: 962 bytes
RevLine 
[c5917f1]1#! /bin/sh
2
3prefix=@prefix@
4exec_prefix=@exec_prefix@
5includedir=@includedir@
6libdir=@libdir@
7
8usage()
9{
10    cat <<EOF
11Usage: libpolys-config [OPTION]
12
13Known values for OPTION are:
14
15  --prefix              show libpolys installation prefix
16  --libs                print library linking information
17  --cflags              print pre-processor and compiler flags
18  --help                display this help and exit
19  --version             output version information
20
21EOF
22
23    exit $1
24}
25
26if test $# -eq 0; then
27    usage 1
28fi
29
30cflags=false
31libs=false
32
33while test $# -gt 0; do
34    case "$1" in
35    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
36    *) optarg= ;;
37    esac
38
39    case "$1" in
40    --prefix=*)
41        prefix=$optarg
42        ;;
43
44    --prefix)
45        echo $prefix
46        ;;
47
48    --version)
49        echo @VERSION@
50        exit 0
51        ;;
52
53    --help)
54        usage 0
55        ;;
56
57    --cflags)
58        echo -n " -I${includedir} @GMP_CFLAGS@"
59        ;;
60
61    --libs)
62        echo -n " -L${libdir} -lpolys @GMP_LIBS@"
63        ;;
64
65    *)
66        usage
67        exit 1
68        ;;
69    esac
70    shift
71done
72echo
73
74exit 0
Note: See TracBrowser for help on using the repository browser.