=== modified file 'm4/ac_pkg_swig.m4'
--- a/m4/ac_pkg_swig.m4	2008-04-20 00:58:48 +0000
+++ b/m4/ac_pkg_swig.m4	2008-04-21 04:56:34 +0000
@@ -77,6 +77,15 @@
                                 SWIG_LIB=`$SWIG -swiglib`
                                 AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
                         fi
+                        # Test for the PHP sefgault bug
+                        if test $available_major -ne 1 \
+                                -o $available_minor -lt 3 \
+                                -o $available_patch -lt 33 ; then
+                                SWIG_CAN_BUILD_PHP=no
+                        else
+                                SWIG_CAN_BUILD_PHP=yes
+                        fi
+                        AC_SUBST([SWIG_CAN_BUILD_PHP])
                 else
                         AC_MSG_ERROR([cannot determine SWIG version.])
                         SWIG=no

=== modified file 'm4/with_php.m4'
--- a/m4/with_php.m4	2008-04-11 01:35:06 +0000
+++ b/m4/with_php.m4	2008-04-21 04:56:34 +0000
@@ -25,9 +25,12 @@
     [AS_HELP_STRING([--with-php],
       [Build NDB/PHP @<:@default=no@:>@])],
     [with_php=$withval],
-    [with_php=yes])
+    [with_php=no])
 
   AS_IF([test "x$with_php" != "xno"],[
+    dnl We explicitly requested PHP build. Fail on too-young SWIG.
+    AS_IF([test "x$SWIG_CAN_BUILD_PHP" != "xyes"],
+      [AC_MSG_ERROR("Your version of SWIG is too young to build NDB/PHP. >=1.3.33 is required!")])
     AS_IF([test "x$with_php" != "xyes"],
       [ac_check_php_config=$with_php],
       [ac_check_php_config="php-config php-config5"])



