diff --git a/configure.ac b/configure.ac index 4761083e4..bb771dc2a 100644 --- a/configure.ac +++ b/configure.ac @@ -191,17 +191,17 @@ AS_IF([test "$gnurl" = 1], [AM_CONDITIONAL(HAVE_LIBGNURL, true) AC_DEFINE([HAVE_LIBGNURL],[1],[Have libgnurl]) AM_CONDITIONAL(HAVE_LIBCURL, false) - AC_DEFINE([HAVE_LIBCURL],[0],[Lacking libcurl])], + AC_DEFINE([HAVE_LIBCURL],[0],[Lacking libcurl]) + [LIBGNURLCURL_LIBS="-lgnurl"]], [AS_IF([test "$curl" = 1], [AM_CONDITIONAL(HAVE_LIBGNURL, false) AC_DEFINE([HAVE_LIBGNURL],[0],[Lacking libgnurl]) AM_CONDITIONAL(HAVE_LIBCURL, true) AC_DEFINE([HAVE_LIBCURL],[1],[Have libcurl])], - [AC_MSG_WARN([WARNING: No libgnurl/libcurl, taler-bank support will not be compiled]) - AM_CONDITIONAL(HAVE_LIBGNURL, false) - AC_DEFINE([HAVE_LIBGNURL],[0],[Lacking libgnurl]) - AM_CONDITIONAL(HAVE_LIBCURL, false) - AC_DEFINE([HAVE_LIBCURL],[0],[Lacking libcurl])])]) + [LIBGNURLCURL_LIBS="-lcurl"] + [AC_MSG_ERROR([WARNING: No libgnurl/libcurl, taler-bank support will not be compiled])])]) + +AC_SUBST([LIBGNURLCURL_LIBS]) # Check for GNUnet's libgnunetcurl. libgnunetcurl=0 diff --git a/src/Makefile.am b/src/Makefile.am index d3fde4c1d..8ad3e88e9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,13 +3,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/include if HAVE_POSTGRESQL PQ_DIR = pq endif -if HAVE_LIBCURL - BANK_LIB = bank-lib -else -if HAVE_LIBGNURL - BANK_LIB = bank-lib -endif -endif pkgcfgdir = $(prefix)/share/taler/config.d/ pkgcfg_DATA = \ @@ -18,11 +11,18 @@ pkgcfg_DATA = \ EXTRA_DIST = \ taler.conf -SUBDIRS = include util json curl $(PQ_DIR) mhd $(BANK_LIB) exchangedb exchange exchange-tools auditordb auditor -if HAVE_LIBCURL - SUBDIRS += lib benchmark -else -if HAVE_LIBGNURL - SUBDIRS += lib benchmark -endif -endif +SUBDIRS = \ + include \ + util \ + json \ + curl \ + $(PQ_DIR) \ + mhd \ + bank-lib \ + exchangedb \ + exchange \ + exchange-tools \ + auditordb \ + auditor \ + lib \ + benchmark diff --git a/src/bank-lib/Makefile.am b/src/bank-lib/Makefile.am index a428f5ffd..61bddf3b6 100644 --- a/src/bank-lib/Makefile.am +++ b/src/bank-lib/Makefile.am @@ -50,6 +50,7 @@ libtalerbank_la_LIBADD = \ -lgnunetjson \ -lgnunetutil \ -ljansson \ + $(LIBGNURLCURL_LIBS) \ $(XLIB) libtalerfakebank_la_LDFLAGS = \ @@ -65,11 +66,3 @@ libtalerfakebank_la_LIBADD = \ -ljansson \ -lmicrohttpd \ $(XLIB) - -if HAVE_LIBCURL -libtalerbank_la_LIBADD += -lcurl -else -if HAVE_LIBGNURL -libtalerbank_la_LIBADD += -lgnurl -endif -endif diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 5dfd9059c..b70289512 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -41,14 +41,8 @@ libtalerexchange_la_LIBADD = \ -lgnunetjson \ -lgnunetutil \ -ljansson \ + $(LIBGNURLCURL_LIBS) \ $(XLIB) -if HAVE_LIBCURL -libtalerexchange_la_LIBADD += -lcurl -else -if HAVE_LIBGNURL -libtalerexchange_la_LIBADD += -lgnurl -endif -endif libtalerauditor_la_LDFLAGS = \ -version-info 0:0:0 \ @@ -66,14 +60,8 @@ libtalerauditor_la_LIBADD = \ -lgnunetjson \ -lgnunetutil \ -ljansson \ + $(LIBGNURLCURL_LIBS) \ $(XLIB) -if HAVE_LIBCURL -libtalerauditor_la_LIBADD += -lcurl -else -if HAVE_LIBGNURL -libtalerauditor_la_LIBADD += -lgnurl -endif -endif libtalertesting_la_LDFLAGS = \ -version-info 0:0:0 \