Apply upstream patch http://sourceforge.net/p/plplot/bugs/146/ to fix conflicting macros in installed header files. diff -Nur plplot-5.10.0.orig/CMakeLists.txt plplot-5.10.0/CMakeLists.txt --- plplot-5.10.0.orig/CMakeLists.txt 2014-04-07 09:51:53.732857993 -0700 +++ plplot-5.10.0/CMakeLists.txt 2014-04-07 09:54:03.739699328 -0700 @@ -125,7 +125,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/plplot_config.h ) # Allow access to the generated plplot_config.h for this build. -add_definitions("-DHAVE_CONFIG_H") +add_definitions("-DPLPLOT_HAVE_CONFIG_H") # Install top-level files # Enable testing framework for examples diff -Nur plplot-5.10.0.orig/bindings/ocaml/CMakeLists.txt plplot-5.10.0/bindings/ocaml/CMakeLists.txt --- plplot-5.10.0.orig/bindings/ocaml/CMakeLists.txt 2014-04-07 09:51:53.629857267 -0700 +++ plplot-5.10.0/bindings/ocaml/CMakeLists.txt 2014-04-07 09:54:03.934700592 -0700 @@ -99,7 +99,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/dllplplot_stubs.so ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a COMMAND ${OCAMLC} -ccopt -I${CAMLIDL_LIB_DIR} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c - COMMAND ${OCAMLC} -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime -ccopt -I${CMAKE_BINARY_DIR} -ccopt -I${CAMLIDL_LIB_DIR} -ccopt -DHAVE_CONFIG_H -c ${CMAKE_CURRENT_SOURCE_DIR}/plplot_impl.c + COMMAND ${OCAMLC} -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime -ccopt -I${CMAKE_BINARY_DIR} -ccopt -I${CAMLIDL_LIB_DIR} -ccopt -DPLPLOT_HAVE_CONFIG_H -c ${CMAKE_CURRENT_SOURCE_DIR}/plplot_impl.c COMMAND ${OCAMLMKLIB} -o plplot_stubs -L${CAMLIDL_LIB_DIR} -lcamlidl -L${CMAKE_BINARY_DIR}/src -lplplot${LIB_TAG} ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.o ${CMAKE_CURRENT_BINARY_DIR}/plplot_impl.o ${ocaml_STATIC_FLAGS} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c diff -Nur plplot-5.10.0.orig/bindings/ocaml/plcairo/CMakeLists.txt plplot-5.10.0/bindings/ocaml/plcairo/CMakeLists.txt --- plplot-5.10.0.orig/bindings/ocaml/plcairo/CMakeLists.txt 2014-04-07 09:51:53.629857267 -0700 +++ plplot-5.10.0/bindings/ocaml/plcairo/CMakeLists.txt 2014-04-07 09:54:03.934700592 -0700 @@ -36,7 +36,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/plcairo_impl.o ${CMAKE_CURRENT_BINARY_DIR}/dllplcairo_stubs.so ${CMAKE_CURRENT_BINARY_DIR}/libplcairo_stubs.a - COMMAND ${OCAMLC} -ccopt "${CAIRO_COMPILE_FLAGS}" -cclib "${CAIRO_LINK_FLAGS}" -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime -ccopt -I${CMAKE_BINARY_DIR} -ccopt -DHAVE_CONFIG_H -c ${CMAKE_CURRENT_SOURCE_DIR}/plcairo_impl.c + COMMAND ${OCAMLC} -ccopt "${CAIRO_COMPILE_FLAGS}" -cclib "${CAIRO_LINK_FLAGS}" -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime -ccopt -I${CMAKE_BINARY_DIR} -ccopt -DPLPLOT_HAVE_CONFIG_H -c ${CMAKE_CURRENT_SOURCE_DIR}/plcairo_impl.c COMMAND ${OCAMLMKLIB} -o plcairo_stubs ${CAIRO_LINK_FLAGS_LIST} -L${CMAKE_BINARY_DIR}/src -lplplot${LIB_TAG} ${CMAKE_CURRENT_BINARY_DIR}/plcairo_impl.o DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/plcairo_impl.c diff -Nur plplot-5.10.0.orig/doc/doxygen/html/plConfig_8h_source.html plplot-5.10.0/doc/doxygen/html/plConfig_8h_source.html --- plplot-5.10.0.orig/doc/doxygen/html/plConfig_8h_source.html 2014-04-07 09:51:53.712857853 -0700 +++ plplot-5.10.0/doc/doxygen/html/plConfig_8h_source.html 2014-04-07 09:54:03.935700600 -0700 @@ -136,7 +136,7 @@
30 // any user applications). Therefore, the configured plConfig.h
31 // should be installed. In contrast, plplot_config.h.in (note,
32 // plConfig.h #includes plplot_config.h for the core build because
-
33 // HAVE_CONFIG_H is #defined in that case) contains configured macros
+
33 // PLPLOT_HAVE_CONFIG_H is #defined in that case) contains configured macros
34 // that are only required for the core build. Therefore, in contrast
35 // to plConfig.h, plplot_config.h should not be installed.
36 //
@@ -150,7 +150,7 @@
44 #ifndef __PLCONFIG_H__
45 #define __PLCONFIG_H__
46 
-
47 #ifdef HAVE_CONFIG_H
+
47 #ifdef PLPLOT_HAVE_CONFIG_H
48 # include <plplot_config.h>
49 #endif
50 
diff -Nur plplot-5.10.0.orig/doc/doxygen/html/plplot__config_8h_source.html plplot-5.10.0/doc/doxygen/html/plplot__config_8h_source.html --- plplot-5.10.0.orig/doc/doxygen/html/plplot__config_8h_source.html 2014-04-07 09:51:53.708857825 -0700 +++ plplot-5.10.0/doc/doxygen/html/plplot__config_8h_source.html 2014-04-07 09:54:03.935700600 -0700 @@ -109,7 +109,7 @@
3 // examples (and presumably any user applications). Therefore, the
4 // configured plplot_config.h should not be installed. In contrast,
5 // include/plConfig.h.in (note, the configured plConfig.h result
-
6 // #includes plplot_config.h for the core build because HAVE_CONFIG_H
+
6 // #includes plplot_config.h for the core build because PLPLOT_HAVE_CONFIG_H
7 // is #defined in that case) contains configured macros that are
8 // required for the core build, installed examples build, and build of
9 // user applications. Therefore, in contrast to plplot_config.h,
diff -Nur plplot-5.10.0.orig/examples/CMakeLists.txt plplot-5.10.0/examples/CMakeLists.txt --- plplot-5.10.0.orig/examples/CMakeLists.txt 2014-04-07 09:51:53.610857133 -0700 +++ plplot-5.10.0/examples/CMakeLists.txt 2014-04-07 09:54:03.938700634 -0700 @@ -414,7 +414,7 @@ endif(CORE_BUILD) if(CORE_BUILD AND BUILD_TEST) - remove_definitions("-DHAVE_CONFIG_H") + remove_definitions("-DPLPLOT_HAVE_CONFIG_H") endif(CORE_BUILD AND BUILD_TEST) # Decide on device to be used for generic interactive tests. diff -Nur plplot-5.10.0.orig/include/plConfig.h.in plplot-5.10.0/include/plConfig.h.in --- plplot-5.10.0.orig/include/plConfig.h.in 2014-04-07 09:51:53.616857175 -0700 +++ plplot-5.10.0/include/plConfig.h.in 2014-04-07 09:54:03.938700634 -0700 @@ -30,7 +30,7 @@ // any user applications). Therefore, the configured plConfig.h // should be installed. In contrast, plplot_config.h.in (note, // plConfig.h #includes plplot_config.h for the core build because -// HAVE_CONFIG_H is #defined in that case) contains configured macros +// PLPLOT_HAVE_CONFIG_H is #defined in that case) contains configured macros // that are only required for the core build. Therefore, in contrast // to plConfig.h, plplot_config.h should not be installed. // @@ -44,7 +44,7 @@ #ifndef __PLCONFIG_H__ #define __PLCONFIG_H__ -#ifdef HAVE_CONFIG_H +#ifdef PLPLOT_HAVE_CONFIG_H # include #endif diff -Nur plplot-5.10.0.orig/plplot_config.h.in plplot-5.10.0/plplot_config.h.in --- plplot-5.10.0.orig/plplot_config.h.in 2014-04-07 09:51:53.732857993 -0700 +++ plplot-5.10.0/plplot_config.h.in 2014-04-07 09:54:03.938700634 -0700 @@ -3,7 +3,7 @@ // examples (and presumably any user applications). Therefore, the // configured plplot_config.h should not be installed. In contrast, // include/plConfig.h.in (note, the configured plConfig.h result -// #includes plplot_config.h for the core build because HAVE_CONFIG_H +// #includes plplot_config.h for the core build because PLPLOT_HAVE_CONFIG_H // is #defined in that case) contains configured macros that are // required for the core build, installed examples build, and build of // user applications. Therefore, in contrast to plplot_config.h,