(deactivate-mark): When the mark is temporarily
[bpt/emacs.git] / nt / configure.bat
index 9c97f17..87b02de 100755 (executable)
@@ -2,13 +2,13 @@
 rem   ----------------------------------------------------------------------\r
 rem   Configuration script for MS Windows 95/98/Me and NT/2000/XP\r
 rem   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005,\r
 rem   ----------------------------------------------------------------------\r
 rem   Configuration script for MS Windows 95/98/Me and NT/2000/XP\r
 rem   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005,\r
-rem      2006, 2007 Free Software Foundation, Inc.\r
+rem      2006, 2007, 2008 Free Software Foundation, Inc.\r
 \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   it under the terms of the GNU General Public License as published by\r
 \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   it under the terms of the GNU General Public License as published by\r
-rem   the Free Software Foundation; either version 2, or (at your option)\r
+rem   the Free Software Foundation; either version 3, or (at your option)\r
 rem   any later version.\r
 \r
 rem   GNU Emacs is distributed in the hope that it will be useful,\r
 rem   any later version.\r
 \r
 rem   GNU Emacs is distributed in the hope that it will be useful,\r
@@ -84,9 +84,12 @@ set noopt=N
 set nocygwin=N\r
 set COMPILER=\r
 set usercflags=\r
 set nocygwin=N\r
 set COMPILER=\r
 set usercflags=\r
+set docflags=\r
 set userldflags=\r
 set userldflags=\r
+set doldflags=\r
 set sep1=\r
 set sep2=\r
 set sep1=\r
 set sep2=\r
+set usefontbackend=Y\r
 \r
 rem ----------------------------------------------------------------------\r
 rem   Handle arguments.\r
 \r
 rem ----------------------------------------------------------------------\r
 rem   Handle arguments.\r
@@ -106,6 +109,7 @@ if "%1" == "--without-jpeg" goto withoutjpeg
 if "%1" == "--without-gif" goto withoutgif\r
 if "%1" == "--without-tiff" goto withouttiff\r
 if "%1" == "--without-xpm" goto withoutxpm\r
 if "%1" == "--without-gif" goto withoutgif\r
 if "%1" == "--without-tiff" goto withouttiff\r
 if "%1" == "--without-xpm" goto withoutxpm\r
+if "%1" == "--disable-font-backend" goto withoutfont\r
 if "%1" == "" goto checkutils\r
 :usage\r
 echo Usage: configure [options]\r
 if "%1" == "" goto checkutils\r
 :usage\r
 echo Usage: configure [options]\r
@@ -118,11 +122,12 @@ 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.   --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\r
-echo.   --without-jpeg          do not use jpeg-6b\r
-echo.   --without-gif           do not use giflib or libungif\r
-echo.   --without-tiff          do not use libtiff\r
-echo.   --without-xpm           do not use libXpm\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
+echo.   --disable-font-backend  build without font backend support\r
 goto end\r
 rem ----------------------------------------------------------------------\r
 :setprefix\r
 goto end\r
 rem ----------------------------------------------------------------------\r
 :setprefix\r
@@ -209,6 +214,11 @@ set HAVE_XPM=
 shift\r
 goto again\r
 \r
 shift\r
 goto again\r
 \r
+:withoutfont\r
+set usefontbackend=N\r
+shift\r
+goto again\r
+\r
 rem ----------------------------------------------------------------------\r
 rem    Check that necessary utilities (cp and rm) are present.\r
 :checkutils\r
 rem ----------------------------------------------------------------------\r
 rem    Check that necessary utilities (cp and rm) are present.\r
 :checkutils\r
@@ -233,22 +243,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
 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
 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
 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
 \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
 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
 echo Checking whether gcc requires '-mno-cygwin'...\r
 echo #include "cygwin/version.h" >junk.c\r
 echo main(){} >>junk.c\r
@@ -258,11 +269,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
 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
 \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
 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
@@ -473,16 +485,21 @@ if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings
 if (%noopt%) == (Y) echo NOOPT=1 >>config.settings\r
 if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings\r
 if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings\r
 if (%noopt%) == (Y) echo NOOPT=1 >>config.settings\r
 if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings\r
 if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings\r
-if not "(%usercflags%)" == "()" echo USER_CFLAGS=%usercflags%>>config.settings\r
-if not "(%userldflags%)" == "()" echo USER_LDFLAGS=%userldflags%>>config.settings\r
+rem We go thru docflags because usercflags could be "-DFOO=bar" -something\r
+rem and the if command cannot cope with this\r
+for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y\r
+if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags%>>config.settings\r
+for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y\r
+if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags%>>config.settings\r
+if (%usefontbackend%) == (Y) echo USE_FONTBACKEND=1 >>config.settings\r
 echo # End of settings from configure.bat>>config.settings\r
 echo. >>config.settings\r
 \r
 copy config.nt config.tmp\r
 echo. >>config.tmp\r
 echo /* Start of settings from configure.bat.  */ >>config.tmp\r
 echo # End of settings from configure.bat>>config.settings\r
 echo. >>config.settings\r
 \r
 copy config.nt config.tmp\r
 echo. >>config.tmp\r
 echo /* Start of settings from configure.bat.  */ >>config.tmp\r
-if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>config.tmp\r
-if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>config.tmp\r
+if (%docflags%) == (Y) echo #define USER_CFLAGS " %usercflags%">>config.tmp\r
+if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %userldflags%">>config.tmp\r
 if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp\r
 if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp\r
 if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp\r
 if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp\r
 if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp\r
 if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp\r
@@ -507,11 +524,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
 :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+..\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
 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
@@ -595,7 +614,9 @@ set nocygwin=
 set COMPILER=\r
 set MAKECMD=\r
 set usercflags=\r
 set COMPILER=\r
 set MAKECMD=\r
 set usercflags=\r
+set docflags=\r
 set userldflags=\r
 set userldflags=\r
+set doldflags=\r
 set mingwflag=\r
 set mf=\r
 \r
 set mingwflag=\r
 set mf=\r
 \r