@@ -1732,127 +1732,6 @@ if test "x$ac_cv_have_php" != "xno" -a "x$ac_cv_have_php_config" != "xno"; then
17321732 AC_SUBST ( PHP_CFLAGS )
17331733fi
17341734
1735- #
1736- # Python checks for mod_python (scroll down to see python3 checks for mod_python3)
1737- #
1738- AC_ARG_WITH (
1739- [ python] ,
1740- [ AS_HELP_STRING ( [ --with-python] , [ Use system provided version of python (default: try)] ) ] ,
1741- [ with_python="$withval"] ,
1742- [ with_python="try"]
1743- )
1744-
1745- if test "$with_python" != "no"
1746- then
1747- save_CFLAGS="$CFLAGS"
1748- save_LIBS="$LIBS"
1749-
1750- if test "$with_python" != "yes" -a "$with_python" != "try" ; then
1751- AC_MSG_CHECKING ( [ for python] )
1752- if test ! -x "$with_python" ; then
1753- AC_MSG_ERROR ( [ Specified python does not exist or is not executable: $with_python] )
1754- fi
1755- AC_MSG_RESULT ( [ $with_python] )
1756- AC_SUBST ( [ PYTHON] , [ "$with_python"] )
1757- else
1758- AC_PATH_PROG ( [ PYTHON] , [ "python"] , [ "no"] , [ "$PATH:/usr/bin:/usr/local/bin"] )
1759- fi
1760-
1761- if test "$PYTHON" != "no" ; then
1762- AC_MSG_CHECKING ( [ python version] )
1763- PYTHON_VER="`$PYTHON -V 2>&1 | cut -d' ' -f2`"
1764-
1765- if test -z "$PYTHON_VER" ; then
1766- AC_MSG_ERROR ( [ Unable to detect python version] )
1767- fi
1768- AC_MSG_RESULT ( [ $PYTHON_VER] )
1769-
1770- AC_MSG_CHECKING ( [ for python distutils] )
1771- python_result="`$PYTHON -c 'import distutils;' 2>&1`"
1772- if test -z "$python_result" ; then
1773- python_has_distutils="yes"
1774- else
1775- python_has_distutils="no"
1776- fi
1777- AC_MSG_RESULT ( [ $python_has_distutils] )
1778-
1779- if test "$python_has_distutils" != "no" ; then
1780- AC_MSG_CHECKING ( [ location of site-packages] )
1781-
1782- PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
1783-
1784- if test -z "$PYTHON_SITE_DIR" ; then
1785- AC_MSG_ERROR ( [ Unable to detect python site-packages path] )
1786- elif test ! -d "$PYTHON_SITE_DIR" ; then
1787- AC_MSG_ERROR ( [ Path $PYTHON_SITE_DIR returned by python does not exist!] )
1788- fi
1789- AC_MSG_RESULT ( [ $PYTHON_SITE_DIR] )
1790- AC_SUBST ( [ PYTHON_SITE_DIR] , [ $PYTHON_SITE_DIR] )
1791-
1792- #
1793- # python distutils found, get settings from python directly
1794- #
1795- PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [ [ \"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())] ] ; print(\" \".join(flags));' | sed -e 's/-arch i386//g;s/-arch x86_64//g'`"
1796- PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print(\" \".join(libs));'`"
1797- PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print(\"python\" + sysconfig.get_config_var(\"VERSION\"));'`"
1798- PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));'`"
1799-
1800- # handle python being installed into /usr/local
1801- AC_MSG_CHECKING ( [ python libdir] )
1802- if test -z "`echo $PYTHON_LIBDIR | grep "/usr/lib"`" ; then
1803- PYTHON_LDFLAGS="-L$PYTHON_LIBDIR $PYTHON_LDFLAGS"
1804- LIBS="-L$PYTHON_LIBDIR $LIBS"
1805- fi
1806- AC_MSG_RESULT ( [ $PYTHON_LIBDIR] )
1807-
1808- # check libpython
1809- AC_CHECK_LIB ( [ $PYTHON_LIB] , [ main] , [ has_libpython="yes"] , [ has_libpython="no"] )
1810-
1811- if test "$has_libpython" = "no" ; then
1812- AS_IF ( [ test "$with_python" = "try"] ,
1813- [ AC_MSG_WARN ( [ $PYTHON_LIB is unusable] ) ] ,
1814- [ AC_MSG_ERROR ( [ $PYTHON_LIB is unusable] ) ]
1815- )
1816- fi
1817-
1818- # check whether system libpython is usable and has threads support
1819- CFLAGS="$PYTHON_CFLAGS"
1820- LIBS="$PYTHON_LDFLAGS"
1821- AC_CHECK_FUNC ( [ PyThread_init_thread] , [ python_has_threads="yes"] , [ python_has_threads="no"] )
1822-
1823- if test "$python_has_threads" = "no"; then
1824- AS_IF ( [ test "$with_python" = "try"] ,
1825- [ AC_MSG_WARN ( [ Your python lacks threads support, can not build mod_python] ) ] ,
1826- [ AC_MSG_ERROR ( [ Your python lacks threads support, can not build mod_python] ) ]
1827- )
1828- else
1829- AC_MSG_NOTICE ( [ Your python seems OK, do not forget to enable mod_python in modules.conf] )
1830- AC_SUBST ( [ PYTHON_CFLAGS] , [ $PYTHON_CFLAGS] )
1831- AC_SUBST ( [ PYTHON_LDFLAGS] , [ $PYTHON_LDFLAGS] )
1832- fi
1833- else
1834- AS_IF ( [ test "$with_python" = "try"] ,
1835- [ AC_MSG_WARN ( [ Could not find or use python distutils module: $python_result] ) ] ,
1836- [ AC_MSG_ERROR ( [ Could not find or use python distutils module: $python_result] ) ]
1837- )
1838- fi
1839-
1840- LIBS="$save_LIBS"
1841- CFLAGS="$save_CFLAGS"
1842-
1843- unset python_has_threads
1844- unset python_has_distutils
1845- unset python_result
1846- else
1847- AS_IF ( [ test "$with_python" = "try"] ,
1848- [ AC_MSG_WARN ( [ Could not find python, mod_python will not build, use --with-python to specify the location] ) ] ,
1849- [ AC_MSG_ERROR ( [ Could not find python, use --with-python to specify the location] ) ]
1850- )
1851- fi
1852- else
1853- AC_MSG_WARN ( [ python support disabled, building mod_python will fail!] )
1854- fi
1855-
18561735#
18571736# Python3 checks for mod_python3
18581737#
@@ -2196,7 +2075,6 @@ AC_CONFIG_FILES([Makefile
21962075 src/mod/languages/mod_lua/Makefile
21972076 src/mod/languages/mod_managed/Makefile
21982077 src/mod/languages/mod_perl/Makefile
2199- src/mod/languages/mod_python/Makefile
22002078 src/mod/languages/mod_python3/Makefile
22012079 src/mod/languages/mod_v8/Makefile
22022080 src/mod/languages/mod_basic/Makefile
0 commit comments