Commit | Line | Data |
---|---|---|
f466241d EZ |
1 | @echo off\r |
2 | rem ----------------------------------------------------------------------\r | |
ee705a5c | 3 | rem Configuration script for MS Windows operating systems\r |
73b0cd50 | 4 | rem Copyright (C) 1999-2011 Free Software Foundation, Inc.\r |
f466241d EZ |
5 | \r |
6 | rem This file is part of GNU Emacs.\r | |
7 | \r | |
eef0be9e | 8 | rem GNU Emacs is free software: you can redistribute it and/or modify\r |
f466241d | 9 | rem it under the terms of the GNU General Public License as published by\r |
eef0be9e GM |
10 | rem the Free Software Foundation, either version 3 of the License, or\r |
11 | rem (at your option) any later version.\r | |
f466241d EZ |
12 | \r |
13 | rem GNU Emacs is distributed in the hope that it will be useful,\r | |
14 | rem but WITHOUT ANY WARRANTY; without even the implied warranty of\r | |
15 | rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r | |
16 | rem GNU General Public License for more details.\r | |
17 | \r | |
18 | rem You should have received a copy of the GNU General Public License\r | |
eef0be9e GM |
19 | rem along with GNU Emacs. If not, see http://www.gnu.org/licenses/.\r |
20 | \r | |
f466241d EZ |
21 | rem ----------------------------------------------------------------------\r |
22 | rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:\r | |
23 | rem\r | |
ee705a5c | 24 | rem + MS Windows 95, NT or later\r |
361823f4 | 25 | rem + either MSVC 2.x or later, or gcc-2.95 or later (with GNU make 3.75\r |
56a469c3 EZ |
26 | rem or later) and the Mingw32 and W32 API headers and libraries.\r |
27 | rem + Visual Studio 2005 is not supported at this time.\r | |
f466241d | 28 | rem\r |
361823f4 | 29 | rem For reference, here is a list of which builds of GNU make are known to\r |
f466241d EZ |
30 | rem work or not, and whether they work in the presence and/or absence of\r |
31 | rem sh.exe.\r | |
7019fb66 | 32 | rem\r |
f466241d | 33 | rem sh exists no sh\r |
56a469c3 | 34 | rem cygwin b20.1 make (3.75): fails[1,5] fails[2,5]\r |
f466241d EZ |
35 | rem MSVC compiled gmake 3.77: okay okay\r |
36 | rem MSVC compiled gmake 3.78.1: okay okay\r | |
37 | rem MSVC compiled gmake 3.79.1: okay okay\r | |
56a469c3 EZ |
38 | rem mingw32/gcc-2.92.2 make (3.77): okay okay[4]\r |
39 | rem cygwin compiled gmake 3.77: fails[1,5] fails[2,5]\r | |
40 | rem cygwin compiled gmake 3.78.1: fails[5] fails[2,5]\r | |
41 | rem cygwin compiled gmake 3.79.1: fails[3,5] fails[2?,5]\r | |
17f55fae EZ |
42 | rem cygwin compiled make 3.80: okay[6] fails?[7]\r |
43 | rem cygwin compiled make 3.81: fails fails?[7]\r | |
56a469c3 | 44 | rem mingw32 compiled make 3.79.1: okay okay\r |
17f55fae EZ |
45 | rem mingw32 compiled make 3.80: okay okay?[7]\r |
46 | rem mingw32 compiled make 3.81: okay okay[8]\r | |
f466241d EZ |
47 | rem\r |
48 | rem [1] doesn't cope with makefiles with DOS line endings, so must mount\r | |
49 | rem emacs source with text!=binary.\r | |
50 | rem [2] fails when needs to invoke shell commands; okay invoking gcc etc.\r | |
56a469c3 EZ |
51 | rem [3] requires LC_MESSAGES support to build; cannot build with early\r |
52 | rem versions of cygwin.\r | |
53 | rem [4] may fail on Windows 9X and Windows ME; if so, install Bash.\r | |
54 | rem [5] fails when building leim due to the use of cygwin style paths.\r | |
55 | rem May work if building emacs without leim.\r | |
17f55fae EZ |
56 | rem [6] need to uncomment 3 lines in nt/gmake.defs that invoke `cygpath';\r |
57 | rem look for "cygpath" near line 85 of gmake.defs.\r | |
58 | rem [7] not recommended; please report if you try this combination.\r | |
59 | rem [8] tested only on Windows XP.\r | |
f466241d EZ |
60 | rem\r |
61 | \r | |
dbbdb507 EZ |
62 | if exist config.log del config.log\r |
63 | \r | |
f466241d EZ |
64 | rem ----------------------------------------------------------------------\r |
65 | rem See if the environment is large enough. We need 43 (?) bytes.\r | |
66 | set $foo$=123456789_123456789_123456789_123456789_123\r | |
67 | if not "%$foo$%" == "123456789_123456789_123456789_123456789_123" goto SmallEnv\r | |
68 | set $foo$=\r | |
69 | \r | |
70 | rem ----------------------------------------------------------------------\r | |
71 | rem Make sure we are running in the nt subdir\r | |
72 | if exist configure.bat goto start\r | |
73 | echo You must run configure from the nt subdirectory.\r | |
74 | goto end\r | |
75 | \r | |
76 | :start\r | |
4a1a6b5b BK |
77 | rem ----------------------------------------------------------------------\r |
78 | rem Attempt to enable command extensions. Set use_extensions to 1 if\r | |
79 | rem they are available and 0 if they are not available.\r | |
80 | set use_extensions=1\r | |
81 | setlocal ENABLEEXTENSIONS\r | |
82 | if "%CMDEXTVERSION%" == "" set use_extensions=0\r | |
83 | if "%use_extensions%" == "1" goto afterext\r | |
84 | \r | |
85 | echo. Command extensions are not available. Using parameters that include the =\r | |
86 | echo. character by enclosing them in quotes will not be supported.\r | |
87 | \r | |
88 | :afterext\r | |
89 | \r | |
f466241d EZ |
90 | rem ----------------------------------------------------------------------\r |
91 | rem Default settings.\r | |
92 | set prefix=\r | |
93 | set nodebug=N\r | |
94 | set noopt=N\r | |
7d0170c8 | 95 | set enablechecking=N\r |
75663c75 | 96 | set profile=N\r |
f466241d EZ |
97 | set nocygwin=N\r |
98 | set COMPILER=\r | |
99 | set usercflags=\r | |
4d3fcc8e | 100 | set escusercflags=\r |
3a1ebd63 | 101 | set docflags=\r |
f466241d | 102 | set userldflags=\r |
4d3fcc8e | 103 | set escuserldflags=\r |
fd4af8d9 | 104 | set extrauserlibs=\r |
3a1ebd63 | 105 | set doldflags=\r |
fd4af8d9 | 106 | set doextralibs=\r |
f466241d EZ |
107 | set sep1=\r |
108 | set sep2=\r | |
e3aef5c6 | 109 | set sep3=\r |
fd4af8d9 | 110 | set sep4=\r |
e3aef5c6 | 111 | set distfiles=\r |
f466241d EZ |
112 | \r |
113 | rem ----------------------------------------------------------------------\r | |
114 | rem Handle arguments.\r | |
115 | :again\r | |
116 | if "%1" == "-h" goto usage\r | |
117 | if "%1" == "--help" goto usage\r | |
118 | if "%1" == "--prefix" goto setprefix\r | |
119 | if "%1" == "--with-gcc" goto withgcc\r | |
120 | if "%1" == "--with-msvc" goto withmsvc\r | |
121 | if "%1" == "--no-debug" goto nodebug\r | |
122 | if "%1" == "--no-opt" goto noopt\r | |
7d0170c8 | 123 | if "%1" == "--enable-checking" goto enablechecking\r |
75663c75 | 124 | if "%1" == "--profile" goto profile\r |
f466241d EZ |
125 | if "%1" == "--no-cygwin" goto nocygwin\r |
126 | if "%1" == "--cflags" goto usercflags\r | |
127 | if "%1" == "--ldflags" goto userldflags\r | |
fd4af8d9 | 128 | if "%1" == "--lib" goto extrauserlibs\r |
e0006538 | 129 | if "%1" == "--without-png" goto withoutpng\r |
aad0eae4 | 130 | if "%1" == "--without-jpeg" goto withoutjpeg\r |
12ff2dc5 | 131 | if "%1" == "--without-gif" goto withoutgif\r |
47c01e80 | 132 | if "%1" == "--without-tiff" goto withouttiff\r |
fd4af8d9 | 133 | if "%1" == "--without-gnutls" goto withoutgnutls\r |
507f5dce | 134 | if "%1" == "--without-xpm" goto withoutxpm\r |
8bc63b1a | 135 | if "%1" == "--with-svg" goto withsvg\r |
e3aef5c6 | 136 | if "%1" == "--distfiles" goto distfiles\r |
f466241d | 137 | if "%1" == "" goto checkutils\r |
ee705a5c | 138 | \r |
f466241d EZ |
139 | :usage\r |
140 | echo Usage: configure [options]\r | |
141 | echo Options:\r | |
142 | echo. --prefix PREFIX install Emacs in directory PREFIX\r | |
143 | echo. --with-gcc use GCC to compile Emacs\r | |
144 | echo. --with-msvc use MSVC to compile Emacs\r | |
145 | echo. --no-debug exclude debug info from executables\r | |
146 | echo. --no-opt disable optimization\r | |
7d0170c8 | 147 | echo. --enable-checking enable checks and assertions\r |
75663c75 | 148 | echo. --profile enable profiling\r |
f466241d EZ |
149 | echo. --no-cygwin use -mno-cygwin option with GCC\r |
150 | echo. --cflags FLAG pass FLAG to compiler\r | |
151 | echo. --ldflags FLAG pass FLAG to compiler when linking\r | |
fd4af8d9 | 152 | echo. --lib LIB link to extra library LIB\r |
f01e03d3 JB |
153 | echo. --without-png do not use PNG library even if it is installed\r |
154 | echo. --without-jpeg do not use JPEG library even if it is installed\r | |
155 | echo. --without-gif do not use GIF library even if it is installed\r | |
156 | echo. --without-tiff do not use TIFF library even if it is installed\r | |
157 | echo. --without-xpm do not use XPM library even if it is installed\r | |
e9fce1ac | 158 | echo. --without-gnutls do not use GnuTLS library even if it is installed\r |
8d67bc8e | 159 | echo. --with-svg use the RSVG library (experimental)\r |
e3aef5c6 | 160 | echo. --distfiles path to files for make dist, e.g. libXpm.dll\r |
4a1a6b5b BK |
161 | if "%use_extensions%" == "0" goto end\r |
162 | echo.\r | |
163 | echo. The cflags and ldflags arguments support parameters that include the =\r | |
164 | echo. character. However, since the = character is normally treated as a\r | |
165 | echo. separator character you will need to enclose any parameter that includes\r | |
166 | echo. the = character in quotes. For example, to include\r | |
167 | echo. -DSITELOAD_PURESIZE_EXTRA=100000 as one of the cflags you would run\r | |
168 | echo. configure.bat as follows:\r | |
169 | echo. configure.bat --cflags "-DSITELOAD_PURESIZE_EXTRA=100000"\r | |
170 | echo.\r | |
171 | echo. Note that this capability of processing parameters that include the =\r | |
172 | echo. character depends on command extensions. This batch file attempts to\r | |
173 | echo. enable command extensions. If command extensions cannot be enabled, a\r | |
174 | echo. warning message will be displayed.\r | |
f466241d | 175 | goto end\r |
ee705a5c | 176 | \r |
f466241d | 177 | rem ----------------------------------------------------------------------\r |
ee705a5c | 178 | \r |
f466241d EZ |
179 | :setprefix\r |
180 | shift\r | |
181 | set prefix=%1\r | |
182 | shift\r | |
183 | goto again\r | |
ee705a5c | 184 | \r |
f466241d | 185 | rem ----------------------------------------------------------------------\r |
ee705a5c | 186 | \r |
f466241d EZ |
187 | :withgcc\r |
188 | set COMPILER=gcc\r | |
189 | shift\r | |
190 | goto again\r | |
ee705a5c | 191 | \r |
f466241d | 192 | rem ----------------------------------------------------------------------\r |
ee705a5c | 193 | \r |
f466241d EZ |
194 | :withmsvc\r |
195 | set COMPILER=cl\r | |
196 | shift\r | |
197 | goto again\r | |
ee705a5c | 198 | \r |
f466241d | 199 | rem ----------------------------------------------------------------------\r |
ee705a5c | 200 | \r |
f466241d EZ |
201 | :nodebug\r |
202 | set nodebug=Y\r | |
203 | shift\r | |
204 | goto again\r | |
ee705a5c | 205 | \r |
f466241d | 206 | rem ----------------------------------------------------------------------\r |
ee705a5c | 207 | \r |
f466241d EZ |
208 | :noopt\r |
209 | set noopt=Y\r | |
210 | shift\r | |
211 | goto again\r | |
ee705a5c | 212 | \r |
f466241d | 213 | rem ----------------------------------------------------------------------\r |
ee705a5c | 214 | \r |
7d0170c8 JB |
215 | :enablechecking\r |
216 | set enablechecking=Y\r | |
217 | shift\r | |
218 | goto again\r | |
ee705a5c | 219 | \r |
7d0170c8 | 220 | rem ----------------------------------------------------------------------\r |
ee705a5c | 221 | \r |
75663c75 JR |
222 | :profile\r |
223 | set profile=Y\r | |
224 | shift\r | |
225 | goto again\r | |
ee705a5c | 226 | \r |
75663c75 | 227 | rem ----------------------------------------------------------------------\r |
ee705a5c | 228 | \r |
f466241d EZ |
229 | :nocygwin\r |
230 | set nocygwin=Y\r | |
231 | shift\r | |
232 | goto again\r | |
ee705a5c | 233 | \r |
f466241d | 234 | rem ----------------------------------------------------------------------\r |
ee705a5c | 235 | \r |
f466241d | 236 | :usercflags\r |
4a1a6b5b BK |
237 | if "%use_extensions%" == "1" goto ucflagex\r |
238 | goto ucflagne\r | |
239 | \r | |
240 | :ucflagex\r | |
241 | shift\r | |
242 | set usercflags=%usercflags%%sep1%%~1\r | |
4d3fcc8e | 243 | set escusercflags=%usercflags:"=\"%\r |
4a1a6b5b BK |
244 | set sep1= %nothing%\r |
245 | shift\r | |
246 | goto again\r | |
247 | \r | |
248 | :ucflagne\r | |
f466241d EZ |
249 | shift\r |
250 | set usercflags=%usercflags%%sep1%%1\r | |
4d3fcc8e | 251 | set escusercflags=%usercflags%\r |
f466241d EZ |
252 | set sep1= %nothing%\r |
253 | shift\r | |
254 | goto again\r | |
ee705a5c | 255 | \r |
fd4af8d9 TZ |
256 | :extrauserlibs\r |
257 | shift\r | |
258 | echo. extrauserlibs: %extrauserlibs%\r | |
259 | set extrauserlibs=%extrauserlibs%%sep4%%1\r | |
260 | set sep4= %nothing%\r | |
261 | shift\r | |
262 | goto again\r | |
263 | \r | |
f466241d | 264 | rem ----------------------------------------------------------------------\r |
ee705a5c | 265 | \r |
f466241d | 266 | :userldflags\r |
4a1a6b5b BK |
267 | if "%use_extensions%" == "1" goto ulflagex\r |
268 | goto ulflagne\r | |
269 | \r | |
270 | :ulflagex\r | |
271 | shift\r | |
272 | set userldflags=%userldflags%%sep2%%~1\r | |
4d3fcc8e | 273 | set escuserldflags=%userldflags:"=\"%\r |
4a1a6b5b BK |
274 | set sep2= %nothing%\r |
275 | shift\r | |
276 | goto again\r | |
277 | \r | |
278 | :ulflagne\r | |
f466241d EZ |
279 | shift\r |
280 | set userldflags=%userldflags%%sep2%%1\r | |
4d3fcc8e | 281 | set escuserldflags=%userldflags%\r |
f466241d EZ |
282 | set sep2= %nothing%\r |
283 | shift\r | |
284 | goto again\r | |
ee705a5c | 285 | \r |
e0006538 JR |
286 | rem ----------------------------------------------------------------------\r |
287 | \r | |
288 | :withoutpng\r | |
289 | set pngsupport=N\r | |
290 | set HAVE_PNG=\r | |
39bd0e03 | 291 | shift\r |
e0006538 | 292 | goto again\r |
f466241d | 293 | \r |
aad0eae4 JR |
294 | rem ----------------------------------------------------------------------\r |
295 | \r | |
296 | :withoutjpeg\r | |
297 | set jpegsupport=N\r | |
298 | set HAVE_JPEG=\r | |
39bd0e03 | 299 | shift\r |
aad0eae4 JR |
300 | goto again\r |
301 | \r | |
12ff2dc5 JB |
302 | rem ----------------------------------------------------------------------\r |
303 | \r | |
304 | :withoutgif\r | |
305 | set gifsupport=N\r | |
306 | set HAVE_GIF=\r | |
307 | shift\r | |
308 | goto again\r | |
309 | \r | |
47c01e80 JB |
310 | rem ----------------------------------------------------------------------\r |
311 | \r | |
fd4af8d9 TZ |
312 | :withoutgnutls\r |
313 | set tlssupport=N\r | |
314 | set HAVE_GNUTLS=\r | |
315 | shift\r | |
316 | goto again\r | |
317 | \r | |
318 | rem ----------------------------------------------------------------------\r | |
319 | \r | |
47c01e80 JB |
320 | :withouttiff\r |
321 | set tiffsupport=N\r | |
322 | set HAVE_TIFF=\r | |
323 | shift\r | |
324 | goto again\r | |
325 | \r | |
507f5dce JR |
326 | rem ----------------------------------------------------------------------\r |
327 | \r | |
328 | :withoutxpm\r | |
329 | set xpmsupport=N\r | |
330 | set HAVE_XPM=\r | |
331 | shift\r | |
332 | goto again\r | |
333 | \r | |
8bc63b1a JR |
334 | :withsvg\r |
335 | shift\r | |
336 | set svgsupport=Y\r | |
337 | goto again\r | |
338 | \r | |
e3aef5c6 CS |
339 | rem ----------------------------------------------------------------------\r |
340 | \r | |
341 | :distfiles\r | |
342 | set HAVE_DISTFILES=1\r | |
343 | shift\r | |
344 | set distfiles=%distfiles%%sep3%%1\r | |
345 | set sep3= %nothing%\r | |
346 | shift\r | |
347 | goto again\r | |
348 | \r | |
f466241d EZ |
349 | rem ----------------------------------------------------------------------\r |
350 | rem Check that necessary utilities (cp and rm) are present.\r | |
ee705a5c | 351 | \r |
f466241d EZ |
352 | :checkutils\r |
353 | echo Checking for 'cp'...\r | |
354 | cp configure.bat junk.bat\r | |
355 | if not exist junk.bat goto needcp\r | |
356 | echo Checking for 'rm'...\r | |
357 | rm junk.bat\r | |
358 | if exist junk.bat goto needrm\r | |
359 | goto checkcompiler\r | |
ee705a5c | 360 | \r |
f466241d EZ |
361 | :needcp\r |
362 | echo You need 'cp' (the Unix file copy program) to build Emacs.\r | |
363 | goto end\r | |
ee705a5c | 364 | \r |
f466241d EZ |
365 | :needrm\r |
366 | del junk.bat\r | |
367 | echo You need 'rm' (the Unix file delete program) to build Emacs.\r | |
368 | goto end\r | |
369 | \r | |
370 | rem ----------------------------------------------------------------------\r | |
371 | rem Auto-detect compiler if not specified, and validate GCC if chosen.\r | |
ee705a5c | 372 | \r |
f466241d | 373 | :checkcompiler\r |
e0006538 | 374 | if (%COMPILER%)==(cl) goto compilercheckdone\r |
f466241d EZ |
375 | if (%COMPILER%)==(gcc) goto checkgcc\r |
376 | \r | |
f466241d | 377 | echo Checking whether 'gcc' is available...\r |
680d641f | 378 | echo main(){} >junk.c\r |
f466241d | 379 | gcc -c junk.c\r |
680d641f | 380 | if exist junk.o goto checkgcc\r |
f466241d | 381 | \r |
680d641f JR |
382 | echo Checking whether 'cl' is available...\r |
383 | cl -nologo -c junk.c\r | |
384 | if exist junk.obj goto clOK\r | |
385 | goto nocompiler\r | |
386 | \r | |
f466241d | 387 | :checkgcc\r |
1046da1c | 388 | if exist junk.o del junk.o\r |
f466241d EZ |
389 | Rem WARNING -- COMMAND.COM on some systems only looks at the first\r |
390 | Rem 8 characters of a label. So do NOT be tempted to change\r | |
391 | Rem chkapi* into something fancier like checkw32api\r | |
392 | Rem You HAVE been warned!\r | |
1046da1c | 393 | if (%nocygwin%) == (Y) goto chkapiN\r |
f466241d EZ |
394 | echo Checking whether gcc requires '-mno-cygwin'...\r |
395 | echo #include "cygwin/version.h" >junk.c\r | |
396 | echo main(){} >>junk.c\r | |
dbbdb507 EZ |
397 | echo gcc -c junk.c >>config.log\r |
398 | gcc -c junk.c >>config.log 2>&1\r | |
f466241d | 399 | if not exist junk.o goto chkapi\r |
dbbdb507 EZ |
400 | echo gcc -mno-cygwin -c junk.c >>config.log\r |
401 | gcc -mno-cygwin -c junk.c >>config.log 2>&1\r | |
f466241d | 402 | if exist junk.o set nocygwin=Y\r |
f466241d EZ |
403 | \r |
404 | :chkapi\r | |
dbbdb507 EZ |
405 | echo The failed program was: >>config.log\r |
406 | type junk.c >>config.log\r | |
ee705a5c | 407 | \r |
1046da1c EZ |
408 | :chkapiN\r |
409 | rm -f junk.c junk.o\r | |
f466241d EZ |
410 | rem ----------------------------------------------------------------------\r |
411 | rem Older versions of the Windows API headers either don't have any of\r | |
412 | rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1\r | |
413 | rem are like this), or have a typo in the definition of\r | |
414 | rem IMAGE_FIRST_SECTION (the headers with gcc/mingw32 2.95 have this\r | |
415 | rem problem). The gcc/mingw32 2.95.2 headers are okay, as are distros\r | |
416 | rem of w32api-xxx.zip from Anders Norlander since 1999-11-18 at least.\r | |
892508a4 | 417 | rem Beginning with Emacs 23, we need usp10.h.\r |
f466241d EZ |
418 | rem\r |
419 | echo Checking whether W32 API headers are too old...\r | |
420 | echo #include "windows.h" >junk.c\r | |
892508a4 | 421 | echo #include "usp10.h" >>junk.c\r |
f466241d EZ |
422 | echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c\r |
423 | echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c\r | |
424 | if (%nocygwin%) == (Y) goto chkapi1\r | |
425 | set cf=%usercflags%\r | |
426 | goto chkapi2\r | |
ee705a5c | 427 | \r |
f466241d EZ |
428 | :chkapi1\r |
429 | set cf=%usercflags% -mno-cygwin\r | |
ee705a5c | 430 | \r |
f466241d EZ |
431 | :chkapi2\r |
432 | echo on\r | |
433 | gcc %cf% -c junk.c\r | |
dbbdb507 EZ |
434 | @echo off\r |
435 | @echo gcc %cf% -c junk.c >>config.log\r | |
436 | gcc %cf% -c junk.c >>config.log 2>&1\r | |
f466241d | 437 | set cf=\r |
05212154 | 438 | if exist junk.o goto chkuser\r |
dbbdb507 EZ |
439 | echo The failed program was: >>config.log\r |
440 | type junk.c >>config.log\r | |
05212154 JB |
441 | goto nocompiler\r |
442 | \r | |
443 | :chkuser\r | |
444 | rm -f junk.o\r | |
445 | echo int main (int argc, char *argv[]) {>junk.c\r | |
4d3fcc8e | 446 | echo char *usercflags = "%escusercflags%";>>junk.c\r |
05212154 JB |
447 | echo }>>junk.c\r |
448 | echo gcc -Werror -c junk.c >>config.log\r | |
449 | gcc -Werror -c junk.c >>config.log 2>&1\r | |
450 | if exist junk.o goto gccOk\r | |
451 | echo.\r | |
452 | echo Error in --cflags argument: %usercflags%\r | |
453 | echo Backslashes and quotes cannot be used with --cflags. Please use forward\r | |
454 | echo slashes for filenames and paths (e.g. when passing directories to -I).\r | |
455 | rm -f junk.c\r | |
456 | goto end\r | |
f466241d EZ |
457 | \r |
458 | :nocompiler\r | |
459 | echo.\r | |
460 | echo Configure failed.\r | |
461 | echo To configure Emacs for Windows, you need to have either\r | |
462 | echo gcc-2.95 or later with Mingw32 and the W32 API headers,\r | |
463 | echo or MSVC 2.x or later.\r | |
464 | del junk.c\r | |
465 | goto end\r | |
466 | \r | |
467 | :gccOk\r | |
468 | set COMPILER=gcc\r | |
f466241d | 469 | echo Using 'gcc'\r |
dbbdb507 EZ |
470 | rm -f junk.c junk.o\r |
471 | Rem It is not clear what GCC version began supporting -mtune\r | |
472 | Rem and pentium4 on x86, so check this explicitly.\r | |
473 | echo main(){} >junk.c\r | |
474 | echo gcc -c -O2 -mtune=pentium4 junk.c >>config.log\r | |
475 | gcc -c -O2 -mtune=pentium4 junk.c >>config.log 2>&1\r | |
476 | if not errorlevel 1 goto gccMtuneOk\r | |
477 | echo The failed program was: >>config.log\r | |
478 | type junk.c >>config.log\r | |
479 | set mf=-mcpu=i686\r | |
480 | rm -f junk.c junk.o\r | |
540c2a33 | 481 | goto gccdebug\r |
ee705a5c | 482 | \r |
dbbdb507 EZ |
483 | :gccMtuneOk\r |
484 | echo GCC supports -mtune=pentium4 >>config.log\r | |
485 | set mf=-mtune=pentium4\r | |
486 | rm -f junk.c junk.o\r | |
ee705a5c | 487 | \r |
540c2a33 JB |
488 | :gccdebug\r |
489 | rem Check for DWARF-2 debug info support, else default to stabs\r | |
490 | echo main(){} >junk.c\r | |
491 | echo gcc -c -gdwarf-2 -g3 junk.c >>config.log\r | |
492 | gcc -c -gdwarf-2 -g3 junk.c >>config.log 2>&1\r | |
493 | if not errorlevel 1 goto gccdwarf\r | |
494 | echo The failed program was: >>config.log\r | |
495 | type junk.c >>config.log\r | |
496 | set dbginfo=-gstabs+\r | |
497 | rm -f junk.c junk.o\r | |
498 | goto compilercheckdone\r | |
ee705a5c | 499 | \r |
540c2a33 JB |
500 | :gccdwarf\r |
501 | echo GCC supports DWARF-2 >>config.log\r | |
502 | set dbginfo=-gdwarf-2 -g3\r | |
503 | rm -f junk.c junk.o\r | |
e0006538 | 504 | goto compilercheckdone\r |
f466241d EZ |
505 | \r |
506 | :clOk\r | |
507 | set COMPILER=cl\r | |
508 | rm -f junk.c junk.obj\r | |
509 | echo Using 'MSVC'\r | |
e0006538 JR |
510 | \r |
511 | :compilercheckdone\r | |
512 | \r | |
513 | rem ----------------------------------------------------------------------\r | |
514 | rem Check for external image libraries. Since they are loaded\r | |
515 | rem dynamically, the libraries themselves do not need to be present\r | |
516 | rem at compile time, but the header files are required.\r | |
517 | \r | |
112dc8e1 JR |
518 | set mingwflag=\r |
519 | \r | |
520 | if (%nocygwin%) == (N) goto flagsOK\r | |
521 | set mingwflag=-mno-cygwin\r | |
522 | \r | |
523 | :flagsOK\r | |
524 | \r | |
e0006538 JR |
525 | if (%pngsupport%) == (N) goto pngDone\r |
526 | \r | |
527 | echo Checking for libpng...\r | |
528 | echo #include "png.h" >junk.c\r | |
529 | echo main (){} >>junk.c\r | |
530 | rem -o option is ignored with cl, but allows result to be consistent.\r | |
dbbdb507 EZ |
531 | echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r |
532 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r | |
e0006538 JR |
533 | if exist junk.obj goto havePng\r |
534 | \r | |
507f5dce | 535 | echo ...png.h not found, building without PNG support.\r |
dbbdb507 EZ |
536 | echo The failed program was: >>config.log\r |
537 | type junk.c >>config.log\r | |
e0006538 JR |
538 | set HAVE_PNG=\r |
539 | goto :pngDone\r | |
540 | \r | |
541 | :havePng\r | |
542 | echo ...PNG header available, building with PNG support.\r | |
543 | set HAVE_PNG=1\r | |
544 | \r | |
545 | :pngDone\r | |
546 | rm -f junk.c junk.obj\r | |
f466241d | 547 | \r |
fd4af8d9 TZ |
548 | if (%tlssupport%) == (N) goto tlsDone\r |
549 | \r | |
550 | rem this is a copy of the PNG detection\r | |
551 | echo Checking for libgnutls...\r | |
552 | echo #include "gnutls/gnutls.h" >junk.c\r | |
553 | echo main (){} >>junk.c\r | |
554 | rem -o option is ignored with cl, but allows result to be consistent.\r | |
555 | echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r | |
556 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r | |
557 | if exist junk.obj goto haveTls\r | |
558 | \r | |
559 | echo ...gnutls.h not found, building without TLS support.\r | |
560 | echo The failed program was: >>config.log\r | |
561 | type junk.c >>config.log\r | |
562 | set HAVE_GNUTLS=\r | |
563 | goto :tlsDone\r | |
564 | \r | |
565 | :haveTls\r | |
e9fce1ac | 566 | echo ...GnuTLS header available, building with GnuTLS support.\r |
fd4af8d9 TZ |
567 | set HAVE_GNUTLS=1\r |
568 | \r | |
569 | :tlsDone\r | |
570 | rm -f junk.c junk.obj\r | |
571 | \r | |
aad0eae4 JR |
572 | if (%jpegsupport%) == (N) goto jpegDone\r |
573 | \r | |
507f5dce | 574 | echo Checking for jpeg-6b...\r |
aad0eae4 JR |
575 | echo #include "jconfig.h" >junk.c\r |
576 | echo main (){} >>junk.c\r | |
577 | rem -o option is ignored with cl, but allows result to be consistent.\r | |
dbbdb507 EZ |
578 | echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r |
579 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r | |
aad0eae4 JR |
580 | if exist junk.obj goto haveJpeg\r |
581 | \r | |
507f5dce | 582 | echo ...jconfig.h not found, building without JPEG support.\r |
dbbdb507 EZ |
583 | echo The failed program was: >>config.log\r |
584 | type junk.c >>config.log\r | |
aad0eae4 JR |
585 | set HAVE_JPEG=\r |
586 | goto :jpegDone\r | |
587 | \r | |
588 | :haveJpeg\r | |
589 | echo ...JPEG header available, building with JPEG support.\r | |
590 | set HAVE_JPEG=1\r | |
591 | \r | |
592 | :jpegDone\r | |
593 | rm -f junk.c junk.obj\r | |
594 | \r | |
12ff2dc5 JB |
595 | if (%gifsupport%) == (N) goto gifDone\r |
596 | \r | |
507f5dce | 597 | echo Checking for libgif...\r |
12ff2dc5 JB |
598 | echo #include "gif_lib.h" >junk.c\r |
599 | echo main (){} >>junk.c\r | |
600 | rem -o option is ignored with cl, but allows result to be consistent.\r | |
dbbdb507 EZ |
601 | echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r |
602 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r | |
12ff2dc5 JB |
603 | if exist junk.obj goto haveGif\r |
604 | \r | |
507f5dce | 605 | echo ...gif_lib.h not found, building without GIF support.\r |
dbbdb507 EZ |
606 | echo The failed program was: >>config.log\r |
607 | type junk.c >>config.log\r | |
12ff2dc5 JB |
608 | set HAVE_GIF=\r |
609 | goto :gifDone\r | |
610 | \r | |
611 | :haveGif\r | |
612 | echo ...GIF header available, building with GIF support.\r | |
613 | set HAVE_GIF=1\r | |
614 | \r | |
615 | :gifDone\r | |
616 | rm -f junk.c junk.obj\r | |
617 | \r | |
47c01e80 JB |
618 | if (%tiffsupport%) == (N) goto tiffDone\r |
619 | \r | |
620 | echo Checking for tiff...\r | |
621 | echo #include "tiffio.h" >junk.c\r | |
622 | echo main (){} >>junk.c\r | |
623 | rem -o option is ignored with cl, but allows result to be consistent.\r | |
dbbdb507 EZ |
624 | echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r |
625 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r | |
47c01e80 JB |
626 | if exist junk.obj goto haveTiff\r |
627 | \r | |
507f5dce | 628 | echo ...tiffio.h not found, building without TIFF support.\r |
dbbdb507 EZ |
629 | echo The failed program was: >>config.log\r |
630 | type junk.c >>config.log\r | |
47c01e80 JB |
631 | set HAVE_TIFF=\r |
632 | goto :tiffDone\r | |
633 | \r | |
634 | :haveTiff\r | |
635 | echo ...TIFF header available, building with TIFF support.\r | |
636 | set HAVE_TIFF=1\r | |
637 | \r | |
638 | :tiffDone\r | |
639 | rm -f junk.c junk.obj\r | |
640 | \r | |
507f5dce JR |
641 | if (%xpmsupport%) == (N) goto xpmDone\r |
642 | \r | |
643 | echo Checking for libXpm...\r | |
644 | echo #define FOR_MSW 1 >junk.c\r | |
645 | echo #include "X11/xpm.h" >>junk.c\r | |
646 | echo main (){} >>junk.c\r | |
647 | rem -o option is ignored with cl, but allows result to be consistent.\r | |
dbbdb507 EZ |
648 | echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r |
649 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r | |
507f5dce JR |
650 | if exist junk.obj goto haveXpm\r |
651 | \r | |
652 | echo ...X11/xpm.h not found, building without XPM support.\r | |
dbbdb507 EZ |
653 | echo The failed program was: >>config.log\r |
654 | type junk.c >>config.log\r | |
507f5dce JR |
655 | set HAVE_XPM=\r |
656 | goto :xpmDone\r | |
657 | \r | |
658 | :haveXpm\r | |
659 | echo ...XPM header available, building with XPM support.\r | |
660 | set HAVE_XPM=1\r | |
661 | \r | |
662 | :xpmDone\r | |
8bc63b1a JR |
663 | rm -f junk.c junk.obj\r |
664 | \r | |
665 | if not (%svgsupport%) == (Y) goto :svgDone\r | |
666 | echo Checking for librsvg...\r | |
667 | echo #include "librsvg/rsvg.h" >junk.c\r | |
668 | echo main (){} >>junk.c\r | |
669 | rem -o option is ignored with cl, but allows result to be consistent.\r | |
670 | echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r | |
671 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r | |
672 | if exist junk.obj goto haveSvg\r | |
673 | \r | |
674 | echo ...librsvg/rsvg.h or dependencies not found, building without SVG support.\r | |
675 | echo The failed program was: >>config.log\r | |
676 | type junk.c >>config.log\r | |
677 | set HAVE_RSVG=\r | |
678 | goto :svgDone\r | |
679 | \r | |
680 | :haveSvg\r | |
681 | echo ...librsvg header available, building with SVG support (EXPERIMENTAL).\r | |
682 | set HAVE_RSVG=1\r | |
683 | \r | |
684 | :svgDone\r | |
507f5dce JR |
685 | rm -f junk.c junk.obj junk.err junk.out\r |
686 | \r | |
e3aef5c6 CS |
687 | rem Any distfiles provided for building distribution? If no, we're done.\r |
688 | if "(%HAVE_DISTFILES%)"=="()" goto :distFilesDone\r | |
689 | \r | |
690 | rem Any arguments to --distfiles specified? If no, we're done.\r | |
691 | if not "%distfiles%"=="" goto :checkDistFiles\r | |
692 | set distFilesOk=0\r | |
693 | echo No arguments specified for option --distfiles!\r | |
694 | goto distfilesDone\r | |
695 | \r | |
696 | :checkDistFiles\r | |
697 | echo Checking for distfiles...\r | |
698 | rem Check if all specified distfiles exist\r | |
699 | set fileNotFound=\r | |
700 | for %%d in (%distfiles%) do if not exist %%d set fileNotFound=%%d\r | |
701 | if not "%fileNotFound%"=="" goto distFilesNotFound\r | |
702 | \r | |
703 | set distFilesOK=1\r | |
704 | echo ...all distfiles found.\r | |
705 | goto :distFilesDone\r | |
706 | \r | |
707 | :distFilesNotFound\r | |
708 | set distFilesOk=0\r | |
709 | echo ...%fileNotFound% not found.\r | |
710 | set distfiles=\r | |
711 | goto :distfilesDone\r | |
712 | \r | |
713 | :distFilesDone\r | |
714 | set fileNotFound=\r | |
715 | \r | |
f466241d | 716 | rem ----------------------------------------------------------------------\r |
ee705a5c | 717 | \r |
f466241d EZ |
718 | :genmakefiles\r |
719 | echo Generating makefiles\r | |
720 | if %COMPILER% == gcc set MAKECMD=gmake\r | |
721 | if %COMPILER% == cl set MAKECMD=nmake\r | |
722 | \r | |
723 | rem Pass on chosen settings to makefiles.\r | |
724 | rem NB. Be very careful to not have a space before redirection symbols\r | |
725 | rem except when there is a preceding digit, when a space is required.\r | |
726 | rem\r | |
727 | echo # Start of settings from configure.bat >config.settings\r | |
728 | echo COMPILER=%COMPILER%>>config.settings\r | |
dbbdb507 | 729 | if not "(%mf%)" == "()" echo MCPU_FLAG=%mf%>>config.settings\r |
540c2a33 | 730 | if not "(%dbginfo%)" == "()" echo DEBUG_INFO=%dbginfo%>>config.settings\r |
f466241d EZ |
731 | if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings\r |
732 | if (%noopt%) == (Y) echo NOOPT=1 >>config.settings\r | |
7d0170c8 | 733 | if (%enablechecking%) == (Y) echo ENABLECHECKS=1 >>config.settings\r |
75663c75 | 734 | if (%profile%) == (Y) echo PROFILE=1 >>config.settings\r |
f466241d EZ |
735 | if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings\r |
736 | if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings\r | |
e3aef5c6 | 737 | if not "(%distfiles%)" == "()" echo DIST_FILES=%distfiles%>>config.settings\r |
3a1ebd63 EZ |
738 | rem We go thru docflags because usercflags could be "-DFOO=bar" -something\r |
739 | rem and the if command cannot cope with this\r | |
740 | for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y\r | |
741 | if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags%>>config.settings\r | |
4d3fcc8e | 742 | if (%docflags%)==(Y) echo ESC_USER_CFLAGS=%escusercflags%>>config.settings\r |
3a1ebd63 EZ |
743 | for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y\r |
744 | if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags%>>config.settings\r | |
fd4af8d9 TZ |
745 | for %%v in (%extrauserlibs%) do if not (%%v)==() set doextralibs=Y\r |
746 | if (%doextralibs%)==(Y) echo USER_LIBS=%extrauserlibs%>>config.settings\r | |
f466241d EZ |
747 | echo # End of settings from configure.bat>>config.settings\r |
748 | echo. >>config.settings\r | |
749 | \r | |
c262c68c EZ |
750 | copy config.nt config.tmp\r |
751 | echo. >>config.tmp\r | |
752 | echo /* Start of settings from configure.bat. */ >>config.tmp\r | |
8f978ca0 JB |
753 | rem We write USER_CFLAGS and USER_LDFLAGS starting with a space to simplify\r |
754 | rem processing of compiler options in w32.c:get_emacs_configuration_options\r | |
4d3fcc8e BK |
755 | if (%docflags%) == (Y) echo #define USER_CFLAGS " %escusercflags%">>config.tmp\r |
756 | if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %escuserldflags%">>config.tmp\r | |
f179addc | 757 | if (%profile%) == (Y) echo #define PROFILING 1 >>config.tmp\r |
c262c68c | 758 | if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp\r |
fd4af8d9 | 759 | if not "(%HAVE_GNUTLS%)" == "()" echo #define HAVE_GNUTLS 1 >>config.tmp\r |
c262c68c EZ |
760 | if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp\r |
761 | if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp\r | |
762 | if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>config.tmp\r | |
763 | if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM 1 >>config.tmp\r | |
8bc63b1a JR |
764 | if "(%HAVE_RSVG%)" == "(1)" echo #define HAVE_RSVG 1 >>config.tmp\r |
765 | \r | |
c262c68c EZ |
766 | echo /* End of settings from configure.bat. */ >>config.tmp\r |
767 | \r | |
768 | Rem See if fc.exe returns a meaningful exit status. If it does, we\r | |
769 | Rem might as well avoid unnecessary overwriting of config.h and epaths.h,\r | |
770 | Rem since this forces recompilation of every source file.\r | |
771 | if exist foo.bar del foo.bar\r | |
772 | fc /b foo.bar foo.bar >nul 2>&1\r | |
773 | if not errorlevel 2 goto doCopy\r | |
774 | fc /b config.tmp ..\src\config.h >nul 2>&1\r | |
775 | if errorlevel 1 goto doCopy\r | |
776 | fc /b paths.h ..\src\epaths.h >nul 2>&1\r | |
252b4f5c | 777 | if not errorlevel 1 goto dontCopy\r |
ee705a5c | 778 | \r |
c262c68c EZ |
779 | :doCopy\r |
780 | copy config.tmp ..\src\config.h\r | |
f466241d EZ |
781 | copy paths.h ..\src\epaths.h\r |
782 | \r | |
c262c68c EZ |
783 | :dontCopy\r |
784 | if exist config.tmp del config.tmp\r | |
f466241d | 785 | copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile\r |
a392138f | 786 | if exist ..\admin\unidata copy /b config.settings+%MAKECMD%.defs+..\admin\unidata\makefile.w32-in ..\admin\unidata\makefile\r |
f466241d | 787 | copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile\r |
f915f0f7 | 788 | copy /b config.settings+%MAKECMD%.defs+..\lib\makefile.w32-in ..\lib\makefile\r |
f466241d | 789 | copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile\r |
8aee12d0 GM |
790 | copy /b config.settings+%MAKECMD%.defs+..\doc\emacs\makefile.w32-in ..\doc\emacs\makefile\r |
791 | copy /b config.settings+%MAKECMD%.defs+..\doc\misc\makefile.w32-in ..\doc\misc\makefile\r | |
792 | copy /b config.settings+%MAKECMD%.defs+..\doc\lispref\makefile.w32-in ..\doc\lispref\makefile\r | |
793 | copy /b config.settings+%MAKECMD%.defs+..\doc\lispintro\makefile.w32-in ..\doc\lispintro\makefile\r | |
f466241d EZ |
794 | if exist ..\lisp\makefile rm -f ../lisp/[Mm]akefile\r |
795 | copy /b config.settings+%MAKECMD%.defs+..\lisp\makefile.w32-in ..\lisp\makefile\r | |
796 | rem Use the default (no-op) Makefile.in if the nt version is not present.\r | |
797 | if exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\makefile.w32-in ..\leim\makefile\r | |
798 | if not exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\Makefile.in ..\leim\makefile\r | |
799 | del config.settings\r | |
800 | \r | |
e44f8099 EZ |
801 | Rem Some people use WinZip which doesn't create empty directories!\r |
802 | if not exist ..\site-lisp\nul mkdir ..\site-lisp\\r | |
57a64408 JB |
803 | Rem Update subdirs.el only if it is different or fc.exe doesn't work.\r |
804 | if exist foo.bar del foo.bar\r | |
805 | fc /b foo.bar foo.bar >nul 2>&1\r | |
806 | if not errorlevel 2 goto doUpdateSubdirs\r | |
807 | fc /b subdirs.el ..\site-lisp\subdirs.el >nul 2>&1\r | |
808 | if not errorlevel 1 goto dontUpdateSubdirs\r | |
ee705a5c | 809 | \r |
57a64408 JB |
810 | :doUpdateSubdirs\r |
811 | if exist ..\site-lisp\subdirs.el del ..\site-lisp\subdirs.el\r | |
812 | copy subdirs.el ..\site-lisp\subdirs.el\r | |
813 | \r | |
814 | :dontUpdateSubdirs\r | |
f466241d | 815 | echo.\r |
32154d10 JR |
816 | \r |
817 | rem check that we have all the libraries we need.\r | |
818 | set libsOK=1\r | |
819 | \r | |
820 | if not "(%HAVE_XPM%)" == "()" goto checkpng\r | |
821 | if (%xpmsupport%) == (N) goto checkpng\r | |
822 | set libsOK=0\r | |
823 | echo XPM support is missing. It is required for color icons in the toolbar.\r | |
824 | echo Install libXpm development files or use --without-xpm\r | |
825 | \r | |
826 | :checkpng\r | |
827 | if not "(%HAVE_PNG%)" == "()" goto checkjpeg\r | |
828 | if (%pngsupport%) == (N) goto checkjpeg\r | |
829 | set libsOK=0\r | |
830 | echo PNG support is missing.\r | |
831 | echo Install libpng development files or use --without-png\r | |
832 | \r | |
833 | :checkjpeg\r | |
834 | if not "(%HAVE_JPEG%)" == "()" goto checktiff\r | |
835 | if (%jpegsupport%) == (N) goto checktiff\r | |
836 | set libsOK=0\r | |
837 | echo JPEG support is missing.\r | |
838 | echo Install jpeg development files or use --without-jpeg\r | |
839 | \r | |
840 | :checktiff\r | |
841 | if not "(%HAVE_TIFF%)" == "()" goto checkgif\r | |
842 | if (%tiffsupport%) == (N) goto checkgif\r | |
843 | set libsOK=0\r | |
844 | echo TIFF support is missing.\r | |
845 | echo Install libtiff development files or use --without-tiff\r | |
846 | \r | |
847 | :checkgif\r | |
e3aef5c6 CS |
848 | if not "(%HAVE_GIF%)" == "()" goto checkdistfiles\r |
849 | if (%gifsupport%) == (N) goto checkdistfiles\r | |
32154d10 JR |
850 | set libsOK=0\r |
851 | echo GIF support is missing.\r | |
852 | echo Install giflib or libungif development files or use --without-gif\r | |
853 | \r | |
e3aef5c6 CS |
854 | :checkdistfiles\r |
855 | if "(%HAVE_DISTFILES%)" == "()" goto donelibchecks\r | |
856 | if (%distFilesOk%) == (1) goto donelibchecks\r | |
857 | echo.\r | |
858 | echo Files specified with option --distfiles could not be found.\r | |
859 | echo Fix these issues before running make dist\r | |
860 | \r | |
32154d10 JR |
861 | :donelibchecks\r |
862 | if (%libsOK%) == (1) goto success\r | |
863 | echo.\r | |
864 | echo Important libraries are missing. Fix these issues before running make.\r | |
865 | goto end\r | |
866 | \r | |
867 | :success\r | |
f466241d | 868 | echo Emacs successfully configured.\r |
a27014fc | 869 | echo Emacs successfully configured. >>config.log\r |
361823f4 | 870 | if (%MAKECMD%) == (gmake) set MAKECMD=make\r |
f466241d EZ |
871 | echo Run `%MAKECMD%' to build, then run `%MAKECMD% install' to install.\r |
872 | goto end\r | |
873 | \r | |
874 | :SmallEnv\r | |
875 | echo Your environment size is too small. Please enlarge it and rerun configure.\r | |
876 | echo For example, type "command.com /e:2048" to have 2048 bytes available.\r | |
877 | set $foo$=\r | |
ee705a5c | 878 | \r |
f466241d EZ |
879 | :end\r |
880 | set prefix=\r | |
881 | set nodebug=\r | |
882 | set noopt=\r | |
7d0170c8 | 883 | set enablechecking=\r |
75663c75 | 884 | set profile=\r |
f466241d EZ |
885 | set nocygwin=\r |
886 | set COMPILER=\r | |
887 | set MAKECMD=\r | |
888 | set usercflags=\r | |
3a1ebd63 | 889 | set docflags=\r |
f466241d | 890 | set userldflags=\r |
3a1ebd63 | 891 | set doldflags=\r |
112dc8e1 | 892 | set mingwflag=\r |
dbbdb507 | 893 | set mf=\r |
e3aef5c6 CS |
894 | set distfiles=\r |
895 | set HAVE_DISTFILES=\r | |
896 | set distFilesOk=\r | |
ca6e909c | 897 | set pngsupport=\r |
fd4af8d9 | 898 | set tlssupport=\r |
ca6e909c EZ |
899 | set jpegsupport=\r |
900 | set gifsupport=\r | |
901 | set tiffsupport=\r | |
902 | set xpmsupport=\r | |
903 | set svgsupport=\r | |
904 | set libsOK=\r | |
905 | set HAVE_GIF=\r | |
906 | set HAVE_JPEG=\r | |
907 | set HAVE_PNG=\r | |
908 | set HAVE_TIFF=\r | |
909 | set HAVE_XPM=\r | |
910 | set dbginfo=\r | |
a2fcf029 | 911 | \r |