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

📄 aclocal.m4

📁 inetutils的源代码
💻 M4
📖 第 1 页 / 共 4 页
字号:
      fi    fi    if test "$iu_val"; then      AC_MSG_RESULT(${iu_cached}${iu_defaulted}$iu_val)      test "$iu_cross_conflict" -a "$iu_defaulted" \	&& AC_MSG_WARN(may be incorrect because of cross-compilation)      # Put the value in the autoconf cache.  We replace $( with @( to avoid      # variable evaluation problems when autoconf reads the cache later.      echo inetutils_cv_$iu_pathvar=\'"`echo "$iu_val" | sed 's/\$(/@(/g'`"\'    elif test "$iu_hdr"; then      AC_MSG_RESULT(${iu_cached}from $iu_sym in $iu_hdr)      echo inetutils_cv_hdr_$iu_pathvar=\'"$iu_hdr"\'      echo inetutils_cv_hdr_sym_$iu_pathvar=\'"$iu_sym"\'    fi  done <[$1] >$iu_cache_file  # Read the cache values constructed by the previous loop,   . $iu_cache_file  # Construct the pathdefs file -- a file of make variable definitions, of  # the form PATHDEF_FOO, that contain cc -D switches to define the cpp macro  # PATH_FOO.  grep -v '^inetutils_cv_hdr_' < $iu_cache_file | \  while read iu_cache_set; do    iu_var="`echo $iu_cache_set | sed 's/=.*$//'`"    eval iu_val=\"'$'"$iu_var"\"    # invert escaped $(...) notation used in autoconf cache    eval iu_val=\"\`echo \'"$iu_val"\' \| sed \''s/@(/$\(/g'\'\`\"    if test "$iu_val" != no; then      iu_path="`echo $iu_var | sed -e 's/^inetutils_cv_//' -e y/${iu_lcase}/${IU_UCASE}/`"      iu_pathdef="`echo $iu_path | sed 's/^PATH_/PATHDEF_/'`"      echo $iu_pathdef = -D$iu_path='\"'"$iu_val"'\"'      AC_DEFINE_UNQUOTED($iu_path, "$iu_val")    fi  done >$[$2]  AC_SUBST_FILE([$2])  # Generate a file of #ifdefs that defaults PATH_FOO macros to _PATH_FOO (or  # some other symbol) (excluding any who's value is set to `no').  grep '^inetutils_cv_hdr_sym_' < $iu_cache_file | \  while read iu_cache_set; do    iu_sym_var="`echo "$iu_cache_set" | sed 's/=.*$//'`"    eval iu_sym=\"'$'"$iu_sym_var"\"    iu_path="`echo $iu_sym_var | sed -e 's/^inetutils_cv_hdr_sym_//' -e y/${iu_lcase}/${IU_UCASE}/`"    cat <<EOF#ifndef $iu_path#define $iu_path $iu_sym#endifEOF  done >$[$3]  AC_SUBST_FILE([$3])])AC_DEFUN([IU_ENABLE_FOO], [AC_ARG_ENABLE($1, [  --disable-$1               don't compile $1], ,                [enable_]$1[=$enable_]$2)[if test "$enable_$1" = yes; then    $1_BUILD=$1else   $1_BUILD=''fi;]  AC_SUBST([$1_BUILD])])AC_DEFUN([IU_ENABLE_CLIENT], [IU_ENABLE_FOO($1, clients)])AC_DEFUN([IU_ENABLE_SERVER], [IU_ENABLE_FOO($1, servers)])#serial 12dnl Initially derived from code in GNU grep.dnl Mostly written by Jim Meyering.dnl Usage: jm_INCLUDED_REGEX([lib/regex.c])dnlAC_DEFUN([jm_INCLUDED_REGEX],  [    dnl Even packages that don't use regex.c can use this macro.    dnl Of course, for them it doesn't do anything.    # Assume we'll default to using the included regex.c.    ac_use_included_regex=yes    # However, if the system regex support is good enough that it passes the    # the following run test, then default to *not* using the included regex.c.    # If cross compiling, assume the test would fail and use the included    # regex.c.  The first failing regular expression is from `Spencer ere    # test #75' in grep-2.3.    AC_CACHE_CHECK([for working re_compile_pattern],		   jm_cv_func_working_re_compile_pattern,      AC_TRY_RUN([#include <stdio.h>#include <regex.h>	  int	  main ()	  {	    static struct re_pattern_buffer regex;	    const char *s;	    struct re_registers regs;	    re_set_syntax (RE_SYNTAX_POSIX_EGREP);	    [s = re_compile_pattern ("a[[:@:>@:]]b\n", 9, &regex);]	    /* This should fail with _Invalid character class name_ error.  */	    if (!s)	      exit (1);	    /* This should succeed, but doesn't for e.g. glibc-2.1.3.  */	    s = re_compile_pattern ("{1", 2, &regex);	    if (s)	      exit (1);	    /* The following example is derived from a problem report               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */	    s = re_compile_pattern ("[[an鵠]*n", 7, &regex);	    if (s)	      exit (1);	    /* This should match, but doesn't for e.g. glibc-2.2.1.  */	    if (re_match (&regex, "an", 2, 0, &regs) != 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      ],    )  ])dnl IU_CHECK_KRB5(VERSION,PREFIX)dnl Search for a Kerberos implementation in the standard locations plus PREFIX,dnl if it is set and not "yes".dnl VERSION should be either 4 or 5dnl Defines KRB_CFLAGS and KRB_LIBS if found.dnl Defines KRB_IMPL to "Heimdal", "MIT", or "OldMIT", or "none" if not foundAC_DEFUN(IU_CHECK_KRB5,[ if test "x$iu_cv_lib_krb5_libs" = x; then  cache=""  KRB5_PREFIX=[$2]  KRB5_IMPL="none"  # First try krb5-config  if test "$KRB5_PREFIX" != "yes"; then    krb5_path="$KRB5_PREFIX/bin"  else    krb5_path="$PATH"  fi  AC_PATH_PROG(KRB5CFGPATH, krb5-config, none, $krb5_path)  if test "$KRB5CFGPATH" != "none"; then    KRB5_CFLAGS="$CPPFLAGS `$KRB5CFGPATH --cflags krb$1`"    KRB5_LIBS="$LDFLAGS `$KRB5CFGPATH --libs krb$1`"    KRB5_IMPL="Heimdal"  else    ## OK, try the old code    saved_CPPFLAGS="$CPPFLAGS"    saved_LDFLAGS="$LDFLAGS"    saved_LIBS="$LIBS"    if test "$KRB5_PREFIX" != "yes"; then      KRB5_CFLAGS="-I$KRB5_PREFIX/include"      KRB5_LDFLAGS="-L$KRB5_PREFIX/lib"      CPPFLAGS="$CPPFLAGS $KRB5_CFLAGS"      LDFLAGS="$LDFLAGS $KRB5_LDFLAGS"    fi    ## Check for new MIT kerberos V support    AC_CHECK_LIB(krb5, krb5_init_context,      [KRB5_IMPL="MIT",       KRB5_LIBS="$KRB5_LDFLAGS -lkrb5 -lk5crypto -lcom_err"]       ,, -lk5crypto -lcom_err)    ## Heimdal kerberos V support    if test "$KRB5_IMPL" = "none"; then      AC_CHECK_LIB(krb5, krb5_init_context,        [KRB5_IMPL="Heimdal"         KRB5_LIBS="$KRB5_LDFLAGS -lkrb5 -ldes -lasn1 -lroken -lcrypt -lcom_err"]         ,, -ldes -lasn1 -lroken -lcrypt -lcom_err)    fi    ## Old MIT Kerberos V    ## Note: older krb5 distributions use -lcrypto instead of    ## -lk5crypto. This may conflict with OpenSSL.    if test "$KRB5_IMPL" = "none"; then      AC_CHECK_LIB(krb5, krb5_init_context,        [KRB5_IMPL="OldMIT",         KRB5_LIBS="$KRB5_LDFLAGS -lkrb5 -lkrb5 -lcrypto -lcom_err"]        ,, -lcrypto -lcom_err)    fi  fi  iu_cv_lib_krb5_cflags="$KRB5_CFLAGS"  iu_cv_lib_krb5_libs="$KRB5_LIBS"  iu_cv_lib_krb5_impl="$KRB5_IMPL"  LDFLAGS="$saved_LDFLAGS"  LIBS="$saved_LIBS" else  cached=" (cached) "  KRB5_CFLAGS="$iu_cv_lib_krb5_cflags"  KRB5_LIBS="$iu_cv_lib_krb5_libs"  KRB5_IMPL="$iu_cv_lib_krb5_impl" fi AC_MSG_CHECKING(krb5 implementation) AC_MSG_RESULT(${cached}$KRB5_IMPL)])dnl IU_CHECK_MEMBER(AGGREGATE.MEMBER,dnl                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],dnl                [INCLUDES])dnl AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos'.dnl The member itself can be of an aggregate typednl Shell variables are not a valid argument.AC_DEFUN([IU_CHECK_MEMBER],[AS_LITERAL_IF([$1], [],               [AC_FATAL([$0: requires literal arguments])])dnlm4_bmatch([$1], [\.], ,         [m4_fatal([$0: Did not see any dot in `$1'])])dnlAS_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])dnldnl Extract the aggregate name, and the member nameAC_CACHE_CHECK([for $1], ac_Member,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],[dnl AGGREGATE ac_aggr;static m4_bpatsubst([$1], [\..*]) ac_aggr;dnl ac_aggr.MEMBER;if (sizeof(ac_aggr.m4_bpatsubst([$1], [^[^.]*\.])))return 0;])],                [AS_VAR_SET(ac_Member, yes)],                [AS_VAR_SET(ac_Member, no)])])AS_IF([test AS_VAR_GET(ac_Member) = yes], [$2], [$3])dnlAS_VAR_POPDEF([ac_Member])dnl])dnl IU_CHECK_MEMBERdnl IU_CHECK_MEMBERS([AGGREGATE.MEMBER, ...],dnl                  [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]dnl                  [INCLUDES])AC_DEFUN([IU_CHECK_MEMBERS],[m4_foreach([AC_Member], [$1],  [IU_CHECK_MEMBER(AC_Member,         [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_Member), 1,                            [Define to 1 if `]m4_bpatsubst(AC_Member,                                                     [^[^.]*\.])[' is                             member of `]m4_bpatsubst(AC_Member, [\..*])['.])$2],                 [$3],                 [$4])])])# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.# 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., 59 Temple Place - Suite 330, Boston, MA# 02111-1307, USA.AC_PREREQ([2.52])# serial 6# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])# Do all the work for Automake.                            -*- Autoconf -*-# This macro actually does too much some checks are only needed if# your package does certain things.  But this isn't really a big deal.# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002# Free Software Foundation, Inc.# 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., 59 Temple Place - Suite 330, Boston, MA# 02111-1307, USA.# serial 8# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be# written in clear, in which case automake, when reading aclocal.m4,# will think it sees a *use*, and therefore will trigger all it's# C support machinery.  Also note that it means that autoscan, seeing# CC etc. in the Makefile, will ask for an AC_PROG_CC use...AC_PREREQ([2.54])# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow# the ones we care about.m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])# AM_INIT_AUTOMAKE([OPTIONS])# -----------------------------------------------# The call with PACKAGE and VERSION arguments is the old style# call (pre autoconf-2.50), which is being phased out.  PACKAGE# and VERSION should now be passed to AC_INIT and removed from# the call to AM_INIT_AUTOMAKE.# We support both call styles for the transition.  After# the next Automake release, Autoconf can make the AC_INIT# arguments mandatory, and then we can depend on a new Autoconf# release and drop the old call support.AC_DEFUN([AM_INIT_AUTOMAKE],[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl# test to see if srcdir already configuredif test "`cd $srcdir && pwd`" != "`pwd`" &&   test -f $srcdir/config.status; then  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])fi# test whether we have cygpathif test -z "$CYGPATH_W"; then  if (cygpath --version) >/dev/null 2>/dev/null; then    CYGPATH_W='cygpath -w'  else    CYGPATH_W=echo  fifiAC_SUBST([CYGPATH_W])# Define the identity of the package.dnl Distinguish between old-style and new-style calls.m4_ifval([$2],[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])],[_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl_AM_IF_OPTION([no-define],,[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl# Some tools Automake needs.AC_REQUIRE([AM_SANITY_CHECK])dnlAC_REQUIRE([AC_ARG_PROGRAM])dnlAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})AM_MISSING_PROG(AUTOCONF, autoconf)AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})AM_MISSING_PROG(AUTOHEADER, autoheader)AM_MISSING_PROG(MAKEINFO, makeinfo)AM_MISSING_PROG(AMTAR, tar)AM_PROG_INSTALL_SHAM_PROG_INSTALL_STRIP# We need awk for the "check" target.  The system "awk" is bad on# some platforms.AC_REQUIRE([AC_PROG_AWK])dnlAC_REQUIRE([AC_PROG_MAKE_SET])dnl_AM_IF_OPTION([no-dependencies],,[AC_PROVIDE_IFELSE([AC_PROG_CC],                  [_AM_DEPENDENCIES(CC)],                  [define([AC_PROG_CC],                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnlAC_PROVIDE_IFELSE([AC_PROG_CXX],                  [_AM_DEPENDENCIES(CXX)],                  [define([AC_PROG_CXX],                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl])])# When config.status generates a header, we must update the stamp-h file.# This file resides in the same directory as the config header# that is generated.  The stamp files are numbered to have different names.# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the# loop where config.status creates the headers, so we can generate# our stamp files there.AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],[_am_stamp_count=`expr ${_am_stamp_count-0} + 1`echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])

⌨️ 快捷键说明

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