2 rem ----------------------------------------------------------------------
3 rem Configuration script for MS Windows operating systems
4 rem Copyright (C) 1999-2012 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.
62 if exist config.log
del config.log
64 rem ----------------------------------------------------------------------
65 rem See if the environment is large enough. We need 43 (?) bytes.
66 set $foo$
=123456789_123456789_123456789_123456789_123
67 if not "%$foo$%" == "123456789_123456789_123456789_123456789_123" goto SmallEnv
70 rem ----------------------------------------------------------------------
71 rem Make sure we are running in the nt subdir
72 if exist configure.bat
goto start
73 echo You must
run configure from the nt subdirectory.
77 rem ----------------------------------------------------------------------
78 rem Attempt to enable command extensions. Set use_extensions to 1 if
79 rem they are available and 0 if they are not available.
81 setlocal ENABLEEXTENSIONS
82 if "%CMDEXTVERSION%" == "" set use_extensions
=0
83 if "%use_extensions%" == "1" goto afterext
85 echo.
Command extensions are
not available. Using parameters that include the
=
86 echo. character by enclosing them in quotes will
not be supported.
90 rem ----------------------------------------------------------------------
113 rem ----------------------------------------------------------------------
114 rem Handle arguments.
116 if "%1" == "-h" goto usage
117 if "%1" == "--help" goto usage
118 if "%1" == "--prefix" goto setprefix
119 if "%1" == "--with-gcc" goto withgcc
120 if "%1" == "--with-msvc" goto withmsvc
121 if "%1" == "--no-debug" goto nodebug
122 if "%1" == "--no-opt" goto noopt
123 if "%1" == "--enable-checking" goto enablechecking
124 if "%1" == "--profile" goto profile
125 if "%1" == "--no-cygwin" goto nocygwin
126 if "%1" == "--cflags" goto usercflags
127 if "%1" == "--ldflags" goto userldflags
128 if "%1" == "--lib" goto extrauserlibs
129 if "%1" == "--without-png" goto withoutpng
130 if "%1" == "--without-jpeg" goto withoutjpeg
131 if "%1" == "--without-gif" goto withoutgif
132 if "%1" == "--without-tiff" goto withouttiff
133 if "%1" == "--without-gnutls" goto withoutgnutls
134 if "%1" == "--without-libxml2" goto withoutlibxml2
135 if "%1" == "--without-xpm" goto withoutxpm
136 if "%1" == "--with-svg" goto withsvg
137 if "%1" == "--distfiles" goto distfiles
138 if "%1" == "" goto checkutils
141 echo Usage
: configure
[options
]
143 echo.
--prefix PREFIX install Emacs in directory PREFIX
144 echo.
--with
-gcc
use GCC to compile Emacs
145 echo.
--with
-msvc
use MSVC to compile Emacs
146 echo.
--no
-debug exclude
debug info from executables
147 echo.
--no
-opt disable optimization
148 echo.
--enable
-checking enable additional
run-time checks
149 echo.
--profile enable profiling
150 echo.
--no
-cygwin
use -mno
-cygwin option with GCC
151 echo.
--cflags FLAG pass FLAG to compiler
152 echo.
--ldflags FLAG pass FLAG to compiler
when linking
153 echo.
--lib LIB link to extra library LIB
154 echo.
--without
-png
do not use PNG library even
if it is installed
155 echo.
--without
-jpeg
do not use JPEG library even
if it is installed
156 echo.
--without
-gif
do not use GIF library even
if it is installed
157 echo.
--without
-tiff
do not use TIFF library even
if it is installed
158 echo.
--without
-xpm
do not use XPM library even
if it is installed
159 echo.
--without
-gnutls
do not use GnuTLS library even
if it is installed
160 echo.
--without
-libxml2
do not use libxml2 library even
if it is installed
161 echo.
--with
-svg
use the RSVG library
(experimental
)
162 echo.
--distfiles
path to
files for make dist
, e.g. libXpm.dll
163 if "%use_extensions%" == "0" goto end
165 echo. The cflags and ldflags arguments support parameters that include the
=
166 echo. character. However
, since the
= character is normally treated as a
167 echo. separator character you will need to enclose any parameter that includes
168 echo. the
= character in quotes.
For example
, to include
169 echo.
-DSITELOAD_PURESIZE_EXTRA
=100000 as one of the cflags you would
run
170 echo. configure.bat as follows
:
171 echo. configure.bat
--cflags
"-DSITELOAD_PURESIZE_EXTRA=100000"
173 echo. Note that this capability of processing parameters that include the
=
174 echo. character depends on
command extensions. This batch file attempts to
175 echo. enable
command extensions.
If command extensions cannot be enabled
, a
176 echo. warning message will be displayed.
179 rem ----------------------------------------------------------------------
187 rem ----------------------------------------------------------------------
194 rem ----------------------------------------------------------------------
201 rem ----------------------------------------------------------------------
208 rem ----------------------------------------------------------------------
215 rem ----------------------------------------------------------------------
222 rem ----------------------------------------------------------------------
229 rem ----------------------------------------------------------------------
236 rem ----------------------------------------------------------------------
239 if "%use_extensions%" == "1" goto ucflagex
244 set usercflags
=%usercflags%%sep1%%~
1
245 set escusercflags
=%usercflags
:"=\"%
252 set usercflags=%usercflags%%sep1%%1
253 set escusercflags=%usercflags%
260 echo. extrauserlibs: %extrauserlibs%
261 set extrauserlibs=%extrauserlibs%%sep4%%1
266 rem ----------------------------------------------------------------------
269 if "%use_extensions%" == "1" goto ulflagex
274 set userldflags=%userldflags%%sep2%%~1
275 set escuserldflags=%userldflags:"=\"%
282 set userldflags
=%userldflags%%sep2%%1
283 set escuserldflags
=%userldflags%
288 rem ----------------------------------------------------------------------
296 rem ----------------------------------------------------------------------
304 rem ----------------------------------------------------------------------
312 rem ----------------------------------------------------------------------
320 rem ----------------------------------------------------------------------
328 rem ----------------------------------------------------------------------
336 rem ----------------------------------------------------------------------
349 rem ----------------------------------------------------------------------
354 set distfiles
=%distfiles%%sep3%%1
359 rem ----------------------------------------------------------------------
360 rem Check that necessary utilities (cp and rm) are present.
363 echo Checking
for 'cp'...
364 cp configure.bat junk.bat
365 if not exist junk.bat
goto needcp
366 echo Checking
for 'rm'...
368 if exist junk.bat
goto needrm
372 echo You need
'cp' (the Unix file
copy program
) to build Emacs.
377 echo You need
'rm' (the Unix file delete program
) to build Emacs.
380 rem ----------------------------------------------------------------------
381 rem Auto-detect compiler if not specified, and validate GCC if chosen.
384 if (%COMPILER%)==(cl
) goto compilercheckdone
385 if (%COMPILER%)==(gcc
) goto checkgcc
387 echo Checking whether
'gcc' is available...
388 echo main
(){} >junk.c
390 if exist junk.o
goto checkgcc
392 echo Checking whether
'cl' is available...
394 if exist junk.obj
goto clOK
398 if exist junk.o
del junk.o
399 Rem WARNING -- COMMAND.COM on some systems only looks at the first
400 Rem 8 characters of a label. So do NOT be tempted to change
401 Rem chkapi* into something fancier like checkw32api
402 Rem You HAVE been warned!
403 if (%nocygwin%) == (Y
) goto chkapiN
404 echo Checking whether gcc requires
'-mno-cygwin'...
405 echo #include
"cygwin/version.h" >junk.c
406 echo main
(){} >>junk.c
407 echo gcc
-c junk.c
>>config.log
408 gcc
-c junk.c
>>config.log
2>&1
409 if not exist junk.o
goto chkapi
410 echo gcc
-mno
-cygwin
-c junk.c
>>config.log
411 gcc
-mno
-cygwin
-c junk.c
>>config.log
2>&1
412 if exist junk.o
set nocygwin
=Y
415 echo The failed program was
: >>config.log
416 type junk.c
>>config.log
420 rem ----------------------------------------------------------------------
421 rem Older versions of the Windows API headers either don't have any of
422 rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1
423 rem are like this), or have a typo in the definition of
424 rem IMAGE_FIRST_SECTION (the headers with gcc/mingw32 2.95 have this
425 rem problem). The gcc/mingw32 2.95.2 headers are okay, as are distros
426 rem of w32api-xxx.zip from Anders Norlander since 1999-11-18 at least.
427 rem Beginning with Emacs 23, we need usp10.h.
429 echo Checking whether Windows API headers are too old...
430 echo #include
"windows.h" >junk.c
431 echo #include
"usp10.h" >>junk.c
432 echo void test
(PIMAGE_NT_HEADERS pHeader
) >>junk.c
433 echo {PIMAGE_SECTION_HEADER pSection
= IMAGE_FIRST_SECTION
(pHeader
);} >>junk.c
434 if (%nocygwin%) == (Y
) goto chkapi1
439 set cf
=%usercflags% -mno
-cygwin
445 @
echo gcc
%cf% -c junk.c
>>config.log
446 gcc
%cf% -c junk.c
>>config.log
2>&1
448 if exist junk.o
goto chkuser
449 echo The failed program was
: >>config.log
450 type junk.c
>>config.log
455 echo int main
(int argc
, char
*argv
[]) {>junk.c
456 echo char
*usercflags
= "%escusercflags%";>>junk.c
458 echo gcc
-Werror
-c junk.c
>>config.log
459 gcc
-Werror
-c junk.c
>>config.log
2>&1
460 if exist junk.o
goto gccOk
462 echo Error in
--cflags argument
: %usercflags%
463 echo Backslashes and quotes cannot be used with
--cflags. Please
use forward
464 echo slashes
for filenames and paths
(e.g.
when passing directories to
-I
).
470 echo Configure failed.
471 echo To configure Emacs
for Windows
, you need to have either
472 echo gcc
-2.95 or later with Mingw32 and the Windows API headers
,
473 echo or MSVC
2.x or later.
481 Rem It is not clear what GCC version began supporting -mtune
482 Rem and pentium4 on x86, so check this explicitly.
483 echo main
(){} >junk.c
484 echo gcc
-c
-O2
-mtune
=pentium4 junk.c
>>config.log
485 gcc
-c
-O2
-mtune
=pentium4 junk.c
>>config.log
2>&1
486 if not errorlevel 1 goto gccMtuneOk
487 echo The failed program was
: >>config.log
488 type junk.c
>>config.log
494 echo GCC supports
-mtune
=pentium4
>>config.log
495 set mf
=-mtune
=pentium4
499 rem Check for DWARF-2 debug info support, else default to stabs
500 echo main
(){} >junk.c
501 echo gcc
-c
-gdwarf
-2 -g3 junk.c
>>config.log
502 gcc
-c
-gdwarf
-2 -g3 junk.c
>>config.log
2>&1
503 if not errorlevel 1 goto gccdwarf
504 echo The failed program was
: >>config.log
505 type junk.c
>>config.log
508 goto compilercheckdone
511 echo GCC supports DWARF
-2 >>config.log
512 set dbginfo
=-gdwarf
-2 -g3
514 goto compilercheckdone
518 rm
-f junk.c junk.obj
523 rem ----------------------------------------------------------------------
524 rem Check for external image libraries. Since they are loaded
525 rem dynamically, the libraries themselves do not need to be present
526 rem at compile time, but the header files are required.
530 if (%nocygwin%) == (N
) goto flagsOK
531 set mingwflag
=-mno
-cygwin
535 if (%pngsupport%) == (N
) goto pngDone
537 echo Checking
for libpng...
538 echo #include
"png.h" >junk.c
539 echo main
(){} >>junk.c
540 rem -o option is ignored with cl, but allows result to be consistent.
541 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
542 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
543 if exist junk.obj
goto havePng
545 echo ...png.h
not found
, building without PNG support.
546 echo The failed program was
: >>config.log
547 type junk.c
>>config.log
552 echo ...PNG header available
, building with PNG support.
556 rm
-f junk.c junk.obj
558 if (%tlssupport%) == (N
) goto tlsDone
560 rem this is a copy of the PNG detection
561 echo Checking
for libgnutls...
562 echo #include
"gnutls/gnutls.h" >junk.c
563 echo main
(){} >>junk.c
564 rem -o option is ignored with cl, but allows result to be consistent.
565 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
566 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
567 if exist junk.obj
goto haveTls
569 echo ...gnutls.h
not found
, building without TLS support.
570 echo The failed program was
: >>config.log
571 type junk.c
>>config.log
576 echo ...GnuTLS header available
, building with GnuTLS support.
580 rm
-f junk.c junk.obj
582 if (%libxml2support%) == (N
) goto xml2Done
584 echo Checking
for libxml2....
585 echo #include
"libxml/HTMLparser.h" >junk.c
586 echo main
(){} >>junk.c
587 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
588 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
589 if exist junk.obj
goto havelibxml2
591 echo ...libxml
/HTMLparser.h
not found
, building without libxml2 support
592 echo The failed program was
: >>config.log
593 type junk.c
>>config.log
598 echo ...libxml2 header available
, building with libxml2 support
602 rm
-f junk.c junk.obj
604 if (%jpegsupport%) == (N
) goto jpegDone
606 echo Checking
for jpeg
-6b...
607 echo #include
"jconfig.h" >junk.c
608 echo main
(){} >>junk.c
609 rem -o option is ignored with cl, but allows result to be consistent.
610 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
611 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
612 if exist junk.obj
goto haveJpeg
614 echo ...jconfig.h
not found
, building without JPEG support.
615 echo The failed program was
: >>config.log
616 type junk.c
>>config.log
621 echo ...JPEG header available
, building with JPEG support.
625 rm
-f junk.c junk.obj
627 if (%gifsupport%) == (N
) goto gifDone
629 echo Checking
for libgif...
630 rem giflib-5.0.0 needs size_t defined before gif_lib.h is included
631 rem redirection characters need to be protected from the shell
632 echo #include ^
<stddef.h^
> >junk.c
633 echo #include
"gif_lib.h" >>junk.c
634 echo main
(){} >>junk.c
635 rem -o option is ignored with cl, but allows result to be consistent.
636 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
637 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
638 if exist junk.obj
goto haveGif
640 echo ...gif_lib.h
not found
, building without GIF support.
641 echo The failed program was
: >>config.log
642 type junk.c
>>config.log
647 echo ...GIF header available
, building with GIF support.
651 rm
-f junk.c junk.obj
653 if (%tiffsupport%) == (N
) goto tiffDone
655 echo Checking
for tiff...
656 echo #include
"tiffio.h" >junk.c
657 echo main
(){} >>junk.c
658 rem -o option is ignored with cl, but allows result to be consistent.
659 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
660 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
661 if exist junk.obj
goto haveTiff
663 echo ...tiffio.h
not found
, building without TIFF support.
664 echo The failed program was
: >>config.log
665 type junk.c
>>config.log
670 echo ...TIFF header available
, building with TIFF support.
674 rm
-f junk.c junk.obj
676 if (%xpmsupport%) == (N
) goto xpmDone
678 echo Checking
for libXpm...
679 echo #define FOR_MSW
1 >junk.c
680 echo #include
"X11/xpm.h" >>junk.c
681 echo main
(){} >>junk.c
682 rem -o option is ignored with cl, but allows result to be consistent.
683 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
684 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
685 if exist junk.obj
goto haveXpm
687 echo ...X11
/xpm.h
not found
, building without XPM support.
688 echo The failed program was
: >>config.log
689 type junk.c
>>config.log
694 echo ...XPM header available
, building with XPM support.
698 rm
-f junk.c junk.obj
700 if not (%svgsupport%) == (Y
) goto :svgDone
701 echo Checking
for librsvg...
702 echo #include
"librsvg/rsvg.h" >junk.c
703 echo main
(){} >>junk.c
704 rem -o option is ignored with cl, but allows result to be consistent.
705 echo %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>>config.log
706 %COMPILER% %usercflags% %mingwflag% -c junk.c
-o junk.obj
>junk.out
2>>config.log
707 if exist junk.obj
goto haveSvg
709 echo ...librsvg
/rsvg.h or dependencies
not found
, building without SVG support.
710 echo The failed program was
: >>config.log
711 type junk.c
>>config.log
716 echo ...librsvg header available
, building with SVG support
(EXPERIMENTAL
).
720 rm
-f junk.c junk.obj junk.err junk.out
722 rem Any distfiles provided for building distribution? If no, we're done.
723 if "(%HAVE_DISTFILES%)"=="()" goto :distFilesDone
725 rem Any arguments to --distfiles specified? If no, we're done.
726 if not "%distfiles%"=="" goto :checkDistFiles
728 echo No arguments specified
for option
--distfiles
!
732 echo Checking
for distfiles...
733 rem Check if all specified distfiles exist
735 for %%d in
(%distfiles%) do if not exist %%d
set fileNotFound
=%%d
736 if not "%fileNotFound%"=="" goto distFilesNotFound
739 echo ...all distfiles found.
744 echo ...
%fileNotFound% not found.
751 rem ----------------------------------------------------------------------
754 echo Generating makefiles
755 if %COMPILER% == gcc
set MAKECMD
=gmake
756 if %COMPILER% == cl
set MAKECMD
=nmake
758 rem Pass on chosen settings to makefiles.
760 rem The weird place we put the redirection is to make sure no extra
761 rem whitespace winds up at the end of the Make variables, since some
762 rem variables, e.g. INSTALL_DIR, cannot stand that. Yes, echo will
763 rem write the blanks between the end of command arguments and the
764 rem redirection symbol to the file. OTOH, we cannot put the
765 rem redirection immediately after the last character of the command,
766 rem because environment variable expansion can yield a digit there,
767 rem which will then be misinterpreted as the file descriptor to
769 echo #
Start of settings from configure.bat
>config.settings
770 >>config.settings
echo COMPILER
=%COMPILER%
771 if not "(%mf%)" == "()" >>config.settings
echo MCPU_FLAG
=%mf%
772 if not "(%dbginfo%)" == "()" >>config.settings
echo DEBUG_INFO
=%dbginfo%
773 if (%nodebug%) == (Y
) >>config.settings
echo NODEBUG
=1
774 if (%noopt%) == (Y
) >>config.settings
echo NOOPT
=1
775 if (%profile%) == (Y
) >>config.settings
echo PROFILE
=1
776 if (%nocygwin%) == (Y
) >>config.settings
echo NOCYGWIN
=1
777 if not "(%prefix%)" == "()" >>config.settings
echo INSTALL_DIR
=%prefix%
778 if not "(%distfiles%)" == "()" >>config.settings
echo DIST_FILES
=%distfiles%
779 rem We go thru docflags because usercflags could be "-DFOO=bar" -something
780 rem and the if command cannot cope with this
781 for %%v in
(%usercflags%) do if not (%%v
)==() set docflags
=Y
782 if (%docflags%)==(Y
) >>config.settings
echo USER_CFLAGS
=%usercflags%
783 if (%docflags%)==(Y
) >>config.settings
echo ESC_USER_CFLAGS
=%escusercflags%
784 for %%v in
(%userldflags%) do if not (%%v
)==() set doldflags
=Y
785 if (%doldflags%)==(Y
) >>config.settings
echo USER_LDFLAGS
=%userldflags%
786 for %%v in
(%extrauserlibs%) do if not (%%v
)==() set doextralibs
=Y
787 if (%doextralibs%)==(Y
) >>config.settings
echo USER_LIBS
=%extrauserlibs%
788 echo #
End of settings from configure.bat
>>config.settings
789 echo.
>>config.settings
791 copy config.nt config.tmp
793 echo /* Start of settings from configure.bat.
*/ >>config.tmp
794 rem We write USER_CFLAGS and USER_LDFLAGS starting with a space to simplify
795 rem processing of compiler options in w32.c:get_emacs_configuration_options
796 if (%docflags%) == (Y
) echo #define USER_CFLAGS
" %escusercflags%" >>config.tmp
797 if (%doldflags%) == (Y
) echo #define USER_LDFLAGS
" %escuserldflags%" >>config.tmp
798 if (%profile%) == (Y
) echo #define PROFILING
1 >>config.tmp
799 if (%enablechecking%) == (Y
) echo #define ENABLE_CHECKING
1 >>config.tmp
800 if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG
1 >>config.tmp
801 if not "(%HAVE_GNUTLS%)" == "()" echo #define HAVE_GNUTLS
1 >>config.tmp
802 if not "(%HAVE_LIBXML2%)" == "()" echo #define HAVE_LIBXML2
1 >>config.tmp
803 if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG
1 >>config.tmp
804 if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF
1 >>config.tmp
805 if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF
1 >>config.tmp
806 if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM
1 >>config.tmp
807 if "(%HAVE_RSVG%)" == "(1)" echo #define HAVE_RSVG
1 >>config.tmp
809 echo /* End of settings from configure.bat.
*/ >>config.tmp
811 Rem See if fc.exe returns a meaningful exit status. If it does, we
812 Rem might as well avoid unnecessary overwriting of config.h and epaths.h,
813 Rem since this forces recompilation of every source file.
814 if exist foo.bar
del foo.bar
815 fc
/b foo.bar foo.bar
>nul
2>&1
816 if not errorlevel 2 goto doCopy
817 fc
/b config.tmp ..\src\config.h
>nul
2>&1
818 if errorlevel 1 goto doCopy
819 fc
/b paths.h ..\src\epaths.h
>nul
2>&1
820 if not errorlevel 1 goto dontCopy
823 copy config.tmp ..\src\config.h
824 copy paths.h ..\src\epaths.h
827 if exist config.tmp
del config.tmp
828 copy /b config.settings
+%MAKECMD%.defs
+..
\nt\makefile.w32
-in ..
\nt\makefile
829 if exist ..
\admin\unidata
copy /b config.settings
+%MAKECMD%.defs
+..
\admin\unidata\makefile.w32
-in ..
\admin\unidata\makefile
830 copy /b config.settings
+%MAKECMD%.defs
+..\lib
-src\makefile.w32
-in ..\lib
-src\makefile
831 copy /b config.settings
+%MAKECMD%.defs
+..\lib\makefile.w32
-in ..\lib\makefile
832 copy /b config.settings
+%MAKECMD%.defs
+..\src\makefile.w32
-in ..\src\makefile
833 copy /b config.settings
+%MAKECMD%.defs
+..\doc\emacs\makefile.w32
-in ..\doc\emacs\makefile
834 copy /b config.settings
+%MAKECMD%.defs
+..\doc\misc\makefile.w32
-in ..\doc\misc\makefile
835 copy /b config.settings
+%MAKECMD%.defs
+..\doc\lispref\makefile.w32
-in ..\doc\lispref\makefile
836 copy /b config.settings
+%MAKECMD%.defs
+..\doc\lispintro\makefile.w32
-in ..\doc\lispintro\makefile
837 if exist ..\lisp\makefile rm
-f ..
/lisp
/[Mm
]akefile
838 copy /b config.settings
+%MAKECMD%.defs
+..\lisp\makefile.w32
-in ..\lisp\makefile
839 rem Use the default (no-op) Makefile.in if the nt version is not present.
840 if exist ..\leim\makefile.w32
-in
copy /b config.settings
+%MAKECMD%.defs
+..\leim\makefile.w32
-in ..\leim\makefile
841 if not exist ..\leim\makefile.w32
-in
copy /b config.settings
+%MAKECMD%.defs
+..\leim\Makefile.in ..\leim\makefile
844 Rem Some people use WinZip which doesn't create empty directories!
845 if not exist ..\site
-lisp
\nul
mkdir ..\site
-lisp\
846 Rem Update subdirs.el only if it is different or fc.exe doesn't work.
847 if exist foo.bar
del foo.bar
848 fc
/b foo.bar foo.bar
>nul
2>&1
849 if not errorlevel 2 goto doUpdateSubdirs
850 fc
/b subdirs.el ..\site
-lisp\subdirs.el
>nul
2>&1
851 if not errorlevel 1 goto dontUpdateSubdirs
854 if exist ..\site
-lisp\subdirs.el
del ..\site
-lisp\subdirs.el
855 copy subdirs.el ..\site
-lisp\subdirs.el
860 rem check that we have all the libraries we need.
863 if not "(%HAVE_XPM%)" == "()" goto checkpng
864 if (%xpmsupport%) == (N
) goto checkpng
866 echo XPM support is missing. It is required
for color icons in the toolbar.
867 echo Install libXpm development
files or
use --without
-xpm
870 if not "(%HAVE_PNG%)" == "()" goto checkjpeg
871 if (%pngsupport%) == (N
) goto checkjpeg
873 echo PNG support is missing.
874 echo Install libpng development
files or
use --without
-png
877 if not "(%HAVE_JPEG%)" == "()" goto checktiff
878 if (%jpegsupport%) == (N
) goto checktiff
880 echo JPEG support is missing.
881 echo Install jpeg development
files or
use --without
-jpeg
884 if not "(%HAVE_TIFF%)" == "()" goto checkgif
885 if (%tiffsupport%) == (N
) goto checkgif
887 echo TIFF support is missing.
888 echo Install libtiff development
files or
use --without
-tiff
891 if not "(%HAVE_GIF%)" == "()" goto checkdistfiles
892 if (%gifsupport%) == (N
) goto checkdistfiles
894 echo GIF support is missing.
895 echo Install giflib or libungif development
files or
use --without
-gif
898 if "(%HAVE_DISTFILES%)" == "()" goto donelibchecks
899 if (%distFilesOk%) == (1) goto donelibchecks
901 echo Files specified with option
--distfiles could
not be found.
902 echo Fix these issues before running make dist
905 if (%libsOK%) == (1) goto success
907 echo Important libraries are missing. Fix these issues before running make.
911 echo Emacs successfully configured.
912 echo Emacs successfully configured.
>>config.log
913 if (%MAKECMD%) == (gmake
) set MAKECMD
=make
914 echo Run `
%MAKECMD%' to build, then run `%MAKECMD% install' to install.
918 echo Your environment size is too small. Please enlarge it and rerun configure.
919 echo For example
, type "command.com /e:2048" to have
2048 bytes available.