add pyconfigure stuff

This commit is contained in:
Brandon Invergo 2013-05-19 13:55:18 +02:00
parent e342891a5d
commit d4f71e7691
10 changed files with 12609 additions and 0 deletions

15
aclocal.m4 vendored Normal file
View File

@ -0,0 +1,15 @@
# generated automatically by aclocal 1.13.1 -*- Autoconf -*-
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_include([m4/python.m4])

3151
autom4te.cache/output.0 Normal file

File diff suppressed because it is too large Load Diff

3670
autom4te.cache/output.1 Normal file

File diff suppressed because it is too large Load Diff

3670
autom4te.cache/output.2 Normal file

File diff suppressed because it is too large Load Diff

157
autom4te.cache/requests Normal file
View File

@ -0,0 +1,157 @@
# This file was generated.
# It contains the lists of macros which have been traced.
# It can be safely removed.
@request = (
bless( [
'0',
1,
[
'/home/brandon/gnu/share/autoconf'
],
[
'/home/brandon/gnu/share/autoconf/autoconf/autoconf.m4f',
'-',
'/usr/share/aclocal-1.13/internal/ac-config-macro-dirs.m4',
'configure.ac'
],
{
'_AM_AUTOCONF_VERSION' => 1,
'm4_pattern_allow' => 1,
'm4_pattern_forbid' => 1,
'AC_CONFIG_MACRO_DIR_TRACE' => 1,
'include' => 1,
'AC_DEFUN_ONCE' => 1,
'm4_include' => 1,
'_AM_CONFIG_MACRO_DIRS' => 1,
'AC_DEFUN' => 1,
'_m4_warn' => 1,
'AU_DEFUN' => 1,
'AC_CONFIG_MACRO_DIR' => 1
}
], 'Autom4te::Request' ),
bless( [
'1',
1,
[
'/home/brandon/gnu/share/autoconf'
],
[
'/home/brandon/gnu/share/autoconf/autoconf/autoconf.m4f',
'-',
'/usr/share/aclocal-1.13/internal/ac-config-macro-dirs.m4',
'm4/python.m4',
'configure.ac'
],
{
'm4_pattern_forbid' => 1,
'PC_INIT' => 1,
'PC_PYTHON_CHECK_EXEC_PREFIX' => 1,
'PC_PYTHON_CHECK_EXEC_DIR' => 1,
'PC_PYTHON_TEST_LIBS' => 1,
'AC_LANG_COMPILER(Python)' => 1,
'AC_DEFUN' => 1,
'PC_PYTHON_CHECK_CFLAGS' => 1,
'PC_PYTHON_VERIFY_VERSION' => 1,
'PC_PYTHON_CHECK_LIBS' => 1,
'PC_PYTHON_CHECK_ABI_FLAGS' => 1,
'AC_DEFUN_ONCE' => 1,
'PC_PYTHON_EXEC_PACKAGE_DIR' => 1,
'_AM_CONFIG_MACRO_DIRS' => 1,
'PC_PYTHON_PROG_PYTHON_CONFIG' => 1,
'PC_PYTHON_CHECK_MODULE' => 1,
'_m4_warn' => 1,
'PC_PYTHON_CHECK_INCLUDES' => 1,
'PC_PYTHON_SITE_PACKAGE_DIR' => 1,
'include' => 1,
'PC_PYTHON_CHECK_FUNC' => 1,
'PC_PYTHON_CHECK_SITE_DIR' => 1,
'AC_CONFIG_MACRO_DIR' => 1,
'm4_pattern_allow' => 1,
'_AM_AUTOCONF_VERSION' => 1,
'PC_PYTHON_CHECK_EXTENSION_SUFFIX' => 1,
'PC_PYTHON_CHECK_VERSION' => 1,
'AC_CONFIG_MACRO_DIR_TRACE' => 1,
'PC_PYTHON_CHECK_PREFIX' => 1,
'AC_PROG_PYTHON' => 1,
'PC_PYTHON_CHECK_LDFLAGS' => 1,
'PC_PYTHON_CHECK_PLATFORM' => 1,
'm4_include' => 1,
'PC_PYTHON_CHECK_HEADERS' => 1,
'AU_DEFUN' => 1,
'AC_LANG_PYTHON' => 1
}
], 'Autom4te::Request' ),
bless( [
'2',
1,
[
'/home/brandon/gnu/share/autoconf'
],
[
'/home/brandon/gnu/share/autoconf/autoconf/autoconf.m4f',
'aclocal.m4',
'configure.ac'
],
{
'AM_PROG_F77_C_O' => 1,
'_LT_AC_TAGCONFIG' => 1,
'AC_INIT' => 1,
'm4_pattern_forbid' => 1,
'AC_CANONICAL_TARGET' => 1,
'_AM_COND_IF' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_SUBST' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_FC_SRCEXT' => 1,
'AC_PROG_LIBTOOL' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_PATH_GUILE' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AC_CONFIG_LINKS' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'LT_SUPPORTED_TAG' => 1,
'm4_sinclude' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_NLS' => 1,
'AC_FC_PP_DEFINE' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'_m4_warn' => 1,
'AM_MAKEFILE_INCLUDE' => 1,
'AM_PROG_CXX_C_O' => 1,
'_AM_MAKEFILE_INCLUDE' => 1,
'_AM_COND_ENDIF' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AM_SILENT_RULES' => 1,
'AM_PROG_MOC' => 1,
'AC_CONFIG_FILES' => 1,
'include' => 1,
'LT_INIT' => 1,
'AM_GNU_GETTEXT' => 1,
'AM_PROG_AR' => 1,
'AC_LIBSOURCE' => 1,
'AC_CANONICAL_BUILD' => 1,
'AM_PROG_FC_C_O' => 1,
'AC_FC_FREEFORM' => 1,
'AC_FC_PP_SRCEXT' => 1,
'AH_OUTPUT' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'm4_pattern_allow' => 1,
'AM_PROG_CC_C_O' => 1,
'sinclude' => 1,
'AM_CONDITIONAL' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AM_XGETTEXT_OPTION' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AM_POT_TOOLS' => 1,
'm4_include' => 1,
'_AM_COND_ELSE' => 1,
'AC_SUBST_TRACE' => 1
}
], 'Autom4te::Request' )
);

61
autom4te.cache/traces.0 Normal file
View File

@ -0,0 +1,61 @@
m4trace:configure.ac:48: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.ac:48: -1- m4_pattern_forbid([_AC_])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
m4trace:configure.ac:48: -1- m4_pattern_allow([^AS_FLAGS$])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^_?m4_])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^dnl$])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^_?AS_])
m4trace:configure.ac:48: -1- m4_pattern_allow([^SHELL$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PATH_SEPARATOR$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_NAME$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_VERSION$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_STRING$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_URL$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^exec_prefix$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^prefix$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^program_transform_name$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^bindir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^sbindir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^libexecdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^datarootdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^datadir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^sysconfdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^sharedstatedir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^localstatedir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^includedir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^oldincludedir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^docdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^infodir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^htmldir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^dvidir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^pdfdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^psdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^libdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^localedir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^mandir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_NAME$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_VERSION$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_STRING$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_URL$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^DEFS$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^ECHO_C$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^ECHO_N$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^ECHO_T$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^LIBS$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^build_alias$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^host_alias$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^target_alias$])
m4trace:configure.ac:65: -1- AC_CONFIG_MACRO_DIR([m4])
m4trace:configure.ac:137: -2- m4_pattern_allow([^VIRTUALENV$])
m4trace:configure.ac:141: -2- m4_pattern_allow([^VIRTUALENV$])
m4trace:configure.ac:142: -1- m4_pattern_allow([^VIRTUALENV_FLAGS$])
m4trace:configure.ac:166: -1- m4_pattern_allow([^MKDIR_P$])
m4trace:configure.ac:167: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
m4trace:configure.ac:167: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
m4trace:configure.ac:167: -1- m4_pattern_allow([^INSTALL_DATA$])
m4trace:configure.ac:399: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:399: -1- m4_pattern_allow([^LTLIBOBJS$])

480
autom4te.cache/traces.1 Normal file
View File

@ -0,0 +1,480 @@
m4trace:m4/python.m4:63: -1- AU_DEFUN([AC_LANG_PYTHON], [AC_LANG(Python)])
m4trace:m4/python.m4:63: -1- AC_DEFUN([AC_LANG_PYTHON], [AC_DIAGNOSE([obsolete], [The macro `AC_LANG_PYTHON' is obsolete.
You should run autoupdate.])dnl
AC_LANG(Python)])
m4trace:m4/python.m4:109: -1- AC_DEFUN([AC_LANG_COMPILER(Python)], [AC_REQUIRE([AC_PROG_PYTHON])])
m4trace:m4/python.m4:117: -1- AC_DEFUN([PC_INIT], [AC_ARG_VAR([PYTHON], [the Python interpreter])
dnl The default minimum version is 2.0
m4_define_default([pc_min_ver], m4_ifval([$1], [$1], [2.0]))
dnl The default maximum version is 3.3
m4_define_default([pc_max_ver], m4_ifval([$2], [$2], [3.3]))
dnl Build up a list of possible interpreter names.
m4_define_default([_PC_PYTHON_INTERPRETER_LIST],
dnl Construct a comma-separated list of interpreter names (python2.6,
dnl python2.7, etc). We only care about the first 3 characters of the
dnl version strings (major-dot-minor; not
dnl major-dot-minor-dot-bugfix[-dot-whatever])
[m4_foreach([pc_ver],
m4_esyscmd_s(seq -s[[", "]] -f["[[%.1f]]"] m4_substr(pc_max_ver, [0], [3]) -0.1 m4_substr(pc_min_ver, [0], [3])),
dnl Remove python2.8 and python2.9 since they will never exist
[m4_bmatch(pc_ver, [2.[89]], [], [python]pc_ver)] ) \
dnl If we want some Python 3 versions (max version >= 3.0),
dnl also search for "python3"
m4_if(m4_version_compare(pc_max_ver, [2.9]), [1], [python3], []) \
dnl If we want some Python 2 versions (min version <= 2.7),
dnl also search for "python2". Finally, also search for plain ol' "python"
m4_if(m4_version_compare(pc_min_ver, [2.8]), [-1], [python2], []) [python]])
dnl Do the actual search at last.
AC_PATH_PROGS(PYTHON, [_PC_PYTHON_INTERPRETER_LIST])
dnl If we found something, do a sanity check that the interpreter really
dnl has the version its name would suggest.
m4_ifval([PYTHON],
[PC_PYTHON_VERIFY_VERSION([>=], [pc_min_ver],
[AC_MSG_RESULT([yes])],
[AC_MSG_FAILURE([No compatible Python interpreter found. If you're sure that you have one, try setting the PYTHON environment variable to the location of the interpreter.])])])
m4_ifval([PYTHON],
[PC_PYTHON_VERIFY_VERSION([<=], [pc_max_ver],
[AC_MSG_RESULT([yes])],
[AC_MSG_FAILURE([No compatible Python interpreter found. If you're sure that you have one, try setting the PYTHON environment variable to the location of the interpreter.])])])
])
m4trace:m4/python.m4:157: -1- AC_DEFUN([AC_PROG_PYTHON], [AC_ARG_VAR([PYTHON], [the Python interpreter])
m4_define_default([_PC_PYTHON_INTERPRETER_LIST],
[python python3 python3.3 python3.2 python3.1 python3.0 python2 python2.7 dnl
python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
m4_ifval([$1],
[AC_PATH_PROGS(PYTHON, [$1 _PC_PYTHON_INTERPRETER_LIST])],
[AC_PATH_PROGS(PYTHON, [_PC_PYTHON_INTERPRETER_LIST])])
])
m4trace:m4/python.m4:171: -1- AC_DEFUN([PC_PYTHON_PROG_PYTHON_CONFIG], [AC_REQUIRE([PC_INIT])[]dnl
AC_ARG_VAR([PYTHON_CONFIG], [the Python-config program])
dnl python-config's binary name is normally based on the Python interpreter's
dnl binary name (i.e. python2.7 -> python2.7-config)
m4_define([_PYTHON_BASENAME], [`basename $PYTHON`])
m4_ifval([$1],
[AC_PATH_PROGS(PYTHON_CONFIG, [$1 _PYTHON_BASENAME-config])],
[AC_PATH_PROG(PYTHON_CONFIG, _PYTHON_BASENAME-config)])
])
m4trace:m4/python.m4:191: -1- AC_DEFUN([PC_PYTHON_VERIFY_VERSION], [m4_define([pc_python_safe_ver], m4_bpatsubsts($2, [\.], [_]))
AC_CACHE_CHECK([if Python $1 '$2'],
[[pc_cv_python_min_version_]pc_python_safe_ver],
[AC_LANG_PUSH(Python)[]dnl
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([dnl
import sys
], [dnl
# split strings by '.' and convert to numeric. Append some zeros
# because we need at least 4 digits for the hex conversion.
# map returns an iterator in Python 3.0 and a list in 2.x
reqver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
reqverhex = 0
# xrange is not present in Python 3.0 and range returns an iterator
for i in list(range(4)):
reqverhex = (reqverhex << 8) + reqver[[i]]
if sys.hexversion $1 reqverhex:
sys.exit()
else:
sys.exit(1)
])],
[[pc_cv_python_req_version_]pc_python_safe_ver="yes"],
[[pc_cv_python_req_version_]pc_python_safe_ver="no"])
AC_LANG_POP(Python)[]dnl
])
AS_IF([test "$[pc_cv_python_req_version_]pc_python_safe_ver" = "no"], [$4], [$3])
])
m4trace:m4/python.m4:226: -1- AC_DEFUN([PC_PYTHON_CHECK_VERSION], [AC_REQUIRE([PC_INIT])[]dnl
AC_CACHE_CHECK([for $1 version],
[pc_cv_python_version],
[AC_LANG_PUSH(Python)[]dnl
AC_LANG_CONFTEST([
AC_LANG_PROGRAM([dnl
import sys
], [dnl
sys.stdout.write(sys.version[[:3]])
])])
pc_cv_python_version=`$PYTHON conftest.py`
AC_LANG_POP(Python)[]dnl
])
AC_SUBST([PYTHON_VERSION], [$pc_cv_python_version])
])
m4trace:m4/python.m4:250: -1- AC_DEFUN([PC_PYTHON_CHECK_PREFIX], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to get it with python-config otherwise do it from within Python
AC_CACHE_CHECK([for Python prefix], [pc_cv_python_prefix],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_prefix=`$PYTHON_CONFIG --prefix 2>&AS_MESSAGE_LOG_FD`
else
AC_LANG_PUSH(Python)[]dnl
pc_cv_python_prefix=AC_LANG_CONFTEST([AC_LANG_PROGRAM([dnl
import sys
], [dnl
sys.exit(sys.prefix)
])])
AC_LANG_POP(Python)[]dnl
fi])
AC_SUBST([PYTHON_PREFIX], [$pc_cv_python_prefix])])
m4trace:m4/python.m4:271: -1- AC_DEFUN([PC_PYTHON_CHECK_EXEC_PREFIX], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to get it with python-config otherwise do it from within Python
AC_CACHE_CHECK([for Python exec-prefix], [pc_cv_python_exec_prefix],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_exec_prefix=`$PYTHON_CONFIG --exec-prefix 2>&AS_MESSAGE_LOG_FD`
else
AC_LANG_PUSH(Python)[]dnl
pc_cv_python_exec_prefix=AC_LANG_CONFTEST([AC_LANG_PROGRAM([dnl
import sys
], [dnl
sys.exit(sys.exec_prefix)
])])
AC_LANG_POP(Python)[]dnl
fi
])
AC_SUBST([PYTHON_EXEC_PREFIX], [$pc_cv_python_exec_prefix])])
m4trace:m4/python.m4:294: -1- AC_DEFUN([PC_PYTHON_CHECK_INCLUDES], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to find the headers location with python-config otherwise guess
AC_CACHE_CHECK([for Python includes], [pc_cv_python_includes],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_includes=`$PYTHON_CONFIG --includes 2>&AS_MESSAGE_LOG_FD`
else
pc_cv_python_includes="[-I$includedir/$_PYTHON_BASENAME]m4_ifdef(PYTHON_ABI_FLAGS,
PYTHON_ABI_FLAGS,)"
fi
])
AC_SUBST([PYTHON_INCLUDES], [$pc_cv_python_includes])])
m4trace:m4/python.m4:311: -1- AC_DEFUN([PC_PYTHON_CHECK_HEADERS], [AC_REQUIRE([PC_PYTHON_CHECK_INCLUDES])[]dnl
pc_cflags_store=$CPPFLAGS
CPPFLAGS="$CFLAGS $PYTHON_INCLUDES"
AC_CHECK_HEADER([Python.h], [$1], [$2])
CPPFLAGS=$pc_cflags_store
])
m4trace:m4/python.m4:323: -1- AC_DEFUN([PC_PYTHON_CHECK_LIBS], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to find the lib flags with python-config otherwise guess
AC_CACHE_CHECK([for Python libs], [pc_cv_python_libs],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_libs=`$PYTHON_CONFIG --libs 2>&AS_MESSAGE_LOG_FD`
else
pc_cv_python_libs="[-l$_PYTHON_BASENAME]m4_ifdef(PYTHON_ABI_FLAGS, PYTHON_ABI_FLAGS,)"
fi
])
AC_SUBST([PYTHON_LIBS], [$pc_cv_python_libs])])
m4trace:m4/python.m4:339: -1- AC_DEFUN([PC_PYTHON_TEST_LIBS], [AC_REQUIRE([PC_PYTHON_CHECK_LIBS])[]dnl
pc_libflags_store=$LIBS
for lflag in $PYTHON_LIBS; do
case $lflag in
-lpython*@:}@
LIBS="$LIBS $lflag"
pc_libpython=`echo $lflag | sed -e 's/^-l//'`
;;
*@:}@;;
esac
done
AC_CHECK_LIB([$pc_libpython], [$1], [$2], [$3])])
m4trace:m4/python.m4:357: -1- AC_DEFUN([PC_PYTHON_CHECK_CFLAGS], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to find the CFLAGS with python-config otherwise give up
AC_CACHE_CHECK([for Python CFLAGS], [pc_cv_python_cflags],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_cflags=`$PYTHON_CONFIG --cflags 2>&AS_MESSAGE_LOG_FD`
else
pc_cv_python_cflags=
fi
])
AC_SUBST([PYTHON_CFLAGS], [$pc_cv_python_cflags])])
m4trace:m4/python.m4:373: -1- AC_DEFUN([PC_PYTHON_CHECK_LDFLAGS], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to find the LDFLAGS with python-config otherwise give up
AC_CACHE_CHECK([for Python LDFLAGS], [pc_cv_python_ldflags],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_ldflags=`$PYTHON_CONFIG --ldflags 2>&AS_MESSAGE_LOG_FD`
else
pc_cv_python_ldflags=
fi
])
AC_SUBST([PYTHON_LDFLAGS], [$pc_cv_python_ldflags])])
m4trace:m4/python.m4:389: -1- AC_DEFUN([PC_PYTHON_CHECK_EXTENSION_SUFFIX], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to find the suffix with python-config otherwise give up
AC_CACHE_CHECK([for Python extension suffix], [pc_cv_python_extension_suffix],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_extension_suffix=`$PYTHON_CONFIG --extension-suffix 2>&AS_MESSAGE_LOG_FD`
else
pc_cv_python_extension_suffix=
fi
])
AC_SUBST([PYTHON_EXTENSION_SUFFIX], [$pc_cv_python_extension_suffix])])
m4trace:m4/python.m4:405: -1- AC_DEFUN([PC_PYTHON_CHECK_ABI_FLAGS], [AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to find the ABI flags with python-config otherwise give up
AC_CACHE_CHECK([for Python ABI flags], [pc_cv_python_abi_flags],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_abi_flags=`$PYTHON_CONFIG --abiflags 2>&AS_MESSAGE_LOG_FD`
else
pc_cv_python_abi_flags=
fi
])
AC_SUBST([PYTHON_ABI_FLAGS], [$pc_cv_python_abi_flags])])
m4trace:m4/python.m4:422: -1- AC_DEFUN([PC_PYTHON_CHECK_PLATFORM], [AC_REQUIRE([PC_INIT])[]dnl
dnl Get the platform from within Python (sys.platform)
AC_CACHE_CHECK([for Python platform],
[pc_cv_python_platform],
[AC_LANG_PUSH(Python)[]dnl
AC_LANG_CONFTEST([
AC_LANG_PROGRAM([dnl
import sys
], [dnl
sys.stdout.write(sys.platform)
])])
pc_cv_python_platform=`$PYTHON conftest.py`
AC_LANG_POP(Python)[]dnl
])
AC_SUBST([PYTHON_PLATFORM], [$pc_cv_python_platform])
])
m4trace:m4/python.m4:445: -1- AC_DEFUN([PC_PYTHON_CHECK_SITE_DIR], [AC_REQUIRE([PC_INIT])AC_REQUIRE([PC_PYTHON_CHECK_PREFIX])[]dnl
AC_CACHE_CHECK([for Python site-packages directory],
[pc_cv_python_site_dir],
[AC_LANG_PUSH(Python)[]dnl
if test "x$prefix" = xNONE
then
pc_py_prefix=$ac_default_prefix
else
pc_py_prefix=$prefix
fi
AC_LANG_CONFTEST([
AC_LANG_PROGRAM([dnl
import sys
from platform import python_implementation
# sysconfig in CPython 2.7 doesn't work in virtualenv
# <https://github.com/pypa/virtualenv/issues/118>
try:
import sysconfig
except:
can_use_sysconfig = False
else:
can_use_sysconfig = True
if can_use_sysconfig:
if python_implementation() == "CPython" and sys.version[[:3]] == '2.7':
can_use_sysconfig = False
if not can_use_sysconfig:
from distutils import sysconfig
sitedir = sysconfig.get_python_lib(False, False, prefix='$pc_py_prefix')
else:
sitedir = sysconfig.get_path('purelib', vars={'base':'$pc_py_prefix'})
], [dnl
sys.stdout.write(sitedir)
])])
pc_cv_python_site_dir=`$PYTHON conftest.py`
AC_LANG_POP(Python)[]dnl
case $pc_cv_python_site_dir in
$pc_py_prefix*)
pc__strip_prefix=`echo "$pc_py_prefix" | sed 's|.|.|g'`
pc_cv_python_site_dir=`echo "$pc_cv_python_site_dir" | sed "s,^$pc__strip_prefix/,,"`
;;
*)
case $pc_py_prefix in
/usr|/System*) ;;
*)
pc_cv_python_site_dir=lib/python$PYTHON_VERSION/site-packages
;;
esac
;;
esac
])
AC_SUBST([pythondir], [\${prefix}/$pc_cv_python_site_dir])])
m4trace:m4/python.m4:501: -1- AC_DEFUN([PC_PYTHON_SITE_PACKAGE_DIR], [AC_REQUIRE([PC_PYTHON_CHECK_SITE_DIR])[]dnl
AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])])
m4trace:m4/python.m4:509: -1- AC_DEFUN([PC_PYTHON_CHECK_EXEC_DIR], [AC_REQUIRE([PC_INIT])AC_REQUIRE([PC_PYTHON_CHECK_EXEC_PREFIX])[]dnl
AC_CACHE_CHECK([for Python extension module directory],
[pc_cv_python_exec_dir],
[AC_LANG_PUSH(Python)[]dnl
if test "x$pc_cv_python_exec_prefix" = xNONE
then
pc_py_exec_prefix=$pc_cv_python_prefix
else
pc_py_exec_prefix=$pc_cv_python_exec_prefix
fi
AC_LANG_CONFTEST([
AC_LANG_PROGRAM([dnl
import sys
from platform import python_implementation
# sysconfig in CPython 2.7 doesn't work in virtualenv
# <https://github.com/pypa/virtualenv/issues/118>
try:
import sysconfig
except:
can_use_sysconfig = False
else:
can_use_sysconfig = True
if can_use_sysconfig:
if python_implementation() == "CPython" and sys.version[[:3]] == '2.7':
can_use_sysconfig = False
if not can_use_sysconfig:
from distutils import sysconfig
sitedir = sysconfig.get_python_lib(False, False, prefix='$pc_py__exec_prefix')
else:
sitedir = sysconfig.get_path('purelib', vars={'platbase':'$pc_py_exec_prefix'})
], [dnl
sys.stdout.write(sitedir)
])])
pc_cv_python_exec_dir=`$PYTHON conftest.py`
AC_LANG_POP(Python)[]dnl
case $pc_cv_python_exec_dir in
$pc_py_exec_prefix*)
pc__strip_prefix=`echo "$pc_py_exec_prefix" | sed 's|.|.|g'`
pc_cv_python_exec_dir=`echo "$pc_cv_python_exec_dir" | sed "s,^$pc__strip_prefix/,,"`
;;
*)
case $pc_py_exec_prefix in
/usr|/System*) ;;
*)
pc_cv_python_exec_dir=lib/python$PYTHON_VERSION/site-packages
;;
esac
;;
esac
])
AC_SUBST([pyexecdir], [\${exec_prefix}/$pc_cv_python_pyexecdir])])
m4trace:m4/python.m4:566: -1- AC_DEFUN([PC_PYTHON_EXEC_PACKAGE_DIR], [AC_REQUIRE([PC_PYTHON_CHECK_EXEC_DIR])[]dnl
AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])])
m4trace:m4/python.m4:579: -1- AC_DEFUN([PC_PYTHON_CHECK_MODULE], [AC_REQUIRE([PC_INIT])[]dnl
m4_define([pc_python_safe_mod], m4_bpatsubsts($1, [\.], [_]))
AC_CACHE_CHECK([for Python '$1' library],
[[pc_cv_python_module_]pc_python_safe_mod],
[AC_LANG_PUSH(Python)[]dnl
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([dnl
import sys
try:
import $1
except:
sys.exit(1)
else:
sys.exit(0)
], [])],
[[pc_cv_python_module_]pc_python_safe_mod="yes"],
[[pc_cv_python_module_]pc_python_safe_mod="no"])
AC_LANG_POP(Python)[]dnl
])
AS_IF([test "$[pc_cv_python_module_]pc_python_safe_mod" = "no"], [$3], [$2])
])
m4trace:m4/python.m4:607: -1- AC_DEFUN([PC_PYTHON_CHECK_FUNC], [AC_REQUIRE([PC_INIT])[]dnl
m4_define([pc_python_safe_mod], m4_bpatsubsts($1, [\.], [_]))
AC_CACHE_CHECK([for Python m4_ifnblank($1, '$1.$2()', '$2()') function],
[[pc_cv_python_func_]pc_python_safe_mod[_$2]],
[AC_LANG_PUSH(Python)[]dnl
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([dnl
import sys
m4_ifnblank([$1], [dnl
try:
import $1
except:
sys.exit(1)
], [])],
[
m4_ifnblank([$1], [
try:
$1.$2($3)], [
try:
$2($3)])
except:
sys.exit(1)
else:
sys.exit(0)
])],
[[pc_cv_python_func_]pc_python_safe_mod[_$2]="yes"],
[[pc_cv_python_func_]pc_python_safe_mod[_$2]="no"])
AC_LANG_POP(Python)[]dnl
])
AS_IF([test "$[pc_cv_python_func_]pc_python_safe_mod[_$2]" = "no"], [$5], [$4])
])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.ac:48: -1- m4_pattern_forbid([_AC_])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
m4trace:configure.ac:48: -1- m4_pattern_allow([^AS_FLAGS$])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^_?m4_])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^dnl$])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^_?AS_])
m4trace:configure.ac:48: -1- m4_pattern_allow([^SHELL$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PATH_SEPARATOR$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_NAME$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_VERSION$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_STRING$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_URL$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^exec_prefix$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^prefix$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^program_transform_name$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^bindir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^sbindir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^libexecdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^datarootdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^datadir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^sysconfdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^sharedstatedir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^localstatedir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^includedir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^oldincludedir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^docdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^infodir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^htmldir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^dvidir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^pdfdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^psdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^libdir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^localedir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^mandir$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_NAME$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_VERSION$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_STRING$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_URL$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^DEFS$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^ECHO_C$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^ECHO_N$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^ECHO_T$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^LIBS$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^build_alias$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^host_alias$])
m4trace:configure.ac:48: -1- m4_pattern_allow([^target_alias$])
m4trace:configure.ac:65: -1- AC_CONFIG_MACRO_DIR([m4])
m4trace:configure.ac:89: -1- PC_INIT([2.7], [3.3.1])
m4trace:configure.ac:89: -1- m4_pattern_allow([^PYTHON$])
m4trace:configure.ac:89: -1- m4_pattern_allow([^PYTHON$])
m4trace:configure.ac:89: -1- PC_PYTHON_VERIFY_VERSION([>=], [pc_min_ver], [AC_MSG_RESULT([yes])], [AC_MSG_FAILURE([No compatible Python interpreter found. If you're sure that you have one, try setting the PYTHON environment variable to the location of the interpreter.])])
m4trace:configure.ac:89: -1- AC_PROG_PYTHON
m4trace:configure.ac:89: -1- m4_pattern_allow([^PYTHON$])
m4trace:configure.ac:89: -1- m4_pattern_allow([^PYTHON$])
m4trace:configure.ac:89: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from...
m4/python.m4:191: PC_PYTHON_VERIFY_VERSION is expanded from...
m4/python.m4:117: PC_INIT is expanded from...
configure.ac:89: the top level])
m4trace:configure.ac:89: -1- PC_PYTHON_VERIFY_VERSION([<=], [pc_max_ver], [AC_MSG_RESULT([yes])], [AC_MSG_FAILURE([No compatible Python interpreter found. If you're sure that you have one, try setting the PYTHON environment variable to the location of the interpreter.])])
m4trace:configure.ac:89: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from...
m4/python.m4:191: PC_PYTHON_VERIFY_VERSION is expanded from...
m4/python.m4:117: PC_INIT is expanded from...
configure.ac:89: the top level])
m4trace:configure.ac:137: -2- m4_pattern_allow([^VIRTUALENV$])
m4trace:configure.ac:141: -2- m4_pattern_allow([^VIRTUALENV$])
m4trace:configure.ac:142: -1- m4_pattern_allow([^VIRTUALENV_FLAGS$])
m4trace:configure.ac:166: -1- m4_pattern_allow([^MKDIR_P$])
m4trace:configure.ac:167: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
m4trace:configure.ac:167: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
m4trace:configure.ac:167: -1- m4_pattern_allow([^INSTALL_DATA$])
m4trace:configure.ac:237: -1- PC_PYTHON_SITE_PACKAGE_DIR
m4trace:configure.ac:237: -1- PC_PYTHON_CHECK_SITE_DIR
m4trace:configure.ac:237: -1- PC_PYTHON_CHECK_PREFIX
m4trace:configure.ac:237: -1- PC_PYTHON_PROG_PYTHON_CONFIG
m4trace:configure.ac:237: -1- m4_pattern_allow([^PYTHON_CONFIG$])
m4trace:configure.ac:237: -1- m4_pattern_allow([^PYTHON_CONFIG$])
m4trace:configure.ac:237: -1- m4_pattern_allow([^PYTHON_PREFIX$])
m4trace:configure.ac:237: -1- m4_pattern_allow([^pythondir$])
m4trace:configure.ac:237: -1- m4_pattern_allow([^pkgpythondir$])
m4trace:configure.ac:253: -1- PC_PYTHON_EXEC_PACKAGE_DIR
m4trace:configure.ac:253: -1- PC_PYTHON_CHECK_EXEC_DIR
m4trace:configure.ac:253: -1- PC_PYTHON_CHECK_EXEC_PREFIX
m4trace:configure.ac:253: -1- m4_pattern_allow([^PYTHON_EXEC_PREFIX$])
m4trace:configure.ac:253: -1- m4_pattern_allow([^pyexecdir$])
m4trace:configure.ac:253: -1- m4_pattern_allow([^pkgpyexecdir$])
m4trace:configure.ac:399: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:399: -1- m4_pattern_allow([^LTLIBOBJS$])

240
autom4te.cache/traces.2 Normal file
View File

@ -0,0 +1,240 @@
m4trace:aclocal.m4:15: -1- m4_include([m4/python.m4])
m4trace:configure.ac:48: -1- AC_INIT([mediagoblin], [0.4.0.dev], [cwebber@gnu.org])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.ac:48: -1- m4_pattern_forbid([_AC_])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
m4trace:configure.ac:48: -1- m4_pattern_allow([^AS_FLAGS$])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^_?m4_])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^dnl$])
m4trace:configure.ac:48: -1- m4_pattern_forbid([^_?AS_])
m4trace:configure.ac:48: -1- AC_SUBST([SHELL])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([SHELL])
m4trace:configure.ac:48: -1- m4_pattern_allow([^SHELL$])
m4trace:configure.ac:48: -1- AC_SUBST([PATH_SEPARATOR])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PATH_SEPARATOR$])
m4trace:configure.ac:48: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([PACKAGE_NAME])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_NAME$])
m4trace:configure.ac:48: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
m4trace:configure.ac:48: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_VERSION$])
m4trace:configure.ac:48: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([PACKAGE_STRING])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_STRING$])
m4trace:configure.ac:48: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
m4trace:configure.ac:48: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([PACKAGE_URL])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_URL$])
m4trace:configure.ac:48: -1- AC_SUBST([exec_prefix], [NONE])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([exec_prefix])
m4trace:configure.ac:48: -1- m4_pattern_allow([^exec_prefix$])
m4trace:configure.ac:48: -1- AC_SUBST([prefix], [NONE])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([prefix])
m4trace:configure.ac:48: -1- m4_pattern_allow([^prefix$])
m4trace:configure.ac:48: -1- AC_SUBST([program_transform_name], [s,x,x,])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([program_transform_name])
m4trace:configure.ac:48: -1- m4_pattern_allow([^program_transform_name$])
m4trace:configure.ac:48: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([bindir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^bindir$])
m4trace:configure.ac:48: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([sbindir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^sbindir$])
m4trace:configure.ac:48: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([libexecdir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^libexecdir$])
m4trace:configure.ac:48: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([datarootdir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^datarootdir$])
m4trace:configure.ac:48: -1- AC_SUBST([datadir], ['${datarootdir}'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([datadir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^datadir$])
m4trace:configure.ac:48: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([sysconfdir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^sysconfdir$])
m4trace:configure.ac:48: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([sharedstatedir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^sharedstatedir$])
m4trace:configure.ac:48: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([localstatedir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^localstatedir$])
m4trace:configure.ac:48: -1- AC_SUBST([includedir], ['${prefix}/include'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([includedir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^includedir$])
m4trace:configure.ac:48: -1- AC_SUBST([oldincludedir], ['/usr/include'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([oldincludedir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^oldincludedir$])
m4trace:configure.ac:48: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
['${datarootdir}/doc/${PACKAGE_TARNAME}'],
['${datarootdir}/doc/${PACKAGE}'])])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([docdir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^docdir$])
m4trace:configure.ac:48: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([infodir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^infodir$])
m4trace:configure.ac:48: -1- AC_SUBST([htmldir], ['${docdir}'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([htmldir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^htmldir$])
m4trace:configure.ac:48: -1- AC_SUBST([dvidir], ['${docdir}'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([dvidir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^dvidir$])
m4trace:configure.ac:48: -1- AC_SUBST([pdfdir], ['${docdir}'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([pdfdir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^pdfdir$])
m4trace:configure.ac:48: -1- AC_SUBST([psdir], ['${docdir}'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([psdir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^psdir$])
m4trace:configure.ac:48: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([libdir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^libdir$])
m4trace:configure.ac:48: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([localedir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^localedir$])
m4trace:configure.ac:48: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([mandir])
m4trace:configure.ac:48: -1- m4_pattern_allow([^mandir$])
m4trace:configure.ac:48: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_NAME$])
m4trace:configure.ac:48: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
@%:@undef PACKAGE_NAME])
m4trace:configure.ac:48: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
m4trace:configure.ac:48: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
@%:@undef PACKAGE_TARNAME])
m4trace:configure.ac:48: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_VERSION$])
m4trace:configure.ac:48: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
@%:@undef PACKAGE_VERSION])
m4trace:configure.ac:48: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_STRING$])
m4trace:configure.ac:48: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
@%:@undef PACKAGE_STRING])
m4trace:configure.ac:48: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
m4trace:configure.ac:48: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
@%:@undef PACKAGE_BUGREPORT])
m4trace:configure.ac:48: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL])
m4trace:configure.ac:48: -1- m4_pattern_allow([^PACKAGE_URL$])
m4trace:configure.ac:48: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */
@%:@undef PACKAGE_URL])
m4trace:configure.ac:48: -1- AC_SUBST([DEFS])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([DEFS])
m4trace:configure.ac:48: -1- m4_pattern_allow([^DEFS$])
m4trace:configure.ac:48: -1- AC_SUBST([ECHO_C])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([ECHO_C])
m4trace:configure.ac:48: -1- m4_pattern_allow([^ECHO_C$])
m4trace:configure.ac:48: -1- AC_SUBST([ECHO_N])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([ECHO_N])
m4trace:configure.ac:48: -1- m4_pattern_allow([^ECHO_N$])
m4trace:configure.ac:48: -1- AC_SUBST([ECHO_T])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([ECHO_T])
m4trace:configure.ac:48: -1- m4_pattern_allow([^ECHO_T$])
m4trace:configure.ac:48: -1- AC_SUBST([LIBS])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([LIBS])
m4trace:configure.ac:48: -1- m4_pattern_allow([^LIBS$])
m4trace:configure.ac:48: -1- AC_SUBST([build_alias])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([build_alias])
m4trace:configure.ac:48: -1- m4_pattern_allow([^build_alias$])
m4trace:configure.ac:48: -1- AC_SUBST([host_alias])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([host_alias])
m4trace:configure.ac:48: -1- m4_pattern_allow([^host_alias$])
m4trace:configure.ac:48: -1- AC_SUBST([target_alias])
m4trace:configure.ac:48: -1- AC_SUBST_TRACE([target_alias])
m4trace:configure.ac:48: -1- m4_pattern_allow([^target_alias$])
m4trace:configure.ac:89: -1- AC_SUBST([PYTHON])
m4trace:configure.ac:89: -1- AC_SUBST_TRACE([PYTHON])
m4trace:configure.ac:89: -1- m4_pattern_allow([^PYTHON$])
m4trace:configure.ac:89: -1- AC_SUBST([PYTHON])
m4trace:configure.ac:89: -1- AC_SUBST_TRACE([PYTHON])
m4trace:configure.ac:89: -1- m4_pattern_allow([^PYTHON$])
m4trace:configure.ac:89: -1- AC_SUBST([PYTHON])
m4trace:configure.ac:89: -1- AC_SUBST_TRACE([PYTHON])
m4trace:configure.ac:89: -1- m4_pattern_allow([^PYTHON$])
m4trace:configure.ac:89: -1- AC_SUBST([PYTHON])
m4trace:configure.ac:89: -1- AC_SUBST_TRACE([PYTHON])
m4trace:configure.ac:89: -1- m4_pattern_allow([^PYTHON$])
m4trace:configure.ac:89: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from...
m4/python.m4:191: PC_PYTHON_VERIFY_VERSION is expanded from...
m4/python.m4:117: PC_INIT is expanded from...
configure.ac:89: the top level])
m4trace:configure.ac:89: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from...
m4/python.m4:191: PC_PYTHON_VERIFY_VERSION is expanded from...
m4/python.m4:117: PC_INIT is expanded from...
configure.ac:89: the top level])
m4trace:configure.ac:137: -2- AC_SUBST([VIRTUALENV])
m4trace:configure.ac:137: -2- AC_SUBST_TRACE([VIRTUALENV])
m4trace:configure.ac:137: -2- m4_pattern_allow([^VIRTUALENV$])
m4trace:configure.ac:141: -2- AC_SUBST([VIRTUALENV], [no])
m4trace:configure.ac:141: -2- AC_SUBST_TRACE([VIRTUALENV])
m4trace:configure.ac:141: -2- m4_pattern_allow([^VIRTUALENV$])
m4trace:configure.ac:142: -1- AC_SUBST([VIRTUALENV_FLAGS])
m4trace:configure.ac:142: -1- AC_SUBST_TRACE([VIRTUALENV_FLAGS])
m4trace:configure.ac:142: -1- m4_pattern_allow([^VIRTUALENV_FLAGS$])
m4trace:configure.ac:166: -1- AC_REQUIRE_AUX_FILE([install-sh])
m4trace:configure.ac:166: -1- AC_SUBST([MKDIR_P])
m4trace:configure.ac:166: -1- AC_SUBST_TRACE([MKDIR_P])
m4trace:configure.ac:166: -1- m4_pattern_allow([^MKDIR_P$])
m4trace:configure.ac:167: -1- AC_REQUIRE_AUX_FILE([install-sh])
m4trace:configure.ac:167: -1- AC_SUBST([INSTALL_PROGRAM])
m4trace:configure.ac:167: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
m4trace:configure.ac:167: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
m4trace:configure.ac:167: -1- AC_SUBST([INSTALL_SCRIPT])
m4trace:configure.ac:167: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
m4trace:configure.ac:167: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
m4trace:configure.ac:167: -1- AC_SUBST([INSTALL_DATA])
m4trace:configure.ac:167: -1- AC_SUBST_TRACE([INSTALL_DATA])
m4trace:configure.ac:167: -1- m4_pattern_allow([^INSTALL_DATA$])
m4trace:configure.ac:237: -1- AC_SUBST([PYTHON_CONFIG])
m4trace:configure.ac:237: -1- AC_SUBST_TRACE([PYTHON_CONFIG])
m4trace:configure.ac:237: -1- m4_pattern_allow([^PYTHON_CONFIG$])
m4trace:configure.ac:237: -1- AC_SUBST([PYTHON_CONFIG])
m4trace:configure.ac:237: -1- AC_SUBST_TRACE([PYTHON_CONFIG])
m4trace:configure.ac:237: -1- m4_pattern_allow([^PYTHON_CONFIG$])
m4trace:configure.ac:237: -1- AC_SUBST([PYTHON_PREFIX], [$pc_cv_python_prefix])
m4trace:configure.ac:237: -1- AC_SUBST_TRACE([PYTHON_PREFIX])
m4trace:configure.ac:237: -1- m4_pattern_allow([^PYTHON_PREFIX$])
m4trace:configure.ac:237: -1- AC_SUBST([pythondir], [\${prefix}/$pc_cv_python_site_dir])
m4trace:configure.ac:237: -1- AC_SUBST_TRACE([pythondir])
m4trace:configure.ac:237: -1- m4_pattern_allow([^pythondir$])
m4trace:configure.ac:237: -1- AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
m4trace:configure.ac:237: -1- AC_SUBST_TRACE([pkgpythondir])
m4trace:configure.ac:237: -1- m4_pattern_allow([^pkgpythondir$])
m4trace:configure.ac:253: -1- AC_SUBST([PYTHON_EXEC_PREFIX], [$pc_cv_python_exec_prefix])
m4trace:configure.ac:253: -1- AC_SUBST_TRACE([PYTHON_EXEC_PREFIX])
m4trace:configure.ac:253: -1- m4_pattern_allow([^PYTHON_EXEC_PREFIX$])
m4trace:configure.ac:253: -1- AC_SUBST([pyexecdir], [\${exec_prefix}/$pc_cv_python_pyexecdir])
m4trace:configure.ac:253: -1- AC_SUBST_TRACE([pyexecdir])
m4trace:configure.ac:253: -1- m4_pattern_allow([^pyexecdir$])
m4trace:configure.ac:253: -1- AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
m4trace:configure.ac:253: -1- AC_SUBST_TRACE([pkgpyexecdir])
m4trace:configure.ac:253: -1- m4_pattern_allow([^pkgpyexecdir$])
m4trace:configure.ac:397: -1- AC_CONFIG_FILES([Makefile setup.py])
m4trace:configure.ac:399: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.ac:399: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
m4trace:configure.ac:399: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:399: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
m4trace:configure.ac:399: -1- AC_SUBST_TRACE([LTLIBOBJS])
m4trace:configure.ac:399: -1- m4_pattern_allow([^LTLIBOBJS$])
m4trace:configure.ac:399: -1- AC_SUBST_TRACE([top_builddir])
m4trace:configure.ac:399: -1- AC_SUBST_TRACE([top_build_prefix])
m4trace:configure.ac:399: -1- AC_SUBST_TRACE([srcdir])
m4trace:configure.ac:399: -1- AC_SUBST_TRACE([abs_srcdir])
m4trace:configure.ac:399: -1- AC_SUBST_TRACE([top_srcdir])
m4trace:configure.ac:399: -1- AC_SUBST_TRACE([abs_top_srcdir])
m4trace:configure.ac:399: -1- AC_SUBST_TRACE([builddir])
m4trace:configure.ac:399: -1- AC_SUBST_TRACE([abs_builddir])
m4trace:configure.ac:399: -1- AC_SUBST_TRACE([abs_top_builddir])
m4trace:configure.ac:399: -1- AC_SUBST_TRACE([INSTALL])
m4trace:configure.ac:399: -1- AC_SUBST_TRACE([MKDIR_P])

527
install-sh Executable file
View File

@ -0,0 +1,527 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

638
m4/python.m4 Normal file
View File

@ -0,0 +1,638 @@
# Copyright 2012, 2013 Brandon Invergo <brandon@invergo.net>
#
# This file is part of pyconfigure. 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.
#
# Under Section 7 of GPL version 3, you are granted additional
# permissions described in the Autoconf Configure Script Exception,
# version 3.0, as published by the Free Software Foundation.
#
# You should have received a copy of the GNU General Public License
# and a copy of the Autoconf Configure Script Exception along with
# this program; see the files COPYINGv3 and COPYING.EXCEPTION
# respectively. If not, see <http://www.gnu.org/licenses/>.
# Many of these macros were adapted from ones written by Andrew Dalke
# and James Henstridge and are included with the Automake utility
# under the following copyright terms:
#
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Table of Contents:
#
# 1. Language selection
# and routines to produce programs in a given language.
#
# 2. Producing programs in a given language.
#
# 3. Looking for a compiler
# And possibly the associated preprocessor.
#
# 4. Looking for specific libs & functionality
## ----------------------- ##
## 1. Language selection. ##
## ----------------------- ##
# AC_LANG(Python)
# ---------------
AC_LANG_DEFINE([Python], [py], [PY], [PYTHON], [],
[ac_ext=py
ac_compile='chmod +x conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
ac_link='chmod +x conftest.$ac_ext && cp conftest.$ac_ext conftest >&AS_MESSAGE_LOG_FD'
])
# AC_LANG_PYTHON
# --------------
AU_DEFUN([AC_LANG_PYTHON], [AC_LANG(Python)])
## ----------------------- ##
## 2. Producing programs. ##
## ----------------------- ##
# AC_LANG_PROGRAM(Python)([PROLOGUE], [BODY])
# -------------------------------------------
m4_define([AC_LANG_PROGRAM(Python)], [dnl
@%:@!$PYTHON
$1
m4_if([$2], [], [], [dnl
if __name__ == '__main__':
$2])])
# _AC_LANG_IO_PROGRAM(Python)
# ---------------------------
# Produce source that performs I/O.
m4_define([_AC_LANG_IO_PROGRAM(Python)],
[AC_LANG_PROGRAM([dnl
import sys
try:
h = open('conftest.out')
except:
sys.exit(1)
else:
close(h)
sys.exit(0)
], [])])
# _AC_LANG_CALL(Python)([PROLOGUE], [FUNCTION])
# ---------------------
# Produce source that calls FUNCTION
m4_define([_AC_LANG_CALL(Python)],
[AC_LANG_PROGRAM([$1], [$2])])
## -------------------------------------------- ##
## 3. Looking for Compilers and Interpreters. ##
## -------------------------------------------- ##
AC_DEFUN([AC_LANG_COMPILER(Python)],
[AC_REQUIRE([AC_PROG_PYTHON])])
# PC_INIT([MIN_VER], [MAX_VER])
# -----------------------------
# Initialize pyconfigure, finding a Python interpreter with a given
# minimum and/or maximum version.
AC_DEFUN([PC_INIT],
[AC_ARG_VAR([PYTHON], [the Python interpreter])
dnl The default minimum version is 2.0
m4_define_default([pc_min_ver], m4_ifval([$1], [$1], [2.0]))
dnl The default maximum version is 3.3
m4_define_default([pc_max_ver], m4_ifval([$2], [$2], [3.3]))
dnl Build up a list of possible interpreter names.
m4_define_default([_PC_PYTHON_INTERPRETER_LIST],
dnl Construct a comma-separated list of interpreter names (python2.6,
dnl python2.7, etc). We only care about the first 3 characters of the
dnl version strings (major-dot-minor; not
dnl major-dot-minor-dot-bugfix[-dot-whatever])
[m4_foreach([pc_ver],
m4_esyscmd_s(seq -s[[", "]] -f["[[%.1f]]"] m4_substr(pc_max_ver, [0], [3]) -0.1 m4_substr(pc_min_ver, [0], [3])),
dnl Remove python2.8 and python2.9 since they will never exist
[m4_bmatch(pc_ver, [2.[89]], [], [python]pc_ver)] ) \
dnl If we want some Python 3 versions (max version >= 3.0),
dnl also search for "python3"
m4_if(m4_version_compare(pc_max_ver, [2.9]), [1], [python3], []) \
dnl If we want some Python 2 versions (min version <= 2.7),
dnl also search for "python2". Finally, also search for plain ol' "python"
m4_if(m4_version_compare(pc_min_ver, [2.8]), [-1], [python2], []) [python]])
dnl Do the actual search at last.
AC_PATH_PROGS(PYTHON, [_PC_PYTHON_INTERPRETER_LIST])
dnl If we found something, do a sanity check that the interpreter really
dnl has the version its name would suggest.
m4_ifval([PYTHON],
[PC_PYTHON_VERIFY_VERSION([>=], [pc_min_ver],
[AC_MSG_RESULT([yes])],
[AC_MSG_FAILURE([No compatible Python interpreter found. If you're sure that you have one, try setting the PYTHON environment variable to the location of the interpreter.])])])
m4_ifval([PYTHON],
[PC_PYTHON_VERIFY_VERSION([<=], [pc_max_ver],
[AC_MSG_RESULT([yes])],
[AC_MSG_FAILURE([No compatible Python interpreter found. If you're sure that you have one, try setting the PYTHON environment variable to the location of the interpreter.])])])
])# PC_INIT
# AC_PROG_PYTHON(PROG-TO-CHECK-FOR)
# ---------------------------------
# Find a Python interpreter. Python versions prior to 2.0 are not
# supported. (2.0 was released on October 16, 2000).
AC_DEFUN([AC_PROG_PYTHON],
[AC_ARG_VAR([PYTHON], [the Python interpreter])
m4_define_default([_PC_PYTHON_INTERPRETER_LIST],
[python python3 python3.3 python3.2 python3.1 python3.0 python2 python2.7 dnl
python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
m4_ifval([$1],
[AC_PATH_PROGS(PYTHON, [$1 _PC_PYTHON_INTERPRETER_LIST])],
[AC_PATH_PROGS(PYTHON, [_PC_PYTHON_INTERPRETER_LIST])])
])
# PC_PYTHON_PROG_PYTHON_CONFIG(PROG-TO-CHECK-FOR)
# ----------------------------------------------
# Find the python-config program
AC_DEFUN([PC_PYTHON_PROG_PYTHON_CONFIG],
[AC_REQUIRE([PC_INIT])[]dnl
AC_ARG_VAR([PYTHON_CONFIG], [the Python-config program])
dnl python-config's binary name is normally based on the Python interpreter's
dnl binary name (i.e. python2.7 -> python2.7-config)
m4_define([_PYTHON_BASENAME], [`basename $PYTHON`])
m4_ifval([$1],
[AC_PATH_PROGS(PYTHON_CONFIG, [$1 _PYTHON_BASENAME-config])],
[AC_PATH_PROG(PYTHON_CONFIG, _PYTHON_BASENAME-config)])
]) # PC_PYTHON_PROG_PYTHON_CONFIG
# PC_PYTHON_VERIFY_VERSION(RELATION, VERSION, [ACTION-IF-TRUE], [ACTION-IF-NOT-FOUND])
# ---------------------------------------------------------------------------
# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
# Run ACTION-IF-FALSE otherwise.
# Specify RELATION as any mathematical comparison "<", ">", "<=", ">=", "==" or "!="
# This test uses sys.hexversion instead of the string equivalent (first
# word of sys.version), in order to cope with versions such as 2.2c1.
# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
AC_DEFUN([PC_PYTHON_VERIFY_VERSION],
[m4_define([pc_python_safe_ver], m4_bpatsubsts($2, [\.], [_]))
AC_CACHE_CHECK([if Python $1 '$2'],
[[pc_cv_python_min_version_]pc_python_safe_ver],
[AC_LANG_PUSH(Python)[]dnl
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([dnl
import sys
], [dnl
# split strings by '.' and convert to numeric. Append some zeros
# because we need at least 4 digits for the hex conversion.
# map returns an iterator in Python 3.0 and a list in 2.x
reqver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
reqverhex = 0
# xrange is not present in Python 3.0 and range returns an iterator
for i in list(range(4)):
reqverhex = (reqverhex << 8) + reqver[[i]]
if sys.hexversion $1 reqverhex:
sys.exit()
else:
sys.exit(1)
])],
[[pc_cv_python_req_version_]pc_python_safe_ver="yes"],
[[pc_cv_python_req_version_]pc_python_safe_ver="no"])
AC_LANG_POP(Python)[]dnl
])
AS_IF([test "$[pc_cv_python_req_version_]pc_python_safe_ver" = "no"], [$4], [$3])
])# PC_PYTHON_VERIFY_VERSION
# PC_PYTHON_CHECK_VERSION
# -----------------------
# Query Python for its version number. Getting [:3] seems to be
# the best way to do this; it's what "site.py" does in the standard
# library.
AC_DEFUN([PC_PYTHON_CHECK_VERSION],
[AC_REQUIRE([PC_INIT])[]dnl
AC_CACHE_CHECK([for $1 version],
[pc_cv_python_version],
[AC_LANG_PUSH(Python)[]dnl
AC_LANG_CONFTEST([
AC_LANG_PROGRAM([dnl
import sys
], [dnl
sys.stdout.write(sys.version[[:3]])
])])
pc_cv_python_version=`$PYTHON conftest.py`
AC_LANG_POP(Python)[]dnl
])
AC_SUBST([PYTHON_VERSION], [$pc_cv_python_version])
])# PC_PYTHON_CHECK_VERSION
# PC_PYTHON_CHECK_PREFIX
# ----------------------
# Use the value of $prefix for the corresponding value of
# PYTHON_PREFIX. This is made a distinct variable so it can be
# overridden if need be. However, general consensus is that you
# shouldn't need this ability.
AC_DEFUN([PC_PYTHON_CHECK_PREFIX],
[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to get it with python-config otherwise do it from within Python
AC_CACHE_CHECK([for Python prefix], [pc_cv_python_prefix],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_prefix=`$PYTHON_CONFIG --prefix 2>&AS_MESSAGE_LOG_FD`
else
AC_LANG_PUSH(Python)[]dnl
pc_cv_python_prefix=AC_LANG_CONFTEST([AC_LANG_PROGRAM([dnl
import sys
], [dnl
sys.exit(sys.prefix)
])])
AC_LANG_POP(Python)[]dnl
fi])
AC_SUBST([PYTHON_PREFIX], [$pc_cv_python_prefix])])
# PC_PYTHON_CHECK_EXEC_PREFIX
# --------------------------
# Like above, but for $exec_prefix
AC_DEFUN([PC_PYTHON_CHECK_EXEC_PREFIX],
[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to get it with python-config otherwise do it from within Python
AC_CACHE_CHECK([for Python exec-prefix], [pc_cv_python_exec_prefix],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_exec_prefix=`$PYTHON_CONFIG --exec-prefix 2>&AS_MESSAGE_LOG_FD`
else
AC_LANG_PUSH(Python)[]dnl
pc_cv_python_exec_prefix=AC_LANG_CONFTEST([AC_LANG_PROGRAM([dnl
import sys
], [dnl
sys.exit(sys.exec_prefix)
])])
AC_LANG_POP(Python)[]dnl
fi
])
AC_SUBST([PYTHON_EXEC_PREFIX], [$pc_cv_python_exec_prefix])])
# PC_PYTHON_CHECK_INCLUDES
# ------------------------
# Find the Python header file include flags (ie
# '-I/usr/include/python')
AC_DEFUN([PC_PYTHON_CHECK_INCLUDES],
[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to find the headers location with python-config otherwise guess
AC_CACHE_CHECK([for Python includes], [pc_cv_python_includes],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_includes=`$PYTHON_CONFIG --includes 2>&AS_MESSAGE_LOG_FD`
else
pc_cv_python_includes="[-I$includedir/$_PYTHON_BASENAME]m4_ifdef(PYTHON_ABI_FLAGS,
PYTHON_ABI_FLAGS,)"
fi
])
AC_SUBST([PYTHON_INCLUDES], [$pc_cv_python_includes])])
# PC_PYTHON_CHECK_HEADERS([ACTION-IF-PRESENT], [ACTION-IF-ABSENT])
# -----------------------
# Check for the presence and usability of Python.h
AC_DEFUN([PC_PYTHON_CHECK_HEADERS],
[AC_REQUIRE([PC_PYTHON_CHECK_INCLUDES])[]dnl
pc_cflags_store=$CPPFLAGS
CPPFLAGS="$CFLAGS $PYTHON_INCLUDES"
AC_CHECK_HEADER([Python.h], [$1], [$2])
CPPFLAGS=$pc_cflags_store
])
# PC_PYTHON_CHECK_LIBS
# --------------------
# Find the Python lib flags (ie '-lpython')
AC_DEFUN([PC_PYTHON_CHECK_LIBS],
[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to find the lib flags with python-config otherwise guess
AC_CACHE_CHECK([for Python libs], [pc_cv_python_libs],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_libs=`$PYTHON_CONFIG --libs 2>&AS_MESSAGE_LOG_FD`
else
pc_cv_python_libs="[-l$_PYTHON_BASENAME]m4_ifdef(PYTHON_ABI_FLAGS, PYTHON_ABI_FLAGS,)"
fi
])
AC_SUBST([PYTHON_LIBS], [$pc_cv_python_libs])])
# PC_PYTHON_TEST_LIBS(LIBRARY-FUNCTION, [ACTION-IF-PRESENT], [ACTION-IF-ABSENT])
# -------------------
# Verify that the Python libs can be loaded
AC_DEFUN([PC_PYTHON_TEST_LIBS],
[AC_REQUIRE([PC_PYTHON_CHECK_LIBS])[]dnl
pc_libflags_store=$LIBS
for lflag in $PYTHON_LIBS; do
case $lflag in
-lpython*@:}@
LIBS="$LIBS $lflag"
pc_libpython=`echo $lflag | sed -e 's/^-l//'`
;;
*@:}@;;
esac
done
AC_CHECK_LIB([$pc_libpython], [$1], [$2], [$3])])
# PC_PYTHON_CHECK_CFLAGS
# ----------------------
# Find the Python CFLAGS
AC_DEFUN([PC_PYTHON_CHECK_CFLAGS],
[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to find the CFLAGS with python-config otherwise give up
AC_CACHE_CHECK([for Python CFLAGS], [pc_cv_python_cflags],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_cflags=`$PYTHON_CONFIG --cflags 2>&AS_MESSAGE_LOG_FD`
else
pc_cv_python_cflags=
fi
])
AC_SUBST([PYTHON_CFLAGS], [$pc_cv_python_cflags])])
# PC_PYTHON_CHECK_LDFLAGS
# -----------------------
# Find the Python LDFLAGS
AC_DEFUN([PC_PYTHON_CHECK_LDFLAGS],
[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to find the LDFLAGS with python-config otherwise give up
AC_CACHE_CHECK([for Python LDFLAGS], [pc_cv_python_ldflags],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_ldflags=`$PYTHON_CONFIG --ldflags 2>&AS_MESSAGE_LOG_FD`
else
pc_cv_python_ldflags=
fi
])
AC_SUBST([PYTHON_LDFLAGS], [$pc_cv_python_ldflags])])
# PC_PYTHON_CHECK_EXTENSION_SUFFIX
# --------------------------------
# Find the Python extension suffix (i.e. '.cpython-32.so')
AC_DEFUN([PC_PYTHON_CHECK_EXTENSION_SUFFIX],
[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to find the suffix with python-config otherwise give up
AC_CACHE_CHECK([for Python extension suffix], [pc_cv_python_extension_suffix],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_extension_suffix=`$PYTHON_CONFIG --extension-suffix 2>&AS_MESSAGE_LOG_FD`
else
pc_cv_python_extension_suffix=
fi
])
AC_SUBST([PYTHON_EXTENSION_SUFFIX], [$pc_cv_python_extension_suffix])])
# PC_PYTHON_CHECK_ABI_FLAGS
# -------------------------
# Find the Python ABI flags
AC_DEFUN([PC_PYTHON_CHECK_ABI_FLAGS],
[AC_REQUIRE([PC_PYTHON_PROG_PYTHON_CONFIG])[]dnl
dnl Try to find the ABI flags with python-config otherwise give up
AC_CACHE_CHECK([for Python ABI flags], [pc_cv_python_abi_flags],
[if test -x "$PYTHON_CONFIG"; then
pc_cv_python_abi_flags=`$PYTHON_CONFIG --abiflags 2>&AS_MESSAGE_LOG_FD`
else
pc_cv_python_abi_flags=
fi
])
AC_SUBST([PYTHON_ABI_FLAGS], [$pc_cv_python_abi_flags])])
# PC_PYTHON_CHECK_PLATFORM
# ------------------------
# At times (like when building shared libraries) you may want
# to know which OS platform Python thinks this is.
AC_DEFUN([PC_PYTHON_CHECK_PLATFORM],
[AC_REQUIRE([PC_INIT])[]dnl
dnl Get the platform from within Python (sys.platform)
AC_CACHE_CHECK([for Python platform],
[pc_cv_python_platform],
[AC_LANG_PUSH(Python)[]dnl
AC_LANG_CONFTEST([
AC_LANG_PROGRAM([dnl
import sys
], [dnl
sys.stdout.write(sys.platform)
])])
pc_cv_python_platform=`$PYTHON conftest.py`
AC_LANG_POP(Python)[]dnl
])
AC_SUBST([PYTHON_PLATFORM], [$pc_cv_python_platform])
])
# PC_PYTHON_CHECK_SITE_DIR
# ---------------------
# The directory to which new libraries are installed (i.e. the
# "site-packages" directory.
AC_DEFUN([PC_PYTHON_CHECK_SITE_DIR],
[AC_REQUIRE([PC_INIT])AC_REQUIRE([PC_PYTHON_CHECK_PREFIX])[]dnl
AC_CACHE_CHECK([for Python site-packages directory],
[pc_cv_python_site_dir],
[AC_LANG_PUSH(Python)[]dnl
if test "x$prefix" = xNONE
then
pc_py_prefix=$ac_default_prefix
else
pc_py_prefix=$prefix
fi
AC_LANG_CONFTEST([
AC_LANG_PROGRAM([dnl
import sys
from platform import python_implementation
# sysconfig in CPython 2.7 doesn't work in virtualenv
# <https://github.com/pypa/virtualenv/issues/118>
try:
import sysconfig
except:
can_use_sysconfig = False
else:
can_use_sysconfig = True
if can_use_sysconfig:
if python_implementation() == "CPython" and sys.version[[:3]] == '2.7':
can_use_sysconfig = False
if not can_use_sysconfig:
from distutils import sysconfig
sitedir = sysconfig.get_python_lib(False, False, prefix='$pc_py_prefix')
else:
sitedir = sysconfig.get_path('purelib', vars={'base':'$pc_py_prefix'})
], [dnl
sys.stdout.write(sitedir)
])])
pc_cv_python_site_dir=`$PYTHON conftest.py`
AC_LANG_POP(Python)[]dnl
case $pc_cv_python_site_dir in
$pc_py_prefix*)
pc__strip_prefix=`echo "$pc_py_prefix" | sed 's|.|.|g'`
pc_cv_python_site_dir=`echo "$pc_cv_python_site_dir" | sed "s,^$pc__strip_prefix/,,"`
;;
*)
case $pc_py_prefix in
/usr|/System*) ;;
*)
pc_cv_python_site_dir=lib/python$PYTHON_VERSION/site-packages
;;
esac
;;
esac
])
AC_SUBST([pythondir], [\${prefix}/$pc_cv_python_site_dir])])# PC_PYTHON_CHECK_SITE_DIR
# PC_PYTHON_SITE_PACKAGE_DIR
# --------------------------
# $PACKAGE directory under PYTHON_SITE_DIR
AC_DEFUN([PC_PYTHON_SITE_PACKAGE_DIR],
[AC_REQUIRE([PC_PYTHON_CHECK_SITE_DIR])[]dnl
AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])])
# PC_PYTHON_CHECK_EXEC_DIR
# ------------------------
# directory for installing python extension modules (shared libraries)
AC_DEFUN([PC_PYTHON_CHECK_EXEC_DIR],
[AC_REQUIRE([PC_INIT])AC_REQUIRE([PC_PYTHON_CHECK_EXEC_PREFIX])[]dnl
AC_CACHE_CHECK([for Python extension module directory],
[pc_cv_python_exec_dir],
[AC_LANG_PUSH(Python)[]dnl
if test "x$pc_cv_python_exec_prefix" = xNONE
then
pc_py_exec_prefix=$pc_cv_python_prefix
else
pc_py_exec_prefix=$pc_cv_python_exec_prefix
fi
AC_LANG_CONFTEST([
AC_LANG_PROGRAM([dnl
import sys
from platform import python_implementation
# sysconfig in CPython 2.7 doesn't work in virtualenv
# <https://github.com/pypa/virtualenv/issues/118>
try:
import sysconfig
except:
can_use_sysconfig = False
else:
can_use_sysconfig = True
if can_use_sysconfig:
if python_implementation() == "CPython" and sys.version[[:3]] == '2.7':
can_use_sysconfig = False
if not can_use_sysconfig:
from distutils import sysconfig
sitedir = sysconfig.get_python_lib(False, False, prefix='$pc_py__exec_prefix')
else:
sitedir = sysconfig.get_path('purelib', vars={'platbase':'$pc_py_exec_prefix'})
], [dnl
sys.stdout.write(sitedir)
])])
pc_cv_python_exec_dir=`$PYTHON conftest.py`
AC_LANG_POP(Python)[]dnl
case $pc_cv_python_exec_dir in
$pc_py_exec_prefix*)
pc__strip_prefix=`echo "$pc_py_exec_prefix" | sed 's|.|.|g'`
pc_cv_python_exec_dir=`echo "$pc_cv_python_exec_dir" | sed "s,^$pc__strip_prefix/,,"`
;;
*)
case $pc_py_exec_prefix in
/usr|/System*) ;;
*)
pc_cv_python_exec_dir=lib/python$PYTHON_VERSION/site-packages
;;
esac
;;
esac
])
AC_SUBST([pyexecdir], [\${exec_prefix}/$pc_cv_python_pyexecdir])]) #PY_PYTHON_CHECK_EXEC_LIB_DIR
# PC_PYTHON_EXEC_PACKAGE_DIR
# --------------------------
# $PACKAGE directory under PYTHON_SITE_DIR
AC_DEFUN([PC_PYTHON_EXEC_PACKAGE_DIR],
[AC_REQUIRE([PC_PYTHON_CHECK_EXEC_DIR])[]dnl
AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])])
## -------------------------------------------- ##
## 4. Looking for specific libs & functionality ##
## -------------------------------------------- ##
# PC_PYTHON_CHECK_MODULE(LIBRARY, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# ----------------------------------------------------------------------
# Macro for checking if a Python library is installed
AC_DEFUN([PC_PYTHON_CHECK_MODULE],
[AC_REQUIRE([PC_INIT])[]dnl
m4_define([pc_python_safe_mod], m4_bpatsubsts($1, [\.], [_]))
AC_CACHE_CHECK([for Python '$1' library],
[[pc_cv_python_module_]pc_python_safe_mod],
[AC_LANG_PUSH(Python)[]dnl
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([dnl
import sys
try:
import $1
except:
sys.exit(1)
else:
sys.exit(0)
], [])],
[[pc_cv_python_module_]pc_python_safe_mod="yes"],
[[pc_cv_python_module_]pc_python_safe_mod="no"])
AC_LANG_POP(Python)[]dnl
])
AS_IF([test "$[pc_cv_python_module_]pc_python_safe_mod" = "no"], [$3], [$2])
])# PC_PYTHON_CHECK_MODULE
# PC_PYTHON_CHECK_FUNC([LIBRARY], FUNCTION, ARGS, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# ---------------------------------------------------------------------------------------
# Check to see if a given function call, optionally from a module, can
# be successfully called
AC_DEFUN([PC_PYTHON_CHECK_FUNC],
[AC_REQUIRE([PC_INIT])[]dnl
m4_define([pc_python_safe_mod], m4_bpatsubsts($1, [\.], [_]))
AC_CACHE_CHECK([for Python m4_ifnblank($1, '$1.$2()', '$2()') function],
[[pc_cv_python_func_]pc_python_safe_mod[_$2]],
[AC_LANG_PUSH(Python)[]dnl
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([dnl
import sys
m4_ifnblank([$1], [dnl
try:
import $1
except:
sys.exit(1)
], [])],
[
m4_ifnblank([$1], [
try:
$1.$2($3)], [
try:
$2($3)])
except:
sys.exit(1)
else:
sys.exit(0)
])],
[[pc_cv_python_func_]pc_python_safe_mod[_$2]="yes"],
[[pc_cv_python_func_]pc_python_safe_mod[_$2]="no"])
AC_LANG_POP(Python)[]dnl
])
AS_IF([test "$[pc_cv_python_func_]pc_python_safe_mod[_$2]" = "no"], [$5], [$4])
])# PC_PYTHON_CHECK_FUNC