793f2573b2beaf8b48eab850429482acf68ec2b1Pavel BřezinaPKG_CHECK_MODULES([CURL], [libcurl], [found_libcurl=yes],
8ccc9b7c317cf5ee8f295b38bfc4c2b7d551f8f1Lukas Slebodnik [AC_MSG_ERROR([The libcurl development library was not found.
8ccc9b7c317cf5ee8f295b38bfc4c2b7d551f8f1Lukas SlebodnikYou must have the header file curl/curl.h installed to build sssd
8ccc9b7c317cf5ee8f295b38bfc4c2b7d551f8f1Lukas Slebodnikwith secrets and KCM responder. If you want to build sssd without these
8ccc9b7c317cf5ee8f295b38bfc4c2b7d551f8f1Lukas Slebodnikresponders then specify --without-secrets --without-kcm when running configure.
321ca28277cbf9882769537fd4c0dfaea224c86eJakub HrozekAS_IF([test x"$found_libcurl" = xyes],
321ca28277cbf9882769537fd4c0dfaea224c86eJakub Hrozek CFLAGS="$CFLAGS $CURL_CFLAGS"
321ca28277cbf9882769537fd4c0dfaea224c86eJakub Hrozek AC_MSG_CHECKING([For CURLOPT_UNIX_SOCKET_PATH support in libcurl])
321ca28277cbf9882769537fd4c0dfaea224c86eJakub Hrozek AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
321ca28277cbf9882769537fd4c0dfaea224c86eJakub Hrozek CURLoption opt = CURLOPT_UNIX_SOCKET_PATH;
321ca28277cbf9882769537fd4c0dfaea224c86eJakub Hrozek [have_curlopt_unix_sockpath=yes]
321ca28277cbf9882769537fd4c0dfaea224c86eJakub Hrozek [AC_MSG_RESULT([yes])],
321ca28277cbf9882769537fd4c0dfaea224c86eJakub Hrozek [have_curlopt_unix_sockpath=no]
321ca28277cbf9882769537fd4c0dfaea224c86eJakub Hrozek [AC_MSG_RESULT([no, libcurl support will be disabled])],)
321ca28277cbf9882769537fd4c0dfaea224c86eJakub Hrozek CFLAGS=$SAVE_CFLAGS
321ca28277cbf9882769537fd4c0dfaea224c86eJakub HrozekAC_SUBST(CURL_LIBS)
321ca28277cbf9882769537fd4c0dfaea224c86eJakub HrozekAC_SUBST(CURL_CFLAGS)
321ca28277cbf9882769537fd4c0dfaea224c86eJakub HrozekAM_COND_IF([BUILD_WITH_LIBCURL],
321ca28277cbf9882769537fd4c0dfaea224c86eJakub Hrozek [AC_DEFINE_UNQUOTED(HAVE_LIBCURL, 1, [Build with libcurl support])])