~drizzle-trunk/drizzle/development

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
AC_LIB_HAVE_LINKFLAGS(curl,,
  [#include <curl/curl.h>],
  [
    CURL *handle;
    handle=curl_easy_init();
  ])
AS_IF([test "x$ac_cv_libcurl" = "xno"],
  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.]),[
  AC_CACHE_CHECK([if libcurl has CURLOPT_USERNAME],
                 [drizzle_cv_curl_have_username],[
     AC_COMPILE_IFELSE([
       AC_LANG_PROGRAM(
         [[
           CURL *handle;
           handle=curl_easy_init();
           rv= curl_easy_setopt(curl_handle, CURLOPT_USERNAME, "foo");
         ]])],
       [drizzle_cv_curl_have_username=yes],
       [drizzle_cv_curl_have_username=no])])
  AS_IF([test "x$drizzle_cv_curl_have_username" = "xyes"],
        AC_DEFINE([HAVE_CURLOPT_USERNAME],[1],
                  [Does libcurl provide the CURLOPT_USERNAME constant]))

  ])