[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[E-devel] Patch to allow caching of AC_ABSTRACT_SOCKET_TEST



Hi!

I am currently running into problems when cross-compiling ecore, because AC_ABSTRACT_SOCKET_TEST (ecore/m4/ac_abstract_socket.m4) cannot be executed when cross-compiling and does not allow to be fed a cached value.

Attached is a patch that enables caching of the test result, so that you can run for instance:

./configure ac_cv_abstract_socket=yes

Cheers,
Jeremy

--
http://www.jerryweb.org/             : JerryWeb.org
http://sailcut.sourceforge.net/      : Sailcut CAD
http://opensource.polytechnique.org/ : Polytechnique.org Free Software

diff -urN ecore-0.9.9.035.orig/m4/ac_abstract_socket.m4 ecore-0.9.9.035/m4/ac_abstract_socket.m4
--- ecore-0.9.9.035.orig/m4/ac_abstract_socket.m4	2006-09-24 09:28:06.000000000 +0200
+++ ecore-0.9.9.035/m4/ac_abstract_socket.m4	2006-11-02 16:57:34.000000000 +0100
@@ -3,6 +3,7 @@
 dnl by rephorm
 AC_DEFUN([AC_ABSTRACT_SOCKET_TEST], [
 AC_MSG_CHECKING(abstract sockets)
+AC_CACHE_VAL(ac_cv_abstract_socket, [
 AC_LANG_PUSH(C)
 AC_RUN_IFELSE([AC_LANG_PROGRAM(
 [[
@@ -35,7 +36,14 @@
   printf ("connected\n");
   exit(0);
 ]])],
-[$1],
-[$2])
+ac_cv_abstract_socket=yes, ac_cv_abstract_socket=no)
+])
+if test "$ac_cv_abstract_socket" = "yes"; then
+  AC_MSG_RESULT(yes)
+  $1
+else
+  AC_MSG_RESULT(no)
+  $2
+fi
 ])