1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#
# Committed-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2006-11-29
#
# Error:
#
# check for realpath is not cross aware, make it cacheable and added cross default value
#
# State:
#
# should be commited
#
Index: pure-ftpd-1.0.21/configure.ac
===================================================================
--- pure-ftpd-1.0.21.orig/configure.ac
+++ pure-ftpd-1.0.21/configure.ac
@@ -979,7 +979,9 @@ then
AC_DEFINE(SAFE_GETGROUPS_0,,[Define is getgroups(0, NULL) works on your system])
fi
-AC_MSG_CHECKING(whether realpath likes unreadable directories)
+AC_CACHE_CHECK([whether realpath likes unreadable directories],
+ [ac_cv_realpath_works_with_unreadable_directories],
+[
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#ifdef STDC_HEADERS
@@ -1032,13 +1034,17 @@ int main(void)
return 0;
}
-]])],[
-AC_MSG_RESULT(yes)
-AC_DEFINE(REALPATH_WORKS_WITH_UNREADABLE_DIRECTORIES,,
-[Define if realpath() works on unreadable directories])
-],[AC_MSG_RESULT(no)
-AC_DEFINE(USE_BUILTIN_REALPATH)
-],[])
+]])],[ac_cv_realpath_works_with_unreadable_directories=yes
+],[ac_cv_realpath_works_with_unreadable_directories=no
+],[ac_cv_realpath_works_with_unreadable_directories=yes])
+])
+if test "x$ac_cv_realpath_works_with_unreadable_directories" = "xyes"
+then
+ AC_DEFINE(REALPATH_WORKS_WITH_UNREADABLE_DIRECTORIES,,[Define if realpath() works on unreadable directories])
+else
+ AC_DEFINE(USE_BUILTIN_REALPATH)
+fi
+
AC_MSG_CHECKING(whether you already have a standard MD5 implementation)
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|