Index: build/generator/gen_win.py =================================================================== --- build/generator/gen_win.py (revision 22028) +++ build/generator/gen_win.py (working copy) @@ -150,7 +150,11 @@ # Find neon version if self.neon_path: self._find_neon() - + + # Find serf and its dependencies + if self.serf_path: + self._find_serf() + # Check for gen_uri_delims project in apr-util gen_uri_path = os.path.join(self.apr_util_path, 'uri', 'gen_uri_delims.dsp') @@ -255,8 +259,8 @@ and x.install == 'bdb-test'), install_targets) - # Drop the serf target if we don't have it - if not self.serf_path: + # Drop the serf target if we don't have both serf and openssl + if not self.serf_lib: install_targets = filter(lambda x: x.name != 'serf', install_targets) install_targets = filter(lambda x: x.name != 'libsvn_ra_serf', install_targets) @@ -480,7 +484,7 @@ path = self.apr_path + target.external_project[3:] elif target.external_project[:5] == 'neon/': path = self.neon_path + target.external_project[4:] - elif target.external_project[:5] == 'serf/' and self.serf_path: + elif target.external_project[:5] == 'serf/' and self.serf_lib: path = self.serf_path + target.external_project[4:] else: path = target.external_project @@ -628,7 +632,7 @@ if self.neon_ver >= 26000: fakedefines.append("SVN_NEON_0_26=1") - if self.serf_path: + if self.serf_lib: fakedefines.append("SVN_LIBSVN_CLIENT_LINKS_RA_SERF") else: fakedefines.append("SVN_LIBSVN_CLIENT_LINKS_RA_DAV") @@ -668,7 +672,7 @@ if self.libintl_path: fakeincludes.append(self.apath(self.libintl_path, 'inc')) - if self.serf_path: + if self.serf_lib: fakeincludes.append(self.apath(self.serf_path, "")) if self.swig_libdir \ @@ -694,7 +698,7 @@ self.apath(self.zlib_path) ] if self.sasl_path: fakelibdirs.append(self.apath(self.sasl_path, "lib")) - if self.serf_path: + if self.serf_lib: fakelibdirs.append(self.apath(msvc_path_join(self.serf_path, cfg))) if isinstance(target, gen_base.TargetApacheMod): fakelibdirs.append(self.apath(self.httpd_path, cfg)) @@ -714,7 +718,7 @@ if self.neon_lib: neonlib = self.neon_lib+(cfg == 'Debug' and 'd.lib' or '.lib') - if self.serf_path: + if self.serf_lib: serflib = 'serf.lib' zlib = (cfg == 'Debug' and 'zlibstatD.lib' or 'zlibstat.lib') @@ -754,7 +758,7 @@ if self.neon_lib and dep.external_lib == '$(NEON_LIBS)': nondeplibs.append(neonlib) - if self.serf_path and dep.external_lib == '$(SVN_SERF_LIBS)': + if self.serf_lib and dep.external_lib == '$(SVN_SERF_LIBS)': nondeplibs.append(serflib) if dep.external_lib == '$(SVN_SASL_LIBS)': @@ -827,7 +831,7 @@ )) def write_neon_project_file(self, name): - if self.serf_path: + if self.serf_lib: return neon_path = os.path.abspath(self.neon_path) @@ -847,7 +851,7 @@ )) def write_serf_project_file(self, name): - if not self.serf_path: + if not self.serf_lib: return serf_path = os.path.abspath(self.serf_path) @@ -1013,7 +1017,19 @@ self.neon_lib = None sys.stderr.write(msg) - + + def _find_serf(self): + "Check if serf and its dependencies are available" + + self.serf_lib = None + if self.serf_path and os.path.exists(self.serf_path): + if self.openssl_path and os.path.exists(self.openssl_path): + self.serf_lib = 'serf' + else: + sys.stderr.write('openssl not found, ra_serf will not be built\n') + else: + sys.stderr.write('serf not found, ra_serf will not be built\n') + def _configure_apr_util(self): if not self.configure_apr_util: return