aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-10-15 09:18:42 +0000
committerWerner Koch <[email protected]>2014-10-15 09:18:42 +0000
commit7285a27a7985c10f6778c67b31dd501e6594cb44 (patch)
tree737042a51c22a901449138479571e20bad19da5e
parentChange gpgrt_pending{,_unlocked} to macros. (diff)
downloadlibgpg-error-7285a27a7985c10f6778c67b31dd501e6594cb44.tar.gz
libgpg-error-7285a27a7985c10f6778c67b31dd501e6594cb44.zip
Fix to help building native on Windows.
* configure.ac (FORCE_USE_SYSCFG): New am_conditional. * src/Makefile.am: Use new conditional to decide whether to build the native lock object header. -- This should help to build using msys2 and mingw. GnuPG-bug-id: 1717 Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--configure.ac7
-rw-r--r--src/Makefile.am6
2 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 4652a2b..b55051d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -452,6 +452,7 @@ AC_SUBST(GPG_ERROR_CONFIG_HOST)
#
# Special defines for certain platforms
#
+force_use_syscfg=no
if test "$have_w32_system" = yes; then
AC_DEFINE(HAVE_W32_SYSTEM,1,[Defined if we run on a W32 API based system])
if test "$have_w64_system" = yes; then
@@ -461,11 +462,17 @@ if test "$have_w32_system" = yes; then
AC_DEFINE(HAVE_W32CE_SYSTEM,1,[Defined if we run on WindowsCE])
GPG_ERROR_CONFIG_ISUBDIRAFTER="gpg-extra"
fi
+ force_use_syscfg=yes
fi
+if test x$cross_compiling = xyes; then
+ force_use_syscfg=yes
+fi
+
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
AM_CONDITIONAL(HAVE_W64_SYSTEM, test "$have_w64_system" = yes)
AM_CONDITIONAL(HAVE_W32CE_SYSTEM, test "$have_w32ce_system" = yes)
AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
+AM_CONDITIONAL(FORCE_USE_SYSCFG, test x$force_use_syscfg = xyes)
AC_DEFINE_UNQUOTED(HOST_TRIPLET_STRING, "$host", [The host triplet])
diff --git a/src/Makefile.am b/src/Makefile.am
index 65f8513..efc5970 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -262,9 +262,9 @@ parts_of_gpg_error_h = \
w32ce-add.h \
$(lock_obj_pub)
-# If we are cross-compiling we better make sure that no stale native
-# lock include file will be found by mkheader.
-if CROSS_COMPILING
+# If we are cross-compiling or building on Windows we better make sure
+# that no stale native lock include file will be found by mkheader.
+if FORCE_USE_SYSCFG
pre_mkheader_cmds = -rm lock-obj-pub.native.h 2>/dev/null
else
pre_mkheader_cmds = :