summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-05-26 22:18:27 +0000
committerAlan Conway <aconway@apache.org>2008-05-26 22:18:27 +0000
commit2713155352d200a0c7fdcdda07ac1154776f4b93 (patch)
tree033e0ffb89936787128637f98eecc132f71b2923 /cpp
parent42bac9eab5cc800807a3fa2d8e6c30d5888b209e (diff)
downloadqpid-python-2713155352d200a0c7fdcdda07ac1154776f4b93.tar.gz
Make help2man and doxygen dependencies optional.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@660324 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/configure.ac27
-rw-r--r--cpp/docs/api/Makefile.am4
-rw-r--r--cpp/docs/man/Makefile.am6
3 files changed, 34 insertions, 3 deletions
diff --git a/cpp/configure.ac b/cpp/configure.ac
index fe99135bea..1ee777946f 100644
--- a/cpp/configure.ac
+++ b/cpp/configure.ac
@@ -24,15 +24,36 @@ AC_PROG_CXX
AC_USE_SYSTEM_EXTENSIONS
AC_LANG([C++])
-# AM_MISSING_PROG([HELP2MAN], [help2man])
+# Check for optional use of help2man
AC_CHECK_PROG([HELP2MAN], [help2man], [help2man])
-test -z "$HELP2MAN" && AC_MSG_ERROR([Missing help2man installation (try "yum install help2man").])
+AC_ARG_WITH([help2man],
+ [AS_HELP_STRING([--with-help2man], [Use help2man to generate man pages.])],
+ [case "$withval" in
+ yes) test -z "$HELP2MAN" && AC_MSG_ERROR([help2man not found.]) ;;
+ no) HELP2MAN="" ;;
+ *) AC_MSG_ERROR([Bad value ${withval} for --with-help2man.]) ;;
+ esac])
+AM_CONDITIONAL([HAVE_HELP2MAN], [test -n "$HELP2MAN"])
+
+# Check for optional use of doxygen
+AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen])
+AC_ARG_WITH([doxygen],
+ [AS_HELP_STRING([--with-doxygen], [Use doxygen to generate API documentation.])],
+ [case "$withval" in
+ yes) test -z "$DOXYGEN" && AC_MSG_ERROR([doxygen not found.]) ;;
+ no) DOXYGEN="" ;;
+ *) AC_MSG_ERROR([Bad value ${withval} for --with-doxygen.]) ;;
+ esac])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
+
+# Check for use of CPG
+AM_CONDITIONAL([CPG], [test x$with_CPG = xyes])
AC_ARG_ENABLE(warnings,
[ --enable-warnings turn on lots of compiler warnings (recommended)],
[case "${enableval}" in
yes|no) ;;
- *) AC_MSG_ERROR([bad value ${enableval} for warnings option]) ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for warnings option]) ;;
esac],
[enableval=yes])
diff --git a/cpp/docs/api/Makefile.am b/cpp/docs/api/Makefile.am
index bde8b5fa3d..3b9c7648e0 100644
--- a/cpp/docs/api/Makefile.am
+++ b/cpp/docs/api/Makefile.am
@@ -6,6 +6,8 @@
# TODO aconway 2007-04-12: html should have a
# dependency on source/header files.
+if HAVE_DOXYGEN
+
EXTRA_DIST = html user.doxygen developer.doxygen html.timestamp
html: html.timestamp
@@ -16,3 +18,5 @@ html.timestamp:
clean-local:
rm -rf html html-dev html.timestamp
+
+endif
diff --git a/cpp/docs/man/Makefile.am b/cpp/docs/man/Makefile.am
index c8df4eab6a..efc690050c 100644
--- a/cpp/docs/man/Makefile.am
+++ b/cpp/docs/man/Makefile.am
@@ -1,3 +1,5 @@
+if HAVE_HELP2MAN
+
dist_man_MANS = qpidd.1
man_aux = $(dist_man_MANS:.1=.x)
@@ -18,3 +20,7 @@ SUFFIXES = .x .1
$(HELP2MAN) --no-info --include=$(srcdir)/$*.x --output=$@-t ../../src/$*
@chmod a-w $@-t
@mv $@-t $@
+
+CLEANFILES=qpidd.1
+
+endif