X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=setup.py;h=2b88fc7ec2d33634033d8725bc98b077500517ca;hp=094768f9fda29666588960a13354e72a33d57ee4;hb=47dfa706dc7d700ab587db9f8ac54999c5ffa506;hpb=ab2f7a4cd0eda09ff3af29058c45d098f869b598 diff --git a/setup.py b/setup.py index 094768f..2b88fc7 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/" @@ -123,6 +129,14 @@ class ConfigScript: 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"):