~ubuntu-branches/ubuntu/lucid/curl/lucid-security

« back to all changes in this revision

Viewing changes to docs/libcurl/libcurl.m4

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-12-12 15:04:52 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20051212150452-2ymlra67b2p7kjyy
Tags: 7.15.1-1ubuntu1
Resynchronise with Debian to get URL parser overflow fix from 7.15.1
(CVE-2005-4077).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
2
2
#                       [ACTION-IF-YES], [ACTION-IF-NO])
3
3
# ----------------------------------------------------------
4
 
#      David Shaw <dshaw@jabberwocky.com>   Jan-23-2005
 
4
#      David Shaw <dshaw@jabberwocky.com>   Jun-21-2005
5
5
#
6
6
# Checks for libcurl.  DEFAULT-ACTION is the string yes or no to
7
7
# specify whether to default to --with-libcurl or --without-libcurl.
32
32
# found is after version 7.7.2, the first version that included the
33
33
# curl-config script.  Note that it is very important for people
34
34
# packaging binary versions of libcurl to include this script!
35
 
# Without curl-config, we can only make educated guesses as to what
36
 
# protocols are available.  Specifically, we assume that all of HTTP,
37
 
# FTP, GOPHER, FILE, TELNET, LDAP, and DICT exist, and (if SSL exists)
38
 
# HTTPS is present.  All of these protocols existed when libcurl was
39
 
# first created in version 7, so this is a safe assumption.  If the
40
 
# version is 7.11.0 or later, FTPS is assumed to be present as well.
41
 
# FTPS existed before then, but was not yet fully standards compliant.
 
35
# Without curl-config, we can only guess what protocols are available.
42
36
 
43
37
AC_DEFUN([LIBCURL_CHECK_CONFIG],
44
38
[
103
97
           fi
104
98
           if test x"$LIBCURL" = "x" ; then
105
99
              LIBCURL=`$_libcurl_config --libs`
 
100
 
 
101
              # This is so silly, but Apple actually has a bug in their
 
102
              # curl-config script.  Fixed in Tiger, but there are still
 
103
              # lots of Panther installs around.
 
104
              case "${host}" in
 
105
                 powerpc-apple-darwin7*)
 
106
                    LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'`
 
107
                 ;;
 
108
              esac
106
109
           fi
107
110
 
108
111
           # All curl-config scripts support --feature
130
133
           [
131
134
           _libcurl_save_cppflags=$CPPFLAGS
132
135
           CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
133
 
           _libcurl_save_ldflags=$LDFLAGS
134
 
           LDFLAGS="$LDFLAGS $LIBCURL"
 
136
           _libcurl_save_libs=$LIBS
 
137
           LIBS="$LIBS $LIBCURL"
135
138
 
136
139
           AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
137
140
/* Try and use a few common options to force a failure if we are
147
150
]),libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
148
151
 
149
152
           CPPFLAGS=$_libcurl_save_cppflags
150
 
           LDFLAGS=$_libcurl_save_ldflags
 
153
           LIBS=$_libcurl_save_libs
151
154
           unset _libcurl_save_cppflags
152
 
           unset _libcurl_save_ldflags
 
155
           unset _libcurl_save_libs
153
156
           ])
154
157
 
155
158
        if test $libcurl_cv_lib_curl_usable = yes ; then
 
159
 
 
160
           # Does curl_free() exist in this version of libcurl?
 
161
           # If not, fake it with free()
 
162
 
 
163
           _libcurl_save_cppflags=$CPPFLAGS
 
164
           CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
 
165
           _libcurl_save_libs=$LIBS
 
166
           LIBS="$LIBS $LIBCURL"
 
167
 
 
168
           AC_CHECK_FUNC(curl_free,,
 
169
              AC_DEFINE(curl_free,free,
 
170
                [Define curl_free() as free() if our version of curl lacks curl_free.]))
 
171
 
 
172
           CPPFLAGS=$_libcurl_save_cppflags
 
173
           LIBS=$_libcurl_save_libs
 
174
           unset _libcurl_save_cppflags
 
175
           unset _libcurl_save_libs
 
176
 
156
177
           AC_DEFINE(HAVE_LIBCURL,1,
157
178
             [Define to 1 if you have a functional curl library.])
158
179
           AC_SUBST(LIBCURL_CPPFLAGS)