Index: /trunk/Makefile.frag
===================================================================
--- /trunk/Makefile.frag	(revision 35)
+++ /trunk/Makefile.frag	(revision 36)
@@ -19,5 +19,5 @@
 
 $(XCACHE_PROC_H): $(XCACHE_PROC_OUT)
-	$(GREP) -F 'export: ' $(XCACHE_PROC_OUT) | $(SED) -r 's/.*export:(.*):export.*/\1/g' | $(XCACHE_INDENT) > $(XCACHE_PROC_H).tmp
+	$(GREP) -F 'export: ' $(XCACHE_PROC_OUT) | $(SED) 's/.*export:\(.*\):export.*/\1/g' | $(XCACHE_INDENT) > $(XCACHE_PROC_H).tmp
 	mv -f $(XCACHE_PROC_H).tmp $(XCACHE_PROC_H)
 
Index: /trunk/align.h
===================================================================
--- /trunk/align.h	(revision 35)
+++ /trunk/align.h	(revision 36)
@@ -1,4 +1,5 @@
 #ifndef __ALIGN_H
 #define __ALIGN_H
+#ifndef ALIGN
 typedef union align_union {
 	double d;
@@ -15,4 +16,4 @@
 
 #define ALIGN(n) ((((size_t)(n)-1) & ~(XCACHE_PLATFORM_ALIGNMENT-1)) + XCACHE_PLATFORM_ALIGNMENT)
-
+#endif
 #endif /* __ALIGN_H */
Index: /trunk/config.m4
===================================================================
--- /trunk/config.m4	(revision 35)
+++ /trunk/config.m4	(revision 36)
@@ -62,5 +62,17 @@
   case $INDENT in
   */indent[)]
-    XCACHE_INDENT="$INDENT -kr --use-tabs --tab-size 4 -sob -nce"
+    opts="-kr --use-tabs --tab-size 4 -sob -nce"
+    if echo | $INDENT $opts > /dev/null 2>&1 ; then
+      XCACHE_INDENT="$INDENT $opts"
+    else
+      opts="-sob -nce"
+      if echo | $INDENT $opts > /dev/null 2>&1 ; then
+        XCACHE_INDENT="$INDENT $opts"
+      else
+        if echo | $INDENT > /dev/null 2>&1 ; then
+          XCACHE_INDENT="$INDENT"
+        fi
+      fi
+    fi
     ;;
   *[)]
Index: /trunk/lock.c
===================================================================
--- /trunk/lock.c	(revision 35)
+++ /trunk/lock.c	(revision 36)
@@ -1,5 +1,5 @@
 #include <stdio.h>
 #include <string.h>
-#include <malloc.h>
+#include <stdlib.h>
 
 #include <php.h>
Index: /trunk/xcache.c
===================================================================
--- /trunk/xcache.c	(revision 35)
+++ /trunk/xcache.c	(revision 36)
@@ -7,5 +7,4 @@
 #include <string.h>
 
-#include <malloc.h>
 #include <signal.h>
 
