From: <ai...@us...> - 2009-09-15 16:11:57
|
Revision: 10412 http://plplot.svn.sourceforge.net/plplot/?rev=10412&view=rev Author: airwin Date: 2009-09-15 16:11:51 +0000 (Tue, 15 Sep 2009) Log Message: ----------- Remove all duplicates between config.h.cmake and include/plConfig.h.cmake. Document the different roles played by config.h.cmake and plConfig.h.cmake within those files. Modified Paths: -------------- trunk/config.h.cmake trunk/include/plConfig.h.cmake Modified: trunk/config.h.cmake =================================================================== --- trunk/config.h.cmake 2009-09-15 14:41:21 UTC (rev 10411) +++ trunk/config.h.cmake 2009-09-15 16:11:51 UTC (rev 10412) @@ -1,17 +1,25 @@ -/* Generated from configure.ac by autoheader as of 2006-07-08 - * and converted to cmake form. cmake has no equivalent to - * autoheader yet so this file must be maintained manually from - * now on, i.e., if there is an addition of a configurable symbol, - * (all done from the top-level CMakeLists.txt file) - * it must be entered here as well in order for C/C++ programmes - * to have access to the configured symbol.*/ +/* Configured (by CMake) macros for PLplot that are required for the + core build but _not_ required for the build of the installed + examples (and presumably any user applications). Therefore, the + configured config.h should not be installed. In contrast, + include/plConfig.h.cmake (note, plConfig.h #includes config.h for + the core build because 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 config.h, plConfig.h should be installed. + Maintenance issue: in makes no sense to configure duplicate macros + for both config.h and plConfig.h. Therefore, when adding a macro + decide which file to put it in depending on whether the result is + needed for the installed examples build or not. Furthermore, move + configured macros from one file to the other as needed depending on + that criterion, but do not copy them. + +*/ + /* Location of executables */ #define BIN_DIR "${BIN_DIR}" -/* isnan is in math.h but not cmath */ -#cmakedefine PL_BROKEN_ISNAN_CXX - /* Location of Build tree */ #define BUILD_DIR "${BUILD_DIR}" @@ -33,9 +41,6 @@ /* Define to 1 if you have the <cmath> header file. */ #cmakedefine HAVE_CMATH 1 -/* Define if you have c++ accessible stdint.h */ -#cmakedefine PL_HAVE_CXX_STDINT_H - /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. */ #cmakedefine HAVE_DIRENT_H 1 @@ -67,28 +72,6 @@ /* Define to 1 if you have the <inttypes.h> header file. */ #cmakedefine HAVE_INTTYPES_H 1 -/* Define if isinf is available */ -#cmakedefine PL_HAVE_ISINF - -/* Define if _isinf is available */ -#cmakedefine PL__HAVE_ISINF - -/* Define if isnan is available */ -#cmakedefine PL_HAVE_ISNAN - -/* Define if _isnan is available */ -#cmakedefine PL__HAVE_ISNAN - -/* Define if snprintf is available */ -#ifndef PL_HAVE_SNPRINTF -#cmakedefine PL_HAVE_SNPRINTF -#endif - -/* Define if _snprintf is available */ -#ifndef _PL_HAVE_SNPRINTF -#cmakedefine _PL_HAVE_SNPRINTF -#endif - /* Define if [incr], [Tcl] is available */ #cmakedefine HAVE_ITCL @@ -144,9 +127,6 @@ /* Define if Qhull is available */ #cmakedefine HAVE_QHULL -/* Define to 1 if you have the <stdint.h> header file. */ -#cmakedefine PL_HAVE_STDINT_H 1 - /* Define to 1 if you have the <stdlib.h> header file. */ #cmakedefine HAVE_STDLIB_H 1 @@ -170,12 +150,6 @@ /* Define to 1 if you have the <termios.h> header file. */ #cmakedefine HAVE_TERMIOS_H 1 -/* Define to 1 if you have the <unistd.h> header file. */ -#cmakedefine PL_HAVE_UNISTD_H 1 - -/* Define if usleep is available */ -#cmakedefine PL_HAVE_USLEEP - /* Define to 1 if you have the `vfork' function. */ #cmakedefine HAVE_VFORK 1 @@ -194,10 +168,6 @@ /* Portable definition for PTHREAD_MUTEX_RECURSIVE */ #define PLPLOT_MUTEX_RECURSIVE ${PLPLOT_MUTEX_RECURSIVE} -/* PLplot's PLFLT floating-point is "double" by default, undefine PL_DOUBLE if - single precision is required */ -#cmakedefine PL_DOUBLE - /* Directory containing fonts that are accessible from freetype */ #define PL_FREETYPE_FONT_DIR "${PL_FREETYPE_FONT_DIR}" @@ -303,9 +273,6 @@ /* Location of Tcl stuff */ #define TCL_DIR "${TCL_DIR}" -/* Define if C++ compiler accepts using namespace */ -#cmakedefine PL_USE_NAMESPACE - /* Version number of package */ #define VERSION "${VERSION}" Modified: trunk/include/plConfig.h.cmake =================================================================== --- trunk/include/plConfig.h.cmake 2009-09-15 14:41:21 UTC (rev 10411) +++ trunk/include/plConfig.h.cmake 2009-09-15 16:11:51 UTC (rev 10412) @@ -5,7 +5,7 @@ IFS, University of Texas at Austin 18-Jul-1994 - Copyright (C) 2004, 2006 Alan W. Irwin + Copyright (C) 2004, 2006, 2007, 2008, 2009 Alan W. Irwin Copyright (C) 2004 Rafael Laboissiere Copyright (C) 2004 Joao Cardoso @@ -25,13 +25,25 @@ along with PLplot; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ - Contains macro definitions that determine miscellaneous PLplot library - configuration defaults, such as macros for bin, font, lib, and tcl - install directories, and various system dependencies. On a Unix - system, typically the configure script builds plConfig.h from - plConfig.h.in. Elsewhere, it's best to hand-configure a plConfig.h - file and keep it with the system-specific files. +/* Configured (by CMake) macros for PLplot that are required for the + core build and the build of the installed + examples (and presumably any user applications). Therefore, the + configured plConfig.h should be installed. In contrast, + config.h.cmake (note, plConfig.h #includes config.h for + the core build because 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, config.h should not + be installed. + + Maintenance issue: in makes no sense to configure duplicate macros + for both config.h and plConfig.h. Therefore, when adding a macro + decide which file to put it in depending on whether the result is + needed for the installed examples build or not. Furthermore, move + configured macros from one file to the other as needed depending on + that criterion, but do not copy them. + */ #ifndef __PLCONFIG_H__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |