Changeset 8806


Ignore:
Timestamp:
Jul 14, 2009, 6:55:15 PM (13 years ago)
Author:
charles
Message:

(trunk) don't link against -lrt unless libevent needs it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r8790 r8806  
    162162
    163163
     164dnl libevent likes to link against librt if possible
     165dnl for clock_gettime() and clock_settime()
     166dnl TODO(libevent2): this can probably be removed after
     167dnl we switch to libevent2, since it will have PKG_CONFIG
     168AC_CHECK_LIB([rt],
     169             [clock_gettime],
     170             [libevent_extra_libs="-lrt"],
     171             [libevent_extra_libs=""])
     172
    164173dnl build our copy of libevent whether we use it or not,
    165174dnl because "make dist" needs its Makefiles to exist, and
     
    170179             [libevent_found=yes],
    171180             [libevent_found=no],
    172              [-levent])
     181             [$libevent_extra_libs])
    173182AC_CHECK_HEADER([event-config.h],
    174183                [libevent_headers_found=yes],
     
    187196else
    188197    LIBEVENT_CFLAGS=""
    189     LIBEVENT_LIBS="-levent -lrt"
     198    LIBEVENT_LIBS="-levent $libevent_extra_libs"
    190199fi
    191200AC_SUBST(LIBEVENT_CFLAGS)
Note: See TracChangeset for help on using the changeset viewer.