Jelmer Vernooij avatar Jelmer Vernooij committed e2997b4

use apu include directory.

Comments (0)

Files changed (1)

     return (includedir,)
 
 
+def apu_build_data():
+    """Determine the APR util header file location."""
+    includedir = apu_config("--includedir")
+    if not os.path.isdir(includedir):
+        raise Exception("APR util development headers not found")
+    return (includedir,)
+
+
 def svn_build_data():
     """Determine the Subversion header file location."""
     if "SVN_HEADER_PATH" in os.environ and "SVN_LIBRARY_PATH" in os.environ:
     Checks for the availability of the Keychain simple authentication provider in Subversion by compiling a simple test program.
     """
     abd = apr_build_data()
+    abud = apu_build_data()
     sbd = svn_build_data()
-    gcc_command_args = ['gcc'] + ['-I' + inc for inc in sbd[0]] + ['-L' + lib for lib in sbd[1]] + ['-I' + abd[0], '-lsvn_subr-1', '-x', 'c', '-']
+    gcc_command_args = ['gcc'] + ['-I' + inc for inc in sbd[0]] + ['-L' + lib for lib in sbd[1]] + ['-I' + abd[0], '-I' + abud[0], '-lsvn_subr-1', '-x', 'c', '-']
     (gcc_in, gcc_out, gcc_err) = os.popen3(gcc_command_args)
     gcc_in.write("""
 #include <svn_auth.h>
     # just clobber the functions above we can't use
     # for simplicitly, everything is done in the 'svn' one
     def apr_build_data():
-        return '.', 
+        return '.',
+
+    def apu_build_data():
+        return '.',
 
     def svn_build_data():
         # environment vars for the directories we need.
         return includes, lib_dirs, aprlibs+libs,
 
 (apr_includedir, ) = apr_build_data()
+(apu_includedir, ) = apu_build_data()
 (svn_includedirs, svn_libdirs, extra_libs) = svn_build_data()
 
 def SvnExtension(name, *args, **kwargs):
-    kwargs["include_dirs"] = [apr_includedir] + svn_includedirs + ["subvertpy"]
+    kwargs["include_dirs"] = [apr_includedir, apu_includedir] + svn_includedirs + ["subvertpy"]
     kwargs["library_dirs"] = svn_libdirs
     if os.name == 'nt':
         # on windows, just ignore and overwrite the libraries!
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.