2 rem ----------------------------------------------------------------------
3 rem Configuration script for MS Windows operating systems
4 rem Copyright (C) 1999-2015 Free Software Foundation, Inc.
6 rem This file is part of GNU Emacs.
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 3 of the License, or
11 rem (at your option) any later version.
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.
18 rem You should have received a copy of the GNU General Public License
19 rem along with GNU Emacs. If not, see http://www.gnu.org/licenses/.
21 rem ----------------------------------------------------------------------
22 rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:
24 rem + MS Windows 95, NT or later
25 rem + either MSVC 2.x or later, or gcc-2.95 or later (with GNU make 3.75
26 rem or later) and the Mingw32 and Windows API headers and libraries.
27 rem + Visual Studio 2005 is not supported at this time.
29 rem For reference, here is a list of which builds of GNU make are known to
30 rem work or not, and whether they work in the presence and/or absence of
34 rem cygwin b20.1 make (3.75): fails[1,5] fails[2,5]
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[4]
39 rem cygwin compiled gmake 3.77: fails[1,5] fails[2,5]
40 rem cygwin compiled gmake 3.78.1: fails[5] fails[2,5]
41 rem cygwin compiled gmake 3.79.1: fails[3,5] fails[2?,5]
42 rem cygwin compiled make 3.80: okay[6] fails?[7]
43 rem cygwin compiled make 3.81: fails fails?[7]
44 rem mingw32 compiled make 3.79.1: okay okay
45 rem mingw32 compiled make 3.80: okay okay?[7]
46 rem mingw32 compiled make 3.81: okay okay[8]
48 rem [1] doesn't cope with makefiles with DOS line endings, so must mount
49 rem emacs source with text!=binary.
50 rem [2] fails when needs to invoke shell commands; okay invoking gcc etc.
51 rem [3] requires LC_MESSAGES support to build; cannot build with early
52 rem versions of cygwin.
53 rem [4] may fail on Windows 9X and Windows ME; if so, install Bash.
54 rem [5] fails when building leim due to the use of cygwin style paths.
55 rem May work if building emacs without leim.
56 rem [6] need to uncomment 3 lines in nt/gmake.defs that invoke `cygpath';
57 rem look for "cygpath" near line 85 of gmake.defs.
58 rem [7] not recommended; please report if you try this combination.
59 rem [8] tested only on Windows XP.
61 echo ****************************************************************
62 echo *** THIS METHOD OF BUILDING EMACS IS NO LONGER SUPPORTED.
**
63 echo *** INSTEAD
, FOLLOW THE INSTRUCTIONS FROM INSTALL.
**
64 echo ****************************************************************
66 set /p answer
=Continue running this script at your own risks ?
(Y
/N
)
67 if x
%answer% == xy
(goto confirm_continue_y
)
68 if x
%answer% == xY
(goto confirm_continue_y
)
69 if x
%answer% == xn
(goto end)
70 if x
%answer% == xN
(goto end)
71 echo Please answer by Y or N
75 if exist config.log
del config.log
77 rem ----------------------------------------------------------------------
78 rem See if the environment is large enough. We need 43 (?) bytes.
79 set $foo$
=123456789_123456789_123456789_123456789_123
80 if not "%$foo$%" == "123456789_123456789_123456789_123456789_123" goto SmallEnv
83 rem ----------------------------------------------------------------------
84 rem Make sure we are running in the nt subdir
85 if exist configure.bat
goto start
86 echo You must
run configure from the nt subdirectory.
90 rem ----------------------------------------------------------------------
91 rem Attempt to enable command extensions. Set use_extensions to 1 if
92 rem they are available and 0 if they are not available.
94 setlocal ENABLEEXTENSIONS
95 if "%CMDEXTVERSION%" == "" set use_extensions
=0
96 if "%use_extensions%" == "1" goto afterext
98 echo.
Command extensions are
not available. Using parameters that include the
=
99 echo. character by enclosing them in quotes will
not be supported.
103 rem ----------------------------------------------------------------------
104 rem Default settings.
126 rem ----------------------------------------------------------------------
127 rem Handle arguments.
129 if "%1" == "-h" goto usage
130 if "%1" == "--help" goto usage
131 if "%1" == "--prefix" goto setprefix
132 if "%1" == "--with-gcc" goto withgcc
133 if "%1" == "--with-msvc" goto withmsvc
134 if "%1" == "--no-debug" goto nodebug
135 if "%1" == "--no-opt" goto noopt
136 if "%1" == "--enable-checking" goto enablechecking
137 if "%1" == "--profile" goto profile
138 if "%1" == "--no-cygwin" goto nocygwin
139 if "%1" == "--cflags" goto usercflags
140 if "%1" == "--ldflags" goto userldflags
141 if "%1" == "--lib" goto extrauserlibs
142 if "%1" == "--without-png" goto withoutpng
143 if "%1" == "--without-jpeg" goto withoutjpeg
144 if "%1" == "--without-gif" goto withoutgif
145 if "%1" == "--without-tiff" goto withouttiff
146 if "%1" == "--without-gnutls" goto withoutgnutls
147 if "%1" == "--without-libxml2" goto withoutlibxml2
148 if "%1" == "--without-xpm" goto withoutxpm
149 if "%1" == "--with-svg" goto withsvg
150 if "%1" == "--distfiles" goto distfiles
151 if "%1" == "" goto checkutils
154 echo Usage
: configure
[options
]
156 echo.
--prefix PREFIX install Emacs in directory PREFIX
157 echo.
--with
-gcc
use GCC to compile Emacs
158 echo.
--with
-msvc
use MSVC to compile Emacs
159 echo.
--no
-debug exclude
debug info from executables
160 echo.
--no
-opt disable optimization
161 echo.
--enable
-checking enable additional
run-time checks
162 echo.
--profile enable profiling
163 echo.
--no
-cygwin
use -mno
-cygwin option with GCC
164 echo.
--cflags FLAG pass FLAG to compiler
165 echo.
--ldflags FLAG pass FLAG to compiler
when linking
166 echo.
--lib LIB link to extra library LIB
167 echo.
--without
-png
do not use PNG library even
if it is installed
168 echo.
--without
-jpeg
do not use JPEG library even
if it is installed
169 echo.
--without
-gif
do not use GIF library even
if it is installed
170 echo.
--without
-tiff
do not use TIFF library even
if it is installed
171 echo.
--without
-xpm
do not use XPM library even
if it is installed
172 echo.
--without
-gnutls
do not use GnuTLS library even
if it is installed
173 echo.
--without
-libxml2
do not use libxml2 library even
if it is installed
174 echo.
--with
-svg
use the RSVG library
(experimental
)
175 echo.
--distfiles
path to
files for make dist
, e.g. libXpm.dll
176 if "%use_extensions%" == "0" goto end
178 echo. The cflags and ldflags arguments support parameters that include the
=
179 echo. character. However
, since the
= character is normally treated as a
180 echo. separator character you will need to enclose any parameter that includes
181 echo. the
= character in quotes.
For example
, to include
182 echo.
-DSITELOAD_PURESIZE_EXTRA
=100000 as one of the cflags you would
run
183 echo. configure.bat as follows
:
184 echo. configure.bat
--cflags
"-DSITELOAD_PURESIZE_EXTRA=100000"
186 echo. Note that this capability of processing parameters that include the
=
187 echo. character depends on
command extensions. This batch file attempts to
188 echo. enable
command extensions.
If command extensions cannot be enabled
, a
189 echo. warning message will be displayed.
191 echo. IMPORTANT
: This method of building Emacs
for MS
-Windows is deprecated
,
192 echo. and could be removed in a future version of Emacs. The preferred way
193 echo to build Emacs
for MS
-Windows from now on is using the MSYS environment
194 echo. and MinGW development tools. Please see nt
/INSTALL
for details.
197 rem ----------------------------------------------------------------------
205 rem ----------------------------------------------------------------------
212 rem ----------------------------------------------------------------------
219 rem ----------------------------------------------------------------------
226 rem ----------------------------------------------------------------------
233 rem ----------------------------------------------------------------------
240 rem ----------------------------------------------------------------------
247 rem ----------------------------------------------------------------------
254 rem ----------------------------------------------------------------------
257 if "%use_extensions%" == "1" goto ucflagex
262 set usercflags
=%usercflags%%sep1%%~
1
263 set escusercflags
=%usercflags
:"=\"%
270 set usercflags=%usercflags%%sep1%%1
271 set escusercflags=%usercflags%
278 echo. extrauserlibs: %extrauserlibs%
279 set extrauserlibs=%extrauserlibs%%sep4%%1
284 rem ----------------------------------------------------------------------
287 if "%use_extensions%" == "1" goto ulflagex
292 set userldflags=%userldflags%%sep2%%~1
293 set escuserldflags=%userldflags:"=\"%
300 set userldflags
=%userldflags%%sep2%%1
301 set escuserldflags
=%userldflags%
306 rem ----------------------------------------------------------------------
314 rem ----------------------------------------------------------------------
322 rem ----------------------------------------------------------------------
330 rem ----------------------------------------------------------------------
338 rem ----------------------------------------------------------------------
346 rem ----------------------------------------------------------------------
354 rem ----------------------------------------------------------------------
367 rem ----------------------------------------------------------------------
372 set distfiles
=%distfiles%%sep3%%1
377 rem ----------------------------------------------------------------------
378 rem Check that necessary utilities (cp and rm) are present.
381 echo Checking
for 'cp'...
382 cp configure.bat junk.bat
383 if not exist junk.bat
goto needcp
384 echo Checking
for 'rm'...
386 if exist junk.bat
goto needrm
390 echo You need
'cp' (the Unix file
copy program
) to build Emacs.
395 echo You need
'rm' (the Unix file delete program
) to build Emacs.
398 rem ----------------------------------------------------------------------
399 rem Auto-detect compiler if not specified, and validate GCC if chosen.
402 if (%COMPILER%)==(cl
) goto compilercheckdone
403 if (%COMPILER%)==(gcc
) goto checkgcc
405 echo Checking whether
'gcc' is available...
406 echo main
(){} >junk.c
408 if exist junk.o
goto checkgcc
410 echo Checking whether
'cl' is available...
412 if exist junk.obj
goto clOK
416 if exist junk.o
del junk.o
417 Rem WARNING -- COMMAND.COM on some systems only looks at the first
418 Rem 8 characters of a label. So do NOT be tempted to change
419 Rem chkapi* into something fancier like checkw32api
420 Rem You HAVE been warned!
421 if (%nocygwin%) == (Y
) goto chkapiN
422 echo Checking whether gcc requires
'-mno-cygwin'...
423 echo #include
"cygwin/version.h" >junk.c
424 echo main
(){} >>junk.c
425 echo gcc
-c junk.c
>>config.log
426 gcc
-c junk.c
>>config.log
2>&1
427 if not exist junk.o
goto chkapi
428 echo gcc
-mno
-cygwin
-c junk.c
>>config.log
429 gcc
-mno
-cygwin
-c junk.c
>>config.log
2>&1
430 if exist junk.o
set nocygwin
=Y
433 echo The failed program was
: >>config.log
434 type junk.c
>>config.log
438 rem ----------------------------------------------------------------------
439 rem Older versions of the Windows API headers either don't have any of
440 rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1
441 rem are like this), or have a typo in the definition of
442 rem IMAGE_FIRST_SECTION (the headers with gcc/mingw32 2.95 have this
443 rem problem). The gcc/mingw32 2.95.2 headers are okay, as are distros
444 rem of w32api-xxx.zip from Anders Norlander since 1999-11-18 at least.
445 rem Beginning with Emacs 23, we need usp10.h.
447 echo Checking whether Windows API headers are too old...
448 echo #include
"windows.h" >junk.c
449 echo #include
"usp10.h" >>junk.c
450 echo void test
(PIMAGE_NT_HEADERS pHeader
) >>junk.c
451 echo {PIMAGE_SECTION_HEADER pSection
= IMAGE_FIRST_SECTION
(pHeader
);} >>junk.c
452 if (%nocygwin%) == (Y
) goto chkapi1
457 set cf
=%usercflags% -mno
-cygwin
463 @
echo gcc
%cf% -c junk.c
>>config.log
464 gcc
%cf% -c junk.c
>>config.log
2>&1
466 if exist junk.o
goto chkuser
467 echo The failed program was
: >>config.log
468 type junk.c
>>config.log
473 echo int main
(int argc
, char
*argv
[]) {>junk.c
474 echo char
*usercflags
= "%escusercflags%";>>junk.c
476 echo gcc
-Werror
-c junk.c
>>config.log
477 gcc
-Werror
-c junk.c
>>config.log
2>&1
478 if exist junk.o
goto gccOk
480 echo Error in
--cflags argument
: %usercflags%
481 echo Backslashes and quotes cannot be used with
--cflags. Please
use forward
482 echo slashes
for filenames and paths
(e.g.
when passing directories to
-I
).
488 echo Configure failed.
489 echo To configure Emacs
for Windows
, you need to have either
490 echo gcc
-2.95 or later with Mingw32 and the Windows API headers
,
491 echo or MSVC
2.x or later.
499 Rem It is not clear what GCC version began supporting -mtune
500 Rem and pentium4 on x86, so check this explicitly.
501 echo main
(){} >junk.c
502 echo gcc
-c
-O2
-mtune
=pentium4 junk.c
>>config.log
503 gcc
-c
-O2
-mtune
=pentium4 junk.c
>>config.log
2>&1
504 if not errorlevel 1 goto gccMtuneOk
505 echo The failed program was
: >>config.log
506 type junk.c
>>config.log
512 echo GCC supports
-mtune
=pentium4
>>config.log
513 set mf
=-mtune
=pentium4
517 rem Check for DWARF-2 debug info support, else default to stabs
518 echo main
(){} >junk.c
519 echo gcc
-c
-gdwarf
-2 -g3 junk.c
>>config.log
520 gcc
-c
-gdwarf
-2 -g3 junk.c
>>config.log
2>&1
521 if not errorlevel 1 goto gccdwarf
522 echo The failed program was
: >>config.log
523 type junk.c
>>config.log
526 goto compilercheckdone
529 echo GCC supports DWARF
-2 >>config.log
530 set dbginfo
=-gdwarf
-2 -g3
532 goto compilercheckdone
536 rm
-f junk.c junk.obj
541 rem ----------------------------------------------------------------------
542 rem Check for external image libraries. Since they are loaded
543 rem dynamically, the libraries themselves do not need to be present
544 rem at compile time, but the header files are required.
548 if (%nocygwin%) == (N
) goto flagsOK
549 set mingwflag
=-mno
-cygwin
553 if (%pngsupport%) == (N
) goto pngDone
555 echo Checking
for libpng...
556 echo #include
"png.h" >junk.c
557 echo main
(){} >>junk.c
558 rem -o option is ignored with cl, but allows result to be consistent.
559 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
560 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
561 if exist junk.obj
goto havePng
563 echo ...png.h
not found
, building without PNG support.
564 echo The failed program was
: >>config.log
565 type junk.c
>>config.log
570 echo ...PNG header available
, building with PNG support.
574 rm
-f junk.c junk.obj
576 if (%tlssupport%) == (N
) goto tlsDone
578 rem this is a copy of the PNG detection
579 echo Checking
for libgnutls...
580 echo #include
"gnutls/gnutls.h" >junk.c
581 echo main
(){} >>junk.c
582 rem -o option is ignored with cl, but allows result to be consistent.
583 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
584 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
585 if exist junk.obj
goto haveTls
587 echo ...gnutls.h
not found
, building without TLS support.
588 echo The failed program was
: >>config.log
589 type junk.c
>>config.log
594 echo ...GnuTLS header available
, building with GnuTLS support.
598 rm
-f junk.c junk.obj
600 if (%libxml2support%) == (N
) goto xml2Done
602 echo Checking
for libxml2....
603 echo #include
"libxml/HTMLparser.h" >junk.c
604 echo main
(){} >>junk.c
605 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
606 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
607 if exist junk.obj
goto havelibxml2
609 echo ...libxml
/HTMLparser.h
not found
, building without libxml2 support
610 echo The failed program was
: >>config.log
611 type junk.c
>>config.log
616 echo ...libxml2 header available
, building with libxml2 support
620 rm
-f junk.c junk.obj
622 if (%jpegsupport%) == (N
) goto jpegDone
624 echo Checking
for jpeg
-6b...
625 echo #include
"jconfig.h" >junk.c
626 echo main
(){} >>junk.c
627 rem -o option is ignored with cl, but allows result to be consistent.
628 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
629 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
630 if exist junk.obj
goto haveJpeg
632 echo ...jconfig.h
not found
, building without JPEG support.
633 echo The failed program was
: >>config.log
634 type junk.c
>>config.log
639 echo ...JPEG header available
, building with JPEG support.
643 rm
-f junk.c junk.obj
645 if (%gifsupport%) == (N
) goto gifDone
647 echo Checking
for libgif...
648 rem giflib-5.0.0 needs size_t defined before gif_lib.h is included
649 rem redirection characters need to be protected from the shell
650 echo #include ^
<stddef.h^
> >junk.c
651 echo #include
"gif_lib.h" >>junk.c
652 echo main
(){} >>junk.c
653 rem -o option is ignored with cl, but allows result to be consistent.
654 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
655 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
656 if exist junk.obj
goto haveGif
658 echo ...gif_lib.h
not found
, building without GIF support.
659 echo The failed program was
: >>config.log
660 type junk.c
>>config.log
665 echo ...GIF header available
, building with GIF support.
669 rm
-f junk.c junk.obj
671 if (%tiffsupport%) == (N
) goto tiffDone
673 echo Checking
for tiff...
674 echo #include
"tiffio.h" >junk.c
675 echo main
(){} >>junk.c
676 rem -o option is ignored with cl, but allows result to be consistent.
677 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
678 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
679 if exist junk.obj
goto haveTiff
681 echo ...tiffio.h
not found
, building without TIFF support.
682 echo The failed program was
: >>config.log
683 type junk.c
>>config.log
688 echo ...TIFF header available
, building with TIFF support.
692 rm
-f junk.c junk.obj
694 if (%xpmsupport%) == (N
) goto xpmDone
696 echo Checking
for libXpm...
697 echo #define FOR_MSW
1 >junk.c
698 echo #include
"X11/xpm.h" >>junk.c
699 echo main
(){} >>junk.c
700 rem -o option is ignored with cl, but allows result to be consistent.
701 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
702 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
703 if exist junk.obj
goto haveXpm
705 echo ...X11
/xpm.h
not found
, building without XPM support.
706 echo The failed program was
: >>config.log
707 type junk.c
>>config.log
712 echo ...XPM header available
, building with XPM support.
716 rm
-f junk.c junk.obj
718 if not (%svgsupport%) == (Y
) goto :svgDone
719 echo Checking
for librsvg...
720 echo #include
"librsvg/rsvg.h" >junk.c
721 echo main
(){} >>junk.c
722 rem -o option is ignored with cl, but allows result to be consistent.
723 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
724 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
725 if exist junk.obj
goto haveSvg
727 echo ...librsvg
/rsvg.h or dependencies
not found
, building without SVG support.
728 echo The failed program was
: >>config.log
729 type junk.c
>>config.log
734 echo ...librsvg header available
, building with SVG support
(EXPERIMENTAL
).
738 rm
-f junk.c junk.obj junk.err junk.out
740 rem Any distfiles provided for building distribution? If no, we're done.
741 if "(%HAVE_DISTFILES%)"=="()" goto :distFilesDone
743 rem Any arguments to --distfiles specified? If no, we're done.
744 if not "%distfiles%"=="" goto :checkDistFiles
746 echo No arguments specified
for option
--distfiles
!
750 echo Checking
for distfiles...
751 rem Check if all specified distfiles exist
753 for %%d in
(%distfiles%) do if not exist %%d
set fileNotFound
=%%d
754 if not "%fileNotFound%"=="" goto distFilesNotFound
757 echo ...all distfiles found.
762 echo ...
%fileNotFound% not found.
769 rem ----------------------------------------------------------------------
772 echo Generating makefiles
773 if %COMPILER% == gcc
set MAKECMD
=gmake
774 if %COMPILER% == cl
set MAKECMD
=nmake
776 rem Pass on chosen settings to makefiles.
778 rem The weird place we put the redirection is to make sure no extra
779 rem whitespace winds up at the end of the Make variables, since some
780 rem variables, e.g. INSTALL_DIR, cannot stand that. Yes, echo will
781 rem write the blanks between the end of command arguments and the
782 rem redirection symbol to the file. OTOH, we cannot put the
783 rem redirection immediately after the last character of the command,
784 rem because environment variable expansion can yield a digit there,
785 rem which will then be misinterpreted as the file descriptor to
787 echo #
Start of settings from configure.bat
>config.settings
788 >>config.settings
echo COMPILER
=%COMPILER%
789 if not "(%mf%)" == "()" >>config.settings
echo MCPU_FLAG
=%mf%
790 if not "(%dbginfo%)" == "()" >>config.settings
echo DEBUG_INFO
=%dbginfo%
791 if (%nodebug%) == (Y
) >>config.settings
echo NODEBUG
=1
792 if (%noopt%) == (Y
) >>config.settings
echo NOOPT
=1
793 if (%profile%) == (Y
) >>config.settings
echo PROFILE
=1
794 if (%nocygwin%) == (Y
) >>config.settings
echo NOCYGWIN
=1
795 if not "(%prefix%)" == "()" >>config.settings
echo INSTALL_DIR
=%prefix%
796 if not "(%distfiles%)" == "()" >>config.settings
echo DIST_FILES
=%distfiles%
797 rem We go thru docflags because usercflags could be "-DFOO=bar" -something
798 rem and the if command cannot cope with this
799 for %%v in
(%usercflags%) do if not (%%v
)==() set docflags
=Y
800 if (%docflags%)==(Y
) >>config.settings
echo USER_CFLAGS
=%usercflags%
801 if (%docflags%)==(Y
) >>config.settings
echo ESC_USER_CFLAGS
=%escusercflags%
802 for %%v in
(%userldflags%) do if not (%%v
)==() set doldflags
=Y
803 if (%doldflags%)==(Y
) >>config.settings
echo USER_LDFLAGS
=%userldflags%
804 for %%v in
(%extrauserlibs%) do if not (%%v
)==() set doextralibs
=Y
805 if (%doextralibs%)==(Y
) >>config.settings
echo USER_LIBS
=%extrauserlibs%
806 echo #
End of settings from configure.bat
>>config.settings
807 echo.
>>config.settings
809 copy config.nt config.tmp
811 echo /* Start of settings from configure.bat.
*/ >>config.tmp
812 rem We write USER_CFLAGS and USER_LDFLAGS starting with a space to simplify
813 rem processing of compiler options in w32.c:get_emacs_configuration_options
814 if (%docflags%) == (Y
) echo #define USER_CFLAGS
" %escusercflags%" >>config.tmp
815 if (%doldflags%) == (Y
) echo #define USER_LDFLAGS
" %escuserldflags%" >>config.tmp
816 if (%profile%) == (Y
) echo #define PROFILING
1 >>config.tmp
817 if (%enablechecking%) == (Y
) echo #define ENABLE_CHECKING
1 >>config.tmp
818 if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG
1 >>config.tmp
819 if not "(%HAVE_GNUTLS%)" == "()" echo #define HAVE_GNUTLS
1 >>config.tmp
820 if not "(%HAVE_LIBXML2%)" == "()" echo #define HAVE_LIBXML2
1 >>config.tmp
821 if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG
1 >>config.tmp
822 if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF
1 >>config.tmp
823 if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF
1 >>config.tmp
824 if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM
1 >>config.tmp
825 if "(%HAVE_RSVG%)" == "(1)" echo #define HAVE_RSVG
1 >>config.tmp
827 echo /* End of settings from configure.bat.
*/ >>config.tmp
829 Rem See if fc.exe returns a meaningful exit status. If it does, we
830 Rem might as well avoid unnecessary overwriting of config.h and epaths.h,
831 Rem since this forces recompilation of every source file.
832 if exist foo.bar
del foo.bar
833 fc
/b foo.bar foo.bar
>nul
2>&1
834 if not errorlevel 2 goto doCopy
835 fc
/b config.tmp ..\src\config.h
>nul
2>&1
836 if errorlevel 1 goto doCopy
837 fc
/b paths.h ..\src\epaths.h
>nul
2>&1
838 if not errorlevel 1 goto dontCopy
841 copy config.tmp ..\src\config.h
842 copy paths.h ..\src\epaths.h
845 if exist config.tmp
del config.tmp
846 copy /b config.settings
+%MAKECMD%.defs
+..
\nt\makefile.w32
-in ..
\nt\makefile
847 if exist ..
\admin\unidata
copy /b config.settings
+%MAKECMD%.defs
+..
\admin\unidata\makefile.w32
-in ..
\admin\unidata\makefile
848 copy /b config.settings
+%MAKECMD%.defs
+..\lib
-src\makefile.w32
-in ..\lib
-src\makefile
849 copy /b config.settings
+%MAKECMD%.defs
+..\lib\makefile.w32
-in ..\lib\makefile
850 copy /b config.settings
+%MAKECMD%.defs
+..\src\makefile.w32
-in ..\src\makefile
851 copy /b config.settings
+%MAKECMD%.defs
+..\doc\emacs\makefile.w32
-in ..\doc\emacs\makefile
852 copy /b config.settings
+%MAKECMD%.defs
+..\doc\misc\makefile.w32
-in ..\doc\misc\makefile
853 copy /b config.settings
+%MAKECMD%.defs
+..\doc\lispref\makefile.w32
-in ..\doc\lispref\makefile
854 copy /b config.settings
+%MAKECMD%.defs
+..\doc\lispintro\makefile.w32
-in ..\doc\lispintro\makefile
855 if exist ..\lisp\makefile rm
-f ..
/lisp
/[Mm
]akefile
856 copy /b config.settings
+%MAKECMD%.defs
+..\lisp\makefile.w32
-in ..\lisp\makefile
857 rem Use the default (no-op) Makefile.in if the nt version is not present.
858 if exist ..\leim\makefile.w32
-in
copy /b config.settings
+%MAKECMD%.defs
+..\leim\makefile.w32
-in ..\leim\makefile
859 if not exist ..\leim\makefile.w32
-in
copy /b config.settings
+%MAKECMD%.defs
+..\leim\Makefile.in ..\leim\makefile
862 Rem Some people use WinZip which doesn't create empty directories!
863 if not exist ..\site
-lisp
\nul
mkdir ..\site
-lisp\
864 Rem Update subdirs.el only if it is different or fc.exe doesn't work.
865 if exist foo.bar
del foo.bar
866 fc
/b foo.bar foo.bar
>nul
2>&1
867 if not errorlevel 2 goto doUpdateSubdirs
868 fc
/b subdirs.el ..\site
-lisp\subdirs.el
>nul
2>&1
869 if not errorlevel 1 goto dontUpdateSubdirs
872 if exist ..\site
-lisp\subdirs.el
del ..\site
-lisp\subdirs.el
873 copy subdirs.el ..\site
-lisp\subdirs.el
878 rem check that we have all the libraries we need.
881 if not "(%HAVE_XPM%)" == "()" goto checkpng
882 if (%xpmsupport%) == (N
) goto checkpng
884 echo XPM support is missing. It is required
for color icons in the toolbar.
885 echo Install libXpm development
files or
use --without
-xpm
888 if not "(%HAVE_PNG%)" == "()" goto checkjpeg
889 if (%pngsupport%) == (N
) goto checkjpeg
891 echo PNG support is missing.
892 echo Install libpng development
files or
use --without
-png
895 if not "(%HAVE_JPEG%)" == "()" goto checktiff
896 if (%jpegsupport%) == (N
) goto checktiff
898 echo JPEG support is missing.
899 echo Install jpeg development
files or
use --without
-jpeg
902 if not "(%HAVE_TIFF%)" == "()" goto checkgif
903 if (%tiffsupport%) == (N
) goto checkgif
905 echo TIFF support is missing.
906 echo Install libtiff development
files or
use --without
-tiff
909 if not "(%HAVE_GIF%)" == "()" goto checkdistfiles
910 if (%gifsupport%) == (N
) goto checkdistfiles
912 echo GIF support is missing.
913 echo Install giflib or libungif development
files or
use --without
-gif
916 if "(%HAVE_DISTFILES%)" == "()" goto donelibchecks
917 if (%distFilesOk%) == (1) goto donelibchecks
919 echo Files specified with option
--distfiles could
not be found.
920 echo Fix these issues before running make dist
923 if (%libsOK%) == (1) goto success
925 echo Important libraries are missing. Fix these issues before running make.
929 echo Emacs successfully configured.
930 echo Emacs successfully configured.
>>config.log
931 if (%MAKECMD%) == (gmake
) set MAKECMD
=make
932 echo Run `
%MAKECMD%' to build, then run `%MAKECMD% install' to install.
936 echo Your environment size is too small. Please enlarge it and rerun configure.
937 echo For example
, type "command.com /e:2048" to have
2048 bytes available.