implemented Setup.hs to build boehm cpp libs and install them;
[hs-boehmgc.git] / gc-7.2 / extra / add_gc_prefix.c
diff --git a/gc-7.2/extra/add_gc_prefix.c b/gc-7.2/extra/add_gc_prefix.c
new file mode 100644 (file)
index 0000000..8646a8e
--- /dev/null
@@ -0,0 +1,24 @@
+# include <stdio.h>
+# include <gc.h>
+#ifndef GC_ALPHA_VERSION
+# define GC_ALPHA_VERSION GC_TMP_ALPHA_VERSION
+#endif
+
+int main(argc, argv, envp)
+int argc;
+char ** argv;
+char ** envp;
+{
+    int i;
+    
+    for (i = 1; i < argc; i++) {
+      if (GC_ALPHA_VERSION == GC_NOT_ALPHA) {
+       printf("gc%d.%d/%s ", GC_VERSION_MAJOR, GC_VERSION_MINOR, argv[i]);
+      } else {
+       printf("gc%d.%dalpha%d/%s ", GC_VERSION_MAJOR,
+              GC_VERSION_MINOR, GC_ALPHA_VERSION, argv[i]);
+      }
+    }
+    return(0);
+}