From: Daniel Elstner Date: Sat, 3 Oct 2015 12:17:07 +0000 (+0200) Subject: build: Do not hard-code decoders location on Windows X-Git-Tag: libsigrokdecode-0.4.0~56 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=583001b3f16795abd24278fbb2e5232a7ca27fb0;p=libsigrokdecode.git build: Do not hard-code decoders location on Windows --- diff --git a/Makefile.am b/Makefile.am index 02f76d9..cd93059 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,7 +23,12 @@ AM_LIBTOOLFLAGS = --silent GNUMAKEFLAGS = --no-print-directory DECODERS_DIR = $(pkgdatadir)/decoders +# Do not hard-code the decoders location on Windows. +if WIN32 +AM_CPPFLAGS = +else AM_CPPFLAGS = -DDECODERS_DIR='"$(DECODERS_DIR)"' +endif # The tests CFLAGS are a superset of the libsigrokdecode CFLAGS. AM_CFLAGS = $(SRD_EXTRA_CFLAGS) $(SRD_WFLAGS) $(TESTS_CFLAGS) diff --git a/configure.ac b/configure.ac index 53e8bc1..09bfd56 100644 --- a/configure.ac +++ b/configure.ac @@ -64,6 +64,8 @@ SR_PKG_VERSION_SET([SRD_PACKAGE_VERSION], [AC_PACKAGE_VERSION]) # http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info SR_LIB_VERSION_SET([SRD_LIB_VERSION], [2:0:0]) +AM_CONDITIONAL([WIN32], [test -z "${host_os##mingw*}" || test -z "${host_os##cygwin*}"]) + ############################ ## Package dependencies ## ############################