]> code.delx.au - gnu-emacs/blobdiff - nt/configure.bat
Add description of +LINE:COLUMN.
[gnu-emacs] / nt / configure.bat
index 8abb58c7ebcbf8258be8d50d112f13232b0da76a..18dac4a878a07e5e4f9f62d6276a0720cf3bfc93 100755 (executable)
@@ -1,7 +1,7 @@
 @echo off\r
 rem   ----------------------------------------------------------------------\r
 rem   Configuration script for MS Windows 95/98 and NT/2000\r
-rem   Copyright (C) 1999, 2000 Free Software Foundation, Inc.\r
+rem   Copyright (C) 1999-2001 Free Software Foundation, Inc.\r
 \r
 rem   This file is part of GNU Emacs.\r
 \r
@@ -179,17 +179,21 @@ if not exist junk.o goto nocompiler
 del junk.o\r
 \r
 :checkgcc\r
-if (%nocygwin%) == (Y) goto checkw32api\r
+Rem WARNING -- COMMAND.COM on some systems only looks at the first\r
+Rem            8 characters of a label.  So do NOT be tempted to change\r
+Rem            chkapi* into something fancier like checkw32api\r
+Rem You HAVE been warned!\r
+if (%nocygwin%) == (Y) goto chkapi\r
 echo Checking whether gcc requires '-mno-cygwin'...\r
 echo #include "cygwin/version.h" >junk.c\r
 echo main(){} >>junk.c\r
 gcc -c junk.c\r
-if not exist junk.o goto checkw32api\r
+if not exist junk.o goto chkapi\r
 gcc -mno-cygwin -c junk.c\r
 if exist junk.o set nocygwin=Y\r
-del junk.o junk.c\r
+rm -f junk.c junk.o\r
 \r
-:checkw32api\r
+:chkapi\r
 rem ----------------------------------------------------------------------\r
 rem   Older versions of the Windows API headers either don't have any of\r
 rem   the IMAGE_xxx definitions (the headers that come with Cygwin b20.1\r
@@ -200,9 +204,18 @@ rem   of w32api-xxx.zip from Anders Norlander since 1999-11-18 at least.
 rem\r
 echo Checking whether W32 API headers are too old...\r
 echo #include "windows.h" >junk.c\r
-echo test(PIMAGE_NT_HEADERS pHeader)>>junk.c\r
-echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}>>junk.c\r
-gcc -c junk.c\r
+echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c\r
+echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c\r
+if (%nocygwin%) == (Y) goto chkapi1\r
+set cf=%usercflags%\r
+goto chkapi2\r
+:chkapi1\r
+set cf=%usercflags% -mno-cygwin\r
+:chkapi2\r
+echo on\r
+gcc %cf% -c junk.c\r
+echo off\r
+set cf=\r
 if exist junk.o goto gccOk\r
 \r
 :nocompiler\r
@@ -216,13 +229,13 @@ goto end
 \r
 :gccOk\r
 set COMPILER=gcc\r
-del junk.c junk.o\r
+rm -f junk.c junk.o\r
 echo Using 'gcc'\r
 goto genmakefiles\r
 \r
 :clOk\r
 set COMPILER=cl\r
-del junk.c junk.obj\r
+rm -f junk.c junk.obj\r
 echo Using 'MSVC'\r
 goto genmakefiles\r
 \r
@@ -233,11 +246,14 @@ if %COMPILER% == gcc set MAKECMD=gmake
 if %COMPILER% == cl set MAKECMD=nmake\r
 \r
 rem   Pass on chosen settings to makefiles.\r
+rem   NB. Be very careful to not have a space before redirection symbols\r
+rem   except when there is a preceding digit, when a space is required.\r
+rem\r
 echo # Start of settings from configure.bat >config.settings\r
-echo COMPILER=%COMPILER% >>config.settings\r
-if (%nodebug%) == (Y) echo NODEBUG=1>>config.settings\r
-if (%noopt%) == (Y) echo NOOPT=1>>config.settings\r
-if (%nocygwin%) == (Y) echo NOCYGWIN=1>>config.settings\r
+echo COMPILER=%COMPILER%>>config.settings\r
+if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings\r
+if (%noopt%) == (Y) echo NOOPT=1 >>config.settings\r
+if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings\r
 if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings\r
 if not "(%usercflags%)" == "()" echo USER_CFLAGS=%usercflags%>>config.settings\r
 if not "(%userldflags%)" == "()" echo USER_LDFLAGS=%userldflags%>>config.settings\r
@@ -252,8 +268,8 @@ copy paths.h ..\src\epaths.h
 copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile\r
 copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile\r
 copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile\r
-if not exist ..\lisp\Makefile.unix rename ..\lisp\Makefile Makefile.unix\r
-if exist ..\lisp\makefile del /f ..\lisp\makefile\r
+if not exist ..\lisp\Makefile.unix rename ..\lisp\Makefile.in Makefile.unix\r
+if exist ..\lisp\makefile rm -f ../lisp/[Mm]akefile\r
 copy /b config.settings+%MAKECMD%.defs+..\lisp\makefile.w32-in ..\lisp\makefile\r
 rem   Use the default (no-op) Makefile.in if the nt version is not present.\r
 if exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\makefile.w32-in ..\leim\makefile\r