Mercurial > emacs
annotate nt/configure.bat @ 54359:e63d620f8988
(ldap-search-internal): Handle file URLs with drive
letters on DOS/Windows.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Thu, 11 Mar 2004 21:09:31 +0000 |
parents | 11b0aed20b26 |
children | 87fc355c8bf5 375f2633d815 |
rev | line source |
---|---|
39055 | 1 @echo off |
2 rem ---------------------------------------------------------------------- | |
49541
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
3 rem Configuration script for MS Windows 95/98/Me and NT/2000/XP |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
4 rem Copyright (C) 1999-2003 Free Software Foundation, Inc. |
39055 | 5 |
6 rem This file is part of GNU Emacs. | |
7 | |
8 rem GNU Emacs is free software; you can redistribute it and/or modify | |
9 rem it under the terms of the GNU General Public License as published by | |
10 rem the Free Software Foundation; either version 2, or (at your option) | |
11 rem any later version. | |
12 | |
13 rem GNU Emacs is distributed in the hope that it will be useful, | |
14 rem but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 rem GNU General Public License for more details. | |
17 | |
18 rem You should have received a copy of the GNU General Public License | |
19 rem along with GNU Emacs; see the file COPYING. If not, write to the | |
20 rem Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
21 rem Boston, MA 02111-1307, USA. | |
22 rem ---------------------------------------------------------------------- | |
23 rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS: | |
24 rem | |
49541
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
25 rem + MS Windows 95/98/Me or NT/2000/XP |
39055 | 26 rem + either MSVC 2.x or later, or gcc-2.95 or later (with gmake 3.75 |
27 rem or later) and the Mingw32 and W32 API headers and libraries | |
28 rem | |
29 rem For reference, here is a list of which builds of gmake are known to | |
30 rem work or not, and whether they work in the presence and/or absence of | |
31 rem sh.exe. | |
49484 | 32 rem |
39055 | 33 rem sh exists no sh |
34 rem cygwin b20.1 make (3.75): okay[1] fails[2] | |
35 rem MSVC compiled gmake 3.77: okay okay | |
36 rem MSVC compiled gmake 3.78.1: okay okay | |
37 rem MSVC compiled gmake 3.79.1: okay okay | |
38 rem mingw32/gcc-2.92.2 make (3.77): okay okay | |
39 rem cygwin compiled gmake 3.77: okay[1] fails[2] | |
40 rem cygwin compiled gmake 3.78.1: okay fails[2] | |
41 rem cygwin compiled gmake 3.79.1: couldn't build make[3] | |
42 rem | |
43 rem [1] doesn't cope with makefiles with DOS line endings, so must mount | |
44 rem emacs source with text!=binary. | |
45 rem [2] fails when needs to invoke shell commands; okay invoking gcc etc. | |
46 rem [3] requires LC_MESSAGES support to build; maybe 2.95.x update to | |
47 rem cygwin provides this? | |
48 rem | |
49 | |
50 rem ---------------------------------------------------------------------- | |
51 rem See if the environment is large enough. We need 43 (?) bytes. | |
52 set $foo$=123456789_123456789_123456789_123456789_123 | |
53 if not "%$foo$%" == "123456789_123456789_123456789_123456789_123" goto SmallEnv | |
54 set $foo$= | |
55 | |
56 rem ---------------------------------------------------------------------- | |
57 rem Make sure we are running in the nt subdir | |
58 if exist configure.bat goto start | |
59 echo You must run configure from the nt subdirectory. | |
60 goto end | |
61 | |
62 :start | |
63 rem ---------------------------------------------------------------------- | |
64 rem Default settings. | |
65 set prefix= | |
66 set nodebug=N | |
67 set noopt=N | |
68 set nocygwin=N | |
69 set COMPILER= | |
70 set usercflags= | |
71 set userldflags= | |
72 set sep1= | |
73 set sep2= | |
74 | |
75 rem ---------------------------------------------------------------------- | |
76 rem Handle arguments. | |
77 :again | |
78 if "%1" == "-h" goto usage | |
79 if "%1" == "--help" goto usage | |
80 if "%1" == "--prefix" goto setprefix | |
81 if "%1" == "--with-gcc" goto withgcc | |
82 if "%1" == "--with-msvc" goto withmsvc | |
83 if "%1" == "--no-debug" goto nodebug | |
84 if "%1" == "--no-opt" goto noopt | |
85 if "%1" == "--no-cygwin" goto nocygwin | |
86 if "%1" == "--cflags" goto usercflags | |
87 if "%1" == "--ldflags" goto userldflags | |
49450
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
88 if "%1" == "--without-png" goto withoutpng |
49456
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
89 if "%1" == "--without-jpeg" goto withoutjpeg |
49541
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
90 if "%1" == "--without-gif" goto withoutgif |
49544
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
91 if "%1" == "--without-tiff" goto withouttiff |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
92 if "%1" == "--without-xpm" goto withoutxpm |
39055 | 93 if "%1" == "" goto checkutils |
94 :usage | |
95 echo Usage: configure [options] | |
96 echo Options: | |
97 echo. --prefix PREFIX install Emacs in directory PREFIX | |
98 echo. --with-gcc use GCC to compile Emacs | |
99 echo. --with-msvc use MSVC to compile Emacs | |
100 echo. --no-debug exclude debug info from executables | |
101 echo. --no-opt disable optimization | |
102 echo. --no-cygwin use -mno-cygwin option with GCC | |
103 echo. --cflags FLAG pass FLAG to compiler | |
104 echo. --ldflags FLAG pass FLAG to compiler when linking | |
49484 | 105 echo. --without-png do not use libpng even if it is installed |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
106 echo. --without-jpeg do not use jpeg-6b even if it is installed |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
107 echo. --without-gif do not use libungif even if it is installed |
49577 | 108 echo. --without-tiff do not use libtiff even if it is installed |
109 echo. --without-xpm do not use libXpm even if it is installed | |
39055 | 110 goto end |
111 rem ---------------------------------------------------------------------- | |
112 :setprefix | |
113 shift | |
114 set prefix=%1 | |
115 shift | |
116 goto again | |
117 rem ---------------------------------------------------------------------- | |
118 :withgcc | |
119 set COMPILER=gcc | |
120 shift | |
121 goto again | |
122 rem ---------------------------------------------------------------------- | |
123 :withmsvc | |
124 set COMPILER=cl | |
125 shift | |
126 goto again | |
127 rem ---------------------------------------------------------------------- | |
128 :nodebug | |
129 set nodebug=Y | |
130 shift | |
131 goto again | |
132 rem ---------------------------------------------------------------------- | |
133 :noopt | |
134 set noopt=Y | |
135 shift | |
136 goto again | |
137 rem ---------------------------------------------------------------------- | |
138 :nocygwin | |
139 set nocygwin=Y | |
140 shift | |
141 goto again | |
142 rem ---------------------------------------------------------------------- | |
143 :usercflags | |
144 shift | |
145 set usercflags=%usercflags%%sep1%%1 | |
146 set sep1= %nothing% | |
147 shift | |
148 goto again | |
149 rem ---------------------------------------------------------------------- | |
150 :userldflags | |
151 shift | |
152 set userldflags=%userldflags%%sep2%%1 | |
153 set sep2= %nothing% | |
154 shift | |
155 goto again | |
49450
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
156 rem ---------------------------------------------------------------------- |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
157 |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
158 :withoutpng |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
159 set pngsupport=N |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
160 set HAVE_PNG= |
49510
d717146dfad9
Avoid endless loop when configuring without image support.
Juanma Barranquero <lekktu@gmail.com>
parents:
49484
diff
changeset
|
161 shift |
49450
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
162 goto again |
39055 | 163 |
164 rem ---------------------------------------------------------------------- | |
49456
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
165 |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
166 :withoutjpeg |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
167 set jpegsupport=N |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
168 set HAVE_JPEG= |
49510
d717146dfad9
Avoid endless loop when configuring without image support.
Juanma Barranquero <lekktu@gmail.com>
parents:
49484
diff
changeset
|
169 shift |
49456
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
170 goto again |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
171 |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
172 rem ---------------------------------------------------------------------- |
49541
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
173 |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
174 :withoutgif |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
175 set gifsupport=N |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
176 set HAVE_GIF= |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
177 shift |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
178 goto again |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
179 |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
180 rem ---------------------------------------------------------------------- |
49544
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
181 |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
182 :withouttiff |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
183 set tiffsupport=N |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
184 set HAVE_TIFF= |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
185 shift |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
186 goto again |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
187 |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
188 rem ---------------------------------------------------------------------- |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
189 |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
190 :withoutxpm |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
191 set xpmsupport=N |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
192 set HAVE_XPM= |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
193 shift |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
194 goto again |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
195 |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
196 rem ---------------------------------------------------------------------- |
39055 | 197 rem Check that necessary utilities (cp and rm) are present. |
198 :checkutils | |
199 echo Checking for 'cp'... | |
200 cp configure.bat junk.bat | |
201 if not exist junk.bat goto needcp | |
202 echo Checking for 'rm'... | |
203 rm junk.bat | |
204 if exist junk.bat goto needrm | |
205 goto checkcompiler | |
206 :needcp | |
207 echo You need 'cp' (the Unix file copy program) to build Emacs. | |
208 goto end | |
209 :needrm | |
210 del junk.bat | |
211 echo You need 'rm' (the Unix file delete program) to build Emacs. | |
212 goto end | |
213 | |
214 rem ---------------------------------------------------------------------- | |
215 rem Auto-detect compiler if not specified, and validate GCC if chosen. | |
216 :checkcompiler | |
49450
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
217 if (%COMPILER%)==(cl) goto compilercheckdone |
39055 | 218 if (%COMPILER%)==(gcc) goto checkgcc |
219 | |
220 echo Checking whether 'cl' is available... | |
221 echo main(){} >junk.c | |
222 cl -nologo -c junk.c | |
223 if exist junk.obj goto clOK | |
224 | |
225 echo Checking whether 'gcc' is available... | |
226 gcc -c junk.c | |
227 if not exist junk.o goto nocompiler | |
228 del junk.o | |
229 | |
230 :checkgcc | |
231 Rem WARNING -- COMMAND.COM on some systems only looks at the first | |
232 Rem 8 characters of a label. So do NOT be tempted to change | |
233 Rem chkapi* into something fancier like checkw32api | |
234 Rem You HAVE been warned! | |
235 if (%nocygwin%) == (Y) goto chkapi | |
236 echo Checking whether gcc requires '-mno-cygwin'... | |
237 echo #include "cygwin/version.h" >junk.c | |
238 echo main(){} >>junk.c | |
239 gcc -c junk.c | |
240 if not exist junk.o goto chkapi | |
241 gcc -mno-cygwin -c junk.c | |
242 if exist junk.o set nocygwin=Y | |
243 rm -f junk.c junk.o | |
244 | |
245 :chkapi | |
246 rem ---------------------------------------------------------------------- | |
247 rem Older versions of the Windows API headers either don't have any of | |
248 rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1 | |
249 rem are like this), or have a typo in the definition of | |
250 rem IMAGE_FIRST_SECTION (the headers with gcc/mingw32 2.95 have this | |
251 rem problem). The gcc/mingw32 2.95.2 headers are okay, as are distros | |
252 rem of w32api-xxx.zip from Anders Norlander since 1999-11-18 at least. | |
253 rem | |
254 echo Checking whether W32 API headers are too old... | |
255 echo #include "windows.h" >junk.c | |
256 echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c | |
257 echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c | |
258 if (%nocygwin%) == (Y) goto chkapi1 | |
259 set cf=%usercflags% | |
260 goto chkapi2 | |
261 :chkapi1 | |
262 set cf=%usercflags% -mno-cygwin | |
263 :chkapi2 | |
264 echo on | |
265 gcc %cf% -c junk.c | |
266 echo off | |
267 set cf= | |
268 if exist junk.o goto gccOk | |
269 | |
270 :nocompiler | |
271 echo. | |
272 echo Configure failed. | |
273 echo To configure Emacs for Windows, you need to have either | |
274 echo gcc-2.95 or later with Mingw32 and the W32 API headers, | |
275 echo or MSVC 2.x or later. | |
276 del junk.c | |
277 goto end | |
278 | |
279 :gccOk | |
280 set COMPILER=gcc | |
281 rm -f junk.c junk.o | |
282 echo Using 'gcc' | |
49450
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
283 goto compilercheckdone |
39055 | 284 |
285 :clOk | |
286 set COMPILER=cl | |
287 rm -f junk.c junk.obj | |
288 echo Using 'MSVC' | |
49450
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
289 |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
290 :compilercheckdone |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
291 |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
292 rem ---------------------------------------------------------------------- |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
293 rem Check for external image libraries. Since they are loaded |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
294 rem dynamically, the libraries themselves do not need to be present |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
295 rem at compile time, but the header files are required. |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
296 |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
297 if (%pngsupport%) == (N) goto pngDone |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
298 |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
299 echo Checking for libpng... |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
300 echo #include "png.h" >junk.c |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
301 echo main (){} >>junk.c |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
302 rem -o option is ignored with cl, but allows result to be consistent. |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
303 %COMPILER% %usercflags% -c junk.c -o junk.obj >junk.out 2>junk.err |
49450
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
304 if exist junk.obj goto havePng |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
305 |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
306 echo ...png.h not found, building without PNG support. |
49450
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
307 set HAVE_PNG= |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
308 goto :pngDone |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
309 |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
310 :havePng |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
311 echo ...PNG header available, building with PNG support. |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
312 set HAVE_PNG=1 |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
313 |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
314 :pngDone |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
315 rm -f junk.c junk.obj |
39055 | 316 |
49456
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
317 if (%jpegsupport%) == (N) goto jpegDone |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
318 |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
319 echo Checking for jpeg-6b... |
49456
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
320 echo #include "jconfig.h" >junk.c |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
321 echo main (){} >>junk.c |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
322 rem -o option is ignored with cl, but allows result to be consistent. |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
323 %COMPILER% %usercflags% -c junk.c -o junk.obj >junk.out 2>junk.err |
49456
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
324 if exist junk.obj goto haveJpeg |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
325 |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
326 echo ...jconfig.h not found, building without JPEG support. |
49456
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
327 set HAVE_JPEG= |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
328 goto :jpegDone |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
329 |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
330 :haveJpeg |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
331 echo ...JPEG header available, building with JPEG support. |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
332 set HAVE_JPEG=1 |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
333 |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
334 :jpegDone |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
335 rm -f junk.c junk.obj |
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
336 |
49541
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
337 if (%gifsupport%) == (N) goto gifDone |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
338 |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
339 echo Checking for libgif... |
49541
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
340 echo #include "gif_lib.h" >junk.c |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
341 echo main (){} >>junk.c |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
342 rem -o option is ignored with cl, but allows result to be consistent. |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
343 %COMPILER% %usercflags% -c junk.c -o junk.obj >junk.out 2>junk.err |
49541
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
344 if exist junk.obj goto haveGif |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
345 |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
346 echo ...gif_lib.h not found, building without GIF support. |
49541
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
347 set HAVE_GIF= |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
348 goto :gifDone |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
349 |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
350 :haveGif |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
351 echo ...GIF header available, building with GIF support. |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
352 set HAVE_GIF=1 |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
353 |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
354 :gifDone |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
355 rm -f junk.c junk.obj |
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
356 |
49544
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
357 if (%tiffsupport%) == (N) goto tiffDone |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
358 |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
359 echo Checking for tiff... |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
360 echo #include "tiffio.h" >junk.c |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
361 echo main (){} >>junk.c |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
362 rem -o option is ignored with cl, but allows result to be consistent. |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
363 %COMPILER% %usercflags% -c junk.c -o junk.obj >junk.out 2>junk.err |
49544
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
364 if exist junk.obj goto haveTiff |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
365 |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
366 echo ...tiffio.h not found, building without TIFF support. |
49544
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
367 set HAVE_TIFF= |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
368 goto :tiffDone |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
369 |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
370 :haveTiff |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
371 echo ...TIFF header available, building with TIFF support. |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
372 set HAVE_TIFF=1 |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
373 |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
374 :tiffDone |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
375 rm -f junk.c junk.obj |
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
376 |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
377 if (%xpmsupport%) == (N) goto xpmDone |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
378 |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
379 echo Checking for libXpm... |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
380 echo #define FOR_MSW 1 >junk.c |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
381 echo #include "X11/xpm.h" >>junk.c |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
382 echo main (){} >>junk.c |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
383 rem -o option is ignored with cl, but allows result to be consistent. |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
384 %COMPILER% %usercflags% -c junk.c -o junk.obj >junk.out 2>junk.err |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
385 if exist junk.obj goto haveXpm |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
386 |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
387 echo ...X11/xpm.h not found, building without XPM support. |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
388 set HAVE_XPM= |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
389 goto :xpmDone |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
390 |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
391 :haveXpm |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
392 echo ...XPM header available, building with XPM support. |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
393 set HAVE_XPM=1 |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
394 |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
395 :xpmDone |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
396 rm -f junk.c junk.obj junk.err junk.out |
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
397 |
39055 | 398 rem ---------------------------------------------------------------------- |
399 :genmakefiles | |
400 echo Generating makefiles | |
401 if %COMPILER% == gcc set MAKECMD=gmake | |
402 if %COMPILER% == cl set MAKECMD=nmake | |
403 | |
404 rem Pass on chosen settings to makefiles. | |
405 rem NB. Be very careful to not have a space before redirection symbols | |
406 rem except when there is a preceding digit, when a space is required. | |
407 rem | |
408 echo # Start of settings from configure.bat >config.settings | |
409 echo COMPILER=%COMPILER%>>config.settings | |
410 if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings | |
411 if (%noopt%) == (Y) echo NOOPT=1 >>config.settings | |
412 if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings | |
413 if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings | |
414 if not "(%usercflags%)" == "()" echo USER_CFLAGS=%usercflags%>>config.settings | |
415 if not "(%userldflags%)" == "()" echo USER_LDFLAGS=%userldflags%>>config.settings | |
416 echo # End of settings from configure.bat>>config.settings | |
417 echo. >>config.settings | |
418 | |
419 copy config.nt ..\src\config.h | |
49450
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
420 echo. >>..\src\config.h |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
421 echo /* Start of settings from configure.bat. */ >>..\src\config.h |
39055 | 422 if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>..\src\config.h |
423 if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>..\src\config.h | |
49450
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
424 if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>..\src\config.h |
49456
8511f51a1d4f
Automatically detect jpeglib.
Jason Rumney <jasonr@gnu.org>
parents:
49450
diff
changeset
|
425 if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>..\src\config.h |
49541
e20de75c7a92
Automatically detect giflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49510
diff
changeset
|
426 if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>..\src\config.h |
49544
fdc002872212
Automatically detect tifflib.
Juanma Barranquero <lekktu@gmail.com>
parents:
49541
diff
changeset
|
427 if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>..\src\config.h |
49563
5c18aa000ef4
Automatically detect libXpm.
Jason Rumney <jasonr@gnu.org>
parents:
49544
diff
changeset
|
428 if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM 1 >>..\src\config.h |
49450
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
429 echo /* End of settings from configure.bat. */ >>..\src\config.h |
a2e59f9d34b1
Automatically detect libpng.
Jason Rumney <jasonr@gnu.org>
parents:
39151
diff
changeset
|
430 |
39055 | 431 copy paths.h ..\src\epaths.h |
432 | |
433 copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile | |
434 copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile | |
435 copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile | |
52422
11b0aed20b26
Create ``makefile'' in directories man, lispref and lispintro.
Jason Rumney <jasonr@gnu.org>
parents:
52414
diff
changeset
|
436 copy /b config.settings+%MAKECMD%.defs+..\man\makefile.w32-in ..\man\makefile |
11b0aed20b26
Create ``makefile'' in directories man, lispref and lispintro.
Jason Rumney <jasonr@gnu.org>
parents:
52414
diff
changeset
|
437 copy /b config.settings+%MAKECMD%.defs+..\lispref\makefile.w32-in ..\lispref\makefile |
11b0aed20b26
Create ``makefile'' in directories man, lispref and lispintro.
Jason Rumney <jasonr@gnu.org>
parents:
52414
diff
changeset
|
438 copy /b config.settings+%MAKECMD%.defs+..\lispintro\makefile.w32-in ..\lispintro\makefile |
39055 | 439 if not exist ..\lisp\Makefile.unix rename ..\lisp\Makefile.in Makefile.unix |
440 if exist ..\lisp\makefile rm -f ../lisp/[Mm]akefile | |
441 copy /b config.settings+%MAKECMD%.defs+..\lisp\makefile.w32-in ..\lisp\makefile | |
442 rem Use the default (no-op) Makefile.in if the nt version is not present. | |
443 if exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\makefile.w32-in ..\leim\makefile | |
444 if not exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\Makefile.in ..\leim\makefile | |
445 del config.settings | |
446 | |
39151
9c15101341c7
Make sure ../site-lisp exists; create if necessary.
Eli Zaretskii <eliz@gnu.org>
parents:
39055
diff
changeset
|
447 Rem Some people use WinZip which doesn't create empty directories! |
9c15101341c7
Make sure ../site-lisp exists; create if necessary.
Eli Zaretskii <eliz@gnu.org>
parents:
39055
diff
changeset
|
448 if not exist ..\site-lisp\nul mkdir ..\site-lisp\ |
39055 | 449 if not exist ..\site-lisp\subdirs.el copy subdirs.el ..\site-lisp\subdirs.el |
450 | |
451 echo. | |
452 echo Emacs successfully configured. | |
453 echo Run `%MAKECMD%' to build, then run `%MAKECMD% install' to install. | |
454 goto end | |
455 | |
456 :SmallEnv | |
457 echo Your environment size is too small. Please enlarge it and rerun configure. | |
458 echo For example, type "command.com /e:2048" to have 2048 bytes available. | |
459 set $foo$= | |
460 :end | |
461 set prefix= | |
462 set nodebug= | |
463 set noopt= | |
464 set nocygwin= | |
465 set COMPILER= | |
466 set MAKECMD= | |
467 set usercflags= | |
468 set userldflags= | |
52414
93ce5f375b46
Fix some DOS line-ending inconsistencies introduced with arch-tag:
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
469 |
93ce5f375b46
Fix some DOS line-ending inconsistencies introduced with arch-tag:
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
470 goto skipArchTag |
93ce5f375b46
Fix some DOS line-ending inconsistencies introduced with arch-tag:
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
471 arch-tag: 300d20a4-1675-4e75-b615-7ce1a8c5376c |
93ce5f375b46
Fix some DOS line-ending inconsistencies introduced with arch-tag:
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
472 :skipArchTag |