From 19a0d4b6065735b884430e3c15160997606794f1 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 7 Jan 2009 16:36:14 +0100 Subject: Add --enable-server configure option. --- configure.ac | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index f979f8e4..bf5b9d5d 100644 --- a/configure.ac +++ b/configure.ac @@ -161,8 +161,23 @@ if test "$enable_docs" == "yes"; then fi AM_CONDITIONAL([BUILD_DOCS], [test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" == "xyesyesyesyes" -a "$enable_docs" != "no"]) -PKG_CHECK_MODULES([nss],[nss >= 3]) -PKG_CHECK_MODULES([nspr],[nspr >= 4]) +dnl Handle the option to build the server setup. +AC_ARG_ENABLE([server], + AS_HELP_STRING([--enble-server], + [enable building of stap-server/client (default on if nss etc. found).]), + [enable_server=$enableval], + [enable_server="check"]) +PKG_CHECK_MODULES([nss],[nss >= 3], have_nss=yes, have_nss=no) +PKG_CHECK_MODULES([nspr],[nspr >= 4], have_nspr=yes, have_nspr=no) +if test "x${have_nss}${have_nspr}" != "xyesyes"; then + if test "$enable_server" == "yes"; then + AC_MSG_ERROR([cannot find all libraries for stap-server]) + fi + if test "$enable_server" == "check"; then + AC_MSG_WARN([will not build stap-server, cannot find all libraries]) + fi +fi +AM_CONDITIONAL([BUILD_SERVER], [test "x${have_nss}${have_nspr}" == "xyesyes" -a "$enable_server" != "no"]) dnl Handle elfutils. If '--with-elfutils=DIR' wasn't specified, used dnl the system's elfutils. -- cgit From 2d4b8ddfb72206a2e0fc4b500e54602a1f6ba189 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 7 Jan 2009 16:44:02 +0100 Subject: Warn when not building docs because tools not found. --- configure.ac | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index bf5b9d5d..95be829e 100644 --- a/configure.ac +++ b/configure.ac @@ -154,10 +154,13 @@ AC_CHECK_PROG(have_latex, latex, yes, no) AC_CHECK_PROG(have_dvips, dvips, yes, no) AC_CHECK_PROG(have_ps2pdf, ps2pdf, yes, no) AC_CHECK_PROG(have_latex2html, latex2html, yes, no) -if test "$enable_docs" == "yes"; then - if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" != "xyesyesyesyes"; then +if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" != "xyesyesyesyes"; then + if test "$enable_docs" == "yes"; then AC_MSG_ERROR([cannot find all tools for building documentation]) fi + if test "$enable_docs" == "check"; then + AC_MSG_WARN([will not build documentation, cannot find all tools]) + fi fi AM_CONDITIONAL([BUILD_DOCS], [test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" == "xyesyesyesyes" -a "$enable_docs" != "no"]) -- cgit From 92aff3c7556ad0f968ff97d5755e4a6488eb80a8 Mon Sep 17 00:00:00 2001 From: Will Cohen Date: Wed, 7 Jan 2009 12:13:50 -0500 Subject: Check xmlto available and allow user to control generation of reference docs. --- configure.ac | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 95be829e..4cb2948a 100644 --- a/configure.ac +++ b/configure.ac @@ -145,6 +145,7 @@ AC_ARG_ENABLE([crash], AM_CONDITIONAL([BUILD_CRASHMOD], [test "$enable_crash" != "no"]) dnl Handle the option to build the documentation +building_docs="no" AC_ARG_ENABLE([docs], AS_HELP_STRING([--enable-docs], [enable building documentation (default on if latex etc. found).]), @@ -162,7 +163,31 @@ if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" != "xyesye AC_MSG_WARN([will not build documentation, cannot find all tools]) fi fi -AM_CONDITIONAL([BUILD_DOCS], [test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" == "xyesyesyesyes" -a "$enable_docs" != "no"]) +if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" == "xyesyesyesyes" -a "$enable_docs" != "no"; then + building_docs="yes" +fi +AM_CONDITIONAL([BUILD_DOCS], [test "$building_docs" == "yes"]) + +dnl Handle the option to build the reference documentation +building_refdocs="no" +AC_ARG_ENABLE([refdocs], + AS_HELP_STRING([--enable-refdocs], + [enable building reference documentation (default on if xmlto etc. found and other documentation built).]), + [enable_refdocs=$enableval], + [enable_refdocs="check"]) +if test "$building_docs" == "no" -a "$enable_refdocs" == "yes" ; then + AC_MSG_ERROR([must use --enable-docs with --enable-refdocs]) +fi +AC_CHECK_PROG(have_xmlto, xmlto, yes, no) +if test "$enable_refdocs" == "yes"; then + if test "x${have_xmlto}" != "xyes"; then + AC_MSG_ERROR([cannot find xmlto for building reference documentation]) + fi +fi +if test "x${have_xmlto}" == "xyes" -a "$enable_refdocs" != "no" -a "${building_docs}" == "yes"; then + building_refdocs="yes" +fi +AM_CONDITIONAL([BUILD_REFDOCS], [test "$building_refdocs" == "yes"]) dnl Handle the option to build the server setup. AC_ARG_ENABLE([server], -- cgit From aa5951be9f4f12139cdcec4a501754a62b88c28b Mon Sep 17 00:00:00 2001 From: Will Cohen Date: Thu, 8 Jan 2009 14:28:15 -0500 Subject: Check for xmlto that generates pdf. --- configure.ac | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 4cb2948a..7866fe96 100644 --- a/configure.ac +++ b/configure.ac @@ -179,12 +179,29 @@ if test "$building_docs" == "no" -a "$enable_refdocs" == "yes" ; then AC_MSG_ERROR([must use --enable-docs with --enable-refdocs]) fi AC_CHECK_PROG(have_xmlto, xmlto, yes, no) +if test "x${have_xmlto}" == "xyes"; then +AC_MSG_CHECKING([for xmlto pdf support]) +cat > conftest.$ac_ext << EOF + + + + +EOF + xmlto pdf conftest.$ac_ext >& /dev/null + if test $? == 0; then + have_xmlto_pdf="yes" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi +fi if test "$enable_refdocs" == "yes"; then - if test "x${have_xmlto}" != "xyes"; then - AC_MSG_ERROR([cannot find xmlto for building reference documentation]) + if test "x${have_xmlto}${have_xmlto_pdf}" != "xyesyes"; then + AC_MSG_ERROR([cannot find proper yxmlto for building reference documentation]) fi fi -if test "x${have_xmlto}" == "xyes" -a "$enable_refdocs" != "no" -a "${building_docs}" == "yes"; then +if test "x${have_xmlto}${have_xmlto_pdf}" == "xyesyes" -a "$enable_refdocs" != "no" -a "${building_docs}" == "yes"; then building_refdocs="yes" fi AM_CONDITIONAL([BUILD_REFDOCS], [test "$building_refdocs" == "yes"]) -- cgit