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

📄 configure.ac

📁 linux下常用的网络工具的代码
💻 AC
📖 第 1 页 / 共 2 页
字号:
# Configuration for inetutils## Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2005, 2006 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.59)AC_INIT([GNU inetutils], [1.5], [bug-inetutils@gnu.org])AC_CONFIG_SRCDIR([inetd/inetd.c])AC_CONFIG_AUX_DIR([build-aux])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_SOURCEdnl For now, we always use libexecdir; later we may want to vary where thednl daemons go.inetdaemondir='$(libexecdir)'AC_SUBST(inetdaemondir)AC_ARG_WITH([krb4],            AC_HELP_STRING([--with-krb4[[=PATH]]],                           [Compile with Kerberos IV]),            [KERBEROS_VERSION=4             KERBEROS_DIR=$withval])AC_ARG_WITH([krb5],            AC_HELP_STRING([--with-krb5[[=PATH]]],                           [Compile with Kerberos V]),            [KERBEROS_VERSION=5             KERBEROS_DIR=$withval])AC_ARG_WITH([shishi],            AC_HELP_STRING([--with-shishi[[=PATH]]],		           [Compile with Shishi (Kerberos 5)]),            [KERBEROS_VERSION=Shishi             KERBEROS_DIR=$withval])AC_ARG_ENABLE([servers],              AC_HELP_STRING([--disable-servers],                             [don't compile servers]),	      , [enable_servers=yes])AC_ARG_ENABLE([clients],              AC_HELP_STRING([--disable-clients],                             [don't compile clients]),	      , [enable_clients=yes])AC_ARG_ENABLE([libls],              AC_HELP_STRING([--disable-libls],                             [disable support for libls ]),              , [enable_libls=yes])AC_ARG_ENABLE([encryption],              AC_HELP_STRING([--enable-encryption],                             [enable encryption]),              [test -z "$KERBEROS_VERSION" && AC_MSG_ERROR([--enable-encryption is given but no Kerberos version is required])],              [test -z "$KERBEROS_VERSION" && enable_encryption=no])AC_ARG_ENABLE([authentication],              AC_HELP_STRING([--enable-authentication],                             [enable connection authentication]),              [test -z "$KERBEROS_VERSION" && AC_MSG_ERROR([--enable-authentication is given but no Kerberos version is required])],	      [test -z "$KERBEROS_VERSION" && enable_authentication=no])if test -n "$KERBEROS_VERSION"; then  if test -z "$enable_authentication$enable_encryption"; then    enable_authentication=yes    enable_encryption=yes  fifiAC_ARG_WITH([wrap],            AC_HELP_STRING([--with-wrap],                           [add tcp wrapper support]))AC_ARG_WITH([pam],            AC_HELP_STRING([--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(ping6)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_AUTOMAKEAC_ISC_POSIX### Checks for programs.AC_PROG_CCgl_EARLYAC_CHECK_TOOL(AR, ar)AC_PATH_PROG(RM, rm, rm)AC_PROG_CPPAC_PROG_INSTALLAC_PROG_MAKE_SETAC_PROG_RANLIBAC_PROG_YACCgl_INIT### 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)# See if a termcap library is available (under one of several names)IU_LIB_TERMCAP# 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)dnl 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  dnl FIXME  dnl IU_CONFIG_LINKS(glob.h)  dnl IU_CONFIG_LINKS(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. Remove KRB4LIBAUTH=INCAUTH=if test "$enable_encryption" = yes -o "$enable_authentication" = yes; then  AH_TEMPLATE(KERBEROS, [Define to one if you have Kerberos])  AH_TEMPLATE(KRB4, [Define to one if you have Kerberos IV])  AH_TEMPLATE(KRB5, [Define to one if you have Kerberos V])  AH_TEMPLATE(SHISHI, [Define to 1 if you have Shishi])  AH_TEMPLATE(DES_ENCRYPTION, [FIXME])  case $KERBEROS_VERSION in  4)    AC_CHECK_LIB(krb, krb_mk_req,                 [LIBAUTH=-lkrb                  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    ;;  5)    IU_CHECK_KRB5($KERBEROS_VERSION,$KERBEROS_DIR)    LIBAUTH="$KRB5_LIBS" # FIXME    INCAUTH=$KRB5_CFLAGS    if test ".$LIBAUTH" != . ;then      AC_DEFINE(KERBEROS)      AC_DEFINE(KRB5)    fi    ;;  *)    if test x$KERBEROS_DIR != x; then      LIBAUTH=-L$KERBEROS_DIR/lib      INCAUTH=-I$KERBEROS_DIR/include    fi    LIBAUTH="$LIBAUTH -lshishi"    save_LIBS=$LIBS    LIBS="$LIBS $LIBAUTH"    save_CPPFLAGS=$CPPFLAGS    CPPFLAGS="$CPPFLAGS $INCAUTH"    AC_CHECK_HEADER(shishi.h,      AC_CHECK_LIB(shishi, shishi_check_version,        AC_DEFINE(SHISHI),        [INCAUTH= LIBAUTH=]))    LIBS=$save_LIBS    CPPFLAGS=$save_CPPFLAGS  esacfiAC_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 Checks for IPv6 support.AC_ARG_ENABLE([ipv6],  AS_HELP_STRING([--disable-ipv6], [disable IPv6 support]),  [case "${enable_ipv6}" in  no)    AC_MSG_NOTICE([Disabling IPv6 at user request])    ipv6=no    ;;  *)    ipv6=yes    ;;  esac],  [ipv6=auto])working_ipv6=yesif test ! "X$ipv6" = "Xno" -a "X$working_ipv6" = "Xyes"; then  IU_CHECK_MACRO(AF_INET6, [#include <sys/socket.h>], , , working_ipv6=no)fiif test ! "X$ipv6" = "Xno" -a "X$working_ipv6" = "Xyes"; then  IU_CHECK_MACRO(IPV6_V6ONLY, [#include <netinet/in.h>], , , working_ipv6=no)fiif test ! "X$ipv6" = "Xno" -a "X$working_ipv6" = "Xyes"; then  AC_CHECK_TYPE(struct sockaddr_storage, , working_ipv6=no, [#include <sys/socket.h>])fiif test ! "X$ipv6" = "Xno" -a "X$working_ipv6" = "Xyes"; then  AC_CHECK_TYPE(struct sockaddr_in6, , working_ipv6=no, [#include <netinet/in.h>])fiif test ! "X$ipv6" = "Xno" -a "X$working_ipv6" = "Xyes"; then  AC_CHECK_TYPE(struct addrinfo, , working_ipv6=no, [#include <netdb.h>])fiif test ! "X$ipv6" = "Xno" -a "X$working_ipv6" = "Xyes"; then  AC_CHECK_FUNC(getaddrinfo, ,working_ipv6=no, [#include <netdb.h>])fiif test ! "X$ipv6" = "Xno" -a "X$working_ipv6" = "Xyes"; then  AC_CHECK_FUNC(getnameinfo, ,working_ipv6=no, [#include <netdb.h>])fiif test ! "X$ipv6" = "Xno" -a "X$working_ipv6" = "Xyes"; then  AC_DEFINE(IPV6, 1, [Define to one if you want IPv6.])else   if test "X$ipv6" = "Xyes"; then    AC_MSG_FAILURE([IPv6 support not available])  else     if test "X$ipv6" = "Xauto"; then      AC_MSG_WARN([IPv6 support not available, disabling IPv6])    fi  fifiif test "X$ipv6" = "Xno" -o "X$working_ipv6" = "Xno";then  ping6_BUILD=''else  working_icmp6=yes  AC_CHECK_HEADER(netinet/icmp6.h, , working_icmp6=no)  if test "X$working_icmp6" = "Xyes"; then    AC_CHECK_HEADER(netinet/ip6.h, , working_icmp6=no)  fi  if test "X$working_icmp6" = "Xyes"; then    AC_CHECK_TYPE(struct icmp6_filter, , working_icmp6=no, [#include <netinet/icmp6.h>])  fi  if test "X$working_icmp6" = "Xyes"; then    AC_CHECK_TYPE(struct icmp6_hdr, , working_icmp6=no, [#include <netinet/icmp6.h>])  fi  if test "X$working_icmp6" = "Xyes"; then    IU_CHECK_MACRO(IPV6_RECVHOPLIMIT, [#include <netinet/in.h>], ,    		   [have_recvhoplimt=yes], [have_recvhoplimt=no])    if test "X$have_recvhoplimt" = "Xno"; then      IU_CHECK_MACRO(IPV6_HOPLIMIT, [#include <netinet/in.h>], , [        AC_DEFINE(IPV6_RECVHOPLIMIT, IPV6_HOPLIMIT,                  [Define to IPV6_HOPLIMIT if not available])      ], [working_icmp6=no])    fi  fi  if test "X$working_icmp6" = "Xyes"; then    IU_CHECK_MACRO(ICMP6_DST_UNREACH_BEYONDSCOPE, [#include <netinet/icmp6.h>], ,    		   [have_beyondscope=yes], [have_beyondscope=no])    if test "X$have_beyondscope" = "Xno"; then      IU_CHECK_MACRO(ICMP6_DST_UNREACH_NOTNEIGHBOR, [#include <netinet/icmp6.h>], , [        AC_DEFINE(ICMP6_DST_UNREACH_BEYONDSCOPE, ICMP6_DST_UNREACH_NOTNEIGHBOR,                  [Define to ICMP6_DST_UNREACH_NOTNEIGHBOR if not available])      ], [working_icmp6=no])    fi  fi  if test "X$working_icmp6" = "Xno"; then    AC_MSG_WARN([ICMPv6 support not available, disabling ping6])    ping6_BUILD=''  fifi

⌨️ 快捷键说明

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