]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Detect missing cppunit/extensions/HelperMacros.h for compat
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 24 Oct 2011 01:15:17 +0000 (14:15 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 24 Oct 2011 01:15:17 +0000 (14:15 +1300)
compat/cppunit.h
configure.ac

index 4ae60b66e4f96f8cc622107549fe21b05c99cae5..55ba6581d11954a66db06feef9a61e26a1e4241d 100644 (file)
@@ -3,6 +3,7 @@
 
 // CPPUNIT test suite uses auto_ptr which is deprecated in C++0x
 
+#if HAVE_CPPUNIT_EXTENSIONS_HELPERMACROS_H
 #if defined(__cplusplus) && HAVE_UNIQUE_PTR
 #include <cppunit/extensions/HelperMacros.h>
 
@@ -29,5 +30,5 @@
 
 
 #endif /* HAVE_UNIQUE_PTR */
-
+#endif /* HAVE_CPPUNIT_EXTENSIONS_HELPERMACROS_H */
 #endif /* SQUID_COMPAT_CPPUNIT_H */
index 62ecb0220b2f56033d67def4d8413361340f2fcb..f639126b01f89936313cec220f39b8b96e283f6e 100644 (file)
@@ -2252,6 +2252,10 @@ else
   AC_MSG_ERROR(Cannot find cppunit at $withval)
 fi
 ])
+SQUID_STATE_SAVE(squid_cppunit_state)
+CXXFLAGS="$CXXFLAGS $SQUID_CPPUNIT_INC"
+AC_CHECK_HEADERS(cppunit/extensions/HelperMacros.h)
+SQUID_STATE_ROLLBACK(squid_cppunit_state)
 AC_SUBST(SQUID_CPPUNIT_LIBS)
 AC_SUBST(SQUID_CPPUNIT_LA)
 AC_SUBST(SQUID_CPPUNIT_INC)