*** empty log message ***
[bpt/emacs.git] / nt / configure.bat
CommitLineData
f466241d
EZ
1@echo off\r
2rem ----------------------------------------------------------------------\r
12ff2dc5 3rem Configuration script for MS Windows 95/98/Me and NT/2000/XP\r
ceb4c4d3 4rem Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005,\r
6d344054 5rem 2006, 2007, 2008 Free Software Foundation, Inc.\r
f466241d
EZ
6\r
7rem This file is part of GNU Emacs.\r
8\r
9rem GNU Emacs is free software; you can redistribute it and/or modify\r
10rem it under the terms of the GNU General Public License as published by\r
4a9f99bd 11rem the Free Software Foundation; either version 3, or (at your option)\r
f466241d
EZ
12rem any later version.\r
13\r
14rem GNU Emacs is distributed in the hope that it will be useful,\r
15rem but WITHOUT ANY WARRANTY; without even the implied warranty of\r
16rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
17rem GNU General Public License for more details.\r
18\r
19rem You should have received a copy of the GNU General Public License\r
20rem along with GNU Emacs; see the file COPYING. If not, write to the\r
364c38d3
LK
21rem Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\r
22rem Boston, MA 02110-1301, USA.\r
f466241d
EZ
23rem ----------------------------------------------------------------------\r
24rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:\r
25rem\r
12ff2dc5 26rem + MS Windows 95/98/Me or NT/2000/XP\r
f466241d 27rem + either MSVC 2.x or later, or gcc-2.95 or later (with gmake 3.75\r
56a469c3
EZ
28rem or later) and the Mingw32 and W32 API headers and libraries.\r
29rem + Visual Studio 2005 is not supported at this time.\r
f466241d
EZ
30rem\r
31rem For reference, here is a list of which builds of gmake are known to\r
32rem work or not, and whether they work in the presence and/or absence of\r
33rem sh.exe.\r
7019fb66 34rem\r
f466241d 35rem sh exists no sh\r
56a469c3 36rem cygwin b20.1 make (3.75): fails[1,5] fails[2,5]\r
f466241d
EZ
37rem MSVC compiled gmake 3.77: okay okay\r
38rem MSVC compiled gmake 3.78.1: okay okay\r
39rem MSVC compiled gmake 3.79.1: okay okay\r
56a469c3
EZ
40rem mingw32/gcc-2.92.2 make (3.77): okay okay[4]\r
41rem cygwin compiled gmake 3.77: fails[1,5] fails[2,5]\r
42rem cygwin compiled gmake 3.78.1: fails[5] fails[2,5]\r
43rem cygwin compiled gmake 3.79.1: fails[3,5] fails[2?,5]\r
16fb735f
EZ
44rem cygwin compiled make 3.80: okay[6] fails?[7]\r
45rem cygwin compiled make 3.81: fails fails?[7]\r
56a469c3 46rem mingw32 compiled make 3.79.1: okay okay\r
16fb735f
EZ
47rem mingw32 compiled make 3.80: okay okay?[7]\r
48rem mingw32 compiled make 3.81: okay okay[8]\r
f466241d
EZ
49rem\r
50rem [1] doesn't cope with makefiles with DOS line endings, so must mount\r
51rem emacs source with text!=binary.\r
52rem [2] fails when needs to invoke shell commands; okay invoking gcc etc.\r
56a469c3
EZ
53rem [3] requires LC_MESSAGES support to build; cannot build with early\r
54rem versions of cygwin.\r
55rem [4] may fail on Windows 9X and Windows ME; if so, install Bash.\r
56rem [5] fails when building leim due to the use of cygwin style paths.\r
57rem May work if building emacs without leim.\r
16fb735f
EZ
58rem [6] need to uncomment 3 lines in nt/gmake.defs that invoke `cygpath';\r
59rem look for "cygpath" near line 85 of gmake.defs.\r
60rem [7] not recommended; please report if you try this combination.\r
61rem [8] tested only on Windows XP.\r
f466241d
EZ
62rem\r
63\r
dbbdb507
EZ
64if exist config.log del config.log\r
65\r
f466241d
EZ
66rem ----------------------------------------------------------------------\r
67rem See if the environment is large enough. We need 43 (?) bytes.\r
68set $foo$=123456789_123456789_123456789_123456789_123\r
69if not "%$foo$%" == "123456789_123456789_123456789_123456789_123" goto SmallEnv\r
70set $foo$=\r
71\r
72rem ----------------------------------------------------------------------\r
73rem Make sure we are running in the nt subdir\r
74if exist configure.bat goto start\r
75echo You must run configure from the nt subdirectory.\r
76goto end\r
77\r
78:start\r
79rem ----------------------------------------------------------------------\r
80rem Default settings.\r
81set prefix=\r
82set nodebug=N\r
83set noopt=N\r
84set nocygwin=N\r
85set COMPILER=\r
86set usercflags=\r
aa9dea64 87set docflags=\r
f466241d 88set userldflags=\r
aa9dea64 89set doldflags=\r
f466241d
EZ
90set sep1=\r
91set sep2=\r
92\r
93rem ----------------------------------------------------------------------\r
94rem Handle arguments.\r
95:again\r
96if "%1" == "-h" goto usage\r
97if "%1" == "--help" goto usage\r
98if "%1" == "--prefix" goto setprefix\r
99if "%1" == "--with-gcc" goto withgcc\r
100if "%1" == "--with-msvc" goto withmsvc\r
101if "%1" == "--no-debug" goto nodebug\r
102if "%1" == "--no-opt" goto noopt\r
103if "%1" == "--no-cygwin" goto nocygwin\r
104if "%1" == "--cflags" goto usercflags\r
105if "%1" == "--ldflags" goto userldflags\r
e0006538 106if "%1" == "--without-png" goto withoutpng\r
aad0eae4 107if "%1" == "--without-jpeg" goto withoutjpeg\r
12ff2dc5 108if "%1" == "--without-gif" goto withoutgif\r
47c01e80 109if "%1" == "--without-tiff" goto withouttiff\r
507f5dce 110if "%1" == "--without-xpm" goto withoutxpm\r
f466241d
EZ
111if "%1" == "" goto checkutils\r
112:usage\r
113echo Usage: configure [options]\r
114echo Options:\r
115echo. --prefix PREFIX install Emacs in directory PREFIX\r
116echo. --with-gcc use GCC to compile Emacs\r
117echo. --with-msvc use MSVC to compile Emacs\r
118echo. --no-debug exclude debug info from executables\r
119echo. --no-opt disable optimization\r
120echo. --no-cygwin use -mno-cygwin option with GCC\r
121echo. --cflags FLAG pass FLAG to compiler\r
122echo. --ldflags FLAG pass FLAG to compiler when linking\r
7019fb66 123echo. --without-png do not use libpng even if it is installed\r
507f5dce
JR
124echo. --without-jpeg do not use jpeg-6b even if it is installed\r
125echo. --without-gif do not use libungif even if it is installed\r
6ed82072
JB
126echo. --without-tiff do not use libtiff even if it is installed\r
127echo. --without-xpm do not use libXpm even if it is installed\r
f466241d
EZ
128goto end\r
129rem ----------------------------------------------------------------------\r
130:setprefix\r
131shift\r
132set prefix=%1\r
133shift\r
134goto again\r
135rem ----------------------------------------------------------------------\r
136:withgcc\r
137set COMPILER=gcc\r
138shift\r
139goto again\r
140rem ----------------------------------------------------------------------\r
141:withmsvc\r
142set COMPILER=cl\r
143shift\r
144goto again\r
145rem ----------------------------------------------------------------------\r
146:nodebug\r
147set nodebug=Y\r
148shift\r
149goto again\r
150rem ----------------------------------------------------------------------\r
151:noopt\r
152set noopt=Y\r
153shift\r
154goto again\r
155rem ----------------------------------------------------------------------\r
156:nocygwin\r
157set nocygwin=Y\r
158shift\r
159goto again\r
160rem ----------------------------------------------------------------------\r
161:usercflags\r
162shift\r
163set usercflags=%usercflags%%sep1%%1\r
164set sep1= %nothing%\r
165shift\r
166goto again\r
167rem ----------------------------------------------------------------------\r
168:userldflags\r
169shift\r
170set userldflags=%userldflags%%sep2%%1\r
171set sep2= %nothing%\r
172shift\r
173goto again\r
e0006538
JR
174rem ----------------------------------------------------------------------\r
175\r
176:withoutpng\r
177set pngsupport=N\r
178set HAVE_PNG=\r
39bd0e03 179shift\r
e0006538 180goto again\r
f466241d 181\r
aad0eae4
JR
182rem ----------------------------------------------------------------------\r
183\r
184:withoutjpeg\r
185set jpegsupport=N\r
186set HAVE_JPEG=\r
39bd0e03 187shift\r
aad0eae4
JR
188goto again\r
189\r
12ff2dc5
JB
190rem ----------------------------------------------------------------------\r
191\r
192:withoutgif\r
193set gifsupport=N\r
194set HAVE_GIF=\r
195shift\r
196goto again\r
197\r
47c01e80
JB
198rem ----------------------------------------------------------------------\r
199\r
200:withouttiff\r
201set tiffsupport=N\r
202set HAVE_TIFF=\r
203shift\r
204goto again\r
205\r
507f5dce
JR
206rem ----------------------------------------------------------------------\r
207\r
208:withoutxpm\r
209set xpmsupport=N\r
210set HAVE_XPM=\r
211shift\r
212goto again\r
213\r
f466241d
EZ
214rem ----------------------------------------------------------------------\r
215rem Check that necessary utilities (cp and rm) are present.\r
216:checkutils\r
217echo Checking for 'cp'...\r
218cp configure.bat junk.bat\r
219if not exist junk.bat goto needcp\r
220echo Checking for 'rm'...\r
221rm junk.bat\r
222if exist junk.bat goto needrm\r
223goto checkcompiler\r
224:needcp\r
225echo You need 'cp' (the Unix file copy program) to build Emacs.\r
226goto end\r
227:needrm\r
228del junk.bat\r
229echo You need 'rm' (the Unix file delete program) to build Emacs.\r
230goto end\r
231\r
232rem ----------------------------------------------------------------------\r
233rem Auto-detect compiler if not specified, and validate GCC if chosen.\r
234:checkcompiler\r
e0006538 235if (%COMPILER%)==(cl) goto compilercheckdone\r
f466241d
EZ
236if (%COMPILER%)==(gcc) goto checkgcc\r
237\r
238echo Checking whether 'cl' is available...\r
239echo main(){} >junk.c\r
240cl -nologo -c junk.c\r
241if exist junk.obj goto clOK\r
242\r
243echo Checking whether 'gcc' is available...\r
244gcc -c junk.c\r
245if not exist junk.o goto nocompiler\r
246del junk.o\r
247\r
248:checkgcc\r
249Rem WARNING -- COMMAND.COM on some systems only looks at the first\r
250Rem 8 characters of a label. So do NOT be tempted to change\r
251Rem chkapi* into something fancier like checkw32api\r
252Rem You HAVE been warned!\r
253if (%nocygwin%) == (Y) goto chkapi\r
254echo Checking whether gcc requires '-mno-cygwin'...\r
255echo #include "cygwin/version.h" >junk.c\r
256echo main(){} >>junk.c\r
dbbdb507
EZ
257echo gcc -c junk.c >>config.log\r
258gcc -c junk.c >>config.log 2>&1\r
f466241d 259if not exist junk.o goto chkapi\r
dbbdb507
EZ
260echo gcc -mno-cygwin -c junk.c >>config.log\r
261gcc -mno-cygwin -c junk.c >>config.log 2>&1\r
f466241d
EZ
262if exist junk.o set nocygwin=Y\r
263rm -f junk.c junk.o\r
264\r
265:chkapi\r
dbbdb507
EZ
266echo The failed program was: >>config.log\r
267type junk.c >>config.log\r
f466241d
EZ
268rem ----------------------------------------------------------------------\r
269rem Older versions of the Windows API headers either don't have any of\r
270rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1\r
271rem are like this), or have a typo in the definition of\r
272rem IMAGE_FIRST_SECTION (the headers with gcc/mingw32 2.95 have this\r
273rem problem). The gcc/mingw32 2.95.2 headers are okay, as are distros\r
274rem of w32api-xxx.zip from Anders Norlander since 1999-11-18 at least.\r
275rem\r
276echo Checking whether W32 API headers are too old...\r
277echo #include "windows.h" >junk.c\r
278echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c\r
279echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c\r
280if (%nocygwin%) == (Y) goto chkapi1\r
281set cf=%usercflags%\r
282goto chkapi2\r
283:chkapi1\r
284set cf=%usercflags% -mno-cygwin\r
285:chkapi2\r
286echo on\r
287gcc %cf% -c junk.c\r
dbbdb507
EZ
288@echo off\r
289@echo gcc %cf% -c junk.c >>config.log\r
290gcc %cf% -c junk.c >>config.log 2>&1\r
f466241d
EZ
291set cf=\r
292if exist junk.o goto gccOk\r
dbbdb507
EZ
293echo The failed program was: >>config.log\r
294type junk.c >>config.log\r
f466241d
EZ
295\r
296:nocompiler\r
297echo.\r
298echo Configure failed.\r
299echo To configure Emacs for Windows, you need to have either\r
300echo gcc-2.95 or later with Mingw32 and the W32 API headers,\r
301echo or MSVC 2.x or later.\r
302del junk.c\r
303goto end\r
304\r
305:gccOk\r
306set COMPILER=gcc\r
f466241d 307echo Using 'gcc'\r
dbbdb507
EZ
308rm -f junk.c junk.o\r
309Rem It is not clear what GCC version began supporting -mtune\r
310Rem and pentium4 on x86, so check this explicitly.\r
311echo main(){} >junk.c\r
312echo gcc -c -O2 -mtune=pentium4 junk.c >>config.log\r
313gcc -c -O2 -mtune=pentium4 junk.c >>config.log 2>&1\r
314if not errorlevel 1 goto gccMtuneOk\r
315echo The failed program was: >>config.log\r
316type junk.c >>config.log\r
317set mf=-mcpu=i686\r
318rm -f junk.c junk.o\r
319goto compilercheckdone\r
320:gccMtuneOk\r
321echo GCC supports -mtune=pentium4 >>config.log\r
322set mf=-mtune=pentium4\r
323rm -f junk.c junk.o\r
e0006538 324goto compilercheckdone\r
f466241d
EZ
325\r
326:clOk\r
327set COMPILER=cl\r
328rm -f junk.c junk.obj\r
329echo Using 'MSVC'\r
e0006538
JR
330\r
331:compilercheckdone\r
332\r
333rem ----------------------------------------------------------------------\r
334rem Check for external image libraries. Since they are loaded\r
335rem dynamically, the libraries themselves do not need to be present\r
336rem at compile time, but the header files are required.\r
337\r
112dc8e1
JR
338set mingwflag=\r
339\r
340if (%nocygwin%) == (N) goto flagsOK\r
341set mingwflag=-mno-cygwin\r
342\r
343:flagsOK\r
344\r
e0006538
JR
345if (%pngsupport%) == (N) goto pngDone\r
346\r
347echo Checking for libpng...\r
348echo #include "png.h" >junk.c\r
349echo main (){} >>junk.c\r
350rem -o option is ignored with cl, but allows result to be consistent.\r
dbbdb507
EZ
351echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
352%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
e0006538
JR
353if exist junk.obj goto havePng\r
354\r
507f5dce 355echo ...png.h not found, building without PNG support.\r
dbbdb507
EZ
356echo The failed program was: >>config.log\r
357type junk.c >>config.log\r
e0006538
JR
358set HAVE_PNG=\r
359goto :pngDone\r
360\r
361:havePng\r
362echo ...PNG header available, building with PNG support.\r
363set HAVE_PNG=1\r
364\r
365:pngDone\r
366rm -f junk.c junk.obj\r
f466241d 367\r
aad0eae4
JR
368if (%jpegsupport%) == (N) goto jpegDone\r
369\r
507f5dce 370echo Checking for jpeg-6b...\r
aad0eae4
JR
371echo #include "jconfig.h" >junk.c\r
372echo main (){} >>junk.c\r
373rem -o option is ignored with cl, but allows result to be consistent.\r
dbbdb507
EZ
374echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
375%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
aad0eae4
JR
376if exist junk.obj goto haveJpeg\r
377\r
507f5dce 378echo ...jconfig.h not found, building without JPEG support.\r
dbbdb507
EZ
379echo The failed program was: >>config.log\r
380type junk.c >>config.log\r
aad0eae4
JR
381set HAVE_JPEG=\r
382goto :jpegDone\r
383\r
384:haveJpeg\r
385echo ...JPEG header available, building with JPEG support.\r
386set HAVE_JPEG=1\r
387\r
388:jpegDone\r
389rm -f junk.c junk.obj\r
390\r
12ff2dc5
JB
391if (%gifsupport%) == (N) goto gifDone\r
392\r
507f5dce 393echo Checking for libgif...\r
12ff2dc5
JB
394echo #include "gif_lib.h" >junk.c\r
395echo main (){} >>junk.c\r
396rem -o option is ignored with cl, but allows result to be consistent.\r
dbbdb507
EZ
397echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
398%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
12ff2dc5
JB
399if exist junk.obj goto haveGif\r
400\r
507f5dce 401echo ...gif_lib.h not found, building without GIF support.\r
dbbdb507
EZ
402echo The failed program was: >>config.log\r
403type junk.c >>config.log\r
12ff2dc5
JB
404set HAVE_GIF=\r
405goto :gifDone\r
406\r
407:haveGif\r
408echo ...GIF header available, building with GIF support.\r
409set HAVE_GIF=1\r
410\r
411:gifDone\r
412rm -f junk.c junk.obj\r
413\r
47c01e80
JB
414if (%tiffsupport%) == (N) goto tiffDone\r
415\r
416echo Checking for tiff...\r
417echo #include "tiffio.h" >junk.c\r
418echo main (){} >>junk.c\r
419rem -o option is ignored with cl, but allows result to be consistent.\r
dbbdb507
EZ
420echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
421%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
47c01e80
JB
422if exist junk.obj goto haveTiff\r
423\r
507f5dce 424echo ...tiffio.h not found, building without TIFF support.\r
dbbdb507
EZ
425echo The failed program was: >>config.log\r
426type junk.c >>config.log\r
47c01e80
JB
427set HAVE_TIFF=\r
428goto :tiffDone\r
429\r
430:haveTiff\r
431echo ...TIFF header available, building with TIFF support.\r
432set HAVE_TIFF=1\r
433\r
434:tiffDone\r
435rm -f junk.c junk.obj\r
436\r
507f5dce
JR
437if (%xpmsupport%) == (N) goto xpmDone\r
438\r
439echo Checking for libXpm...\r
440echo #define FOR_MSW 1 >junk.c\r
441echo #include "X11/xpm.h" >>junk.c\r
442echo main (){} >>junk.c\r
443rem -o option is ignored with cl, but allows result to be consistent.\r
dbbdb507
EZ
444echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
445%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
507f5dce
JR
446if exist junk.obj goto haveXpm\r
447\r
448echo ...X11/xpm.h not found, building without XPM support.\r
dbbdb507
EZ
449echo The failed program was: >>config.log\r
450type junk.c >>config.log\r
507f5dce
JR
451set HAVE_XPM=\r
452goto :xpmDone\r
453\r
454:haveXpm\r
455echo ...XPM header available, building with XPM support.\r
456set HAVE_XPM=1\r
457\r
458:xpmDone\r
459rm -f junk.c junk.obj junk.err junk.out\r
460\r
f466241d
EZ
461rem ----------------------------------------------------------------------\r
462:genmakefiles\r
463echo Generating makefiles\r
464if %COMPILER% == gcc set MAKECMD=gmake\r
465if %COMPILER% == cl set MAKECMD=nmake\r
466\r
467rem Pass on chosen settings to makefiles.\r
468rem NB. Be very careful to not have a space before redirection symbols\r
469rem except when there is a preceding digit, when a space is required.\r
470rem\r
471echo # Start of settings from configure.bat >config.settings\r
472echo COMPILER=%COMPILER%>>config.settings\r
dbbdb507 473if not "(%mf%)" == "()" echo MCPU_FLAG=%mf%>>config.settings\r
f466241d
EZ
474if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings\r
475if (%noopt%) == (Y) echo NOOPT=1 >>config.settings\r
476if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings\r
477if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings\r
aa9dea64
EZ
478rem We go thru docflags because usercflags could be "-DFOO=bar" -something\r
479rem and the if command cannot cope with this\r
480for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y\r
481if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags%>>config.settings\r
482for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y\r
483if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags%>>config.settings\r
f466241d
EZ
484echo # End of settings from configure.bat>>config.settings\r
485echo. >>config.settings\r
486\r
c262c68c
EZ
487copy config.nt config.tmp\r
488echo. >>config.tmp\r
489echo /* Start of settings from configure.bat. */ >>config.tmp\r
aa9dea64
EZ
490if (%docflags%) == (Y) echo #define USER_CFLAGS " %usercflags%">>config.tmp\r
491if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %userldflags%">>config.tmp\r
c262c68c
EZ
492if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp\r
493if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp\r
494if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp\r
495if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>config.tmp\r
496if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM 1 >>config.tmp\r
497echo /* End of settings from configure.bat. */ >>config.tmp\r
498\r
499Rem See if fc.exe returns a meaningful exit status. If it does, we\r
500Rem might as well avoid unnecessary overwriting of config.h and epaths.h,\r
501Rem since this forces recompilation of every source file.\r
502if exist foo.bar del foo.bar\r
503fc /b foo.bar foo.bar >nul 2>&1\r
504if not errorlevel 2 goto doCopy\r
505fc /b config.tmp ..\src\config.h >nul 2>&1\r
506if errorlevel 1 goto doCopy\r
507fc /b paths.h ..\src\epaths.h >nul 2>&1\r
508if errorlevel 0 goto dontCopy\r
509:doCopy\r
510copy config.tmp ..\src\config.h\r
f466241d
EZ
511copy paths.h ..\src\epaths.h\r
512\r
c262c68c
EZ
513:dontCopy\r
514if exist config.tmp del config.tmp\r
f466241d
EZ
515copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile\r
516copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile\r
517copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile\r
80c164ec
JR
518copy /b config.settings+%MAKECMD%.defs+..\man\makefile.w32-in ..\man\makefile\r
519copy /b config.settings+%MAKECMD%.defs+..\lispref\makefile.w32-in ..\lispref\makefile\r
520copy /b config.settings+%MAKECMD%.defs+..\lispintro\makefile.w32-in ..\lispintro\makefile\r
f466241d
EZ
521if exist ..\lisp\makefile rm -f ../lisp/[Mm]akefile\r
522copy /b config.settings+%MAKECMD%.defs+..\lisp\makefile.w32-in ..\lisp\makefile\r
523rem Use the default (no-op) Makefile.in if the nt version is not present.\r
524if exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\makefile.w32-in ..\leim\makefile\r
525if not exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\Makefile.in ..\leim\makefile\r
526del config.settings\r
527\r
e44f8099
EZ
528Rem Some people use WinZip which doesn't create empty directories!\r
529if not exist ..\site-lisp\nul mkdir ..\site-lisp\\r
57a64408
JB
530Rem Update subdirs.el only if it is different or fc.exe doesn't work.\r
531if exist foo.bar del foo.bar\r
532fc /b foo.bar foo.bar >nul 2>&1\r
533if not errorlevel 2 goto doUpdateSubdirs\r
534fc /b subdirs.el ..\site-lisp\subdirs.el >nul 2>&1\r
535if not errorlevel 1 goto dontUpdateSubdirs\r
536:doUpdateSubdirs\r
537if exist ..\site-lisp\subdirs.el del ..\site-lisp\subdirs.el\r
538copy subdirs.el ..\site-lisp\subdirs.el\r
539\r
540:dontUpdateSubdirs\r
f466241d
EZ
541echo.\r
542echo Emacs successfully configured.\r
a27014fc 543echo Emacs successfully configured. >>config.log\r
f466241d
EZ
544echo Run `%MAKECMD%' to build, then run `%MAKECMD% install' to install.\r
545goto end\r
546\r
547:SmallEnv\r
548echo Your environment size is too small. Please enlarge it and rerun configure.\r
549echo For example, type "command.com /e:2048" to have 2048 bytes available.\r
550set $foo$=\r
551:end\r
552set prefix=\r
553set nodebug=\r
554set noopt=\r
555set nocygwin=\r
556set COMPILER=\r
557set MAKECMD=\r
558set usercflags=\r
559set userldflags=\r
112dc8e1 560set mingwflag=\r
dbbdb507 561set mf=\r
a2fcf029
MB
562\r
563goto skipArchTag\r
564 arch-tag: 300d20a4-1675-4e75-b615-7ce1a8c5376c\r
565:skipArchTag\r