Control: tag -1 +patch Hi,
I think the attached patch should fix this. It captures upstream's intention of distinguishing plplot_config.h from any other config.h file by renaming the macro HAVE_CONFIG_H to HAVE_PLPLOT_CONFIG_H. Kind regards, Thibaut.
Description: Rename HAVE_CONFIG_H to HAVE_PLPLOT_CONFIG_H HAVE_CONFIG_H is an ubiquitous macro, using it in plConfig.h to include plplot_config.h (which does not get installed) leads to build failures. Author: Thibaut Paumard <thib...@debian.org> Origin: vendor Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761176 Forwarded: no Last-Update: 2014-09-11 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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("-DHAVE_PLPLOT_CONFIG_H") # Install top-level files # Enable testing framework for examples --- a/bindings/ocaml/CMakeLists.txt +++ b/bindings/ocaml/CMakeLists.txt @@ -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 -DHAVE_PLPLOT_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 --- a/bindings/ocaml/plcairo/CMakeLists.txt +++ b/bindings/ocaml/plcairo/CMakeLists.txt @@ -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 -DHAVE_PLPLOT_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 --- a/doc/doxygen/html/plConfig_8h_source.html +++ b/doc/doxygen/html/plConfig_8h_source.html @@ -136,7 +136,7 @@ <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment">// any user applications). Therefore, the configured plConfig.h</span></div> <div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment">// should be installed. In contrast, plplot_config.h.in (note,</span></div> <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// plConfig.h #includes plplot_config.h for the core build because</span></div> -<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment">// HAVE_CONFIG_H is #defined in that case) contains configured macros</span></div> +<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment">// HAVE_PLPLOT_CONFIG_H is #defined in that case) contains configured macros</span></div> <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment">// that are only required for the core build. Therefore, in contrast</span></div> <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment">// to plConfig.h, plplot_config.h should not be installed.</span></div> <div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">//</span></div> @@ -150,7 +150,7 @@ <div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="preprocessor">#ifndef __PLCONFIG_H__</span></div> <div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="preprocessor"></span><span class="preprocessor">#define __PLCONFIG_H__</span></div> <div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="preprocessor"></span></div> -<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor">#ifdef HAVE_CONFIG_H</span></div> +<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor">#ifdef HAVE_PLPLOT_CONFIG_H</span></div> <div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="preprocessor"></span><span class="preprocessor"># include <<a class="code" href="plplot__config_8h.html">plplot_config.h</a>></span></div> <div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="preprocessor">#endif</span></div> <div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="preprocessor"></span></div> --- a/doc/doxygen/html/plplot__config_8h_source.html +++ b/doc/doxygen/html/plplot__config_8h_source.html @@ -109,7 +109,7 @@ <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// examples (and presumably any user applications). Therefore, the</span></div> <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">// configured plplot_config.h should not be installed. In contrast,</span></div> <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// include/plConfig.h.in (note, the configured plConfig.h result</span></div> -<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">// #includes plplot_config.h for the core build because HAVE_CONFIG_H</span></div> +<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">// #includes plplot_config.h for the core build because HAVE_PLPLOT_CONFIG_H</span></div> <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">// is #defined in that case) contains configured macros that are</span></div> <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// required for the core build, installed examples build, and build of</span></div> <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// user applications. Therefore, in contrast to plplot_config.h,</span></div> --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -414,7 +414,7 @@ endif(CORE_BUILD) if(CORE_BUILD AND BUILD_TEST) - remove_definitions("-DHAVE_CONFIG_H") + remove_definitions("-DHAVE_PLPLOT_CONFIG_H") endif(CORE_BUILD AND BUILD_TEST) # Decide on device to be used for generic interactive tests. --- a/include/plConfig.h.in +++ b/include/plConfig.h.in @@ -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 +// HAVE_PLPLOT_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 HAVE_PLPLOT_CONFIG_H # include <plplot_config.h> #endif --- a/plplot_config.h.in +++ b/plplot_config.h.in @@ -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 HAVE_PLPLOT_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,
signature.asc
Description: OpenPGP digital signature