[Libreoffice-commits] cppunit.git: doc/Money.dox examples/money
Dimitrij Mijoski
dmjpp at hotmail.com
Fri Sep 15 15:45:01 UTC 2017
doc/Money.dox | 4 ++--
examples/money/Makefile.am | 9 ++++++---
examples/money/configure.ac | 4 ++--
3 files changed, 10 insertions(+), 7 deletions(-)
New commits:
commit 1eaec743d1f1fbb5efeddd19aff07114cf4c7fc9
Author: Dimitrij Mijoski <dmjpp at hotmail.com>
Date: Tue Sep 12 14:09:51 2017 +0200
Fix money example on propely linking with library with PKG_CHECK.
Change-Id: If42a50386402b7a601268cf8db80236c147009c1
Reviewed-on: https://gerrit.libreoffice.org/42206
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/doc/Money.dox b/doc/Money.dox
index d35e8e8..68d5b6d 100644
--- a/doc/Money.dox
+++ b/doc/Money.dox
@@ -69,7 +69,7 @@ hold the code we're going to build. Create \c configure.in and
dnl Process this file with autoconf to produce a configure script.
AC_INIT(Makefile.am)
AM_INIT_AUTOMAKE(money,0.1)
-AM_PATH_CPPUNIT(1.9.6)
+PKG_CHECK_MODULES([CPPUNIT], [cppunit >= 1.11.6])
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
@@ -82,7 +82,7 @@ TESTS = MoneyApp
check_PROGRAMS = $(TESTS)
MoneyApp_SOURCES = Money.h MoneyTest.h MoneyTest.cpp MoneyApp.cpp
MoneyApp_CXXFLAGS = $(CPPUNIT_CFLAGS)
-MoneyApp_LDFLAGS = $(CPPUNIT_LIBS) -ldl\endverbatim
+MoneyApp_LDADD = $(CPPUNIT_LIBS)\endverbatim
diff --git a/examples/money/Makefile.am b/examples/money/Makefile.am
index e55e9c3..f6afb40 100644
--- a/examples/money/Makefile.am
+++ b/examples/money/Makefile.am
@@ -8,6 +8,9 @@ check_PROGRAMS = $(TESTS)
MoneyApp_SOURCES = Money.h MoneyTest.h MoneyTest.cpp MoneyApp.cpp StdAfx.h
MoneyApp_CXXFLAGS = $(CPPUNIT_CFLAGS)
-MoneyApp_LDADD = \
- $(top_builddir)/src/cppunit/libcppunit.la \
- $(CPPUNIT_LIBS) $(LIBADD_DL)
+
+# MoneyApp_LDADD = $(CPPUNIT_LIBS)
+# USE THIS in your projects, not the line bellow
+
+MoneyApp_LDADD = $(top_builddir)/src/cppunit/libcppunit.la
+# this line is needed to build and test CPPUNIT itself.
diff --git a/examples/money/configure.in b/examples/money/configure.ac
similarity index 68%
rename from examples/money/configure.in
rename to examples/money/configure.ac
index 5770e39..a6586e7 100644
--- a/examples/money/configure.in
+++ b/examples/money/configure.ac
@@ -1,9 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
dnl Don't forget to run `aclocal -I /usr/local/share/aclocal` before
-dnl running autoconf! This is required for AM_PATH_CPPUNIT to work.
+dnl running autoconf! This is required for PKG_CHECK_MODULES to work.
AC_INIT(Makefile.am)
AM_INIT_AUTOMAKE(cppunit-cookbook,1.6.2)
-AM_PATH_CPPUNIT(1.6.2)
+PKG_CHECK_MODULES([CPPUNIT], [cppunit >= 1.11.6])
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
More information about the Libreoffice-commits
mailing list