From: <ai...@us...> - 2011-01-26 22:37:30
|
Revision: 11501 http://plplot.svn.sourceforge.net/plplot/?rev=11501&view=rev Author: airwin Date: 2011-01-26 21:22:01 +0000 (Wed, 26 Jan 2011) Log Message: ----------- Put Fortran 77 PLplot parameters in their own separate include file (plplot_parameters.h) since this file is only used by Fortran 77 applications (e.g., the examples) and not by the bindings. Make build system adjustments so this include file is installed and found during build-tree and install-tree f77 example builds. Use this include file for example 4. Modified Paths: -------------- trunk/bindings/f77/CMakeLists.txt trunk/bindings/f77/sfstubs.h trunk/cmake/modules/fortran.cmake trunk/examples/f77/CMakeLists.txt trunk/examples/f77/x04f.fm4 Added Paths: ----------- trunk/bindings/f77/plplot_parameters.h Modified: trunk/bindings/f77/CMakeLists.txt =================================================================== --- trunk/bindings/f77/CMakeLists.txt 2011-01-26 21:09:43 UTC (rev 11500) +++ trunk/bindings/f77/CMakeLists.txt 2011-01-26 21:22:01 UTC (rev 11501) @@ -223,6 +223,7 @@ string(REGEX REPLACE "^.*:.*:.*:(.*)$" "\\1" PC_LIBRARY_NAME ${PC_DATA}) set(PC_LINK_FLAGS "${lib${PC_LIBRARY_NAME}_LINK_FLAGS}") set(PC_COMPILE_FLAGS "${lib${PC_LIBRARY_NAME}_COMPILE_FLAGS}") + set(PC_COMPILE_FLAGS "-I${F77_INCLUDE_DIR} ${PC_COMPILE_FLAGS}") set(PC_LINK_FLAGS "-l${PC_LIBRARY_NAME} -lplplotf77c${LIB_TAG}${VERSION_SUFFIX} ${PC_LINK_FLAGS}" ) @@ -236,4 +237,11 @@ ) install(FILES ${PC_CONFIGURED_FILE} DESTINATION ${PKG_CONFIG_DIR}) endif(PKG_CONFIG_EXECUTABLE) + + install( + FILES + ${CMAKE_CURRENT_SOURCE_DIR}/plplot_parameters.h + DESTINATION ${F77_INCLUDE_DIR} + ) + endif(ENABLE_f77) Added: trunk/bindings/f77/plplot_parameters.h =================================================================== --- trunk/bindings/f77/plplot_parameters.h (rev 0) +++ trunk/bindings/f77/plplot_parameters.h 2011-01-26 21:22:01 UTC (rev 11501) @@ -0,0 +1,90 @@ +C $Id$ +C parameters required for routines that use the plplotf77 library +C such as some of our f77 examples. +C +C Copyright (C) 2011 Alan W. Irwin +C +C This file is part of PLplot. +C +C PLplot is free software; you can redistribute it and/or modify +C it under the terms of the GNU General Library Public License as +C published by the Free Software Foundation; either version 2 of the +C License, or (at your option) any later version. +C +C PLplot is distributed in the hope that it will be useful, +C but WITHOUT ANY WARRANTY; without even the implied warranty of +C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +C GNU Library General Public License for more details. +C +C You should have received a copy of the GNU Library General Public +C License along with PLplot; if not, write to the Free Software +C Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +c flags used for position argument of both pllegend and plcolorbar + integer PL_POSITION_LEFT + integer PL_POSITION_RIGHT + integer PL_POSITION_UPPER + integer PL_POSITION_LOWER + integer PL_POSITION_INSIDE + integer PL_POSITION_OUTSIDE + integer PL_POSITION_VIEWPORT + integer PL_POSITION_SUBPAGE + + parameter (PL_POSITION_LEFT = 1 ) + parameter (PL_POSITION_RIGHT = 2 ) + parameter (PL_POSITION_UPPER = 4 ) + parameter (PL_POSITION_LOWER = 8 ) + parameter (PL_POSITION_INSIDE = 16 ) + parameter (PL_POSITION_OUTSIDE = 32 ) + parameter (PL_POSITION_VIEWPORT = 64 ) + parameter (PL_POSITION_SUBPAGE = 128 ) + +c Flags for pllegend. + integer PL_LEGEND_NONE + integer PL_LEGEND_COLOR_BOX + integer PL_LEGEND_LINE + integer PL_LEGEND_SYMBOL + integer PL_LEGEND_TEXT_LEFT + integer PL_LEGEND_BACKGROUND + integer PL_LEGEND_BOUNDING_BOX + integer PL_LEGEND_ROW_MAJOR + + parameter (PL_LEGEND_NONE = 1 ) + parameter (PL_LEGEND_COLOR_BOX = 2 ) + parameter (PL_LEGEND_LINE = 4 ) + parameter (PL_LEGEND_SYMBOL = 8 ) + parameter (PL_LEGEND_TEXT_LEFT = 16 ) + parameter (PL_LEGEND_BACKGROUND = 32 ) + parameter (PL_LEGEND_BOUNDING_BOX = 64 ) + parameter (PL_LEGEND_ROW_MAJOR = 128 ) + +c Flags for plcolorbar + integer PL_COLORBAR_LEFT + integer PL_COLORBAR_RIGHT + integer PL_COLORBAR_UPPER + integer PL_COLORBAR_LOWER + integer PL_COLORBAR_LABEL_LEFT + integer PL_COLORBAR_LABEL_RIGHT + integer PL_COLORBAR_LABEL_UPPER + integer PL_COLORBAR_LABEL_LOWER + integer PL_COLORBAR_IMAGE + integer PL_COLORBAR_SHADE + integer PL_COLORBAR_GRADIENT + integer PL_COLORBAR_CAP_LOW + integer PL_COLORBAR_CAP_HIGH + integer PL_COLORBAR_SHADE_LABEL + + parameter (PL_COLORBAR_LEFT = 1 ) + parameter (PL_COLORBAR_RIGHT = 2 ) + parameter (PL_COLORBAR_UPPER = 4 ) + parameter (PL_COLORBAR_LOWER = 8 ) + parameter (PL_COLORBAR_LABEL_LEFT = 16 ) + parameter (PL_COLORBAR_LABEL_RIGHT = 32 ) + parameter (PL_COLORBAR_LABEL_UPPER = 64 ) + parameter (PL_COLORBAR_LABEL_LOWER = 128 ) + parameter (PL_COLORBAR_IMAGE = 256 ) + parameter (PL_COLORBAR_SHADE = 512 ) + parameter (PL_COLORBAR_GRADIENT = 1024 ) + parameter (PL_COLORBAR_CAP_LOW = 2048 ) + parameter (PL_COLORBAR_CAP_HIGH = 4096 ) + parameter (PL_COLORBAR_SHADE_LABEL = 8192 ) Property changes on: trunk/bindings/f77/plplot_parameters.h ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/bindings/f77/sfstubs.h =================================================================== --- trunk/bindings/f77/sfstubs.h 2011-01-26 21:09:43 UTC (rev 11500) +++ trunk/bindings/f77/sfstubs.h 2011-01-26 21:22:01 UTC (rev 11501) @@ -40,73 +40,3 @@ common /zzplstr7/ string7 common /zzplstr8/ string8 common /zzplstr9/ string9 - - -c flags used for position argument of both pllegend and plcolorbar - integer PL_POSITION_LEFT - integer PL_POSITION_RIGHT - integer PL_POSITION_UPPER - integer PL_POSITION_LOWER - integer PL_POSITION_INSIDE - integer PL_POSITION_OUTSIDE - integer PL_POSITION_VIEWPORT - integer PL_POSITION_SUBPAGE - - parameter (PL_POSITION_LEFT = 1 ) - parameter (PL_POSITION_RIGHT = 2 ) - parameter (PL_POSITION_UPPER = 4 ) - parameter (PL_POSITION_LOWER = 8 ) - parameter (PL_POSITION_INSIDE = 16 ) - parameter (PL_POSITION_OUTSIDE = 32 ) - parameter (PL_POSITION_VIEWPORT = 64 ) - parameter (PL_POSITION_SUBPAGE = 128 ) - -c Flags for pllegend. - integer PL_LEGEND_NONE - integer PL_LEGEND_COLOR_BOX - integer PL_LEGEND_LINE - integer PL_LEGEND_SYMBOL - integer PL_LEGEND_TEXT_LEFT - integer PL_LEGEND_BACKGROUND - integer PL_LEGEND_BOUNDING_BOX - integer PL_LEGEND_ROW_MAJOR - - parameter (PL_LEGEND_NONE = 1 ) - parameter (PL_LEGEND_COLOR_BOX = 2 ) - parameter (PL_LEGEND_LINE = 4 ) - parameter (PL_LEGEND_SYMBOL = 8 ) - parameter (PL_LEGEND_TEXT_LEFT = 16 ) - parameter (PL_LEGEND_BACKGROUND = 32 ) - parameter (PL_LEGEND_BOUNDING_BOX = 64 ) - parameter (PL_LEGEND_ROW_MAJOR = 128 ) - -c Flags for plcolorbar - integer PL_COLORBAR_LEFT - integer PL_COLORBAR_RIGHT - integer PL_COLORBAR_UPPER - integer PL_COLORBAR_LOWER - integer PL_COLORBAR_LABEL_LEFT - integer PL_COLORBAR_LABEL_RIGHT - integer PL_COLORBAR_LABEL_UPPER - integer PL_COLORBAR_LABEL_LOWER - integer PL_COLORBAR_IMAGE - integer PL_COLORBAR_SHADE - integer PL_COLORBAR_GRADIENT - integer PL_COLORBAR_CAP_LOW - integer PL_COLORBAR_CAP_HIGH - integer PL_COLORBAR_SHADE_LABEL - - parameter (PL_COLORBAR_LEFT = 1 ) - parameter (PL_COLORBAR_RIGHT = 2 ) - parameter (PL_COLORBAR_UPPER = 4 ) - parameter (PL_COLORBAR_LOWER = 8 ) - parameter (PL_COLORBAR_LABEL_LEFT = 16 ) - parameter (PL_COLORBAR_LABEL_RIGHT = 32 ) - parameter (PL_COLORBAR_LABEL_UPPER = 64 ) - parameter (PL_COLORBAR_LABEL_LOWER = 128 ) - parameter (PL_COLORBAR_IMAGE = 256 ) - parameter (PL_COLORBAR_SHADE = 512 ) - parameter (PL_COLORBAR_GRADIENT = 1024 ) - parameter (PL_COLORBAR_CAP_LOW = 2048 ) - parameter (PL_COLORBAR_CAP_HIGH = 4096 ) - parameter (PL_COLORBAR_SHADE_LABEL = 8192 ) Modified: trunk/cmake/modules/fortran.cmake =================================================================== --- trunk/cmake/modules/fortran.cmake 2011-01-26 21:09:43 UTC (rev 11500) +++ trunk/cmake/modules/fortran.cmake 2011-01-26 21:22:01 UTC (rev 11501) @@ -62,6 +62,11 @@ set(ENABLE_f95 OFF CACHE BOOL "Enable f95 bindings" FORCE) endif(ENABLE_f95 AND NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90) + # Set installation location for f77 include files + set(F77_INCLUDE_DIR ${LIB_DIR}/fortran/include/${PACKAGE} + CACHE PATH "installation location for f95 modules" + ) + # Set installation location for f95 modules. set(F95_MOD_DIR ${LIB_DIR}/fortran/modules/${PACKAGE} CACHE PATH "installation location for f95 modules" @@ -70,7 +75,7 @@ # Check if f77/f95 style command line parsing is possible include(TestF77CmdLine) - # Check if isnan is available as an fortran function + # Check if isnan is available as a fortran function include(TestFortranIsnan) # Determine which Fortran compiler we have. We do not need to Modified: trunk/examples/f77/CMakeLists.txt =================================================================== --- trunk/examples/f77/CMakeLists.txt 2011-01-26 21:09:43 UTC (rev 11500) +++ trunk/examples/f77/CMakeLists.txt 2011-01-26 21:22:01 UTC (rev 11501) @@ -128,11 +128,15 @@ if(CORE_BUILD) include_directories( ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/bindings/f77 ${CMAKE_BINARY_DIR}/include ) set(f77_directory ${CMAKE_CURRENT_BINARY_DIR}) else(CORE_BUILD) - include_directories(${INCLUDE_DIR}) + include_directories( + ${INCLUDE_DIR} + ${F77_INCLUDE_DIR} + ) set(f77_directory ${CMAKE_CURRENT_SOURCE_DIR}) set(f77_target) endif(CORE_BUILD) Modified: trunk/examples/f77/x04f.fm4 =================================================================== --- trunk/examples/f77/x04f.fm4 2011-01-26 21:09:43 UTC (rev 11500) +++ trunk/examples/f77/x04f.fm4 2011-01-26 21:22:01 UTC (rev 11501) @@ -51,40 +51,8 @@ character*20 text(2) character*1 symbols(2) -c To include file! + include 'plplot_parameters.h' - integer PL_LEGEND_NONE - integer PL_LEGEND_COLOR_BOX - integer PL_LEGEND_LINE - integer PL_LEGEND_SYMBOL - integer PL_LEGEND_TEXT_LEFT - integer PL_LEGEND_BACKGROUND - integer PL_LEGEND_BOUNDING_BOX - integer PL_LEGEND_ROW_MAJOR - integer PL_LEGEND_LEFT - integer PL_LEGEND_RIGHT - integer PL_LEGEND_UPPER - integer PL_LEGEND_LOWER - integer PL_LEGEND_INSIDE - integer PL_LEGEND_OUTSIDE - - parameter (PL_LEGEND_NONE = 1 ) - parameter (PL_LEGEND_COLOR_BOX = 2 ) - parameter (PL_LEGEND_LINE = 4 ) - parameter (PL_LEGEND_SYMBOL = 8 ) - parameter (PL_LEGEND_TEXT_LEFT = 16 ) - parameter (PL_LEGEND_BACKGROUND = 32 ) - parameter (PL_LEGEND_BOUNDING_BOX = 64 ) - parameter (PL_LEGEND_ROW_MAJOR = 128 ) - parameter (PL_LEGEND_LEFT = 256 ) - parameter (PL_LEGEND_RIGHT = 512 ) - parameter (PL_LEGEND_UPPER = 1024 ) - parameter (PL_LEGEND_LOWER = 2048 ) - parameter (PL_LEGEND_INSIDE = 4096 ) - parameter (PL_LEGEND_OUTSIDE = 8192 ) - - - call pladv(0) c Set up data for log plot. f0 = 1.d0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |