~ubuntu-branches/ubuntu/dapper/curl/dapper

« back to all changes in this revision

Viewing changes to curl-config.in

  • Committer: Bazaar Package Importer
  • Author(s): Domenico Andreoli
  • Date: 2002-03-12 19:06:21 UTC
  • Revision ID: james.westby@ubuntu.com-20020312190621-iqx7k9cipo5d0ifr
Tags: upstream-7.9.5
ImportĀ upstreamĀ versionĀ 7.9.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
#
 
3
# The idea to this kind of setup info script was stolen from numerous
 
4
# other packages, such as neon, libxml and gnome.
 
5
#
 
6
# $Id: curl-config.in,v 1.12 2002/01/16 14:20:06 bagder Exp $
 
7
#
 
8
prefix=@prefix@
 
9
exec_prefix=@exec_prefix@
 
10
includedir=@includedir@
 
11
 
 
12
usage()
 
13
{
 
14
    cat <<EOF
 
15
Usage: curl-config [OPTION]
 
16
 
 
17
Available values for OPTION include:
 
18
 
 
19
  --cc        compiler
 
20
  --cflags    pre-processor and compiler flags
 
21
  --feature   newline separated list of enabled features
 
22
  --help      display this help and exit
 
23
  --libs      library linking information
 
24
  --prefix    curl install prefix
 
25
  --version   output version information
 
26
  --vernum    output the version information as a number (hexadecimal)
 
27
EOF
 
28
 
 
29
    exit $1
 
30
}
 
31
 
 
32
if test $# -eq 0; then
 
33
    usage 1
 
34
fi
 
35
 
 
36
while test $# -gt 0; do
 
37
    case "$1" in
 
38
    # this deals with options in the style
 
39
    # --option=value and extracts the value part
 
40
    # [not currently used]
 
41
    -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
 
42
    *) value= ;;
 
43
    esac
 
44
 
 
45
    case "$1" in
 
46
    --cc)
 
47
        echo @CC@
 
48
        ;;
 
49
 
 
50
    --prefix)
 
51
        echo $prefix
 
52
        ;;
 
53
 
 
54
    --feature)
 
55
        if test "@OPENSSL_ENABLED@" = "1"; then
 
56
          echo "SSL"
 
57
        fi
 
58
        if test "@KRB4_ENABLED@" = "1"; then
 
59
          echo "KRB4"
 
60
        fi
 
61
        if test "@IPV6_ENABLED@" = "1"; then
 
62
          echo "IPv6"
 
63
        fi
 
64
        ;;
 
65
 
 
66
    --version)
 
67
        echo libcurl @VERSION@
 
68
        exit 0
 
69
        ;;
 
70
 
 
71
    --vernum)
 
72
        echo @VERSIONNUM@
 
73
        exit 0
 
74
        ;;
 
75
 
 
76
    --help)
 
77
        usage 0
 
78
        ;;
 
79
 
 
80
    --cflags)
 
81
        echo -I@includedir@
 
82
        ;;
 
83
 
 
84
    --libs)
 
85
        echo -L@libdir@ -lcurl @LDFLAGS@ @LIBS@
 
86
        ;;
 
87
 
 
88
    *)
 
89
        echo "unknown option: $1"
 
90
        usage
 
91
        exit 1
 
92
        ;;
 
93
    esac
 
94
    shift
 
95
done
 
96
 
 
97
exit 0