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

📄 aclocal.m4

📁 COPE the first practical network coding scheme which is developped on click
💻 M4
📖 第 1 页 / 共 2 页
字号:
	AUTOCONF='$(conf_auxdir)/missing autoconf'	AC_MSG_RESULT(missing)    fi    AC_SUBST(AUTOCONF)])dnldnl CLICK_PROG_PERL5dnl Substitute PERL.dnlAC_DEFUN([CLICK_PROG_PERL5], [    dnl A IS-NOT A    ac_foo=`echo 'exit($A<5);' | tr A \135`    if test "${PERL-NO}" = NO; then	AC_CHECK_PROGS(perl5, perl5 perl, missing)	test "$perl5" != missing && $perl5 -e "$ac_foo" && perl5=missing	if test "$perl5" = missing; then	    AC_CHECK_PROGS(localperl5, perl5 perl, missing, /usr/local/bin)	    test "$localperl5" != missing && \		perl5="/usr/local/bin/$localperl5"	fi    else	perl5="$PERL"    fi        test "$perl5" != missing && $perl5 -e "$ac_foo" && perl5=missing    if test "$perl5" = "missing"; then	PERL='$(conf_auxdir)/missing perl'    else	PERL="$perl5"    fi    AC_SUBST(PERL)])dnldnl CLICK_PROG_GMAKEdnl Find GNU Make, if it is available.dnlAC_DEFUN([CLICK_PROG_GMAKE], [    if test "${GMAKE-NO}" = NO; then	AC_CACHE_CHECK(for GNU make, ac_cv_gnu_make,	[if /bin/sh -c 'make -f /dev/null -n --version | grep GNU' >/dev/null 2>&1; then	    ac_cv_gnu_make='make'	elif /bin/sh -c 'gmake -f /dev/null -n --version | grep GNU' >/dev/null 2>&1; then	    ac_cv_gnu_make='gmake'	else	    ac_cv_gnu_make='not found'	fi])	test "$ac_cv_gnu_make" != 'not found' && GMAKE="$ac_cv_gnu_make"    else	/bin/sh -c '$GMAKE -f /dev/null -n --version | grep GNU' >/dev/null 2>&1 || GMAKE=''    fi    SUBMAKE=''    test -n "$GMAKE" -a "$GMAKE" != make && SUBMAKE="MAKE = $GMAKE"    AC_SUBST(SUBMAKE)])dnldnl CLICK_CHECK_ALIGNMENTdnl Check whether machine is indifferent to alignment. Definesdnl HAVE_INDIFFERENT_ALIGNMENT.dnlAC_DEFUN([CLICK_CHECK_ALIGNMENT], [    AC_CACHE_CHECK([whether machine is indifferent to alignment], [ac_cv_alignment_indifferent],    [AC_RUN_IFELSE([AC_LANG_SOURCE([[#ifdef __cplusplusextern "C" void exit(int);#elsevoid exit(int status);#endifvoid get_value(char *buf, int offset, int *value) {    int i;    for (i = 0; i < 4; i++)	buf[i + offset] = i;    *value = *((int *)(buf + offset));}int main(int argc, char *argv[]) {    char buf[12];    int value, i, try_value;    get_value(buf, 0, &value);    for (i = 1; i < 4; i++) {	get_value(buf, i, &try_value);	if (value != try_value)	    exit(1);    }    exit(0);}]])], [ac_cv_alignment_indifferent=yes], [ac_cv_alignment_indifferent=no],	[ac_cv_alignment_indifferent=no])])    if test "x$ac_cv_alignment_indifferent" = xyes; then	AC_DEFINE([HAVE_INDIFFERENT_ALIGNMENT], [1], [Define if the machine is indifferent to alignment.])    fi])dnldnl CLICK_CHECK_INTEGER_TYPESdnl Finds definitions for 'int8_t' ... 'int32_t' and 'uint8_t' ... 'uint32_t'.dnl Also defines shell variable 'have_inttypes_h' to 'yes' iff the headerdnl file <inttypes.h> exists.  If 'uintXX_t' doesn't exist, try 'u_intXX_t'.dnlAC_DEFUN([CLICK_CHECK_INTEGER_TYPES], [    AC_CHECK_HEADERS(inttypes.h, have_inttypes_h=yes, have_inttypes_h=no)    if test $have_inttypes_h = no; then	AC_CACHE_CHECK(for uintXX_t typedefs, ac_cv_uint_t,	[AC_EGREP_HEADER(dnlchangequote(<<,>>)<<(^|[^a-zA-Z_0-9])uint32_t[^a-zA-Z_0-9]>>changequote([,]),	sys/types.h, ac_cv_uint_t=yes, ac_cv_uint_t=no)])    fi    if test $have_inttypes_h = no -a "$ac_cv_uint_t" = no; then	AC_CACHE_CHECK(for u_intXX_t typedefs, ac_cv_u_int_t,	[AC_EGREP_HEADER(dnlchangequote(<<,>>)<<(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]>>changequote([,]),	sys/types.h, ac_cv_u_int_t=yes, ac_cv_u_int_t=no)])    fi    if test $have_inttypes_h = yes -o "$ac_cv_uint_t" = yes; then :    elif test "$ac_cv_u_int_t" = yes; then	AC_DEFINE([HAVE_U_INT_TYPES], [1], [Define if you have u_intXX_t types but not uintXX_t types.])    else	AC_MSG_ERROR([=========================================Neither uint32_t nor u_int32_t defined by <inttypes.h> or <sys/types.h>!=========================================])    fi])dnldnl CLICK_CHECK_INT64_TYPESdnl Finds definitions for 'int64_t' and 'uint64_t'.dnl On input, shell variable 'have_inttypes_h' should be 'yes' if the headerdnl file <inttypes.h> exists.  If no 'uint64_t', looks for 'u_int64_t'.dnlAC_DEFUN([CLICK_CHECK_INT64_TYPES], [    if test "x$have_inttypes_h" = xyes; then	inttypes_hdr='inttypes.h'    else	inttypes_hdr='sys/types.h'    fi    AC_CACHE_CHECK(for int64_t typedef, ac_cv_int64_t,	[AC_EGREP_HEADER(dnlchangequote(<<,>>)<<(^|[^a-zA-Z_0-9])int64_t[^a-zA-Z_0-9]>>changequote([,]),	$inttypes_hdr, ac_cv_int64_t=yes, ac_cv_int64_t=no)])    AC_CACHE_CHECK(for uint64_t typedef, ac_cv_uint64_t,	[AC_EGREP_HEADER(dnlchangequote(<<,>>)<<(^|[^a-zA-Z_0-9])u_?int64_t[^a-zA-Z_0-9]>>changequote([,]),	$inttypes_hdr, ac_cv_uint64_t=yes, ac_cv_uint64_t=no)])    have_int64_types=    if test $ac_cv_int64_t = no -o $ac_cv_uint64_t = no; then	AC_MSG_ERROR([=========================================int64_t types not defined by $inttypes_hdr!Compile with '--disable-int64'.=========================================])    else	AC_DEFINE([HAVE_INT64_TYPES], [1], [Define if 64-bit integer types are enabled.])	have_int64_types=yes	AC_CACHE_CHECK(whether long and int64_t are the same type,	    ac_cv_long_64, [AC_LANG_CPLUSPLUS	    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <$inttypes_hdr>void f1(long) {}void f1(int64_t) { // will fail if long and int64_t are the same type}]], [[]])], ac_cv_long_64=no, ac_cv_long_64=yes)])	if test $ac_cv_long_64 = yes; then	    AC_DEFINE([HAVE_INT64_IS_LONG_USERLEVEL], [1], [Define if 'int64_t' is typedefed to 'long' at user level.])	fi    fi])dnldnl CLICK_CHECK_ENDIANdnl Checks endianness of machine.dnlAC_DEFUN([CLICK_CHECK_ENDIAN], [    AC_CHECK_HEADERS(endian.h machine/endian.h, dnl autoconf 2.53 versus autoconf 2.13		    if test "x$ac_header" != x; then		        endian_hdr=$ac_header		    else			endian_hdr=$ac_hdr		    fi		    break, endian_hdr=no)    if test "x$endian_hdr" != xno; then	AC_CACHE_CHECK(endianness, ac_cv_endian, [	    dnl can't use AC_PREPROC_IFELSE because it throws out the results	    ac_cv_endian=0	    cat > conftest.$ac_ext <<EOF[#]line __oline__ "configure"#include "confdefs.h"#include <$endian_hdr>#ifdef __BYTE_ORDER__BYTE_ORDER#elif defined(BYTE_ORDER)BYTE_ORDER#else0#endifEOF	    ac_try="$ac_cpp conftest.$ac_ext >conftest.result 2>conftest.out"	    AC_TRY_EVAL(ac_try)	    ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`	    if test -z "$ac_err"; then		ac_cv_endian=`grep '^[[1234]]' conftest.result`		test -z "$ac_cv_endian" && ac_cv_endian=0	    else		echo "$ac_err" >&5		echo "configure: failed program was:" >&5		cat conftest.$ac_ext >&5	    fi	    rm -f conftest*])    elif test "x$cross_compiling" != xyes ; then	AC_CACHE_CHECK(endianness, ac_cv_endian,	    [AC_RUN_IFELSE([AC_LANG_SOURCE([[#ifdef __cplusplusextern "C" void exit(int);#elsevoid exit(int status);#endif#include <stdio.h>int main(int argc, char *argv[]) {    union { int i; char c[4]; } u;    FILE *f = fopen("conftestdata", "w");    if (!f)	exit(1);    u.i = ('1') | ('2' << 8) | ('3' << 16) | ('4' << 24);    fprintf(f, "%4.4s\n", u.c);    exit(0);}]])], [ac_cv_endian=`cat conftestdata`], [ac_cv_endian=0], [ac_cv_endian=0])])    else	ac_cv_endian=0    fi    AC_DEFINE_UNQUOTED([CLICK_BYTE_ORDER], $ac_cv_endian, [Define to byte order of target machine.])    AC_CHECK_HEADERS(byteswap.h)])dnldnl CLICK_CHECK_INTEGER_BUILTINSdnl Checks whether '__builtin_clz' and '__builtin_clzll' exist.dnlAC_DEFUN([CLICK_CHECK_INTEGER_BUILTINS], [    AC_CACHE_CHECK([for __builtin_clz], [ac_cv_have___builtin_clz],	 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[volatile int x = 11;]], [[int y = __builtin_clz(x);]])], [ac_cv_have___builtin_clz=yes], [ac_cv_have___builtin_clz=no])])    if test $ac_cv_have___builtin_clz = yes; then	AC_DEFINE([HAVE___BUILTIN_CLZ], [1], [Define if you have the __builtin_clz function.])    fi    AC_CACHE_CHECK([for __builtin_clzl], [ac_cv_have___builtin_clzl],	 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[volatile long x = 11;]], [[int y = __builtin_clzl(x);]])], [ac_cv_have___builtin_clzl=yes], [ac_cv_have___builtin_clzl=no])])    if test $ac_cv_have___builtin_clzl = yes; then	AC_DEFINE([HAVE___BUILTIN_CLZL], [1], [Define if you have the __builtin_clzl function.])    fi    AC_CACHE_CHECK([for __builtin_clzll], [ac_cv_have___builtin_clzll],	 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[volatile long long x = 11;]], [[int y = __builtin_clzll(x);]])], [ac_cv_have___builtin_clzll=yes], [ac_cv_have___builtin_clzll=no])])    if test $ac_cv_have___builtin_clzll = yes; then	AC_DEFINE([HAVE___BUILTIN_CLZLL], [1], [Define if you have the __builtin_clzll function.])    fi    AC_CACHE_CHECK([for __builtin_ffs], [ac_cv_have___builtin_ffs],	 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[volatile int x = 11;]], [[int y = __builtin_ffs(x);]])], [ac_cv_have___builtin_ffs=yes], [ac_cv_have___builtin_ffs=no])])    if test $ac_cv_have___builtin_ffs = yes; then	AC_DEFINE([HAVE___BUILTIN_FFS], [1], [Define if you have the __builtin_ffs function.])    fi    AC_CACHE_CHECK([for __builtin_ffsl], [ac_cv_have___builtin_ffsl],	 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[volatile long x = 11;]], [[int y = __builtin_ffsl(x);]])], [ac_cv_have___builtin_ffsl=yes], [ac_cv_have___builtin_ffsl=no])])    if test $ac_cv_have___builtin_ffsl = yes; then	AC_DEFINE([HAVE___BUILTIN_FFSL], [1], [Define if you have the __builtin_ffsl function.])    fi    AC_CACHE_CHECK([for __builtin_ffsll], [ac_cv_have___builtin_ffsll],	 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[volatile long long x = 11;]], [[int y = __builtin_ffsll(x);]])], [ac_cv_have___builtin_ffsll=yes], [ac_cv_have___builtin_ffsll=no])])    if test $ac_cv_have___builtin_ffsll = yes; then	AC_DEFINE([HAVE___BUILTIN_FFSLL], [1], [Define if you have the __builtin_ffsll function.])    fi    AC_CHECK_HEADERS(strings.h)    AC_CHECK_FUNCS(ffs ffsl ffsll)    ])dnldnl CLICK_CHECK_ADDRESSABLE_VA_LISTdnl Checks whether the va_list type is addressable.dnlAC_DEFUN([CLICK_CHECK_ADDRESSABLE_VA_LIST], [    AC_LANG_CPLUSPLUS    AC_CACHE_CHECK([for addressable va_list type], [ac_cv_va_list_addr],	[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>void f(va_list *) {}void g(va_list val) {    f(&val);}void h(int a, ...) {    va_list val;    va_start(val, a);    g(val);    va_end(val);}]], [[h(2, 3, 4);]])], ac_cv_va_list_addr=yes, ac_cv_va_list_addr=no)])    if test "x$ac_cv_va_list_addr" = xyes; then	AC_DEFINE([HAVE_ADDRESSABLE_VA_LIST], [1], [Define if the va_list type is addressable.])    fi])dnldnl CLICK_CHECK_LARGE_FILE_SUPPORTdnl Check whether C library supports large files. Definesdnl HAVE_LARGE_FILE_SUPPORT.dnlAC_DEFUN([CLICK_CHECK_LARGE_FILE_SUPPORT], [    AC_LANG_C    AC_CACHE_CHECK([for large file support in C library], 	ac_cv_large_file_support,	[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _LARGEFILE_SOURCE 1#define _FILE_OFFSET_BITS 64#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>void h(off_t a) {    int fd = open("/tmp/whatever", 0);    lseek(fd, a, 0);}]], [[h(15);]])], ac_cv_large_file_support=yes, ac_cv_large_file_support=no)])    if test "x$ac_cv_large_file_support" = xyes; then	AC_DEFINE([HAVE_LARGE_FILE_SUPPORT], [1], [Define if your C library contains large file support.])    fi    AC_CHECK_SIZEOF(off_t, [], [#ifdef HAVE_LARGE_FILE_SUPPORT# define _LARGEFILE_SOURCE 1# define _FILE_OFFSET_BITS 64#endif#include <stdio.h>#include <sys/types.h>])])dnldnl CLICK_CHECK_POLL_Hdnl Check whether <poll.h> is available and not emulated.  Definesdnl HAVE_POLL_H.dnlAC_DEFUN([CLICK_CHECK_POLL_H], [    AC_CHECK_HEADER(poll.h, ac_cv_poll_h=yes, ac_cv_poll_h=no)    if test "$ac_cv_poll_h" = yes; then	AC_CACHE_CHECK([whether <poll.h> is emulated], [ac_cv_emulated_poll_h],	    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <poll.h>#ifdef _POLL_EMUL_H_# error "error"#endif]], [[]])], ac_cv_emulated_poll_h=no, ac_cv_emulated_poll_h=yes)])	if test "x$ac_cv_emulated_poll_h" = xno; then	    AC_DEFINE([HAVE_POLL_H], [1], [Define if you have a non-emulated <poll.h> header file.])	fi    fi])

⌨️ 快捷键说明

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