(checkgcc): Move "del junk.o" to here, and make it conditional on existence
[bpt/emacs.git] / nt / configure.bat
index 9f51e1d..98ff056 100755 (executable)
@@ -244,22 +244,23 @@ rem   Auto-detect compiler if not specified, and validate GCC if chosen.
 if (%COMPILER%)==(cl) goto compilercheckdone\r
 if (%COMPILER%)==(gcc) goto checkgcc\r
 \r
-echo Checking whether 'cl' is available...\r
+echo Checking whether 'gcc' is available...\r
 echo main(){} >junk.c\r
+gcc -c junk.c\r
+if exist junk.o goto checkgcc\r
+\r
+echo Checking whether 'cl' is available...\r
 cl -nologo -c junk.c\r
 if exist junk.obj goto clOK\r
-\r
-echo Checking whether 'gcc' is available...\r
-gcc -c junk.c\r
-if not exist junk.o goto nocompiler\r
-del junk.o\r
+goto nocompiler\r
 \r
 :checkgcc\r
+if exist junk.o del junk.o\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
+if (%nocygwin%) == (Y) goto chkapiN\r
 echo Checking whether gcc requires '-mno-cygwin'...\r
 echo #include "cygwin/version.h" >junk.c\r
 echo main(){} >>junk.c\r
@@ -269,11 +270,12 @@ if not exist junk.o goto chkapi
 echo gcc -mno-cygwin -c junk.c >>config.log\r
 gcc -mno-cygwin -c junk.c >>config.log 2>&1\r
 if exist junk.o set nocygwin=Y\r
-rm -f junk.c junk.o\r
 \r
 :chkapi\r
 echo The failed program was: >>config.log\r
 type junk.c >>config.log\r
+:chkapiN\r
+rm -f junk.c junk.o\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
@@ -523,6 +525,7 @@ copy paths.h ..\src\epaths.h
 :dontCopy\r
 if exist config.tmp del config.tmp\r
 copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile\r
+if exist ..\admin\unidata copy /b config.settings+%MAKECMD%.defs+..\admin\unidata\makefile.w32-in ..\admin\unidata\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
 copy /b config.settings+%MAKECMD%.defs+..\doc\emacs\makefile.w32-in ..\doc\emacs\makefile\r