⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.ac

📁 压缩包中包含LINUX下多个命令的源码
💻 AC
📖 第 1 页 / 共 2 页
字号:
                  struct ifreq.ifr_broadaddr.sa_family], , ,                 [#include <sys/socket.h>                  #include <net/if.h>])AH_BOTTOM([#ifdef HAVE_STRUCT_IFREQ_IFR_NETMASK_SA_FAMILY# define HAVE_STRUCT_IFREQ_IFR_NETMASK#endif#ifdef HAVE_STRUCT_IFREQ_IFR_BROADADDR_SA_FAMILY# define HAVE_STRUCT_IFREQ_IFR_BROADADDR#endif])AC_CHECK_MEMBERS([struct sockaddr.sa_len], , ,                 [#include <sys/types.h>                  #include <sys/socket.h>])AC_CHECK_MEMBERS([struct hostent.h_addr_list], , , [#include <netdb.h>])AC_CHECK_MEMBERS([struct stat.st_blksize])AH_BOTTOM([#ifdef HAVE_SYS_PARAM_H#include <sys/types.h>#include <sys/param.h>#endif/* Get or fake the disk device blocksize.   Usually defined by sys/param.h (if at all).  */#if !defined(DEV_BSIZE) && defined(BSIZE)#define DEV_BSIZE BSIZE#endif#if !defined(DEV_BSIZE) && defined(BBSIZE) /* SGI */#define DEV_BSIZE BBSIZE#endif#ifndef DEV_BSIZE#define DEV_BSIZE 4096#endif/* Extract or fake data from a `struct stat'.   ST_BLKSIZE: Optimal I/O blocksize for the file, in bytes. */#ifndef HAVE_STRUCT_STAT_ST_BLKSIZE# define ST_BLKSIZE(statbuf) DEV_BSIZE#else /* HAVE_STRUCT_STAT_ST_BLKSIZE *//* Some systems, like Sequents, return st_blksize of 0 on pipes. */# define ST_BLKSIZE(statbuf) ((statbuf).st_blksize > 0 \                              ? (statbuf).st_blksize : DEV_BSIZE)#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */])### Checks for compiler characteristics.AM_C_PROTOTYPES dnl FIXME: Does inetutils even compile on pre-ANSI compilers?AC_C_CONSTdnl See if `weak refs' are possible; these make it possible (with shareddnl libraries) to check for the existance of a standard function at run-timednl instead of compile time, which is very handy for distributing binarydnl version programs that automatically adapt -- in inetutils case, to whetherdnl or not crypt is available.IU_CHECK_WEAK_REFS### Checks for library functions.AC_FUNC_CLOSEDIR_VOIDAC_FUNC_ALLOCAAC_FUNC_SETVBUF_REVERSEDAC_FUNC_FORKAC_FUNC_STRCOLLAC_FUNC_MMAPAC_CHECK_FUNCS(bcopy bcmp bzero cfsetspeed cgetent dirfd fchdir flock \               fpathconf ftruncate \	       getcwd getmsg getspnam initgroups initsetproctitle killpg \               mkstemp ptsname \               setegid seteuid setpgid \               setsid setregid setreuid setresgid setresuid setutent_r \               sigaction sigvec strchr setproctitle tcgetattr tzset utimes \               utime uname \               updwtmp updwtmpx vhangup wait3 wait4)AH_BOTTOM([#ifndef HAVE_BCOPY#define bcopy(f,t,z) memmove(t,f,z)#endif])AH_BOTTOM([#ifndef HAVE_BZERO#define bzero(x,z) memset(x,0,z)#endif])dnl Functions that we will define (in libinetutils) if necessary.AC_REPLACE_FUNCS(getpass getusershell herror memcmp memcpy memmove memset \	         setenv strdup strcasecmp strsignal waitpid poll)dnl Look for the functions typically defined by libutil (which of course maydnl not actually be in libutil), and and use our own versions if necesary._SAVE_LIBS="$LIBS"LIBS="$LIBUTIL $LIBS"AC_REPLACE_FUNCS(login logout logwtmp openpty forkpty ruserok iruserok login_tty)LIBS="$_SAVE_LIBS"dnl Look for the crypt function itself (in libcrypt if possible)_SAVE_LIBS="$LIBS"LIBS="$LIBCRYPT $LIBS"AC_CHECK_FUNCS(crypt)LIBS="$_SAVE_LIBS"AH_BOTTOM([#ifndef HAVE_MEMCPY#define memcpy memmove#endif])AH_BOTTOM([#if !defined(HAVE_MEMMOVE) || !defined(HAVE_MEMSET)/* Make sure size_t is defined */#include <sys/types.h>#endif])AH_BOTTOM([#ifndef HAVE_MEMMOVE/* Declare our own silly version.  */extern void *memmove __P ((void *to, const void *from, size_t sz));#endif])AH_BOTTOM([#ifndef HAVE_MEMSET/* Declare our own silly version.  */extern void memset __P ((void *mem, int val, size_t sz));#endif])dnl FIXME: I don't understand this.dnl If revoke hasn't been defined yet, just define a dummy versionAC_REPLACE_FUNCS(revoke)jm_INCLUDED_REGEX(libinetutils/regex.c)AC_CHECK_FUNC(_obstack_free, ,  AC_LIBOBJ(obstack) INCLUDES="$INCLUDES obstack.h")dnl Use (posix) `setpgid' if it's around, otherwise assume a BSD setpgrpAC_CHECK_FUNC(setpgid, , AC_DEFINE(setpgid, setpgrp,                          [Define to `setpgrp' if you don't have `setpgid'.]))dnl We use our own version of getopt (including our own header file) if thednl system one doesn't have getopt_long.AC_CHECK_FUNC(getopt_long, ,  AC_LIBOBJ(getopt)  AC_LIBOBJ(getopt1)  INCLUDES="$INCLUDES getopt.h")dnl Supply a version of poll() if the libray is missing.dnl syslogd uses poll() unconditionnaly.AC_CHECK_FUNC(poll, ,  AC_DEFINE(HAVE_POLL_H, 1, [Define to one if you have <poll.h>])  AC_LIBOBJ(poll)  INCLUDES="$INCLUDES poll.h")dnl Supply versions of the BSD error reporting functions if the system doesn'tAC_CHECK_FUNC(verrx, ,  AC_LIBOBJ(err)  INCLUDES="$INCLUDES err.h")dnl See if the __PROGNAME variable is defined, otherwise use our own.AC_CHECK_FUNC(__progname,  AC_DEFINE(HAVE___PROGNAME, 1, [Define to one if you have __progname]),  AC_LIBOBJ(__progname))dnl See if snprintf exists, otherwise just use a bogus versionAC_CHECK_FUNC(snprintf,  AC_DEFINE(HAVE_SNPRINTF, 1, [Define to one if you have snprintf]),  AC_LIBOBJ(snprintf))dnl See if vsnprintf exists, otherwise use our own.AC_CHECK_FUNC(vsnprintf,  AC_DEFINE(HAVE_VSNPRINTF, 1, [FIXME]),  AC_LIBOBJ(snprintf))AH_BOTTOM([#ifndef HAVE_VSNPRINTF#include <sys/types.h>#if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__#include <stdarg.h>#else#include <varargs.h>#endifextern int vsnprintf __P ((char *, size_t, const char *, va_list));#endif])dnl See if the system has strerror, and replace it if notAC_CHECK_FUNC(strerror, , AC_LIBOBJ(strerror))if test "$ac_cv_func_strerror" = no; then  # No strerror, so see if the SYS_ERRLIST variable can be used by ours  AC_CHECK_FUNC(sys_errlist, AC_DEFINE(HAVE_SYS_ERRLIST, 1,                              [Define to one if you have sys_errlist.]))  if test "$ac_cv_func_sys_errlist" = yes; then    AC_CHECK_DECL(sys_errlist, , ,     [#include <stdio.h>      #ifdef HAVE_ERRNO_H      #include <errno.h>      #endif])  fifidnl See if the system has hstrerror, and replace it if notAC_CHECK_FUNC(hstrerror, , AC_LIBOBJ(hstrerror))if test "$ac_cv_func_hstrerror" = yes; then  AC_CHECK_DECL(hstrerror, , , [#include <netdb.h>])else  # No hstrerror, so see if the H_ERRLIST variable can be used by ours  AC_CHECK_FUNC(h_errlist)  if test "$ac_cv_func_h_errlist" = yes; then    AC_CHECK_DECL(h_errlist, , , [#include <netdb.h>])  fifiif test "$ac_cv_func_hstrerror" = yes -o "$ac_cv_func_h_errlist" = yes; then  # If there's a system hstrerror, or we can reasonably replace it, say so.  # We still provide some definition, regardless, but this allows people to use  # a reasonable alternative if the situation allows, rather than using a  # degenerate version that only says `Host lookup error N'.  AC_DEFINE(HAVE_HSTRERROR, 1, [Define to one if you have hstrerror.])fiAH_BOTTOM([#if !defined(HAVE_DECL_HSTRERROR) || !HAVE_DECL_HSTRERRORextern const char *hstrerror __P ((int));#endif])## Checks for function declarations.AC_DECL_SYS_SIGLISTAC_CHECK_DECLS(crypt, , , [#include <unistd.h>])dnl EWOULDBLOCK is more or less the BSD version of posix EAGAIN.IU_CHECK_MACRO(EWOULDBLOCK, [#include <errno.h>], , ,  AC_DEFINE(EWOULDBLOCK, EAGAIN, 1, [FIXME]))AC_CHECK_DECLS(errno, , , [#include <errno.h>])dnl See whether <syslog.h> will declare special internal stuff if we definednl SYSLOG_NAMES before including it.  We check for various syslog internaldnl macros, the typedef `CODE', and the variable `prioritynames'.define([iu_syslog_includes],  [[#include <stdlib.h>    #define SYSLOG_NAMES    #include <syslog.h> ]])IU_CHECK_MACRO(syslog internal macros,  iu_syslog_includes,  [LOG_MAKEPRI LOG_PRI LOG_FAC],  AC_CHECK_TYPE(CODE,    AC_CHECK_DECL(prioritynames,      AC_DEFINE(HAVE_SYSLOG_INTERNAL, 1, [FIXME]),      INCLUDES="$INCLUDES syslog-int.h",      iu_syslog_includes),    INCLUDES="$INCLUDES syslog-int.h", iu_syslog_includes),  INCLUDES="$INCLUDES syslog-int.h")undefine([iu_syslog_includes])dnl Some systems don't declare common functions (especially if they returndnl int), at least in the expected header file.  Check.AC_CHECK_DECLS([fclose, pclose], , , [#include <stdio.h>])AC_CHECK_DECLS([getcwd, getlogin, getpass, getusershell, ttyname], , ,               [#include <unistd.h>])AH_BOTTOM([#if !HAVE_DECL_GETLOGINextern char *getlogin __P((void));#endif])AH_BOTTOM([#if !HAVE_DECL_GETCWDextern char *getcwd __P((char *, size_t));#endif])AH_BOTTOM([#if !HAVE_DECL_GETPASSextern char *getpass __P((const char *));#endif])AH_BOTTOM([#if !HAVE_DECL_TTYNAMEextern char *ttyname __P ((int));#endif])AC_CHECK_DECLS([strerror, strchr], , , [#include <string.h>])AH_BOTTOM([#if !HAVE_DECL_STRERRORextern const char *strerror __P ((int));#endif])AH_BOTTOM([#if !HAVE_DECL_STRCHRextern char *strchr __P ((char *str, int ch));extern char *strrchr __P ((char *str, int ch));#endif#ifndef HAVE_STRCHR#define strchr index#define strrchr rindex#endif])AC_CHECK_DECLS([getgrnam, initgroups], , , [#include <grp.h>])AH_BOTTOM([#ifndef HAVE_DECl_GETGRNAMextern struct group *getgrnam __P ((const char *));#endif])AC_CHECK_DECLS(htons, , ,  [ #ifdef HAVE_SYS_TYPES_H    # include <sys/types.h>    #endif    #ifdef HAVE_SYS_PARAM_H    # include <sys/param.h>    #endif    #include <netinet/in.h> ])dnl Our home-grown version of setenv needs to use ENVIRONAC_CHECK_DECLS(environ, , ,  [ #ifdef HAVE_UNISTD_H    # include <unistd.h>    #endif    #ifdef HAVE_STDLIB_H    # include <stdlib.h>    #endif ])dnl See if we have h_errno (the test is here so we can use -lresolvdnl if necessary).AC_CACHE_CHECK([for h_errno], inetutils_cv_var_h_errno,  AC_TRY_COMPILE([#include <netdb.h>],    [ extern int h_errno; int iu_x = h_errno; ],    inetutils_cv_var_h_errno=yes, inetutils_cv_var_h_errno=no))if test "$inetutils_cv_var_h_errno" = yes; then  dnl FIXME: Isn't this wrong? Shouldn't the declaration check define  dnl        this if we find h_errno?  AC_DEFINE(HAVE_H_ERRNO, 1, [Define to one if you have h_errno.])  AC_CHECK_DECL(h_errno, , , [#include <netdb.h>])fi## Checks for CPP macros.dnl Look for the posix SEEK_ macros (for lseek), and if not found, try thednl similar berkeley L_ macros; if neither can be found, use the classic unixdnl values.IU_CHECK_MACRO(SEEK_ macros,  [#include <unistd.h>], SEEK_SET SEEK_CUR SEEK_END,  :,  IU_CHECK_MACRO(L_ seek macros,    [#include <unistd.h>], L_SET L_INCR L_XTND,    AC_DEFINE(SEEK_SET, L_SET, [FIXME])    AC_DEFINE(SEEK_CUR, L_INCR, [FIXME])    AC_DEFINE(SEEK_END, L_XTND, [FIXME]),    AC_DEFINE(SEEK_SET, 0, [FIXME])    AC_DEFINE(SEEK_CUR, 1, [FIXME])    AC_DEFINE(SEEK_END, 2, [FIXME])))dnl Look for the posix _FILENO macros; if not found, use the classic unix values.IU_CHECK_MACRO(_FILENO macros,  [#include <unistd.h>], STDIN_FILENO STDOUT_FILENO STDERR_FILENO,  :,  AC_DEFINE(STDIN_FILENO, 0, [FIXME])  AC_DEFINE(STDOUT_FILENO, 1, [FIXME])  AC_DEFINE(STDERR_FILENO, 2, [FIXME]))dnl See where to find fd_set (bit-vectors for select) manipulation macros.IU_CHECK_MACRO(fd_set macros, [#include <sys/types.h>],  FD_ZERO FD_CLR FD_SET FD_ISSET)if test "$inetutils_cv_macro_fd_set_macros" = no; then  IU_CHECK_MACRO(fd_set macros in <sys/time.h>, [#include <sys/time.h>],    FD_ZERO FD_CLR FD_SET FD_ISSET)fidnl Configure paths used by inetutils programs.  See the file `paths' fordnl details.PATHDEFS_MAKE=pathdefs.makePATHS_DEFS=paths.defsIU_CONFIG_PATHS($srcdir/paths, PATHDEFS_MAKE, PATHS_DEFS)AH_BOTTOM([/* Defaults for PATH_ variables.  */#include <include/confpaths.h>])dnl Supply optional header files by linking a copy into the object include dirLINK_SRCS="$LINK_SRCS `for I in $INCLUDES; do echo $ac_n ' 'headers/$I$ac_c; done`"LINK_DSTS="$LINK_DSTS `for I in $INCLUDES; do echo $ac_n ' 'include/$I$ac_c; done`"ac_sources="$LINK_SRCS"ac_dests="$LINK_DSTS"while test -n "$ac_sources"; do  set $ac_dests  ac_dest=$1  shift  ac_dests=$*  set $ac_sources  ac_source=$1  shift  ac_sources=$*  ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"doneAC_CONFIG_LINKS([$ac_config_links_1])dnl Ok this is the end of the rope, even autoconf can't help.dnl For example on certain system login(1) will not work if wednl don't have an entry in utmpx.dnl Also for some OS they are better handle with STREAMScase "$host" in*olaris*)  AC_DEFINE(SOLARIS, 1, [FIXME])  AC_DEFINE(UTMPX, 1, [FIXME])  AC_DEFINE(HAVE_STREAMSPTY, 1, [FIXME])  ;;*irix* | *hpux*)  AC_DEFINE(UTMPX, 1, [FIXME])  AC_DEFINE(UTMPX, 1, [FIXME])  ;;esacAC_CONFIG_FILES([Makefile libinetutils/Makefile libtelnet/Makefile glob/Makefilelibicmp/Makefile ping/Makefile ftp/Makefile ftpd/Makefile inetd/Makefilercp/Makefilerexecd/Makefile rlogin/Makefile rlogind/Makefile rsh/Makefilershd/Makefile logger/Makefile syslogd/Makefile talk/Makefiletalkd/Makefile telnet/Makefile telnetd/Makefile tftp/Makefiletftpd/Makefile uucpd/Makefile gwhois/Makefile libls/Makefilelibicmp/Makefile ping/Makefileinclude/confpaths.h:headers/confpaths.h.inheaders/Makefiledoc/Makefile doc/rfc/Makefile])AC_OUTPUT

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -