comparison nt/configure.bat @ 37003:baaa260e9a27

Make the checkw32api* labels be distinct in the first 8 characters.
author Eli Zaretskii <eliz@gnu.org>
date Mon, 26 Mar 2001 13:35:21 +0000
parents aaea0580662b
children 96df2a9b439e
comparison
equal deleted inserted replaced
37002:5e3ac767a943 37003:baaa260e9a27
177 gcc -c junk.c 177 gcc -c junk.c
178 if not exist junk.o goto nocompiler 178 if not exist junk.o goto nocompiler
179 del junk.o 179 del junk.o
180 180
181 :checkgcc 181 :checkgcc
182 if (%nocygwin%) == (Y) goto checkw32api 182 Rem WARNING -- COMMAND.COM on some systems only looks at the first
183 Rem 8 characters of a lable. So do NOT be tempted to change
184 Rem chkapi* into something fancier like checkw32api
185 Rem You HAVE been warned!
186 if (%nocygwin%) == (Y) goto chkapi
183 echo Checking whether gcc requires '-mno-cygwin'... 187 echo Checking whether gcc requires '-mno-cygwin'...
184 echo #include "cygwin/version.h" >junk.c 188 echo #include "cygwin/version.h" >junk.c
185 echo main(){} >>junk.c 189 echo main(){} >>junk.c
186 gcc -c junk.c 190 gcc -c junk.c
187 if not exist junk.o goto checkw32api 191 if not exist junk.o goto chkapi
188 gcc -mno-cygwin -c junk.c 192 gcc -mno-cygwin -c junk.c
189 if exist junk.o set nocygwin=Y 193 if exist junk.o set nocygwin=Y
190 rm -f junk.c junk.o 194 rm -f junk.c junk.o
191 195
192 :checkw32api 196 :chk32api
193 rem ---------------------------------------------------------------------- 197 rem ----------------------------------------------------------------------
194 rem Older versions of the Windows API headers either don't have any of 198 rem Older versions of the Windows API headers either don't have any of
195 rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1 199 rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1
196 rem are like this), or have a typo in the definition of 200 rem are like this), or have a typo in the definition of
197 rem IMAGE_FIRST_SECTION (the headers with gcc/mingw32 2.95 have this 201 rem IMAGE_FIRST_SECTION (the headers with gcc/mingw32 2.95 have this
200 rem 204 rem
201 echo Checking whether W32 API headers are too old... 205 echo Checking whether W32 API headers are too old...
202 echo #include "windows.h" >junk.c 206 echo #include "windows.h" >junk.c
203 echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c 207 echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c
204 echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c 208 echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c
205 if (%nocygwin%) == (Y) goto checkw32api1 209 if (%nocygwin%) == (Y) goto chkapi1
206 set cf=%usercflags% 210 set cf=%usercflags%
207 goto checkw32api2 211 goto chkapi2
208 :checkw32api1 212 :chkapi1
209 set cf=%usercflags% -mno-cygwin 213 set cf=%usercflags% -mno-cygwin
210 :checkw32api2 214 :chkapi2
211 echo on 215 echo on
212 gcc %cf% -c junk.c 216 gcc %cf% -c junk.c
213 echo off 217 echo off
214 set cf= 218 set cf=
215 if exist junk.o goto gccOk 219 if exist junk.o goto gccOk