~ubuntu-branches/ubuntu/natty/libgpg-error/natty

« back to all changes in this revision

Viewing changes to src/gpg-error-config.in

  • Committer: Bazaar Package Importer
  • Author(s): Jose Carlos Garcia Sogo
  • Date: 2004-03-16 23:25:13 UTC
  • Revision ID: james.westby@ubuntu.com-20040316232513-u9dnue5r0i3egfkq
Tags: upstream-0.7
ImportĀ upstreamĀ versionĀ 0.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
 
3
#
 
4
# This file is free software; as a special exception the author gives
 
5
# unlimited permission to copy and/or distribute it, with or without
 
6
# modifications, as long as this notice is preserved.
 
7
#
 
8
# This file is distributed in the hope that it will be useful, but
 
9
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 
10
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
11
 
 
12
 
 
13
prefix=@prefix@
 
14
exec_prefix=@exec_prefix@
 
15
includedir=@includedir@
 
16
libdir=@libdir@
 
17
 
 
18
output=""
 
19
 
 
20
usage()
 
21
{
 
22
    cat <<EOF
 
23
Usage: gpg-error-config [OPTIONS]
 
24
Options:
 
25
        [--prefix]
 
26
        [--exec-prefix]
 
27
        [--version]
 
28
        [--libs]
 
29
        [--cflags]
 
30
EOF
 
31
    exit $1
 
32
}
 
33
 
 
34
if test $# -eq 0; then
 
35
    usage 1 1>&2
 
36
fi
 
37
 
 
38
while test $# -gt 0; do
 
39
    case "$1" in
 
40
        -*=*)
 
41
            optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
 
42
            ;;
 
43
        *)
 
44
            optarg=
 
45
            ;;
 
46
    esac
 
47
 
 
48
    case $1 in
 
49
        --prefix)
 
50
            output="$output $prefix"
 
51
            ;;
 
52
        --exec-prefix)
 
53
            output="$output $exec_prefix"
 
54
            ;;
 
55
        --version)
 
56
            echo "@VERSION@"
 
57
            exit 0
 
58
            ;;
 
59
        --cflags)
 
60
            if test "x$includedir" != "x/usr/include" -a "x$includedir" != "x/include"; then
 
61
                output="$output -I$includedir"
 
62
            fi
 
63
            ;;
 
64
        --libs)
 
65
            if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/lib"; then
 
66
                output="$output -L$libdir"
 
67
            fi
 
68
            output="$output -lgpg-error"
 
69
            ;;
 
70
        *)
 
71
            usage 1 1>&2
 
72
            ;;
 
73
    esac
 
74
    shift
 
75
done
 
76
 
 
77
echo $output