diff options
author | Nicolas Williams <nico@cryptonector.com> | 2016-01-15 16:06:30 -0600 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2016-01-16 16:51:01 -0600 |
commit | ec07936888b845c608a0d63aa833a91844efde0c (patch) | |
tree | 112e7425902521e10952ea20def83ba47bc57b1c | |
parent | 8e4724e16cf681126a4dc5f288e30b7926ed35b2 (diff) |
Fix Windows build (fix #911)
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/linker.c | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 3ec4dbc9..83f99071 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,6 +50,10 @@ libjq_la_SOURCES = ${LIBJQ_SRC} libjq_la_LIBADD = -lm libjq_la_LDFLAGS = -export-symbols-regex '^j[qv]_' -version-info 1:4:0 +if WIN32 +libjq_la_LIBADD += -lshlwapi +endif + include_HEADERS = src/jv.h src/jq.h ### Running tests under Valgrind diff --git a/configure.ac b/configure.ac index 7f6be347..03aa71d2 100644 --- a/configure.ac +++ b/configure.ac @@ -81,6 +81,8 @@ fi AC_CHECK_FUNCS(memmem) AC_CHECK_FUNCS(mkstemp) +AC_CHECK_HEADER("shlwapi.h",[have_win32=1;]) +AM_CONDITIONAL([WIN32], [test "x$have_win32" = x1]) dnl Running tests with Valgrind is slow. It is faster to iterate on dnl code without Valgrind until tests pass, then enable Valgrind and diff --git a/src/linker.c b/src/linker.c index 85378a2d..ad869da3 100644 --- a/src/linker.c +++ b/src/linker.c @@ -8,6 +8,10 @@ #include <sys/stat.h> #include <libgen.h> +#ifdef WIN32 +#include <shlwapi.h> +#endif + #include "jq_parser.h" #include "locfile.h" #include "jv.h" |