if "%1" == "--without-gif" goto withoutgif\r
if "%1" == "--without-tiff" goto withouttiff\r
if "%1" == "--without-xpm" goto withoutxpm\r
+if "%1" == "--with-svg" goto withsvg\r
if "%1" == "" goto checkutils\r
:usage\r
echo Usage: configure [options]\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. --with-svg use the RSVG library (experimental)\r
goto end\r
rem ----------------------------------------------------------------------\r
:setprefix\r
shift\r
goto again\r
\r
+:withsvg\r
+shift\r
+set svgsupport=Y\r
+goto again\r
+\r
rem ----------------------------------------------------------------------\r
rem Check that necessary utilities (cp and rm) are present.\r
:checkutils\r
set HAVE_XPM=1\r
\r
:xpmDone\r
+rm -f junk.c junk.obj\r
+\r
+if not (%svgsupport%) == (Y) goto :svgDone\r
+echo Checking for librsvg...\r
+echo #include "librsvg/rsvg.h" >junk.c\r
+echo main (){} >>junk.c\r
+rem -o option is ignored with cl, but allows result to be consistent.\r
+echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log\r
+%COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log\r
+if exist junk.obj goto haveSvg\r
+\r
+echo ...librsvg/rsvg.h or dependencies not found, building without SVG support.\r
+echo The failed program was: >>config.log\r
+type junk.c >>config.log\r
+set HAVE_RSVG=\r
+goto :svgDone\r
+\r
+:haveSvg\r
+echo ...librsvg header available, building with SVG support (EXPERIMENTAL).\r
+set HAVE_RSVG=1\r
+\r
+:svgDone\r
rm -f junk.c junk.obj junk.err junk.out\r
\r
rem ----------------------------------------------------------------------\r
if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp\r
if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>config.tmp\r
if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM 1 >>config.tmp\r
+if "(%HAVE_RSVG%)" == "(1)" echo #define HAVE_RSVG 1 >>config.tmp\r
+\r
echo /* End of settings from configure.bat. */ >>config.tmp\r
\r
Rem See if fc.exe returns a meaningful exit status. If it does, we\r