]> code.delx.au - gnu-emacs/blobdiff - nt/configure.bat
(nnheader-accept-process-output): Autoload it.
[gnu-emacs] / nt / configure.bat
index 6b5441c1d674321df6ecf4e6e6d04a632e696b23..957ed14b9497f171f877d53e8dd669fc64f5cfaf 100755 (executable)
@@ -6,10 +6,10 @@ rem      2006, 2007, 2008 Free Software Foundation, Inc.
 \r
 rem   This file is part of GNU Emacs.\r
 \r
-rem   GNU Emacs is free software; you can redistribute it and/or modify\r
+rem   GNU Emacs is free software: you can redistribute it and/or modify\r
 rem   it under the terms of the GNU General Public License as published by\r
-rem   the Free Software Foundation; either version 3, or (at your option)\r
-rem   any later version.\r
+rem   the Free Software Foundation, either version 3 of the License, or\r
+rem   (at your option) any later version.\r
 \r
 rem   GNU Emacs is distributed in the hope that it will be useful,\r
 rem   but WITHOUT ANY WARRANTY; without even the implied warranty of\r
@@ -17,18 +17,17 @@ rem   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 rem   GNU General Public License for more details.\r
 \r
 rem   You should have received a copy of the GNU General Public License\r
-rem   along with GNU Emacs; see the file COPYING.  If not, write to the\r
-rem   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\r
-rem   Boston, MA 02110-1301, USA.\r
+rem   along with GNU Emacs.  If not, see http://www.gnu.org/licenses/.\r
+\r
 rem   ----------------------------------------------------------------------\r
 rem   YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:\r
 rem\r
 rem   + MS Windows 95/98/Me or NT/2000/XP\r
-rem   + either MSVC 2.x or later, or gcc-2.95 or later (with gmake 3.75\r
+rem   + either MSVC 2.x or later, or gcc-2.95 or later (with GNU make 3.75\r
 rem     or later) and the Mingw32 and W32 API headers and libraries.\r
 rem   + Visual Studio 2005 is not supported at this time.\r
 rem\r
-rem For reference, here is a list of which builds of gmake are known to\r
+rem For reference, here is a list of which builds of GNU make are known to\r
 rem work or not, and whether they work in the presence and/or absence of\r
 rem sh.exe.\r
 rem\r
@@ -120,11 +119,11 @@ echo.   --no-opt                disable optimization
 echo.   --no-cygwin             use -mno-cygwin option with GCC\r
 echo.   --cflags FLAG           pass FLAG to compiler\r
 echo.   --ldflags FLAG          pass FLAG to compiler when linking\r
-echo.   --without-png           do not use libpng even if it is installed\r
-echo.   --without-jpeg          do not use jpeg-6b even if it is installed\r
-echo.   --without-gif           do not use libungif even if it is installed\r
-echo.   --without-tiff          do not use libtiff even if it is installed\r
-echo.   --without-xpm           do not use libXpm even if it is installed\r
+echo.   --without-png           do not use PNG library even if it is installed\r
+echo.   --without-jpeg          do not use JPEG library even if it is installed\r
+echo.   --without-gif           do not use GIF library even if it is installed\r
+echo.   --without-tiff          do not use TIFF library even if it is installed\r
+echo.   --without-xpm           do not use XPM library even if it is installed\r
 goto end\r
 rem ----------------------------------------------------------------------\r
 :setprefix\r
@@ -235,22 +234,23 @@ rem   Auto-detect compiler if not specified, and validate GCC if chosen.
 if (%COMPILER%)==(cl) goto compilercheckdone\r
 if (%COMPILER%)==(gcc) goto checkgcc\r
 \r
-echo Checking whether 'cl' is available...\r
+echo Checking whether 'gcc' is available...\r
 echo main(){} >junk.c\r
+gcc -c junk.c\r
+if exist junk.o goto checkgcc\r
+\r
+echo Checking whether 'cl' is available...\r
 cl -nologo -c junk.c\r
 if exist junk.obj goto clOK\r
-\r
-echo Checking whether 'gcc' is available...\r
-gcc -c junk.c\r
-if not exist junk.o goto nocompiler\r
-del junk.o\r
+goto nocompiler\r
 \r
 :checkgcc\r
+if exist junk.o del junk.o\r
 Rem WARNING -- COMMAND.COM on some systems only looks at the first\r
 Rem            8 characters of a label.  So do NOT be tempted to change\r
 Rem            chkapi* into something fancier like checkw32api\r
 Rem You HAVE been warned!\r
-if (%nocygwin%) == (Y) goto chkapi\r
+if (%nocygwin%) == (Y) goto chkapiN\r
 echo Checking whether gcc requires '-mno-cygwin'...\r
 echo #include "cygwin/version.h" >junk.c\r
 echo main(){} >>junk.c\r
@@ -260,11 +260,12 @@ if not exist junk.o goto chkapi
 echo gcc -mno-cygwin -c junk.c >>config.log\r
 gcc -mno-cygwin -c junk.c >>config.log 2>&1\r
 if exist junk.o set nocygwin=Y\r
-rm -f junk.c junk.o\r
 \r
 :chkapi\r
 echo The failed program was: >>config.log\r
 type junk.c >>config.log\r
+:chkapiN\r
+rm -f junk.c junk.o\r
 rem ----------------------------------------------------------------------\r
 rem   Older versions of the Windows API headers either don't have any of\r
 rem   the IMAGE_xxx definitions (the headers that come with Cygwin b20.1\r
@@ -272,9 +273,11 @@ rem   are like this), or have a typo in the definition of
 rem   IMAGE_FIRST_SECTION (the headers with gcc/mingw32 2.95 have this\r
 rem   problem).  The gcc/mingw32 2.95.2 headers are okay, as are distros\r
 rem   of w32api-xxx.zip from Anders Norlander since 1999-11-18 at least.\r
+rem   Beginning with Emacs 23, we need usp10.h.\r
 rem\r
 echo Checking whether W32 API headers are too old...\r
 echo #include "windows.h" >junk.c\r
+echo #include "usp10.h" >>junk.c\r
 echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c\r
 echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c\r
 if (%nocygwin%) == (Y) goto chkapi1\r
@@ -513,11 +516,13 @@ copy paths.h ..\src\epaths.h
 :dontCopy\r
 if exist config.tmp del config.tmp\r
 copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile\r
+if exist ..\admin\unidata copy /b config.settings+%MAKECMD%.defs+..\admin\unidata\makefile.w32-in ..\admin\unidata\makefile\r
 copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile\r
 copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile\r
-copy /b config.settings+%MAKECMD%.defs+..\man\makefile.w32-in ..\man\makefile\r
-copy /b config.settings+%MAKECMD%.defs+..\lispref\makefile.w32-in ..\lispref\makefile\r
-copy /b config.settings+%MAKECMD%.defs+..\lispintro\makefile.w32-in ..\lispintro\makefile\r
+copy /b config.settings+%MAKECMD%.defs+..\doc\emacs\makefile.w32-in ..\doc\emacs\makefile\r
+copy /b config.settings+%MAKECMD%.defs+..\doc\misc\makefile.w32-in ..\doc\misc\makefile\r
+copy /b config.settings+%MAKECMD%.defs+..\doc\lispref\makefile.w32-in ..\doc\lispref\makefile\r
+copy /b config.settings+%MAKECMD%.defs+..\doc\lispintro\makefile.w32-in ..\doc\lispintro\makefile\r
 if exist ..\lisp\makefile rm -f ../lisp/[Mm]akefile\r
 copy /b config.settings+%MAKECMD%.defs+..\lisp\makefile.w32-in ..\lisp\makefile\r
 rem   Use the default (no-op) Makefile.in if the nt version is not present.\r
@@ -539,8 +544,54 @@ copy subdirs.el ..\site-lisp\subdirs.el
 \r
 :dontUpdateSubdirs\r
 echo.\r
+\r
+rem check that we have all the libraries we need.\r
+set libsOK=1\r
+\r
+if not "(%HAVE_XPM%)" == "()" goto checkpng\r
+if (%xpmsupport%) == (N) goto checkpng\r
+ set libsOK=0\r
+ echo XPM support is missing. It is required for color icons in the toolbar.\r
+ echo   Install libXpm development files or use --without-xpm\r
+\r
+:checkpng\r
+if not "(%HAVE_PNG%)" == "()" goto checkjpeg\r
+if (%pngsupport%) == (N) goto checkjpeg\r
+ set libsOK=0\r
+ echo PNG support is missing.\r
+ echo   Install libpng development files or use --without-png\r
+\r
+:checkjpeg\r
+if not "(%HAVE_JPEG%)" == "()" goto checktiff\r
+if (%jpegsupport%) == (N) goto checktiff\r
+ set libsOK=0\r
+ echo JPEG support is missing.\r
+ echo   Install jpeg development files or use --without-jpeg\r
+\r
+:checktiff\r
+if not "(%HAVE_TIFF%)" == "()" goto checkgif\r
+if (%tiffsupport%) == (N) goto checkgif\r
+ set libsOK=0\r
+ echo TIFF support is missing.\r
+ echo   Install libtiff development files or use --without-tiff\r
+\r
+:checkgif\r
+if not "(%HAVE_GIF%)" == "()" goto donelibchecks\r
+if (%gifsupport%) == (N) goto donelibchecks\r
+ set libsOK=0\r
+ echo GIF support is missing.\r
+ echo   Install giflib or libungif development files or use --without-gif\r
+\r
+:donelibchecks\r
+if (%libsOK%) == (1) goto success\r
+echo.\r
+echo Important libraries are missing. Fix these issues before running make.\r
+goto end\r
+\r
+:success\r
 echo Emacs successfully configured.\r
 echo Emacs successfully configured. >>config.log\r
+if (%MAKECMD%) == (gmake) set MAKECMD=make\r
 echo Run `%MAKECMD%' to build, then run `%MAKECMD% install' to install.\r
 goto end\r
 \r
@@ -556,7 +607,9 @@ set nocygwin=
 set COMPILER=\r
 set MAKECMD=\r
 set usercflags=\r
+set docflags=\r
 set userldflags=\r
+set doldflags=\r
 set mingwflag=\r
 set mf=\r
 \r