Changeset 7973 for trunk/configure.ac


Ignore:
Timestamp:
Feb 28, 2009, 2:43:37 PM (13 years ago)
Author:
charles
Message:

better configure-time checking for inotify & kqueue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r7971 r7973  
    100100
    101101AC_SYS_LARGEFILE
     102
     103
     104dnl ----------------------------------------------------------------------------
     105dnl
     106dnl  third_party/FilewWatcher tests: look for inotify and kqueue
     107
     108AC_CHECK_HEADER([sys/inotify.h],
     109                [AC_CHECK_FUNC([inotify_init],[have_inotify="yes"],[have_inotify="no"])],
     110                [have_inotify="no"])
     111AC_ARG_WITH([inotify],
     112            [AS_HELP_STRING([--with-inotify],[Enable inotify support (default=auto)])],
     113            [want_inotify=${enableval}],
     114            [want_inotify=${have_inotify}])
     115if test "x$want_inotify" = "xyes" ; then
     116    if test "x$have_inotify" = "xyes"; then
     117      AC_DEFINE([WITH_INOTIFY],[1])
     118    else
     119      AC_MSG_ERROR("inotify not found!")
     120    fi
     121fi
     122
     123AC_CHECK_HEADER([sys/event.h],
     124                [AC_CHECK_FUNC([kqueue],[have_kqueue="yes"],[have_kqueue="no"])],
     125                [have_kqueue="no"])
     126AC_ARG_WITH([kqueue],
     127            [AS_HELP_STRING([--with-kqueue],[Enable kqueue support (default=auto)])],
     128            [want_kqueue=${enableval}],
     129            [want_kqueue=${have_kqueue}])
     130if test "x$want_kqueue" = "xyes" ; then
     131    if test "x$have_kqueue" = "xyes"; then
     132      AC_DEFINE([WITH_KQUEUE],[1])
     133    else
     134      AC_MSG_ERROR("kqueue not found!")
     135    fi
     136fi
    102137
    103138
Note: See TracChangeset for help on using the changeset viewer.