package/ti-sgx-um: fix Config.in
[buildroot-gz.git] / package / liblog4c-localtime / 0005-Fix-C-support.patch
blob6ba25c36ff84b266284d5470436e4035737cdc3b
1 From bdccec4c374a93480a7fd303d15e20810a5d5b7e Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Sat, 25 Oct 2014 21:22:40 +0200
4 Subject: [PATCH 5/5] Fix C++ support
6 Autoreconf fails with the following message:
8 tests/log4c/Makefile.am: error: C++ source seen but 'CXX' is undefined
10 So this commit adds the AC_PROG_CXX macro to configure.in, and ensures
11 that the C++ test is only built if a C++ compiler is available.
13 Submitted upstream: https://github.com/rcmadruga/log4c-localtime/pull/1
15 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
16 ---
17 configure.in | 3 +++
18 tests/log4c/Makefile.am | 6 +++++-
19 2 files changed, 8 insertions(+), 1 deletion(-)
21 diff --git a/configure.in b/configure.in
22 index 769b204..ce75800 100644
23 --- a/configure.in
24 +++ b/configure.in
25 @@ -38,6 +38,7 @@ AC_DEFINE(_GNU_SOURCE,1,"POSIXandGNU extensions")
27 AC_PROG_YACC
28 AC_PROG_CC
29 +AC_PROG_CXX
30 AC_PROG_CPP
31 AM_PROG_LEX
32 AC_PROG_AWK
33 @@ -47,6 +48,8 @@ AC_PROG_MAKE_SET
34 AC_PROG_RANLIB
35 AC_PROG_LIBTOOL
37 +AM_CONDITIONAL([USE_CXX], [test "$ac_cv_prog_CXX" != "no"])
39 # platform idioms
40 case "$host" in
41 *-hp-hpux*)
42 diff --git a/tests/log4c/Makefile.am b/tests/log4c/Makefile.am
43 index f647f27..b1b4ed6 100644
44 --- a/tests/log4c/Makefile.am
45 +++ b/tests/log4c/Makefile.am
46 @@ -3,7 +3,11 @@ INCLUDES = \
47 -DSRCDIR="\"$(srcdir)\""
49 noinst_PROGRAMS = test_category test_rc bench bench_fwrite \
50 - test_stream2 test_layout_r cpp_compile_test
51 + test_stream2 test_layout_r
53 +if USE_CXX
54 +noinst_PROGRAMS += cpp_compile_test
55 +endif
57 if WITH_ROLLINGFILE
58 noinst_PROGRAMS += test_rollingfile_appender test_rollingfile_appender_mt
59 --
60 2.0.0