Filewatcher File Search
FTP Search
  
Directory (beta)
  
Content Search (beta)
   
pkg://automake16-1.6.3-2.src.rpm:486267/automake-pythondir-80994.patch  info  downloads

===================================================================
RCS file: /cvs/automake/automake/m4/python.m4,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -r1.9 -r1.9.2.1
--- automake/m4/python.m4	2002/08/24 12:46:03	1.9
+++ automake/m4/python.m4	2003/01/16 11:41:27	1.9.2.1
@@ -4,7 +4,7 @@
 ## Updated by James Henstridge
 ## ------------------------
 
-# Copyright 1999, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -113,28 +113,34 @@
   dnl   site-packages directory, not the python standard library
   dnl   directory like in previous automake betas.  This behaviour
   dnl   is more consistent with lispdir.m4 for example.
-  dnl
-  dnl Also, if the package prefix isn't the same as python's prefix,
-  dnl then the old $(pythondir) was pretty useless.
 
-  AC_SUBST([pythondir],
-	   [$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/site-packages])
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
+    [am_cv_python_pythondir],
+    [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
+  AC_SUBST([pythondir], [$am_cv_python_pythondir])
 
   dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
   dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
   dnl   more consistent with the rest of automake.
-  dnl   Maybe this should be put in python.am?
 
   AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
 
   dnl pyexecdir -- directory for installing python extension modules
-  dnl   (shared libraries)  Was PYTHON_SITE_EXEC in previous betas.
-
-  AC_SUBST([pyexecdir],
-	   [${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages])
+  dnl   (shared libraries)
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
+    [am_cv_python_pyexecdir],
+    [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
+     echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
+  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
 
   dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
-  dnl   Maybe this should be put in python.am?
 
   AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
 ])
Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2008 Oliver Maruhn