[BACK]Return to configure.in CVS log [TXT][DIR] Up to [Development] / fam

Annotation of fam/configure.in, Revision 1.1

1.1     ! trev        1: dnl
        !             2: dnl  If you're using this on IRIX, you'll need to get autoconf, automake,
        !             3: dnl  libtool, GNU tar, GNU make, and maybe some other stuff, which should
        !             4: dnl  be available on your freeware CD or from http://freeware.sgi.com/.
        !             5: dnl
        !             6: dnl  At the moment, this file suffers from a number of aesthetic shortcomings.
        !             7: dnl
        !             8: dnl  To change compiler flags etc., you should set the CXXFLAGS environment
        !             9: dnl  variable before running the configure script.
        !            10: dnl
        !            11: dnl  Process this file with autoconf to produce a configure script.
        !            12: dnl  The order you want to use is:
        !            13: dnl    aclocal  (only need to do this once?)
        !            14: dnl    autoconf
        !            15: dnl    autoheader
        !            16: dnl    automake -v --add-missing  (you only need the --add-missing once, or
        !            17: dnl    configure                  every time you switch between IRIX & Linux
        !            18: dnl    make                       in the same workarea)
        !            19: dnl
        !            20: dnl  THINGS WHICH ARE STILL BROKEN
        !            21: dnl
        !            22: dnl    packaging.
        !            23: dnl    makedepends.  The generated Makefiles don't include the Makedepends
        !            24: dnl      files, so I removed the makedepends flags.  We should figure out how
        !            25: dnl      to fix that & put them back.  (g++ I think wants to put each file's
        !            26: dnl      dependencies in a separate file.d instead of a single directory-wide
        !            27: dnl      Makedepend file, too.)
        !            28: dnl
        !            29:
        !            30:
        !            31: dnl  Uncomment to keep from using the cache file.  (It was causing problems
        !            32: dnl  with GCC and GXX being set to "yes" even when the compilers aren't GNU.)
        !            33: dnl define([AC_CACHE_LOAD], )dnl
        !            34: dnl define([AC_CACHE_SAVE], )dnl
        !            35:
        !            36: AC_INIT(libfam/fam.c++)
        !            37: AM_INIT_AUTOMAKE(fam, 2.6.10)
        !            38:
        !            39: dnl  Put configuration #defines in config.h.
        !            40: AM_CONFIG_HEADER(config.h)
        !            41:
        !            42: dnl Initialize libtool
        !            43: dnl AC_PATH_PROG(LIBTOOL, libtool)
        !            44: AM_PROG_LIBTOOL
        !            45:
        !            46: dnl
        !            47: dnl  We want to include our header in $(top_srcdir)/include
        !            48: dnl
        !            49: FAMPROTOINC='-I$(top_srcdir)/include'
        !            50: AC_SUBST(FAMPROTOINC)
        !            51:
        !            52: dnl
        !            53: dnl  We want everyone to agree on our config file's path & name
        !            54: dnl
        !            55: FAM_CONF=$sysconfdir/fam.conf
        !            56: AC_SUBST(FAM_CONF)
        !            57: dnl I hate autoconf so much.
        !            58: dnl AC_DEFINE_UNQUOTED(FAM_CONF, "${FAM_CONF}")
        !            59: dnl AC_DEFINE_UNQUOTED(FAM_CONF, "`echo ${FAM_CONF} | xargs`")
        !            60: dnl AC_DEFINE_UNQUOTED(FAM_CONF, "`echo ${FAM_CONF} | sed s/\$\{prefix\}/${prefix:-NONE}/ | sed s/^NONE//`")
        !            61:
        !            62: dnl  Make our AC_TRY_COMPILE's use C++ instead of C.  (It doesn't matter
        !            63: dnl  for most of them, though.)
        !            64: AC_LANG_CPLUSPLUS
        !            65:
        !            66: dnl  This is sort of a perversion of the AC_ARGS_WITH macro, but I want
        !            67: dnl  people to be able to set their CFLAGS on the command line.
        !            68: AC_ARG_WITH(CFLAGS, [  --with-CFLAGS=\"flags\"   set CFLAGS and CXXFLAGS to the given value], [CFLAGS=$withval; CXXFLAGS=$withval])
        !            69:
        !            70: dnl
        !            71: dnl  Checks for programs.
        !            72: dnl
        !            73: dnl  Nuts!  On IRIX, we want to use the SGI compilers, not GNU.
        !            74: dnl    not necessarily.  rusty == bozo.
        !            75: if test `uname` = 'IRIX' || test `uname` = 'IRIX64'; then
        !            76:     AC_PATH_PROG(CXX, CC)
        !            77: fi
        !            78: AC_PROG_CXX
        !            79: AC_PROG_CXXCPP
        !            80: AC_PROG_RANLIB
        !            81:
        !            82: AC_PROG_INSTALL
        !            83: dnl I don't know why, but automake wants to use ./mkinstalldirs.
        !            84: dnl AC_PATH_PROG(MKINSTALLDIRS, mkinstalldirs)
        !            85: AC_PROG_MAKE_SET
        !            86:
        !            87:
        !            88: dnl AC_PROG_AWK
        !            89: dnl  autoconf/automake expects GNU tar, so find it on IRIX.
        !            90: AC_PATH_PROG(TAR, tar, tar, /usr/freeware/bin:$PATH)
        !            91: AC_PATH_PROG(LDCONFIG, ldconfig)
        !            92:
        !            93:
        !            94: dnl
        !            95: dnl  Checks for header files.
        !            96: dnl
        !            97: dnl AC_HEADER_STDC
        !            98: dnl AC_HEADER_DIRENT
        !            99: dnl AC_HEADER_SYS_WAIT
        !           100: dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h)
        !           101:
        !           102: dnl
        !           103: dnl  See if imon is available; if so, is it IRIX or Linux?
        !           104: dnl
        !           105: if test `uname` = 'IRIX' || test `uname` = 'IRIX64'; then
        !           106:     have_imon=yes
        !           107:     AC_DEFINE(HAVE_IMON, 1)
        !           108:     IMON_FUNCS=IMonIrix
        !           109:     dnl
        !           110:     dnl  As long as we're here, check for struct revokdi and IMONIOC_REVOKDI.
        !           111:     dnl  Old IRIX boxes don't have them.
        !           112:     dnl
        !           113:     AC_EGREP_HEADER(revokdi, sys/imon.h, AC_DEFINE(HAVE_IMON_REVOKDI))
        !           114: fi
        !           115: if test "$have_imon" != "yes"; then
        !           116:     AC_CHECK_HEADER(linux/imon.h, have_imon=yes)
        !           117:     if test "$have_imon" = "yes"; then
        !           118:         AC_DEFINE(HAVE_IMON, 1)
        !           119:         IMON_FUNCS=IMonLinux
        !           120:     fi
        !           121: fi
        !           122: if test "$have_imon" != "yes"; then
        !           123:     have_imon=no
        !           124:     AC_DEFINE(HAVE_IMON, 0)
        !           125:     IMON_FUNCS=IMonNone
        !           126: fi
        !           127: AC_SUBST(IMON_FUNCS)
        !           128: echo "Using imon support module $IMON_FUNCS"
        !           129:
        !           130: AC_CHECK_HEADER(sys/statvfs.h, [AC_DEFINE(HAVE_STATVFS, 1) have_statvfs="yes"], [AC_DEFINE(HAVE_STATVFS, 0) have_statvfs="no"])
        !           131: AC_CHECK_HEADER(sys/syssgi.h,  AC_DEFINE(HAVE_SYSSGI,  1), AC_DEFINE(HAVE_SYSSGI,  0))
        !           132: 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))
        !           133:
        !           134: dnl  Linux has statvfs, but its f_fsid is a struct, and SmallTable can't
        !           135: dnl  be instantiated for it because there's no > or < operator for it yet.
        !           136: dnl  fam does work without the fs_by_id table, so we'll pretend we don't
        !           137: dnl  have statvfs for now.  This should be fixed, though.
        !           138: if test `uname` != 'IRIX' && test `uname` != 'IRIX64'; then
        !           139:     AC_DEFINE(HAVE_STATVFS, 0)
        !           140:     have_statvfs="no"
        !           141: fi
        !           142: dnl dnl
        !           143: dnl dnl  If we have statvfs, test for fsid_t.
        !           144: dnl dnl
        !           145: dnl if test "$have_statvfs" = "yes"; then
        !           146: dnl     for fsid_t in ulong_t fsid_t __fsid_t; do
        !           147: dnl         AC_MSG_CHECKING([sys/statvfs.h for $fsid_t fsid])
        !           148: 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)
        !           149: dnl         AC_MSG_RESULT($have_fsid_t)
        !           150: dnl         if test "$have_fsid_t" = "yes"; then
        !           151: dnl             AC_DEFINE_UNQUOTED(CONFIG_FSID_T, $fsid_t)
        !           152: dnl             break
        !           153: dnl         fi
        !           154: dnl     done
        !           155: dnl     if test "$have_fsid_t" != "yes"; then
        !           156: dnl         AC_MSG_ERROR([Have sys/statvfs.h, but couldn't get statvfs.f_fsid type])
        !           157: dnl     fi
        !           158: dnl fi
        !           159:
        !           160: dnl
        !           161: dnl  Test for SGI_NOHANG in syssgi.h
        !           162: dnl
        !           163: AC_MSG_CHECKING([SGI_NOHANG])
        !           164: AC_TRY_COMPILE([#include <sys/syssgi.h>], [int i = SGI_NOHANG; ], have_sgi_nohang=yes, have_sgi_nohang=no)
        !           165: if test "$have_sgi_nohang" = "yes"; then
        !           166:     AC_DEFINE(HAVE_SGI_NOHANG, 1)
        !           167: else
        !           168:     AC_DEFINE(HAVE_SGI_NOHANG, 0)
        !           169: fi
        !           170: AC_MSG_RESULT($have_sgi_nohang)
        !           171:
        !           172: dnl
        !           173: dnl  Test for a function to background the fam process
        !           174: dnl
        !           175: AC_CHECK_FUNCS([_daemonize daemon])
        !           176:
        !           177: dnl
        !           178: dnl  Test for a function to get a user's groups
        !           179: dnl
        !           180: AC_CHECK_FUNCS([getgrmember getgroups])
        !           181:
        !           182: dnl
        !           183: dnl  This section is commented out because HAVE_AUDIT and HAVE_MAC should
        !           184: dnl  not be used.  HAVE_AUDIT is probably OK (although it doesn't do anything
        !           185: dnl  special) but HAVE_MAC is definitely not.  (The test is fine, but the
        !           186: dnl  code it #ifdef's in isn't.)
        !           187: dnl
        !           188: dnl dnl
        !           189: dnl dnl  Test for sys/sat.h, satvwrite(), and _SC_AUDIT.
        !           190: dnl dnl
        !           191: dnl AC_MSG_CHECKING([satvwrite in sat.h])
        !           192: dnl AC_TRY_COMPILE([#include <unistd.h>
        !           193: 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)
        !           194: dnl AC_MSG_RESULT($have_audit)
        !           195: dnl if test "$have_audit" = "yes"; then
        !           196: dnl     AC_DEFINE(HAVE_AUDIT)
        !           197: dnl fi
        !           198: dnl
        !           199: dnl dnl
        !           200: dnl dnl  Test for sys/mac.h and t6net.h, mac_get_file() and tsix_get_mac(),
        !           201: dnl dnl  and _SC_MAC and _SC_IP_SECOPTS.  These are all squished together into
        !           202: dnl dnl  a single test because even if the system has MAC labels, they're no use
        !           203: dnl dnl  to us unless we have a way to get them from the client connection (which
        !           204: dnl dnl  is what tsix_get_mac is for).
        !           205: dnl dnl
        !           206: dnl dnl  On IRIX, install trix_eoe to get t6net.h.
        !           207: dnl dnl
        !           208: dnl AC_MSG_CHECKING([MAC and TSIX (tsix_get_mac and mac_get_file, mostly)])
        !           209: dnl AC_TRY_COMPILE([#include <stdlib.h>
        !           210: dnl #include <unistd.h>
        !           211: dnl #include <sys/mac.h>
        !           212: 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)
        !           213: dnl AC_MSG_RESULT($have_mac)
        !           214: dnl if test "$have_mac" = "yes"; then
        !           215: dnl     AC_DEFINE(HAVE_MAC)
        !           216: dnl fi
        !           217:
        !           218:
        !           219:
        !           220: dnl
        !           221: dnl  Checks for typedefs, structures, and compiler characteristics.
        !           222: dnl
        !           223: dnl  (we don't need any of these for the simple tcpmux test...  we will need to
        !           224: dnl  fix many of these later, though, and comment them in.)
        !           225: dnl
        !           226: dnl  Good candidates for this section would be support for bool and namespaces.
        !           227: dnl
        !           228: dnl AC_C_CONST
        !           229: dnl AC_TYPE_UID_T
        !           230: dnl AC_C_INLINE
        !           231: dnl AC_TYPE_MODE_T
        !           232: dnl AC_TYPE_OFF_T
        !           233: dnl AC_TYPE_PID_T
        !           234: dnl AC_TYPE_SIZE_T
        !           235: dnl AC_STRUCT_ST_RDEV
        !           236: dnl AC_HEADER_TIME
        !           237: dnl AC_STRUCT_TM
        !           238:
        !           239: dnl
        !           240: dnl  Test for stat.st_fstype member (a char[] on IRIX)
        !           241: dnl
        !           242: AC_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))
        !           243: if test "$fam_cv_stat_st_fstype_is_string" = "yes"; then
        !           244:     AC_DEFINE(HAVE_STAT_ST_FSTYPE_STRING, 1)
        !           245: else
        !           246:     AC_DEFINE(HAVE_STAT_ST_FSTYPE_STRING, 0)
        !           247: fi
        !           248:
        !           249: dnl
        !           250: dnl  Test for stat.st_ctim.tv_nsec member
        !           251: dnl
        !           252: AC_CACHE_CHECK([for stat.st_ctim.tv_nsec (nanoseconds)],
        !           253:     fam_cv_stat_st_ctim_tv_nsec,
        !           254:     AC_TRY_COMPILE([#include <sys/stat.h>],
        !           255:         [struct stat st; st.st_ctim.tv_nsec = 0; ],
        !           256:         fam_cv_stat_st_ctim_tv_nsec=yes, fam_cv_stat_st_ctim_tv_nsec=no))
        !           257: if test "$fam_cv_stat_st_ctim_tv_nsec" = "yes"; then
        !           258:     AC_DEFINE(HAVE_STAT_ST_CTIM_TV_NSEC, 1)
        !           259: fi
        !           260:
        !           261:
        !           262: dnl
        !           263: dnl  Test for mountlist struct or pointer-to-struct.  For now we will assume
        !           264: dnl  that if mountlist is a pointer-to-struct, its relevant members are
        !           265: dnl  ml_hostname and ml_directory; otherwise we will assume they're ml_host
        !           266: dnl  and ml_path.
        !           267: dnl
        !           268: AC_MSG_CHECKING([for mountlist struct])
        !           269: AC_TRY_COMPILE([
        !           270: typedef int fhandle_t;
        !           271: #include <rpc/rpc.h>
        !           272: #include <rpcsvc/mount.h>
        !           273: ], [mountlist ml; char *h = ml.ml_name; ], have_mountlist_struct=yes, have_mountlist_struct=no)
        !           274: AC_MSG_RESULT($have_mountlist_struct)
        !           275: if test "$have_mountlist_struct" = "yes"; then
        !           276:     AC_DEFINE(HAVE_MOUNTLIST_STRUCT, 1)
        !           277:     AC_DEFINE(HAVE_MOUNTLIST_PTR, 0)
        !           278: else
        !           279:     AC_DEFINE(HAVE_MOUNTLIST_STRUCT, 0)
        !           280:
        !           281:     AC_MSG_CHECKING([for mountlist pointer])
        !           282:     AC_TRY_COMPILE([#include <rpcsvc/mount.h>], [mountlist ml; char *h = ml->ml_hostname; ], have_mountlist_ptr=yes, have_mountlist_ptr=no)
        !           283:     AC_MSG_RESULT($have_mountlist_ptr)
        !           284:
        !           285:     if test "$have_mountlist_ptr" = "yes"; then
        !           286:         AC_DEFINE(HAVE_MOUNTLIST_PTR, 1)
        !           287:     else
        !           288:         AC_DEFINE(HAVE_MOUNTLIST_PTR, 0)
        !           289:         AC_MSG_ERROR([Didn't find mountlist.ml_name or mountlist->ml_hostname in rpcsvc/mount.h])
        !           290:     fi
        !           291: fi
        !           292:
        !           293:
        !           294: dnl FAM_DECL_IN_MNTENT(mntent def to check, [action-if-true [,action-if-false]])
        !           295: AC_DEFUN(FAM_DECL_IN_MNTENT, [
        !           296:     AC_MSG_CHECKING([mntent.h for $1])
        !           297:     AC_TRY_COMPILE([#include <mntent.h>], [const char *foo = $1;], fam_have_decl_in_mntent=yes, fam_have_decl_in_mntent=no)
        !           298:     AC_MSG_RESULT($fam_have_decl_in_mntent)
        !           299:     if test "$fam_have_decl_in_mntent" = "yes"; then
        !           300: 	ifelse([$2], , :, [$2])
        !           301:     else
        !           302: 	ifelse([$3], , :, [$3])
        !           303:     fi
        !           304: ])
        !           305:
        !           306: dnl
        !           307: dnl  Test for MNTTYPE_NFS, MNTTYPE_NFS2, MNTTYPE_NFS3, and MNTTYPE_CACHEFS.
        !           308: dnl If we don't have MNTTYPE_NFS , we croak.
        !           309: dnl
        !           310:
        !           311: FAM_DECL_IN_MNTENT(MNTTYPE_NFS, ,AC_MSG_ERROR(Didn't find MNTTYPE_NFS in mntent.h))
        !           312: FAM_DECL_IN_MNTENT(MNTTYPE_NFS2, AC_DEFINE(HAVE_MNTTYPE_NFS2))
        !           313: FAM_DECL_IN_MNTENT(MNTTYPE_NFS3, AC_DEFINE(HAVE_MNTTYPE_NFS3))
        !           314: FAM_DECL_IN_MNTENT(MNTTYPE_CACHEFS, AC_DEFINE(HAVE_MNTTYPE_CACHEFS))
        !           315:
        !           316: dnl
        !           317: dnl  Test for bindresvport() prototype.
        !           318: dnl
        !           319: AC_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))
        !           320: if test "$fam_cv_bindresvport_in_in_h" = "yes"; then
        !           321:     AC_DEFINE(HAVE_BINDRESVPORT_PROTO, 1)
        !           322: else
        !           323:     AC_DEFINE(HAVE_BINDRESVPORT_PROTO, 0)
        !           324: fi
        !           325:
        !           326: dnl
        !           327: dnl  Test for prmap_sgi_t
        !           328: dnl
        !           329: AC_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))
        !           330: if test "$fam_cv_have_prmap_sgi_t" = "yes"; then
        !           331:     AC_DEFINE(HAVE_PRMAP_SGI_T, 1)
        !           332: else
        !           333:     AC_DEFINE(HAVE_PRMAP_SGI_T, 0)
        !           334: fi
        !           335:
        !           336: dnl
        !           337: dnl  Test for socklen_t
        !           338: dnl
        !           339: AC_CACHE_CHECK([for socklen_t], fam_cv_have_socklen_t, AC_TRY_COMPILE([#include <sys/types.h>
        !           340: #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))
        !           341: if test "$fam_cv_have_socklen_t" = "yes"; then
        !           342:     AC_DEFINE(CONFIG_SOCKLEN_T, socklen_t)
        !           343: else
        !           344:     AC_DEFINE(CONFIG_SOCKLEN_T, int)
        !           345: fi
        !           346:
        !           347: dnl
        !           348: dnl  Test for built-in C++ bool type
        !           349: dnl
        !           350: AC_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))
        !           351: if test "$fam_cv_have_bool" = "yes"; then
        !           352:     AC_DEFINE(HAVE_BOOL, 1)
        !           353: else
        !           354:     AC_DEFINE(HAVE_BOOL, 0)
        !           355: fi
        !           356:
        !           357:
        !           358: dnl
        !           359: dnl  Test for C++ namespace support
        !           360: dnl
        !           361: AC_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))
        !           362: if test "$fam_cv_have_namespace" = "yes"; then
        !           363:     AC_DEFINE(HAVE_NAMESPACE, 1)
        !           364: else
        !           365:     AC_DEFINE(HAVE_NAMESPACE, 0)
        !           366: fi
        !           367:
        !           368: dnl
        !           369: dnl  Test for IRIX xtab/Linux knfs xtab/no xtab support.
        !           370: dnl
        !           371: dnl AC_MSG_CHECKING([for IRIX xtab support])
        !           372: if test `uname` = 'IRIX' || test `uname` = 'IRIX64'; then
        !           373:     AC_DEFINE(HAVE_IRIX_XTAB_VERIFICATION, 1)
        !           374: fi
        !           375: dnl XXX  This should test for knfs on Linux, too.
        !           376:
        !           377:
        !           378: dnl dnl
        !           379: dnl dnl  This is lame.  Here's a list of flags which are different (or where we
        !           380: dnl dnl  want different behaviors) depending on whether we're using CC on IRIX
        !           381: dnl dnl  or g++ on Linux.  And if we're using g++ on IRIX... well, ignore that
        !           382: dnl dnl  squeaking sound.
        !           383: dnl dnl
        !           384: dnl if test -n "$GXX"; then
        !           385: dnl     dnl WOFF="-Wall -Wtemplate-debugging"
        !           386: dnl     WOFF="-Wall"
        !           387: dnl     OPTIMIZER="-g"
        !           388: dnl     CSTYLE=
        !           389: dnl     MKDEPFILE=
        !           390: dnl dnl     MKDEPFILE='$(OBJECTS:.o=.d)'
        !           391: dnl     MKDEPOPT="-MD"
        !           392: dnl     CXXTEMPLATES=
        !           393: dnl dnl     CXXTEMPLATES=-Wtemplate-debugging
        !           394: dnl else
        !           395: dnl     dnl  1209 - remark - controlling expression (in assertion or loop?) is
        !           396: dnl     dnl         constant
        !           397: dnl     dnl  1355 - remark - extra ";" ignored
        !           398: dnl     WOFF="-fullwarn -woff 1209,1355"
        !           399: dnl     OPTIMIZER="-g"
        !           400: dnl     dnl  XXX THE NEXT LINE IS LAME
        !           401: dnl     CSTYLE="-mips3 -n32"
        !           402: dnl     dnl  The Makedepend stuff is pointless because it's not being included
        !           403: dnl     dnl  in the makefile.  How to fix that?  You can't just go
        !           404: dnl     dnl  "sinclude $MKDEPFILE" because the g++ stuff uses a bunch of .d files.
        !           405: dnl     dnl  (The compiler doesn't actually read the Makedepend file & determine
        !           406: dnl     dnl  which files it needs to update, right?)
        !           407: dnl     MKDEPFILE=Makedepend
        !           408: dnl     MKDEPOPT='-MDupdate $(MKDEPFILE)'
        !           409: dnl dnl     MKDEPOPT=
        !           410: dnl dnl     GCXXINCS='-nostdinc -I$(INCLDIR)/CC -I$(INCLDIR)'
        !           411: dnl     CXXTEMPLATES="-ptused"
        !           412: dnl fi
        !           413: AC_SUBST(MKDEPFILE)
        !           414:
        !           415: dnl dnl  We will stomp CXXFLAGS here.
        !           416: dnl CXXFLAGS="$WOFF $OPTIMIZER $CSTYLE $MKDEPOPT $CXXTEMPLATES"
        !           417: dnl echo "setting CXXFLAGS = $CXXFLAGS"
        !           418:
        !           419: dnl
        !           420: dnl  See if "echo" needs -e flag.
        !           421: dnl
        !           422: AC_PATH_PROG(ECHO, echo)
        !           423: AC_MSG_CHECKING([for echo -e flag])
        !           424: if test "`$ECHO -e foo`" = 'foo'; then
        !           425:     ECHO="$ECHO -e"
        !           426: fi
        !           427: AC_SUBST(ECHO)
        !           428: AC_MSG_RESULT($ECHO)
        !           429:
        !           430:
        !           431: dnl
        !           432: dnl  Checks for library functions.
        !           433: dnl
        !           434: dnl  (we don't need any of these for the simple tcpmux test...  we will need to
        !           435: dnl  fix many of these later, though, and comment them in.)
        !           436: dnl
        !           437: dnl AC_PROG_GCC_TRADITIONAL
        !           438: dnl AC_HEADER_MAJOR
        !           439: dnl AC_FUNC_STRFTIME
        !           440: dnl AC_FUNC_UTIME_NULL
        !           441: dnl AC_FUNC_VPRINTF
        !           442: dnl AC_CHECK_FUNCS(getcwd gethostname gettimeofday getwd mkdir putenv rmdir select socket strdup strerror strspn strtol strtoul)
        !           443:
        !           444: SUPPORT_OBJS=
        !           445: dnl AC_CHECK_FUNCS(snprintf, have_snprintf=yes, have_snprintf=no)
        !           446: dnl if test "$have_snprintf" = "yes"; then
        !           447: dnl     AC_DEFINE(HAVE_SNPRINTF)
        !           448:     snprintf_o=
        !           449: dnl else
        !           450: dnl     snprintf_o=snprintf.o
        !           451: dnl     SUPPORT_OBJS="$SUPPORT_OBJS \$\(top_srcdir\)/support/snprintf.o"
        !           452: dnl fi
        !           453: AC_SUBST(snprintf_o)
        !           454: dnl
        !           455: dnl AC_CHECK_FUNCS(foo, have_foo=yes, have_foo=no)
        !           456: dnl if test "$have_foo" = "yes"; then
        !           457: dnl     AC_DEFINE(HAVE_FOO)
        !           458:     foo_o=
        !           459: dnl else
        !           460: dnl     foo_o=foo.o
        !           461: dnl     SUPPORT_OBJS="$SUPPORT_OBJS \$\(top_srcdir\)/support/foo.o"
        !           462: dnl fi
        !           463: AC_SUBST(foo_o)
        !           464:
        !           465:
        !           466:
        !           467: dnl
        !           468: dnl  This adds #!gmake as the first line of each of these files.  We need this
        !           469: dnl  on IRIX to use gmake instead of smake/pmake/etc., which will croak on the
        !           470: dnl  gmake Makefiles.
        !           471: dnl
        !           472: AC_OUTPUT_COMMANDS(
        !           473: [
        !           474: if test `uname` = 'IRIX' || test `uname` = 'IRIX64'; then
        !           475:     TMPFILE=configure.tmp
        !           476:     for f in $CONFIG_FILES; do
        !           477:         if test `basename $f` != 'Makefile'; then
        !           478: #            echo "skipping        $f"
        !           479:             continue
        !           480:         fi
        !           481:         echo "adding #!gmake to $f"
        !           482:         if test -s $TMPFILE; then
        !           483:             echo "gahh, file $TMPFILE already exists"
        !           484:             exit 1
        !           485:         fi
        !           486:         mv $f $TMPFILE
        !           487:         echo '#!gmake' > $f
        !           488:         cat $TMPFILE >> $f
        !           489:         rm $TMPFILE
        !           490:     done
        !           491: fi
        !           492: ])
        !           493:
        !           494: dnl
        !           495: dnl  This removes lines starting with ## from fam.conf.
        !           496: dnl
        !           497: AC_OUTPUT_COMMANDS(
        !           498: [
        !           499:     TMPFILE=configure.tmp
        !           500:     for f in $CONFIG_FILES; do
        !           501:         if test `basename $f` != 'fam.conf'; then
        !           502:             continue
        !           503:         fi
        !           504:         echo "removing maintainer comments from $f"
        !           505:         if test -s $TMPFILE; then
        !           506:             echo "gahh, file $TMPFILE already exists"
        !           507:             exit 1
        !           508:         fi
        !           509:         mv $f $TMPFILE
        !           510:         sed -e "/^##/ d" < $TMPFILE > $f
        !           511:         rm $TMPFILE
        !           512:     done
        !           513: ])
        !           514:
        !           515: dnl
        !           516: dnl  This grief is for replacing XXX_FAM_CONF with $FAM_CONF
        !           517: dnl  in the fam(1M) man page.  (Simply putting @FAM_CONF@ in
        !           518: dnl  fam.1m.in puts the string "$sysconfdir/fam.conf" in the
        !           519: dnl  man page, which isn't acceptable.  Isn't there a way to make
        !           520: dnl  autoconf handle this??)
        !           521: dnl
        !           522: dnl  While we're at it, we also remove lines starting with .\"##,
        !           523: dnl  and fiddle with lines starting with .\"IRIX depending on
        !           524: dnl  whether we're building on Linux or IRIX.
        !           525: dnl
        !           526: AC_OUTPUT_COMMANDS(
        !           527: [
        !           528:     TMPFILE=configure.tmp
        !           529:     for f in $CONFIG_FILES; do
        !           530:         if test `basename $f` != 'fam.1m'; then
        !           531:             continue
        !           532:         fi
        !           533:         echo "replacing XXX_FAM_CONF with $FAM_CONF and removing maintainer comments in $f"
        !           534:         if test -s $TMPFILE; then
        !           535:             echo "gahh, file $TMPFILE already exists"
        !           536:             exit 1
        !           537:         fi
        !           538:         mv $f $TMPFILE
        !           539:         if test `uname` = 'IRIX' || test `uname` = 'IRIX64'; then
        !           540:             #  remove leading .\"IRIX parts so that the lines will be
        !           541:             #  printed on IRIX.
        !           542:             sed -e '/^\.\\"##/ d' -e "s#XXX_FAM_CONF#$FAM_CONF#" -e 's/^\.\\"IRIX[ 	]\{0,2\}//' < $TMPFILE > $f
        !           543:         else
        !           544:             sed -e '/^\.\\"##/ d' -e "s#XXX_FAM_CONF#$FAM_CONF#" -e  '/^\.\\"IRIX/ d' < $TMPFILE > $f
        !           545:         fi
        !           546:         rm $TMPFILE
        !           547:     done
        !           548: ], [prefix=$prefix ; sysconfdir=$sysconfdir ; FAM_CONF=$FAM_CONF])
        !           549:
        !           550: dnl
        !           551: dnl  The list of files to generate.
        !           552: dnl
        !           553: AC_OUTPUT(
        !           554:     Makefile
        !           555:     build/Makefile
        !           556:     build/rpm/Makefile
        !           557:     build/rpm/rpm.spec
        !           558:     fam/Makefile
        !           559:     fam/fam.conf
        !           560:     include/Makefile
        !           561:     libfam/Makefile
        !           562:     man/Makefile
        !           563:     man/fam.1m
        !           564:     support/Makefile
        !           565:     test/Makefile
        !           566:     util/Makefile
        !           567:     util/editconf/Makefile
        !           568: )
        !           569:
        !           570: dnl
        !           571: dnl  fam is a good deal less interesting without imon.
        !           572: dnl
        !           573: if test "$have_imon" != 'yes'; then
        !           574:     cat << EOF
        !           575:
        !           576:   ******************************************************************
        !           577:   *                                                                *
        !           578:   *  Note!  Kernel support for imon was not detected.  fam should  *
        !           579:   *  still work, but it will have to poll monitored filesystems    *
        !           580:   *  instead of receiving file operation events from the kernel.   *
        !           581:   *                                                                *
        !           582:   *  If you think your kernel has imon, see what this script is    *
        !           583:   *  looking for (on Linux, probably /usr/include/linux/imon.h),   *
        !           584:   *  fix the problem (perhaps by adding a link), and run this      *
        !           585:   *  again.  (You probably need to remove config.cache first.)     *
        !           586:   *                                                                *
        !           587:   *  See http://oss.sgi.com/projects/fam/ for more information.    *
        !           588:   *                                                                *
        !           589:   ******************************************************************
        !           590:
        !           591: EOF
        !           592: fi
        !           593:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>