Changeset 8600 for trunk/configure.ac


Ignore:
Timestamp:
Jun 3, 2009, 4:31:43 PM (13 years ago)
Author:
charles
Message:

(trunk) if libevent exists on the system, use it. otherwise, use our own copy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r8599 r8600  
    167167
    168168
    169 dnl let's try using the system's libevent now
    170 dnl
    171 dnl ----------------------------------------------------------------------------
    172 dnl
    173 dnl  libevent fun
    174 dnl
    175 dnl  we have to add the builddir into the include path because event-config.h
    176 dnl  is generated when libevent is build
    177 dnl
    178 dnl AC_CONFIG_SUBDIRS([third-party/libevent])
    179 dnl AC_MSG_NOTICE([invoking libevent's configure script])
    180 dnl LIBEVENT_CPPFLAGS="-I\$(top_srcdir)/third-party/libevent -I\$(top_builddir)/third-party/libevent"
    181 dnl AC_SUBST(LIBEVENT_CPPFLAGS)
    182 
    183 LIBEVENT_LIBS="-levent"
     169AC_CHECK_HEADER([event-config.h],
     170                [libevent_source=system
     171                 LIBEVENT_CPPFLAGS=""
     172                 LIBEVENT_LIBS="-levent"],
     173                [libevent_source=bundled
     174                 AC_CONFIG_SUBDIRS([third-party/libevent])
     175                 AC_MSG_NOTICE([libevent not found on system, so we'll build our own from third-party/libevent/.])
     176                 AC_MSG_NOTICE([if you are cross-compiling this is probably not what you want.])
     177                 LIBEVENT_CPPFLAGS="-I\$(top_srcdir)/third-party/libevent -I\$(top_builddir)/third-party/libevent"
     178                 LIBEVENT_LIBS="\$(top_builddir)/third-party/libevent/.libs/libevent.a"
     179                 AC_SUBST(LIBEVENT_CPPFLAGS)])
     180AM_CONDITIONAL([BUILD_LIBEVENT], [test x$libevent_source = xbundled])
     181AC_SUBST(LIBEVENT_CPPFLAGS)
    184182AC_SUBST(LIBEVENT_LIBS)
    185183
     
    378376Configuration:
    379377
    380         Source code location:       ${srcdir}
    381         Compiler:                   ${CXX}
    382         Build Command-Line client:  ${build_cli}
    383         Build Daemon:               ${build_daemon}
    384         Build GTK+ client:          ${build_gtk}
    385           ... gio support:          ${use_gio}
    386           ... dbus-glib support:    ${use_dbus_glib}
    387           ... libnotify support:    ${use_libnotify}
    388         Build OS X client:          ${build_mac}
     378        Source code location:          ${srcdir}
     379        Compiler:                      ${CXX}
     380        System or bundled libevent:    ${libevent_source}
     381
     382        Build OS X client:             ${build_mac}
     383        Build GTK+ client:             ${build_gtk}
     384          ... with gio support:        ${use_gio}
     385          ... with dbus-glib support:  ${use_dbus_glib}
     386          ... with libnotify support:  ${use_libnotify}
     387        Build Command-Line client:     ${build_cli}
     388        Build Daemon:                  ${build_daemon}
    389389
    390390"
Note: See TracChangeset for help on using the changeset viewer.