build-sys: Allow building with curl, but without libsoup
authorAnton Gerasimov <anton.gerasimov@openmailbox.org>
Mon, 8 Jan 2018 13:53:46 +0000 (14:53 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 8 Jan 2018 15:38:07 +0000 (15:38 +0000)
Some people (particularly embedded) may find it simpler to
drop libsoup from the build dependency side, but still use libcurl.

Note though this currently neuters almost all of the tests.

Signed-off-by: Anton Gerasimov <anton.gerasimov@openmailbox.org>
Closes: #1397
Approved by: cgwalters

Makefile-tests.am
configure.ac

index 25a8d08b155e8fdc1eaa399c677f35be4410df70..9198eb3183180d2ef231b0889a5d0ed2bf06b710 100644 (file)
@@ -381,6 +381,14 @@ dist_test_scripts += $(_installed_or_uninstalled_test_scripts)
 test_programs += $(_installed_or_uninstalled_test_programs)
 endif
 
+if !USE_LIBSOUP
+no-soup-for-you-warning:
+       @echo "WARNING: $(PACKAGE) was built without libsoup, which is currently" 1>&2
+       @echo "WARNING: required for many unit tests." 1>&2
+       sleep 10
+check: no-soup-for-you-warning
+endif
+
 # Unfortunately the glib test data APIs don't actually handle
 # non-recursive Automake, so we change our code to canonically look
 # for tests/ which is just a symlink when installed.
index fa436ea6dc4543d1ed7b2b17416a618fde2aed6e..e26c903c538470b57db729e81a58b96886a602e0 100644 (file)
@@ -197,7 +197,7 @@ AM_COND_IF(BUILDOPT_TRIVIAL_HTTPD,
 )
 
 AS_IF([test x$with_curl = xyes && test x$with_soup = xno], [
-  AC_MSG_ERROR([Curl enabled, but libsoup is not; libsoup is needed for tests])
+  AC_MSG_WARN([Curl enabled, but libsoup is not; libsoup is needed for tests (make check, etc.)])
 ])
 AM_CONDITIONAL(USE_CURL_OR_SOUP, test x$with_curl != xno || test x$with_soup != xno)
 AS_IF([test x$with_curl != xno || test x$with_soup != xno],