changeset 15324:c42bf5cadb60

Add check for CURLOPT_DIRLISTONLY in libcurl * configure.ac: Add check for CURLOPT_DIRLISTONLY in libcurl
author Mike Miller <mtmiller@ieee.org>
date Thu, 06 Sep 2012 23:02:05 -0400
parents 9f9a7ae2d263
children af54273243fd
files configure.ac
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac
+++ b/configure.ac
@@ -839,6 +839,20 @@
 OCTAVE_CHECK_LIB(curl, cURL,
   [cURL library not found.  The ftp objects, urlread and urlwrite functions will be disabled.],
   [curl/curl.h], [curl_easy_escape])
+if test -z "$warn_curl"; then
+  AC_MSG_CHECKING([for CURLOPT_DIRLISTONLY in curl/curl.h])
+  AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM([[
+      #include <curl/curl.h>
+      ]], [[
+      curl_easy_setopt ((CURL*)NULL, CURLOPT_DIRLISTONLY, 0);
+      ]])],
+    [AC_MSG_RESULT(yes)],
+    [AC_MSG_RESULT(no)
+     AC_DEFINE(CURLOPT_DIRLISTONLY, CURLOPT_FTPLISTONLY,
+       [Define to the legacy option name if using an older version of cURL.])]
+  )
+fi
 LIBS="$save_LIBS"
 CPPFLAGS="$save_CPPFLAGS"