Mercurial > emacs
comparison nt/configure.bat @ 110467:5facdac279df
nt/configure.bat: Cosmetic changes.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Wed, 22 Sep 2010 03:30:05 +0200 |
parents | 1277fe6717c9 |
children | c845917f5ca3 |
comparison
equal
deleted
inserted
replaced
110466:cc5ae72924f3 | 110467:5facdac279df |
---|---|
1 @echo off | 1 @echo off |
2 rem ---------------------------------------------------------------------- | 2 rem ---------------------------------------------------------------------- |
3 rem Configuration script for MS Windows 95/98/Me and NT/2000/XP | 3 rem Configuration script for MS Windows operating systems |
4 rem Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, | 4 rem Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, |
5 rem 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 5 rem 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
6 | 6 |
7 rem This file is part of GNU Emacs. | 7 rem This file is part of GNU Emacs. |
8 | 8 |
20 rem along with GNU Emacs. If not, see http://www.gnu.org/licenses/. | 20 rem along with GNU Emacs. If not, see http://www.gnu.org/licenses/. |
21 | 21 |
22 rem ---------------------------------------------------------------------- | 22 rem ---------------------------------------------------------------------- |
23 rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS: | 23 rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS: |
24 rem | 24 rem |
25 rem + MS Windows 95/98/Me or NT/2000/XP | 25 rem + MS Windows 95, NT or later |
26 rem + either MSVC 2.x or later, or gcc-2.95 or later (with GNU make 3.75 | 26 rem + either MSVC 2.x or later, or gcc-2.95 or later (with GNU make 3.75 |
27 rem or later) and the Mingw32 and W32 API headers and libraries. | 27 rem or later) and the Mingw32 and W32 API headers and libraries. |
28 rem + Visual Studio 2005 is not supported at this time. | 28 rem + Visual Studio 2005 is not supported at this time. |
29 rem | 29 rem |
30 rem For reference, here is a list of which builds of GNU make are known to | 30 rem For reference, here is a list of which builds of GNU make are known to |
114 if "%1" == "--without-tiff" goto withouttiff | 114 if "%1" == "--without-tiff" goto withouttiff |
115 if "%1" == "--without-xpm" goto withoutxpm | 115 if "%1" == "--without-xpm" goto withoutxpm |
116 if "%1" == "--with-svg" goto withsvg | 116 if "%1" == "--with-svg" goto withsvg |
117 if "%1" == "--distfiles" goto distfiles | 117 if "%1" == "--distfiles" goto distfiles |
118 if "%1" == "" goto checkutils | 118 if "%1" == "" goto checkutils |
119 | |
119 :usage | 120 :usage |
120 echo Usage: configure [options] | 121 echo Usage: configure [options] |
121 echo Options: | 122 echo Options: |
122 echo. --prefix PREFIX install Emacs in directory PREFIX | 123 echo. --prefix PREFIX install Emacs in directory PREFIX |
123 echo. --with-gcc use GCC to compile Emacs | 124 echo. --with-gcc use GCC to compile Emacs |
135 echo. --without-tiff do not use TIFF library even if it is installed | 136 echo. --without-tiff do not use TIFF library even if it is installed |
136 echo. --without-xpm do not use XPM library even if it is installed | 137 echo. --without-xpm do not use XPM library even if it is installed |
137 echo. --with-svg use the RSVG library (experimental) | 138 echo. --with-svg use the RSVG library (experimental) |
138 echo. --distfiles path to files for make dist, e.g. libXpm.dll | 139 echo. --distfiles path to files for make dist, e.g. libXpm.dll |
139 goto end | 140 goto end |
140 rem ---------------------------------------------------------------------- | 141 |
142 rem ---------------------------------------------------------------------- | |
143 | |
141 :setprefix | 144 :setprefix |
142 shift | 145 shift |
143 set prefix=%1 | 146 set prefix=%1 |
144 shift | 147 shift |
145 goto again | 148 goto again |
146 rem ---------------------------------------------------------------------- | 149 |
150 rem ---------------------------------------------------------------------- | |
151 | |
147 :withgcc | 152 :withgcc |
148 set COMPILER=gcc | 153 set COMPILER=gcc |
149 shift | 154 shift |
150 goto again | 155 goto again |
151 rem ---------------------------------------------------------------------- | 156 |
157 rem ---------------------------------------------------------------------- | |
158 | |
152 :withmsvc | 159 :withmsvc |
153 set COMPILER=cl | 160 set COMPILER=cl |
154 shift | 161 shift |
155 goto again | 162 goto again |
156 rem ---------------------------------------------------------------------- | 163 |
164 rem ---------------------------------------------------------------------- | |
165 | |
157 :nodebug | 166 :nodebug |
158 set nodebug=Y | 167 set nodebug=Y |
159 shift | 168 shift |
160 goto again | 169 goto again |
161 rem ---------------------------------------------------------------------- | 170 |
171 rem ---------------------------------------------------------------------- | |
172 | |
162 :noopt | 173 :noopt |
163 set noopt=Y | 174 set noopt=Y |
164 shift | 175 shift |
165 goto again | 176 goto again |
166 rem ---------------------------------------------------------------------- | 177 |
178 rem ---------------------------------------------------------------------- | |
179 | |
167 :enablechecking | 180 :enablechecking |
168 set enablechecking=Y | 181 set enablechecking=Y |
169 shift | 182 shift |
170 goto again | 183 goto again |
171 rem ---------------------------------------------------------------------- | 184 |
185 rem ---------------------------------------------------------------------- | |
186 | |
172 :profile | 187 :profile |
173 set profile=Y | 188 set profile=Y |
174 shift | 189 shift |
175 goto again | 190 goto again |
176 rem ---------------------------------------------------------------------- | 191 |
192 rem ---------------------------------------------------------------------- | |
193 | |
177 :nocygwin | 194 :nocygwin |
178 set nocygwin=Y | 195 set nocygwin=Y |
179 shift | 196 shift |
180 goto again | 197 goto again |
181 rem ---------------------------------------------------------------------- | 198 |
199 rem ---------------------------------------------------------------------- | |
200 | |
182 :usercflags | 201 :usercflags |
183 shift | 202 shift |
184 set usercflags=%usercflags%%sep1%%1 | 203 set usercflags=%usercflags%%sep1%%1 |
185 set sep1= %nothing% | 204 set sep1= %nothing% |
186 shift | 205 shift |
187 goto again | 206 goto again |
188 rem ---------------------------------------------------------------------- | 207 |
208 rem ---------------------------------------------------------------------- | |
209 | |
189 :userldflags | 210 :userldflags |
190 shift | 211 shift |
191 set userldflags=%userldflags%%sep2%%1 | 212 set userldflags=%userldflags%%sep2%%1 |
192 set sep2= %nothing% | 213 set sep2= %nothing% |
193 shift | 214 shift |
194 goto again | 215 goto again |
216 | |
195 rem ---------------------------------------------------------------------- | 217 rem ---------------------------------------------------------------------- |
196 | 218 |
197 :withoutpng | 219 :withoutpng |
198 set pngsupport=N | 220 set pngsupport=N |
199 set HAVE_PNG= | 221 set HAVE_PNG= |
247 shift | 269 shift |
248 goto again | 270 goto again |
249 | 271 |
250 rem ---------------------------------------------------------------------- | 272 rem ---------------------------------------------------------------------- |
251 rem Check that necessary utilities (cp and rm) are present. | 273 rem Check that necessary utilities (cp and rm) are present. |
274 | |
252 :checkutils | 275 :checkutils |
253 echo Checking for 'cp'... | 276 echo Checking for 'cp'... |
254 cp configure.bat junk.bat | 277 cp configure.bat junk.bat |
255 if not exist junk.bat goto needcp | 278 if not exist junk.bat goto needcp |
256 echo Checking for 'rm'... | 279 echo Checking for 'rm'... |
257 rm junk.bat | 280 rm junk.bat |
258 if exist junk.bat goto needrm | 281 if exist junk.bat goto needrm |
259 goto checkcompiler | 282 goto checkcompiler |
283 | |
260 :needcp | 284 :needcp |
261 echo You need 'cp' (the Unix file copy program) to build Emacs. | 285 echo You need 'cp' (the Unix file copy program) to build Emacs. |
262 goto end | 286 goto end |
287 | |
263 :needrm | 288 :needrm |
264 del junk.bat | 289 del junk.bat |
265 echo You need 'rm' (the Unix file delete program) to build Emacs. | 290 echo You need 'rm' (the Unix file delete program) to build Emacs. |
266 goto end | 291 goto end |
267 | 292 |
268 rem ---------------------------------------------------------------------- | 293 rem ---------------------------------------------------------------------- |
269 rem Auto-detect compiler if not specified, and validate GCC if chosen. | 294 rem Auto-detect compiler if not specified, and validate GCC if chosen. |
295 | |
270 :checkcompiler | 296 :checkcompiler |
271 if (%COMPILER%)==(cl) goto compilercheckdone | 297 if (%COMPILER%)==(cl) goto compilercheckdone |
272 if (%COMPILER%)==(gcc) goto checkgcc | 298 if (%COMPILER%)==(gcc) goto checkgcc |
273 | 299 |
274 echo Checking whether 'gcc' is available... | 300 echo Checking whether 'gcc' is available... |
299 if exist junk.o set nocygwin=Y | 325 if exist junk.o set nocygwin=Y |
300 | 326 |
301 :chkapi | 327 :chkapi |
302 echo The failed program was: >>config.log | 328 echo The failed program was: >>config.log |
303 type junk.c >>config.log | 329 type junk.c >>config.log |
330 | |
304 :chkapiN | 331 :chkapiN |
305 rm -f junk.c junk.o | 332 rm -f junk.c junk.o |
306 rem ---------------------------------------------------------------------- | 333 rem ---------------------------------------------------------------------- |
307 rem Older versions of the Windows API headers either don't have any of | 334 rem Older versions of the Windows API headers either don't have any of |
308 rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1 | 335 rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1 |
318 echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c | 345 echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c |
319 echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c | 346 echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c |
320 if (%nocygwin%) == (Y) goto chkapi1 | 347 if (%nocygwin%) == (Y) goto chkapi1 |
321 set cf=%usercflags% | 348 set cf=%usercflags% |
322 goto chkapi2 | 349 goto chkapi2 |
350 | |
323 :chkapi1 | 351 :chkapi1 |
324 set cf=%usercflags% -mno-cygwin | 352 set cf=%usercflags% -mno-cygwin |
353 | |
325 :chkapi2 | 354 :chkapi2 |
326 echo on | 355 echo on |
327 gcc %cf% -c junk.c | 356 gcc %cf% -c junk.c |
328 @echo off | 357 @echo off |
329 @echo gcc %cf% -c junk.c >>config.log | 358 @echo gcc %cf% -c junk.c >>config.log |
355 echo The failed program was: >>config.log | 384 echo The failed program was: >>config.log |
356 type junk.c >>config.log | 385 type junk.c >>config.log |
357 set mf=-mcpu=i686 | 386 set mf=-mcpu=i686 |
358 rm -f junk.c junk.o | 387 rm -f junk.c junk.o |
359 goto gccdebug | 388 goto gccdebug |
389 | |
360 :gccMtuneOk | 390 :gccMtuneOk |
361 echo GCC supports -mtune=pentium4 >>config.log | 391 echo GCC supports -mtune=pentium4 >>config.log |
362 set mf=-mtune=pentium4 | 392 set mf=-mtune=pentium4 |
363 rm -f junk.c junk.o | 393 rm -f junk.c junk.o |
394 | |
364 :gccdebug | 395 :gccdebug |
365 rem Check for DWARF-2 debug info support, else default to stabs | 396 rem Check for DWARF-2 debug info support, else default to stabs |
366 echo main(){} >junk.c | 397 echo main(){} >junk.c |
367 echo gcc -c -gdwarf-2 -g3 junk.c >>config.log | 398 echo gcc -c -gdwarf-2 -g3 junk.c >>config.log |
368 gcc -c -gdwarf-2 -g3 junk.c >>config.log 2>&1 | 399 gcc -c -gdwarf-2 -g3 junk.c >>config.log 2>&1 |
370 echo The failed program was: >>config.log | 401 echo The failed program was: >>config.log |
371 type junk.c >>config.log | 402 type junk.c >>config.log |
372 set dbginfo=-gstabs+ | 403 set dbginfo=-gstabs+ |
373 rm -f junk.c junk.o | 404 rm -f junk.c junk.o |
374 goto compilercheckdone | 405 goto compilercheckdone |
406 | |
375 :gccdwarf | 407 :gccdwarf |
376 echo GCC supports DWARF-2 >>config.log | 408 echo GCC supports DWARF-2 >>config.log |
377 set dbginfo=-gdwarf-2 -g3 | 409 set dbginfo=-gdwarf-2 -g3 |
378 rm -f junk.c junk.o | 410 rm -f junk.c junk.o |
379 goto compilercheckdone | 411 goto compilercheckdone |
563 | 595 |
564 :distFilesDone | 596 :distFilesDone |
565 set fileNotFound= | 597 set fileNotFound= |
566 | 598 |
567 rem ---------------------------------------------------------------------- | 599 rem ---------------------------------------------------------------------- |
600 | |
568 :genmakefiles | 601 :genmakefiles |
569 echo Generating makefiles | 602 echo Generating makefiles |
570 if %COMPILER% == gcc set MAKECMD=gmake | 603 if %COMPILER% == gcc set MAKECMD=gmake |
571 if %COMPILER% == cl set MAKECMD=nmake | 604 if %COMPILER% == cl set MAKECMD=nmake |
572 | 605 |
617 if not errorlevel 2 goto doCopy | 650 if not errorlevel 2 goto doCopy |
618 fc /b config.tmp ..\src\config.h >nul 2>&1 | 651 fc /b config.tmp ..\src\config.h >nul 2>&1 |
619 if errorlevel 1 goto doCopy | 652 if errorlevel 1 goto doCopy |
620 fc /b paths.h ..\src\epaths.h >nul 2>&1 | 653 fc /b paths.h ..\src\epaths.h >nul 2>&1 |
621 if errorlevel 0 goto dontCopy | 654 if errorlevel 0 goto dontCopy |
655 | |
622 :doCopy | 656 :doCopy |
623 copy config.tmp ..\src\config.h | 657 copy config.tmp ..\src\config.h |
624 copy paths.h ..\src\epaths.h | 658 copy paths.h ..\src\epaths.h |
625 | 659 |
626 :dontCopy | 660 :dontCopy |
646 if exist foo.bar del foo.bar | 680 if exist foo.bar del foo.bar |
647 fc /b foo.bar foo.bar >nul 2>&1 | 681 fc /b foo.bar foo.bar >nul 2>&1 |
648 if not errorlevel 2 goto doUpdateSubdirs | 682 if not errorlevel 2 goto doUpdateSubdirs |
649 fc /b subdirs.el ..\site-lisp\subdirs.el >nul 2>&1 | 683 fc /b subdirs.el ..\site-lisp\subdirs.el >nul 2>&1 |
650 if not errorlevel 1 goto dontUpdateSubdirs | 684 if not errorlevel 1 goto dontUpdateSubdirs |
685 | |
651 :doUpdateSubdirs | 686 :doUpdateSubdirs |
652 if exist ..\site-lisp\subdirs.el del ..\site-lisp\subdirs.el | 687 if exist ..\site-lisp\subdirs.el del ..\site-lisp\subdirs.el |
653 copy subdirs.el ..\site-lisp\subdirs.el | 688 copy subdirs.el ..\site-lisp\subdirs.el |
654 | 689 |
655 :dontUpdateSubdirs | 690 :dontUpdateSubdirs |
714 | 749 |
715 :SmallEnv | 750 :SmallEnv |
716 echo Your environment size is too small. Please enlarge it and rerun configure. | 751 echo Your environment size is too small. Please enlarge it and rerun configure. |
717 echo For example, type "command.com /e:2048" to have 2048 bytes available. | 752 echo For example, type "command.com /e:2048" to have 2048 bytes available. |
718 set $foo$= | 753 set $foo$= |
754 | |
719 :end | 755 :end |
720 set prefix= | 756 set prefix= |
721 set nodebug= | 757 set nodebug= |
722 set noopt= | 758 set noopt= |
723 set enablechecking= | 759 set enablechecking= |