~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/auth_http/plug.in

  • Committer: Brian Aker
  • Date: 2009-04-17 01:45:33 UTC
  • Revision ID: brian@gaz-20090417014533-exdrtriab9zecqs2
Refactor get_variable to session

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
DRIZZLE_PLUGIN(auth_http,[HTTP Authentication Plugin],
 
2
        [HTTP based authentications])
 
3
DRIZZLE_PLUGIN_DYNAMIC(auth_http, [libauth_http.la])
 
4
DRIZZLE_PLUGIN_STATIC(auth_http, [libauth_http.a])
 
5
DRIZZLE_PLUGIN_ACTIONS(auth_http, [
 
6
  AC_LIB_HAVE_LINKFLAGS(curl,,
 
7
    [#include <curl/curl.h>],
 
8
    [
 
9
      CURL *handle;
 
10
      handle=curl_easy_init();
 
11
    ])
 
12
  AS_IF([test "x$ac_cv_libcurl" = "xno"],
 
13
    AC_MSG_WARN([libcurl not working: not building auth_http plugin]),[
 
14
    AC_CACHE_CHECK([if libcurl has CURLOPT_USERNAME],
 
15
                       [drizzle_cv_curl_have_username],[
 
16
       AC_COMPILE_IFELSE([
 
17
         AC_LANG_PROGRAM(
 
18
           [[
 
19
            CURL *handle;
 
20
            handle=curl_easy_init();
 
21
            rv= curl_easy_setopt(curl_handle, CURLOPT_USERNAME, "foo");
 
22
           ]])],
 
23
         [drizzle_cv_curl_have_username=yes],
 
24
         [drizzle_cv_curl_have_username=no])])
 
25
    AS_IF([test "x$drizzle_cv_curl_have_username" = "xyes"],
 
26
          AC_DEFINE([HAVE_CURLOPT_USERNAME],[1],
 
27
                    [Does libcurl provide the CURLOPT_USERNAME constant]))
 
28
 
 
29
    DRIZZLED_PLUGIN_DEP_LIBS="${DRIZZLED_PLUGIN_DEP_LIBS} ${LIBCURL}"
 
30
    ])
 
31
  AM_CONDITIONAL(BUILD_AUTH_HTTP,[test "${ac_cv_libcurl}" = "yes"])
 
32
])