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

📄 aclocal.m4

📁 LFS.This is a kind of file system.
💻 M4
📖 第 1 页 / 共 4 页
字号:
fi])dnldnl Check for SVR4-like nfs_fh3 structurednlAC_DEFUN(SFS_CHECK_FH3_SVR4,[if test "$sfs_cv_nfsmnt_fhsize" != yes; then  AC_CACHE_CHECK(for SVR4-like struct nfs_fh3, sfs_cv_fh3_svr4,  AC_TRY_COMPILE([#include "${srcdir}/nfsconf.h"],                 [ struct nfs_fh3 fh;                   switch (0) case 0: case sizeof (fh.fh3_u.data) == 64:; ],                 sfs_cv_fh3_svr4=yes, sfs_cv_fh3_svr4=no))  if test $sfs_cv_fh3_svr4 = yes; then    AC_DEFINE(HAVE_SVR4_FH3)  fifi])dnldnl Check for 2 argument unmountdnlAC_DEFUN(SFS_CHECK_UNMOUNT_FLAGS,[AC_CACHE_CHECK(for a 2 argument unmount, sfs_cv_umount_flags,AC_TRY_COMPILE([#include <sys/param.h>#include <sys/mount.h>],[#ifdef HAVE_UNMOUNTunmount#else /* !HAVE_UNMOUNT */umount#endif /* !HAVE_UNMOUNT */	(0);], sfs_cv_umount_flags=no, sfs_cv_umount_flags=yes))if test $sfs_cv_umount_flags = yes; then	AC_DEFINE(UNMOUNT_FLAGS, 1,		  Define if the unmount system call has 2 arguments.)else	AC_CHECK_FUNCS(umount2)fi])dnldnl Check if we can find the nfs_args structurednlAC_DEFUN(SFS_CHECK_NFSMNT,[AC_CHECK_FUNCS(vfsmount unmount)need_nfs_nfs_h=noAC_EGREP_HEADER(nfs_args, sys/mount.h,,	AC_EGREP_HEADER(nfs_args, nfs/mount.h, AC_DEFINE(NEED_NFS_MOUNT_H))	AC_EGREP_HEADER(nfs_args, nfs/nfs.h, AC_DEFINE(NEED_NFS_NFS_H)			need_nfs_nfs_h=yes))AC_CACHE_CHECK(for nfs_args mount structure, sfs_cv_nfsmnt_ok,	SFS_TRY_NFSARG_FIELD(, sfs_cv_nfsmnt_ok=yes, sfs_cv_nfsmnt_ok=no))if test $sfs_cv_nfsmnt_ok = no; then	AC_MSG_ERROR([Could not find NFS mount argument structure!])fiif test "$need_nfs_nfs_h" = no; then	AC_EGREP_HEADER(nfs_fh3, nfs/nfs.h, AC_DEFINE(NEED_NFS_NFS_H)			need_nfs_nfs_h=yes)fiAC_CHECK_HEADERS(linux/nfs2.h)SFS_CHECK_NFSMNT_FIELD(addrlen)SFS_CHECK_NFSMNT_FIELD(sotype)SFS_CHECK_NFSMNT_FIELD(proto)SFS_CHECK_NFSMNT_FIELD(fhsize)SFS_CHECK_NFSMNT_FIELD(fd)dnl Check whether we have Linux 2.2 NFS V3 mount structureSFS_CHECK_NFSMNT_FIELD(old_root)dnl Check whether file handle is named "root" or "fh"SFS_CHECK_NFSMNT_FIELD(root)SFS_CHECK_NFSMNT_FIELD(fh)dnl ksh apparently cannot handle this as a compound test.if test "$sfs_cv_nfsmnt_root" = "no"; then  if test "$sfs_cv_nfsmnt_fh" = "no"; then    AC_MSG_ERROR([Could not find the nfs_args file handle field!])  fifiAC_CHECK_HEADERS(sys/mntent.h)SFS_CHECK_FH3_SVR4if test "$sfs_cv_nfsmnt_fh" = yes; then  if test "$sfs_cv_fh3_svr4" = yes -o "$sfs_cv_nfsmnt_fhsize" = yes; then    AC_DEFINE(HAVE_NFS_V3)  fielif test "$sfs_cv_nfsmnt_old_root" = yes; then  AC_DEFINE(HAVE_NFS_V3)fiSFS_CHECK_NFSARG_HOSTNAME_ARRAYSFS_CHECK_NFSARG_ADDR_PTRSFS_CHECK_UNMOUNT_FLAGS])dnldnl Use -ldb only if we need it.dnlAC_DEFUN(SFS_FIND_DB,[AC_CHECK_FUNC(dbopen)if test $ac_cv_func_dbopen = no; then	AC_CHECK_LIB(db, dbopen)	if test $ac_cv_lib_db_dbopen = no; then	  AC_MSG_ERROR([Could not find library for dbopen!])	fifi])dnldnl Check something about the stat structurednlAC_DEFUN(SFS_TRY_STAT_FIELD,[AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat s;$1;], $2, $3)])dnldnl Check for a particular field in statdnlAC_DEFUN(SFS_CHECK_STAT_FIELD,[AC_CACHE_CHECK(for $1 in stat structure, sfs_cv_stat_$1,SFS_TRY_STAT_FIELD(s.$1, sfs_cv_stat_$1=yes, sfs_cv_stat_$1=no))if test $sfs_cv_stat_$1 = yes; then  AC_DEFINE(SFS_HAVE_STAT_[]translit($1, [a-z], [A-Z]), 1,	    Define if the stat structure has a $1 field.)fi])dnldnl  Check whether we can get away with large socket buffers.dnlAC_DEFUN(SFS_CHECK_SOCK_BUF,[AC_CACHE_CHECK(whether socket buffers > 64k are allowed,  		sfs_cv_large_sock_buf, AC_TRY_RUN([#include <sys/types.h>#include <sys/socket.h>intmain() {  int bigbuf = 0x11000;  int s = socket(AF_INET, SOCK_STREAM, 0);  if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&bigbuf, sizeof(bigbuf))<0)    exit(1);  exit(0);}], sfs_cv_large_sock_buf=yes,    sfs_cv_large_sock_buf=no,    sfs_cv_large_sock_buf=no))if test $sfs_cv_large_sock_buf = yes; then	AC_DEFINE(SFS_ALLOW_LARGE_BUFFER, 1,		  Define if SO_SNDBUF/SO_RCVBUF can exceed 64K.)fi])dnldnl Find pthreadsdnlAC_DEFUN(SFS_FIND_PTHREADS,[AC_ARG_WITH(pthreads,--with-pthreads=DIR       Specify location of pthreads)ac_save_CFLAGS=$CFLAGSac_save_LIBS=$LIBSdirs="$with_pthreads ${prefix} ${prefix}/pthreads"dirs="$dirs /usr/local /usr/local/pthreads"AC_CACHE_CHECK(for pthread.h, sfs_cv_pthread_h,[for dir in " " $dirs; do    iflags="-I${dir}/include"    CFLAGS="${ac_save_CFLAGS} $iflags"    AC_TRY_COMPILE([#include <pthread.h>], 0,	sfs_cv_pthread_h="${iflags}"; break)done])if test -z "${sfs_cv_pthread_h+set}"; then    AC_MSG_ERROR("Can\'t find pthread.h anywhere")fiAC_CACHE_CHECK(for libpthread, sfs_cv_libpthread,[for dir in "" " " $dirs; do    case $dir in	"") lflags=" " ;;	" ") lflags="-lpthread" ;;	*) lflags="-L${dir}/lib -lpthread" ;;    esac    LIBS="$ac_save_LIBS $lflags"    AC_TRY_LINK([#include <pthread.h>],	pthread_create (0, 0, 0, 0);,	sfs_cv_libpthread=$lflags; break)done])if test -z ${sfs_cv_libpthread+set}; then    AC_MSG_ERROR("Can\'t find libpthread anywhere")fiCFLAGS=$ac_save_CFLAGSCPPFLAGS="$CPPFLAGS $sfs_cv_pthread_h"LIBS="$ac_save_LIBS $sfs_cv_libpthread"])dnldnl Find GMPdnlAC_DEFUN(SFS_GMP,[AC_ARG_WITH(gmp,--with-gmp[[=/usr/local]]   specify path for gmp)AC_SUBST(GMP_DIR)AC_SUBST(LIBGMP)AC_MSG_CHECKING([for GMP library])test "$with_gmp" = "no" && unset with_gmpif test -z "$with_gmp"; then    if test -z "$GMP_DIR"; then	for dir in `cd $srcdir && echo gmp*`; do	    if test -d "$srcdir/$dir"; then		GMP_DIR=$dir		break	    fi	done    fi    if test "${with_gmp+set}" != set \		-a "$GMP_DIR" -a -d "$srcdir/$GMP_DIR"; then	GMP_DIR=`echo $GMP_DIR | sed -e 's!/$!!'`	CPPFLAGS="$CPPFLAGS "'-I$(top_srcdir)/'"$GMP_DIR"	#LDFLAGS="$LDFLAGS "'-L$(top_builddir)/'"$GMP_DIR"    else	GMP_DIR=	for dir in "$prefix" /usr/local /usr; do	    if test \( -f $dir/lib/libgmp.a -o -f $dir/lib/libgmp.la \) \		-a \( -f $dir/include/gmp.h -o -f $dir/include/gmp3/gmp.h \			-o -f $dir/include/gmp2/gmp.h \); then		    with_gmp=$dir		    break	    fi	done	if test -z "$with_gmp"; then	    AC_MSG_ERROR([Could not find GMP library])	fi	test "$with_gmp" = /usr -a -f /usr/include/gmp.h && unset with_gmp    fifiif test "$with_gmp"; then    unset GMP_DIR    if test -f ${with_gmp}/include/gmp.h; then	CPPFLAGS="$CPPFLAGS -I${with_gmp}/include"    elif test -f ${with_gmp}/include/gmp3/gmp.h; then	CPPFLAGS="$CPPFLAGS -I${with_gmp}/include/gmp3"    elif test -f ${with_gmp}/include/gmp2/gmp.h; then	CPPFLAGS="$CPPFLAGS -I${with_gmp}/include/gmp2"    else	AC_MSG_ERROR([Could not find gmp.h header])    fi    #LDFLAGS="$LDFLAGS -L${with_gmp}/lib"    #LIBGMP=-lgmp    if test -f "${with_gmp}/lib/libgmp.la"; then	LIBGMP="${with_gmp}/lib/libgmp.la"    else	LIBGMP="${with_gmp}/lib/libgmp.a"    fi    AC_MSG_RESULT([$LIBGMP])elif test "$GMP_DIR"; then    export GMP_DIR    AC_MSG_RESULT([using distribution in $GMP_DIR subdirectory])    LIBGMP='$(top_builddir)/'"$GMP_DIR/libgmp.la"else    AC_MSG_RESULT(yes)    if test -f /usr/lib/libgmp.la; then	LIBGMP=/usr/lib/libgmp.la    elif test -f /usr/lib/libgmp.a; then	# FreeBSD (among others) has a broken gmp shared library	LIBGMP=/usr/lib/libgmp.a    else	LIBGMP=-lgmp    fifiAC_CONFIG_SUBDIRS($GMP_DIR)ac_save_CFLAGS="$CFLAGS"test "$GMP_DIR" && CFLAGS="$CFLAGS -I${srcdir}/${GMP_DIR}"AC_CACHE_CHECK(for mpz_xor, sfs_cv_have_mpz_xor,unset sfs_cv_have_mpz_xorif test "$GMP_DIR"; then	sfs_cv_have_mpz_xor=yeselse	AC_EGREP_HEADER(mpz_xor, [gmp.h], sfs_cv_have_mpz_xor=yes)fi)test "$sfs_cv_have_mpz_xor" && AC_DEFINE([HAVE_MPZ_XOR], 1,	[Define if you have mpz_xor in your GMP library.])AC_CACHE_CHECK(size of GMP mp_limb_t, sfs_cv_mp_limb_t_size,sfs_cv_mp_limb_t_size=nofor size in 2 4 8; do    AC_TRY_COMPILE([#include <gmp.h>],    [switch (0) case 0: case (sizeof (mp_limb_t) == $size):;],    sfs_cv_mp_limb_t_size=$size; break)done)CFLAGS="$ac_save_CFLAGS"test "$sfs_cv_mp_limb_t_size" = no \    && AC_MSG_ERROR(Could not determine size of mp_limb_t.)AC_DEFINE_UNQUOTED(GMP_LIMB_SIZE, $sfs_cv_mp_limb_t_size,		   Define to be the size of GMP's mp_limb_t type.)])dnl dnldnl dnl Find BekeleyDB 2dnl dnldnl AC_DEFUN(SFS_DB2,dnl [AC_SUBST(DB2_DIR)dnl AC_ARG_WITH(db2,dnl --with-db2[[=/usr/local]]   Find BerkeleyDB library version 2)dnl AC_MSG_CHECKING([for DB2 library])dnl test "$with_db2" = "no" && unset with_db2dnl if test -z "$with_db2"; thendnl     DB2_DIR=`cd $srcdir && echo db-2.*/`dnl     if test "${with_db2+set}" != set -a -d "$srcdir/$DB2_DIR"; thendnl 	DB2_DIR=`echo $DB2_DIR | sed -e 's!/$!!'`dnl 	CPPFLAGS="$CPPFLAGS "'-I$(top_builddir)/'"$DB2_DIR"'/dist'dnl 	LDFLAGS="$LDFLAGS "'-L$(top_builddir)/'"$DB2_DIR"'/dist'dnl     elsednl 	DB2_DIR=dnl 	for dir in "$prefix/BerkeleyDB" /usr/local/BerkeleyDB \dnl 		/usr "$prefix" /usr/local; dodnl 	    if test -f $dir/lib/libdb.a -a -f $dir/include/db.h; thendnl 		with_db2=$dirdnl 		breakdnl 	    fidnl 	donednl 	if test -z "$with_db2"; thendnl 	    AC_MSG_ERROR([Could not find BerkeleyDB library version 2])dnl 	fidnl 	test "$with_db2" = /usr && unset with_db2dnl     fidnl fidnl if test "$with_db2"; thendnl     unset DB2_DIRdnl     AC_MSG_RESULT([$with_db2])dnl     CPPFLAGS="$CPPFLAGS -I${with_db2}/include"dnl     LDFLAGS="$LDFLAGS -L${with_db2}/lib"dnl elif test "$DB2_DIR"; thendnl     AC_MSG_RESULT([using distribution in $DB2_DIR subdirectory])dnl     test -d $DB2_DIR || mkdir $DB2_DIRdnl dnl ac_configure_args="${ac_configure_args}${ac_configure_args+ }--enable-cxx"dnl     AC_CONFIG_SUBDIRS($DB2_DIR/dist)dnl elsednl     AC_MSG_RESULT(yes)dnl fi])dnldnl Find BekeleyDB 3dnlAC_DEFUN(SFS_DB3,[AC_SUBST(DB3_DIR)AC_CONFIG_SUBDIRS($DB3_DIR)AC_SUBST(DB3_LIB)unset DB3_LIBAC_ARG_WITH(db3,--with-db3[[=/usr/local]]   Use Btree from BerkeleyDB-3 library)DB3_DIR=`cd $srcdir && echo db-3.*/dist/`if test -d "$srcdir/$DB3_DIR"; then    DB3_DIR=`echo $DB3_DIR | sed -e 's!/$!!'`else    unset DB3_DIRfiif test ! "${with_db3+set}"; then    if test "$DB3_DIR"; then	with_db3=yes    else	with_db3=no    fifiif test "$with_db3" != no; then    AC_MSG_CHECKING([for DB3 library])    if test "$DB3_DIR" -a "$with_db3" = yes; then	CPPFLAGS="$CPPFLAGS "'-I$(top_builddir)/'"$DB3_DIR"	DB3_LIB='-L$(top_builddir)/'"$DB3_DIR -ldb"	AC_MSG_RESULT([using distribution in $DB3_DIR subdirectory])    else	libdbrx='^libdb([[3.-]].*)?.la$'	if test "$with_db3" = yes; then	    for dir in "$prefix/BerkeleyDB.3.1" /usr/local/BerkeleyDB.3.1 \		    "$prefix/BerkeleyDB.3.0" /usr/local/BerkeleyDB.3.0 \		    /usr "$prefix" /usr/local; do		test -f $dir/include/db.h -o -f $dir/include/db3.h || continue		if test -f $dir/lib/libdb.a \			|| ls $dir/lib | egrep -q "$libdbrx"; then		    with_db3="$dir"		    break		fi	    done	fi	if test -f $with_db3/include/db3.h; then	    AC_DEFINE(HAVE_DB3_H, 1, [Define if BerkeleyDB header is db3.h.])	elif test ! -f $with_db3/include/db.h; then	    AC_MSG_ERROR([Could not find BerkeleyDB library version 3])	fi	CPPFLAGS="$CPPFLAGS -I${with_db3}/include"	DB3_LIB=`ls $with_db3/lib | egrep "$libdbrx" | tail -1`	if test -f "$with_db3/lib/$DB3_LIB"; then	    DB3_LIB="$with_db3/lib/$DB3_LIB"	elif test "$with_db3" = /usr; then	    with_db3=yes	    DB3_LIB="-ldb"	else	    DB3_LIB="-L${with_db3}/lib -ldb"	fi	AC_MSG_RESULT([$with_db3])    fifiAM_CONDITIONAL(USE_DB3, test "${with_db3}" != no)])dnldnl Find OpenSSLdnlAC_DEFUN(SFS_OPENSSL,[AC_SUBST(OPENSSL_DIR)AC_ARG_WITH(openssl,--with-openssl[[=/usr/local/openssl]]   Find OpenSSL libraries)AC_MSG_CHECKING([for OpenSSL])test "$with_openssl" = "yes" && unset with_opensslunset OPENSSL_DIRif test -z "$with_openssl"; then    with_openssl=no    for dir in /usr/local/openssl/ /usr/local/ssl/ \		`ls -1d /usr/local/openssl-*/ 2>/dev/null | tail -1`; do	if test -f $dir/lib/libssl.a -a -f $dir/include/openssl/ssl.h; then	    with_openssl=`echo $dir | sed -e 's/\/$//'`	    break	fi    donefiOPENSSL_DIR="$with_openssl"AC_MSG_RESULT([$with_openssl])if test "$with_openssl" = no; thendnl    if test -z "$with_openssl"; thendnl	AC_MSG_ERROR([Could not find OpenSSL libraries])dnl    fi     unset OPENSSL_DIRfi])

⌨️ 快捷键说明

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