@echo off\r
rem ----------------------------------------------------------------------\r
rem Configuration script for MS Windows 95/98/Me and NT/2000/XP\r
-rem Copyright (C) 1999-2003 Free Software Foundation, Inc.\r
+rem Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 \r
+rem Free Software Foundation, Inc.\r
\r
rem This file is part of GNU Emacs.\r
\r
rem cygwin provides this?\r
rem\r
\r
+if exist config.log del config.log\r
+\r
rem ----------------------------------------------------------------------\r
rem See if the environment is large enough. We need 43 (?) bytes.\r
set $foo$=123456789_123456789_123456789_123456789_123\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
+echo gcc -c junk.c >>config.log\r
+gcc -c junk.c >>config.log 2>&1\r
if not exist junk.o goto chkapi\r
-gcc -mno-cygwin -c junk.c\r
+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
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
:chkapi2\r
echo on\r
gcc %cf% -c junk.c\r
-echo off\r
+@echo off\r
+@echo gcc %cf% -c junk.c >>config.log\r
+gcc %cf% -c junk.c >>config.log 2>&1\r
set cf=\r
if exist junk.o goto gccOk\r
+echo The failed program was: >>config.log\r
+type junk.c >>config.log\r
\r
:nocompiler\r
echo.\r
\r
:gccOk\r
set COMPILER=gcc\r
-rm -f junk.c junk.o\r
echo Using 'gcc'\r
+rm -f junk.c junk.o\r
+Rem It is not clear what GCC version began supporting -mtune\r
+Rem and pentium4 on x86, so check this explicitly.\r
+echo main(){} >junk.c\r
+echo gcc -c -O2 -mtune=pentium4 junk.c >>config.log\r
+gcc -c -O2 -mtune=pentium4 junk.c >>config.log 2>&1\r
+if not errorlevel 1 goto gccMtuneOk\r
+echo The failed program was: >>config.log\r
+type junk.c >>config.log\r
+set mf=-mcpu=i686\r
+rm -f junk.c junk.o\r
+goto compilercheckdone\r
+:gccMtuneOk\r
+echo GCC supports -mtune=pentium4 >>config.log\r
+set mf=-mtune=pentium4\r
+rm -f junk.c junk.o\r
goto compilercheckdone\r
\r
:clOk\r
echo #include "png.h" >junk.c\r
echo main (){} >>junk.c\r
rem -o option is ignored with cl, but allows result to be consistent.\r
-%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err\r
+echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
+%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
if exist junk.obj goto havePng\r
\r
echo ...png.h not found, building without PNG support.\r
+echo The failed program was: >>config.log\r
+type junk.c >>config.log\r
set HAVE_PNG=\r
goto :pngDone\r
\r
echo #include "jconfig.h" >junk.c\r
echo main (){} >>junk.c\r
rem -o option is ignored with cl, but allows result to be consistent.\r
-%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err\r
+echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
+%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
if exist junk.obj goto haveJpeg\r
\r
echo ...jconfig.h not found, building without JPEG support.\r
+echo The failed program was: >>config.log\r
+type junk.c >>config.log\r
set HAVE_JPEG=\r
goto :jpegDone\r
\r
echo #include "gif_lib.h" >junk.c\r
echo main (){} >>junk.c\r
rem -o option is ignored with cl, but allows result to be consistent.\r
-%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err\r
+echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
+%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
if exist junk.obj goto haveGif\r
\r
echo ...gif_lib.h not found, building without GIF support.\r
+echo The failed program was: >>config.log\r
+type junk.c >>config.log\r
set HAVE_GIF=\r
goto :gifDone\r
\r
echo #include "tiffio.h" >junk.c\r
echo main (){} >>junk.c\r
rem -o option is ignored with cl, but allows result to be consistent.\r
-%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err\r
+echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
+%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
if exist junk.obj goto haveTiff\r
\r
echo ...tiffio.h not found, building without TIFF support.\r
+echo The failed program was: >>config.log\r
+type junk.c >>config.log\r
set HAVE_TIFF=\r
goto :tiffDone\r
\r
echo #include "X11/xpm.h" >>junk.c\r
echo main (){} >>junk.c\r
rem -o option is ignored with cl, but allows result to be consistent.\r
-%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err\r
+echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
+%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
if exist junk.obj goto haveXpm\r
\r
echo ...X11/xpm.h not found, building without XPM support.\r
+echo The failed program was: >>config.log\r
+type junk.c >>config.log\r
set HAVE_XPM=\r
goto :xpmDone\r
\r
rem\r
echo # Start of settings from configure.bat >config.settings\r
echo COMPILER=%COMPILER%>>config.settings\r
+if not "(%mf%)" == "()" echo MCPU_FLAG=%mf%>>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
set usercflags=\r
set userldflags=\r
set mingwflag=\r
+set mf=\r
\r
goto skipArchTag\r
arch-tag: 300d20a4-1675-4e75-b615-7ce1a8c5376c\r