On 7/26/2016 11:25, Stefan Hett wrote: > Hi, > > On 7/26/2016 1:01 AM, Stefan wrote: >> Hi, >> >> the attached patch adds detction of the bin-directory location inside >> httpd, which is the default location for apr binaries, if apr is >> integrated in httpd/srclib rather than a stand alone project. >> >> The patch would apply to trunk and 1.9. > I'm taking back this proposed patch for the time being. Found out that > the library file detection code also needs some tweaking to detect the > proper apr-library file location. I'll come up with a different patch > proposal later (not sure whether that will be today though). Attached is a revised version of the patch. In addition to adding support to detect apr binaries in httpd's binary directory, it also adds the corresponding support to detect library files in httpd's library directory. It also cleans up the order/approach how apr binary/library directories are detected ultimately fixing several edge cases which previously would have resulted in incorrectly set directories.
[[ Add detection support for APR library/binary files when APR is built as part of Apache httpd and resolve a couple of further edge cases in APR's directory detection code. * build/generator/gen_win_dependencies.py (_find_apr): consistently initialize variables in all cases, add detection for lib and bin folders in httpd_path if specified, use common approach to determine directories independent of static or shared apr usage, add missing checks to whether directories really exist and contain the required library files ]] Regards, Stefan
Index: build/generator/gen_win_dependencies.py =================================================================== --- build/generator/gen_win_dependencies.py (revision 1754187) +++ build/generator/gen_win_dependencies.py (working copy) @@ -365,34 +365,41 @@ suffix = '-%d' % major defines = [] + debug_lib_dir = None + dll_dir = None + debug_dll_dir = None + dll_name = None if self.static_apr: lib_name = 'apr%s.lib' % suffix lib_dir = os.path.join(self.apr_path, 'LibR') - dll_dir = None - debug_dll_dir = None - dll_name = None defines.extend(["APR_DECLARE_STATIC"]) - if not os.path.isdir(lib_dir) and \ - os.path.isfile(os.path.join(self.apr_path, 'lib', lib_name)): - # Installed APR instead of APR-Source - lib_dir = os.path.join(self.apr_path, 'lib') - debug_lib_dir = None - else: - debug_lib_dir = os.path.join(self.apr_path, 'LibD') + if not os.path.isfile(os.path.join(lib_dir, lib_name)): + if os.path.isfile(os.path.join(self.apr_path, 'lib', lib_name)): + # Installed APR instead of APR-Source + lib_dir = os.path.join(self.apr_path, 'lib') + else: + # try httpd library default directory + if self.httpd_path: + lib_dir = os.path.join(self.httpd_path, 'lib') + if not os.path.isfile(os.path.join(lib_dir, lib_name)): + lib_dir = None + debug_lib_dir = os.path.join(self.apr_path, 'LibD') else: lib_name = 'libapr%s.lib' % suffix + lib_dir = os.path.join(self.apr_path, 'Release') - if os.path.isfile(os.path.join(self.apr_path, 'lib', lib_name)): - # Installed APR instead of APR-Source - lib_dir = os.path.join(self.apr_path, 'lib') - debug_lib_dir = None - else: - lib_dir = os.path.join(self.apr_path, 'Release') - if os.path.isfile(os.path.join(self.apr_path, 'Debug', lib_name)): - debug_lib_dir = os.path.join(self.apr_path, 'Debug') + if not os.path.isfile(os.path.join(lib_dir, lib_name)): + if os.path.isfile(os.path.join(self.apr_path, 'lib', lib_name)): + # Installed APR instead of APR-Source + lib_dir = os.path.join(self.apr_path, 'lib') else: - debug_lib_dir = None + # try httpd library default directory + if self.httpd_path: + lib_dir = os.path.join(self.httpd_path, 'lib') + if not os.path.isfile(os.path.join(lib_dir, lib_name)): + lib_dir = None + debug_lib_dir = os.path.join(self.apr_path, 'Debug') dll_name = 'libapr%s.dll' % suffix if os.path.isfile(os.path.join(lib_dir, dll_name)): @@ -400,7 +407,10 @@ debug_dll_dir = debug_lib_dir else: dll_dir = os.path.join(self.apr_path, 'bin') - debug_dll_dir = None + if not os.path.isdir(dll_dir): + # try http binary default directory + if self.httpd_path: + dll_dir = os.path.join(self.httpd_path, 'bin') extra_bin = []
smime.p7s
Description: S/MIME Cryptographic Signature