From 8f5f4537af7790be386974628c804a7bc719b738 Mon Sep 17 00:00:00 2001 From: "Bala.FA" Date: Fri, 7 Mar 2014 18:28:09 +0530 Subject: Initial commit Change-Id: Ie8fdd046d111a4a46abe0e162985e833323bfd7d Signed-off-by: Bala.FA --- configure.ac | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 configure.ac (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..67d3f32 --- /dev/null +++ b/configure.ac @@ -0,0 +1,92 @@ +# +# Copyright 2014 Red Hat, Inc. +# +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# + +# Autoconf initialization +AC_INIT([gluster-nagios-common], + [m4_esyscmd([build-aux/pkg-version --version])], + [rhs-bugs@redhat.com]) +AC_CONFIG_AUX_DIR([build-aux]) + +m4_include([m4/ax_python_module.m4]) + +# Package release +AC_SUBST([PACKAGE_RELEASE], + [m4_esyscmd([build-aux/pkg-version --release])]) + +# Testing for version and release +AS_IF([test "x$PACKAGE_VERSION" = x], + AC_MSG_ERROR([package version not defined])) +AS_IF([test "x$PACKAGE_RELEASE" = x], + AC_MSG_ERROR([package release not defined])) + +# Automake initialization +AM_INIT_AUTOMAKE([-Wno-portability]) + +# Checking for build tools +AC_PROG_CC +AC_PROG_LN_S +AM_PATH_PYTHON([2.6]) + +# default paths +AC_SUBST([glusternagioscommonpylibdir], ['${pyexecdir}/glusternagios']) +AC_SUBST([glusternagioscommontestsdir], ['${datarootdir}/${PACKAGE_NAME}/tests']) + +# Checking for pyflakes +AC_PATH_PROG([PYFLAKES], [pyflakes]) +if test "x$PYFLAKES" = "x"; then + AC_MSG_WARN([pyflakes not found]) +fi + +# Checking for pep8 +AC_PATH_PROG([PEP8], [pep8]) +if test "x$PEP8" = "x"; then + AC_MSG_WARN([python-pep8 not found]) +fi + +# Checking for python-devel +AC_PATH_PROG([PYTHON_CONFIG], [python-config]) +if test "x$PYTHON_CONFIG" = "x"; then + AC_MSG_ERROR([python-devel not found, please install it.]) +fi + +# Checking for nosetests +AC_PATH_PROG([NOSETESTS], [nosetests]) +if test "x$NOSETESTS" = "x"; then + AC_MSG_ERROR([python-nose not found, please install it.]) +fi + +# Checking for python modules (sorted, please keep in order) +AX_PYTHON_MODULE([cpopen], [fatal]) +AX_PYTHON_MODULE([pthreading], [fatal]) + +# Keep sorted +AC_CONFIG_FILES([ + Makefile + gluster-nagios-common.spec + glusternagios/Makefile + tests/Makefile + tests/run_tests_local.sh + tests/run_tests.sh +]) + +AC_OUTPUT([], [ + chmod +x tests/run_tests.sh + chmod +x tests/run_tests_local.sh +]) -- cgit