--- configure.in.orig Tue Nov 14 15:42:15 2006 +++ configure.in Sat Nov 18 03:19:57 2006 @@ -1088,6 +1088,21 @@ AC_DEFINE(HAVE_SIG_ATOMIC_T_TYPE,1,[Whether we have the atomic_t variable type]) fi +AC_CACHE_CHECK([for struct sigevent type],samba_cv_struct_sigevent, [ + AC_TRY_COMPILE([ +#include +#if STDC_HEADERS +#include +#include +#endif +#include ],[struct sigevent s;], + samba_cv_struct_sigevent=yes,samba_cv_struct_sigevent=no)]) +if test x"$samba_cv_struct_sigevent" = x"yes"; then + AC_DEFINE(HAVE_STRUCT_SIGEVENT,1,[Whether we have the struct sigevent]) + AC_CHECK_MEMBERS([struct sigevent.sigev_value.sival_ptr,struct sigevent.sigev_value.sigval_ptr], , , + [#include ]) +fi + AC_CACHE_CHECK([for struct timespec type],samba_cv_struct_timespec, [ AC_TRY_COMPILE([ #include @@ -2463,32 +2478,40 @@ # Check if FAM notifications are available. For FAM info, see # http://oss.sgi.com/projects/fam/ # http://savannah.nongnu.org/projects/fam/ +AC_ARG_ENABLE(fam, +[ --enable-fam Turn on FAM support (default=auto)]) -AC_CHECK_HEADERS(fam.h, [samba_cv_HAVE_FAM_H=yes], [samba_cv_HAVE_FAM_H=no]) -if test x"$samba_cv_HAVE_FAM_H" = x"yes"; then - # On IRIX, libfam requires libC, but other FAM implementations might not - # need it. - AC_CHECK_LIB(fam, FAMOpen2, - [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam"], - [samba_cv_HAVE_LIBFAM=no]) - - if test x"$samba_cv_HAVE_LIBFAM" = x"no" ; then - samba_fam_xtra=-lC - AC_CHECK_LIB_EXT(fam, samba_fam_xtra, FAMOpen2, - [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam -lC"], - [samba_cv_HAVE_LIBFAM=no]) - unset samba_fam_xtra +if test x$enable_fam != xno; then + AC_CHECK_HEADERS(fam.h, [samba_cv_HAVE_FAM_H=yes], [samba_cv_HAVE_FAM_H=no]) + if test x"$samba_cv_HAVE_FAM_H" = x"yes"; then + # On IRIX, libfam requires libC, but other FAM implementations + # might not need it. + AC_CHECK_LIB(fam, FAMOpen2, + [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam"], + [samba_cv_HAVE_LIBFAM=no]) + + if test x"$samba_cv_HAVE_LIBFAM" = x"no" ; then + samba_fam_xtra=-lC + AC_CHECK_LIB_EXT(fam, samba_fam_xtra, FAMOpen2, + [samba_cv_HAVE_LIBFAM=yes; samba_fam_libs="-lfam -lC"], + [samba_cv_HAVE_LIBFAM=no]) + unset samba_fam_xtra + fi fi -fi -if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then - AC_DEFINE(HAVE_FAM_CHANGE_NOTIFY, 1, - [Whether FAM is file notifications are available]) - AC_TRY_COMPILE([#include ], - [FAMCodes code = FAMChanged;], - AC_DEFINE(HAVE_FAM_H_FAMCODES_TYPEDEF, 1, - [Whether fam.h contains a typedef for enum FAMCodes]), - []) + if test x"$samba_cv_HAVE_LIBFAM" = x"yes" ; then + AC_DEFINE(HAVE_FAM_CHANGE_NOTIFY, 1, + [Whether FAM file notifications are available]) + AC_TRY_COMPILE([#include ], + [FAMCodes code = FAMChanged;], + AC_DEFINE(HAVE_FAM_H_FAMCODES_TYPEDEF, 1, + [Whether fam.h contains a typedef for enum FAMCodes]), + []) + fi + + if test x$enable_fam = xyes && test x"$samba_cv_HAVE_LIBFAM" != xyes ; then + AC_MSG_ERROR(FAM support requested but FAM library not available ) + fi fi #################################################