configure.ac: add proper check for libcurl + curl/curl.h

Both util/clixon_util_stream.c and lib/src/clixon_stream.c depend on
libcurl.  The latter has `#ifdef CLIXON_PUBLISH_STREAMS` but the former
does not.  So `make util` fails without `--enable-publish` if libcurl
is not installed.

To preserve the original behavior (libcurl is an implicit dependency),
this patch adds a `--without-libcurl` option to indicate this default.
The check for libcurl and curl/curl.h is factored out as a separate
check before checking for `--enable-publish`.  If the two build options
are in conflict we exit with a clear error code.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg 2023-02-07 18:30:33 +01:00
parent a7693c8856
commit e84d43c8e3
4 changed files with 60 additions and 29 deletions

View file

@ -30,8 +30,8 @@
/* Define to 1 if you have the <cligen/cligen.h> header file. */
#undef HAVE_CLIGEN_CLIGEN_H
/* Define to 1 if you have the <curl.h> header file. */
#undef HAVE_CURL_H
/* Define to 1 if you have the <curl/curl.h> header file. */
#undef HAVE_CURL_CURL_H
/* Define to 1 if you have the `getpeereid' function. */
#undef HAVE_GETPEEREID