Commit 10a10e3327a64b2eea194057575c9696d3df6512

Authored by knodlseder
1 parent 426c7519

add only items including -L to linker list and iterms including -I to include list

Showing 1 changed file with 9 additions and 7 deletions
pyext/setup.py.in
... ... @@ -89,17 +89,19 @@ for extra_lib in extra_libs:
89 89 # Get extra library paths
90 90 extra_lib_paths = ('@LDFLAGS@').split(' ')
91 91 for extra_lib_path in extra_lib_paths:
92   - dir = extra_lib_path.lstrip('-L')
93   - if len(dir) > 0:
94   - library_dirs.append(extra_lib_path.lstrip('-L'))
95   - runtime_library_dirs.append(extra_lib_path.lstrip('-L'))
  92 + if extra_lib_path.find('-L') != -1:
  93 + dir = extra_lib_path.lstrip('-L')
  94 + if len(dir) > 0:
  95 + library_dirs.append(dir)
  96 + runtime_library_dirs.append(dir)
96 97  
97 98 # Get extra include directories
98 99 extra_inc_paths = ('@CPPFLAGS@').split(' ')
99 100 for extra_inc_path in extra_inc_paths:
100   - dir = extra_inc_path.lstrip('-I')
101   - if len(dir) > 0:
102   - include_dirs.append(extra_inc_path.lstrip('-I'))
  101 + if extra_lib_path.find('-I') != -1:
  102 + dir = extra_inc_path.lstrip('-I')
  103 + if len(dir) > 0:
  104 + include_dirs.append(dir)
103 105  
104 106 # Add instrument specific include directories and data files
105 107 if '@WITH_INST_MWL_TRUE@' != '#':
... ...