summaryrefslogtreecommitdiff
path: root/buildconf.bat
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2015-08-09 17:09:49 +0100
committerSteve Holme <steve_holme@hotmail.com>2015-08-09 17:12:33 +0100
commitaa9ead36a4c5077038a6dbe8971bbaaae4520ae7 (patch)
tree5938b94189cce4b0c16f7c552e262f5733d803a8 /buildconf.bat
parentecece2cfb5c75c8e4c77d8529a6ef2214445752b (diff)
downloadgnurl-aa9ead36a4c5077038a6dbe8971bbaaae4520ae7.tar.gz
gnurl-aa9ead36a4c5077038a6dbe8971bbaaae4520ae7.tar.bz2
gnurl-aa9ead36a4c5077038a6dbe8971bbaaae4520ae7.zip
buildconf.bat: Added detection of groff, nroff, perl and gzip
To allow for the full generation of tool_hugehelp.c added detection of the required programs - based on code from generate.bat.
Diffstat (limited to 'buildconf.bat')
-rw-r--r--buildconf.bat16
1 files changed, 16 insertions, 0 deletions
diff --git a/buildconf.bat b/buildconf.bat
index 09c4db60c..78c738a40 100644
--- a/buildconf.bat
+++ b/buildconf.bat
@@ -40,6 +40,18 @@ rem snapshot archives.
rem Check we are running from a curl git repository
if not exist GIT-INFO goto norepo
+ rem Detect programs. HAVE_<PROGNAME>
+ rem When not found the variable is set undefined. The undefined pattern
+ rem allows for statements like "if not defined HAVE_PERL (command)"
+ groff --version <NUL 1>NUL 2>&1
+ if errorlevel 1 (set HAVE_GROFF=) else (set HAVE_GROFF=Y)
+ nroff --version <NUL 1>NUL 2>&1
+ if errorlevel 1 (set HAVE_NROFF=) else (set HAVE_NROFF=Y)
+ perl --version <NUL 1>NUL 2>&1
+ if errorlevel 1 (set HAVE_PERL=) else (set HAVE_PERL=Y)
+ gzip --version <NUL 1>NUL 2>&1
+ if errorlevel 1 (set HAVE_GZIP=) else (set HAVE_GZIP=Y)
+
:parseArgs
if "%~1" == "" goto start
@@ -167,6 +179,10 @@ rem Windows 9x as setlocal isn't available until Windows NT
rem
:dosCleanup
set MODE=
+ set HAVE_GROFF=
+ set HAVE_NROFF=
+ set HAVE_PERL=
+ set HAVE_GZIP=
exit /B