X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=setup.py;h=5ebbdcdcf1cd727706e157742f9177cab883791d;hp=62c201db640935768c5a5832f7742c20fa2a58b0;hb=bdad407fb79c2f7be9f3603694ebdeadc645b52d;hpb=e20c4860940519f902e65d22d8d3dfe849f72d9c diff --git a/setup.py b/setup.py index 62c201d..5ebbdcd 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("_") @@ -241,9 +259,10 @@ rfxswf_sources = [ "lib/rfxswf.c", "lib/drawer.c", "lib/MD5.c", "lib/h.263/dct.c", "lib/h.263/h263tables.c", "lib/h.263/swfvideo.c", "lib/action/assembler.c", "lib/action/compile.c", "lib/action/lex.swf4.c", "lib/action/lex.swf5.c", "lib/action/libming.c", -"lib/action/swf4compiler.tab.c", +"lib/action/swf4compiler.tab.c", "lib/action/swf5compiler.tab.c", "lib/action/actioncompiler.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", ] libpdf_sources = [ "lib/pdf/GFXOutputDev.cc", "lib/pdf/InfoOutputDev.cc", "lib/pdf/BitmapOutputDev.cc",