X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/639b2760f19231881f753c8f1f7822eab457c751..d60a0a17163777c6ddd39dc3b34740a43fe3e2f3:/config.bat diff --git a/config.bat b/config.bat index a37a7a7008..8af3756222 100644 --- a/config.bat +++ b/config.bat @@ -1,8 +1,7 @@ @echo off rem ---------------------------------------------------------------------- rem Configuration script for MSDOS -rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003 -rem 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +rem Copyright (C) 1994-1999, 2001-2014 Free Software Foundation, Inc. rem This file is part of GNU Emacs. @@ -38,6 +37,7 @@ set X11= set nodebug= set djgpp_ver= set sys_malloc= +set libxml= if "%1" == "" goto usage rem ---------------------------------------------------------------------- rem See if their environment is large enough. We need 28 bytes. @@ -154,27 +154,31 @@ rm -f epaths.tmp rem Create "config.h" rm -f config.h2 config.tmp -sed -e '' config.in > config.tmp +if exist config.in sed -e '' config.in > config.tmp +if exist ..\msdos\autogen\config.in sed -e '' ../msdos/autogen/config.in > config.tmp if "%X11%" == "" goto src4 -sed -f ../msdos/sed2x.inp config.tmp +if exist config.in sed -f ../msdos/sed2x.inp < config.in > config.tmp +if exist ..\msdos\autogen\config.in sed -f ../msdos/sed2x.inp < ..\msdos\autogen\config.in > config.tmp :src4 sed -f ../msdos/sed2v2.inp config.h2 -Rem See if DECL_ALIGN can be supported with this GCC +Rem See if they have libxml2 later than v2.2.0 installed +Echo Checking whether libxml2 v2.2.1 or later is installed ... rm -f junk.c junk.o junk junk.exe -echo struct { int i; char *p; } __attribute__((__aligned__(8))) foo; >junk.c -rem Two percent signs because it is a special character for COMMAND.COM/CMD -rem Filter thru Sed because "&" is special for CMD.EXE -echo int main(void) { return (unsigned long)"&"foo %% 8; } | sed "s/.&./\&/" >>junk.c -gcc -o junk junk.c +rem Use djecho here because we need to quote brackets +djecho "#include " >junk.c +djecho "int main()" >>junk.c +djecho "{return (LIBXML_VERSION > 20200 ? 0 : 1);}" >>junk.c +redir -o Nul -eo gcc -I/dev/env/DJDIR/include/libxml2 -o junk junk.c +if not exist junk Goto xmlDone if not exist junk.exe coff2exe junk junk -If Not ErrorLevel 1 Goto alignOk -Echo WARNING: Your GCC does not support 8-byte aligned variables. -Echo WARNING: Therefore Emacs cannot support buffers larger than 128MB. -rem The following line disables DECL_ALIGN which in turn disables USE_LSB_TAG -rem For details see lisp.h where it defines USE_LSB_TAG -echo #define NO_DECL_ALIGN >>config.h2 -:alignOk +If ErrorLevel 1 Goto xmlDone +Echo Configuring with libxml2 ... +sed -e "/#undef HAVE_LIBXML2/s/^.*$/#define HAVE_LIBXML2 1/" config.h3 +mv config.h3 config.h2 +set libxml=1 +:xmlDone +rm -f junk.c junk junk.exe Rem See if they requested a SYSTEM_MALLOC build if "%sys_malloc%" == "" Goto cfgDone rm -f config.tmp @@ -191,7 +195,7 @@ if exist dir.h ren dir.h vmsdir.h rem Create "makefile" from "makefile.in". rm -f Makefile makefile.tmp -copy Makefile.in + deps.mk makefile.tmp +copy Makefile.in+lisp.mk+deps.mk makefile.tmp sed -f ../msdos/sed1v2.inp Makefile rm -f makefile.tmp @@ -213,6 +217,12 @@ sed -e "/^CFLAGS *=/s/ *-gcoff//" makefile.tmp sed -e "/^LDFLAGS *=/s/=/=-s/" Makefile rm -f makefile.tmp :src6 + +if "%libxml%" == "" goto src7 +sed -e "/^LIBXML2_LIBS *=/s/=/= -lxml2 -lz -liconv/" makefile.tmp +sed -e "/^LIBXML2_CFLAGS *=/s|=|= -I/dev/env/DJDIR/include/libxml2|" Makefile +rm -f makefile.tmp +:src7 cd .. rem ---------------------------------------------------------------------- Echo Configuring the library source directory... @@ -248,8 +258,39 @@ Rem supports long file names but DJGPP does not for %%d in (emacs lispref lispintro lispintr misc) do sed -f ../msdos/sed6.inp < %%d\Makefile.in > %%d\Makefile cd .. rem ---------------------------------------------------------------------- +Echo Configuring the lib directory... +If Exist build-aux\snippet\c++defs.h update build-aux/snippet/c++defs.h build-aux/snippet/cxxdefs.h +cd lib +Rem Rename files like djtar on plain DOS filesystem would. +If Exist build-aux\snippet\c++defs.h update build-aux/snippet/c++defs.h build-aux/snippet/cxxdefs.h +If Exist alloca.in.h update alloca.in.h alloca.in-h +If Exist execinfo.in.h update execinfo.in.h execinfo.in-h +If Exist getopt.in.h update getopt.in.h getopt.in-h +If Exist stdalign.in.h update stdalign.in.h stdalign.in-h +If Exist stdbool.in.h update stdbool.in.h stdbool.in-h +If Exist signal.in.h update signal.in.h signal.in-h +If Exist stdalign.in.h update stdalign.in.h stdalign.in-h +If Exist stddef.in.h update stddef.in.h stddef.in-h +If Exist stdint.in.h update stdint.in.h stdint.in-h +If Exist stdio.in.h update stdio.in.h stdio.in-h +If Exist stdlib.in.h update stdlib.in.h stdlib.in-h +If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h +If Exist sys_types.in.h update sys_types.in.h sys_types.in-h +If Exist time.in.h update time.in.h time.in-h +If Exist unistd.in.h update unistd.in.h unistd.in-h +If Exist Makefile.in sed -f ../msdos/sedlibcf.inp < Makefile.in > makefile.tmp +If Exist ..\msdos\autogen\Makefile.in sed -f ../msdos/sedlibcf.inp < ..\msdos\autogen\Makefile.in > makefile.tmp +sed -f ../msdos/sedlibmk.inp < makefile.tmp > Makefile +rm -f makefile.tmp +Rem Create .Po files for new files in lib/ +If Not Exist deps\stamp mkdir deps +for %%f in (*.c) do @call ..\msdos\depfiles.bat %%f +echo deps-stamp > deps\stamp +cd .. +rem ---------------------------------------------------------------------- Echo Configuring the lisp directory... cd lisp +If Exist gnus\.dir-locals.el update gnus/.dir-locals.el gnus/_dir-locals.el sed -f ../msdos/sedlisp.inp < Makefile.in > Makefile cd .. rem ---------------------------------------------------------------------- @@ -276,6 +317,8 @@ Echo Then run CONFIG.BAT again with the same arguments you did now. goto End :gdbinitOk Echo Looking for the GDB init file...found +rem GNUMakefile is not appropriate for MS-DOS so move it out of the way +If Exist GNUmakefile mv -f GNUmakefile GNUmakefile.unix copy msdos\mainmake.v2 Makefile >nul rem ---------------------------------------------------------------------- goto End @@ -288,7 +331,4 @@ set X11= set nodebug= set djgpp_ver= set sys_malloc= - -goto skipArchTag - arch-tag: 2d2fed23-4dc6-4006-a2e4-49daf0031f33 -:skipArchTag +set libxml=