Skip to content

Commit

Permalink
pkgconfig support from Ted Bullock
Browse files Browse the repository at this point in the history
svn:r1177
  • Loading branch information
provos committed Apr 17, 2009
1 parent 0b98781 commit edfc28c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
6 changes: 5 additions & 1 deletion Makefile.am
Expand Up @@ -29,9 +29,13 @@ VERSION_INFO = 2:0:0

bin_SCRIPTS = event_rpcgen.py

pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_DATA=libevent.pc

EXTRA_DIST = \
autogen.sh evdns.3 \
event.3 \
libevent.pc \
Doxyfile \
kqueue.c epoll_sub.c epoll.c select.c poll.c signal.c \
evport.c devpoll.c event_rpcgen.py \
Expand Down Expand Up @@ -131,4 +135,4 @@ doxygen: FORCE
doxygen $(srcdir)/Doxyfile
FORCE:

DISTCLEANFILES = *~ event-config.h
DISTCLEANFILES = *~ event-config.h libevent.pc
9 changes: 5 additions & 4 deletions configure.in
Expand Up @@ -40,10 +40,10 @@ dnl AC_DISABLE_SHARED
AC_SUBST(LIBTOOL_DEPS)

dnl Checks for libraries.
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(resolv, inet_aton)
AC_CHECK_LIB(rt, clock_gettime)
AC_CHECK_LIB(nsl, inet_ntoa)
AC_CHECK_LIB(socket, socket, [AC_SUBST( [LIBSOCKET], ["-lsocket"] )] )
AC_CHECK_LIB(resolv, inet_aton, [AC_SUBST( [LIBRESOLV], ["-lresolv"] )] )
AC_CHECK_LIB(rt, clock_gettime, [AC_SUBST( [LIBRT], ["-lrt"] )] )
AC_CHECK_LIB(nsl, inet_ntoa, [AC_SUBST( [LIBNSL], ["-lnsl"] )] )

dnl Determine if we have zlib for regression tests
ZLIB_LIBS=""
Expand Down Expand Up @@ -453,4 +453,5 @@ if test x$enable_gcc_warnings = xyes; then

fi

AC_CONFIG_FILES( [libevent.pc] )
AC_OUTPUT(Makefile include/Makefile test/Makefile sample/Makefile)
15 changes: 15 additions & 0 deletions libevent.pc.in
@@ -0,0 +1,15 @@
#libevent pkg-config source file

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: libevent
Description: libevent is an asynchronous notification event loop library
Version: @VERSION@
Requires:
Conflicts:
Libs: -L${libdir} -levent @LIBSOCKET@ @LIBRESOLV@ @LIBRT@ @LIBNSL@ @ZLIB_LIBS@
Cflags: -I${includedir}

0 comments on commit edfc28c

Please sign in to comment.