emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More diagnostics for the W32 build


From: Eli Zaretskii
Subject: More diagnostics for the W32 build
Date: Sat, 04 Jun 2005 16:40:10 +0300

I suggest the following changes to nt/configure.bat.  The purpose is
to leave behind a useful config.log file which could be perused to
find out why various parts of the configure stage failed.

This was tested on Windows XP SP2, but my main concern is about older
Windows versions, like Windows 9x: the changes use advanced
redirection features that are unavailable with COMMAND.COM, the
default shell that comes with those older versions of Windows.  OTOH,
the current version of configure.bat in CVS already uses features like
"2>junk.err", so I guess this causes some harmless error message?

I'll wait for Jason and others to comment on these changes, before I
decide whether to commit them.  TIA

--- configure.old       2005-06-04 12:32:38.000000000 +0300
+++ configure.bat       2005-06-04 14:29:51.703125000 +0300
@@ -47,6 +47,8 @@
 rem     cygwin provides this?
 rem
 
+if exist config.log del config.log
+
 rem ----------------------------------------------------------------------
 rem   See if the environment is large enough.  We need 43 (?) bytes.
 set $foo$=123456789_123456789_123456789_123456789_123
@@ -236,13 +238,17 @@
 echo Checking whether gcc requires '-mno-cygwin'...
 echo #include "cygwin/version.h" >junk.c
 echo main(){} >>junk.c
-gcc -c junk.c
+echo gcc -c junk.c >>config.log
+gcc -c junk.c >>config.log 2>&1
 if not exist junk.o goto chkapi
-gcc -mno-cygwin -c junk.c
+echo gcc -mno-cygwin -c junk.c >>config.log
+gcc -mno-cygwin -c junk.c >>config.log 2>&1
 if exist junk.o set nocygwin=Y
 rm -f junk.c junk.o
 
 :chkapi
+echo The failed program was: >>config.log
+type junk.c >>config.log
 rem ----------------------------------------------------------------------
 rem   Older versions of the Windows API headers either don't have any of
 rem   the IMAGE_xxx definitions (the headers that come with Cygwin b20.1
@@ -263,9 +269,13 @@
 :chkapi2
 echo on
 gcc %cf% -c junk.c
-echo off
address@hidden off
address@hidden gcc %cf% -c junk.c >>config.log
+gcc %cf% -c junk.c >>config.log 2>&1
 set cf=
 if exist junk.o goto gccOk
+echo The failed program was: >>config.log
+type junk.c >>config.log
 
 :nocompiler
 echo.
@@ -307,10 +317,13 @@
 echo #include "png.h" >junk.c
 echo main (){} >>junk.c
 rem   -o option is ignored with cl, but allows result to be consistent.
-%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err
+echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log
+%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 
2>>config.log
 if exist junk.obj goto havePng
 
 echo ...png.h not found, building without PNG support.
+echo The failed program was: >>config.log
+type junk.c >>config.log
 set HAVE_PNG=
 goto :pngDone
 
@@ -327,10 +340,13 @@
 echo #include "jconfig.h" >junk.c
 echo main (){} >>junk.c
 rem   -o option is ignored with cl, but allows result to be consistent.
-%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err
+echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log
+%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 
2>>config.log
 if exist junk.obj goto haveJpeg
 
 echo ...jconfig.h not found, building without JPEG support.
+echo The failed program was: >>config.log
+type junk.c >>config.log
 set HAVE_JPEG=
 goto :jpegDone
 
@@ -347,10 +363,13 @@
 echo #include "gif_lib.h" >junk.c
 echo main (){} >>junk.c
 rem   -o option is ignored with cl, but allows result to be consistent.
-%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err
+echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log
+%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 
2>>config.log
 if exist junk.obj goto haveGif
 
 echo ...gif_lib.h not found, building without GIF support.
+echo The failed program was: >>config.log
+type junk.c >>config.log
 set HAVE_GIF=
 goto :gifDone
 
@@ -367,10 +386,13 @@
 echo #include "tiffio.h" >junk.c
 echo main (){} >>junk.c
 rem   -o option is ignored with cl, but allows result to be consistent.
-%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err
+echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log
+%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 
2>>config.log
 if exist junk.obj goto haveTiff
 
 echo ...tiffio.h not found, building without TIFF support.
+echo The failed program was: >>config.log
+type junk.c >>config.log
 set HAVE_TIFF=
 goto :tiffDone
 
@@ -388,10 +410,13 @@
 echo #include "X11/xpm.h" >>junk.c
 echo main (){} >>junk.c
 rem   -o option is ignored with cl, but allows result to be consistent.
-%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err
+echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log
+%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 
2>>config.log
 if exist junk.obj goto haveXpm
 
 echo ...X11/xpm.h not found, building without XPM support.
+echo The failed program was: >>config.log
+type junk.c >>config.log
 set HAVE_XPM=
 goto :xpmDone
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]