/[gnustep]/gnustep/core/base/config/procfs.m4
ViewVC logotype

Contents of /gnustep/core/base/config/procfs.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Oct 1 03:55:35 2003 UTC (20 years, 8 months ago) by fedor
Branch: MAIN
CVS Tags: root_nib_compatibility, base-1_9_2, base-1_9_0, base-1_10_1, base-1_10_0, base-1_10_3, base-1_10_2, alex_latest_semistable, base_1_9_1
Branch point for: mingw-runloop, path-handling, native-paths, freeze-1_10_2, nib_compatibility
Changes since 1.4: +3 -0 lines
Change /proc support on Irix, Cygwin

1 dnl AC_SYS_PROCFS
2 dnl This macro defines HAVE_PROCFS if either it finds a mounted /proc
3 dnl or the user explicitly enables it for cross-compiles.
4 AC_DEFUN(AC_SYS_PROCFS,
5 [ AC_ARG_ENABLE(procfs,
6 [ --enable-procfs Use /proc filesystem (default)],
7 enable_procfs="$enableval", if test "$cross_compiling" = yes; then enable_procfs=cross; else enable_procfs=yes; fi;)
8
9 AC_CACHE_CHECK([kernel support for /proc filesystem], ac_cv_sys_procfs,
10 [if test "$enable_procfs" = yes; then
11 # Suggested change for the following line was
12 # if test -d /proc/0; then
13 # but it doesn't work on my linux - /proc/0 does not exist, but /proc
14 # works fine
15 if (mount | grep 'proc' >/dev/null 2>/dev/null); then
16 ac_cv_sys_procfs=yes
17 else
18 ac_cv_sys_procfs=no
19 fi
20 case "$target_os" in
21 # Solaris has proc, but it is not readable
22 solaris*) ac_cv_sys_procfs=no;;
23 irix*) ac_cv_sys_procfs=no;;
24 # Cygwin does have proc, but it does not show with mount
25 cygwin*) ac_cv_sys_procfs=yes;;
26 esac
27 elif test "$enable_procfs" = cross; then
28 AC_MSG_WARN(Pass --enable-procfs argument to enable use of /proc filesystem.)
29 else
30 ac_cv_sys_procfs=no
31 fi])
32
33 if test $ac_cv_sys_procfs = yes; then
34 AC_DEFINE(HAVE_PROCFS, 1, [Define if system supports the /proc filesystem])
35 fi
36 ]
37 )

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26