From 53757c9dd5c0a03a0d50d1482025bb3beacde46a Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 23 Feb 2010 23:14:40 -0500 Subject: Use pkg-config. --- .gitignore | 3 +++ configure.ac | 3 ++- src/Makefile.am | 3 +++ src/libsandglass.pc.in | 11 +++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/libsandglass.pc.in diff --git a/.gitignore b/.gitignore index ff0675d..7dabbdf 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,9 @@ Makefile.in # Test executables /tests/*-test +# pkg-config files +*.pc + # Files and folders created by libtool .libs/ *.l[oa] diff --git a/configure.ac b/configure.ac index c767daa..a154ad7 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU Lesser General Public dnl License along with this program. If not, see dnl . -AC_PREREQ(2.63) +AC_PREREQ(2.65) AC_INIT(The Sandglass Library, 0.0, tavianator@gmail.com, libsandglass) AM_INIT_AUTOMAKE(libsandglass, 0.0) @@ -61,5 +61,6 @@ dnl Generate Makefiles AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_FILES([Makefile src/Makefile + src/libsandglass.pc tests/Makefile]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index a91e2b6..2838da8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -39,3 +39,6 @@ if X86_64 endif libsandglass_la_LIBADD = -lrt + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libsandglass.pc diff --git a/src/libsandglass.pc.in b/src/libsandglass.pc.in new file mode 100644 index 0000000..dc2f280 --- /dev/null +++ b/src/libsandglass.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libsandglass +Description: The Sandglass Library +Requires: +Version: @VERSION@ +Libs: -L${libdir} -lsandglass +Cflags: -- cgit v1.2.3