14032N/A--- Python-2.5.1/setup.py.solaris 2007-02-14 07:53:41.000000000 -0500
14032N/A+++ Python-2.5.1/setup.py 2007-08-08 23:58:54.294398000 -0400
14032N/A@@ -243,10 +243,10 @@
14032N/A return sys.platform
14032N/A
14032N/A def detect_modules(self):
14032N/A- # Ensure that /usr/local is always used
14032N/A- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
14032N/A- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
14032N/A-
14032N/A+ if sys.platform != 'sunos5':
14032N/A+ # Ensure that /usr/local is always used
14032N/A+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
14032N/A+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
14032N/A # Add paths specified in the environment variables LDFLAGS and
14032N/A # CPPFLAGS for header and library files.
14032N/A # We must get the values from the Makefile and not the environment
14032N/A@@ -516,11 +516,22 @@
14032N/A exts.append( Extension('_csv', ['_csv.c']) )
14032N/A
14032N/A # socket(2)
14032N/A+ socket_libs = []
14032N/A+ if self.compiler.find_library_file(lib_dirs,
14032N/A+ 'socket'):
14032N/A+ socket_libs.append('socket')
14032N/A+ if self.compiler.find_library_file(lib_dirs,
14032N/A+ 'nsl'):
14032N/A+ socket_libs.append('nsl')
14032N/A+ if self.compiler.find_library_file(lib_dirs,
14032N/A+ 'resolv'):
14032N/A+ socket_libs.append('resolv')
14032N/A exts.append( Extension('_socket', ['socketmodule.c'],
14032N/A- depends = ['socketmodule.h']) )
14032N/A+ depends = ['socketmodule.h'],
14032N/A+ libraries = socket_libs) )
14032N/A # Detect SSL support for the socket module (via _ssl)
14032N/A search_for_ssl_incs_in = [
14032N/A- '/usr/local/ssl/include',
14032N/A+ '/usr/sfw/include',
14032N/A '/usr/contrib/ssl/include/'
14032N/A ]
14032N/A ssl_incs = find_file('openssl/ssl.h', inc_dirs,
14032N/A@@ -531,8 +542,12 @@
14032N/A ['/usr/kerberos/include'])
14032N/A if krb5_h:
14032N/A ssl_incs += krb5_h
14032N/A+ if sys.maxint == 2147483647L:
14032N/A+ sfw_libdir = '/usr/sfw/lib';
14032N/A+ else:
14032N/A+ sfw_libdir = '/usr/sfw/lib/64';
14032N/A ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
14032N/A- ['/usr/local/ssl/lib',
14032N/A+ [sfw_libdir,
14032N/A '/usr/contrib/ssl/lib/'
14032N/A ] )
14032N/A
14032N/A@@ -541,6 +556,7 @@
14032N/A exts.append( Extension('_ssl', ['_ssl.c'],
14032N/A include_dirs = ssl_incs,
14032N/A library_dirs = ssl_libs,
14032N/A+ runtime_library_dirs = ssl_libs,
14032N/A libraries = ['ssl', 'crypto'],
14032N/A depends = ['socketmodule.h']), )
14032N/A
14032N/A@@ -1203,12 +1219,23 @@
14032N/A # Assume we haven't found any of the libraries or include files
14032N/A # The versions with dots are used on Unix, and the versions without
14032N/A # dots on Windows, for detection by cygwin.
14032N/A+ added_lib_dirs = []
14032N/A+ tcl_tk_lib_dirs = ['/usr/sfw/lib']
14032N/A+ tcl_tk_inc_dirs = ['/usr/sfw/include']
14032N/A tcllib = tklib = tcl_includes = tk_includes = None
14032N/A for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
14032N/A '82', '8.1', '81', '8.0', '80']:
14032N/A- tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
14032N/A- tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
14032N/A+ tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version, tcl_tk_lib_dirs)
14032N/A+ tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version, tcl_tk_lib_dirs)
14032N/A+ if tklib and tcllib:
14032N/A+ # Exit the loop when we've found the Tcl/Tk libraries
14032N/A+ break
14032N/A+
14032N/A+ tklib = self.compiler.find_library_file(tcl_tk_lib_dirs, 'tk' + version)
14032N/A+ tcllib = self.compiler.find_library_file(tcl_tk_lib_dirs, 'tcl' + version)
14032N/A if tklib and tcllib:
14032N/A+ # found the libs in a non-standard dir
14032N/A+ added_lib_dirs.append(os.path.dirname(tcllib))
14032N/A # Exit the loop when we've found the Tcl/Tk libraries
14032N/A break
14032N/A
14032N/A@@ -1226,6 +1253,7 @@
14032N/A for dir in inc_dirs:
14032N/A tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
14032N/A tk_include_sub += [dir + os.sep + "tk" + dotversion]
14032N/A+ tcl_include_sub += tcl_tk_inc_dirs
14032N/A tk_include_sub += tcl_include_sub
14032N/A tcl_includes = find_file('tcl.h', inc_dirs, tcl_include_sub)
14032N/A tk_includes = find_file('tk.h', inc_dirs, tk_include_sub)
14032N/A@@ -1290,6 +1318,7 @@
14032N/A include_dirs = include_dirs,
14032N/A libraries = libs,
14032N/A library_dirs = added_lib_dirs,
14032N/A+ runtime_library_dirs = added_lib_dirs
14032N/A )
14032N/A self.extensions.append(ext)
14032N/A