From: Klas Lindfors Date: Fri, 12 Apr 2013 11:13:32 +0000 (+0200) Subject: make building work on windows X-Git-Tag: v1.13.0~48 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7085ac278e0e6195695953b41484054f38240913;p=yubikey-personalization make building work on windows also prefer json-c over json --- diff --git a/configure.ac b/configure.ac index 97b76be..49d5a82 100644 --- a/configure.ac +++ b/configure.ac @@ -125,7 +125,7 @@ AM_CONDITIONAL([BACKEND_LIBUSB_1_0], test x$with_backend = xlibusb-1.0) AM_CONDITIONAL([BACKEND_OSX], test x$with_backend = xosx) AM_CONDITIONAL([BACKEND_WINDOWS], test x$with_backend = xwindows) -PKG_CHECK_MODULES([libjson], [json]) +PKG_CHECK_MODULES([libjson], [json-c], [], [PKG_CHECK_MODULES([libjson], [json])]) AC_ARG_WITH([udevrulesdir], AS_HELP_STRING([--with-udevrulesdir=DIR], [Install udev rules into this directory]), diff --git a/ykpers4win.mk b/ykpers4win.mk index 0c695ae..bd2c893 100644 --- a/ykpers4win.mk +++ b/ykpers4win.mk @@ -1,5 +1,5 @@ # Written by Simon Josefsson . -# Copyright (c) 2010-2012 Yubico AB +# Copyright (c) 2010-2013 Yubico AB # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -27,6 +27,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. LIBYUBIKEYVERSION=1.10 +LIBJSONVERSION=0.11-20130402 PROJECT=yubikey-personalization PACKAGE=ykpers @@ -44,6 +45,13 @@ usage: ykpers4win: rm -rf tmp && mkdir tmp && cd tmp && \ + cp ../json-c-$(LIBJSONVERSION) . \ + || wget https://github.com/json-c/json-c/tarball/json-c-$(LIBJSONVERSION) && \ + tar xfa json-c-$(LIBJSONVERSION) && \ + cd json-c-json-c-* && \ + ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes ./configure --host=$(HOST) --build=x86_64-unknown-linux-gnu --prefix=$(PWD)/tmp/root && \ + make install && \ + cd .. && \ cp ../libyubikey-$(LIBYUBIKEYVERSION).tar.gz . \ || wget http://yubico-c.googlecode.com/files/libyubikey-$(LIBYUBIKEYVERSION).tar.gz && \ tar xfa libyubikey-$(LIBYUBIKEYVERSION).tar.gz && \ @@ -55,7 +63,7 @@ ykpers4win: || wget http://yubikey-personalization.googlecode.com/files/ykpers-$(VERSION).tar.gz && \ tar xfa ykpers-$(VERSION).tar.gz && \ cd ykpers-$(VERSION)/ && \ - lt_cv_deplibs_check_method=pass_all ./configure --host=$(HOST) --build=x86_64-unknown-linux-gnu --prefix=$(PWD)/tmp/root LDFLAGS=-L$(PWD)/tmp/root/lib CPPFLAGS=-I$(PWD)/tmp/root/include && \ + PKG_CONFIG_PATH=$(PWD)/tmp/root/lib/pkgconfig lt_cv_deplibs_check_method=pass_all ./configure --disable-silent-rules --host=$(HOST) --build=x86_64-unknown-linux-gnu --prefix=$(PWD)/tmp/root LDFLAGS=-L$(PWD)/tmp/root/lib CPPFLAGS=-I$(PWD)/tmp/root/include && \ make install $(CHECK) && \ cd .. && \ cd root && \