diff --git a/Makefile.am b/Makefile.am index 654b3a2..30754f0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ ACLOCAL_AMFLAGS = -I m4 # libtool library definition lib_LTLIBRARIES = libtest.la libtest_la_SOURCES = src/test.h src/test.c -libtest_la_LDFLAGS = -version-info 0:0:0 +libtest_la_LDFLAGS = -version-info 0:9:0 bin_PROGRAMS = main_executable @@ -18,6 +18,10 @@ main_executable_LDFLAGS = $(CODE_COVERAGE_LDFLAGS) +pkgconfig_DATA = libtest.pc + + + # Tests # 'check' comes from 'make check' diff --git a/configure.ac b/configure.ac index 44d6183..3a7c5f1 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,7 @@ AC_PROG_CC_C99 # C99 standard AC_PROG_INSTALL AC_PROG_CC_C_O # Need to have per product flags myexecutable_CFLAG AC_PROG_LIBTOOL # libtool init +PKG_INSTALLDIR # Checks for header files. AC_HEADER_ASSERT # ./configure --disable-assert to define NDEBUG @@ -35,7 +36,7 @@ if test "x${enable_myerror}" == "xyes"; then ]) fi -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile libtest.pc]) AC_REQUIRE_AUX_FILE([tap-driver.sh]) AX_VALGRIND_CHECK # http://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html - make check-valgrind AX_CODE_COVERAGE # http://www.gnu.org/software/autoconf-archive/ax_code_coverage.html#ax_code_coverage - make check-code-coverage generates coverage report diff --git a/libtest.pc b/libtest.pc new file mode 100644 index 0000000..7f4d6b7 --- /dev/null +++ b/libtest.pc @@ -0,0 +1,13 @@ +prefix=/home/vasek/ll +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: test_automake_shared +Description: test_automake_shared 0.9.1 +Version: 0.9.1 + +Requires: +Cflags: -I${includedir} +Libs: -L${libdir} -llibtest + diff --git a/libtest.pc.in b/libtest.pc.in new file mode 100644 index 0000000..aeb0c9b --- /dev/null +++ b/libtest.pc.in @@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: @PACKAGE_NAME@ +Description: @PACKAGE_STRING@ +Version: @PACKAGE_VERSION@ + +Requires: +Cflags: -I${includedir} +Libs: -L${libdir} -llibtest +