mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-17 16:50:18 +08:00
Added checks for CURLOPT_USERNAME and CURLOPT_PASSWORD to configure.ac
This commit is contained in:
parent
de08275c1c
commit
c04c95b158
24
configure.ac
24
configure.ac
@ -522,6 +522,8 @@ AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_C_CONST
|
||||
|
||||
# CURLOPT_USERNAME is not defined until curl version 7.19.1
|
||||
# CURLOPT_PASSWORD is not defined until curl version 7.19.1
|
||||
# CURLOPT_KEYPASSWD is not defined until curl version 7.16.4
|
||||
# CURLINFO_RESPONSE_CODE is not defined until curl version 7.10.7
|
||||
|
||||
@ -529,6 +531,28 @@ AC_C_CONST
|
||||
SAVECFLAGS="$CFLAGS"
|
||||
CFLAGS="${curl_cflags}"
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[#include "curl/curl.h"],
|
||||
[[int x = CURLOPT_USERNAME;]])],
|
||||
[haveusername=yes],
|
||||
[haveusername=no])
|
||||
AC_MSG_CHECKING([whether CURLOPT_USERNAME is defined])
|
||||
AC_MSG_RESULT([${haveusername}])
|
||||
if test $haveusername = yes; then
|
||||
AC_DEFINE([HAVE_CURLOPT_USERNAME],[1],[Is CURLOPT_USERNAME defined])
|
||||
fi
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[#include "curl/curl.h"],
|
||||
[[int x = CURLOPT_PASSWORD;]])],
|
||||
[havepassword=yes],
|
||||
[havepassword=no])
|
||||
AC_MSG_CHECKING([whether CURLOPT_PASSWORD is defined])
|
||||
AC_MSG_RESULT([${havepassword}])
|
||||
if test $havepassword = yes; then
|
||||
AC_DEFINE([HAVE_CURLOPT_PASSWORD],[1],[Is CURLOPT_PASSWORD defined])
|
||||
fi
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[#include "curl/curl.h"],
|
||||
[[int x = CURLOPT_KEYPASSWD;]])],
|
||||
|
Loading…
Reference in New Issue
Block a user