X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/37cc095b6a175fb5a2fb18fa029eaf3aa3b3fa53..109cfe4e37961ae82c00aa0cc56a7fafff3b832a:/nt/configure.bat diff --git a/nt/configure.bat b/nt/configure.bat index 373318d04a..87b02de0e9 100755 --- a/nt/configure.bat +++ b/nt/configure.bat @@ -2,7 +2,7 @@ rem ---------------------------------------------------------------------- rem Configuration script for MS Windows 95/98/Me and NT/2000/XP rem Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, -rem 2006, 2007 Free Software Foundation, Inc. +rem 2006, 2007, 2008 Free Software Foundation, Inc. rem This file is part of GNU Emacs. @@ -84,9 +84,12 @@ set noopt=N set nocygwin=N set COMPILER= set usercflags= +set docflags= set userldflags= +set doldflags= set sep1= set sep2= +set usefontbackend=Y rem ---------------------------------------------------------------------- rem Handle arguments. @@ -106,6 +109,7 @@ if "%1" == "--without-jpeg" goto withoutjpeg if "%1" == "--without-gif" goto withoutgif if "%1" == "--without-tiff" goto withouttiff if "%1" == "--without-xpm" goto withoutxpm +if "%1" == "--disable-font-backend" goto withoutfont if "%1" == "" goto checkutils :usage echo Usage: configure [options] @@ -118,11 +122,12 @@ echo. --no-opt disable optimization echo. --no-cygwin use -mno-cygwin option with GCC echo. --cflags FLAG pass FLAG to compiler echo. --ldflags FLAG pass FLAG to compiler when linking -echo. --without-png do not use libpng -echo. --without-jpeg do not use jpeg-6b -echo. --without-gif do not use giflib or libungif -echo. --without-tiff do not use libtiff -echo. --without-xpm do not use libXpm +echo. --without-png do not use PNG library even if it is installed +echo. --without-jpeg do not use JPEG library even if it is installed +echo. --without-gif do not use GIF library even if it is installed +echo. --without-tiff do not use TIFF library even if it is installed +echo. --without-xpm do not use XPM library even if it is installed +echo. --disable-font-backend build without font backend support goto end rem ---------------------------------------------------------------------- :setprefix @@ -209,6 +214,11 @@ set HAVE_XPM= shift goto again +:withoutfont +set usefontbackend=N +shift +goto again + rem ---------------------------------------------------------------------- rem Check that necessary utilities (cp and rm) are present. :checkutils @@ -233,22 +243,23 @@ rem Auto-detect compiler if not specified, and validate GCC if chosen. if (%COMPILER%)==(cl) goto compilercheckdone if (%COMPILER%)==(gcc) goto checkgcc -echo Checking whether 'cl' is available... +echo Checking whether 'gcc' is available... echo main(){} >junk.c +gcc -c junk.c +if exist junk.o goto checkgcc + +echo Checking whether 'cl' is available... cl -nologo -c junk.c if exist junk.obj goto clOK - -echo Checking whether 'gcc' is available... -gcc -c junk.c -if not exist junk.o goto nocompiler -del junk.o +goto nocompiler :checkgcc +if exist junk.o del junk.o Rem WARNING -- COMMAND.COM on some systems only looks at the first Rem 8 characters of a label. So do NOT be tempted to change Rem chkapi* into something fancier like checkw32api Rem You HAVE been warned! -if (%nocygwin%) == (Y) goto chkapi +if (%nocygwin%) == (Y) goto chkapiN echo Checking whether gcc requires '-mno-cygwin'... echo #include "cygwin/version.h" >junk.c echo main(){} >>junk.c @@ -258,11 +269,12 @@ if not exist junk.o goto chkapi echo gcc -mno-cygwin -c junk.c >>config.log gcc -mno-cygwin -c junk.c >>config.log 2>&1 if exist junk.o set nocygwin=Y -rm -f junk.c junk.o :chkapi echo The failed program was: >>config.log type junk.c >>config.log +:chkapiN +rm -f junk.c junk.o rem ---------------------------------------------------------------------- rem Older versions of the Windows API headers either don't have any of rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1 @@ -473,16 +485,21 @@ if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings if (%noopt%) == (Y) echo NOOPT=1 >>config.settings if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings -if not "(%usercflags%)" == "()" echo USER_CFLAGS=%usercflags%>>config.settings -if not "(%userldflags%)" == "()" echo USER_LDFLAGS=%userldflags%>>config.settings +rem We go thru docflags because usercflags could be "-DFOO=bar" -something +rem and the if command cannot cope with this +for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y +if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags%>>config.settings +for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y +if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags%>>config.settings +if (%usefontbackend%) == (Y) echo USE_FONTBACKEND=1 >>config.settings echo # End of settings from configure.bat>>config.settings echo. >>config.settings copy config.nt config.tmp echo. >>config.tmp echo /* Start of settings from configure.bat. */ >>config.tmp -if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>config.tmp -if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>config.tmp +if (%docflags%) == (Y) echo #define USER_CFLAGS " %usercflags%">>config.tmp +if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %userldflags%">>config.tmp if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp @@ -507,11 +524,13 @@ copy paths.h ..\src\epaths.h :dontCopy if exist config.tmp del config.tmp copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile +if exist ..\admin\unidata copy /b config.settings+%MAKECMD%.defs+..\admin\unidata\makefile.w32-in ..\admin\unidata\makefile copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile -copy /b config.settings+%MAKECMD%.defs+..\man\makefile.w32-in ..\man\makefile -copy /b config.settings+%MAKECMD%.defs+..\lispref\makefile.w32-in ..\lispref\makefile -copy /b config.settings+%MAKECMD%.defs+..\lispintro\makefile.w32-in ..\lispintro\makefile +copy /b config.settings+%MAKECMD%.defs+..\doc\emacs\makefile.w32-in ..\doc\emacs\makefile +copy /b config.settings+%MAKECMD%.defs+..\doc\misc\makefile.w32-in ..\doc\misc\makefile +copy /b config.settings+%MAKECMD%.defs+..\doc\lispref\makefile.w32-in ..\doc\lispref\makefile +copy /b config.settings+%MAKECMD%.defs+..\doc\lispintro\makefile.w32-in ..\doc\lispintro\makefile if exist ..\lisp\makefile rm -f ../lisp/[Mm]akefile copy /b config.settings+%MAKECMD%.defs+..\lisp\makefile.w32-in ..\lisp\makefile rem Use the default (no-op) Makefile.in if the nt version is not present. @@ -595,7 +614,9 @@ set nocygwin= set COMPILER= set MAKECMD= set usercflags= +set docflags= set userldflags= +set doldflags= set mingwflag= set mf=