=== modified file 'ChangeLog' --- ChangeLog 2011-05-06 07:13:19 +0000 +++ ChangeLog 2011-05-07 19:56:48 +0000 @@ -1,3 +1,8 @@ +2011-05-07 Christoph Scholtes + + * lib/makefile.w32-in: If sed is available build `getopt._h' as + part of bootstrap. + 2011-05-06 Paul Eggert Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux. === modified file 'lib/makefile.w32-in' --- lib/makefile.w32-in 2011-04-06 16:05:49 +0000 +++ lib/makefile.w32-in 2011-05-07 19:42:57 +0000 @@ -157,7 +157,11 @@ doit: getopt_.h: getopt.in.h $(ARG_NONNULL_H) +ifdef HAVE_SED + $(MAKE) $(MFLAGS) getopt_h +else $(MAKE) $(MFLAGS) getopt_.h-$(SHELLTYPE) +endif getopt_.h-CMD: doit @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h. === modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-05-07 04:00:12 +0000 +++ nt/ChangeLog 2011-05-07 19:55:07 +0000 @@ -1,3 +1,7 @@ +2011-05-07 Christoph Scholtes + + * configure.bat: Check if sed is available on system. + 2011-05-07 Ben Key * configure.bat: Renamed the fusercflags variable to escusercflags === modified file 'nt/configure.bat' --- nt/configure.bat 2011-05-07 04:00:12 +0000 +++ nt/configure.bat 2011-05-07 19:38:54 +0000 @@ -356,7 +356,7 @@ echo Checking for 'rm'... rm junk.bat if exist junk.bat goto needrm -goto checkcompiler +goto checkmaintutils :needcp echo You need 'cp' (the Unix file copy program) to build Emacs. @@ -368,6 +368,34 @@ goto end rem ---------------------------------------------------------------------- +rem Check if maintainer tools are present (optional). + +:checkmaintutils + +rem Checking for sed requires command extensions, if not available skip +if "%use_extensions%" == "1" goto :checksed +goto checkcompiler + +:checksed +echo Checking for 'sed' (optional)... +set junk=junk +for /f "tokens=*" %%a in ( +'"echo foo | sed -e s/foo/bar/g"' +) do ( +set junk=%%a +) +if not %junk% == bar goto donthavesed + +set havesed=Y +set junk= +goto checkcompiler + +:donthavesed +set junk= +set havesed= +goto checkcompiler + +rem ---------------------------------------------------------------------- rem Auto-detect compiler if not specified, and validate GCC if chosen. :checkcompiler @@ -735,6 +763,7 @@ if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings if not "(%distfiles%)" == "()" echo DIST_FILES=%distfiles%>>config.settings +if (%havesed%) == (Y) echo HAVE_SED=1 >>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 @@ -894,6 +923,7 @@ set distfiles= set HAVE_DISTFILES= set distFilesOk= +set havesed= set pngsupport= set tlssupport= set jpegsupport=