summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/check_make.m433
-rw-r--r--m4/check_perl.m432
-rw-r--r--m4/check_python.m4111
-rw-r--r--m4/pkg.m4156
4 files changed, 0 insertions, 332 deletions
diff --git a/m4/check_make.m4 b/m4/check_make.m4
deleted file mode 100644
index 343913f884..0000000000
--- a/m4/check_make.m4
+++ /dev/null
@@ -1,33 +0,0 @@
-dnl SMB Build Environment make Checks
-dnl -------------------------------------------------------
-dnl Copyright (C) Stefan (metze) Metzmacher 2004
-dnl Copyright (C) Jelmer Vernooij 2005
-dnl Released under the GNU GPL
-dnl -------------------------------------------------------
-dnl
-
-AC_DEFUN([AC_SAMBA_GNU_MAKE],
-[
-AC_PATH_PROGS(MAKE,gmake make)
-
-AC_CACHE_CHECK([whether we have GNU make], samba_cv_gnu_make, [
-if ! $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null
-then
- samba_cv_gnu_make=no
-else
- samba_cv_gnu_make=yes
-fi
-])
-if test x$samba_cv_gnu_make = xyes; then
- $1
-else
- $2
-fi
-])
-
-AC_DEFUN([AC_SAMBA_GNU_MAKE_VERSION],
-[
-AC_CACHE_CHECK([GNU make version], samba_cv_gnu_make_version,[
- samba_cv_gnu_make_version=`$ac_cv_path_MAKE --version | head -1 | cut -d " " -f 3 2>/dev/null`
- ])
-])
diff --git a/m4/check_perl.m4 b/m4/check_perl.m4
deleted file mode 100644
index aaec9cf950..0000000000
--- a/m4/check_perl.m4
+++ /dev/null
@@ -1,32 +0,0 @@
-dnl SMB Build Environment Perl Checks
-dnl -------------------------------------------------------
-dnl Copyright (C) Stefan (metze) Metzmacher 2004
-dnl Released under the GNU GPL
-dnl -------------------------------------------------------
-dnl
-
-AC_DEFUN([AC_SAMBA_PERL],
-[
-case "$host_os" in
- *irix*)
- # On IRIX, we prefer Freeware or Nekoware Perl, because the
- # system perl is so ancient.
- AC_PATH_PROG(PERL, perl, "", "/usr/freeware/bin:/usr/nekoware/bin:$PATH")
- ;;
- *)
- AC_PATH_PROG(PERL, perl)
- ;;
-esac
-
-if test x"$PERL" = x""; then
- AC_MSG_WARN([No version of perl was found!])
- $2
-else
- if test x"$debug" = x"yes";then
- PERL="$PERL -W"
- fi
- export PERL
- $1
-fi
-])
-
diff --git a/m4/check_python.m4 b/m4/check_python.m4
deleted file mode 100644
index 66dadbdbaa..0000000000
--- a/m4/check_python.m4
+++ /dev/null
@@ -1,111 +0,0 @@
-dnl Autoconf macros for finding a Python development environment
-dnl
-dnl Copyright (C) 2007-2008 Jelmer Vernooij <jelmer@samba.org>
-dnl Published under the GNU GPL, v3 or later
-dnl
-AC_ARG_VAR([PYTHON_VER],[The installed Python
- version to use, for example '2.3'. This string
- will be appended to the Python interpreter
- canonical name.])
-
-AC_DEFUN([TRY_LINK_PYTHON],
-[
- if test $working_python = no; then
- ac_save_LIBS="$LIBS"
- ac_save_CFLAGS="$CFLAGS"
- LIBS="$LIBS $1"
- CFLAGS="$CFLAGS $2"
-
- AC_TRY_LINK([
- #undef HAVE_UINTPTR_T
- /* we have our own configure tests */
- #include <Python.h>
- ],[
- Py_InitModule(NULL, NULL);
- ],[
- PYTHON_LDFLAGS="$1"
- PYTHON_CFLAGS="$2"
- working_python=yes
- ])
- LIBS="$ac_save_LIBS"
- CFLAGS="$ac_save_CFLAGS"
- fi
-])
-
-dnl Try to find a Python implementation including header files
-dnl AC_SAMBA_PYTHON_DEVEL(RUN-IF-FOUND, RUN-IF-NOT-FOUND)
-dnl
-dnl Will set the following variables:
-dnl $PYTHON
-dnl $PYTHON_CONFIG (if found)
-dnl $PYTHON_CFLAGS
-dnl $PYTHON_LDFLAGS
-AC_DEFUN([AC_SAMBA_PYTHON_DEVEL],
-[
- if test -z "$PYTHON_VER"; then
- AC_PATH_PROGS([PYTHON], [python2.6 python2.5 python])
- else
- AC_PATH_PROG([PYTHON],[python[$PYTHON_VER]])
- fi
- if test -z "$PYTHON"; then
- working_python=no
- AC_MSG_WARN([No python found])
- fi
-
- dnl assume no working python
- working_python=no
-
- if test -z "$PYTHON_VER"; then
- AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config])
- else
- AC_PATH_PROG([PYTHON_CONFIG], [python[$PYTHON_VER]-config])
- fi
-
- if test -z "$PYTHON_CONFIG"; then
- AC_MSG_WARN([No python-config found])
- else
- TRY_LINK_PYTHON([`$PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --includes`])
- TRY_LINK_PYTHON([`$PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --cflags`])
- if test x$working_python = xno; then
- # It seems the library path isn't included on some systems
- base=`$PYTHON_CONFIG --prefix`
- TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --includes`])
- TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --cflags`])
- fi
- fi
-
- if test x$PYTHON != x
- then
- DISTUTILS_CFLAGS=`$PYTHON -c "from distutils import sysconfig; \
- print '-I%s -I%s %s' % ( \
- sysconfig.get_python_inc(), \
- sysconfig.get_python_inc(plat_specific=1), \
- sysconfig.get_config_var('CFLAGS'))"`
- DISTUTILS_LDFLAGS=`$PYTHON -c "from distutils import sysconfig; \
- print '%s %s -lpython%s -L%s %s -L%s' % ( \
- sysconfig.get_config_var('LIBS'), \
- sysconfig.get_config_var('SYSLIBS'), \
- sysconfig.get_config_var('VERSION'), \
- sysconfig.get_config_var('LIBDIR'), \
- sysconfig.get_config_var('LDFLAGS'), \
- sysconfig.get_config_var('LIBPL'))"`
- TRY_LINK_PYTHON($DISTUTILS_LDFLAGS, $DISTUTILS_CFLAGS)
-
- if `$PYTHON -c "import sys; sys.exit(sys.version_info.__getslice__(0, 2) >= (2, 5))"`
- then
- AC_MSG_WARN([Python ($PYTHON) is too old. At least version 2.5 is required])
- working_python=no
- fi
- fi
-
- AC_MSG_CHECKING(working python module support)
- if test $working_python = yes; then
- AC_MSG_RESULT([yes])
- $1
- else
- AC_MSG_RESULT([no])
- $2
- fi
-])
-
-
diff --git a/m4/pkg.m4 b/m4/pkg.m4
deleted file mode 100644
index a8b3d06c81..0000000000
--- a/m4/pkg.m4
+++ /dev/null
@@ -1,156 +0,0 @@
-# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
-#
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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 <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
- AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
- _pkg_min_version=m4_default([$1], [0.9.0])
- AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- PKG_CONFIG=""
- fi
-
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists. Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
- AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
- m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
- $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
- if test -n "$$1"; then
- pkg_cv_[]$1="$$1"
- else
- PKG_CHECK_EXISTS([$3],
- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
- [pkg_failed=yes])
- fi
-else
- pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
- _PKG_SHORT_ERRORS_SUPPORTED
- if test $_pkg_short_errors_supported = yes; then
- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
- else
- $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
- ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT
-])],
- [AC_MSG_RESULT([no])
- $4])
-elif test $pkg_failed = untried; then
- ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
- [$4])
-else
- $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
- $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
- AC_MSG_RESULT([yes])
- ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES