$NetBSD$

--- setup.py.orig	2007-05-15 19:53:16.000000000 +0200
+++ setup.py
@@ -35,8 +35,7 @@ from distutils.cygwinccompiler import Mi
 ################################################################
 # Manipulate the environment for the build process.
 #
-if get_platform() in ["solaris-2.9-sun4u", "linux-x86_64"]:
-    os.environ["CFLAGS"] = "-fPIC"
+os.environ["CFLAGS"] = "-fPIC"
 
 if sys.platform == "win32" and "64 bit (AMD64)" in sys.version:
     os.environ["DISTUTILS_USE_SDK"] = "1"
@@ -125,8 +124,6 @@ class my_build_ext(build_ext.build_ext):
 
     # First configure a libffi library, then build the _ctypes extension.
     def build_extensions(self):
-        self.configure_libffi()
-
         # Add .S (preprocessed assembly) to C compiler source extensions.
         self.compiler.src_extensions.append('.S')
         if sys.platform == "win32":
@@ -321,6 +318,7 @@ else:
         extra_link_args.extend(['-mimpure-text'])
 
     extensions = [Extension("_ctypes",
+			    libraries = ["ffi"],
                             include_dirs=include_dirs,
                             library_dirs=library_dirs,
                             extra_link_args=extra_link_args,
