X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=setup.py;h=47ed12ee5727371599dcde3aec6e594d2ff8f3dc;hb=fe0bf96d27b7af11538533b4df9eca5cbc96eedf;hp=62c201db640935768c5a5832f7742c20fa2a58b0;hpb=e20c4860940519f902e65d22d8d3dfe849f72d9c;p=swftools.git diff --git a/setup.py b/setup.py index 62c201d..47ed12e 100644 --- a/setup.py +++ b/setup.py @@ -10,9 +10,15 @@ except ImportError: cc = ccompiler.new_compiler() +# leave it to gcc to detect c/c++ files. we'll be linking against -lstdc++ +# later on to ensure we do have all the c++ libraries, so we don't need to +# compile *everything* as c++ just because of the few .cc files. +cc.language_map[".cc"] = "c" + import os import sys import stat +import re DATADIR = "/usr/share/swftools/" @@ -121,6 +127,18 @@ class ConfigScript: def system_has_property(self,name): if name.startswith("STD"): return 1 + elif name.startswith("INTERNAL"): + return 1 + elif name == "PACKAGE": + return "\"swftools\"" + elif name == "VERSION": + fi = open("configure.in", "rb") + for line in fi.readlines(): + if line.startswith("VERSION="): + return '"'+line[8:].strip()+'"' + return "unknown" + elif "POPPLER" in name: + return None elif name.startswith("HAVE_") and name.endswith("_H"): header = name[5:].lower() c = header.rfind("_") @@ -243,7 +261,9 @@ rfxswf_sources = [ "lib/action/lex.swf4.c", "lib/action/lex.swf5.c", "lib/action/libming.c", "lib/action/swf4compiler.tab.c", "lib/as3/abc.c", "lib/as3/code.c", "lib/as3/pool.c", "lib/as3/files.c", "lib/as3/opcodes.c", -"lib/action/swf5compiler.tab.c", "lib/action/actioncompiler.c" +"lib/as3/scripts.c", "lib/as3/common.c", "lib/as3/builtin.c", "lib/as3/compiler.c", "lib/as3/expr.c", "lib/as3/import.c", +"lib/as3/initcode.c", "lib/as3/parser.tab.c", "lib/as3/registry.c", "lib/as3/tokenizer.yy.c", +"lib/action/swf5compiler.tab.c", "lib/action/actioncompiler.c", ] libpdf_sources = [ "lib/pdf/GFXOutputDev.cc", "lib/pdf/InfoOutputDev.cc", "lib/pdf/BitmapOutputDev.cc",