]>
Commit | Line | Data |
---|---|---|
8beb9a73 VB |
1 | # |
2 | # lldp_CHECK_LIBEVENT | |
3 | # | |
4 | ||
5 | AC_DEFUN([lldp_CHECK_LIBEVENT], [ | |
1daca827 | 6 | # First, try with pkg-config |
e5c94652 VB |
7 | PKG_CHECK_MODULES([LIBEVENT], [libevent >= 2.0.5], [], [ |
8 | # No appropriate version, let's use the shipped copy | |
9 | AC_MSG_NOTICE([using shipped libevent]) | |
10 | LIBEVENT_CFLAGS="-I\$(top_srcdir)/libevent/include -I\$(top_builddir)/libevent/include" | |
e5c94652 VB |
11 | LIBEVENT_LDFLAGS="\$(top_builddir)/libevent/libevent.la" |
12 | ]) | |
1daca827 | 13 | |
e5c94652 | 14 | # Override configure arguments |
ee715bf2 VB |
15 | ac_configure_args="$ac_configure_args --disable-libevent-regress --disable-thread-support --disable-openssl" |
16 | ac_configure_args="$ac_configure_args --disable-malloc-replacement --disable-debug-mode --enable-function-sections" | |
17 | ac_configure_args="$ac_configure_args --disable-shared --enable-static" | |
ea87eb6d | 18 | AC_CONFIG_SUBDIRS([libevent]) |
e5c94652 | 19 | AM_CONDITIONAL([LIBEVENT_EMBEDDED], [test x"$LIBEVENT_LDFLAGS" != x]) |
75b15cd9 VB |
20 | AC_SUBST([LIBEVENT_LIBS]) |
21 | AC_SUBST([LIBEVENT_CFLAGS]) | |
e5c94652 | 22 | AC_SUBST([LIBEVENT_LDFLAGS]) |
8beb9a73 | 23 | ]) |