summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-12-19 14:04:33 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-12-19 14:04:33 +0000
commit4dde292c4237013057d636885d500362dc92f562 (patch)
treefd5d01c97a362b003f8105d65f95b517ab1b70eb
parent738536ef96851d77d46bd1e8096a243421d9959e (diff)
WIN32: do not install shell scripts
git-svn-id: svn://tug.org/texlive/trunk@20804 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/kpathsea/ChangeLog5
-rw-r--r--Build/source/texk/kpathsea/Makefile.am11
-rw-r--r--Build/source/texk/kpathsea/Makefile.in54
-rw-r--r--Build/source/utils/chktex/ChangeLog4
-rw-r--r--Build/source/utils/chktex/Makefile.am6
-rw-r--r--Build/source/utils/chktex/Makefile.in84
-rw-r--r--Build/source/utils/chktex/aclocal.m41
-rwxr-xr-xBuild/source/utils/chktex/configure61
-rw-r--r--Build/source/utils/chktex/configure.ac3
9 files changed, 134 insertions, 95 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 1edf310abee..e445a867da1 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am [WIN32]: Skip mktex{lsr,mf,pk,tfm} shell scripts
+ and texhash->mktexlsr symlink.
+
2010-12-01 Peter Breitenlohner <peb@mppmu.mpg.de>
* tex-make.c (maketex): Factor out common WIN32 & Unix code.
diff --git a/Build/source/texk/kpathsea/Makefile.am b/Build/source/texk/kpathsea/Makefile.am
index 30995774403..c89cb80fbfd 100644
--- a/Build/source/texk/kpathsea/Makefile.am
+++ b/Build/source/texk/kpathsea/Makefile.am
@@ -263,6 +263,7 @@ bin_links = \
mktexlsr:texhash
install-exec-hook:
+if !WIN32
@for f in $(dist_noinst_SCRIPTS); do \
if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1 \
|| test ! -r "$(DESTDIR)$(bindir)/$$f"; then \
@@ -278,7 +279,7 @@ install-exec-hook:
echo "creating link '$$link' -> '$$file'"; \
$(LN_S) $$file $$link; \
done
-
+endif !WIN32
install-data-hook:
@for f in $(dist_noinst_DATA); do \
@@ -290,9 +291,9 @@ install-data-hook:
done
uninstall-hook:
+if !WIN32
@for f in $(dist_noinst_SCRIPTS); do \
- if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1 \
- || test ! -r "$(DESTDIR)$(bindir)/$$f"; then \
+ if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1; then \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
else :; fi; \
@@ -301,9 +302,9 @@ uninstall-hook:
link=`echo $$s | sed 's,.*:,,'`; \
rm -f $(DESTDIR)$(bindir)/$$link; \
done
+endif !WIN32
@for f in $(dist_noinst_DATA); do \
- if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1 \
- || test ! -r "$(DESTDIR)$(web2cdir)/$$f"; then \
+ if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1; then \
echo " rm -f '$(DESTDIR)$(web2cdir)/$$f'"; \
rm -f "$(DESTDIR)$(web2cdir)/$$f"; \
else :; fi; \
diff --git a/Build/source/texk/kpathsea/Makefile.in b/Build/source/texk/kpathsea/Makefile.in
index 75a87f8b43b..bd1a781678d 100644
--- a/Build/source/texk/kpathsea/Makefile.in
+++ b/Build/source/texk/kpathsea/Makefile.in
@@ -1796,21 +1796,21 @@ kpathsea.h: Makefile paths.h
-e 's,^,#include <kpathsea/,' -e s',$$,>,' >>$@
install-exec-hook:
- @for f in $(dist_noinst_SCRIPTS); do \
- if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1 \
- || test ! -r "$(DESTDIR)$(bindir)/$$f"; then \
- echo " $(INSTALL_SCRIPT) '$(srcdir)/$$f' '$(DESTDIR)$(bindir)/$$f'"; \
- $(INSTALL_SCRIPT) "$(srcdir)/$$f" "$(DESTDIR)$(bindir)/$$f"; \
- else :; fi; \
- done
- @cd $(DESTDIR)$(bindir) && \
- for s in $(bin_links); do \
- link=`echo $$s | sed 's,.*:,,'`; \
- file=`echo $$s | sed 's,:.*,,'`; \
- rm -f $$link; \
- echo "creating link '$$link' -> '$$file'"; \
- $(LN_S) $$file $$link; \
- done
+@WIN32_FALSE@ @for f in $(dist_noinst_SCRIPTS); do \
+@WIN32_FALSE@ if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1 \
+@WIN32_FALSE@ || test ! -r "$(DESTDIR)$(bindir)/$$f"; then \
+@WIN32_FALSE@ echo " $(INSTALL_SCRIPT) '$(srcdir)/$$f' '$(DESTDIR)$(bindir)/$$f'"; \
+@WIN32_FALSE@ $(INSTALL_SCRIPT) "$(srcdir)/$$f" "$(DESTDIR)$(bindir)/$$f"; \
+@WIN32_FALSE@ else :; fi; \
+@WIN32_FALSE@ done
+@WIN32_FALSE@ @cd $(DESTDIR)$(bindir) && \
+@WIN32_FALSE@ for s in $(bin_links); do \
+@WIN32_FALSE@ link=`echo $$s | sed 's,.*:,,'`; \
+@WIN32_FALSE@ file=`echo $$s | sed 's,:.*,,'`; \
+@WIN32_FALSE@ rm -f $$link; \
+@WIN32_FALSE@ echo "creating link '$$link' -> '$$file'"; \
+@WIN32_FALSE@ $(LN_S) $$file $$link; \
+@WIN32_FALSE@ done
install-data-hook:
@for f in $(dist_noinst_DATA); do \
@@ -1822,20 +1822,18 @@ install-data-hook:
done
uninstall-hook:
- @for f in $(dist_noinst_SCRIPTS); do \
- if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1 \
- || test ! -r "$(DESTDIR)$(bindir)/$$f"; then \
- echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
- rm -f "$(DESTDIR)$(bindir)/$$f"; \
- else :; fi; \
- done
- @for s in $(bin_links); do \
- link=`echo $$s | sed 's,.*:,,'`; \
- rm -f $(DESTDIR)$(bindir)/$$link; \
- done
+@WIN32_FALSE@ @for f in $(dist_noinst_SCRIPTS); do \
+@WIN32_FALSE@ if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1; then \
+@WIN32_FALSE@ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+@WIN32_FALSE@ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+@WIN32_FALSE@ else :; fi; \
+@WIN32_FALSE@ done
+@WIN32_FALSE@ @for s in $(bin_links); do \
+@WIN32_FALSE@ link=`echo $$s | sed 's,.*:,,'`; \
+@WIN32_FALSE@ rm -f $(DESTDIR)$(bindir)/$$link; \
+@WIN32_FALSE@ done
@for f in $(dist_noinst_DATA); do \
- if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1 \
- || test ! -r "$(DESTDIR)$(web2cdir)/$$f"; then \
+ if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1; then \
echo " rm -f '$(DESTDIR)$(web2cdir)/$$f'"; \
rm -f "$(DESTDIR)$(web2cdir)/$$f"; \
else :; fi; \
diff --git a/Build/source/utils/chktex/ChangeLog b/Build/source/utils/chktex/ChangeLog
index 279cb70daf2..4331fb72ac3 100644
--- a/Build/source/utils/chktex/ChangeLog
+++ b/Build/source/utils/chktex/ChangeLog
@@ -1,3 +1,7 @@
+2010-12-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am, configure.ac [WIN32]: Skip chkweb shell script.
+
2010-06-10 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am (AM_CPPFLAGS): Added -DNO_KPSE_DLL.
diff --git a/Build/source/utils/chktex/Makefile.am b/Build/source/utils/chktex/Makefile.am
index 18e177e2d7d..08c4209bc56 100644
--- a/Build/source/utils/chktex/Makefile.am
+++ b/Build/source/utils/chktex/Makefile.am
@@ -47,13 +47,15 @@ chktex_SOURCES = \
$(CHKTEX_TREE)/Utility.h \
$(CHKTEX_TREE)/types.h
-dist_man_MANS = \
+man_MANS = \
$(CHKTEX_TREE)/chktex.1 \
$(CHKTEX_TREE)/chkweb.1 \
$(CHKTEX_TREE)/deweb.1
-dist_bin_SCRIPTS = $(CHKTEX_TREE)/chkweb
nodist_bin_SCRIPTS = deweb
+if !WIN32
+nodist_bin_SCRIPTS += $(CHKTEX_TREE)/chkweb
+endif !WIN32
# resource file
configdir = ${prefix}/texmf/chktex
diff --git a/Build/source/utils/chktex/Makefile.in b/Build/source/utils/chktex/Makefile.in
index 7fef3e26d00..04e567b1dee 100644
--- a/Build/source/utils/chktex/Makefile.in
+++ b/Build/source/utils/chktex/Makefile.in
@@ -35,9 +35,9 @@ NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = chktex$(EXEEXT)
+@WIN32_FALSE@am__append_1 = $(CHKTEX_TREE)/chkweb
subdir = .
-DIST_COMMON = $(am__configure_deps) $(dist_bin_SCRIPTS) \
- $(dist_man_MANS) $(dist_pdfdoc_DATA) \
+DIST_COMMON = $(am__configure_deps) $(dist_pdfdoc_DATA) \
$(srcdir)/../../build-aux/depcomp \
$(srcdir)/../../build-aux/install-sh \
$(srcdir)/../../build-aux/missing $(srcdir)/Makefile.am \
@@ -50,6 +50,7 @@ DIST_COMMON = $(am__configure_deps) $(dist_bin_SCRIPTS) \
../../build-aux/texinfo.tex ../../build-aux/ylwrap ChangeLog
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-warnings.m4 \
+ $(top_srcdir)/../../m4/kpse-win32.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@@ -60,8 +61,8 @@ CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = ChkTeX.tmp deweb
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
- "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
- "$(DESTDIR)$(configdir)" "$(DESTDIR)$(pdfdocdir)"
+ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(configdir)" \
+ "$(DESTDIR)$(pdfdocdir)"
PROGRAMS = $(bin_PROGRAMS)
am_chktex_OBJECTS = getopt.$(OBJEXT) getopt1.$(OBJEXT) \
ChkTeX.$(OBJEXT) FindErrs.$(OBJEXT) OpSys.$(OBJEXT) \
@@ -89,7 +90,7 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-SCRIPTS = $(dist_bin_SCRIPTS) $(nodist_bin_SCRIPTS)
+SCRIPTS = $(nodist_bin_SCRIPTS)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp
am__depfiles_maybe = depfiles
@@ -102,7 +103,7 @@ SOURCES = $(chktex_SOURCES)
DIST_SOURCES = $(chktex_SOURCES)
man1dir = $(mandir)/man1
NROFF = nroff
-MANS = $(dist_man_MANS)
+MANS = $(man_MANS)
DATA = $(config_DATA) $(dist_pdfdoc_DATA)
ETAGS = etags
CTAGS = ctags
@@ -239,13 +240,12 @@ chktex_SOURCES = \
$(CHKTEX_TREE)/Utility.h \
$(CHKTEX_TREE)/types.h
-dist_man_MANS = \
+man_MANS = \
$(CHKTEX_TREE)/chktex.1 \
$(CHKTEX_TREE)/chkweb.1 \
$(CHKTEX_TREE)/deweb.1
-dist_bin_SCRIPTS = $(CHKTEX_TREE)/chkweb
-nodist_bin_SCRIPTS = deweb
+nodist_bin_SCRIPTS = deweb $(am__append_1)
# resource file
configdir = ${prefix}/texmf/chktex
@@ -360,40 +360,6 @@ clean-binPROGRAMS:
chktex$(EXEEXT): $(chktex_OBJECTS) $(chktex_DEPENDENCIES)
@rm -f chktex$(EXEEXT)
$(LINK) $(chktex_OBJECTS) $(chktex_LDADD) $(LIBS)
-install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
- @$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
- @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
- done | \
- sed -e 'p;s,.*/,,;n' \
- -e 'h;s|.*|.|' \
- -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) { files[d] = files[d] " " $$1; \
- if (++n[d] == $(am__install_max)) { \
- print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
- else { print "f", d "/" $$4, $$1 } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
- $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-dist_binSCRIPTS:
- @$(NORMAL_UNINSTALL)
- @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
install-nodist_binSCRIPTS: $(nodist_bin_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@@ -526,12 +492,12 @@ Utility.obj: $(CHKTEX_TREE)/Utility.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(CHKTEX_TREE)/Utility.c' object='Utility.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o Utility.obj `if test -f '$(CHKTEX_TREE)/Utility.c'; then $(CYGPATH_W) '$(CHKTEX_TREE)/Utility.c'; else $(CYGPATH_W) '$(srcdir)/$(CHKTEX_TREE)/Utility.c'; fi`
-install-man1: $(dist_man_MANS)
+install-man1: $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@list=''; test -n "$(man1dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
- l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
@@ -557,7 +523,7 @@ uninstall-man1:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man1dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
- l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
@@ -918,7 +884,7 @@ check: check-am
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) config.h \
all-local
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(pdfdocdir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(pdfdocdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -978,8 +944,7 @@ install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binPROGRAMS install-dist_binSCRIPTS \
- install-nodist_binSCRIPTS
+install-exec-am: install-binPROGRAMS install-nodist_binSCRIPTS
install-html: install-html-am
@@ -1021,8 +986,8 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-configDATA \
- uninstall-dist_binSCRIPTS uninstall-dist_pdfdocDATA \
- uninstall-man uninstall-nodist_binSCRIPTS
+ uninstall-dist_pdfdocDATA uninstall-man \
+ uninstall-nodist_binSCRIPTS
uninstall-man: uninstall-man1
@@ -1036,18 +1001,17 @@ uninstall-man: uninstall-man1
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-configDATA install-data \
- install-data-am install-dist_binSCRIPTS \
- install-dist_pdfdocDATA install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-man1 \
- install-nodist_binSCRIPTS install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+ install-data-am install-dist_pdfdocDATA install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-man1 install-nodist_binSCRIPTS install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-binPROGRAMS uninstall-configDATA \
- uninstall-dist_binSCRIPTS uninstall-dist_pdfdocDATA \
- uninstall-man uninstall-man1 uninstall-nodist_binSCRIPTS
+ uninstall-dist_pdfdocDATA uninstall-man uninstall-man1 \
+ uninstall-nodist_binSCRIPTS
# in case of an SVN repository
diff --git a/Build/source/utils/chktex/aclocal.m4 b/Build/source/utils/chktex/aclocal.m4
index 8cd538d37dc..fec8c1cedf3 100644
--- a/Build/source/utils/chktex/aclocal.m4
+++ b/Build/source/utils/chktex/aclocal.m4
@@ -990,3 +990,4 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([../../m4/kpse-warnings.m4])
+m4_include([../../m4/kpse-win32.m4])
diff --git a/Build/source/utils/chktex/configure b/Build/source/utils/chktex/configure
index f59e33164da..526c4486123 100755
--- a/Build/source/utils/chktex/configure
+++ b/Build/source/utils/chktex/configure
@@ -608,6 +608,8 @@ LTLIBOBJS
LIBOBJS
PERL5
CHKTEX_TREE
+WIN32_FALSE
+WIN32_TRUE
PDF_DEPEND
EGREP
GREP
@@ -4568,6 +4570,61 @@ ac_config_headers="$ac_config_headers config.h"
$as_echo "#define TEX_LIVE 1" >>confdefs.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native WIN32 or MINGW32" >&5
+$as_echo_n "checking for native WIN32 or MINGW32... " >&6; }
+if ${kpse_cv_have_win32+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef WIN32
+ choke me
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __MINGW32__
+ choke me
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ kpse_cv_have_win32=mingw32
+else
+ kpse_cv_have_win32=native
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ kpse_cv_have_win32=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_win32" >&5
+$as_echo "$kpse_cv_have_win32" >&6; }
+
+ if test "x$kpse_cv_have_win32" != xno; then
+ WIN32_TRUE=
+ WIN32_FALSE='#'
+else
+ WIN32_TRUE='#'
+ WIN32_FALSE=
+fi
+
+
CHKTEX_TREE=chktex-1.6.4
PERL5='/usr/bin/env perl'
@@ -4709,6 +4766,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then
+ as_fn_error $? "conditional \"WIN32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
diff --git a/Build/source/utils/chktex/configure.ac b/Build/source/utils/chktex/configure.ac
index edfb84ccd6e..71c552da04c 100644
--- a/Build/source/utils/chktex/configure.ac
+++ b/Build/source/utils/chktex/configure.ac
@@ -55,6 +55,9 @@ AC_SUBST([PDF_DEPEND])
AC_CONFIG_HEADERS([config.h])
AC_DEFINE([TEX_LIVE], 1, [Define to 1 for a TeX Live build.])
+KPSE_CHECK_WIN32
+AM_CONDITIONAL([WIN32], [test "x$kpse_cv_have_win32" != xno])
+
AC_SUBST([CHKTEX_TREE], [chktex-]chktex_version)
AC_SUBST([PERL5], ['/usr/bin/env perl'])