Update support for building with MSVC.
diff --git a/ChangeLog b/ChangeLog
index 5622c4e..6e96280 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2016-11-22 Bruno Haible <bruno@clisp.org>
+
+ Update support for building with MSVC.
+ * Makefile.devel (srclib/Makefile.in): Import 'ar-lib' and 'compile'
+ from gnulib.
+ * lib/Makefile.in (install-lib, install): Install the .la file with
+ $(INSTALL), not $(INSTALL_DATA). Otherwise the native Windows DLL gets
+ installed without execution permissions, and programs linked to it fail:
+ in a Cygwin shell with exit code 127, or from a cmd.exe window with a
+ dialog "The application was unable to start correctly (0xc0000022)."
+
2016-11-19 Bruno Haible <bruno@clisp.org>
Fix link error when compiling with gcc -O0.
diff --git a/Makefile.devel b/Makefile.devel
index b67fdb7..1a39bb6 100644
--- a/Makefile.devel
+++ b/Makefile.devel
@@ -90,8 +90,11 @@
fi
srclib/Makefile.in : srclib/Makefile.am srclib/Makefile.gnulib
- touch build-aux/compile \
- && $(AUTOMAKE) --gnits --add-missing srclib/Makefile
+ if test -n "$$GNULIB_TOOL"; then \
+ $$GNULIB_TOOL --copy-file build-aux/ar-lib; \
+ $$GNULIB_TOOL --copy-file build-aux/compile; \
+ fi
+ $(AUTOMAKE) --gnits --add-missing srclib/Makefile
include/iconv.h.build.in : include/iconv.h.in include/export.h
diff --git a/lib/Makefile.in b/lib/Makefile.in
index a538cce..a243f83 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -96,14 +96,14 @@
# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
install-lib : all force
if [ ! -d $(libdir) ] ; then $(mkinstalldirs) $(libdir) ; fi
- $(LIBTOOL_INSTALL) $(INSTALL_DATA) libiconv.la $(libdir)/libiconv.la
+ $(LIBTOOL_INSTALL) $(INSTALL) libiconv.la $(libdir)/libiconv.la
# On AIX, libiconv.a must include the object files of /lib/libiconv.a,
# otherwise the setlocale() call fails when invoked from executables linked
# with -rpath $(libdir), even if linked without -liconv.
install : all force
if [ ! -d $(DESTDIR)$(libdir) ] ; then $(mkinstalldirs) $(DESTDIR)$(libdir) ; fi
- $(LIBTOOL_INSTALL) $(INSTALL_DATA) libiconv.la $(DESTDIR)$(libdir)/libiconv.la
+ $(LIBTOOL_INSTALL) $(INSTALL) libiconv.la $(DESTDIR)$(libdir)/libiconv.la
case "@host_os@" in \
aix*) (cd $(DESTDIR)$(libdir) && \
objects=`ar t libiconv.a`" "`ar t /lib/libiconv.a` && \
diff --git a/libcharset/lib/ChangeLog b/libcharset/lib/ChangeLog
index 29e231a..ab7196b 100644
--- a/libcharset/lib/ChangeLog
+++ b/libcharset/lib/ChangeLog
@@ -1,3 +1,12 @@
+2016-11-22 Bruno Haible <bruno@clisp.org>
+
+ Update support for building with MSVC.
+ * Makefile.in (install-lib, install): Install the .la file with
+ $(INSTALL), not $(INSTALL_DATA). Otherwise the native Windows DLL gets
+ installed without execution permissions, and programs linked to it fail:
+ in a Cygwin shell with exit code 127, or from a cmd.exe window with a
+ dialog "The application was unable to start correctly (0xc0000022)."
+
2012-01-06 Bruno Haible <bruno@clisp.org>
Talk about "native Windows API", not "Woe32".
diff --git a/libcharset/lib/Makefile.in b/libcharset/lib/Makefile.in
index 1707ac9..1c3dbe8 100644
--- a/libcharset/lib/Makefile.in
+++ b/libcharset/lib/Makefile.in
@@ -80,7 +80,7 @@
# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
install-lib : all force
$(mkinstalldirs) $(libdir)
- $(LIBTOOL_INSTALL) $(INSTALL_DATA) libcharset.la $(libdir)/libcharset.la
+ $(LIBTOOL_INSTALL) $(INSTALL) libcharset.la $(libdir)/libcharset.la
test -f $(libdir)/charset.alias && orig=$(libdir)/charset.alias \
|| orig=charset.alias; \
sed -f ref-add.sed $$orig > $(libdir)/t-charset.alias; \
@@ -108,7 +108,7 @@
need_charset_alias=false ; \
fi ; \
$(mkinstalldirs) $(DESTDIR)$(libdir) ; \
- $(LIBTOOL_INSTALL) $(INSTALL_DATA) libcharset.la $(DESTDIR)$(libdir)/libcharset.la
+ $(LIBTOOL_INSTALL) $(INSTALL) libcharset.la $(DESTDIR)$(libdir)/libcharset.la
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
sed -f ref-add.sed $(DESTDIR)$(libdir)/charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
$(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \