When I'm building SVN, I like to make/install all dependencies and then use these "installed" folders to build svn. Unfortunately SVN doesn't recognize installed layout for SASL dependency. Let's fix that.

[[
On Windows: support install layout of sasl

Source layout of sasl has include headers here:
/include

However, when sasl is installed, it has headers here:
/include/sasl

This patch adds auto-detection of layout to support both.

* build/generator/gen_win_dependencies.py
  (_find_sasl): Detect layout in provided '--with-sasl='
* include/private/ra_svn_wrapped_sasl.h
  Support installed layout
]]
Index: build/generator/gen_win_dependencies.py
===================================================================
--- build/generator/gen_win_dependencies.py     (revision 1893895)
+++ build/generator/gen_win_dependencies.py     (working copy)
@@ -1356,7 +1356,7 @@
                                                 defines=defines)
 
   def _find_sasl(self, show_warnings):
-    "Check if sals is available"
+    "Check if sasl is available"
 
     minimal_sasl_version = (2, 0, 0)
 
@@ -1365,9 +1365,13 @@
 
     inc_dir = os.path.join(self.sasl_path, 'include')
 
-    version_file_path = os.path.join(inc_dir, 'sasl.h')
-
-    if not os.path.isfile(version_file_path):
+    defines=['SVN_HAVE_SASL']
+    if     os.path.isfile(os.path.join(inc_dir, 'sasl', 'sasl.h')):
+      version_file_path = os.path.join(inc_dir, 'sasl', 'sasl.h')
+      defines.append('SVN_HAVE_SASL_INSTALLED')
+    elif   os.path.isfile(os.path.join(inc_dir, 'sasl.h')):
+      version_file_path = os.path.join(inc_dir, 'sasl.h')
+    else:
       if show_warnings:
         print('WARNING: \'%s\' not found' % (version_file_path,))
         print("Use '--with-sasl' to configure sasl location.");
@@ -1411,7 +1415,7 @@
                                                'libsasl.lib', sasl_version,
                                                dll_dir=dll_dir,
                                                dll_name=dll_name,
-                                               defines=['SVN_HAVE_SASL'])
+                                               defines=defines)
 
   def _find_libintl(self, show_warnings):
     "Find gettext support"

Reply via email to