aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2010-09-18 15:57:06 +0200
committerEli Zaretskii2010-09-18 15:57:06 +0200
commit1ff11b21a8d1f4aaf02325e8cba2e83e99a2f110 (patch)
tree9acee5b47109afefb9911a033e14509a3139153e
parent25b88a3dc4308d952e2fbc036501867aa9e828aa (diff)
downloademacs-1ff11b21a8d1f4aaf02325e8cba2e83e99a2f110.tar.gz
emacs-1ff11b21a8d1f4aaf02325e8cba2e83e99a2f110.zip
Support building with libxml2, if it is installed.
config.bat: Detect that libxml2 is installed and if so, build with it.
-rw-r--r--ChangeLog5
-rw-r--r--config.bat26
2 files changed, 31 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a8879b330c9..5aed472bf3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12010-09-18 Eli Zaretskii <eliz@gnu.org>
2
3 * config.bat: Detect that libxml2 is installed and if so, build
4 with it.
5
12010-09-13 Lars Magne Ingebrigtsen <larsi@gnus.org> 62010-09-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 7
3 * configure.in (HAVE_LIBXML2): Check that the libxml2 we found can 8 * configure.in (HAVE_LIBXML2): Check that the libxml2 we found can
diff --git a/config.bat b/config.bat
index 802cacc8897..63f9c5d5865 100644
--- a/config.bat
+++ b/config.bat
@@ -38,6 +38,7 @@ set X11=
38set nodebug= 38set nodebug=
39set djgpp_ver= 39set djgpp_ver=
40set sys_malloc= 40set sys_malloc=
41set libxml=
41if "%1" == "" goto usage 42if "%1" == "" goto usage
42rem ---------------------------------------------------------------------- 43rem ----------------------------------------------------------------------
43rem See if their environment is large enough. We need 28 bytes. 44rem See if their environment is large enough. We need 28 bytes.
@@ -175,6 +176,24 @@ rem The following line disables DECL_ALIGN which in turn disables USE_LSB_TAG
175rem For details see lisp.h where it defines USE_LSB_TAG 176rem For details see lisp.h where it defines USE_LSB_TAG
176echo #define NO_DECL_ALIGN >>config.h2 177echo #define NO_DECL_ALIGN >>config.h2
177:alignOk 178:alignOk
179Rem See if they have libxml2 later than v2.2.0 installed
180Echo Checking whether libxml2 v2.2.1 or later is installed ...
181rm -f junk.c junk.o junk junk.exe
182rem Use djecho here because we need to quote brackets
183djecho "#include <libxml/xmlversion.h>" >junk.c
184djecho "int main()" >>junk.c
185djecho "{return (LIBXML_VERSION > 20200 ? 0 : 1);}" >>junk.c
186redir -o Nul -eo gcc -I/dev/env/DJDIR/include/libxml2 -o junk junk.c
187if not exist junk Goto xmlDone
188if not exist junk.exe coff2exe junk
189junk
190If ErrorLevel 1 Goto xmlDone
191Echo Configuring with libxml2 ...
192sed -e "/#undef HAVE_LIBXML2/s/^.*$/#define HAVE_LIBXML2 1/" <config.h2 >config.h3
193mv config.h3 config.h2
194set libxml=1
195:xmlDone
196rm -f junk.c junk junk.exe
178Rem See if they requested a SYSTEM_MALLOC build 197Rem See if they requested a SYSTEM_MALLOC build
179if "%sys_malloc%" == "" Goto cfgDone 198if "%sys_malloc%" == "" Goto cfgDone
180rm -f config.tmp 199rm -f config.tmp
@@ -213,6 +232,12 @@ sed -e "/^CFLAGS *=/s/ *-gcoff//" <Makefile >makefile.tmp
213sed -e "/^LDFLAGS *=/s/=/=-s/" <makefile.tmp >Makefile 232sed -e "/^LDFLAGS *=/s/=/=-s/" <makefile.tmp >Makefile
214rm -f makefile.tmp 233rm -f makefile.tmp
215:src6 234:src6
235
236if "%libxml%" == "" goto src7
237sed -e "/^LIBXML2_LIBS *=/s/=/= -lxml2 -lz -liconv/" <Makefile >makefile.tmp
238sed -e "/^LIBXML2_CFLAGS *=/s|=|= -I/dev/env/DJDIR/include/libxml2|" <makefile.tmp >Makefile
239rm -f makefile.tmp
240:src7
216cd .. 241cd ..
217rem ---------------------------------------------------------------------- 242rem ----------------------------------------------------------------------
218Echo Configuring the library source directory... 243Echo Configuring the library source directory...
@@ -289,6 +314,7 @@ set X11=
289set nodebug= 314set nodebug=
290set djgpp_ver= 315set djgpp_ver=
291set sys_malloc= 316set sys_malloc=
317set libxml=
292 318
293goto skipArchTag 319goto skipArchTag
294 arch-tag: 2d2fed23-4dc6-4006-a2e4-49daf0031f33 320 arch-tag: 2d2fed23-4dc6-4006-a2e4-49daf0031f33