~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/auth_http/plugin.ac

  • Committer: Brian Aker
  • Date: 2009-12-29 01:38:38 UTC
  • mfrom: (1251.1.1 drizzle)
  • Revision ID: brian@gaz-20091229013838-03kb2z5xbqw03ddt
Merge of Diego fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_LIB_HAVE_LINKFLAGS(curl,,
 
2
  [#include <curl/curl.h>],
 
3
  [
 
4
    CURL *handle;
 
5
    handle=curl_easy_init();
 
6
  ])
 
7
AS_IF([test "x$ac_cv_libcurl" = "xno"],
 
8
  AC_MSG_WARN([libcurl development lib not found: not building auth_http plugin. On Debian this is found in libcurl4-gnutls-dev. On RedHat it's in libcurl-devel.]),[
 
9
  AC_CACHE_CHECK([if libcurl has CURLOPT_USERNAME],
 
10
                 [drizzle_cv_curl_have_username],[
 
11
     AC_COMPILE_IFELSE([
 
12
       AC_LANG_PROGRAM(
 
13
         [[
 
14
           CURL *handle;
 
15
           handle=curl_easy_init();
 
16
           rv= curl_easy_setopt(curl_handle, CURLOPT_USERNAME, "foo");
 
17
         ]])],
 
18
       [drizzle_cv_curl_have_username=yes],
 
19
       [drizzle_cv_curl_have_username=no])])
 
20
  AS_IF([test "x$drizzle_cv_curl_have_username" = "xyes"],
 
21
        AC_DEFINE([HAVE_CURLOPT_USERNAME],[1],
 
22
                  [Does libcurl provide the CURLOPT_USERNAME constant]))
 
23
 
 
24
  ])