Index: trunk/zoo-kernel/configure.ac
===================================================================
--- trunk/zoo-kernel/configure.ac	(revision 15)
+++ trunk/zoo-kernel/configure.ac	(revision 29)
@@ -128,49 +128,47 @@
 # ===========================================================================
 
+
+
+
 AC_ARG_WITH([python], 
-	[AS_HELP_STRING([--with-python=PATH], [specify an alternative directory for python installation])], 
-	[PYTHONCONFIG="$withval/bin/python-config"], [PYTHONCONFIG=""])
-
-if test "x$PYTHONCONFIG" = "x"; then
-	# PYTHON was not specified, so search within the current path
-	AC_PATH_PROG([PYTHONCONFIG], [python-config])
-
-	# If we couldn't find python-config, display a warning
-	if test "x$PYTHONCONFIG" = "x"; then
-		AC_MSG_ERROR([could not find python-config from libpython within the current path. You may need to try re-running configure with a --with-python parameter.])
-	fi
-else
-	# PYTHON was specified; display a message to the user
-	if test "x$PYTHON" = "xyes"; then
-		AC_MSG_ERROR([you must specify a parameter to --with-python, e.g. --with-python=/path/to/python])
-	else
-		if test -f $PYTHONCONFIG; then
-			AC_MSG_RESULT([Using user-specified python-config file: $PYTHONCONFIG])
-		else
-			AC_MSG_ERROR([the user-specified python-config file $PYTHONCONFIG does not exist])
-		fi	
-	fi
-fi
-
-
-# Extract the linker and include flags 
-PYTHON_LDFLAGS=`$PYTHONCONFIG --libs`
-PYTHON_CPPFLAGS=`$PYTHONCONFIG --cflags`
-
-# Check headers file
-CPPFLAGS_SAVE="$CPPFLAGS"
-CPPFLAGS="$PYTHON_CPPFLAGS"
-AC_CHECK_HEADERS([Python.h],
+	[AS_HELP_STRING([--with-python=PATH], [To enabled python support or specify an alternative directory for python installation,  disabled by default])], 
+	[PYTHON_PATH="$withval"; PYTHON_ENABLED="-DUSE_PYTHON"], [PYTHON_ENABLED=""])
+
+
+if test -z "$PYTHON_ENABLED"
+then
+	PYTHON_FILE=""
+else
+	PYTHONCONFIG="$PYTHON_PATH/bin/python-config"
+	PYTHON_FILE="service_internal_python.o"
+	if test  "$PYTHON_PATH" = "yes"
+	then
+		# PHP was not specified, so search within the current path
+		AC_PATH_PROG([PYTHONCONFIG], [python-config])
+	else
+		PYTHONCONFIG="$PYTHON_PATH/bin/python-config"
+	fi
+
+	# Extract the linker and include flags 
+	PYTHON_LDFLAGS=`$PYTHONCONFIG --ldflags`
+	PYTHON_CPPFLAGS=`$PYTHONCONFIG --cflags`
+
+	# Check headers file
+	CPPFLAGS_SAVE="$CPPFLAGS"
+	CPPFLAGS="$PYTHON_CPPFLAGS"
+	AC_CHECK_HEADERS([Python.h],
 		 [], [AC_MSG_ERROR([could not find headers include related to libpython])])
 
-# Ensure we can link against libpython
-LIBS_SAVE="$LIBS"
-LIBS="$PYTHON_LDFLAGS"
-# Shouldn't we get python here rather than python2.6 :) ??
-PY_LIB=`$PYTHONCONFIG --libs | sed -e 's/^.*\(python2\..\)$/\1/'`
-AC_CHECK_LIB([$PY_LIB], [PyObject_CallObject], [], [AC_MSG_ERROR([could not find libpython])], [])
-
-AC_SUBST([PYTHON_CPPFLAGS])
-AC_SUBST([PYTHON_LDFLAGS])
+	# Ensure we can link against libphp
+	LIBS_SAVE="$LIBS"
+	LIBS="$PYTHON_LDFLAGS"
+	PY_LIB=`$PYTHONCONFIG --libs | sed -e 's/^.*\(python2\..\)$/\1/'`
+	AC_CHECK_LIB([$PY_LIB], [PyObject_CallObject], [], [AC_MSG_ERROR([could not find libpython])], [])
+	AC_SUBST([PYTHON_CPPFLAGS])
+	AC_SUBST([PYTHON_LDFLAGS])
+fi
+
+AC_SUBST([PYTHON_ENABLED])
+AC_SUBST([PYTHON_FILE])
 
 # ===========================================================================
@@ -182,35 +180,22 @@
 
 AC_ARG_WITH([php], 
-	[AS_HELP_STRING([--with-php=PATH], [specify an alternative directory for php installation or --with-php=no  to disable php support])], 
-	[PHP_PATH="$withval"], [PHP_PATH=""])
-if test "$PHP_PATH" != "no";
-then 
+	[AS_HELP_STRING([--with-php=PATH], [To enabled php support or specify an alternative directory for php installation,  disabled by default])], 
+	[PHP_PATH="$withval"; PHP_ENABLED="-DUSE_PHP"], [PHP_ENABLED=""])
+
+
+if test -z "$PHP_ENABLED"
+then
+	PHP_FILE=""
+else
 	PHPCONFIG="$PHP_PATH/bin/php-config"
-	PHP_ENABLED="-DUSE_PHP"
 	PHP_FILE="service_internal_php.o"
-	if test "x$PHPCONFIG" = "x"; 
-	then
-	# PHP was not specified, so search within the current path
-	AC_PATH_PROG([PHPCONFIG], [php-config])
-
-	# If we couldn't find php-config, display a warning
-	if test "x$PHPCONFIG" = "x"; 
-	then
-		AC_MSG_ERROR([could not find php-config from libphp within the current path. You may need to try re-running configure with a --with-php parameter.])
-	fi
-	else
-		# PHP was specified; display a message to the user
-		if test "x$PHP" = "xyes"; 
-		then
-			AC_MSG_ERROR([you must specify a parameter to --with-php, e.g. --with-php=/path/to/php])
-		else
-			if test -f $PHPCONFIG; 
-			then
-				AC_MSG_RESULT([Using user-specified php-config file: $PHPCONFIG])
-			else
-				AC_MSG_ERROR([the user-specified php-config file $PHPCONFIG does not exist])
-			fi	
-		fi
-	fi
+	if test  "$PHP_PATH" = "yes"
+	then
+		# PHP was not specified, so search within the current path
+		AC_PATH_PROG([PHPCONFIG], [php-config])
+	else
+		PHPCONFIG="$PHP_PATH/bin/php-config"
+	fi
+
 	# Extract the linker and include flags 
 	PHP_LDFLAGS="-L/`$PHPCONFIG --prefix`/lib -lphp5"
@@ -230,7 +215,4 @@
 	AC_SUBST([PHP_CPPFLAGS])
 	AC_SUBST([PHP_LDFLAGS])
-else
-	PHP_ENABLED=""
-	PHP_FILE=""
 fi
 
@@ -244,13 +226,18 @@
 
 
-
-
 AC_ARG_WITH([perl], 
-	[AS_HELP_STRING([--with-perl=PATH], [specify an alternative directory for perl installation or --with-perl=no  to disable perl support])], 
-	[PERL_PATH="$withval"], [PERL_PATH=""])
-if test "$PERL_PATH" != "no";
-then 
-	if test "x$PERL_PATH" = "xyes";
-	then
+	[AS_HELP_STRING([--with-perl=PATH], [To enabled perl support or specify an alternative directory for perl installation,  disabled by default])], 
+	[PERL_PATH="$withval"; PERL_ENABLED="-DUSE_PERL"], [PERL_ENABLED=""])
+
+
+if test -z "$PERL_ENABLED"
+then
+	PERL_FILE=""
+else
+	PERLCONFIG="$PERL_PATH/bin/perl"
+	PHP_FILE="service_internal_perl.o"
+	if test  "$PERL_PATH" = "yes"
+	then
+		# PHP was not specified, so search within the current path
 		AC_PATH_PROG([PERLCONFIG], [perl])
 	else
@@ -258,14 +245,4 @@
 	fi
 
-	if test -f $PERLCONFIG;
-	then
-		AC_MSG_RESULT([Using user-specified perl file: $PERLCONFIG])
-	else
-		AC_MSG_ERROR([the user-specified perl file $PERLCONFIG does not exist])
-	fi
-
-	PERL_ENABLED="-DUSE_PERL"
-	PERL_FILE="service_internal_perl.o"
-	
 	# Extract the linker and include flags 
 	PERL_LDFLAGS=`$PERLCONFIG -MExtUtils::Embed -e ldopts`
@@ -280,7 +257,4 @@
 	AC_SUBST([PERL_CPPFLAGS])
 	AC_SUBST([PERL_LDFLAGS])
-else
-	PERL_ENABLED=""
-	PERL_FILE=""
 fi
 
