📄 aclocal.m4
字号:
# backupfile.m4 serial 1dnl Copyright (C) 2002 Free Software Foundation, Inc.dnl This file is free software, distributed under the terms of the GNUdnl General Public License. As a special exception to the GNU Generaldnl Public License, this file may be distributed as part of a programdnl that contains a configuration script generated by Autoconf, underdnl the same distribution terms as the rest of that program.AC_DEFUN([gl_BACKUPFILE],[ dnl Prerequisites of lib/backupfile.c. AC_REQUIRE([AC_HEADER_DIRENT]) AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID]) AC_CHECK_HEADERS_ONCE(limits.h stdlib.h string.h) AC_CHECK_DECLS_ONCE(getenv malloc) jm_CHECK_TYPE_STRUCT_DIRENT_D_INO dnl Prerequisites of lib/addext.c. AC_REQUIRE([jm_AC_DOS]) AC_SYS_LONG_FILE_NAMES AC_CHECK_HEADERS_ONCE(limits.h string.h unistd.h) AC_CHECK_FUNCS(pathconf)])#serial 5dnl 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 ])# dirname.m4 serial 1dnl Copyright (C) 2002 Free Software Foundation, Inc.dnl This file is free software, distributed under the terms of the GNUdnl General Public License. As a special exception to the GNU Generaldnl Public License, this file may be distributed as part of a programdnl that contains a configuration script generated by Autoconf, underdnl the same distribution terms as the rest of that program.AC_DEFUN([gl_DIRNAME],[ dnl Prerequisites of lib/dirname.h. AC_REQUIRE([jm_AC_DOS]) dnl Prerequisites of lib/dirname.c. AC_REQUIRE([AC_HEADER_STDC]) AC_CHECK_HEADERS_ONCE(string.h) dnl Prerequisites of lib/basename.c. AC_REQUIRE([AC_HEADER_STDC]) AC_CHECK_HEADERS_ONCE(string.h) dnl Prerequisites of lib/stripslash.c. AC_REQUIRE([AC_HEADER_STDC]) AC_CHECK_HEADERS_ONCE(string.h)])#serial 5# Define some macros required for proper operation of code in lib/*.c# on MSDOS/Windows systems.# From Jim Meyering.AC_DEFUN([jm_AC_DOS], [ AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos], [ AC_TRY_COMPILE([], [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__neither MSDOS nor Windows#endif], [ac_cv_win_or_dos=yes], [ac_cv_win_or_dos=no]) ]) if test x"$ac_cv_win_or_dos" = xyes; then ac_fs_accepts_drive_letter_prefix=1 ac_fs_backslash_is_file_name_separator=1 else ac_fs_accepts_drive_letter_prefix=0 ac_fs_backslash_is_file_name_separator=0 fi AH_VERBATIM(FILESYSTEM_PREFIX_LEN, [#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX# define FILESYSTEM_PREFIX_LEN(Filename) \ ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)#else# define FILESYSTEM_PREFIX_LEN(Filename) 0#endif]) AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX], $ac_fs_accepts_drive_letter_prefix, [Define on systems for which file names may have a so-called `drive letter' prefix, define this to compute the length of that prefix, including the colon.]) AH_VERBATIM(ISSLASH, [#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR# define ISSLASH(C) ((C) == '/' || (C) == '\\')#else# define ISSLASH(C) ((C) == '/')#endif]) AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR], $ac_fs_backslash_is_file_name_separator, [Define if the backslash character may also serve as a file name component separator.]) ])#serial 7AC_DEFUN([gl_ERROR],[ AC_FUNC_ERROR_AT_LINE dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]). jm_PREREQ_ERROR])# Prerequisites of lib/error.c.AC_DEFUN([jm_PREREQ_ERROR],[ AC_REQUIRE([AC_HEADER_STDC]) AC_REQUIRE([AC_FUNC_VPRINTF]) AC_CHECK_FUNCS(strerror) AC_CHECK_DECLS([strerror]) AC_FUNC_STRERROR_R])# getopt.m4 serial 1dnl Copyright (C) 2002 Free Software Foundation, Inc.dnl This file is free software, distributed under the terms of the GNUdnl General Public License. As a special exception to the GNU Generaldnl Public License, this file may be distributed as part of a programdnl that contains a configuration script generated by Autoconf, underdnl the same distribution terms as the rest of that program.AC_DEFUN([gl_GETOPT],[ dnl Prerequisites of lib/getopt.c. AC_CHECK_HEADERS_ONCE(string.h)])# malloc.m4 serial 7dnl Copyright (C) 2002 Free Software Foundation, Inc.dnl This file is free software, distributed under the terms of the GNUdnl General Public License. As a special exception to the GNU Generaldnl Public License, this file may be distributed as part of a programdnl that contains a configuration script generated by Autoconf, underdnl the same distribution terms as the rest of that program.dnl From Jim Meyering.dnl Determine whether malloc accepts 0 as its argument.dnl If it doesn't, arrange to use the replacement function.AC_DEFUN([jm_FUNC_MALLOC],[ AC_REQUIRE([AC_FUNC_MALLOC]) dnl autoconf < 2.57 used the symbol ac_cv_func_malloc_works. if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then gl_PREREQ_MALLOC fi])# Prerequisites of lib/malloc.c.AC_DEFUN([gl_PREREQ_MALLOC], [ :])# mbrtowc.m4 serial 5dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.dnl This file is free software, distributed under the terms of the GNUdnl General Public License. As a special exception to the GNU Generaldnl Public License, this file may be distributed as part of a programdnl that contains a configuration script generated by Autoconf, underdnl the same distribution terms as the rest of that program.dnl From Paul Eggertdnl This file can be removed, and jm_FUNC_MBRTOWC replaced withdnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.AC_DEFUN([jm_FUNC_MBRTOWC],[ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], jm_cv_func_mbrtowc, [AC_TRY_LINK( [#include <wchar.h>], [mbstate_t state; return ! (sizeof state && mbrtowc);], jm_cv_func_mbrtowc=yes, jm_cv_func_mbrtowc=no)]) if test $jm_cv_func_mbrtowc = yes; then AC_DEFINE(HAVE_MBRTOWC, 1, [Define to 1 if mbrtowc and mbstate_t are properly declared.]) fi])# mbstate_t.m4 serial 9dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.dnl This file is free software, distributed under the terms of the GNUdnl General Public License. As a special exception to the GNU Generaldnl Public License, this file may be distributed as part of a programdnl that contains a configuration script generated by Autoconf, underdnl the same distribution terms as the rest of that program.# From Paul Eggert.# BeOS 5 has <wchar.h> but does not define mbstate_t,# so you can't declare an object of that type.# Check for this incompatibility with Standard C.# AC_TYPE_MBSTATE_T# -----------------AC_DEFUN([AC_TYPE_MBSTATE_T], [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t, [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT# include <wchar.h>], [mbstate_t x; return sizeof x;])], [ac_cv_type_mbstate_t=yes], [ac_cv_type_mbstate_t=no])]) if test $ac_cv_type_mbstate_t = yes; then AC_DEFINE([HAVE_MBSTATE_T], 1, [Define to 1 if <wchar.h> declares mbstate_t.]) else AC_DEFINE([mbstate_t], int, [Define to a type if <wchar.h> does not define.]) fi])# memchr.m4 serial 1dnl Copyright (C) 2002 Free Software Foundation, Inc.dnl This file is free software, distributed under the terms of the GNUdnl General Public License. As a special exception to the GNU Generaldnl Public License, this file may be distributed as part of a programdnl that contains a configuration script generated by Autoconf, underdnl the same distribution terms as the rest of that program.AC_DEFUN([gl_FUNC_MEMCHR],[ AC_REPLACE_FUNCS(memchr) if test $ac_cv_func_memchr = no; then jm_PREREQ_MEMCHR fi])# Prerequisites of lib/memchr.c.AC_DEFUN([jm_PREREQ_MEMCHR], [ AC_CHECK_HEADERS_ONCE(limits.h stdlib.h) AC_CHECK_HEADERS(bp-sym.h)])#serial 1dnl From Mumit Khan and Paul Eggertdnl Determine whether mkdir accepts only one argument instead of the usual two.AC_DEFUN([PATCH_FUNC_MKDIR_TAKES_ONE_ARG], [AC_CHECK_FUNCS(mkdir) AC_CACHE_CHECK([whether mkdir takes only one argument], patch_cv_mkdir_takes_one_arg, [patch_cv_mkdir_takes_one_arg=no if test $ac_cv_func_mkdir = yes; then AC_TRY_COMPILE([#include <sys/types.h>#include <sys/stat.h> ], [mkdir (".", 0);], , [AC_TRY_COMPILE([#include <sys/types.h>#include <sys/stat.h> ], [mkdir (".");], patch_cv_mkdir_takes_one_arg=yes )] ) fi ] ) if test $patch_cv_mkdir_takes_one_arg = yes; then AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1, [Define if mkdir takes only one argument.]) fi ])# onceonly.m4 serial 3dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.dnl This file is free software, distributed under the terms of the GNUdnl General Public License. As a special exception to the GNU Generaldnl Public License, this file may be distributed as part of a programdnl that contains a configuration script generated by Autoconf, underdnl the same distribution terms as the rest of that program.dnl This file defines some "once only" variants of standard autoconf macros.dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERSdnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCSdnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLSdnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDCdnl The advantage is that the check for each of the headers/functions/declsdnl will be put only once into the 'configure' file. It keeps the size ofdnl the 'configure' file down, and avoids redundant output when 'configure'dnl is run.dnl The drawback is that the checks cannot be conditionalized. If you writednl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fidnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands todnl empty, and the check will be inserted before the body of the AC_DEFUNed
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -