From dd5336992f9909002e4af343a7baffd6ca015da6 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 6 Jul 2015 17:15:15 -0700 Subject: [PATCH 1/4] m4/ax_python.m4: remove This file is no longer needed since commit db13843 which copied it to doc/ subdir and removed the call to AX_PYTHON from configure.ac. That commit should have moved it rather than copied, let's fix it. Signed-off-by: Kir Kolyshkin --- m4/ax_python.m4 | 97 ------------------------------------------------- 1 file changed, 97 deletions(-) delete mode 100644 m4/ax_python.m4 diff --git a/m4/ax_python.m4 b/m4/ax_python.m4 deleted file mode 100644 index 1bc9d8a..0000000 --- a/m4/ax_python.m4 +++ /dev/null @@ -1,97 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_python.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PYTHON -# -# DESCRIPTION -# -# This macro does a complete Python development environment check. -# -# It recurses through several python versions (from 2.1 to 2.6 in this -# version), looking for an executable. When it finds an executable, it -# looks to find the header files and library. -# -# It sets PYTHON_BIN to the name of the python executable, -# PYTHON_INCLUDE_DIR to the directory holding the header files, and -# PYTHON_LIB to the name of the Python library. -# -# This macro calls AC_SUBST on PYTHON_BIN (via AC_CHECK_PROG), -# PYTHON_INCLUDE_DIR and PYTHON_LIB. -# -# LICENSE -# -# Copyright (c) 2008 Michael Tindal -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 9 - -AC_DEFUN([AX_PYTHON], -[AC_MSG_CHECKING(for python build information) -AC_MSG_RESULT([]) -for python in python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do -AC_CHECK_PROGS(PYTHON_BIN, [$python]) -ax_python_bin=$PYTHON_BIN -if test x$ax_python_bin != x; then - AC_CHECK_LIB($ax_python_bin, main, ax_python_lib=$ax_python_bin, ax_python_lib=no) - AC_CHECK_HEADER([$ax_python_bin/Python.h], - [[ax_python_header=`locate $ax_python_bin/Python.h | sed -e s,/Python.h,,`]], - ax_python_header=no) - if test $ax_python_lib != no; then - if test $ax_python_header != no; then - break; - fi - fi -fi -done -if test x$ax_python_bin = x; then - ax_python_bin=no -fi -if test x$ax_python_header = x; then - ax_python_header=no -fi -if test x$ax_python_lib = x; then - ax_python_lib=no -fi - -AC_MSG_RESULT([ results of the Python check:]) -AC_MSG_RESULT([ Binary: $ax_python_bin]) -AC_MSG_RESULT([ Library: $ax_python_lib]) -AC_MSG_RESULT([ Include Dir: $ax_python_header]) - -if test x$ax_python_header != xno; then - PYTHON_INCLUDE_DIR=$ax_python_header - AC_SUBST(PYTHON_INCLUDE_DIR) -fi -if test x$ax_python_lib != xno; then - PYTHON_LIB=$ax_python_lib - AC_SUBST(PYTHON_LIB) -fi -])dnl From d95915c9ceb2eb5f27abe50c222c4ccf27fa5dff Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 6 Jul 2015 17:25:14 -0700 Subject: [PATCH 2/4] m4/ax*.m4: remove These files, as well as the proper configure.ac calls, were added by commit f443be6, but the calls were later removed by commit b4b853e, so these are no longer needed. Signed-off-by: Kir Kolyshkin --- m4/ax_pkg_swig.m4 | 135 ------------------ m4/ax_python_devel.m4 | 325 ------------------------------------------ m4/ax_swig_python.m4 | 64 --------- 3 files changed, 524 deletions(-) delete mode 100644 m4/ax_pkg_swig.m4 delete mode 100644 m4/ax_python_devel.m4 delete mode 100644 m4/ax_swig_python.m4 diff --git a/m4/ax_pkg_swig.m4 b/m4/ax_pkg_swig.m4 deleted file mode 100644 index e112f3d..0000000 --- a/m4/ax_pkg_swig.m4 +++ /dev/null @@ -1,135 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PKG_SWIG([major.minor.micro], [action-if-found], [action-if-not-found]) -# -# DESCRIPTION -# -# This macro searches for a SWIG installation on your system. If found, -# then SWIG is AC_SUBST'd; if not found, then $SWIG is empty. If SWIG is -# found, then SWIG_LIB is set to the SWIG library path, and AC_SUBST'd. -# -# You can use the optional first argument to check if the version of the -# available SWIG is greater than or equal to the value of the argument. It -# should have the format: N[.N[.N]] (N is a number between 0 and 999. Only -# the first N is mandatory.) If the version argument is given (e.g. -# 1.3.17), AX_PKG_SWIG checks that the swig package is this version number -# or higher. -# -# As usual, action-if-found is executed if SWIG is found, otherwise -# action-if-not-found is executed. -# -# In configure.in, use as: -# -# AX_PKG_SWIG(1.3.17, [], [ AC_MSG_ERROR([SWIG is required to build..]) ]) -# AX_SWIG_ENABLE_CXX -# AX_SWIG_MULTI_MODULE_SUPPORT -# AX_SWIG_PYTHON -# -# LICENSE -# -# Copyright (c) 2008 Sebastian Huber -# Copyright (c) 2008 Alan W. Irwin -# Copyright (c) 2008 Rafael Laboissiere -# Copyright (c) 2008 Andrew Collier -# Copyright (c) 2011 Murray Cumming -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 8 - -AC_DEFUN([AX_PKG_SWIG],[ - # Ubuntu has swig 2.0 as /usr/bin/swig2.0 - AC_PATH_PROGS([SWIG],[swig swig2.0]) - if test -z "$SWIG" ; then - m4_ifval([$3],[$3],[:]) - elif test -n "$1" ; then - AC_MSG_CHECKING([SWIG version]) - [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] - AC_MSG_RESULT([$swig_version]) - if test -n "$swig_version" ; then - # Calculate the required version number components - [required=$1] - [required_major=`echo $required | sed 's/[^0-9].*//'`] - if test -z "$required_major" ; then - [required_major=0] - fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] - [required_minor=`echo $required | sed 's/[^0-9].*//'`] - if test -z "$required_minor" ; then - [required_minor=0] - fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] - [required_patch=`echo $required | sed 's/[^0-9].*//'`] - if test -z "$required_patch" ; then - [required_patch=0] - fi - # Calculate the available version number components - [available=$swig_version] - [available_major=`echo $available | sed 's/[^0-9].*//'`] - if test -z "$available_major" ; then - [available_major=0] - fi - [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] - [available_minor=`echo $available | sed 's/[^0-9].*//'`] - if test -z "$available_minor" ; then - [available_minor=0] - fi - [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] - [available_patch=`echo $available | sed 's/[^0-9].*//'`] - if test -z "$available_patch" ; then - [available_patch=0] - fi - # Convert the version tuple into a single number for easier comparison. - # Using base 100 should be safe since SWIG internally uses BCD values - # to encode its version number. - required_swig_vernum=`expr $required_major \* 10000 \ - \+ $required_minor \* 100 \+ $required_patch` - available_swig_vernum=`expr $available_major \* 10000 \ - \+ $available_minor \* 100 \+ $available_patch` - - if test $available_swig_vernum -lt $required_swig_vernum; then - AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version.]) - SWIG='' - m4_ifval([$3],[$3],[]) - else - AC_MSG_CHECKING([for SWIG library]) - SWIG_LIB=`$SWIG -swiglib` - AC_MSG_RESULT([$SWIG_LIB]) - m4_ifval([$2],[$2],[]) - fi - else - AC_MSG_WARN([cannot determine SWIG version]) - SWIG='' - m4_ifval([$3],[$3],[]) - fi - fi - AC_SUBST([SWIG_LIB]) -]) diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4 deleted file mode 100644 index a62b860..0000000 --- a/m4/ax_python_devel.m4 +++ /dev/null @@ -1,325 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_python_devel.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PYTHON_DEVEL([version]) -# -# DESCRIPTION -# -# Note: Defines as a precious variable "PYTHON_VERSION". Don't override it -# in your configure.ac. -# -# This macro checks for Python and tries to get the include path to -# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS) -# output variables. It also exports $(PYTHON_EXTRA_LIBS) and -# $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code. -# -# You can search for some particular version of Python by passing a -# parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please -# note that you *have* to pass also an operator along with the version to -# match, and pay special attention to the single quotes surrounding the -# version number. Don't use "PYTHON_VERSION" for this: that environment -# variable is declared as precious and thus reserved for the end-user. -# -# This macro should work for all versions of Python >= 2.1.0. As an end -# user, you can disable the check for the python version by setting the -# PYTHON_NOVERSIONCHECK environment variable to something else than the -# empty string. -# -# If you need to use this macro for an older Python version, please -# contact the authors. We're always open for feedback. -# -# LICENSE -# -# Copyright (c) 2009 Sebastian Huber -# Copyright (c) 2009 Alan W. Irwin -# Copyright (c) 2009 Rafael Laboissiere -# Copyright (c) 2009 Andrew Collier -# Copyright (c) 2009 Matteo Settenvini -# Copyright (c) 2009 Horst Knorr -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 8 - -AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL]) -AC_DEFUN([AX_PYTHON_DEVEL],[ - # - # Allow the use of a (user set) custom python version - # - AC_ARG_VAR([PYTHON_VERSION],[The installed Python - version to use, for example '2.3'. This string - will be appended to the Python interpreter - canonical name.]) - - AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]]) - if test -z "$PYTHON"; then - AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path]) - PYTHON_VERSION="" - fi - - # - # Check for a version of Python >= 2.1.0 - # - AC_MSG_CHECKING([for a version of Python >= '2.1.0']) - ac_supports_python_ver=`$PYTHON -c "import sys; \ - ver = sys.version.split ()[[0]]; \ - print (ver >= '2.1.0')"` - if test "$ac_supports_python_ver" != "True"; then - if test -z "$PYTHON_NOVERSIONCHECK"; then - AC_MSG_RESULT([no]) - AC_MSG_FAILURE([ -This version of the AC@&t@_PYTHON_DEVEL macro -doesn't work properly with versions of Python before -2.1.0. You may need to re-run configure, setting the -variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, -PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. -Moreover, to disable this check, set PYTHON_NOVERSIONCHECK -to something else than an empty string. -]) - else - AC_MSG_RESULT([skip at user request]) - fi - else - AC_MSG_RESULT([yes]) - fi - - # - # if the macro parameter ``version'' is set, honour it - # - if test -n "$1"; then - AC_MSG_CHECKING([for a version of Python $1]) - ac_supports_python_ver=`$PYTHON -c "import sys; \ - ver = sys.version.split ()[[0]]; \ - print (ver $1)"` - if test "$ac_supports_python_ver" = "True"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - AC_MSG_ERROR([this package requires Python $1. -If you have it installed, but it isn't the default Python -interpreter in your system path, please pass the PYTHON_VERSION -variable to configure. See ``configure --help'' for reference. -]) - PYTHON_VERSION="" - fi - fi - - # - # Check if you have distutils, else fail - # - AC_MSG_CHECKING([for the distutils Python package]) - ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` - if test -z "$ac_distutils_result"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - AC_MSG_ERROR([cannot import Python module "distutils". -Please check your Python installation. The error was: -$ac_distutils_result]) - PYTHON_VERSION="" - fi - - # - # Check for Python include path - # - AC_MSG_CHECKING([for Python include path]) - if test -z "$PYTHON_CPPFLAGS"; then - python_path=`$PYTHON -c "import distutils.sysconfig; \ - print (distutils.sysconfig.get_python_inc ());"` - if test -n "${python_path}"; then - python_path="-I$python_path" - fi - PYTHON_CPPFLAGS=$python_path - fi - AC_MSG_RESULT([$PYTHON_CPPFLAGS]) - AC_SUBST([PYTHON_CPPFLAGS]) - - # - # Check for Python library path - # - AC_MSG_CHECKING([for Python library path]) - if test -z "$PYTHON_LDFLAGS"; then - # (makes two attempts to ensure we've got a version number - # from the interpreter) - ac_python_version=`cat<]], - [[Py_Initialize();]]) - ],[pythonexists=yes],[pythonexists=no]) - AC_LANG_POP([C]) - # turn back to default flags - CPPFLAGS="$ac_save_CPPFLAGS" - LIBS="$ac_save_LIBS" - - AC_MSG_RESULT([$pythonexists]) - - if test ! "x$pythonexists" = "xyes"; then - AC_MSG_FAILURE([ - Could not link test program to Python. Maybe the main Python library has been - installed in some non-standard library path. If so, pass it to configure, - via the LDFLAGS environment variable. - Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib" - ============================================================================ - ERROR! - You probably have to install the development version of the Python package - for your distribution. The exact name of this package varies among them. - ============================================================================ - ]) - PYTHON_VERSION="" - fi - - # - # all done! - # -]) diff --git a/m4/ax_swig_python.m4 b/m4/ax_swig_python.m4 deleted file mode 100644 index 8fd3df5..0000000 --- a/m4/ax_swig_python.m4 +++ /dev/null @@ -1,64 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_swig_python.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_SWIG_PYTHON([use-shadow-classes = {no, yes}]) -# -# DESCRIPTION -# -# Checks for Python and provides the $(AX_SWIG_PYTHON_CPPFLAGS), and -# $(AX_SWIG_PYTHON_OPT) output variables. -# -# $(AX_SWIG_PYTHON_OPT) contains all necessary SWIG options to generate -# code for Python. Shadow classes are enabled unless the value of the -# optional first argument is exactly 'no'. If you need multi module -# support (provided by the AX_SWIG_MULTI_MODULE_SUPPORT macro) use -# $(AX_SWIG_PYTHON_LIBS) to link against the appropriate library. It -# contains the SWIG Python runtime library that is needed by the type -# check system for example. -# -# LICENSE -# -# Copyright (c) 2008 Sebastian Huber -# Copyright (c) 2008 Alan W. Irwin -# Copyright (c) 2008 Rafael Laboissiere -# Copyright (c) 2008 Andrew Collier -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 7 - -AU_ALIAS([SWIG_PYTHON], [AX_SWIG_PYTHON]) -AC_DEFUN([AX_SWIG_PYTHON],[ - AC_REQUIRE([AX_PKG_SWIG]) - AC_REQUIRE([AX_PYTHON_DEVEL]) - test "x$1" != "xno" || swig_shadow=" -noproxy" - AC_SUBST([AX_SWIG_PYTHON_OPT],[-python$swig_shadow]) - AC_SUBST([AX_SWIG_PYTHON_CPPFLAGS],[$PYTHON_CPPFLAGS]) -]) From 60ac492058e0d0b9d90c3e3389b7fc56903583dc Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 6 Jul 2015 22:23:45 -0700 Subject: [PATCH 3/4] doc/configure.ac: simplify python check A check for python binary that was originally introduced by commit 183e869 is needed because python is used for a couple of preprocessors (doxygen-link.py and resolve-asciidoc-refs.py) and therefore it is impossible to build docs without python. While it is right to check for python, the check was both wrong and excessive. Instead of just checking for python binary, it checked for various versions of python and set a few variables that are not needed here. More to say, the absense of python binary was not treated as being fatal like it should. Fix both problems by using AC_CHECK_PROG for python, terminating the build in the same way as with doxygen absense. Also, remove the m4/ax_python.m4 which is no longer needed. Signed-off-by: Kir Kolyshkin --- doc/configure.ac | 9 +++-- doc/m4/ax_python.m4 | 97 --------------------------------------------- 2 files changed, 5 insertions(+), 101 deletions(-) delete mode 100644 doc/m4/ax_python.m4 diff --git a/doc/configure.ac b/doc/configure.ac index d243061..2e57570 100644 --- a/doc/configure.ac +++ b/doc/configure.ac @@ -15,8 +15,6 @@ AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)], []) -m4_include([m4/ax_python.m4]) - # # Generating the documentation # @@ -24,12 +22,15 @@ AC_ARG_ENABLE([doc], AS_HELP_STRING([--disable-doc], [Do not generate documentation]), [generate_doc="$enableval"], [generate_doc=auto]) -AX_PYTHON - if test "x$generate_doc" != "xno"; then AC_PROG_SED AC_PROG_EGREP + AC_CHECK_PROG(HAVE_PYTHON, [python], yes, no) + if test "x$HAVE_PYTHON" = "xno" -a "x$generate_doc" = "xyes"; then + AC_MSG_ERROR([*** python binary required to generate documentation]) + fi + AC_CHECK_PROG(HAVE_DOXYGEN, [doxygen], yes, no) if test "x$HAVE_DOXYGEN" = "xno" -a "x$generate_doc" = "xyes"; then AC_MSG_ERROR([*** doxygen package required to generate documentation]) diff --git a/doc/m4/ax_python.m4 b/doc/m4/ax_python.m4 deleted file mode 100644 index f9a5135..0000000 --- a/doc/m4/ax_python.m4 +++ /dev/null @@ -1,97 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_python.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PYTHON -# -# DESCRIPTION -# -# This macro does a complete Python development environment check. -# -# It recurses through several python versions (from 2.1 to 2.6 in this -# version), looking for an executable. When it finds an executable, it -# looks to find the header files and library. -# -# It sets PYTHON_BIN to the name of the python executable, -# PYTHON_INCLUDE_DIR to the directory holding the header files, and -# PYTHON_LIB to the name of the Python library. -# -# This macro calls AC_SUBST on PYTHON_BIN (via AC_CHECK_PROG), -# PYTHON_INCLUDE_DIR and PYTHON_LIB. -# -# LICENSE -# -# Copyright (c) 2008 Michael Tindal -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 9 - -AC_DEFUN([AX_PYTHON], -[AC_MSG_CHECKING(for python build information) -AC_MSG_RESULT([]) -for python in python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do -AC_CHECK_PROGS(PYTHON_BIN, [$python]) -ax_python_bin=$PYTHON_BIN -if test x$ax_python_bin != x; then - AC_CHECK_LIB($ax_python_bin, main, ax_python_lib=$ax_python_bin, ax_python_lib=no) - AC_CHECK_HEADER([$ax_python_bin/Python.h], - [[ax_python_header=`locate $ax_python_bin/Python.h | sed -e s,/Python.h,,`]], - ax_python_header=no) - if test x$ax_python_lib != xno; then - if test x$ax_python_header != xno; then - break; - fi - fi -fi -done -if test x$ax_python_bin = x; then - ax_python_bin=no -fi -if test x$ax_python_header = x; then - ax_python_header=no -fi -if test x$ax_python_lib = x; then - ax_python_lib=no -fi - -AC_MSG_RESULT([ results of the Python check:]) -AC_MSG_RESULT([ Binary: $ax_python_bin]) -AC_MSG_RESULT([ Library: $ax_python_lib]) -AC_MSG_RESULT([ Include Dir: $ax_python_header]) - -if test x$ax_python_header != xno; then - PYTHON_INCLUDE_DIR=$ax_python_header - AC_SUBST(PYTHON_INCLUDE_DIR) -fi -if test x$ax_python_lib != xno; then - PYTHON_LIB=$ax_python_lib - AC_SUBST(PYTHON_LIB) -fi -])dnl From 4caa5cda2c8bfe57f5b099a61d6ee4a204bfa662 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 6 Jul 2015 22:33:23 -0700 Subject: [PATCH 4/4] doc/Makefile.am: don't use asciidoc if disabled In case doc/configure.ac hasn't found asciidoc or any of its prerequisites (such as pygmentize), make shouldn't try to run it. One such case ("gendoc" target) is covered while the other ("%.html" target) is not. Fix it by adding a proper ifdef. Signed-off-by: Kir Kolyshkin --- doc/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/Makefile.am b/doc/Makefile.am index 338f077..7e1fbe9 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -41,12 +41,16 @@ endif %.html: %.txt link_doc +if HAVE_ASCIIDOC ./resolve-asciidoc-refs.py $< > asciidoc.tmp asciidoc $(ASCIIDOCOPTS) -o $@ asciidoc.tmp if LINK_DOC ./doxygen-link.py libnl.dict $@ > asciidoc.tmp mv asciidoc.tmp $@ endif +else + @echo "Warning: Building of asciidoc files is disabled, check autoconf logs" +endif asciidoc: core.html route.html index.html