Skip to content

Commit b6d49e4

Browse files
authored
Merge pull request #1872 from thetic/dont_have_config_h
Rename HAVE_CONFIG_H
2 parents 76cf73e + 7f9c245 commit b6d49e4

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

Makefile.am

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ EXTRA_PROGRAMS = CppUTestExtTests
1010
lib_LIBRARIES = lib/libCppUTest.a
1111
check_PROGRAMS = $(CPPUTEST_TESTS)
1212

13+
# HACK: Replace the HAVE_CONFIG_H macro with CPPUTEST_HAVE_GENERATED_CONFIG_H.
14+
# The name HAVE_CONFIG_H is a hard-coded in autoconf and cannot be changed in
15+
# any "normal" ways. This isn't typically a problem, but CppUTest exposes the
16+
# macro in its public headers. This leads to collisions with any other projects
17+
# built with autoconf.
18+
DEFS = $(filter-out -DHAVE_CONFIG_H,@DEFS@) -DCPPUTEST_HAVE_GENERATED_CONFIG_H
19+
1320
if INCLUDE_CPPUTEST_EXT
1421
lib_LIBRARIES+= lib/libCppUTestExt.a
1522
check_PROGRAMS += $(CPPUTESTEXT_TESTS)

include/CppUTest/CppUTestGeneratedConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
*
4242
*/
4343

44-
#ifdef HAVE_CONFIG_H
44+
#ifdef CPPUTEST_HAVE_GENERATED_CONFIG_H
4545
#include "generated/CppUTestGeneratedConfig.h"
4646
#endif
4747

0 commit comments

Comments
 (0)