From f26d57419cb22078fbcf3c81c4a64173d22372c9 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Fri, 23 Mar 2018 16:14:00 +0100 Subject: [PATCH] add a pkg-config file for libdice --- Makefile.am | 2 ++ configure.ac | 5 ++++- libdice.pc.in | 12 ++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 libdice.pc.in diff --git a/Makefile.am b/Makefile.am index 437062c..c8343a3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,4 +14,6 @@ AM_CFLAGS = -Ilib libdice_la_LIBADD = ${BSD_LIBS} +pkgconfig_DATA = libdice.pc + SUBDIRS = . tests diff --git a/configure.ac b/configure.ac index 7e83bcc..2cfa48e 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ PKG_CHECK_MODULES([CMOCKA], [cmocka >= 1.0.1]) AC_CHECK_HEADER_STDBOOL() -AC_CHECK_FUNCS([arc4random arc4random_uniform strlcat strlcpy],, +AC_CHECK_FUNCS([arc4random_uniform],, [PKG_CHECK_MODULES([BSD], [libbsd])]) AC_CONFIG_FILES([Makefile tests/Makefile]) @@ -22,4 +22,7 @@ AC_SEARCH_LIBS([cos], [m], [], [ AC_MSG_ERROR([unable to find the cos() function]) ]) +PKG_INSTALLDIR +AC_CONFIG_FILES([libdice.pc]) + AC_OUTPUT diff --git a/libdice.pc.in b/libdice.pc.in new file mode 100644 index 0000000..572fe09 --- /dev/null +++ b/libdice.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libdice +Description: dice rolling and math expression library +Version: 0.1 +Requires: +Conflicts: +Cflags: -I${includedir} +Libs: -L${libdir} -ldice