summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-proxy/c-icap/files/c-icap-0.1.4-crosscompile.patch')
-rw-r--r--net-proxy/c-icap/files/c-icap-0.1.4-crosscompile.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/net-proxy/c-icap/files/c-icap-0.1.4-crosscompile.patch b/net-proxy/c-icap/files/c-icap-0.1.4-crosscompile.patch
new file mode 100644
index 000000000000..2e2a325989bb
--- /dev/null
+++ b/net-proxy/c-icap/files/c-icap-0.1.4-crosscompile.patch
@@ -0,0 +1,72 @@
+--- a/configure.in 2010-12-21 17:50:08.000000000 +0100
++++ b/configure.in 2011-06-10 00:24:06.000000000 +0200
+@@ -423,10 +423,8 @@
+ )
+
+ dnl Checking if interprocess posix semaphores works....
+-POSIX_SEMAPHORES="0"
+-AC_MSG_CHECKING(if posix 1003.1b interprocess semaphores works)
+-AC_TRY_RUN(
+-[
++AC_CACHE_CHECK([if posix 1003.1b interprocess semaphores works], ac_cv_10031b_ipc_sem,
++[AC_TRY_RUN([
+ #include <semaphore.h>
+ #include <sys/wait.h>
+
+@@ -452,18 +450,24 @@
+ exit(0);
+ }
+ ],
+-AC_DEFINE(HAVE_POSIX_SEMAPHORES,1,[Define HAVE_POSIX_SEMAPHORES if posix 1003.1b semaphores works])
+-POSIX_SEMAPHORES="1"
+-AC_MSG_RESULT(yes),
+-AC_MSG_RESULT(no)
++ac_cv_10031b_ipc_sem=yes,
++ac_cv_10031b_ipc_sem=no,
++[AC_MSG_ERROR([cross-compiling,
++ presetting ac_cv_10031b_ipc_sem=(yes|no) will help])]
+ )
++])
++AS_IF(
++ [test $ac_cv_10031b_ipc_sem = yes],
++ [AC_DEFINE(HAVE_POSIX_SEMAPHORES,1,[Define HAVE_POSIX_SEMAPHORES if posix 1003.1b semaphores works])
++ POSIX_SEMAPHORES="1"
++ ],[
++ POSIX_SEMAPHORES="0"
++ ])
+ AC_SUBST(POSIX_SEMAPHORES)
+
+ dnl Checking for file locking
+-POSIX_FILE_LOCK="0"
+-AC_MSG_CHECKING(if fcntl file locking works)
+-AC_TRY_RUN(
+-[
++AC_CACHE_CHECK([if fcntl file locking works], ac_cv_fcntl,
++[AC_TRY_RUN([
+ #include <unistd.h>
+ #include <fcntl.h>
+
+@@ -487,11 +491,19 @@
+ return 0;
+ }
+ ],
+-AC_DEFINE(HAVE_POSIX_FILE_LOCK,1,[Define HAVE_POSIX_FILE_LOCK if posix fcntl file locking works])
+-POSIX_FILE_LOCK="1"
+-AC_MSG_RESULT(yes),
+-AC_MSG_RESULT(no)
++ac_cv_fcntl=yes,
++ac_cv_fcntl=no,
++[AC_MSG_ERROR([cross-compiling,
++ presetting ac_cv_fcntl=(yes|no) will help])]
+ )
++])
++AS_IF(
++ [test $ac_cv_fcntl = yes],
++ [AC_DEFINE(HAVE_POSIX_FILE_LOCK,1,[Define HAVE_POSIX_FILE_LOCK if posix fcntl file locking works])
++ POSIX_FILE_LOCK="1"
++ ],[
++ POSIX_FILE_LOCK="0"
++ ])
+ AC_SUBST(POSIX_FILE_LOCK)
+
+ #pthread_rwlock