~ubuntu-branches/ubuntu/gutsy/curl/gutsy

« back to all changes in this revision

Viewing changes to curl-config.in

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-06-29 15:04:24 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20060629150424-be178abcwks1n519
Tags: upstream-7.15.4
ImportĀ upstreamĀ versionĀ 7.15.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
 
2
#***************************************************************************
 
3
#                                  _   _ ____  _
 
4
#  Project                     ___| | | |  _ \| |
 
5
#                             / __| | | | |_) | |
 
6
#                            | (__| |_| |  _ <| |___
 
7
#                             \___|\___/|_| \_\_____|
 
8
#
 
9
# Copyright (C) 2001 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
 
10
#
 
11
# This software is licensed as described in the file COPYING, which
 
12
# you should have received as part of this distribution. The terms
 
13
# are also available at http://curl.haxx.se/docs/copyright.html.
 
14
#
 
15
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
 
16
# copies of the Software, and permit persons to whom the Software is
 
17
# furnished to do so, under the terms of the COPYING file.
 
18
#
 
19
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 
20
# KIND, either express or implied.
 
21
#
 
22
# $Id: curl-config.in,v 1.25 2006-05-02 22:48:22 bagder Exp $
 
23
###########################################################################
2
24
#
3
25
# The idea to this kind of setup info script was stolen from numerous
4
26
# other packages, such as neon, libxml and gnome.
5
27
#
6
 
# $Id: curl-config.in,v 1.23 2005/09/04 18:15:24 bagder Exp $
7
 
#
8
28
prefix=@prefix@
9
29
exec_prefix=@exec_prefix@
10
30
includedir=@includedir@
19
39
  --ca        ca bundle install path
20
40
  --cc        compiler
21
41
  --cflags    pre-processor and compiler flags
 
42
  --checkfor [version] check for (lib)curl of the specified version
22
43
  --features  newline separated list of enabled features
23
44
  --protocols newline separated list of enabled protocols
24
45
  --help      display this help and exit
101
122
            echo "FTPS"
102
123
          fi
103
124
        fi
104
 
        if test "@CURL_DISABLE_GOPHER@" != "1"; then
105
 
          echo "GOPHER"
106
 
        fi
107
125
        if test "@CURL_DISABLE_FILE@" != "1"; then
108
126
          echo "FILE"
109
127
        fi
125
143
        exit 0
126
144
        ;;
127
145
 
 
146
    --checkfor)
 
147
        checkfor=$2
 
148
        cmajor=`echo $checkfor | cut -d. -f1`
 
149
        cminor=`echo $checkfor | cut -d. -f2`
 
150
        # when extracting the patch part we strip off everything after a
 
151
        # dash as that's used for things like version 1.2.3-CVS
 
152
        cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
 
153
        checknum=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
 
154
        numuppercase=`echo @VERSIONNUM@ | tr 'a-f' 'A-F'`
 
155
        nownum=`echo "obase=10; ibase=16; $numuppercase" | bc`
 
156
 
 
157
        if test "$nownum" -ge "$checknum"; then
 
158
          # silent success
 
159
          exit 0
 
160
        else
 
161
          echo "requested version $checkfor is newer than existing @VERSION@"
 
162
          exit 1
 
163
        fi
 
164
        ;;
 
165
 
128
166
    --vernum)
129
167
        echo @VERSIONNUM@
130
168
        exit 0