Merge branch 'master' of kramm@git.swftools.org:/home/git/swftools
[swftools.git] / setup.py
index 8de63e6..2b88fc7 100644 (file)
--- 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("_")
@@ -234,7 +252,7 @@ base_sources = [
 "lib/q.c", "lib/utf8.c", "lib/png.c", "lib/jpeg.c", "lib/wav.c", "lib/mp3.c", "lib/os.c", "lib/bitio.c", "lib/log.c", "lib/mem.c",
 ]
 rfxswf_sources = [
-"lib/modules/swfabc.c", "lib/modules/swfaction.c", "lib/modules/swfbits.c", "lib/modules/swfbutton.c",
+"lib/modules/swfaction.c", "lib/modules/swfbits.c", "lib/modules/swfbutton.c",
 "lib/modules/swfcgi.c", "lib/modules/swfdraw.c", "lib/modules/swfdump.c", "lib/modules/swffilter.c",
 "lib/modules/swffont.c", "lib/modules/swfobject.c", "lib/modules/swfrender.c", "lib/modules/swfshape.c",
 "lib/modules/swfsound.c", "lib/modules/swftext.c", "lib/modules/swftools.c",