(w32_BDF_to_x_font): Unmap memory when finished.
[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
4e6835db 5rem 2006, 2007 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
11rem the Free Software Foundation; either version 2, or (at your option)\r
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
17f55fae
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
17f55fae
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
17f55fae
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
87set userldflags=\r
88set sep1=\r
89set sep2=\r
90\r
91rem ----------------------------------------------------------------------\r
92rem Handle arguments.\r
93:again\r
94if "%1" == "-h" goto usage\r
95if "%1" == "--help" goto usage\r
96if "%1" == "--prefix" goto setprefix\r
97if "%1" == "--with-gcc" goto withgcc\r
98if "%1" == "--with-msvc" goto withmsvc\r
99if "%1" == "--no-debug" goto nodebug\r
100if "%1" == "--no-opt" goto noopt\r
101if "%1" == "--no-cygwin" goto nocygwin\r
102if "%1" == "--cflags" goto usercflags\r
103if "%1" == "--ldflags" goto userldflags\r
e0006538 104if "%1" == "--without-png" goto withoutpng\r
aad0eae4 105if "%1" == "--without-jpeg" goto withoutjpeg\r
12ff2dc5 106if "%1" == "--without-gif" goto withoutgif\r
47c01e80 107if "%1" == "--without-tiff" goto withouttiff\r
507f5dce 108if "%1" == "--without-xpm" goto withoutxpm\r
f466241d
EZ
109if "%1" == "" goto checkutils\r
110:usage\r
111echo Usage: configure [options]\r
112echo Options:\r
113echo. --prefix PREFIX install Emacs in directory PREFIX\r
114echo. --with-gcc use GCC to compile Emacs\r
115echo. --with-msvc use MSVC to compile Emacs\r
116echo. --no-debug exclude debug info from executables\r
117echo. --no-opt disable optimization\r
118echo. --no-cygwin use -mno-cygwin option with GCC\r
119echo. --cflags FLAG pass FLAG to compiler\r
120echo. --ldflags FLAG pass FLAG to compiler when linking\r
7019fb66 121echo. --without-png do not use libpng even if it is installed\r
507f5dce
JR
122echo. --without-jpeg do not use jpeg-6b even if it is installed\r
123echo. --without-gif do not use libungif even if it is installed\r
6ed82072
JB
124echo. --without-tiff do not use libtiff even if it is installed\r
125echo. --without-xpm do not use libXpm even if it is installed\r
f466241d
EZ
126goto end\r
127rem ----------------------------------------------------------------------\r
128:setprefix\r
129shift\r
130set prefix=%1\r
131shift\r
132goto again\r
133rem ----------------------------------------------------------------------\r
134:withgcc\r
135set COMPILER=gcc\r
136shift\r
137goto again\r
138rem ----------------------------------------------------------------------\r
139:withmsvc\r
140set COMPILER=cl\r
141shift\r
142goto again\r
143rem ----------------------------------------------------------------------\r
144:nodebug\r
145set nodebug=Y\r
146shift\r
147goto again\r
148rem ----------------------------------------------------------------------\r
149:noopt\r
150set noopt=Y\r
151shift\r
152goto again\r
153rem ----------------------------------------------------------------------\r
154:nocygwin\r
155set nocygwin=Y\r
156shift\r
157goto again\r
158rem ----------------------------------------------------------------------\r
159:usercflags\r
160shift\r
161set usercflags=%usercflags%%sep1%%1\r
162set sep1= %nothing%\r
163shift\r
164goto again\r
165rem ----------------------------------------------------------------------\r
166:userldflags\r
167shift\r
168set userldflags=%userldflags%%sep2%%1\r
169set sep2= %nothing%\r
170shift\r
171goto again\r
e0006538
JR
172rem ----------------------------------------------------------------------\r
173\r
174:withoutpng\r
175set pngsupport=N\r
176set HAVE_PNG=\r
39bd0e03 177shift\r
e0006538 178goto again\r
f466241d 179\r
aad0eae4
JR
180rem ----------------------------------------------------------------------\r
181\r
182:withoutjpeg\r
183set jpegsupport=N\r
184set HAVE_JPEG=\r
39bd0e03 185shift\r
aad0eae4
JR
186goto again\r
187\r
12ff2dc5
JB
188rem ----------------------------------------------------------------------\r
189\r
190:withoutgif\r
191set gifsupport=N\r
192set HAVE_GIF=\r
193shift\r
194goto again\r
195\r
47c01e80
JB
196rem ----------------------------------------------------------------------\r
197\r
198:withouttiff\r
199set tiffsupport=N\r
200set HAVE_TIFF=\r
201shift\r
202goto again\r
203\r
507f5dce
JR
204rem ----------------------------------------------------------------------\r
205\r
206:withoutxpm\r
207set xpmsupport=N\r
208set HAVE_XPM=\r
209shift\r
210goto again\r
211\r
f466241d
EZ
212rem ----------------------------------------------------------------------\r
213rem Check that necessary utilities (cp and rm) are present.\r
214:checkutils\r
215echo Checking for 'cp'...\r
216cp configure.bat junk.bat\r
217if not exist junk.bat goto needcp\r
218echo Checking for 'rm'...\r
219rm junk.bat\r
220if exist junk.bat goto needrm\r
221goto checkcompiler\r
222:needcp\r
223echo You need 'cp' (the Unix file copy program) to build Emacs.\r
224goto end\r
225:needrm\r
226del junk.bat\r
227echo You need 'rm' (the Unix file delete program) to build Emacs.\r
228goto end\r
229\r
230rem ----------------------------------------------------------------------\r
231rem Auto-detect compiler if not specified, and validate GCC if chosen.\r
232:checkcompiler\r
e0006538 233if (%COMPILER%)==(cl) goto compilercheckdone\r
f466241d
EZ
234if (%COMPILER%)==(gcc) goto checkgcc\r
235\r
236echo Checking whether 'cl' is available...\r
237echo main(){} >junk.c\r
238cl -nologo -c junk.c\r
239if exist junk.obj goto clOK\r
240\r
241echo Checking whether 'gcc' is available...\r
242gcc -c junk.c\r
243if not exist junk.o goto nocompiler\r
244del junk.o\r
245\r
246:checkgcc\r
247Rem WARNING -- COMMAND.COM on some systems only looks at the first\r
248Rem 8 characters of a label. So do NOT be tempted to change\r
249Rem chkapi* into something fancier like checkw32api\r
250Rem You HAVE been warned!\r
251if (%nocygwin%) == (Y) goto chkapi\r
252echo Checking whether gcc requires '-mno-cygwin'...\r
253echo #include "cygwin/version.h" >junk.c\r
254echo main(){} >>junk.c\r
dbbdb507
EZ
255echo gcc -c junk.c >>config.log\r
256gcc -c junk.c >>config.log 2>&1\r
f466241d 257if not exist junk.o goto chkapi\r
dbbdb507
EZ
258echo gcc -mno-cygwin -c junk.c >>config.log\r
259gcc -mno-cygwin -c junk.c >>config.log 2>&1\r
f466241d
EZ
260if exist junk.o set nocygwin=Y\r
261rm -f junk.c junk.o\r
262\r
263:chkapi\r
dbbdb507
EZ
264echo The failed program was: >>config.log\r
265type junk.c >>config.log\r
f466241d
EZ
266rem ----------------------------------------------------------------------\r
267rem Older versions of the Windows API headers either don't have any of\r
268rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1\r
269rem are like this), or have a typo in the definition of\r
270rem IMAGE_FIRST_SECTION (the headers with gcc/mingw32 2.95 have this\r
271rem problem). The gcc/mingw32 2.95.2 headers are okay, as are distros\r
272rem of w32api-xxx.zip from Anders Norlander since 1999-11-18 at least.\r
273rem\r
274echo Checking whether W32 API headers are too old...\r
275echo #include "windows.h" >junk.c\r
276echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c\r
277echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c\r
278if (%nocygwin%) == (Y) goto chkapi1\r
279set cf=%usercflags%\r
280goto chkapi2\r
281:chkapi1\r
282set cf=%usercflags% -mno-cygwin\r
283:chkapi2\r
284echo on\r
285gcc %cf% -c junk.c\r
dbbdb507
EZ
286@echo off\r
287@echo gcc %cf% -c junk.c >>config.log\r
288gcc %cf% -c junk.c >>config.log 2>&1\r
f466241d
EZ
289set cf=\r
290if exist junk.o goto gccOk\r
dbbdb507
EZ
291echo The failed program was: >>config.log\r
292type junk.c >>config.log\r
f466241d
EZ
293\r
294:nocompiler\r
295echo.\r
296echo Configure failed.\r
297echo To configure Emacs for Windows, you need to have either\r
298echo gcc-2.95 or later with Mingw32 and the W32 API headers,\r
299echo or MSVC 2.x or later.\r
300del junk.c\r
301goto end\r
302\r
303:gccOk\r
304set COMPILER=gcc\r
f466241d 305echo Using 'gcc'\r
dbbdb507
EZ
306rm -f junk.c junk.o\r
307Rem It is not clear what GCC version began supporting -mtune\r
308Rem and pentium4 on x86, so check this explicitly.\r
309echo main(){} >junk.c\r
310echo gcc -c -O2 -mtune=pentium4 junk.c >>config.log\r
311gcc -c -O2 -mtune=pentium4 junk.c >>config.log 2>&1\r
312if not errorlevel 1 goto gccMtuneOk\r
313echo The failed program was: >>config.log\r
314type junk.c >>config.log\r
315set mf=-mcpu=i686\r
316rm -f junk.c junk.o\r
317goto compilercheckdone\r
318:gccMtuneOk\r
319echo GCC supports -mtune=pentium4 >>config.log\r
320set mf=-mtune=pentium4\r
321rm -f junk.c junk.o\r
e0006538 322goto compilercheckdone\r
f466241d
EZ
323\r
324:clOk\r
325set COMPILER=cl\r
326rm -f junk.c junk.obj\r
327echo Using 'MSVC'\r
e0006538
JR
328\r
329:compilercheckdone\r
330\r
331rem ----------------------------------------------------------------------\r
332rem Check for external image libraries. Since they are loaded\r
333rem dynamically, the libraries themselves do not need to be present\r
334rem at compile time, but the header files are required.\r
335\r
112dc8e1
JR
336set mingwflag=\r
337\r
338if (%nocygwin%) == (N) goto flagsOK\r
339set mingwflag=-mno-cygwin\r
340\r
341:flagsOK\r
342\r
e0006538
JR
343if (%pngsupport%) == (N) goto pngDone\r
344\r
345echo Checking for libpng...\r
346echo #include "png.h" >junk.c\r
347echo main (){} >>junk.c\r
348rem -o option is ignored with cl, but allows result to be consistent.\r
dbbdb507
EZ
349echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
350%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
e0006538
JR
351if exist junk.obj goto havePng\r
352\r
507f5dce 353echo ...png.h not found, building without PNG support.\r
dbbdb507
EZ
354echo The failed program was: >>config.log\r
355type junk.c >>config.log\r
e0006538
JR
356set HAVE_PNG=\r
357goto :pngDone\r
358\r
359:havePng\r
360echo ...PNG header available, building with PNG support.\r
361set HAVE_PNG=1\r
362\r
363:pngDone\r
364rm -f junk.c junk.obj\r
f466241d 365\r
aad0eae4
JR
366if (%jpegsupport%) == (N) goto jpegDone\r
367\r
507f5dce 368echo Checking for jpeg-6b...\r
aad0eae4
JR
369echo #include "jconfig.h" >junk.c\r
370echo main (){} >>junk.c\r
371rem -o option is ignored with cl, but allows result to be consistent.\r
dbbdb507
EZ
372echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
373%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
aad0eae4
JR
374if exist junk.obj goto haveJpeg\r
375\r
507f5dce 376echo ...jconfig.h not found, building without JPEG support.\r
dbbdb507
EZ
377echo The failed program was: >>config.log\r
378type junk.c >>config.log\r
aad0eae4
JR
379set HAVE_JPEG=\r
380goto :jpegDone\r
381\r
382:haveJpeg\r
383echo ...JPEG header available, building with JPEG support.\r
384set HAVE_JPEG=1\r
385\r
386:jpegDone\r
387rm -f junk.c junk.obj\r
388\r
12ff2dc5
JB
389if (%gifsupport%) == (N) goto gifDone\r
390\r
507f5dce 391echo Checking for libgif...\r
12ff2dc5
JB
392echo #include "gif_lib.h" >junk.c\r
393echo main (){} >>junk.c\r
394rem -o option is ignored with cl, but allows result to be consistent.\r
dbbdb507
EZ
395echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
396%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
12ff2dc5
JB
397if exist junk.obj goto haveGif\r
398\r
507f5dce 399echo ...gif_lib.h not found, building without GIF support.\r
dbbdb507
EZ
400echo The failed program was: >>config.log\r
401type junk.c >>config.log\r
12ff2dc5
JB
402set HAVE_GIF=\r
403goto :gifDone\r
404\r
405:haveGif\r
406echo ...GIF header available, building with GIF support.\r
407set HAVE_GIF=1\r
408\r
409:gifDone\r
410rm -f junk.c junk.obj\r
411\r
47c01e80
JB
412if (%tiffsupport%) == (N) goto tiffDone\r
413\r
414echo Checking for tiff...\r
415echo #include "tiffio.h" >junk.c\r
416echo main (){} >>junk.c\r
417rem -o option is ignored with cl, but allows result to be consistent.\r
dbbdb507
EZ
418echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
419%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
47c01e80
JB
420if exist junk.obj goto haveTiff\r
421\r
507f5dce 422echo ...tiffio.h not found, building without TIFF support.\r
dbbdb507
EZ
423echo The failed program was: >>config.log\r
424type junk.c >>config.log\r
47c01e80
JB
425set HAVE_TIFF=\r
426goto :tiffDone\r
427\r
428:haveTiff\r
429echo ...TIFF header available, building with TIFF support.\r
430set HAVE_TIFF=1\r
431\r
432:tiffDone\r
433rm -f junk.c junk.obj\r
434\r
507f5dce
JR
435if (%xpmsupport%) == (N) goto xpmDone\r
436\r
437echo Checking for libXpm...\r
438echo #define FOR_MSW 1 >junk.c\r
439echo #include "X11/xpm.h" >>junk.c\r
440echo main (){} >>junk.c\r
441rem -o option is ignored with cl, but allows result to be consistent.\r
dbbdb507
EZ
442echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
443%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
507f5dce
JR
444if exist junk.obj goto haveXpm\r
445\r
446echo ...X11/xpm.h not found, building without XPM support.\r
dbbdb507
EZ
447echo The failed program was: >>config.log\r
448type junk.c >>config.log\r
507f5dce
JR
449set HAVE_XPM=\r
450goto :xpmDone\r
451\r
452:haveXpm\r
453echo ...XPM header available, building with XPM support.\r
454set HAVE_XPM=1\r
455\r
456:xpmDone\r
457rm -f junk.c junk.obj junk.err junk.out\r
458\r
f466241d
EZ
459rem ----------------------------------------------------------------------\r
460:genmakefiles\r
461echo Generating makefiles\r
462if %COMPILER% == gcc set MAKECMD=gmake\r
463if %COMPILER% == cl set MAKECMD=nmake\r
464\r
465rem Pass on chosen settings to makefiles.\r
466rem NB. Be very careful to not have a space before redirection symbols\r
467rem except when there is a preceding digit, when a space is required.\r
468rem\r
469echo # Start of settings from configure.bat >config.settings\r
470echo COMPILER=%COMPILER%>>config.settings\r
dbbdb507 471if not "(%mf%)" == "()" echo MCPU_FLAG=%mf%>>config.settings\r
f466241d
EZ
472if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings\r
473if (%noopt%) == (Y) echo NOOPT=1 >>config.settings\r
474if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings\r
475if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings\r
476if not "(%usercflags%)" == "()" echo USER_CFLAGS=%usercflags%>>config.settings\r
477if not "(%userldflags%)" == "()" echo USER_LDFLAGS=%userldflags%>>config.settings\r
478echo # End of settings from configure.bat>>config.settings\r
479echo. >>config.settings\r
480\r
c262c68c
EZ
481copy config.nt config.tmp\r
482echo. >>config.tmp\r
483echo /* Start of settings from configure.bat. */ >>config.tmp\r
484if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>config.tmp\r
485if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>config.tmp\r
486if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp\r
487if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp\r
488if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp\r
489if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>config.tmp\r
490if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM 1 >>config.tmp\r
491echo /* End of settings from configure.bat. */ >>config.tmp\r
492\r
493Rem See if fc.exe returns a meaningful exit status. If it does, we\r
494Rem might as well avoid unnecessary overwriting of config.h and epaths.h,\r
495Rem since this forces recompilation of every source file.\r
496if exist foo.bar del foo.bar\r
497fc /b foo.bar foo.bar >nul 2>&1\r
498if not errorlevel 2 goto doCopy\r
499fc /b config.tmp ..\src\config.h >nul 2>&1\r
500if errorlevel 1 goto doCopy\r
501fc /b paths.h ..\src\epaths.h >nul 2>&1\r
502if errorlevel 0 goto dontCopy\r
503:doCopy\r
504copy config.tmp ..\src\config.h\r
f466241d
EZ
505copy paths.h ..\src\epaths.h\r
506\r
c262c68c
EZ
507:dontCopy\r
508if exist config.tmp del config.tmp\r
f466241d
EZ
509copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile\r
510copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile\r
511copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile\r
80c164ec
JR
512copy /b config.settings+%MAKECMD%.defs+..\man\makefile.w32-in ..\man\makefile\r
513copy /b config.settings+%MAKECMD%.defs+..\lispref\makefile.w32-in ..\lispref\makefile\r
514copy /b config.settings+%MAKECMD%.defs+..\lispintro\makefile.w32-in ..\lispintro\makefile\r
f466241d
EZ
515if exist ..\lisp\makefile rm -f ../lisp/[Mm]akefile\r
516copy /b config.settings+%MAKECMD%.defs+..\lisp\makefile.w32-in ..\lisp\makefile\r
517rem Use the default (no-op) Makefile.in if the nt version is not present.\r
518if exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\makefile.w32-in ..\leim\makefile\r
519if not exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\Makefile.in ..\leim\makefile\r
520del config.settings\r
521\r
e44f8099
EZ
522Rem Some people use WinZip which doesn't create empty directories!\r
523if not exist ..\site-lisp\nul mkdir ..\site-lisp\\r
57a64408
JB
524Rem Update subdirs.el only if it is different or fc.exe doesn't work.\r
525if exist foo.bar del foo.bar\r
526fc /b foo.bar foo.bar >nul 2>&1\r
527if not errorlevel 2 goto doUpdateSubdirs\r
528fc /b subdirs.el ..\site-lisp\subdirs.el >nul 2>&1\r
529if not errorlevel 1 goto dontUpdateSubdirs\r
530:doUpdateSubdirs\r
531if exist ..\site-lisp\subdirs.el del ..\site-lisp\subdirs.el\r
532copy subdirs.el ..\site-lisp\subdirs.el\r
533\r
534:dontUpdateSubdirs\r
f466241d
EZ
535echo.\r
536echo Emacs successfully configured.\r
a27014fc 537echo Emacs successfully configured. >>config.log\r
f466241d
EZ
538echo Run `%MAKECMD%' to build, then run `%MAKECMD% install' to install.\r
539goto end\r
540\r
541:SmallEnv\r
542echo Your environment size is too small. Please enlarge it and rerun configure.\r
543echo For example, type "command.com /e:2048" to have 2048 bytes available.\r
544set $foo$=\r
545:end\r
546set prefix=\r
547set nodebug=\r
548set noopt=\r
549set nocygwin=\r
550set COMPILER=\r
551set MAKECMD=\r
552set usercflags=\r
553set userldflags=\r
112dc8e1 554set mingwflag=\r
dbbdb507 555set mf=\r
a2fcf029
MB
556\r
557goto skipArchTag\r
558 arch-tag: 300d20a4-1675-4e75-b615-7ce1a8c5376c\r
559:skipArchTag\r