Merge from emacs--devo--0
[bpt/emacs.git] / nt / configure.bat
index 123da0b..3979065 100755 (executable)
@@ -119,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 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.   --enable-font-backend   build with font backend support\r
 goto end\r
 rem ----------------------------------------------------------------------\r
@@ -542,6 +542,51 @@ 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
 echo Run `%MAKECMD%' to build, then run `%MAKECMD% install' to install.\r