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

📄 configure.ac

📁 压缩包中包含LINUX下多个命令的源码
💻 AC
📖 第 1 页 / 共 2 页
字号:
# Configuration for inetutils## Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.## Written by Miles Bader <miles@gnu.ai.mit.edu>## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2, or (at your option)# any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.#AC_PREREQ(2.52)AC_INIT([GNU inetutils], [1.4.0], [bug-inetutils@gnu.org])AC_CONFIG_SRCDIR([inetd/inetd.c])AM_CONFIG_HEADER([config.h:config.hin])AC_CANONICAL_SYSTEM # FIXME: Why not just _HOST?# config.h turns this on, so make sure it's on for our tests too#CPPFLAGS=-D_BSD_SOURCE# Include files that we link into our own include directory from headers.# Initialize it with the things we always want to use.INCLUDES="crypt.h arpa/telnet.h arpa/ftp.h arpa/tftp.h protocols/talkd.h	tftpsubs.h"# Files that we link from somewhere other than headers to includes .  The# number of entries in LINK_SRCS should match that in LINK_DSTS.LINK_SRCS=''LINK_DSTS=''dnl For now, we always use libexecdir; later we may want to vary where thednl daemons go.inetdaemondir='$(libexecdir)'AC_SUBST(inetdaemondir)AC_ARG_ENABLE(servers, [  --disable-servers       don't compile servers],	      , enable_servers=yes)AC_ARG_ENABLE(clients, [  --disable-clients       don't compile clients],	      , enable_clients=yes)AC_ARG_ENABLE(libls,   [  --disable-libls         disable support for libls ],              , enable_libls=yes)AC_ARG_ENABLE(encryption, [  --enable-encryption     enable encryption],	      , enable_encryption=no)AC_ARG_ENABLE(authentication,              [  --enable-authentication enable connection authentication],	      , enable_authentication=no)AC_ARG_WITH(krb4, [  --with-krb4[[=PATH]]      Compile with Kerberos IV],            [KERBEROS_VERSION=4             KERBEROS_DIR=$withval])AC_ARG_WITH(krb5, [  --with-krb5[[=PATH]]      Compile with Kerberos V],            [KERBEROS_VERSION=5             KERBEROS_DIR=$withval])AC_ARG_WITH(wrap, [  --with-wrap    add tcp wrapper support])AC_ARG_WITH(pam,  [  --with-pam    add support for PAM])IU_ENABLE_SERVER(ftpd)IU_ENABLE_SERVER(inetd)IU_ENABLE_SERVER(rexecd)IU_ENABLE_SERVER(rlogind)IU_ENABLE_SERVER(rshd)IU_ENABLE_SERVER(syslogd)IU_ENABLE_SERVER(talkd)IU_ENABLE_SERVER(telnetd)IU_ENABLE_SERVER(tftpd)IU_ENABLE_SERVER(uucpd)IU_ENABLE_CLIENT(ftp)IU_ENABLE_CLIENT(ping)IU_ENABLE_CLIENT(rcp)IU_ENABLE_CLIENT(rlogin)IU_ENABLE_CLIENT(rsh)IU_ENABLE_CLIENT(logger)IU_ENABLE_CLIENT(talk)IU_ENABLE_CLIENT(telnet)IU_ENABLE_CLIENT(tftp)IU_ENABLE_CLIENT(whois)IU_ENABLE_CLIENT(ifconfig)AM_INIT_AUTOMAKE### Checks for programs.AC_AIXAC_CHECK_TOOL(AR, ar)AC_ISC_POSIXAC_MINIXAC_PATH_PROG(RM, rm, rm)AC_PROG_CCAC_PROG_CPPAC_PROG_INSTALLAC_PROG_MAKE_SETAC_PROG_RANLIBAC_PROG_YACCdnl __P is the standard name for the ansi-or-not-ansi arg-decl macro.dnl We define our own version in <config.h> if the system doesn't supply one.dnl NOTE: This check has to be done pretty early because we use __P indnl       <config.h>IU_CHECK_MACRO(__P, [#include <sys/cdefs.h>])AH_BOTTOM([#ifdef HAVE___P/* The system defines __P; we tested for it in <sys/cdefs.h>, so include that   if we can.  */# ifdef HAVE_SYS_CDEFS_H#  include <sys/cdefs.h># endif#else /* !HAVE___P *//* If the system includes don't seem to define __P, do it here instead.  */# if defined (__GNUC__) || (defined (__STDC__) && __STDC__) || defined (__cplusplus)#  define	__P(args)	args	/* Use prototypes.  */#else#  define	__P(args)	()	/* No prototypes.  */#endif#endif /* HAVE___P */])### Checks for libraries.AC_CHECK_LIB(bsd, revoke)AC_CHECK_LIB(nsl, inet_ntoa)AC_CHECK_LIB(resolv, gethostname)AC_CHECK_LIB(socket, getpeername)AC_CHECK_LIB(opie, opiegenerator)AC_CHECK_LIB(z, gzdopen)# We want to use libreadline if it is available.  However, it seems that the# guile hackers have had problems because there is a Solaris libreadline# that is different from the GNU libreadline; therefore we test for an obscure# function in the GNU libreadline.#AC_CHECK_LIB(termcap, tputs)#AC_CHECK_LIB(readline, rl_bind_key,,, -ltermcap)AC_CHECK_LIB(readline, rl_bind_key,             [LIBREADLINE=-lreadline              AC_DEFINE(HAVE_LIBREADLINE, 1,	           [Define to one if you have -lreadline])],             [LIBREADLINE=], "$LIBTERMCAP")AC_SUBST(LIBREADLINE)AC_SUBST(LIBTERMCAP)dnl See if there's a separate libcrypt (many systems put crypt there)AC_CHECK_LIB(crypt, crypt, LIBCRYPT=-lcrypt)AC_SUBST(LIBCRYPT)# See if a termcap library is available (under one of several names)IU_LIB_TERMCAP# If not, add a bogus version of tgetent to libinetutils, as that's the only# function actually used (to check terminal type validity), modulo any# dependencies from curses.if test -z "$LIBTERMCAP"; then  # Some packages include termcap just ;  # for those cases, we really don't need termcap.  AC_LIBOBJ(stub_tgetent)fidnl libutil is a 4.4BSD library that defines several functions handy fordnl inetutil daemons, doing such things as utmp frobbing, and pty setup.AC_CHECK_LIB(util, logout, LIBUTIL=-lutil)AC_SUBST(LIBUTIL)# Check if they want support for PAM.  Certain daemons like# ftpd have support for it.# See if we have libpam.a this is for ftpd.if test "$with_pam" = yes ; then  AC_CHECK_LIB(dl, dlopen)  AC_CHECK_LIB(pam, pam_authenticate, LIBPAM=-lpam)  if test "$ac_cv_lib_pam_pam_authenticate" = yes ; then     AC_DEFINE(WITH_PAM, 1, [Define to one if you have -lpam.])  fifiAC_SUBST(LIBPAM)# Can we use libls? but we must have fchdir()if test "$enable_libls" = yes  -a "$ac_cv_func_fchdir" = yes ; then  LIBLS="../libls/libls.a"  libls_BUILD="libls.a"  AC_DEFINE(WITH_LIBLS, 1, [Define to one if you have -lls])else  LIBLS=''  libls_BUILD=''fiAC_SUBST(LIBLS)AC_SUBST(libls_BUILD)# Only talk uses curses, so only check for it if we want thatif test "$enable_talk" != no; then  IU_LIB_CURSESfiif test "$enable_talk" != no -a "$LIBCURSES"; then  enable_talk=yeselse  if test "$enable_talk" = yes; then    AC_MSG_WARN([curses is not available, so not building talk])  fi  enable_talk=no  talk_BUILD=''fi# Look for a system `glob' function, and use our own if we can't find one (or# if the system one is missing features we need).sys_glob=noif test "$ac_cv_header_glob_h" = yes; then  AC_CHECK_LIB(glob, glob, LIBGLOB=-lglob)  _SAVE_LIBS="$LIBS"  LIBS="$LIBGLOB $LIBS"  AC_CHECK_FUNC(glob,    IU_CHECK_MACRO(ok system glob,      [#include <glob.h>], GLOB_BRACE GLOB_TILDE,      sys_glob=yes))  LIBS="$_SAVE_LIBS"fiif test "$sys_glob" != yes; then  libglob_BUILD=libglob.a  LINK_SRCS="$LINK_SRCS glob/glob.h"  LINK_DSTS="$LINK_DSTS include/glob.h"  LINK_SRCS="$LINK_SRCS glob/fnmatch.h"  LINK_DSTS="$LINK_DSTS include/fnmatch.h"  LIBGLOB="-L../glob -lglob"else  libglob_BUILD=''fiAC_SUBST(LIBGLOB)AC_SUBST(libglob_BUILD)dnl FIXME: Make this test case a bit more robust.  Is there a reason whydnl        KRB4 exists?LIBAUTH=INCAUTH=if test "$enable_encryption" = yes -o "$enable_authentication" = yes; then  AH_TEMPLATE(KERBEROS_IV, [Define to one if you have Kerberos IV])  AH_TEMPLATE(KRB4, [Define to one if you have Kerberos IV])  AH_TEMPLATE(KERBEROS, [Define to one if you have Kerberos])  AH_TEMPLATE(DES_ENCRYPTION, [FIXME])  AH_TEMPLATE(KERBEROS_V, [FIXME])    if test $KERBEROS_VERSION -eq 4; then    AC_CHECK_LIB(krb, krb_mk_req,                 [LIBAUTH=-lkrb                  AC_DEFINE(KERBEROS_IV)                  AC_DEFINE(KRB4)],                 -L$KERBEROS_DIR)    if test ".$LIBAUTH" != . ; then      AC_CHECK_LIB(des, des_key_sched,                   [LIBAUTH="$LIBAUTH -ldes"],                   -L$KERBEROS_DIR)      dnl FIXME: Fix this to one test case.      test "$enable_authentication" = yes -a "$ac_cv_lib_krb_krb_mk_req" = yes\  && AC_DEFINE(KRB4)      test "$enable_authentication" = yes -a "$ac_cv_lib_krb_krb_mk_req" = yes \  && AC_DEFINE(KERBEROS)      test "$enable_encryption" = yes -a "$ac_cv_lib_des_des_key_sched" = yes \        && AC_DEFINE(DES_ENCRYPTION)    fi  else    IU_CHECK_KRB5($KERBEROS_VERSION,$KERBEROS_PREFIX)    LIBAUTH=$KRB5_LIBS    INCAUTH=$KRB_CFLAGS    if test ".$LIBAUTH" != . ;then      case $KERBEROS_VERSION in      4) AC_DEFINE(KERBEROS_IV)         AC_DEFINE(KRB4)         ;;      5) AC_DEFINE(KERBEROS_V)         ;;      esac    fi  fifiAC_SUBST(LIBAUTH)AC_SUBST(INCAUTH)dnl Define CPP macros that enable auth/encrypt codeif test ".$LIBAUTH" != .; then  test "$enable_authentication" = yes && AC_DEFINE(AUTHENTICATION, 1,                   [Define to one if you want authentication.])  test "$enable_encryption" = yes     && AC_DEFINE(ENCRYPTION, 1,                   [Define to one if you want encryption.])fidnl Check if they want support for Wrap.  Certain daemons likednl ftpd have support for it.if test "$with_wrap" = yes; thendnl See if we have libwrap.adnl we can not use AC_CHECK_LIB reliably since for the wrap libdnl you have to define some global variables#AC_CHECK_LIB(wrap, hosts_ctl, LIBWRAP=-lwrap)  AC_MSG_CHECKING(hosts_ctl in -lwrap);  save_LIBS=$LIBS  LIBS="$save_LIBS -lwrap"  AC_TRY_LINK([int allow_severity = 1; int deny_severity = 1;],              hosts_ctl(), eval "ac_cv_lib_wrap_hosts_ctl=yes",              eval "ac_cv_lib_wrap_hosts_ctl=no")  LIBS=$save_LIBS  if test "$ac_cv_lib_wrap_hosts_ctl" = yes ; then    AC_DEFINE(WITH_WRAP, 1, [Define to one if you have -lwrap.])    LIBWRAP=-lwrap  fi  AC_MSG_RESULT($ac_cv_lib_wrap_hosts_ctl);fiAC_SUBST(LIBWRAP)### Checks for header files.AC_HEADER_STDCAC_HEADER_TIMEAC_HEADER_DIRENTAC_CHECK_HEADERS(arpa/nameser.h des.h errno.h fcntl.h features.h glob.h \                 krb.h memory.h malloc.h netinet/in_systm.h netinet/ip.h \                 netinet/ip_icmp.h netinet/ip_var.h \                 security/pam_appl.h \                 shadow.h stdarg.h stdlib.h string.h stropts.h sys/tty.h \                 sys/utsname.h sys/ptyvar.h sys/msgbuf.h sys/filio.h \                 sys/ioctl_compat.h sys/cdefs.h sys/stream.h sys/mkdev.h \		 sys/sockio.h sys/sysmacros.h sys/param.h sys/file.h \		 sys/proc.h sys/select.h sys/time.h sys/wait.h sys/resource.h \		 stropts.h tcpd.h termio.h termios.h utmp.h utmpx.h unistd.h \                 vis.h)AC_CHECK_HEADER(poll.h, , [INCLUDES="$INCLUDES poll.h"])### Checks for types.dnl Checks return type of signal handlersAC_TYPE_SIGNALdnl We may need our own definition for struct osockaddr (equivalent to thednl old 4.3BSD struct sockaddr, and used in grotty bsd talk protocol)AC_CHECK_TYPE(struct osockaddr, ,              AC_DEFINE(HAVE_OSOCKADDR_H, 1,                        [Define to one if you have <osockaddr.h>.])                        INCLUDES="$INCLUDES osockaddr.h",	      [#include <sys/types.h>               #include <sys/socket.h> ])AC_CHECK_TYPES(struct if_nameindex, , ,  [#include <sys/socket.h>   #include <net/if.h>])dnl sig_t is the type of a signal handler (4.4BSD)AC_CHECK_TYPES(sig_t, , ,  [#include <sys/types.h>   #include <signal.h> ])AH_BOTTOM([#ifndef HAVE_SIG_Ttypedef RETSIGTYPE (*sig_t) ();#endif])dnl sigset_t is a set of signals (4.4BSD)AC_CHECK_TYPE(sigset_t, , AC_DEFINE(sigset_t, unsigned long, [FIXME]),  [#include <sys/types.h>   #include <signal.h> ])dnl I'm not sure what this is, but netbsd has it; just use int if necessary.AC_CHECK_TYPE(sig_atomic_t, , AC_DEFINE(sig_atomic_t, int, [FIXME]),  [#include <sys/types.h>   #include <signal.h> ])AC_CHECK_TYPE(sa_family_t, , AC_DEFINE(sa_family_t, unsigned int, [FIXME]),    [#include <sys/types.h>     #ifdef HAVE_SOCKET_H     #include <socket.h>     #endif     #include <sys/socket.h> ])dnl Check for termio-related types and definesAC_CHECK_TYPES(cc_t, , , [#if defined(HAVE_TERMIOS_H)  # include <termios.h>  #elif defined(HAVE_TERMIO_H)  # include <termio.h>  #else  # include <sgtty.h>  #endif ])### Checks for structures.AC_CHECK_MEMBERS([struct sockaddr_in.sin_len], , ,    [ #include <sys/types.h>      #include <netinet/in.h> ])if test "$ac_cv_header_utmp_h" = yes; then  AC_CHECK_TYPES(struct lastlog, , , [#include <utmp.h>])  AC_CHECK_MEMBERS([utmp.ut_type, utmp.ut_pid, utmp.ut_id, utmp.ut_user,		    utmp.ut_host, utmp.ut_tv, utmp.ut_exit], , ,		   [#ifdef HAVE_SYS_TYPES_H                    # include <sys/types.h>                    #endif		    #include <utmp.h>])fiif test "$ac_cv_header_utmpx_h" = yes; then  AC_CHECK_MEMBERS([struct utmpx.ut_tv], , , [#include <utmpx.h>])fi# AC_CHECK_MEMBERS (as of version 2.53 ) fails to recognize the presense# of a structure member which is itself of an aggregate type. To work# around the bug, we first check for a non-aggregate sub-member of the# member in question and then create an appropriate HAVE_ define.AC_CHECK_MEMBERS([stuct ifreq.ifr_index,                  struct ifreq.ifr_netmask.sa_family,

⌨️ 快捷键说明

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