Skip to content

Commit

Permalink
lib: Add support for pkgconfig for libopenvswitch.
Browse files Browse the repository at this point in the history
Add rule to generate pkgconfig .pc file from configure.
Install pkg-config file to $(libdir)/pkgconfig

Signed-off-by: Rob Adams <readams@readams.net>
Acked-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
readams authored and blp committed Nov 13, 2014
1 parent 534985f commit 81696de
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -124,6 +124,7 @@ Reid Price reid@nicira.com
Remko Tronçon git@el-tramo.be
Rich Lane rlane@bigswitch.com
Rishi Bamba rishi.bamba@tcs.com
Rob Adams readams@readams.net
Rob Hoes rob.hoes@citrix.com
Romain Lenglet romain.lenglet@berabera.info
Ryan Wilson wryan@nicira.com
Expand Down
2 changes: 2 additions & 0 deletions Makefile.am
Expand Up @@ -126,8 +126,10 @@ scripts_SCRIPTS =
scripts_DATA =
SUFFIXES =
check_DATA =
pkgconfig_DATA =

scriptsdir = $(pkgdatadir)/scripts
pkgconfigdir = $(libdir)/pkgconfig

# This ensures that files added to EXTRA_DIST are always distributed,
# even if they are inside an Automake if...endif conditional block that is
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -172,6 +172,7 @@ AC_CONFIG_FILES(datapath/linux/Kbuild)
AC_CONFIG_FILES(datapath/linux/Makefile)
AC_CONFIG_FILES(datapath/linux/Makefile.main)
AC_CONFIG_FILES(tests/atlocal)
AC_CONFIG_FILES(lib/libopenvswitch.pc)

dnl This makes sure that include/openflow gets created in the build directory.
AC_CONFIG_COMMANDS([include/openflow/openflow.h.stamp])
Expand Down
1 change: 1 addition & 0 deletions lib/.gitignore
Expand Up @@ -17,3 +17,4 @@
/vtep-idl.c
/vtep-idl.h
/vtep-idl.ovsidl
/libopenvswitch.pc
3 changes: 3 additions & 0 deletions lib/automake.mk
Expand Up @@ -390,6 +390,9 @@ else
lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
endif

pkgconfig_DATA += \
$(srcdir)/lib/libopenvswitch.pc

EXTRA_DIST += \
lib/dh1024.pem \
lib/dh2048.pem \
Expand Down
11 changes: 11 additions & 0 deletions lib/libopenvswitch.pc.in
@@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: libopenvswitch
Description: Open vSwitch library
Version: @VERSION@
Libs: -L${libdir} -lopenvswitch
Libs.private: @LIBS@
Cflags: -I${includedir}/openvswitch

0 comments on commit 81696de

Please sign in to comment.