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

📄 acinclude.m4

📁 A part of LFS.This is a server software.
💻 M4
📖 第 1 页 / 共 3 页
字号:
	    test -f $dir/lib/libdb.a && db_library=$dir/lib/libdb.a	    ;;	esac    fi    if test "$db_library"; then	case $db_header in	*/db.h)	    CPPFLAGS="$CPPFLAGS -I"`dirname $db_header`	    ;;	*)	    ln -s $db_header db.h	    ;;	esac	case $db_library in	*.la)	    DB_LIB=$db_library	    ;;	*.a)	    minusl=`echo $db_library | sed -e 's/^.*\/lib\(.*\)\.a$/-l\1/'`	    DB_LIB=-L`dirname $db_library`" $minusl"	    ;;	*/lib*.so.*)	    minusl=`echo $db_library | sed -e 's/^.*\/lib\(.*\)\.so\..*/-l\1/'`	    DB_LIB=-L`dirname $db_library`" $minusl"	    ;;	esac    fifi])dnldnl SFS_SLEEPYCAT(v1 v2 v3 ..., required)dnldnl   Find BekeleyDB version v1, v2, or v3...dnl      required can be "no" if DB is not requireddnlAC_DEFUN(SFS_SLEEPYCAT,[AC_ARG_WITH(db,--with-db[[[=/usr/local]]]    specify path for BerkeleyDB (from sleepycat.com))AC_SUBST(DB_DIR)AC_CONFIG_SUBDIRS($DB_DIR)AC_SUBST(DB_LIB)unset DB_LIBrm -f db.hfor vers in $1; do    DB_DIR=`cd $srcdir && echo db-$vers.*/dist/`    if test -d "$srcdir/$DB_DIR"; then        DB_DIR=`echo $DB_DIR | sed -e 's!/$!!'`	break    else	unset DB_DIR    fidonetest -z "${with_db+set}" && with_db=yesAC_MSG_CHECKING(for BerkeleyDB library)if test "$DB_DIR" -a "$with_db" = yes; then    CPPFLAGS="$CPPFLAGS "'-I$(top_builddir)/'"$DB_DIR/dist"    DB_LIB='$(top_builddir)/'"$DB_DIR/dist/.libs/libdb-*.a"    AC_MSG_RESULT([using distribution in $DB_DIR subdirectory])else    if test "$with_db" = yes; then	for vers in $1; do	    for dir in "$prefix/BerkeleyDB.$vers" \			"/usr/BerkeleyDB.$vers" \			"/usr/local/BerkeleyDB.$vers" \			$prefix /usr /usr/local; do		SFS_TRY_SLEEPYCAT_VERSION($vers, $dir)		test -z "$DB_LIB" || break 2	    done	done    else	for vers in $1; do	    SFS_TRY_SLEEPYCAT_VERSION($vers, $with_db)	    test -z "$DB_LIB" || break	done	test -z "$DB_LIB" && AC_MSG_ERROR(Cannot find BerkeleyDB in $with_db)    fifiif test x"$DB_LIB" != x; then    AC_MSG_RESULT($DB_LIB)    USE_DB=yeselse    AC_MSG_RESULT(no)    USE_DB=no    if test "$2" != "no"; then        AC_MSG_ERROR(Cannot find BerkeleyDB)    fifiAM_CONDITIONAL(USE_DB, test "$USE_DB" = yes)])dnldnl Find OpenSSLdnlAC_DEFUN(SFS_OPENSSL,[AC_SUBST(OPENSSL_DIR)AC_ARG_WITH(openssl,--with-openssl[[=/usr/local/openssl]]   Find OpenSSL libraries				      (DANGER--FOR BENCHMARKING ONLY))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])dnldnl Use dmalloc if requesteddnlAC_DEFUN(SFS_DMALLOC,[dnl AC_ARG_WITH(small-limits,dnl --with-small-limits       Try to trigger memory allocation bugs,dnl CPPFLAGS="$CPPFLAGS -DSMALL_LIMITS"dnl test "${with_dmalloc+set}" = set || with_dmalloc=yesdnl )AC_CHECK_HEADERS(memory.h)AC_ARG_WITH(dmalloc,--with-dmalloc            use debugging malloc from www.dmalloc.com			  (set MAX_FILE_LEN to 1024 when installing),pref=$prefixtest "$pref" = NONE && pref=$ac_default_prefixtest "$withval" = yes && withval="${pref}"test "$withval" || withval="${pref}"using_dmalloc=noif test "$withval" != no; then	AC_DEFINE(DMALLOC, 1, Define if compiling with dmalloc. )dnl	CPPFLAGS="$CPPFLAGS -DDMALLOC"	CPPFLAGS="$CPPFLAGS -I${withval}/include"	LIBS="$LIBS -L${withval}/lib -ldmalloc"	using_dmalloc=yesfi)AM_CONDITIONAL(DMALLOC, test "$using_dmalloc" = yes)])dnldnl Find perldnlAC_DEFUN(SFS_PERLINFO,[AC_ARG_WITH(perl,--with-perl=PATH          Specify perl executable to use,[case "$withval" in	yes|no|"") ;;	*) PERL="$withval" ;;esac])if test -z "$PERL" || test ! -x "$PERL"; then	AC_PATH_PROGS(PERL, perl5 perl)fiif test -x "$PERL" && $PERL -e 'require 5.004'; then :; else	AC_MSG_ERROR("Can\'t find perl 5.004 or later")fiAC_CACHE_CHECK(for perl includes, sfs_cv_perl_ccopts,	sfs_cv_perl_ccopts=`$PERL -MExtUtils::Embed -e ccopts`	sfs_cv_perl_ccopts=`echo $sfs_cv_perl_ccopts`)AC_CACHE_CHECK(for perl libraries, sfs_cv_perl_ldopts,	sfs_cv_perl_ldopts=`$PERL -MExtUtils::Embed -e ldopts -- -std`	sfs_cv_perl_ldopts=`echo $sfs_cv_perl_ldopts`)AC_CACHE_CHECK(for perl xsubpp, sfs_cv_perl_xsubpp,	sfs_cv_perl_xsubpp="$PERL "`$PERL -MConfig -e 'print qq(\	-I$Config{"installarchlib"} -I$Config{"installprivlib"}\	$Config{"installprivlib"}/ExtUtils/xsubpp\	-typemap $Config{"installprivlib"}/ExtUtils/typemap)'`	sfs_cv_perl_xsubpp=`echo $sfs_cv_perl_xsubpp`)XSUBPP="$sfs_cv_perl_xsubpp"PERL_INC="$sfs_cv_perl_ccopts"PERL_LIB="$sfs_cv_perl_ldopts"PERL_XSI="$PERL -MExtUtils::Embed -e xsinit -- -std"AC_SUBST(PERL)AC_SUBST(PERL_INC)AC_SUBST(PERL_LIB)AC_SUBST(PERL_XSI)AC_SUBST(XSUBPP)])dnldnl Check for perl and for Pod::Man for generating man pagesdnlAC_DEFUN(SFS_PERL_POD,[if test -z "$PERL" || text ! -x "$PERL"; then	AC_PATH_PROGS(PERL, perl5 perl)fiAC_PATH_PROGS(POD2MAN, pod2man)if test "$PERL"; then	AC_CACHE_CHECK(for Pod::Man, sfs_cv_perl_pod_man,		$PERL -e '{ require Pod::Man }' >/dev/null 2>&1		if test $? = 0; then			sfs_cv_perl_pod_man="yes"		else			sfs_cv_perl_pod_man="no"		fi			)	PERL_POD_MAN="$sfs_cv_perl_pod_man"fiAC_SUBST(PERL_POD_MAN)])dnl'dnl Various warning flags for gcc.  This must go at the very top,dnl right after AC_PROG_CC and AC_PROG_CXX.dnlAC_DEFUN(SFS_WFLAGS,[AC_SUBST(NW)AC_SUBST(WFLAGS)AC_SUBST(CXXWFLAGS)AC_SUBST(DEBUG)AC_SUBST(CXXDEBUG)AC_SUBST(ECFLAGS)AC_SUBST(ECXXFLAGS)AC_SUBST(CXXNOERR)test -z "${CXXWFLAGS+set}" -a "${WFLAGS+set}" && CXXWFLAGS="$WFLAGS"test -z "${CXXDEBUG+set}" -a "${DEBUG+set}" && CXXDEBUG="$DEBUG"test "${DEBUG+set}" || DEBUG="$CFLAGS"export DEBUGtest "${CXXDEBUG+set}" || CXXDEBUG="$CXXFLAGS"export CXXDEBUGcase $host_os in    openbsd*)	sfs_gnu_WFLAGS="-ansi -Wall -Wsign-compare -Wchar-subscripts -Werror"	sfs_gnu_CXXWFLAGS="$sfs_gnu_WFLAGS"	;;    linux*|freebsd*)	sfs_gnu_WFLAGS="-Wall -Werror"	sfs_gnu_CXXWFLAGS="$sfs_gnu_WFLAGS"	;;    *)	sfs_gnu_WFLAGS="-Wall"	sfs_gnu_CXXWFLAGS="$sfs_gnu_WFLAGS"	;;esacexpr "x$DEBUG" : '.*-O' > /dev/null \    || sfs_gnu_WFLAGS="$sfs_gnu_WFLAGS -Wno-unused"expr "x$CXXDEBUG" : '.*-O' > /dev/null \    || sfs_gnu_CXXWFLAGS="$sfs_gnu_CXXWFLAGS -Wno-unused"NW='-w'test "$GCC" = yes -a -z "${WFLAGS+set}" && WFLAGS="$sfs_gnu_WFLAGS"test "$GXX" = yes -a -z "${CXXWFLAGS+set}" && CXXWFLAGS="$sfs_gnu_CXXWFLAGS"CXXNOERR=test "$GXX" = yes && CXXNOERR='-Wno-error'# Temporarily set CFLAGS to ansi so tests for things like __inline go correctlyif expr "x$DEBUG $WFLAGS $ECFLAGS" : '.*-ansi' > /dev/null; then	CFLAGS="$CFLAGS -ansi"	ac_cpp="$ac_cpp -ansi"fiexpr "x$CXXDEBUG $CXXWFLAGS $ECXXFLAGS" : '.*-ansi' > /dev/null \    && CXXFLAGS="$CXXFLAGS -ansi"])dnldnl SFS_CFLAGS puts the effects of SFS_WFLAGS into place.dnl This must be called after all tests have been run.dnlAC_DEFUN(SFS_CFLAGS,[unset CFLAGSunset CXXFLAGSCFLAGS='$(DEBUG) $(WFLAGS) $(ECFLAGS)'CXXFLAGS='$(CXXDEBUG) $(CXXWFLAGS) $(ECXXFLAGS)'])dnldnl Check for xdr_u_intNN_t, etcdnlAC_DEFUN(SFS_CHECK_XDR,[dnl AC_CACHE_CHECK([for a broken <rpc/xdr.h>], sfs_cv_xdr_broken,dnl AC_EGREP_HEADER(xdr_u_int32_t, [rpc/xdr.h], dnl                 sfs_cv_xdr_broken=no, sfs_cv_xdr_broken=yes))dnl if test "$sfs_cv_xdr_broken" = "yes"; thendnl     AC_DEFINE(SFS_XDR_BROKEN)dnl     dnl We need to know the following in order to fix rpc/xdr.h: dnl     AC_CHECK_SIZEOF(short)dnl     AC_CHECK_SIZEOF(int)dnl     AC_CHECK_SIZEOF(long)dnl fiSFS_CHECK_DECL(xdr_callmsg, rpc/rpc.h)AC_CACHE_CHECK(what second xdr_getlong arg points to, sfs_cv_xdrlong_t,AC_EGREP_HEADER(\*x_getlong.* long *\*, [rpc/rpc.h],                 sfs_cv_xdrlong_t=long)if test -z "$sfs_cv_xdrlong_t"; then    AC_EGREP_HEADER(\*x_getlong.* int *\*, [rpc/rpc.h],                     sfs_cv_xdrlong_t=int)fiif test -z "$sfs_cv_xdrlong_t"; then    sfs_cv_xdrlong_t=u_int32_tfi)AC_DEFINE_UNQUOTED(xdrlong_t, $sfs_cv_xdrlong_t,		   What the second argument of xdr_getlong points to)])dnldnl Check for random devicednlAC_DEFUN(SFS_DEV_RANDOM,[AC_CACHE_CHECK([for kernel random number generator], sfs_cv_dev_random,for dev in /dev/urandom /dev/srandom /dev/random /dev/srnd /dev/rnd; do    if test -c "$dev"; then	sfs_cv_dev_random=$dev	break    fi    test "$sfs_cv_dev_random" || sfs_cv_dev_random=nodone)if test "$sfs_cv_dev_random" != no; thenpushdef([SFS_DEV_RANDOM], [[SFS_DEV_RANDOM]])    AC_DEFINE_UNQUOTED([SFS_DEV_RANDOM], "$sfs_cv_dev_random",		       [Path to the strongest random number device, if any.])popdef([SFS_DEV_RANDOM])fi])dnldnl Check for getgrouplist functiondnlAC_DEFUN(SFS_GETGROUPLIST_TRYGID, [if test "$sfs_cv_grouplist_t" != gid_t; then    AC_TRY_COMPILE([#include <sys/types.h>#include <unistd.h>#include <grp.h>int getgrouplist ([$*]);		    ], 0, sfs_cv_grouplist_t=gid_t)fi])AC_DEFUN(SFS_GETGROUPLIST,[AC_CHECK_FUNCS(getgrouplist)AC_CACHE_CHECK([whether getgrouplist uses int or gid_t], sfs_cv_grouplist_t,    if test "$ac_cv_func_getgrouplist" = yes; then	sfs_cv_grouplist_t=int	AC_EGREP_HEADER(getgrouplist.*gid_t *\*, unistd.h,			sfs_cv_grouplist_t=gid_t)	if test "$sfs_cv_grouplist_t" != gid_t; then	    AC_EGREP_HEADER(getgrouplist.*gid_t *\*, grp.h,			    sfs_cv_grouplist_t=gid_t)	fi	SFS_GETGROUPLIST_TRYGID(const char *, gid_t, gid_t *, int *)	SFS_GETGROUPLIST_TRYGID(const char *, int , gid_t *, int *)	SFS_GETGROUPLIST_TRYGID(char *, gid_t, gid_t *, int *)	SFS_GETGROUPLIST_TRYGID(char *, int, gid_t *, int *)    else	sfs_cv_grouplist_t=gid_t    fi)AC_DEFINE_UNQUOTED([GROUPLIST_T], $sfs_cv_grouplist_t,	[Type pointed to by 3rd argument of getgrouplist.])])dnldnl Check if <grp.h> is needed for setgroups declaration (linux)dnlAC_DEFUN(SFS_SETGROUPS,[AC_CACHE_CHECK([for setgroups declaration in grp.h],	sfs_cv_setgroups_grp_h,	AC_EGREP_HEADER(setgroups, grp.h,		sfs_cv_setgroups_grp_h=yes, sfs_cv_setgroups_grp_h=no))if test "$sfs_cv_setgroups_grp_h" = yes; thenAC_DEFINE([SETGROUPS_NEEDS_GRP_H], 1,	[Define if setgroups is declared in <grp.h>.])fi])dnldnl Check if authunix_create is broken and takes a gid_t *dnlAC_DEFUN(SFS_AUTHUNIX_GROUP_T,[AC_CACHE_CHECK([what last authunix_create arg points to],	sfs_cv_authunix_group_t,AC_EGREP_HEADER([(authunix|authsys)_create.*(uid_t|gid_t)], rpc/rpc.h,	sfs_cv_authunix_group_t=gid_t, sfs_cv_authunix_group_t=int))if test "$sfs_cv_authunix_group_t" = gid_t; then    AC_DEFINE_UNQUOTED(AUTHUNIX_GID_T, 1,	[Define if last argument of authunix_create is a gid_t *.])fi])dnldnl Check the type of the x_ops field in XDRdnlAC_DEFUN(SFS_XDR_OPS_T,[AC_CACHE_CHECK([type of XDR::x_ops], sfs_cv_xdr_ops_t,AC_EGREP_HEADER([xdr_ops *\* *x_ops;], rpc/xdr.h,	sfs_cv_xdr_ops_t=xdr_ops, sfs_cv_xdr_ops_t=XDR::xdr_ops))AC_DEFINE_UNQUOTED(xdr_ops_t, $sfs_cv_xdr_ops_t,	[The C++ type name of the x_ops field in struct XDR.])])dnldnl Find installed SFS librariesdnl This is not for SFS, but for other packages that use SFS.dnlAC_DEFUN(SFS_SFS,[AC_ARG_WITH(sfs,--with-sfs[[=PATH]]         specify location of SFS libraries)if test "$with_sfs" = yes -o "$with_sfs" = ""; then    for dir in "$prefix" /usr/local /usr; do	if test -f $dir/lib/sfs/libasync.la; then	    with_sfs=$dir	    break	fi    doneficase "$with_sfs" in    /*) ;;    *) with_sfs="$PWD/$with_sfs" ;;esacif test -f ${with_sfs}/Makefile -a -f ${with_sfs}/autoconf.h; then    if egrep '#define DMALLOC' ${with_sfs}/autoconf.h > /dev/null 2>&1; then	test -z "$with_dmalloc" -o "$with_dmalloc" = no && with_dmalloc=yes    elif test "$with_dmalloc" -a "$with_dmalloc" != no; then	AC_MSG_ERROR("SFS libraries not compiled with dmalloc")    fi    sfssrcdir=`sed -ne 's/^srcdir *= *//p' ${with_sfs}/Makefile`    case "$sfssrcdir" in	/*) ;;	*) sfssrcdir="${with_sfs}/${sfssrcdir}" ;;    esac    CPPFLAGS="$CPPFLAGS -I${with_sfs}"    for lib in async arpc crypt sfsmisc; do	CPPFLAGS="$CPPFLAGS -I${sfssrcdir}/$lib"    done    CPPFLAGS="$CPPFLAGS -I${with_sfs}/svc"    LIBASYNC=${with_sfs}/async/libasync.la    LIBARPC=${with_sfs}/arpc/libarpc.la    LIBSFSCRYPT=${with_sfs}/crypt/libsfscrypt.la    LIBSFSMISC=${with_sfs}/sfsmisc/libsfsmisc.la    LIBSVC=${with_sfs}/svc/libsvc.la    LIBSFS=${with_sfs}/libsfs/libsfs.la    MALLOCK=${with_sfs}/sfsmisc/mallock.o    RPCC=${with_sfs}/rpcc/rpccelif test -f ${with_sfs}/include/sfs/autoconf.h \	-a -f ${with_sfs}/lib/sfs/libasync.la; then    sfsincludedir="${with_sfs}/include/sfs"    sfslibdir=${with_sfs}/lib/sfs    if egrep '#define DMALLOC' ${sfsincludedir}/autoconf.h > /dev/null; then	test -z "$with_dmalloc" -o "$with_dmalloc" = no && with_dmalloc=yes    else	with_dmalloc=no    fi    CPPFLAGS="$CPPFLAGS -I${sfsincludedir}"    LIBASYNC=${sfslibdir}/libasync.la    LIBARPC=${sfslibdir}/libarpc.la    LIBSFSCRYPT=${sfslibdir}/libsfscrypt.la    LIBSFSMISC=${sfslibdir}/libsfsmisc.la    LIBSVC=${sfslibdir}/libsvc.la    LIBSFS=${with_sfs}/lib/libsfs.a    MALLOCK=${sfslibdir}/mallock.o    RPCC=${with_sfs}/bin/rpccelse    AC_MSG_ERROR("Can\'t find SFS libraries")fiif test "$enable_static" = yes -a -z "${NOPAGING+set}"; then    case "$host_os" in	openbsd*)	    test "$ac_cv_prog_gcc" = yes && NOPAGING="-Wl,-Bstatic,-N"	    MALLOCK=		# mallock.o panics the OpenBSD kernel	;;	freebsd*)	    test "$ac_cv_prog_gcc" = yes && NOPAGING="-Wl,-Bstatic"	;;    esacfisfslibdir='$(libdir)/sfs'sfsincludedir='$(libdir)/include'AC_SUBST(sfslibdir)AC_SUBST(sfsincludedir)AC_SUBST(LIBASYNC)AC_SUBST(LIBARPC)AC_SUBST(LIBSFSCRYPT)AC_SUBST(LIBSFSMISC)AC_SUBST(LIBSVC)AC_SUBST(LIBSFS)AC_SUBST(RPCC)AC_SUBST(MALLOCK)AC_SUBST(NOPAGING)SFS_GMPSFS_DMALLOCLDEPS='$(LIBSFSMISC) $(LIBSVC) $(LIBSFSCRYPT) $(LIBARPC) $(LIBASYNC)'LDADD="$LDEPS "'$(LIBGMP)'AC_SUBST(LDEPS)AC_SUBST(LDADD)])

⌨️ 快捷键说明

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