diff --git a/Makefile.am b/Makefile.am index a331fabf..3c5bbd46 100644 --- a/Makefile.am +++ b/Makefile.am @@ -47,6 +47,13 @@ libcoap_la_SOURCES = \ ## file (.so). This will be changed later to a substituted version via variables. libcoap_la_LDFLAGS = -version-info 0 +## Install the generated pkg-config file (.pc) into the expected location for +## architecture-dependent package configuration information. Occasionally, +## pkg-config files are also used for architecture-independent data packages, +## in which case the correct install location would be $(datadir)/pkgconfig. +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libcoap.pc + ## Define an independent executable script for inclusion in the distribution ## archive. However, it will not be installed on an end user's system due to ## the noinst_ prefix. diff --git a/configure.ac b/configure.ac index 4fac3b55..e129c361 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,7 @@ AC_CHECK_FUNCS([memset select socket strcasecmp strrchr getaddrinfo \ # Override the various template files, currently just makefiles. AC_CONFIG_FILES([ Makefile +libcoap.pc:libcoap.pc.in include/Makefile]) AC_OUTPUT diff --git a/libcoap.pc.in b/libcoap.pc.in new file mode 100644 index 00000000..4a031891 --- /dev/null +++ b/libcoap.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: @PACKAGE_NAME@ +Description: C-Implementation of CoAP. +Version: @PACKAGE_VERSION@ +URL: @PACKAGE_URL@ +Libs: -L${libdir} -lcoap +Cflags: -I${includedir}/coap