--- setup.py.orig	2010-07-06 10:29:56.000000000 -0500
+++ setup.py	2012-10-15 07:13:51.000000000 -0500
@@ -21,7 +21,7 @@
 # Common configuration #
 ########################
 
-extra_link_args = ['--Wl,--no-undefined']
+extra_link_args = []
 include_dirs = []
 library_dirs = []
 defines = []
@@ -45,11 +45,8 @@
 else:
     # try to look for nifticlibs in some place
     if not sys.platform.startswith('win'):
-        include_dirs += ['/usr/include/nifti',
-                         '/usr/include/nifticlibs',
-                         '/usr/local/include/nifti',
-                         '/usr/local/include/nifticlibs',
-                         '/usr/local/include']
+        include_dirs += ['@@PREFIX@@/include/nifti']
+        library_dirs.append('@@PREFIX@@/lib')
     else:
         # no clue on windows
         pass
@@ -64,9 +61,6 @@
     os.environ['SWIG_FEATURES'] = '-DWIN32 ' + os.environ['SWIG_FEATURES']
     defines.append(('WIN32', None))
 
-# apple stuff
-if sys.platform == "darwin":
-    extra_link_args.append("-bundle")
 
 
 ##############
