From 3e007b4cb797fb86e7382b8386acd84a172a8083 Mon Sep 17 00:00:00 2001 From: Vicente Adolfo Bolea Sanchez Date: Thu, 4 Jun 2015 21:39:34 +0900 Subject: [PATCH 1/2] Added pkg-config support --- Makefile.am | 3 +++ UnitTest++.pc.in | 11 +++++++++++ configure.ac | 7 ++++--- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 UnitTest++.pc.in diff --git a/Makefile.am b/Makefile.am index aac5b88..2c1b83f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = docs SUBDIRS = UnitTest++ + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = UnitTest++.pc diff --git a/UnitTest++.pc.in b/UnitTest++.pc.in new file mode 100644 index 0000000..9111f96 --- /dev/null +++ b/UnitTest++.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: UnitTest++ +URL: https://github.com/unittest-cpp/unittest-cpp +Description: Simple C++ Unit test library. +Version: @PACKAGE_VERSION@ +Libs: -lUnitTest++ +Cflags: -I${includedir} diff --git a/configure.ac b/configure.ac index 6bdb316..f21fb83 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,12 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ([2.69]) +#AC_PREREQ([2.69]) AC_INIT([UnitTest++], [1.4.1], [pjohnmeyer@gmail.com]) AC_CONFIG_SRCDIR([UnitTest++/TestDetails.cpp]) -AC_CONFIG_MACRO_DIR([m4]) +#AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_FILES([UnitTest++.pc]) AM_INIT_AUTOMAKE([foreign]) LT_INIT() @@ -22,7 +23,7 @@ AC_PROG_CC AC_CHECK_HEADERS([sys/time.h unistd.h setjmp.h signal.h cassert cstddef cstdio cstring exception iosfwd iostream sstream string vector]) # Checks for typedefs, structures, and compiler characteristics. -AC_CHECK_HEADER_STDBOOL +#AC_CHECK_HEADER_STDBOOL AC_C_INLINE AC_TYPE_SIZE_T From c7ddbb04aaad56a4858c3fa95cb916362966c76e Mon Sep 17 00:00:00 2001 From: Vicente Adolfo Bolea Sanchez Date: Thu, 4 Jun 2015 21:45:22 +0900 Subject: [PATCH 2/2] Corrected configure.ac commented lines --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f21fb83..8597777 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,10 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -#AC_PREREQ([2.69]) +AC_PREREQ([2.69]) AC_INIT([UnitTest++], [1.4.1], [pjohnmeyer@gmail.com]) AC_CONFIG_SRCDIR([UnitTest++/TestDetails.cpp]) -#AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([UnitTest++.pc]) @@ -23,7 +23,7 @@ AC_PROG_CC AC_CHECK_HEADERS([sys/time.h unistd.h setjmp.h signal.h cassert cstddef cstdio cstring exception iosfwd iostream sstream string vector]) # Checks for typedefs, structures, and compiler characteristics. -#AC_CHECK_HEADER_STDBOOL +AC_CHECK_HEADER_STDBOOL AC_C_INLINE AC_TYPE_SIZE_T