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

Bug#641601: elementary: FTBFS on hurd-i386



Package: elementary
Version: 0.7.0.55225-1
Severity: important
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd

The attached patch enables build of elementary on GNU/Hurd by checking
for the availability of PATH_MAX in configure.ac. This solution is the
same used as in e17. It should preferably be applied after
01_fix_linkage.diff followed by autoconf+automake (done by the build
script).

Thanks!
diff -Naur elementary-0.7.0.55225/configure.ac elementary-0.7.0.55225.new/configure.ac
--- elementary-0.7.0.55225/configure.ac	2010-12-04 00:15:19.000000000 +0100
+++ elementary-0.7.0.55225.new/configure.ac	2011-09-14 17:07:08.000000000 +0200
@@ -90,6 +90,8 @@
 
 PKG_PROG_PKG_CONFIG
 
+EFL_CHECK_PATH_MAX
+
 # Check whether pkg-config supports Requires.private
 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
    pkgconfig_requires_private="Requires.private"
diff -Naur elementary-0.7.0.55225/m4/efl_path_max.m4 elementary-0.7.0.55225.new/m4/efl_path_max.m4
--- elementary-0.7.0.55225/m4/efl_path_max.m4	1970-01-01 01:00:00.000000000 +0100
+++ elementary-0.7.0.55225.new/m4/efl_path_max.m4	2010-11-11 14:04:06.000000000 +0100
@@ -0,0 +1,36 @@
+dnl Check for PATH_MAX in limits.h, and define a default value if not found
+dnl This is a workaround for systems not providing PATH_MAX, like GNU/Hurd
+
+dnl EFL_CHECK_PATH_MAX([DEFAULT_VALUE_IF_NOT_FOUND])
+dnl
+dnl If PATH_MAX is not defined in <limits.h>, defines it
+dnl to DEFAULT_VALUE_IF_NOT_FOUND if it exists, or fallback
+dnl to using 4096
+
+AC_DEFUN([EFL_CHECK_PATH_MAX],
+[
+
+default_max=m4_default([$1], "4096")
+AC_LANG_PUSH([C])
+
+AC_MSG_CHECKING([for PATH_MAX in limits.h])
+AC_COMPILE_IFELSE(
+   [AC_LANG_PROGRAM(
+       [[
+#include <limits.h>
+       ]],
+       [[
+int i = PATH_MAX;
+       ]])],
+   [AC_MSG_RESULT([yes])],
+   [
+    AC_DEFINE_UNQUOTED([PATH_MAX],
+       [${default_max}],
+       [default value since PATH_MAX is not defined])
+    AC_MSG_RESULT([no: using ${default_max}])
+   ])
+
+AC_LANG_POP([C])
+
+])
+dnl end of efl_path_max.m4

Reply to: