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

📄 configure.in

📁 好东东。linux下面的文件节点、文件状态的变化监听代码
💻 IN
📖 第 1 页 / 共 2 页
字号:
dnl FAM_DECL_IN_MNTENT(mntent def to check, [action-if-true [,action-if-false]])AC_DEFUN(FAM_DECL_IN_MNTENT, [    AC_MSG_CHECKING([mntent.h for $1])    AC_TRY_COMPILE([#include <mntent.h>], [const char *foo = $1;], fam_have_decl_in_mntent=yes, fam_have_decl_in_mntent=no)    AC_MSG_RESULT($fam_have_decl_in_mntent)    if test "$fam_have_decl_in_mntent" = "yes"; then	ifelse([$2], , :, [$2])    else		ifelse([$3], , :, [$3])    fi])dnldnl  Test for MNTTYPE_NFS, MNTTYPE_NFS2, MNTTYPE_NFS3, and MNTTYPE_CACHEFS.dnl If we don't have MNTTYPE_NFS , we croak.dnlFAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))dnldnl  Test for bindresvport() prototype.dnlAC_CACHE_CHECK([netinet/in.h for bindresvport()], fam_cv_bindresvport_in_in_h, AC_TRY_COMPILE([#include <netinet/in.h>], [int p = 0; struct sockaddr_in s; bindresvport(p, &s); ], fam_cv_bindresvport_in_in_h=yes, fam_cv_bindresvport_in_in_h=no))if test "$fam_cv_bindresvport_in_in_h" = "yes"; then    AC_DEFINE(HAVE_BINDRESVPORT_PROTO, 1)else    AC_DEFINE(HAVE_BINDRESVPORT_PROTO, 0)fidnldnl  Test for prmap_sgi_tdnlAC_CACHE_CHECK([for prmap_sgi_t], fam_cv_have_prmap_sgi_t, AC_TRY_COMPILE([#include <sys/procfs.h>], [prmap_sgi_t f; f.pr_lockcnt = 0; ], fam_cv_have_prmap_sgi_t=yes, fam_cv_have_prmap_sgi_t=no))if test "$fam_cv_have_prmap_sgi_t" = "yes"; then    AC_DEFINE(HAVE_PRMAP_SGI_T, 1)else    AC_DEFINE(HAVE_PRMAP_SGI_T, 0)fidnldnl  Test for socklen_tdnlAC_CACHE_CHECK([for socklen_t], fam_cv_have_socklen_t, AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>], [socklen_t len; struct sockaddr s; accept(0, &s, &len); ], fam_cv_have_socklen_t=yes, fam_cv_have_socklen_t=no))if test "$fam_cv_have_socklen_t" = "yes"; then    AC_DEFINE(CONFIG_SOCKLEN_T, socklen_t)else    AC_DEFINE(CONFIG_SOCKLEN_T, int)fidnldnl  Test for built-in C++ bool typednlAC_CACHE_CHECK([for built-in bool], fam_cv_have_bool, AC_TRY_COMPILE(, [bool foo = true; if(foo) foo = false; ], fam_cv_have_bool=yes, fam_cv_have_bool=no))if test "$fam_cv_have_bool" = "yes"; then    AC_DEFINE(HAVE_BOOL, 1)else    AC_DEFINE(HAVE_BOOL, 0)fidnldnl  Test for C++ namespace supportdnlAC_CACHE_CHECK([for C++ namespace support], fam_cv_have_namespace, AC_TRY_RUN([namespace foo { int bar(void) { return 0; } } int main(void) { return foo::bar(); } ], fam_cv_have_namespace=yes, fam_cv_have_namespace=no, fam_cv_have_namespace=no))if test "$fam_cv_have_namespace" = "yes"; then    AC_DEFINE(HAVE_NAMESPACE, 1)else    AC_DEFINE(HAVE_NAMESPACE, 0)fidnldnl  Test for IRIX xtab/Linux knfs xtab/no xtab support.dnldnl AC_MSG_CHECKING([for IRIX xtab support])if test `uname` = 'IRIX' || test `uname` = 'IRIX64'; then    AC_DEFINE(HAVE_IRIX_XTAB_VERIFICATION, 1)fidnl XXX  This should test for knfs on Linux, too.dnl dnldnl dnl  This is lame.  Here's a list of flags which are different (or where wednl dnl  want different behaviors) depending on whether we're using CC on IRIXdnl dnl  or g++ on Linux.  And if we're using g++ on IRIX... well, ignore thatdnl dnl  squeaking sound.dnl dnldnl if test -n "$GXX"; thendnl     dnl WOFF="-Wall -Wtemplate-debugging"dnl     WOFF="-Wall"dnl     OPTIMIZER="-g"dnl     CSTYLE=dnl     MKDEPFILE=dnl dnl     MKDEPFILE='$(OBJECTS:.o=.d)'dnl     MKDEPOPT="-MD"dnl     CXXTEMPLATES=dnl dnl     CXXTEMPLATES=-Wtemplate-debuggingdnl elsednl     dnl  1209 - remark - controlling expression (in assertion or loop?) isdnl     dnl         constantdnl     dnl  1355 - remark - extra ";" ignoreddnl     WOFF="-fullwarn -woff 1209,1355"dnl     OPTIMIZER="-g"dnl     dnl  XXX THE NEXT LINE IS LAMEdnl     CSTYLE="-mips3 -n32"dnl     dnl  The Makedepend stuff is pointless because it's not being includeddnl     dnl  in the makefile.  How to fix that?  You can't just godnl     dnl  "sinclude $MKDEPFILE" because the g++ stuff uses a bunch of .d files.dnl     dnl  (The compiler doesn't actually read the Makedepend file & determinednl     dnl  which files it needs to update, right?)dnl     MKDEPFILE=Makedependdnl     MKDEPOPT='-MDupdate $(MKDEPFILE)'dnl dnl     MKDEPOPT=dnl dnl     GCXXINCS='-nostdinc -I$(INCLDIR)/CC -I$(INCLDIR)'dnl     CXXTEMPLATES="-ptused"dnl fiAC_SUBST(MKDEPFILE)dnl dnl  We will stomp CXXFLAGS here.dnl CXXFLAGS="$WOFF $OPTIMIZER $CSTYLE $MKDEPOPT $CXXTEMPLATES"dnl echo "setting CXXFLAGS = $CXXFLAGS"dnldnl  See if "echo" needs -e flag.dnlAC_PATH_PROG(ECHO, echo)AC_MSG_CHECKING([for echo -e flag])if test "`$ECHO -e foo`" = 'foo'; then    ECHO="$ECHO -e"fiAC_SUBST(ECHO)AC_MSG_RESULT($ECHO)dnldnl  Checks for library functions.dnldnl  (we don't need any of these for the simple tcpmux test...  we will need todnl  fix many of these later, though, and comment them in.)dnldnl AC_PROG_GCC_TRADITIONALdnl AC_HEADER_MAJORdnl AC_FUNC_STRFTIMEdnl AC_FUNC_UTIME_NULLdnl AC_FUNC_VPRINTFdnl AC_CHECK_FUNCS(getcwd gethostname gettimeofday getwd mkdir putenv rmdir select socket strdup strerror strspn strtol strtoul)SUPPORT_OBJS=dnl AC_CHECK_FUNCS(snprintf, have_snprintf=yes, have_snprintf=no)dnl if test "$have_snprintf" = "yes"; thendnl     AC_DEFINE(HAVE_SNPRINTF)    snprintf_o=dnl elsednl     snprintf_o=snprintf.odnl     SUPPORT_OBJS="$SUPPORT_OBJS \$\(top_srcdir\)/support/snprintf.o"dnl fiAC_SUBST(snprintf_o)dnl dnl AC_CHECK_FUNCS(foo, have_foo=yes, have_foo=no)dnl if test "$have_foo" = "yes"; thendnl     AC_DEFINE(HAVE_FOO)    foo_o=dnl elsednl     foo_o=foo.odnl     SUPPORT_OBJS="$SUPPORT_OBJS \$\(top_srcdir\)/support/foo.o"dnl fiAC_SUBST(foo_o)dnldnl  This adds #!gmake as the first line of each of these files.  We need thisdnl  on IRIX to use gmake instead of smake/pmake/etc., which will croak on thednl  gmake Makefiles.dnlAC_OUTPUT_COMMANDS([if test `uname` = 'IRIX' || test `uname` = 'IRIX64'; then    TMPFILE=configure.tmp    for f in $CONFIG_FILES; do        if test `basename $f` != 'Makefile'; then#            echo "skipping        $f"            continue        fi        echo "adding #!gmake to $f"        if test -s $TMPFILE; then            echo "gahh, file $TMPFILE already exists"            exit 1        fi        mv $f $TMPFILE        echo '#!gmake' > $f        cat $TMPFILE >> $f        rm $TMPFILE    donefi])dnldnl  This removes lines starting with ## from fam.conf.dnlAC_OUTPUT_COMMANDS([    TMPFILE=configure.tmp    for f in $CONFIG_FILES; do        if test `basename $f` != 'fam.conf'; then            continue        fi        echo "removing maintainer comments from $f"        if test -s $TMPFILE; then            echo "gahh, file $TMPFILE already exists"            exit 1        fi        mv $f $TMPFILE        sed -e "/^##/ d" < $TMPFILE > $f        rm $TMPFILE    done])dnldnl  This grief is for replacing XXX_FAM_CONF with $FAM_CONFdnl  in the fam(1M) man page.  (Simply putting @FAM_CONF@ indnl  fam.1m.in puts the string "$sysconfdir/fam.conf" in thednl  man page, which isn't acceptable.  Isn't there a way to makednl  autoconf handle this??)dnldnl  While we're at it, we also remove lines starting with .\"##,dnl  and fiddle with lines starting with .\"IRIX depending ondnl  whether we're building on Linux or IRIX.dnlAC_OUTPUT_COMMANDS([    TMPFILE=configure.tmp    for f in $CONFIG_FILES; do        if test `basename $f` != 'fam.1m'; then            continue        fi        echo "replacing XXX_FAM_CONF with $FAM_CONF and removing maintainer comments in $f"        if test -s $TMPFILE; then            echo "gahh, file $TMPFILE already exists"            exit 1        fi        mv $f $TMPFILE        if test `uname` = 'IRIX' || test `uname` = 'IRIX64'; then            #  remove leading .\"IRIX parts so that the lines will be            #  printed on IRIX.            sed -e '/^\.\\"##/ d' -e "s#XXX_FAM_CONF#$FAM_CONF#" -e 's/^\.\\"IRIX[ 	]\{0,2\}//' < $TMPFILE > $f        else            sed -e '/^\.\\"##/ d' -e "s#XXX_FAM_CONF#$FAM_CONF#" -e  '/^\.\\"IRIX/ d' < $TMPFILE > $f        fi        rm $TMPFILE    done], [prefix=$prefix ; sysconfdir=$sysconfdir ; FAM_CONF=$FAM_CONF])dnldnl  The list of files to generate.dnlAC_OUTPUT(    Makefile     build/Makefile    build/rpm/Makefile    build/rpm/rpm.spec    fam/Makefile    fam/fam.conf    include/Makefile    libfam/Makefile    man/Makefile    man/fam.1m    support/Makefile    test/Makefile    util/Makefile    util/editconf/Makefile)dnl dnl  fam is a good deal less interesting without imon.dnl if test "$have_imon" != 'yes'; then    cat << EOF  ******************************************************************  *                                                                *  *  Note!  Kernel support for imon was not detected.  fam should  *  *  still work, but it will have to poll monitored filesystems    *  *  instead of receiving file operation events from the kernel.   *  *                                                                *  *  If you think your kernel has imon, see what this script is    *  *  looking for (on Linux, probably /usr/include/linux/imon.h),   *  *  fix the problem (perhaps by adding a link), and run this      *  *  again.  (You probably need to remove config.cache first.)     *  *                                                                *  *  See http://oss.sgi.com/projects/fam/ for more information.    *  *                                                                *  ******************************************************************EOFfi

⌨️ 快捷键说明

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