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

📄 configure.in

📁 好东东。linux下面的文件节点、文件状态的变化监听代码
💻 IN
📖 第 1 页 / 共 2 页
字号:
dnldnl  If you're using this on IRIX, you'll need to get autoconf, automake,dnl  libtool, GNU tar, GNU make, and maybe some other stuff, which shoulddnl  be available on your freeware CD or from http://freeware.sgi.com/.dnldnl  At the moment, this file suffers from a number of aesthetic shortcomings.dnldnl  To change compiler flags etc., you should set the CXXFLAGS environmentdnl  variable before running the configure script.dnldnl  Process this file with autoconf to produce a configure script.dnl  The order you want to use is:dnl    aclocal  (only need to do this once?)dnl    autoconfdnl    autoheaderdnl    automake -v --add-missing  (you only need the --add-missing once, ordnl    configure                  every time you switch between IRIX & Linuxdnl    make                       in the same workarea)dnldnl  THINGS WHICH ARE STILL BROKENdnldnl    packaging.dnl    makedepends.  The generated Makefiles don't include the Makedependsdnl      files, so I removed the makedepends flags.  We should figure out howdnl      to fix that & put them back.  (g++ I think wants to put each file'sdnl      dependencies in a separate file.d instead of a single directory-widednl      Makedepend file, too.)dnldnl  Uncomment to keep from using the cache file.  (It was causing problemsdnl  with GCC and GXX being set to "yes" even when the compilers aren't GNU.)dnl define([AC_CACHE_LOAD], )dnldnl define([AC_CACHE_SAVE], )dnlAC_INIT(libfam/fam.c++)AM_INIT_AUTOMAKE(fam, 2.6.9)dnl  Put configuration #defines in config.h.AM_CONFIG_HEADER(config.h)dnl Initialize libtooldnl AC_PATH_PROG(LIBTOOL, libtool)AM_PROG_LIBTOOLdnldnl  We want to include our header in $(top_srcdir)/includednlFAMPROTOINC='-I$(top_srcdir)/include'AC_SUBST(FAMPROTOINC)dnldnl  We want everyone to agree on our config file's path & namednlFAM_CONF=$sysconfdir/fam.confAC_SUBST(FAM_CONF)dnl I hate autoconf so much.dnl AC_DEFINE_UNQUOTED(FAM_CONF, "${FAM_CONF}")dnl AC_DEFINE_UNQUOTED(FAM_CONF, "`echo ${FAM_CONF} | xargs`")dnl AC_DEFINE_UNQUOTED(FAM_CONF, "`echo ${FAM_CONF} | sed s/\$\{prefix\}/${prefix:-NONE}/ | sed s/^NONE//`")dnl  Make our AC_TRY_COMPILE's use C++ instead of C.  (It doesn't matterdnl  for most of them, though.)AC_LANG_CPLUSPLUSdnl  This is sort of a perversion of the AC_ARGS_WITH macro, but I wantdnl  people to be able to set their CFLAGS on the command line.AC_ARG_WITH(CFLAGS, [  --with-CFLAGS=\"flags\"   set CFLAGS and CXXFLAGS to the given value], [CFLAGS=$withval; CXXFLAGS=$withval])dnldnl  Checks for programs.dnldnl  Nuts!  On IRIX, we want to use the SGI compilers, not GNU.dnl    not necessarily.  rusty == bozo.if test `uname` = 'IRIX' || test `uname` = 'IRIX64'; then    AC_PATH_PROG(CXX, CC)fiAC_PROG_CXXAC_PROG_CXXCPPAC_PROG_RANLIBAC_PROG_INSTALLdnl I don't know why, but automake wants to use ./mkinstalldirs.dnl AC_PATH_PROG(MKINSTALLDIRS, mkinstalldirs)AC_PROG_MAKE_SETdnl AC_PROG_AWKdnl  autoconf/automake expects GNU tar, so find it on IRIX.AC_PATH_PROG(TAR, tar, tar, /usr/freeware/bin:$PATH)AC_PATH_PROG(LDCONFIG, ldconfig)dnldnl  Checks for header files.dnldnl AC_HEADER_STDCdnl AC_HEADER_DIRENTdnl AC_HEADER_SYS_WAITdnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h)dnldnl  See if imon is available; if so, is it IRIX or Linux?dnlif test `uname` = 'IRIX' || test `uname` = 'IRIX64'; then    have_imon=yes    AC_DEFINE(HAVE_IMON, 1)    IMON_FUNCS=IMonIrix    dnl     dnl  As long as we're here, check for struct revokdi and IMONIOC_REVOKDI.    dnl  Old IRIX boxes don't have them.    dnl    AC_EGREP_HEADER(revokdi, sys/imon.h, AC_DEFINE(HAVE_IMON_REVOKDI))fiif test "$have_imon" != "yes"; then    AC_CHECK_HEADER(linux/imon.h, have_imon=yes)    if test "$have_imon" = "yes"; then        AC_DEFINE(HAVE_IMON, 1)        IMON_FUNCS=IMonLinux    fifiif test "$have_imon" != "yes"; then    have_imon=no    AC_DEFINE(HAVE_IMON, 0)    IMON_FUNCS=IMonNonefiAC_SUBST(IMON_FUNCS)echo "Using imon support module $IMON_FUNCS"AC_CHECK_HEADER(sys/statvfs.h, [AC_DEFINE(HAVE_STATVFS, 1) have_statvfs="yes"], [AC_DEFINE(HAVE_STATVFS, 0) have_statvfs="no"])AC_CHECK_HEADER(sys/syssgi.h,  AC_DEFINE(HAVE_SYSSGI,  1), AC_DEFINE(HAVE_SYSSGI,  0))AC_CHECK_HEADER(sys/fs/nfs_clnt.h, AC_DEFINE(HAVE_SYS_FS_NFS_CLNT_H, 1), AC_DEFINE(HAVE_SYS_FS_NFS_CLNT_H, 0))dnl  Linux has statvfs, but its f_fsid is a struct, and SmallTable can'tdnl  be instantiated for it because there's no > or < operator for it yet.dnl  fam does work without the fs_by_id table, so we'll pretend we don'tdnl  have statvfs for now.  This should be fixed, though.if test `uname` != 'IRIX' && test `uname` != 'IRIX64'; then    AC_DEFINE(HAVE_STATVFS, 0)    have_statvfs="no"fidnl dnldnl dnl  If we have statvfs, test for fsid_t.dnl dnldnl if test "$have_statvfs" = "yes"; thendnl     for fsid_t in ulong_t fsid_t __fsid_t; dodnl         AC_MSG_CHECKING([sys/statvfs.h for $fsid_t fsid])dnl         AC_TRY_COMPILE([#include <sys/statvfs.h>], [struct statvfs s; $fsid_t i = s.f_fsid;], have_fsid_t=yes, have_fsid_t=no)dnl         AC_MSG_RESULT($have_fsid_t)dnl         if test "$have_fsid_t" = "yes"; thendnl             AC_DEFINE_UNQUOTED(CONFIG_FSID_T, $fsid_t)dnl             breakdnl         fidnl     donednl     if test "$have_fsid_t" != "yes"; thendnl         AC_MSG_ERROR([Have sys/statvfs.h, but couldn't get statvfs.f_fsid type])dnl     fidnl fidnldnl  Test for SGI_NOHANG in syssgi.hdnlAC_MSG_CHECKING([SGI_NOHANG])AC_TRY_COMPILE([#include <sys/syssgi.h>], [int i = SGI_NOHANG; ], have_sgi_nohang=yes, have_sgi_nohang=no)if test "$have_sgi_nohang" = "yes"; then    AC_DEFINE(HAVE_SGI_NOHANG, 1)else    AC_DEFINE(HAVE_SGI_NOHANG, 0)fiAC_MSG_RESULT($have_sgi_nohang)dnldnl  Test for a function to background the fam processdnlAC_CHECK_FUNC(_daemonize, AC_DEFINE(HAVE_DAEMONIZE, 1), AC_DEFINE(HAVE_DAEMONIZE, 0))AC_CHECK_FUNC(daemon, AC_DEFINE(HAVE_DAEMON, 1), AC_DEFINE(HAVE_DAEMON, 0))dnldnl  Test for getgrmember in grp.hdnlAC_CACHE_CHECK([getgrmember], fam_cv_have_getgrmember, AC_TRY_RUN([#include <grp.h>int main(void) { getgrmember(NULL, NULL, 0, 0); return 0; }], fam_cv_have_getgrmember=yes, fam_cv_have_getgrmember=no, fam_cv_have_getgrmember=no))if test "$fam_cv_have_getgrmember" = "yes"; then    AC_DEFINE(HAVE_GETGRMEMBER, 1)else    AC_DEFINE(HAVE_GETGRMEMBER, 0)fidnldnl  This section is commented out because HAVE_AUDIT and HAVE_MAC shoulddnl  not be used.  HAVE_AUDIT is probably OK (although it doesn't do anythingdnl  special) but HAVE_MAC is definitely not.  (The test is fine, but thednl  code it #ifdef's in isn't.)dnldnl dnldnl dnl  Test for sys/sat.h, satvwrite(), and _SC_AUDIT.dnl dnldnl AC_MSG_CHECKING([satvwrite in sat.h])dnl AC_TRY_COMPILE([#include <unistd.h>dnl #include <sat.h>], [sysconf(_SC_AUDIT); satvwrite(SAT_AE_CUSTOM, SAT_FAILURE, "%s", "Denied root root access to jesus"); ], have_audit=yes, have_audit=no)dnl AC_MSG_RESULT($have_audit)dnl if test "$have_audit" = "yes"; thendnl     AC_DEFINE(HAVE_AUDIT)dnl fidnl dnl dnldnl dnl  Test for sys/mac.h and t6net.h, mac_get_file() and tsix_get_mac(),dnl dnl  and _SC_MAC and _SC_IP_SECOPTS.  These are all squished together intodnl dnl  a single test because even if the system has MAC labels, they're no usednl dnl  to us unless we have a way to get them from the client connection (whichdnl dnl  is what tsix_get_mac is for).dnl dnldnl dnl  On IRIX, install trix_eoe to get t6net.h.dnl dnldnl AC_MSG_CHECKING([MAC and TSIX (tsix_get_mac and mac_get_file, mostly)])dnl AC_TRY_COMPILE([#include <stdlib.h>dnl #include <unistd.h>dnl #include <sys/mac.h>dnl #include <t6net.h>], [sysconf(_SC_MAC); sysconf(_SC_IP_SECOPTS); mac_get_file("/"); tsix_get_mac(0, (mac_t *)0);], have_mac=yes, have_mac=no)dnl AC_MSG_RESULT($have_mac)dnl if test "$have_mac" = "yes"; thendnl     AC_DEFINE(HAVE_MAC)dnl fidnldnl  Checks for typedefs, structures, and compiler characteristics.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  Good candidates for this section would be support for bool and namespaces.dnldnl AC_C_CONSTdnl AC_TYPE_UID_Tdnl AC_C_INLINEdnl AC_TYPE_MODE_Tdnl AC_TYPE_OFF_Tdnl AC_TYPE_PID_Tdnl AC_TYPE_SIZE_Tdnl AC_STRUCT_ST_RDEVdnl AC_HEADER_TIMEdnl AC_STRUCT_TMdnldnl  Test for stat.st_fstype member (a char[] on IRIX)dnlAC_CACHE_CHECK([for stat.st_fstype string], fam_cv_stat_st_fstype_is_string, AC_TRY_COMPILE([#include <sys/stat.h>], [struct stat st; char *s = st.st_fstype; ], fam_cv_stat_st_fstype_is_string=yes, fam_cv_stat_st_fstype_is_string=no))if test "$fam_cv_stat_st_fstype_is_string" = "yes"; then    AC_DEFINE(HAVE_STAT_ST_FSTYPE_STRING, 1)else    AC_DEFINE(HAVE_STAT_ST_FSTYPE_STRING, 0)fidnldnl  Test for stat.st_ctim.tv_nsec memberdnlAC_CACHE_CHECK([for stat.st_ctim.tv_nsec (nanoseconds)],    fam_cv_stat_st_ctim_tv_nsec,    AC_TRY_COMPILE([#include <sys/stat.h>],        [struct stat st; st.st_ctim.tv_nsec = 0; ],        fam_cv_stat_st_ctim_tv_nsec=yes, fam_cv_stat_st_ctim_tv_nsec=no))if test "$fam_cv_stat_st_ctim_tv_nsec" = "yes"; then    AC_DEFINE(HAVE_STAT_ST_CTIM_TV_NSEC, 1)fidnldnl  Test for mountlist struct or pointer-to-struct.  For now we will assumednl  that if mountlist is a pointer-to-struct, its relevant members arednl  ml_hostname and ml_directory; otherwise we will assume they're ml_hostdnl  and ml_path.dnlAC_MSG_CHECKING([for mountlist struct])AC_TRY_COMPILE([typedef int fhandle_t;#include <rpc/rpc.h>#include <rpcsvc/mount.h>], [mountlist ml; char *h = ml.ml_name; ], have_mountlist_struct=yes, have_mountlist_struct=no)AC_MSG_RESULT($have_mountlist_struct)if test "$have_mountlist_struct" = "yes"; then    AC_DEFINE(HAVE_MOUNTLIST_STRUCT, 1)    AC_DEFINE(HAVE_MOUNTLIST_PTR, 0)else    AC_DEFINE(HAVE_MOUNTLIST_STRUCT, 0)    AC_MSG_CHECKING([for mountlist pointer])    AC_TRY_COMPILE([#include <rpcsvc/mount.h>], [mountlist ml; char *h = ml->ml_hostname; ], have_mountlist_ptr=yes, have_mountlist_ptr=no)    AC_MSG_RESULT($have_mountlist_ptr)    if test "$have_mountlist_ptr" = "yes"; then        AC_DEFINE(HAVE_MOUNTLIST_PTR, 1)    else        AC_DEFINE(HAVE_MOUNTLIST_PTR, 0)        AC_MSG_ERROR([Didn't find mountlist.ml_name or mountlist->ml_hostname in rpcsvc/mount.h])    fifi

⌨️ 快捷键说明

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