Commit 55f587fbec5edfea11c409002848dde46e49a252

Authored by Perry Werneck
1 parent c796e997

Adding optional support for libcurl.

Showing 2 changed files with 23 additions and 0 deletions   Show diff stats
configure.ac
... ... @@ -519,6 +519,28 @@ AC_SUBST(LDAP_CFLAGS)
519 519 AC_SUBST(LDAP_LIBS)
520 520  
521 521 dnl ---------------------------------------------------------------------------
  522 +dnl Check for CURL
  523 +dnl ---------------------------------------------------------------------------
  524 +
  525 +AC_ARG_ENABLE([curl],
  526 + AS_HELP_STRING([--disable-curl],[Disable optional CURL support]),
  527 + [case "${enableval}" in
  528 + yes) have_curl=yes ;;
  529 + no) have_curl=no ;;
  530 + *) AC_MSG_ERROR(bad value ${enableval} for --disable-curl);;
  531 + esac],
  532 + [have_curl=auto])
  533 +
  534 +
  535 +if test "x${have_curl}" != xno ; then
  536 + PKG_CHECK_MODULES( [LIBCURL], [libcurl], AC_DEFINE(HAVE_LIBCURL), AC_MSG_NOTICE([libcurl not present.]) )
  537 +fi
  538 +
  539 +AC_SUBST(LIBCURL_LIBS)
  540 +AC_SUBST(LIBCURL_CFLAGS)
  541 +
  542 +
  543 +dnl ---------------------------------------------------------------------------
522 544 dnl Directory config
523 545 dnl ---------------------------------------------------------------------------
524 546  
... ...
src/include/config.h.in
... ... @@ -46,6 +46,7 @@
46 46 #undef HAVE_VASPRINTF
47 47 #undef HAVE_INET_NTOP
48 48 #undef HAVE_DBUS
  49 + #undef HAVE_LIBCURL
49 50  
50 51 #undef HAVE_ICONV
51 52 #undef ICONV_CONST
... ...