diff --git a/configure.ac b/configure.ac index 47712deb..e9517115 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,7 @@ AM_INIT_AUTOMAKE([-Wall -Werror dist-bzip2 subdir-objects]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_MACRO_DIR([m4]) +PKG_INSTALLDIR() #------------------------------------------------------------------------------ # Global @@ -1112,6 +1113,7 @@ AC_CONFIG_FILES([ examples/xenomai_posix/Makefile include/Makefile lib/Makefile + lib/libethercat.pc m4/Makefile master/Kbuild master/Makefile diff --git a/lib/Makefile.am b/lib/Makefile.am index 764e6b6a..d0cb1bd6 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -73,6 +73,8 @@ libethercat_la_CFLAGS = -fno-strict-aliasing -Wall -I$(top_srcdir) # libethercat_la_LDFLAGS = -version-info 2:0:1 +pkgconfig_DATA = libethercat.pc + #------------------------------------------------------------------------------ if ENABLE_RTDM diff --git a/lib/libethercat.pc.in b/lib/libethercat.pc.in new file mode 100644 index 00000000..54a20b98 --- /dev/null +++ b/lib/libethercat.pc.in @@ -0,0 +1,40 @@ +# +# pkgconfig file for ethercat library +# +# Copyright 2021 Bjarne von Horn (vh at igh dot de) +# +# This file is part of the ethercat library. +# +# The ethercat library is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# The ethercat library is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with the ethercat library. If not, see . +# +# --- +# +# The license mentioned above concerns the source code only. Using the +# EtherCAT technology and brand is only permitted in compliance with the +# industrial property and similar rights of Beckhoff Automation GmbH. +# +# vim: tw=78 noexpandtab +# + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libethercat +Description: Client support library for the EtherCAT Master +URL: http://www.etherlab.org +Version: @VERSION@ +Libs: -L${libdir} -lethercat +Cflags: -I${includedir}