From dc1dba9a9621798f00c42c73efa52602ecc8335d Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 1 Apr 2008 22:41:56 +0000 Subject: [PATCH 1/1] if asked to check for FREETYPE_H, don't check for FREETYPE lib --- setup.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/setup.py b/setup.py index 3ed9e8b..00126ee 100644 --- a/setup.py +++ b/setup.py @@ -123,6 +123,21 @@ class ConfigScript: def system_has_property(self,name): if name.startswith("STD"): return 1 + elif name.startswith("HAVE_") and name.endswith("_H"): + header = name[5:].lower() + c = header.rfind("_") + if c>=0: + header = header[0:c]+"."+header[c+1] + header = header.replace("_","/") + ok = 0 + for dir in cc.include_dirs: + if os.path.isfile(os.path.join(dir,header)): + ok = 1 + break + if ok and self.test_code("#include <"+header+">", ""): + if header.startswith("sys"): + self.includefiles += [header] + return 1 elif name.startswith("HAVE_LIB") \ or name.startswith("HAVE_FONTCONFIG") \ or name.startswith("HAVE_FREETYPE"): @@ -152,21 +167,6 @@ class ConfigScript: if self.test_code("", "static int test_array [%d+1-sizeof(%s)];\ntest_array [0] = 0;" % (i,t)): return i return None - elif name.startswith("HAVE_") and name.endswith("_H"): - header = name[5:].lower() - c = header.rfind("_") - if c>=0: - header = header[0:c]+"."+header[c+1] - header = header.replace("_","/") - ok = 0 - for dir in cc.include_dirs: - if os.path.isfile(os.path.join(dir,header)): - ok = 1 - break - if ok and self.test_code("#include <"+header+">", ""): - if header.startswith("sys"): - self.includefiles += [header] - return 1 elif name.startswith("USE_FREEETYPE"): # TODO: run a test here? return 1 -- 1.7.10.4