diff --git a/cli/Makefile.am b/cli/Makefile.am index eb49b7488..1cae94557 100644 --- a/cli/Makefile.am +++ b/cli/Makefile.am @@ -1,14 +1,14 @@ -AM_CPPFLAGS = -I$(top_srcdir) +AM_CPPFLAGS = -I@top_srcdir@ AM_CFLAGS = \ - $(LIBEVENT_CFLAGS) \ - $(OPENSSL_CFLAGS) \ - $(LIBCURL_CFLAGS) \ - $(ZLIB_CFLAGS) \ - $(PTHREAD_CFLAGS) + @LIBEVENT_CFLAGS@ \ + @OPENSSL_CFLAGS@ \ + @LIBCURL_CFLAGS@ \ + @ZLIB_CFLAGS@ \ + @PTHREAD_CFLAGS@ AM_LDFLAGS = \ - $(ZLIB_LDFLAGS) + @ZLIB_LDFLAGS@ bin_PROGRAMS = transmissioncli @@ -20,11 +20,11 @@ transmissioncli_LDADD = \ $(top_builddir)/libtransmission/libtransmission.a \ $(top_builddir)/third-party/libnatpmp/libnatpmp.a \ $(top_builddir)/third-party/miniupnp/libminiupnp.a \ - $(DHT_LIBS) \ - $(LIBEVENT_LIBS) \ - $(INTLLIBS) \ - $(LIBCURL_LIBS) \ - $(ZLIB_LIBS) \ - $(OPENSSL_LIBS) \ - $(PTHREAD_LIBS) + @DHT_LIBS@ \ + @LIBEVENT_LIBS@ \ + @LIBCURL_LIBS@ \ + @OPENSSL_LIBS@ \ + @INTLLIBS@ \ + @ZLIB_LIBS@ \ + @PTHREAD_LIBS@ diff --git a/configure.ac b/configure.ac index 596f5633c..66e12da63 100644 --- a/configure.ac +++ b/configure.ac @@ -46,17 +46,17 @@ DBUS_GLIB_MINIMUM=0.70 GCONF2_MINIMUM=2.20.0 AC_SUBST(GCONF2_MINIMUM) GIO_MINIMUM=2.15.5 - AC_SUBST(GIO_MINIMUM) + AC_SUBST(GIO_MINIMUM) GLIB_MINIMUM=2.6.0 - AC_SUBST(GLIB_MINIMUM) + AC_SUBST(GLIB_MINIMUM) GTK_MINIMUM=2.6.0 - AC_SUBST(GTK_MINIMUM) + AC_SUBST(GTK_MINIMUM) LIBEVENT_MINIMUM=1.4.5 - AC_SUBST(LIBEVENT_MINIUM) + AC_SUBST(LIBEVENT_MINIUM) LIBNOTIFY_MINIMUM=0.4.3 - AC_SUBST(LIBNOTIFY_MINIMUM) + AC_SUBST(LIBNOTIFY_MINIMUM) OPENSSL_MINIMUM=0.9.4 - AC_SUBST(OPENSSL_MINIMUM) + AC_SUBST(OPENSSL_MINIMUM) AC_PROG_CC AC_PROG_CXX @@ -203,15 +203,15 @@ else LIBEVENT_CFLAGS="" LIBEVENT_LIBS="-levent $libevent_extra_libs" fi -AC_SUBST(LIBEVENT_CFLAGS) -AC_SUBST(LIBEVENT_LIBS) +AC_ARG_VAR([LIBEVENT_CFLAGS], [C compiler flags for LIBEVENT, overriding pkg-config])dnl +AC_ARG_VAR([LIBEVENT_LIBS], [linker flags for LIBEVENT, overriding pkg-config])dnl + dnl ---------------------------------------------------------------------------- dnl dnl dht - DHT_CFLAGS="-I\$(top_srcdir)/third-party/dht" DHT_LIBS="\$(top_builddir)/third-party/dht/libdht.a" AC_SUBST(DHT_CFLAGS) @@ -245,8 +245,6 @@ if test "x$want_gtk" = "xyes" ; then fi fi AM_CONDITIONAL([BUILD_GTK],[test "x$build_gtk" = "xyes"]) -AC_SUBST(GTK_LIBS) -AC_SUBST(GTK_CFLAGS) if test "x$build_gtk" = "xyes"; then @@ -254,8 +252,6 @@ if test "x$build_gtk" = "xyes"; then [gio-2.0 >= $GIO_MINIMUM], [use_gio=yes], [use_gio=no]) - AC_SUBST(GIO_LIBS) - AC_SUBST(GIO_CFLAGS) if test "x$use_gio" = "xyes"; then AC_DEFINE([HAVE_GIO], 1) fi @@ -271,8 +267,6 @@ if test "x$build_gtk" = "xyes"; then if test "x$enable_libnotify" = "xyes" ; then if test "x$have_libnotify" = "xyes"; then use_libnotify=yes - AC_SUBST(LIBNOTIFY_LIBS) - AC_SUBST(LIBNOTIFY_CFLAGS) AC_DEFINE([HAVE_LIBNOTIFY], 1) fi fi @@ -288,8 +282,6 @@ if test "x$build_gtk" = "xyes"; then if test "x$enable_libcanberra" = "xyes" ; then if test "x$have_libcanberra" = "xyes"; then use_canberra=yes - AC_SUBST(LIBCANBERRA_LIBS) - AC_SUBST(LIBCANBERRA_CFLAGS) AC_DEFINE([HAVE_LIBCANBERRA], 1) fi fi @@ -305,8 +297,6 @@ if test "x$build_gtk" = "xyes"; then if test "x$enable_libgconf" = "xyes" ; then if test "x$have_libgconf" = "xyes"; then use_libgconf=yes - AC_SUBST(LIBGCONF_LIBS) - AC_SUBST(LIBGCONF_CFLAGS) AC_DEFINE([HAVE_LIBGCONF], 1) fi fi @@ -315,8 +305,6 @@ if test "x$build_gtk" = "xyes"; then [dbus-glib-1 >= $DBUS_GLIB_MINIMUM], [use_dbus_glib=yes], [use_dbus_glib=no]) - AC_SUBST(DBUS_GLIB_LIBS) - AC_SUBST(DBUS_GLIB_CFLAGS) if test "x$use_dbus_glib" = "xyes"; then AC_DEFINE([HAVE_DBUS_GLIB], 1) fi diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 3ec3862e2..01cf1218a 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -1,14 +1,14 @@ AM_CPPFLAGS = -I@top_srcdir@ -DEMBEDDED AM_CFLAGS = \ - $(LIBEVENT_CFLAGS) \ - $(OPENSSL_CFLAGS) \ - $(LIBCURL_CFLAGS) \ - $(ZLIB_CFLAGS) \ - $(PTHREAD_CFLAGS) + @LIBEVENT_CFLAGS@ \ + @OPENSSL_CFLAGS@ \ + @LIBCURL_CFLAGS@ \ + @ZLIB_CFLAGS@ \ + @PTHREAD_CFLAGS@ AM_LDFLAGS = \ - $(ZLIB_LDFLAGS) + @ZLIB_LDFLAGS@ dist_man_MANS = \ transmission-daemon.1 \ @@ -22,13 +22,13 @@ LDADD = \ $(top_builddir)/libtransmission/libtransmission.a \ $(top_builddir)/third-party/miniupnp/libminiupnp.a \ $(top_builddir)/third-party/libnatpmp/libnatpmp.a \ - $(DHT_LIBS) \ - $(LIBEVENT_LIBS) \ - $(INTLLIBS) \ - $(LIBCURL_LIBS) \ - $(ZLIB_LIBS) \ - $(OPENSSL_LIBS) \ - $(PTHREAD_LIBS) + @DHT_LIBS@ \ + @LIBEVENT_LIBS@ \ + @LIBCURL_LIBS@ \ + @OPENSSL_LIBS@ \ + @INTLLIBS@ \ + @ZLIB_LIBS@ \ + @PTHREAD_LIBS@ noinst_HEADERS = \ watch.h diff --git a/gtk/Makefile.am b/gtk/Makefile.am index cc6e8ed2e..350b2db7f 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -20,20 +20,20 @@ AM_CPPFLAGS = \ $(GTK_EXTRA_CPPFLAGS) AM_CFLAGS = \ - $(LIBEVENT_CFLAGS) \ - $(LIBCANBERRA_CFLAGS) \ - $(LIBGCONF_CFLAGS) \ - $(GTK_CFLAGS) \ - $(LIBCURL_CFLAGS) \ - $(GIO_CFLAGS) \ - $(DBUS_GLIB_CFLAGS) \ - $(LIBNOTIFY_CFLAGS) \ - $(OPENSSL_CFLAGS) \ - $(ZLIB_CFLAGS) \ - $(PTHREAD_CFLAGS) + @LIBEVENT_CFLAGS@ \ + @LIBCANBERRA_CFLAGS@ \ + @LIBGCONF_CFLAGS@ \ + @GTK_CFLAGS@ \ + @LIBCURL_CFLAGS@ \ + @GIO_CFLAGS@ \ + @LIBNOTIFY_CFLAGS@ \ + @DBUS_GLIB_CFLAGS@ \ + @OPENSSL_CFLAGS@ \ + @ZLIB_CFLAGS@ \ + @PTHREAD_CFLAGS@ AM_LDFLAGS = \ - $(ZLIB_LDFLAGS) + @ZLIB_LDFLAGS@ noinst_HEADERS = \ actions.h \ @@ -104,18 +104,18 @@ transmission_LDADD = \ $(top_builddir)/libtransmission/libtransmission.a \ $(top_builddir)/third-party/miniupnp/libminiupnp.a \ $(top_builddir)/third-party/libnatpmp/libnatpmp.a \ - $(LIBCANBERRA_LIBS) \ - $(LIBGCONF_LIBS) \ - $(DHT_LIBS) \ - $(GTK_LIBS) \ - $(GIO_LIBS) \ - $(LIBNOTIFY_LIBS) \ - $(LIBEVENT_LIBS) \ - $(DBUS_GLIB_LIBS) \ - $(OPENSSL_LIBS) \ - $(LIBCURL_LIBS) \ - $(ZLIB_LIBS) \ - $(PTHREAD_LIBS) + @LIBCANBERRA_LIBS@ \ + @LIBGCONF_LIBS@ \ + @DHT_LIBS@ \ + @GTK_LIBS@ \ + @GIO_LIBS@ \ + @LIBNOTIFY_LIBS@ \ + @LIBEVENT_LIBS@ \ + @DBUS_GLIB_LIBS@ \ + @LIBCURL_LIBS@ \ + @OPENSSL_LIBS@ \ + @ZLIB_LIBS@ \ + @PTHREAD_LIBS@ DESKTOP_IN_FILES=transmission.desktop.in DESKTOP_FILES=$(DESKTOP_IN_FILES:.desktop.in=.desktop) diff --git a/libtransmission/Makefile.am b/libtransmission/Makefile.am index c2509ec4a..5edcdb450 100644 --- a/libtransmission/Makefile.am +++ b/libtransmission/Makefile.am @@ -1,12 +1,17 @@ -AM_CPPFLAGS = -I. -I$(top_srcdir) -I$(top_srcdir)/third-party/ -D__TRANSMISSION__ -DPACKAGE_DATA_DIR=\""$(datadir)"\" +AM_CPPFLAGS = \ + -I. \ + -I$(top_srcdir) \ + -I$(top_srcdir)/third-party/ \ + -D__TRANSMISSION__ \ + -DPACKAGE_DATA_DIR=\""$(datadir)"\" AM_CFLAGS = \ - $(DHT_CFLAGS) \ - $(LIBEVENT_CFLAGS) \ - $(LIBCURL_CFLAGS) \ - $(OPENSSL_CFLAGS) \ - $(PTHREAD_CFLAGS) \ - $(ZLIB_CFLAGS) + @DHT_CFLAGS@ \ + @LIBEVENT_CFLAGS@ \ + @LIBCURL_CFLAGS@ \ + @OPENSSL_CFLAGS@ \ + @PTHREAD_CFLAGS@ \ + @ZLIB_CFLAGS@ noinst_LIBRARIES = libtransmission.a @@ -122,19 +127,19 @@ TESTS = \ noinst_PROGRAMS = $(TESTS) apps_ldflags = \ - $(ZLIB_LDFLAGS) + @ZLIB_LDFLAGS@ apps_ldadd = \ ./libtransmission.a \ $(top_builddir)/third-party/miniupnp/libminiupnp.a \ $(top_builddir)/third-party/libnatpmp/libnatpmp.a \ - $(INTLLIBS) \ - $(DHT_LIBS) \ - $(LIBEVENT_LIBS) \ - $(LIBCURL_LIBS) \ - $(OPENSSL_LIBS) \ - $(PTHREAD_LIBS) \ - $(ZLIB_LIBS) + @INTLLIBS@ \ + @DHT_LIBS@ \ + @LIBCURL_LIBS@ \ + @LIBEVENT_LIBS@ \ + @OPENSSL_LIBS@ \ + @PTHREAD_LIBS@ \ + @ZLIB_LIBS@ bencode_test_SOURCES = bencode-test.c bencode_test_LDADD = ${apps_ldadd}