~ubuntu-branches/ubuntu/natty/curl/natty-security

« back to all changes in this revision

Viewing changes to docs/libcurl/libcurl.m4

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2010-06-20 13:56:28 UTC
  • mfrom: (3.4.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100620135628-e30tp9jldq6hq985
Tags: 7.21.0-1ubuntu1
* Merge from debian unstable.  Remaining changes: LP: #596334
  - Keep build deps in main:
    - Drop build dependencies: stunnel, libssh2-1-dev
    - Add build-dependency on openssh-server
    - Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
  AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP])
56
56
  AH_TEMPLATE([LIBCURL_PROTOCOL_DICT],[Defined if libcurl supports DICT])
57
57
  AH_TEMPLATE([LIBCURL_PROTOCOL_TFTP],[Defined if libcurl supports TFTP])
 
58
  AH_TEMPLATE([LIBCURL_PROTOCOL_RTSP],[Defined if libcurl supports RTSP])
 
59
  AH_TEMPLATE([LIBCURL_PROTOCOL_POP3],[Defined if libcurl supports POP3])
 
60
  AH_TEMPLATE([LIBCURL_PROTOCOL_IMAP],[Defined if libcurl supports IMAP])
 
61
  AH_TEMPLATE([LIBCURL_PROTOCOL_SMTP],[Defined if libcurl supports SMTP])
58
62
 
59
63
  AC_ARG_WITH(libcurl,
60
64
     AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),
74
78
        AC_PATH_PROG([_libcurl_config],[curl-config],["$withval/bin"],
75
79
                     ["$withval/bin"])
76
80
     else
77
 
        AC_PATH_PROG([_libcurl_config],[curl-config])
 
81
        AC_PATH_PROG([_libcurl_config],[curl-config])
78
82
     fi
79
83
 
80
84
     if test x$_libcurl_config != "x" ; then
81
85
        AC_CACHE_CHECK([for the version of libcurl],
82
 
           [libcurl_cv_lib_curl_version],
 
86
           [libcurl_cv_lib_curl_version],
83
87
           [libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $[]2}'`])
84
88
 
85
 
        _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
86
 
        _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse`
 
89
        _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
 
90
        _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse`
87
91
 
88
92
        if test $_libcurl_wanted -gt 0 ; then
89
 
           AC_CACHE_CHECK([for libcurl >= version $2],
90
 
              [libcurl_cv_lib_version_ok],
 
93
           AC_CACHE_CHECK([for libcurl >= version $2],
 
94
              [libcurl_cv_lib_version_ok],
91
95
              [
92
 
              if test $_libcurl_version -ge $_libcurl_wanted ; then
93
 
                 libcurl_cv_lib_version_ok=yes
94
 
              else
95
 
                 libcurl_cv_lib_version_ok=no
96
 
              fi
 
96
              if test $_libcurl_version -ge $_libcurl_wanted ; then
 
97
                 libcurl_cv_lib_version_ok=yes
 
98
              else
 
99
                 libcurl_cv_lib_version_ok=no
 
100
              fi
97
101
              ])
98
102
        fi
99
103
 
100
 
        if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then
 
104
        if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then
101
105
           if test x"$LIBCURL_CPPFLAGS" = "x" ; then
102
106
              LIBCURL_CPPFLAGS=`$_libcurl_config --cflags`
103
107
           fi
105
109
              LIBCURL=`$_libcurl_config --libs`
106
110
 
107
111
              # This is so silly, but Apple actually has a bug in their
108
 
              # curl-config script.  Fixed in Tiger, but there are still
109
 
              # lots of Panther installs around.
 
112
              # curl-config script.  Fixed in Tiger, but there are still
 
113
              # lots of Panther installs around.
110
114
              case "${host}" in
111
115
                 powerpc-apple-darwin7*)
112
116
                    LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'`
114
118
              esac
115
119
           fi
116
120
 
117
 
           # All curl-config scripts support --feature
118
 
           _libcurl_features=`$_libcurl_config --feature`
 
121
           # All curl-config scripts support --feature
 
122
           _libcurl_features=`$_libcurl_config --feature`
119
123
 
120
124
           # Is it modern enough to have --protocols? (7.12.4)
121
 
           if test $_libcurl_version -ge 461828 ; then
 
125
           if test $_libcurl_version -ge 461828 ; then
122
126
              _libcurl_protocols=`$_libcurl_config --protocols`
123
127
           fi
124
 
        else
 
128
        else
125
129
           _libcurl_try_link=no
126
 
        fi
 
130
        fi
127
131
 
128
 
        unset _libcurl_wanted
 
132
        unset _libcurl_wanted
129
133
     fi
130
134
 
131
135
     if test $_libcurl_try_link = yes ; then
163
167
 
164
168
        if test $libcurl_cv_lib_curl_usable = yes ; then
165
169
 
166
 
           # Does curl_free() exist in this version of libcurl?
167
 
           # If not, fake it with free()
 
170
           # Does curl_free() exist in this version of libcurl?
 
171
           # If not, fake it with free()
168
172
 
169
173
           _libcurl_save_cppflags=$CPPFLAGS
170
174
           CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
172
176
           LIBS="$LIBS $LIBCURL"
173
177
 
174
178
           AC_CHECK_FUNC(curl_free,,
175
 
              AC_DEFINE(curl_free,free,
176
 
                [Define curl_free() as free() if our version of curl lacks curl_free.]))
 
179
              AC_DEFINE(curl_free,free,
 
180
                [Define curl_free() as free() if our version of curl lacks curl_free.]))
177
181
 
178
182
           CPPFLAGS=$_libcurl_save_cppflags
179
183
           LIBS=$_libcurl_save_libs
186
190
           AC_SUBST(LIBCURL)
187
191
 
188
192
           for _libcurl_feature in $_libcurl_features ; do
189
 
              AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1])
190
 
              eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes
191
 
           done
192
 
 
193
 
           if test "x$_libcurl_protocols" = "x" ; then
194
 
 
195
 
              # We don't have --protocols, so just assume that all
196
 
              # protocols are available
197
 
              _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT"
198
 
 
199
 
              if test x$libcurl_feature_SSL = xyes ; then
200
 
                 _libcurl_protocols="$_libcurl_protocols HTTPS"
201
 
 
202
 
                 # FTPS wasn't standards-compliant until version
203
 
                 # 7.11.0
204
 
                 if test $_libcurl_version -ge 461568; then
205
 
                    _libcurl_protocols="$_libcurl_protocols FTPS"
206
 
                 fi
207
 
              fi
208
 
           fi
209
 
 
210
 
           for _libcurl_protocol in $_libcurl_protocols ; do
211
 
              AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1])
212
 
              eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes
213
 
           done
214
 
        else
215
 
           unset LIBCURL
216
 
           unset LIBCURL_CPPFLAGS
 
193
              AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1])
 
194
              eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes
 
195
           done
 
196
 
 
197
           if test "x$_libcurl_protocols" = "x" ; then
 
198
 
 
199
              # We don't have --protocols, so just assume that all
 
200
              # protocols are available
 
201
              _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
 
202
 
 
203
              if test x$libcurl_feature_SSL = xyes ; then
 
204
                 _libcurl_protocols="$_libcurl_protocols HTTPS"
 
205
 
 
206
                 # FTPS wasn't standards-compliant until version
 
207
                 # 7.11.0 (0x070b00 == 461568)
 
208
                 if test $_libcurl_version -ge 461568; then
 
209
                    _libcurl_protocols="$_libcurl_protocols FTPS"
 
210
                 fi
 
211
              fi
 
212
 
 
213
              # RTSP, IMAP, POP3 and SMTP were added in
 
214
              # 7.20.0 (0x071400 == 463872)
 
215
              if test $_libcurl_version -ge 463872; then
 
216
                 _libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP"
 
217
              fi
 
218
           fi
 
219
 
 
220
           for _libcurl_protocol in $_libcurl_protocols ; do
 
221
              AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1])
 
222
              eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes
 
223
           done
 
224
        else
 
225
           unset LIBCURL
 
226
           unset LIBCURL_CPPFLAGS
217
227
        fi
218
228
     fi
219
229