root/trunk/pqxx-config.in

Revision 1138, 1.2 KB (checked in by jtv, 4 years ago)

Big whitespace cleanup

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1#! /bin/sh
2
3prefix=@prefix@
4exec_prefix=@exec_prefix@
5includedir=@includedir@
6libdir=@libdir@
7pkgconfig=@PKG_CONFIG@
8
9deprecated() {
10    cat 1>&2 <<EOF
11pqxx-config is deprecated; please use $1
12EOF
13}
14
15usage()
16{
17    cat <<EOF
18Usage: pqxx-config [OPTION]
19
20Known values for OPTION are:
21
22  --prefix=DIR          change libpqxx prefix [default $prefix]
23  --libs                print library linking information
24  --cflags              print pre-processor and compiler flags
25  --help                display this help and exit
26  --version             output version information
27EOF
28    deprecated "$pkgconfig (module libpqxx)"
29
30    exit $1
31}
32
33if test $# -eq 0; then
34    usage 1
35fi
36
37cflags=false
38libs=false
39
40while test $# -gt 0; do
41    case "$1" in
42    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
43    *) optarg= ;;
44    esac
45
46    case "$1" in
47    --prefix=*)
48        prefix=$optarg
49        ;;
50
51    --prefix)
52        echo $prefix
53        ;;
54
55    --version)
56        deprecated "\"$pkgconfig --modversion libpqxx\""
57        $pkgconfig --modversion libpqxx
58        exit 0
59        ;;
60
61    --help)
62        usage 0
63        ;;
64
65    --cflags)
66        deprecated "\"$pkgconfig --cflags libpqxx\""
67        $pkgconfig --cflags libpqxx
68        ;;
69
70    --libs)
71        deprecated "\"$pkgconfig --libs libpqxx\""
72        $pkgconfig --libs libpqxx
73        ;;
74
75    *)
76        usage
77        exit 1
78        ;;
79    esac
80    shift
81done
82
83exit 0
Note: See TracBrowser for help on using the browser.