~ubuntu-branches/ubuntu/trusty/gnustep-base/trusty

« back to all changes in this revision

Viewing changes to config/procfs.m4

Tags: upstream-1.11.2
ImportĀ upstreamĀ versionĀ 1.11.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl procfs macros
 
2
dnl  Copyright (C) 2005 Free Software Foundation
 
3
dnl  Copying and distribution of this file, with or without modification,
 
4
dnl  are permitted in any medium without royalty provided the copyright
 
5
dnl  notice and this notice are preserved.
 
6
dnl
1
7
dnl AC_SYS_PROCFS
2
8
dnl This macro defines HAVE_PROCFS if either it finds a mounted /proc
3
9
dnl or the user explicitly enables it for cross-compiles.
35
41
  fi
36
42
]
37
43
)
 
44
 
 
45
dnl AC_SYS_PROCFS_PSINFO
 
46
dnl This macro defines HAVE_PROCFS_PSINFO if it can read the psinfo 
 
47
dnl structure from the /proc/%pid% directory
 
48
AC_DEFUN(AC_SYS_PROCFS_PSINFO,
 
49
[ AC_ARG_ENABLE(procfs-psinfo,
 
50
    [  --enable-procfs-psinfo         Use /proc/%pid% to get info],
 
51
    enable_procfs_psinfo="$enableval", if test "$cross_compiling" = yes; then enable_procfs_psinfo=cross; else enable_procfs_psinfo=yes; fi;)
 
52
 
 
53
  AC_CACHE_CHECK([support for /proc psinfo struct], ac_cv_sys_procfs_psinfo,
 
54
  [if test "$enable_procfs_psinfo" = yes; then
 
55
    AC_TRY_RUN([#include "$srcdir/config/config.psinfo.c"],
 
56
        ac_cv_sys_procfs_psinfo=yes, ac_cv_sys_procfs_psinfo=no, 
 
57
        ac_cv_sys_procfs_psinfo=yes)
 
58
  elif test "$enable_procfs" = cross; then
 
59
    AC_MSG_WARN(Pass --enable-procfs-psinfo argument to enable use of /proc psinfo information.)
 
60
  else
 
61
    ac_cv_sys_procfs_psinfo=no
 
62
  fi])
 
63
 
 
64
  if test $ac_cv_sys_procfs_psinfo = yes; then
 
65
    AC_DEFINE(HAVE_PROCFS_PSINFO, 1, [Define if system supports reading psinfo from /proc])
 
66
  fi
 
67
]
 
68
)