aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-08-23 16:58:32 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2013-08-23 16:58:32 +0200
commit8f4d1086d4cd1e3196025f8a2c1586a4cf23ae6b (patch)
treefffc7542fa06caff3420a0cfbf19d0c6a6ded3ce
parentf239bfc2cffbefd075102b95205e582755ca9594 (diff)
downloadpingu-8f4d1086d4cd1e3196025f8a2c1586a4cf23ae6b.tar.bz2
pingu-8f4d1086d4cd1e3196025f8a2c1586a4cf23ae6b.tar.xz
configure: add --disable-doc flag
We now require asciidoc to be installed so we let manpages be optional
-rw-r--r--Makefile6
-rwxr-xr-xconfigure21
2 files changed, 26 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index aa0998a..64ee290 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,11 @@ PINGU_VERSION := $(shell \
export PINGU_VERSION
-SUBDIRS := src doc
+SUBDIRS := src
+
+ifdef ENABLE_DOC
+SUBDIRS += doc
+endif
all: $(SUBDIRS)
diff --git a/configure b/configure
index 714bc5a..a48f8bc 100755
--- a/configure
+++ b/configure
@@ -57,6 +57,7 @@ Optional features:
--enable-warnings build with recommended warnings flags [enabled]
--enable-werror build with -Werror [disabled]
--enable-lua build Lua client binding [disabled]
+ --disable-doc do not build manual pages [enabled]
--with-luapc=LUAPC build Lua client binding, using LUAPC pkg-config
package [disabled]
@@ -86,6 +87,7 @@ enable_debug=false
enable_warnings=true
enable_werror=false
enable_lua=false
+enable_doc=true
for arg; do
case "$arg" in
@@ -105,6 +107,8 @@ case "$arg" in
--disable-warnings) enable_warnings=false ;;
--enable-werror) enable_werror=true ;;
--disable-werror) enable_werror=false ;;
+--enable-doc) enable_doc=true ;;
+--disable-doc) enable_doc=false ;;
--with-luapc=*) with_luapc=${arg#*=};;
-* ) die "$0: unknown option $arg" ;;
CC=*) CC=${arg#*=} ;;
@@ -119,12 +123,20 @@ if $enable_debug; then
CFLAGS="$CFLAGS -g"
fi
+echo -n "Checking for -Wall: "
if $enable_warnings; then
CFLAGS="$CFLAGS -Wall"
+ echo "yes"
+else
+ echo "no"
fi
+echo -n "Checking for -Werror: "
if $enable_werror; then
CFLAGS="$CFLAGS -Werror"
+ echo "yes"
+else
+ echo "no"
fi
echo -n "Checking for Lua support: "
@@ -154,6 +166,14 @@ else
echo no
fi
+echo -n "Checking if documentation should be built: "
+if $enable_doc; then
+ echo "yes"
+ ENABLE_DOC=1
+else
+ echo "no"
+fi
+
# generate config.h
config_h_vars="
PACKAGE
@@ -194,6 +214,7 @@ mandir
LUAPC
CC
CFLAGS
+ENABLE_DOC
LDFLAGS
PACKAGE
PACKAGE_VERSION