diff --git a/libtransmission/Makefile.am b/libtransmission/Makefile.am index 8d2c95b61..4bea00f9c 100644 --- a/libtransmission/Makefile.am +++ b/libtransmission/Makefile.am @@ -1,4 +1,8 @@ -AM_CPPFLAGS = -I. -I$(top_srcdir) -I$(top_srcdir)/third-party/ -D__TRANSMISSION__ $(LIBEVENT_CPPFLAGS) +AM_CPPFLAGS = \ + -I. -I$(top_srcdir) -I$(top_srcdir)/third-party/ \ + -D__TRANSMISSION__ $(LIBEVENT_CPPFLAGS) \ + -DPACKAGE_DATA_DIR=\""$(datadir)"\" + AM_CFLAGS = $(LIBCURL_CFLAGS) $(OPENSSL_CFLAGS) $(PTHREAD_CFLAGS) noinst_LIBRARIES = libtransmission.a diff --git a/libtransmission/platform.c b/libtransmission/platform.c index 4e271306a..960e93a6c 100644 --- a/libtransmission/platform.c +++ b/libtransmission/platform.c @@ -563,7 +563,7 @@ tr_getClutchDir( const tr_session * session UNUSED ) /* XDG_DATA_DIRS are the backup directories */ s = getenv( "XDG_DATA_DIRS" ); if( !s || !*s ) - s = "/usr/local/share/:/usr/share/"; + s = PACKAGE_DATA_DIR ":/usr/local/share/:/usr/share/"; while( s && *s ) { char * end = strchr( s, ':' ); if( end ) {