Changeset View
Changeset View
Standalone View
Standalone View
contrib/ldns/ax_pkg_swig.m4
# =========================================================================== | # =========================================================================== | ||||
# http://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html | # https://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html | ||||
# =========================================================================== | # =========================================================================== | ||||
# | # | ||||
# SYNOPSIS | # SYNOPSIS | ||||
# | # | ||||
# AX_PKG_SWIG([major.minor.micro], [action-if-found], [action-if-not-found]) | # AX_PKG_SWIG([major.minor.micro], [action-if-found], [action-if-not-found]) | ||||
# | # | ||||
# DESCRIPTION | # DESCRIPTION | ||||
# | # | ||||
Show All 16 Lines | |||||
# AX_PKG_SWIG(1.3.17, [], [ AC_MSG_ERROR([SWIG is required to build..]) ]) | # AX_PKG_SWIG(1.3.17, [], [ AC_MSG_ERROR([SWIG is required to build..]) ]) | ||||
# AX_SWIG_ENABLE_CXX | # AX_SWIG_ENABLE_CXX | ||||
# AX_SWIG_MULTI_MODULE_SUPPORT | # AX_SWIG_MULTI_MODULE_SUPPORT | ||||
# AX_SWIG_PYTHON | # AX_SWIG_PYTHON | ||||
# | # | ||||
# LICENSE | # LICENSE | ||||
# | # | ||||
# Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de> | # Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de> | ||||
# Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca> | # Copyright (c) 2008 Alan W. Irwin | ||||
# Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net> | # Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net> | ||||
# Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za> | # Copyright (c) 2008 Andrew Collier | ||||
# Copyright (c) 2011 Murray Cumming <murrayc@openismus.com> | # Copyright (c) 2011 Murray Cumming <murrayc@openismus.com> | ||||
# | # | ||||
# This program is free software; you can redistribute it and/or modify it | # 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 | # 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 | # Free Software Foundation; either version 2 of the License, or (at your | ||||
# option) any later version. | # option) any later version. | ||||
# | # | ||||
# This program is distributed in the hope that it will be useful, but | # This program is distributed in the hope that it will be useful, but | ||||
# WITHOUT ANY WARRANTY; without even the implied warranty of | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||||
# Public License for more details. | # Public License for more details. | ||||
# | # | ||||
# You should have received a copy of the GNU General Public License along | # You should have received a copy of the GNU General Public License along | ||||
# with this program. If not, see <http://www.gnu.org/licenses/>. | # with this program. If not, see <https://www.gnu.org/licenses/>. | ||||
# | # | ||||
# As a special exception, the respective Autoconf Macro's copyright owner | # As a special exception, the respective Autoconf Macro's copyright owner | ||||
# gives unlimited permission to copy, distribute and modify the configure | # gives unlimited permission to copy, distribute and modify the configure | ||||
# scripts that are the output of Autoconf when processing the Macro. You | # 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 | # 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 | # or distributing such scripts, even though portions of the text of the | ||||
# Macro appear in them. The GNU General Public License (GPL) does govern | # Macro appear in them. The GNU General Public License (GPL) does govern | ||||
# all other use of the material that constitutes the Autoconf Macro. | # all other use of the material that constitutes the Autoconf Macro. | ||||
# | # | ||||
# This special exception to the GPL applies to versions of the Autoconf | # This special exception to the GPL applies to versions of the Autoconf | ||||
# Macro released by the Autoconf Archive. When you make and distribute a | # Macro released by the Autoconf Archive. When you make and distribute a | ||||
# modified version of the Autoconf Macro, you may extend this special | # modified version of the Autoconf Macro, you may extend this special | ||||
# exception to the GPL to apply to your modified version as well. | # exception to the GPL to apply to your modified version as well. | ||||
#serial 8 | #serial 13 | ||||
AC_DEFUN([AX_PKG_SWIG],[ | AC_DEFUN([AX_PKG_SWIG],[ | ||||
# Ubuntu has swig 2.0 as /usr/bin/swig2.0 | # Find path to the "swig" executable. | ||||
AC_PATH_PROGS([SWIG],[swig2.0 swig]) | AC_PATH_PROGS([SWIG],[swig swig3.0 swig2.0]) | ||||
if test -z "$SWIG" ; then | if test -z "$SWIG" ; then | ||||
m4_ifval([$3],[$3],[:]) | m4_ifval([$3],[$3],[:]) | ||||
elif test -n "$1" ; then | elif test -n "$1" ; then | ||||
AC_MSG_CHECKING([SWIG version]) | 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'`] | [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]) | AC_MSG_RESULT([$swig_version]) | ||||
if test -n "$swig_version" ; then | if test -n "$swig_version" ; then | ||||
# Calculate the required version number components | # Calculate the required version number components | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |