Index: libcwiid/Makefile.in =================================================================== --- libcwiid/Makefile.in (revision 152) +++ libcwiid/Makefile.in (working copy) @@ -10,6 +10,7 @@ LDLIBS += -lbluetooth -lpthread -lrt LIB_INST_DIR = @libdir@ INC_INST_DIR = @includedir@ +PKG_CONFIG_INST_DIR = @libdir@/pkgconfig include $(COMMON)/include/lib.mak Index: libcwiid/cwiid.pc.in =================================================================== --- libcwiid/cwiid.pc.in (revision 0) +++ libcwiid/cwiid.pc.in (revision 0) @@ -0,0 +1,14 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +sysconfdir=@sysconfdir@ +cwiid_config_dir=@CWIID_CONFIG_DIR@ +cwiid_plugins_dir=@CWIID_PLUGINS_DIR@ + +Name: CWiid +Description: CWiid Wiimote Interface +Version: @PACKAGE_VERSION@ +Requires: bluez +Libs: -L${libdir} -lcwiid +Cflags: -I${includedir} Index: common/include/lib.mak.in =================================================================== --- common/include/lib.mak.in (revision 152) +++ common/include/lib.mak.in (working copy) @@ -7,8 +7,10 @@ LINK_NAME = lib$(LIB_NAME).so SO_NAME = $(LINK_NAME).$(MAJOR_VER) SHARED_LIB = $(SO_NAME).$(MINOR_VER) +PKG_CONFIG_FILE = $(LIB_NAME).pc DEST_INC_INST_DIR = $(ROOTDIR)$(INC_INST_DIR) DEST_LIB_INST_DIR = $(ROOTDIR)$(LIB_INST_DIR) +DEST_PKG_CONFIG_INST_DIR = $(ROOTDIR)$(PKG_CONFIG_INST_DIR) OBJECTS = $(SOURCES:.c=.o) DEPS = $(SOURCES:.c=.d) @@ -28,7 +30,7 @@ $(CC) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) $(LDLIBS) \ -o $(SHARED_LIB) $(OBJECTS) -install: install_header install_static install_shared +install: install_header install_static install_shared install_pkgconfig install_header: install -D $(LIB_NAME).h $(DEST_INC_INST_DIR)/$(LIB_NAME).h @@ -42,6 +44,9 @@ ln -sf $(SO_NAME) $(DEST_LIB_INST_DIR)/$(LINK_NAME) $(LDCONFIG) +install_pkgconfig: + install -D $(PKG_CONFIG_FILE) $(DEST_PKG_CONFIG_INST_DIR)/$(PKG_CONFIG_FILE) + clean: rm -f $(STATIC_LIB) $(SHARED_LIB) $(OBJECTS) $(DEPS) Index: configure.ac =================================================================== --- configure.ac (revision 152) +++ configure.ac (working copy) @@ -136,6 +136,7 @@ [doc/Makefile] [man/Makefile] [libcwiid/Makefile] + [libcwiid/cwiid.pc] [wmdemo/Makefile] [wmgui/Makefile] [wminput/Makefile]