We need an ENABLE_CURL, too

It is not enough to just have CURL in BUILD_TYPE or not. At least the
ftp UCP requires libcurl unconditionally, so it can't be built if we
don't have either a system or bundled libcurl.

Change-Id: I38e9939acb160d581e9a070a6cd7a0c89ddb5266
diff --git a/config_host.mk.in b/config_host.mk.in
index 79958f9..e1f0226f 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -108,6 +108,7 @@ export ENABLE_CAIRO_CANVAS=@ENABLE_CAIRO_CANVAS@
export ENABLE_CMIS=@ENABLE_CMIS@
export ENABLE_CRASHDUMP=@ENABLE_CRASHDUMP@
export ENABLE_CUPS=@ENABLE_CUPS@
export ENABLE_CURL=@ENABLE_CURL@
export ENABLE_DBGUTIL=@ENABLE_DBGUTIL@
export ENABLE_DBUS=@ENABLE_DBUS@
export ENABLE_DEBUG=@ENABLE_DEBUG@
diff --git a/configure.ac b/configure.ac
index 7aad761..c3ffe05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8640,17 +8640,21 @@ if test "$with_system_curl" = "yes"; then
    libo_MINGW_TRY_DLL([libgpg-error])
    libo_MINGW_TRY_DLL([libgcrypt])
    libo_MINGW_TRY_DLL([libssh2])
    ENABLE_CURL=TRUE
elif test $_os = iOS; then
    # Let's see if we need curl, I think not?
    AC_MSG_RESULT([none])
    ENABLE_CURL=
else
    AC_MSG_RESULT([internal])
    SYSTEM_CURL=NO
    BUILD_TYPE="$BUILD_TYPE CURL"
    ENABLE_CURL=TRUE
fi
AC_SUBST(SYSTEM_CURL)
AC_SUBST(CURL_CFLAGS)
AC_SUBST(CURL_LIBS)
AC_SUBST(ENABLE_CURL)

dnl ===================================================================
dnl Check for system boost
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index ad1ac490..c044e14 100755
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -96,7 +96,7 @@ $(eval $(call gb_Rdb_add_components,services,\
	ucb/source/ucp/expand/ucpexpand1 \
	ucb/source/ucp/ext/ucpext \
	ucb/source/ucp/file/ucpfile1 \
	ucb/source/ucp/ftp/ucpftp1 \
	$(if $(ENABLE_CURL),ucb/source/ucp/ftp/ucpftp1) \
	ucb/source/ucp/hierarchy/ucphier1 \
	ucb/source/ucp/package/ucppkg1 \
	ucb/source/ucp/tdoc/ucptdoc1 \
diff --git a/ucb/Module_ucb.mk b/ucb/Module_ucb.mk
index 805a21b..1e64c24 100644
--- a/ucb/Module_ucb.mk
+++ b/ucb/Module_ucb.mk
@@ -17,7 +17,7 @@ $(eval $(call gb_Module_add_targets,ucb,\
	Library_ucpexpand1 \
	Library_ucpext \
	Library_ucpfile1 \
	Library_ucpftp1 \
	$(if $(ENABLE_CURL),Library_ucpftp1) \
	Library_ucphier1 \
	Library_ucppkg1 \
	Library_ucptdoc1 \