diff -r 81d39db22cbd constfile2cython.py --- a/constfile2cython.py Thu Sep 15 19:29:00 2011 +0100 +++ b/constfile2cython.py Fri Sep 16 15:34:40 2011 -0400 @@ -435,7 +435,7 @@ def defined(constant, *headers): if not headers: - headers = '', '', '' + headers = '', '', '' includes = '\n'.join('#include %s' % header for header in headers) id1, id2 = uuid.uuid4().hex, uuid.uuid4().hex @@ -450,7 +450,7 @@ ''' % (includes, constant, id1, id2) try: - p = subprocess.Popen(['cpp'], stdin=subprocess.PIPE, + p = subprocess.Popen(['cpp','-I@@PREFIX@@/include'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) except OSError: @@ -509,7 +509,7 @@ '%s._%s' % (base.replace(os.sep, '.'), out_file), [source], depends=[pyxfn, pxdfn], - include_dirs=[base], + include_dirs=['@@PREFIX@@/include',base], ) if older(constfile, (pyfn, pyxfn, pxdfn)) or not generate: diff -r 81d39db22cbd pylibelf/constants_elf_h_relocation --- a/pylibelf/constants_elf_h_relocation Thu Sep 15 19:29:00 2011 +0100 +++ b/pylibelf/constants_elf_h_relocation Fri Sep 16 15:34:40 2011 -0400 @@ -1,5 +1,5 @@ output_file: 'constants_elf_h_relocation' -header: 'elf.h' +header: 'libelf/sys_elf.h' dict relocationtype: nesteddict EM_68K: diff -r 81d39db22cbd pylibelf/elfpy.h --- a/pylibelf/elfpy.h Thu Sep 15 19:29:00 2011 +0100 +++ b/pylibelf/elfpy.h Fri Sep 16 15:34:40 2011 -0400 @@ -1,4 +1,4 @@ -#include +#include #include #include diff -r 81d39db22cbd pylibelf/elftypes.pxd --- a/pylibelf/elftypes.pxd Thu Sep 15 19:29:00 2011 +0100 +++ b/pylibelf/elftypes.pxd Fri Sep 16 15:34:40 2011 -0400 @@ -166,7 +166,7 @@ ctypedef GElf_Vernaux Elf32_Vernaux - # "elf.h" + # "libelf/sys_elf.h" ctypedef struct GElf_Ehdr: unsigned char e_ident[16] # Magic number and other info GElf_Half e_type # Object file type diff -r 81d39db22cbd setup.py --- a/setup.py Thu Sep 15 19:29:00 2011 +0100 +++ b/setup.py Fri Sep 16 15:34:40 2011 -0400 @@ -117,7 +117,8 @@ ext_modules = [ Extension('pylibelf.libelf', [source], depends=_libelf_depends, - libraries=['elf']), + libraries=['elf'], + include_dirs=['@@PREFIX@@/include']) ] setup(