📄 aclocal.m4
字号:
space=yesAC_DEFINE(STAT_STATFS2_BSIZE)fifiif test $space = no; then# SVR3AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])AC_CACHE_VAL(fu_cv_sys_stat_statfs4,[AC_TRY_RUN([#include <sys/types.h>#include <sys/statfs.h>int main (){struct statfs fsd;return (statfs (".", &fsd, sizeof fsd, 0));}],fu_cv_sys_stat_statfs4=yes,fu_cv_sys_stat_statfs4=no,fu_cv_sys_stat_statfs4=no)])AC_MSG_RESULT($fu_cv_sys_stat_statfs4)if test $fu_cv_sys_stat_statfs4 = yes; thenspace=yesAC_DEFINE(STAT_STATFS4)fifiif test $space = no; then# 4.4BSD and NetBSDAC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnlmember (4.4BSD and NetBSD)])AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,[AC_TRY_RUN([#include <sys/types.h>#ifdef HAVE_SYS_PARAM_H#include <sys/param.h>#endif#ifdef HAVE_SYS_MOUNT_H#include <sys/mount.h>#endifint main (){struct statfs fsd;fsd.f_fsize = 0;return (statfs (".", &fsd));}],fu_cv_sys_stat_statfs2_fsize=yes,fu_cv_sys_stat_statfs2_fsize=no,fu_cv_sys_stat_statfs2_fsize=no)])AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)if test $fu_cv_sys_stat_statfs2_fsize = yes; thenspace=yesAC_DEFINE(STAT_STATFS2_FSIZE)fifiif test $space = no; then# UltrixAC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])AC_CACHE_VAL(fu_cv_sys_stat_fs_data,[AC_TRY_RUN([#include <sys/types.h>#ifdef HAVE_SYS_PARAM_H#include <sys/param.h>#endif#ifdef HAVE_SYS_MOUNT_H#include <sys/mount.h>#endif#ifdef HAVE_SYS_FS_TYPES_H#include <sys/fs_types.h>#endifint main (){struct fs_data fsd;/* Ultrix's statfs returns 1 for success,0 for not mounted, -1 for failure. */return (statfs (".", &fsd) != 1);}],fu_cv_sys_stat_fs_data=yes,fu_cv_sys_stat_fs_data=no,fu_cv_sys_stat_fs_data=no)])AC_MSG_RESULT($fu_cv_sys_stat_fs_data)if test $fu_cv_sys_stat_fs_data = yes; thenspace=yesAC_DEFINE(STAT_STATFS2_FS_DATA)fifiif test $space = no; then# SVR2AC_TRY_CPP([#include <sys/filsys.h>],AC_DEFINE(STAT_READ_FILSYS) space=yes)fiif test -n "$list_mounted_fs" && test $space != no; thenDF_PROG="df"# AC_LIBOBJ(fsusage)# AC_LIBOBJ(mountlist)fi# Check for SunOS statfs brokenness wrt partitions 2GB and larger.# If <sys/vfs.h> exists and struct statfs has a member named f_spare,# enable the work-around code in fsusage.c.AC_MSG_CHECKING([for statfs that truncates block counts])AC_CACHE_VAL(fu_cv_sys_truncating_statfs,[AC_TRY_COMPILE([#if !defined(sun) && !defined(__sun)choke -- this is a workaround for a Sun-specific problem#endif#include <sys/types.h>#include <sys/vfs.h>],[struct statfs t; long c = *(t.f_spare);],fu_cv_sys_truncating_statfs=yes,fu_cv_sys_truncating_statfs=no,)])if test $fu_cv_sys_truncating_statfs = yes; thenAC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS)fiAC_MSG_RESULT($fu_cv_sys_truncating_statfs)AC_CHECKING(for AFS)test -d /afs && AC_DEFINE(AFS)])dnl GNOME_SUPPORT_CHECKSdnl Check for various support functions needed by the standarddnl Gnome libraries. Sets LIBOBJS, might define some macros.dnl This should only be used when building the Gnome libs; dnl Gnome clients should not need this macro.AC_DEFUN([GNOME_SUPPORT_CHECKS],[ # we need an `awk' to build `gnomesupport.h' AC_REQUIRE([AC_PROG_AWK]) # this should go away soon need_gnome_support=yes AC_CHECK_FUNCS(getopt_long,, [AC_LIBOBJ(getopt) AC_LIBOBJ(getopt1)]) # for `scandir' AC_HEADER_DIRENT # copied from `configure.in' of `libiberty' vars="program_invocation_short_name program_invocation_name sys_errlist" for v in $vars; do AC_MSG_CHECKING([for $v]) AC_CACHE_VAL(gnome_cv_var_$v, [AC_TRY_LINK([int *p;], [extern int $v; p = &$v;], [eval "gnome_cv_var_$v=yes"], [eval "gnome_cv_var_$v=no"])]) if eval "test \"`echo '$gnome_cv_var_'$v`\" = yes"; then AC_MSG_RESULT(yes) n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` AC_DEFINE_UNQUOTED($n) else AC_MSG_RESULT(no) fi done AC_REPLACE_FUNCS(memmove mkstemp scandir strcasecmp strerror strndup strnlen) AC_REPLACE_FUNCS(strtok_r strtod strtol strtoul vasprintf vsnprintf) AC_CHECK_FUNCS(realpath,,AC_LIBOBJ(canonicalize)) # to include `error.c' error.c has some HAVE_* checks AC_CHECK_FUNCS(vprintf doprnt strerror_r) # stolen from am_func_error_at_line AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line, [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");], am_cv_lib_error_at_line=yes, am_cv_lib_error_at_line=no)]) if test $am_cv_lib_error_at_line = no; then AC_LIBOBJ(error) fi # This is required if we declare setreuid () and setregid (). AC_TYPE_UID_T # see if we need to declare some functions. Solaris is notorious for # putting functions into the `libc' but not listing them in the headers AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h dirent.h) GCC_NEED_DECLARATIONS(gethostname setreuid setregid getpagesize) GCC_NEED_DECLARATION(scandir,[#ifdef HAVE_DIRENT_H#include <dirent.h>#endif]) AC_SUBST(need_gnome_support) AM_CONDITIONAL(BUILD_GNOME_SUPPORT, test "$need_gnome_support" = yes)])dnl This file is intended for use both internally in libgtop and in every programdnl that wants to use it.dnldnl It defines the following variables:dnldnl * 'libgtop_sysdeps_dir' - sysdeps dir for libgtop.dnl * 'libgtop_use_machine_h' - some of system dependend parts of libgtop providednl their own header file. In this case we need todnl define 'HAVE_GLIBTOP_MACHINE_H'.dnl * 'libgtop_need_server' - is the server really needed? Defines 'NEED_LIBGTOP'dnl if true; defines conditional 'NEED_LIBGTOP'.AC_DEFUN([LIBGTOP_HACKER_TESTS],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_ARG_WITH(linux-table, [ --with-linux-table Use the table () function from Martin Baulig], [linux_table="$withval"],[linux_table=auto]) case "$host_os" in linux*) if test $linux_table = yes ; then AC_CHECK_HEADER(linux/table.h, linux_table=yes, linux_table=no) elif test $linux_table = auto ; then AC_MSG_CHECKING(for table function in Linux Kernel) AC_TRY_RUN([#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <linux/unistd.h>#include <linux/table.h>#include <syscall.h>static inline _syscall3 (int, table, int, type, union table *, tbl, const void *, param);intmain (void){ union table tbl; int ret; ret = table (TABLE_VERSION, NULL, NULL); if (ret == -1) exit (-errno); exit (ret < 1 ? ret : 0);}], linux_table=yes, linux_table=no, linux_table=no) AC_MSG_RESULT($linux_table) fi if test $linux_table = yes ; then AC_DEFINE(HAVE_LINUX_TABLE) fi ;; esac])AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_SUBST(libgtop_sysdeps_dir) AC_SUBST(libgtop_use_machine_h) AC_SUBST(libgtop_need_server) AC_ARG_WITH(libgtop-examples, [ --with-libgtop-examples Build the libgtop examples (default=no)],[ build_examples="$withval"], [build_examples=no]) AM_CONDITIONAL(EXAMPLES, test x"$build_examples" = xyes) AC_ARG_ENABLE(hacker-mode, [ --enable-hacker-mode Enable building of unstable sysdeps], [hacker_mode="$enableval"], [hacker_mode=no]) AM_CONDITIONAL(HACKER_MODE, test x"$hacker_mode" = xyes) linux_table=auto if test x$hacker_mode = xyes ; then LIBGTOP_HACKER_TESTS fi AM_CONDITIONAL(LINUX_TABLE, test $linux_table = yes) AC_ARG_WITH(libgtop-smp, [ --with-libgtop-smp Enable SMP support (default-auto)],[ libgtop_smp="$withval"],[libgtop_smp=auto]) if test $libgtop_smp = auto ; then AC_MSG_CHECKING(whether to enable SMP support) case "$host_os" in linux*) libgtop_smp=yes ;; aix*) libgtop_smp=yes ;; *) libgtop_smp=no ;; esac AC_MSG_RESULT($libgtop_smp) fi if test $libgtop_smp = yes ; then AC_DEFINE(HAVE_LIBGTOP_SMP) fi AM_CONDITIONAL(LIBGTOP_SMP, test $libgtop_smp = yes) AC_MSG_CHECKING(for libgtop sysdeps directory) case "$host_os" in linux*) if test x$linux_table = xyes ; then libgtop_sysdeps_dir=kernel libgtop_use_machine_h=no else libgtop_sysdeps_dir=linux libgtop_use_machine_h=no libgtop_have_sysinfo=yes fi libgtop_need_server=no ;; freebsd*|netbsd*|openbsd*|bsdi*) libgtop_sysdeps_dir=freebsd libgtop_use_machine_h=yes libgtop_need_server=yes libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server' ;; solaris*) libgtop_sysdeps_dir=solaris libgtop_use_machine_h=yes libgtop_need_server=yes libgtop_postinstall='chgrp sys $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server' ;; aix*) libgtop_sysdeps_dir=aix libgtop_use_machine_h=yes libgtop_need_server=yes libgtop_have_sysinfo=yes libgtop_postinstall='chgrp system $(bindir)/libgtop_server && chmod g+s $(bindir)/libgtop_server2' ;; *) if test x$hacker_mode = xyes ; then case "$host_os" in sunos4*) #Please note that this port is obsolete and not working at #all. It is only useful for people who want to fix it ... :-) libgtop_sysdeps_dir=sun4 libgtop_use_machine_h=yes libgtop_need_server=yes ;; osf*) libgtop_sysdeps_dir=osf1 libgtop_use_machine_h=yes libgtop_need_server=yes ;; *) libgtop_sysdeps_dir=stub libgtop_use_machine_h=no libgtop_need_server=no ;; esac else libgtop_sysdeps_dir=stub libgtop_use_machine_h=no libgtop_need_server=no fi ;; esac test -z "$libgtop_postinstall" && libgtop_postinstall=: AC_MSG_RESULT($libgtop_sysdeps_dir) AC_SUBST(libgtop_sysdeps_dir) AC_SUBST(libgtop_postinstall) AC_SUBST(libgtop_have_sysinfo) case "$host_os" in *bsd*) AC_CHECK_HEADERS(net/if_var.h) AC_MSG_CHECKING([for I4B]) AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>#include <net/if.h>#include <net/if_types.h>#ifdef HAVE_NET_IF_VAR_H#include <net/if_var.h>#endif#include <net/netisr.h>#include <net/route.h>#if defined(__FreeBSD__) || defined(__NetBSD__)#include <net/if_sppp.h>#else#include <i4b/sppp/if_sppp.h>#endif],[
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -