📄 aclocal.m4
字号:
/* This should match, but doesn't for e.g. glibc-2.2.1. */ if (re_match (®ex, "an", 2, 0, ®s) != 2) exit (1); exit (0); } ], jm_cv_func_working_re_compile_pattern=yes, jm_cv_func_working_re_compile_pattern=no, dnl When crosscompiling, assume it's broken. jm_cv_func_working_re_compile_pattern=no)) if test $jm_cv_func_working_re_compile_pattern = yes; then ac_use_included_regex=no fi test -n "$1" || AC_MSG_ERROR([missing argument]) m4_syscmd([test -f $1]) ifelse(m4_sysval, 0, [ AC_ARG_WITH(included-regex, [ --without-included-regex don't compile regex; this is the default on systems with version 2 of the GNU C library (use with caution on other system)], jm_with_regex=$withval, jm_with_regex=$ac_use_included_regex) if test "$jm_with_regex" = yes; then AC_LIBOBJ(regex) fi ], ) ])#serial 1dnl From Paul Eggert.# Define HOST_OPERATING_SYSTEM to a name for the host operating system.AC_DEFUN([UTILS_HOST_OS],[ AC_CACHE_CHECK([host operating system], utils_cv_host_operating_system, [[case $host_os in # These operating system names do not use the default heuristic below. # They are in reverse order, so that more-specific prefixes come first. winnt*) os='Windows NT';; vos*) os='VOS';; sysv*) os='Unix System V';; superux*) os='SUPER-UX';; sunos*) os='SunOS';; stop*) os='STOP';; sco*) os='SCO Unix';; riscos*) os='RISC OS';; riscix*) os='RISCiX';; qnx*) os='QNX';; pw32*) os='PW32';; ptx*) os='ptx';; plan9*) os='Plan 9';; osf*) os='Tru64';; os2*) os='OS/2';; openbsd*) os='OpenBSD';; nsk*) os='NonStop Kernel';; nonstopux*) os='NonStop-UX';; netbsd*) os='NetBSD';; msdosdjgpp*) os='DJGPP';; mpeix*) os='MPE/iX';; mint*) os='MiNT';; mingw*) os='MinGW';; lynxos*) os='LynxOS';; linux*) os='GNU/Linux';; hpux*) os='HP-UX';; hiux*) os='HI-UX';; gnu*) os='GNU';; freebsd*) os='FreeBSD';; dgux*) os='DG/UX';; bsdi*) os='BSD/OS';; bsd*) os='BSD';; beos*) os='BeOS';; aux*) os='A/UX';; atheos*) os='AtheOS';; amigaos*) os='Amiga OS';; aix*) os='AIX';; # The default heuristic takes the initial alphabetic string # from $host_os, but capitalizes its first letter. [A-Za-z]*) os=` expr "X$host_os" : 'X\([A-Za-z]\)' | tr '[a-z]' '[A-Z]' `` expr "X$host_os" : 'X.\([A-Za-z]*\)' ` ;; # If $host_os does not start with an alphabetic string, use it unchanged. *) os=$host_os;; esac utils_cv_host_operating_system=$os]]) AC_DEFINE_UNQUOTED(HOST_OPERATING_SYSTEM, "$utils_cv_host_operating_system", [The host operating system.])])#serial 1# On some systems, mkdir ("foo/", 0700) fails because of the trailing slash.# On such systems, arrange to use a wrapper function that removes any# trailing slashes.AC_DEFUN([UTILS_FUNC_MKDIR_TRAILING_SLASH],[dnl AC_CACHE_CHECK([whether mkdir fails due to a trailing slash], utils_cv_func_mkdir_trailing_slash_bug, [ # Arrange for deletion of the temporary directory this test might create. ac_clean_files="$ac_clean_files confdir-slash" AC_TRY_RUN([# include <sys/types.h># include <sys/stat.h># include <stdlib.h> int main () { rmdir ("confdir-slash"); exit (mkdir ("confdir-slash/", 0700)); } ], utils_cv_func_mkdir_trailing_slash_bug=no, utils_cv_func_mkdir_trailing_slash_bug=yes, utils_cv_func_mkdir_trailing_slash_bug=yes ) ] ) if test $utils_cv_func_mkdir_trailing_slash_bug = yes; then AC_LIBOBJ(mkdir) AC_DEFINE(mkdir, rpl_mkdir, [Define to rpl_mkdir if the replacement function should be used.]) fi])#serial 2AC_DEFUN([jm_BISON],[ # getdate.y works with bison only. : ${YACC='bison -y'} AC_SUBST(YACC)])#serial 3dnl based on code from Eleftherios GkioulekasAC_DEFUN([jm_ASSERT],[ AC_MSG_CHECKING(whether to enable assertions) AC_ARG_ENABLE(assert, [ --disable-assert turn off assertions], [ AC_MSG_RESULT(no) AC_DEFINE(NDEBUG,1,[Define to 1 if assertions should be disabled.]) ], [ AC_MSG_RESULT(yes) ] )])#serial 4dnl From Jim Meyeringdnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared --dnl usually in <utime.h>.dnl Some systems have utime.h but don't declare the struct anywhere.AC_DEFUN([jm_CHECK_TYPE_STRUCT_UTIMBUF],[ AC_CHECK_HEADERS(utime.h) AC_REQUIRE([AC_HEADER_TIME]) AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf, [AC_TRY_COMPILE( [#ifdef TIME_WITH_SYS_TIME# include <sys/time.h># include <time.h>#else# ifdef HAVE_SYS_TIME_H# include <sys/time.h># else# include <time.h># endif#endif#ifdef HAVE_UTIME_H# include <utime.h>#endif ], [static struct utimbuf x; x.actime = x.modtime;], fu_cv_sys_struct_utimbuf=yes, fu_cv_sys_struct_utimbuf=no) ]) if test $fu_cv_sys_struct_utimbuf = yes; then AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,[Define if struct utimbuf is declared -- usually in <utime.h>. Some systems have utime.h but don't declare the struct anywhere. ]) fi])#serial 5dnl From Jim Meyering.dnldnl Check whether struct dirent has a member named d_type.dnlAC_DEFUN([jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE], [AC_REQUIRE([AC_HEADER_DIRENT])dnl AC_CACHE_CHECK([for d_type member in directory struct], jm_cv_struct_dirent_d_type, [AC_TRY_LINK(dnl [#include <sys/types.h>#ifdef HAVE_DIRENT_H# include <dirent.h>#else /* not HAVE_DIRENT_H */# define dirent direct# ifdef HAVE_SYS_NDIR_H# include <sys/ndir.h># endif /* HAVE_SYS_NDIR_H */# ifdef HAVE_SYS_DIR_H# include <sys/dir.h># endif /* HAVE_SYS_DIR_H */# ifdef HAVE_NDIR_H# include <ndir.h># endif /* HAVE_NDIR_H */#endif /* HAVE_DIRENT_H */ ], [struct dirent dp; dp.d_type = 0;], jm_cv_struct_dirent_d_type=yes, jm_cv_struct_dirent_d_type=no) ] ) if test $jm_cv_struct_dirent_d_type = yes; then AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1, [Define if there is a member named d_type in the struct describing directory headers.]) fi ])#serial 4dnl From Jim Meyering.dnldnl Check whether struct dirent has a member named d_ino.dnlAC_DEFUN([jm_CHECK_TYPE_STRUCT_DIRENT_D_INO], [AC_REQUIRE([AC_HEADER_DIRENT])dnl AC_CACHE_CHECK([for d_ino member in directory struct], jm_cv_struct_dirent_d_ino, [AC_TRY_LINK(dnl [#include <sys/types.h>#ifdef HAVE_DIRENT_H# include <dirent.h>#else /* not HAVE_DIRENT_H */# define dirent direct# ifdef HAVE_SYS_NDIR_H# include <sys/ndir.h># endif /* HAVE_SYS_NDIR_H */# ifdef HAVE_SYS_DIR_H# include <sys/dir.h># endif /* HAVE_SYS_DIR_H */# ifdef HAVE_NDIR_H# include <ndir.h># endif /* HAVE_NDIR_H */#endif /* HAVE_DIRENT_H */ ], [struct dirent dp; dp.d_ino = 0;], jm_cv_struct_dirent_d_ino=yes, jm_cv_struct_dirent_d_ino=no) ] ) if test $jm_cv_struct_dirent_d_ino = yes; then AC_DEFINE(D_INO_IN_DIRENT, 1, [Define if there is a member named d_ino in the struct describing directory headers.]) fi ])#serial 18dnl This is just a wrapper function to encapsulate this kludge.dnl Putting it in a separate file like this helps share it betweendnl different packages.AC_DEFUN([jm_CHECK_DECLS],[ AC_REQUIRE([_jm_DECL_HEADERS]) AC_REQUIRE([AC_HEADER_TIME]) headers='#include <stdio.h>#if HAVE_STRING_H# if !STDC_HEADERS && HAVE_MEMORY_H# include <memory.h># endif# include <string.h>#else# if HAVE_STRINGS_H# include <strings.h># endif#endif#if HAVE_STDLIB_H# include <stdlib.h>#endif#if HAVE_UNISTD_H# include <unistd.h>#endif#include <sys/types.h>#if TIME_WITH_SYS_TIME# include <sys/time.h># include <time.h>#else# if HAVE_SYS_TIME_H# include <sys/time.h># else# include <time.h># endif#endif#if HAVE_UTMP_H# include <utmp.h>#endif#if HAVE_GRP_H# include <grp.h>#endif#if HAVE_PWD_H# include <pwd.h>#endif' AC_CHECK_DECLS([ free, getenv, geteuid, getgrgid, getlogin, getpwuid, getuid, getutent, lseek, malloc, memchr, memrchr, nanosleep, realloc, stpcpy, strndup, strnlen, strstr, strtoul, strtoull, ttyname], , , $headers)])dnl FIXME: when autoconf has support for it.dnl This is a little helper so we can require these header checks.AC_DEFUN([_jm_DECL_HEADERS],[ AC_REQUIRE([AC_HEADER_STDC]) AC_CHECK_HEADERS(grp.h memory.h pwd.h string.h strings.h stdlib.h \ unistd.h sys/time.h utmp.h utmpx.h)])#serial 26dnl These are the prerequisite macros for files in the lib/dnl directories of the fileutils, sh-utils, and textutils packages.AC_DEFUN([jm_PREREQ],[ jm_PREREQ_ADDEXT jm_PREREQ_C_STACK jm_PREREQ_CANON_HOST jm_PREREQ_DIRNAME jm_PREREQ_ERROR jm_PREREQ_EXCLUDE jm_PREREQ_GETPAGESIZE jm_PREREQ_HARD_LOCALE jm_PREREQ_HASH jm_PREREQ_HUMAN jm_PREREQ_MBSWIDTH jm_PREREQ_MEMCHR jm_PREREQ_PHYSMEM jm_PREREQ_POSIXVER jm_PREREQ_QUOTEARG jm_PREREQ_READUTMP jm_PREREQ_REGEX jm_PREREQ_STAT jm_PREREQ_STRNLEN jm_PREREQ_TEMPNAME # called by mkstemp jm_PREREQ_XGETCWD jm_PREREQ_XREADLINK])AC_DEFUN([jm_PREREQ_ADDEXT],[ dnl For addext.c. AC_SYS_LONG_FILE_NAMES AC_CHECK_FUNCS(pathconf) AC_CHECK_HEADERS(limits.h string.h unistd.h)])AC_DEFUN([jm_PREREQ_CANON_HOST],[ dnl Add any libraries as early as possible. dnl In particular, inet_ntoa needs -lnsl at least on Solaris5.5.1, dnl so we have to add -lnsl to LIBS before checking for that function. AC_SEARCH_LIBS(gethostbyname, [inet nsl]) dnl These come from -lnsl on Solaris5.5.1. AC_CHECK_FUNCS(gethostbyname gethostbyaddr inet_ntoa)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -