dnl ------------------------------------------------------------------------ dnl Try to find if FAM is installed dnl ------------------------------------------------------------------------ dnl kde_have_fam=yes AC_ARG_ENABLE(libfam, AC_HELP_STRING([--disable-libfam],[don't search for libfam and do not use it]), [ kde_have_fam=$enableval ], [])dnl dnl Bloody libfam is C++ and certainly compiled by GNU C++. This means, dnl we can't use it, when compiling with another C++ compiler, as the dnl runtime systems would conflict (e.g. in KAI C++) (matz) test "$GXX" = yes || kde_have_fam=no if test "$kde_have_fam" = "yes" ; then AC_LANG_SAVE AC_LANG_CPLUSPLUS KDE_CHECK_LIB(fam, FAMOpen, [LIBFAM="-lfam"; kde_have_fam=yes],kde_have_fam=no) if test $kde_have_fam = yes; then AC_DEFINE_UNQUOTED(HAVE_FAM, 1, [Define if your system has libfam]) fi AC_LANG_RESTORE fi AC_SUBST(LIBFAM) dnl ------------------------------------------------------------------------ dnl Try to find if LIBZ is installed dnl ------------------------------------------------------------------------ dnl AC_FIND_ZLIB AC_CHECK_HEADERS(sys/mnttab.h sys/mntent.h mntent.h fstab.h sys/ucred.h sys/mount.h) AC_CHECK_FUNCS(setmntent getmntinfo) AH_VERBATIM(_GETMNTINFO, [ #ifdef __osf__ #ifdef __cplusplus extern "C" { #endif #include int getmntinfo(struct statfs **mntbufp, int flags); #include /* for mnt_names[] */ #ifdef __cplusplus } #endif #endif ]) dnl ------------------------------------------------------------------------ dnl Try to find if libvolmgt is installed (Solaris) dnl ------------------------------------------------------------------------ kde_have_volmgt=yes AC_CHECK_LIB(volmgt, volmgt_running, [LIBVOLMGT=-lvolmgt], kde_have_volmgt=no) AC_SUBST(LIBVOLMGT) if test "$kde_have_volmgt" = "yes"; then AC_DEFINE_UNQUOTED(HAVE_VOLMGT, 1, [Define, to enable volume management (Solaris 2.x), if you have -lvolmgt]) fi dnl ------------------------------------------------------------------------ dnl Try to find if we have Linux Dir Notification dnl ------------------------------------------------------------------------ AC_ARG_ENABLE(dnotify, AC_HELP_STRING([--enable-dnotify],[enable use of Linux directory notifications]), [ kde_enable_dnotify=$enableval ], [])dnl if test "x$kde_enable_dnotify" = "xyes"; then AC_MSG_CHECKING([for Linux Directory Notification]) AC_CACHE_VAL(kde_cv_have_dnotify, [ kde_cv_have_dnotify=no AC_LANG_SAVE AC_LANG_C AC_TRY_COMPILE( [ #include #include ], [ #ifndef F_NOTIFY #error no dir notification #endif int fd; siginfo_t *t = 0; fcntl(fd, F_SETSIG, SIGRTMIN); fcntl(fd, F_NOTIFY, DN_DELETE|DN_CREATE|DN_MULTISHOT); ],kde_cv_have_dnotify=yes) AC_LANG_RESTORE ]) if test "$kde_cv_have_dnotify" = "yes" ; then AC_DEFINE_UNQUOTED(HAVE_DNOTIFY, 1, [Define if your system has Linux Directory Notification]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fi dnl ------------------------------------------------------------------------ dnl Try to find if we have Linux Inode based Dir Notification dnl ------------------------------------------------------------------------ AC_ARG_ENABLE(inotify, AC_HELP_STRING([--disable-inotify],[enable use of Linux inode notifications]), [ kde_enable_inotify=$enableval ], [kde_enable_inotify=yes])dnl if test "x$kde_enable_inotify" = "xyes"; then AC_MSG_CHECKING([for Linux Inotify Notification]) AC_CACHE_VAL(kde_cv_have_inotify, [ kde_cv_have_inotify=no AC_LANG_SAVE AC_LANG_C AC_TRY_COMPILE( [ #include #define _S390_BITOPS_H #include ], [ #ifndef IN_ALL_EVENTS #error no inotify notification #endif ],kde_cv_have_inotify=yes,kde_cv_have_inotify=no) AC_LANG_RESTORE ]) AC_CACHE_VAL(kde_cv_have_sys_inotify, [ kde_cv_have_sys_inotify=no AC_LANG_SAVE AC_LANG_C AC_TRY_COMPILE( [ #include ], [ #ifndef IN_ALL_EVENTS #error no inotify notification #endif ],kde_cv_have_sys_inotify=yes,kde_cv_have_sys_inotify=no) AC_LANG_RESTORE ]) if test "$kde_cv_have_inotify" = "yes" -o "$kde_cv_have_sys_inotify" = "yes"; then AC_DEFINE_UNQUOTED(HAVE_INOTIFY, 1, [Define if your system has Linux Inode Notification]) if test "$kde_cv_have_sys_inotify" = "yes"; then AC_DEFINE_UNQUOTED(HAVE_SYS_INOTIFY, 1, [Define if your system has glibc support for inotify]) fi AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi fi dnl ------------------------------------------------------------------------ dnl Try to find if libmagic is installed and contains magic_getpath dnl ------------------------------------------------------------------------ dnl AC_MSG_CHECKING([for libmagic]) KDE_CHECK_LIB(magic, magic_load, kde_have_libmagic=yes, kde_have_libmagic=no) if test $kde_have_libmagic = yes; then AC_MSG_RESULT(yes) AC_MSG_CHECKING([for libmagic - magic_getpath]) KDE_CHECK_LIB(magic, magic_getpath, kde_have_libmagic_getpath=yes, kde_have_libmagic_getpath=no) if test $kde_have_libmagic_getpath = yes; then AC_DEFINE_UNQUOTED(HAVE_LIBMAGIC_GETPATH, 1, [Defined if libmagic contain magic_getpath function]) AC_MSG_RESULT(yes) else libmagic_path=`file --version 2>&1 | sed -n "s/^magic file from //p"` AC_DEFINE_UNQUOTED(LIBMAGIC_PATH, $libmagic_path, [Define default path for libmagic files]) AC_MSG_RESULT(no) fi else AC_MSG_RESULT(no) fi