summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-01-26 11:30:36 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-01-26 11:30:36 (GMT)
commit9789aefa616c14599af600bdea925299517da730 (patch)
tree801c3f6ed8aafb3aafeae179737c9aea5e185bb9 /setup.py
parentafef4eefa8b07287abe1c59b9ef918e91386f454 (diff)
downloadcpython-9789aefa616c14599af600bdea925299517da730.zip
cpython-9789aefa616c14599af600bdea925299517da730.tar.gz
cpython-9789aefa616c14599af600bdea925299517da730.tar.bz2
Patch #670715: Universal Unicode Codec for POSIX iconv.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index bae3159..0a44e69 100644
--- a/setup.py
+++ b/setup.py
@@ -614,6 +614,24 @@ class PyBuildExt(build_ext):
exts.append( Extension('nis', ['nismodule.c'],
libraries = libs) )
+ # Hye-Shik Chang's iconv_codec C interface
+ iconv_incs = find_file('iconv.h', inc_dirs,
+ ['/usr/local/include', '/usr/pkg/include'])
+ iconv_libs = find_library_file(self.compiler, 'iconv', lib_dirs,
+ ['/usr/local/lib', '/usr/pkg/lib'])
+
+ if (iconv_incs is not None):
+ if iconv_libs is not None:
+ iconv_libraries = ['iconv']
+ else:
+ iconv_libraries = [] # in libc
+
+ exts.append( Extension('_iconv_codec',
+ ['_iconv_codec.c'],
+ include_dirs = iconv_incs,
+ library_dirs = iconv_libs,
+ libraries = iconv_libraries), )
+
# Curses support, requring the System V version of curses, often
# provided by the ncurses library.
if platform == 'sunos4':