#
# dcpam5 Installation Guide in RD (Ruby Document) format
#
#   For instruction of installing dcpam, 
#   see "INSTALL.htm.en" (English) or "INSTALL.htm" (Japanese)
#   included in "dcpam5" tar.gz package
#   available from http://www.gfd-dennou.org/library/dcpam.
#   Otherwise, see this file directly, or generate
#   above mentioned html files with "make guide" 
#   in current directory after installing  rdtool
#   <http://raa.ruby-lang.org/project/rdtool/>.

=begin JA

= dcpam5 󥹥ȡ륬
#*   (morikawa),   (momoko)
#  * $Id: INSTALL,v 1.33 2014-03-10 04:37:06 yot Exp $
=end JA
=begin EN

= dcpam5 Installation Guide
#* Yasuhiro MORIKAWA (morikawa), Masaki ISHIWARARI (momoko)
#  * $Id: INSTALL,v 1.33 2014-03-10 04:37:06 yot Exp $
=end EN

=begin JA
== ưĶ

ΥץϰʲΥѥǤưǧƤޤ

=end JA

=begin EN
== Operation Environment

This program is operated by following compilers.

=end EN

=begin
#  * ((<"Debian GNU/Linux 6.0 "|URL:http://www.debian.org/>)) +
#    ((<g95|URL:http://www.g95.org/>))
#
#  * ((<"Debian GNU/Linux 5.0 "|URL:http://www.debian.org/>)) +
#    ((<g95|URL:http://www.g95.org/>))
#
#  * ((<"Debian GNU/Linux 5.0 "|URL:http://www.debian.org/>)) +
#    ((<Fujitsu Fortran 5.0 (in JAPANESE)|URL:http://jp.fujitsu.com/group/kyushu/services/dev-tech/fortran/>))

#  * ((<"Debian GNU/Linux 6.0 "|URL:http://www.debian.org/>)) +
#    ((<gfortran|URL:http://gcc.gnu.org/wiki/GFortran/>))
#
#  * ((<"Debian GNU/Linux 6.0 "|URL:http://www.debian.org/>)) +
#    ((<g95|URL:http://www.g95.org/>))
#
#  * ((<"Debian GNU/Linux 6.0 "|URL:http://www.debian.org/>)) +
#    ((<Fujitsu Fortran 5.0 (in Japanese)|URL:http://jp.fujitsu.com/group/kyushu/services/dev-tech/fortran/>))
#
#  * ((<"Debian GNU/Linux 6.0 "|URL:http://www.debian.org/>)) +
#    ((<Fujitsu Fortran 64V1 (in Japanese)|URL:http://jp.fujitsu.com/group/kyushu/services/dev-tech/fortran/>))
#
#  * ((<"Debian GNU/Linux 6.0 "|URL:http://www.debian.org/>)) +
#    ((<PGI Fortran 12.5-0 64 big|URL:http://www.pgroup.com/>))

  * ((<"Debian GNU/Linux 7.0 "|URL:http://www.debian.org/>)) +
    ((<gfortran|URL:http://gcc.gnu.org/wiki/GFortran/>))

  * ((<"Debian GNU/Linux 7.0 "|URL:http://www.debian.org/>)) +
    ((<Fujitsu Fortran 64V1 (in Japanese)|URL:http://jp.fujitsu.com/group/kyushu/services/dev-tech/fortran/>))

=end


#=begin JA
#ˤϰʲδĶǤưȤǧƤޤ.
#ǧϤƤޤ, ߤΥСǤ⤪餯ưȴԤޤ.
#=end JA
#=begin EN
#dcpam5 was operated by following environments in the past.
#Latest version may be operated (unconfirmed).
#=end EN
#
#=begin
#  * ((<"Debian GNU/Linux 4.0 "|URL:http://www.debian.org/      >)) +
#    ((<Fujitsu Fortran 5.0 (in JAPANESE)|URL:http://www.fqs.co.jp/fort-c/>))
#
#  * ((<"Debian GNU/Linux 3.1 "|URL:http://www.debian.org/      >)) +
#    ((<Fujitsu Fortran 5.0 (in JAPANESE)|URL:http://www.fqs.co.jp/fort-c/>))
#
#  * ((<"Debian GNU/Linux 4.0 "|URL:http://www.debian.org/      >)) +
#    Intel Fortran 10.0
#
#  * ((<"Debian GNU/Linux 3.1 "|URL:http://www.debian.org/      >)) +
#    Intel Fortran 9.0
#
#  * ((<"Debian GNU/Linux 3.1, 4.0"|URL:http://www.debian.org/>)) +
#    ((<G95 Fortran 0.9       |URL:http://www.g95.org/>))
#
##  * Windows Vista + G95 Fortran
##  * Windows Vista + Intel Visual Fortran 9.1.032
##  * Windows Vista + Compaq Visual Fortran 6.6
##  * HITACHI SR11000 + IBM XL Fortran Enterprise Edition for AIX5L
##  * HITACHI SR11000 + Optimizing FORTRAN90 Compiler
#  * NEC SX-8 + FORTRAN90/SX
##  * FUJITSU VPP-5000 + VPP Fortran
#=end


#=begin JA
#== 󥹥ȡή
#
#dcpam5 Υ󥹥ȡϰʲΤ褦˹Ԥޤ.
#ܤϳƹܤ򻲾ȤƤ.
#
#  (1) ((<ɬפʥեȥ>)) 򥤥󥹥ȡ뤷ޤ.
#  (2) ((<ӥɤμ>)) ˽, 饤֥ӥɤޤ.
#  (3) ((<ץץ¹Ԥμ>)) ˽, 󥹥ȡ뤵줿
#      饤֥꤬˵ǽ뤫ɤǧƤ.
#
#=== 󥹥ȡ
#
#((<dcpam ץ|URL:http://www.gfd-dennou.org/library/dcpam/>))
#Ρ֥塼ȥꥢפǤ, 󥹥ȡμҲ𤵤Ƥޤ.
#󥹥ȡ뤬ޤʤϻȤƤ.
#
#
#=== Debian GNU/Linux 桼Τߤʤޤ
#
#Debian GNU/Linux ѤƤ,
#((<URL:http://www.gfd-dennou.org/library/dcpam/debian.htm>))
#ˤۤƤХʥѥåѤǤޤ.
#
#=end JA
#
#=begin EN
#== General outline
#
#Install dcpam5 as follows. Refer each items for details.
#
#  (1) Satisfy ((<Software Requirements>)).
#  (2) Build the library following ((<How to build>)).
#  (3) Check whether the installed library functions normally
#      following ((<Execute sample programs>)).
#
#=== Install example
#
#There are examples of installation in "Tutorial" on
#((<dcpam Project|URL:http://www.gfd-dennou.org/library/dcpam/>)).
#Refer them if the installation is not successful.
#
#=== For Debian GNU/Linux users
#
#When you are using Debian GNU/Linux, binary packages distributed with
#((<URL:http://www.gfd-dennou.org/library/dcpam/debian.htm.en>))
#can be used.
#
#=end EN


=begin JA
== ɬפʥեȥ

dcpam5 Ѥ뤿ˤϰʲΥեȥ
˥󥹥ȡ뤷Ƥɬפޤ.

: ((<netCDF|URL:http://www.gfd-dennou.org/library/netcdf>)) (С 3.6.X ʾ)

#  Debian GNU/Linux ѤƤ, ХʥѥåѤ, ((<|URL:http://www.gfd-dennou.org/library/cc-env/debian-dennou/index.htm.ja>)) 򻲾Ȥƥ󥹥ȡ뤷Ƥ. 
  Debian GNU/Linux ѤƤʤ, ХʥѥåѤ뤳ȤǤޤ. 

  嵭 deb ѥå¾ netCDF  Development kit (((*netcdf-bin*)) ѥå) ⥤󥹥ȡ뤹ɬפޤ .

  ӥɤ
  * ((<3.6.3  TGZ|URL:http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-3.6.3.tar.gz>))

#    [((<Unidata ܲ NetCDFå󥹥ȡ륬 (Ѹ) |URL:http://my.unidata.ucar.edu/content/software/netcdf/docs/netcdf-install/Quick-Instructions-for-Installing-NetCDF-on-Unix.html#Quick-Instructions-for-Installing-NetCDF-on-Unix>))
#    |
#    ((<(ܸ)|URL:INSTALL_netcdf.htm>)) ]
#
#    [((<Unidata ܲȤΥ󥹥ȡ륬ɤܼ|URL:http://my.unidata.ucar.edu/content/software/netcdf/docs/netcdf-install/index.html>))]

: ((<gtool5|URL:http://www.gfd-dennou.org/library/gtool>)) (С 20100924 ʾ)

  Debian GNU/Linux ѤƤ, ХʥѥåѤ, ((<|URL:http://www.gfd-dennou.org/library/cc-env/debian-dennou/index.htm.ja>)) 򻲾Ȥƥ󥹥ȡ뤷Ƥ. 

  ӥɤ
  * ((<ǿС TGZ|URL:http://www.gfd-dennou.org/library/gtool/gtool5/gtool5_current.tgz>))
   
    ((<󥹥ȡ륬|URL:http://www.gfd-dennou.org/library/gtool/gtool5/gtool5_current/INSTALL.htm>))


: ((<ISPACK|URL:http://www.gfd-dennou.org/library/ispack>)) (С 1.0.2 ʾ)

  Debian GNU/Linux ѤƤ, ХʥѥåѤ, ((<|URL:http://www.gfd-dennou.org/library/cc-env/debian-dennou/index.htm.ja>)) 򻲾Ȥƥ󥹥ȡ뤷Ƥ. 

#  ӥɤ
#  * ((<С 0.96 TGZ|URL:http://www.gfd-dennou.org/library/ispack/ispack-0.96.tar.gz>))
#
#    󥹥ȡκݤ, 嵭 tar.gz Ÿ README 򻲾ȤƤ.

  ӥɤ, tar.gz եŸ README 򻲾ȤƤ.

: ((<spmodel|URL:http://www.gfd-dennou.org/library/spmodel>)) (С 0.8.0 ʾ)

  Debian GNU/Linux ѤƤ, ХʥѥåѤ, ((<|URL:http://www.gfd-dennou.org/library/cc-env/debian-dennou/index.htm.ja>)) 򻲾Ȥƥ󥹥ȡ뤷Ƥ. 

  ӥɤ
  * ((<ǿ TGZ|URL:http://www.gfd-dennou.org/library/spmodel/spml_current.tar.gz>))

    ((<󥹥ȡ륬|URL:http://www.gfd-dennou.org/library/spmodel/spml/INSTALL>))

: MPI 饤֥

  MPI Ѥ׻Ԥˤ, MPI 饤֥򥤥󥹥ȡ뤷Ƥ. 


=== ȯԤˤȤäɬפʥեȥ

ɤԽ, 
ɥȤ뤿ˤϰʲ
եȥ˥󥹥ȡ뤷Ƥɬפޤ. 
(tar.gz ѥåˤϴ˥ɥȤƱƤޤ)

* ɤԽ
  * ((<Ruby|URL:http://www.ruby-lang.org/>))
  * ((<Rsed.rb (Recursive Sed with Ruby)|URL:http://www.ep.sci.hokudai.ac.jp/~michi/pc/ruby/script-02.html>))
    (tar.gz ѥåƱѤ)

* ɥ
  * ̤ HTML ڡ
    (: ܥڡ, ((<dcpam5 ɥ|URL:doc/index.htm>)),
    ((<餯 dcpam5|URL:doc/gokuraku/index.htm>)),
    ((<餯餯 dcpam5|URL:doc/rakuraku/rakuraku.pdf>)))
    * ((<rdtool|URL:http://raa.ruby-lang.org/project/rdtool/>))
    * ((<rd2latex|URL:http://shugo.net/archive/rd2latex/>))
      (tar.gz ѥåƱѤ)
  * ƥ⥸塼Υե󥹥ޥ˥奢
    * ((<"RDoc Fortran90/95 ɲϵǽ"|URL:http://www.gfd-dennou.org/library/dcmodel>))
  * ϤȤΥ, ƳФ˴ؤ뻲ͻ 
    * ((<LaTeX|URL:http://www.latex-project.org/>))
      * ե: ((<Dennou6 style|URL:http://www.gfd-dennou.org/library/cc-env/TeXmacro/dennou/SIGEN.htm>))
    * ((<latex2html ܸѥå, Dennou6 style ѥå򤢤Ƥ|URL:http://www.gfd-dennou.org/library/cc-env/latex2html/SIGEN.htm>))

=end JA
=begin EN

== Software Requirements

Following softwares should be installed for installing dcpam.

: ((<netCDF|URL:http://my.unidata.ucar.edu/content/software/netcdf/index.html>)) (version 3.6.X or more)

  Debian GNU/Linux (use binary packages)

#  If you use Debian GNU/Linux and use binary package of netCDF, see ((<here|URL:http://www.gfd-dennou.org/library/spmodel/debian/needed.htm.en>)) and install it. 
  If you use Debian GNU/Linux, you can use binary package of netCDF. 

  If you use above Debian package to install netCDF, you need
  ((* "netcdf-bin" *)) package too. (Parhaps you can get by "apt-get").

  Building from source codes

  * ((<Version 3.6.2 TGZ|URL:http://www.gfd-dennou.org/library/netcdf/unidata-mirror/netcdf-3.6.2.tar.gz>)),

    [((<Quick Instructions for Installing (Unidata)|URL:http://my.unidata.ucar.edu/content/software/netcdf/docs/netcdf-install/Quick-Instructions-for-Installing-NetCDF-on-Unix.html#Quick-Instructions-for-Installing-NetCDF-on-Unix>))]
    * [((<NetCDF Installation and Porting Guide (Unidata)|URL:http://my.unidata.ucar.edu/content/software/netcdf/docs/netcdf-install/index.html>))]


: ((<gtool5|URL:http://www.gfd-dennou.org/library/gtool>)) (version 20100924 or more)

  If you use Debian GNU/Linux and use binary package of gtool5, see ((<here|URL:http://www.gfd-dennou.org/library/cc-env/debian-dennou/index.htm.en>)) and install it. 

  Building from source codes
  * ((<Latest version TGZ|URL:http://www.gfd-dennou.org/library/gtool/gtool5/gtool5_current.tgz>))

    ((<Installation Guide|URL:http://www.gfd-dennou.org/library/gtool/gtool5/gtool5_current/INSTALL.htm.en>))


: ((<ISPACK (in Japanese)|URL:http://www.gfd-dennou.org/library/ispack>)) (version 1.0.2)

  If you use Debian GNU/Linux and use binary package of ISPACK, see ((<here|URL:http://www.gfd-dennou.org/library/cc-env/debian-dennou/index.htm.en>)) and install it. 

  See "README" file in a tar.gz file. (but that is written in Japanese)

: ((<spmodel|URL:http://www.gfd-dennou.org/library/spmodel>)) (version 0.8.0 or more)
  
  If you use Debian GNU/Linux and use binary package of spmodel, see ((<here|URL:http://www.gfd-dennou.org/library/cc-env/debian-dennou/index.htm.en>)) and install it. 

  Building from source codes
  * ((<Latest TGZ|URL:http://www.gfd-dennou.org/library/spmodel/spml_current.tar.gz>))

    ((<Installation Guide (in Japanese)|URL:http://www.gfd-dennou.org/library/spmodel/spml/INSTALL>))


: MPI library

  If you perform parallel computing by using the MPI, install MPI library. 


=== Software Requirements for developers

Following softwares should be installed
for modification of source code and generation of documents.
(But if you get tar.gz package, documentations are already generated).

* Modification of source code
  * ((<Ruby|URL:http://www.ruby-lang.org/>))
  * ((<Rsed.rb: Recursive Sed with Ruby (in Japanese)|URL:http://www.ep.sci.hokudai.ac.jp/~michi/pc/ruby/script-02.html>))
    (This is bundled in the tar.gz package)

* generation of documents
  * Individual HTML pages
    (Examples: This page, ((<dcpam5 Documents|URL:doc/index.htm.en>)),
    ((<GOKURAKU dcpam5|URL:doc/gokuraku/index.htm.en>)),
    ((<RAKURAKU dcpam5|URL:doc/rakuraku/rakuraku.pdf>)))
    * ((<rdtool|URL:http://raa.ruby-lang.org/project/rdtool/>))
    * ((<rd2latex|URL:http://shugo.net/archive/rd2latex/>))
      (This is bundled in the tar.gz package)
  * Reference Manual of modules
    * ((<"Enhanced version of RDoc Fortran90/95 parser"|URL:http://www.gfd-dennou.org/library/dcmodel>))
  * The governing equations and basic_equations, References for derivation
    * ((<LaTeX|URL:http://www.latex-project.org/>))
      * Style file: ((<Dennou6 style (Japanese only)|URL:http://www.gfd-dennou.org/library/cc-env/TeXmacro/dennou/SIGEN.htm>))
    * ((<latex2html_jp+dennou (Japanese only)|URL:http://www.gfd-dennou.org/library/cc-env/latex2html/SIGEN.htm>))

=end EN

=begin JA
== ӥɤμ
=end JA
=begin EN
== How to build
=end EN

=begin JA
=== TGZ ѥåŸ

Ŭʺȥǥ쥯ȥǰʲΤ褦˥֤Ÿޤ.
 dcpam5-((|С|)) Ȥǥ쥯ȥŸޤ.

	$ tar xvzf dcpam5_latest.tgz

ޤ

	$ zcat dcpam5_latest.tgz | tar -xvf -

=end JA
=begin EN
=== Extract TGZ Package

Make an empty directory, and extract archive as follows.
A directory `dcpam5-((|version|))'
created at the current working directory.

	$ tar xvzf dcpam5_latest.tgz

or

	$ zcat dcpam5_latest.tgz | tar -xvf -

=end EN


=begin JA
=== Fortran ѥλ

Ķѿ ((* FC *)) ˻Ѥ Fortran ѥꤷƤ.
ʲ, ѥȤ spmfrt ѤǤ.

* sh, bash ξ

	$ FC=spmfrt ; export FC

* csh, tcsh ξ

	$ setenv FC spmfrt

ŬǥХåΤΥץϴĶѿ ((* FFLAGS *))
ꤷƤ. ʲϥץ -O ꤹǤ. 

* sh, bash ξ

	$ FFLAGS="-O" ; export FFLAGS

* csh, tcsh ξ

	$ setenv FFLAGS "-O"


ʤ, ڥȥѴ sjpack Ѥˤ FFLAGS  -DSJPACK ꤷƤ. 

, оη׻Ԥˤ, FFLAGS  -DAXISYMMETRY ޤ -DAXISYMMETRY_SJPACK 
ꤷƤ. 


=end JA
=begin EN
=== Specify Fortran Compiler

Specify Fortran compiler to environmental variable ((* FC *)).
For example, if you use "spmfrt",

* sh, bash

	$ FC=spmfrt ; export FC

* csh, tcsh

	$ setenv FC spmfrt

Specify Fortran compiler options for optimization and debug to
environmental variable ((* FFLAGS *)).
For example, if you set -O option, 

* sh, bash

	$ FFLAGS="-O" ; export FFLAGS

* csh, tcsh

	$ setenv FFLAGS "-O"

On the one hand, specify -DSJPACK to FFLAGS if you use sjpack for spectral transformation.

Further, specify -DAXISYMMETRY or -DAXISYMMETRY_SJPACK to FFLAGS if you perform 
axisymmetric calculation. 

=end EN


=begin JA
=== Config.mk κ

Ÿ줿ǥ쥯ȥ˰ư, (({ ./configure }))¹Ԥޤ.
((<ѥɬפʥ饤֥>))ǥ󥹥ȡ뤷ƥ饤֥
ʲΥץ˻ꤹɬפޤ.

:(({--with-ispack=}))((|ARG|))
  ispack 饤֥ (*.a) Υե̾.

:(({--with-netcdf=}))((|ARG|))
  netcdf 饤֥ (*.a) Υե̾.
  ˤä (({--with-netcdff=}))((|ARG|)) (netcdf Fortran 饤֥Υե̾), (({--with-netcdff-include=}))((|ARG|)) (netcdf 饤֥ include ե̾) ꤹɬפޤ.

:(({--with-gtool5=}))((|ARG|))
  gtool5 饤֥ (*.a) Υե̾.

:(({--with-spml=}))((|ARG|))
  spmodel 饤֥ (*.a) Υե̾.

㤨аʲΤ褦˻ꤷޤ.
Υޥɤˤä (({ Config.mk })) ե뤬ޤ.

    $ ./configure --with-ispack=/usr/local/lib/libisp.a \
                  --with-netcdf=/usr/local/lib/libnetcdf.a \
                  --with-gtool5=/usr/local/lib/gtool5/lib/libgtool5.a \
                  --with-spml=/usr/local/lib/spml/lib/libspml.a

ޤ, gfortran, netcdf, ispack, gtool5, spml  Debian package Ѥˤ, 
ʲΤ褦 configure ¹Ԥޤ. 

    % ./configure \
        --with-ispack=/usr/lib/x86_64-linux-gnu/libispack.a \
        --with-netcdf=/usr/lib/libnetcdf.a \
        --with-netcdff=/usr/lib/libnetcdff.a \
        --with-netcdf-include=/usr/include/netcdf \
        --with-gtool5=/usr/lib/x86_64-linux-gnu/gtool5/lib/libgtool5.a \
        --with-spml=/usr/lib/x86_64-linux-gnu/spml/lib/libspml-lapack-lapack.a

ӥɤˤ GNU make ɬפȤʤ뤿, configure  PATH ⤫
ư GNU make õ褦Ȥޤ, ⤷Ĥʤ,
顼֤ޤ. ξˤϴĶѿ ((* MAKE *)) 
GNU make ޥɤꤷƺ configure ¹ԤƤ.

󥹥ȡʤɤѹ, ʲΤ褦 (({ --help })) 
Ĥ뤳Ȥ, ǽʥץꥹȤɽޤ.

	$ ./configure --help

ʥץ˴ؤƤǤ.

:(({--prefix=}))((|ARG|))
  ((|ARG|)) ˥饤֥⥸塼, ¹ԥեΥ󥹥ȡ
  ǥ쥯ȥΥץեåꤷޤ.
  ǥեȤ (({ /usr/local/dcpam5 })) Ǥ.

:(({--libdir=}))((|ARG|))
  ((|ARG|)) ˥饤֥Υ󥹥ȡΥǥ쥯ȥꤷޤ.
  ǥեȤ (({ /usr/local/dcpam5/lib })) Ǥ.

:(({--includedir=}))((|ARG|))
  ((|ARG|)) ˥⥸塼եΥ󥹥ȡΥǥ쥯ȥ
  ꤷޤ. ǥեȤ (({ /usr/local/dcpam5/include })) Ǥ.

:(({--bindir=}))((|ARG|))
  ((|ARG|)) ˼¹ԥեΥ󥹥ȡΥǥ쥯ȥꤷޤ.
  ǥեȤ (({ /usr/local/dcpam5/bin })) Ǥ.

:(({--with-docdir=}))((|ARG|))
  ((|ARG|)) ˥ɥȥեΥ󥹥ȡꤷޤ.
  ǥեȤ (({ /usr/local/dcpam5/doc })) Ǥ.

:(({--with-dcpam_lib_name=}))((|ARG|))
  ((|ARG|))  dcpam5 Υ饤֥̾ꤷޤ.
  饤֥̾ (({lib}))((|<ARG>|))(({.a})) Ȥʤޤ.
  ǥեȤ (({ dcpam5 })) Ǥ, κݤΥ饤֥̾
  (({ libdcpam5.a })) Ȥʤޤ.

:(({--with-dcpam_suffix=}))((|ARG|))
  ((|ARG|)) ˤϥ󥹥ȡǥ쥯ȥ, 饤֥̾,
  ¹ԥեˤĤꤷޤ.
  㤨, ¾ƥǥեȤ (({ ffc5 })) Ȼꤹ,
  󥹥ȡΥǥ쥯ȥΥץեå
  (({ /usr/local/dcpam5-ffc5 })), 饤֥̾
  (({ libdcpam5-ffc5.a }))Τ褦ˤʤޤ.

:(({--with-lang_conform_check=}))((|ARG|))
  ((|ARG|)) ˸쵬ʤꤹ뤳Ȥ, ѥ˸쵬ʤ
  åԤ褦, ץɲäޤ.  "(({95}))"
  Τ߻ǽǤ. ѥˤäƤϻǤޤ.

:(({--enable-debug}))
  Υץꤹ뤳Ȥ, ѥ¹Ի˥ǥХåå
  Ϥ륪ץɲäޤ.
  ѥˤäƤϻǤޤ.

:(({--config-cache})) ޤ (({-C}))

  (({ Config.mk })) ե뤬Ʊ, (({config.cache}))
  ե뤬, (({ ./configure })) ΰ˻ꤵ줿 netCDF
  饤֥ΰ֤ʤɤξݻޤ.

   (({ ./configure })) ¹Ԥݤˤ⤳Υץꤹ뤳Ȥ,
  (({config.cache})) ɤ߹ޤ, ꤷץѤޤ.
  ¸ߤ (({config.cache})) ̵뤹ϤΥץ
  ꤻ (({ ./configure })) ¹ԤƤ.

  㤨вΤ褦 (({ ./configure })) ¹ԤȤޤ.

      $ ./configure -C  --enable-debug \
                    --with-ispack=/usr/local/lib/libisp.a \
                    --with-netcdf=/usr/local/lib/libnetcdf.a \
                    --with-gtool5=/usr/local/lib/gtool5/lib/libgtool5.a \
                    --with-spml=/usr/local/lib/spml/lib/libspml.a

  ȼʹ, Τ褦 (({ ./configure })) ¹Ԥ뤳Ȥ
  netCDF 饤֥ΰ֤, ǥХåץղä
  Ѥޤ.

      $ ./configure -C

  Debian GNU/Linux  Fujitsu Fortran ѤƤˤ,
  Config.cache.debian-ffc*  (({config.cache})) ˰ư
  (({ ./configure })) ޥɤ¹ԤǼưŪ
  饤֥ΰ֤ꤵޤ.

      $ cp Config.cache.debian-ffc5 config.cache
      $ ./configure -C

:(({--enable-mpi}))
  Υץꤹ뤳Ȥ, ǤΥѥԤޤ. 


=end JA
=begin EN

=== Create `Config.mk'

Move created directroy, and excute `(({ ./configure }))'.

Specify library files in ((<Libraries needed for compile>)) to
following options.

:(({--with-ispack=}))((|ARG|))
  ispack library filename (*.a)

:(({--with-netcdf=}))((|ARG|))
  netcdf library filename (*.a)

:(({--with-gtool5=}))((|ARG|))
  gtool5 library filename (*.a)

:(({--with-spml=}))((|ARG|))
  spmodel library filename (*.a)

For exapmle, specify as follow. This command will generate
(({ Config.mk })).

    $ ./configure --with-ispack=/usr/local/lib/libisp.a \
                  --with-netcdf=/usr/local/lib/libnetcdf.a \
                  --with-gtool5=/usr/local/lib/gtool5/lib/libgtool5.a \
                  --with-spml=/usr/local/lib/spml/lib/libspml.a \

GNU make is needed to build, so configure automatically inquires
into GNU make in PATH. However, it returns error when GNU make is
not found. In that case, please set the GNU make command for
environment variable ((* MAKE *)). And rerun execute `(({ ./configure }))'.

If you want to change directory to which the library and the module, etc.
are installed, please set (({ --help })) option as follow. Available
options are showed.

	$ ./configure --help

Descriptions about principal options are listed below.

:(({--prefix=}))((|ARG|))
  Specify prefix to ((|ARG|)).
  Default value is (({ /usr/local/dcpam5 })).

:(({--libdir=}))((|ARG|))
  Specify directory to which the library is installed to ((|ARG|)).
  Default value is (({ /usr/local/dcpam5/lib })).

:(({--includedir=}))((|ARG|))
  Specify directory to which the module is installed to ((|ARG|)).
  Default value is (({ /usr/local/dcpam5/include })).

:(({--bindir=}))((|ARG|))
  Specify directory to which the executable file is installed to ((|ARG|)).
  Default value is (({ /usr/local/dcpam5/bin })).

:(({--with-docdir=}))((|ARG|))
  Specify directory to which the documentation file is installed to ((|ARG|)).
  Default value is (({ /usr/local/dcpam5/doc })).

:(({--with-dcpam_lib_name=}))((|ARG|))
  Specify dcpam5 library name to ((|ARG|)).
  Library name becomes (({lib}))((|<ARG>|))(({.a})) .
  Default value is (({ dcpam5 })), so library name becomes
  (({ libdcpam5.a })) .

:(({--with-dcpam_suffix=}))((|ARG|))
  Specify suffix of installdir, library name, executable files to((|ARG|)).
  For example, you specify (({ ffc5 })) when others are default,
  prefix of installdir becomes (({ /usr/local/dcpam5-ffc5 })),
  library name becomes (({ libdcpam5-ffc5.a })),
  executable files become (({ gt4frt.ffc5 })), (({ gt4config.ffc5 })).

:(({--with-lang_conform_check=}))((|ARG|))
  Specify language standard to ((|ARG|)).
  And when you compile source code, check the language standard conformance.
  Now, "(({95}))" is valid.
  The compiler that can be used is limited.

:(({--enable-debug}))
  When you compile source code and execute binary file, output debug
  messages.
  The compiler that can be used is limited.

:(({--config-cache or -C}))
  (({ config.cache })) is created at the same time as (({ Config.mk }))'s
  being generated.
  (({ config.cache })) stores information investigated with
  (({ ./configure })).

  If you set this option, when you execute (({ ./configure })) again,
  (({config.cache})) is loaded.
  If you want to ignore (({config.cache})), don't set this option

  For example, execute (({ ./configure })) as follows.

      $ ./configure -C  --enable-debug \
                    --with-ispack=/usr/local/lib/libisp.a \
                    --with-netcdf=/usr/local/lib/libnetcdf.a \
                    --with-gtool5=/usr/local/lib/gtool5/lib/libgtool5.a \
                    --with-spml=/usr/local/lib/spml/lib/libspml.a \

  Then, information such as the locations of the netCDF library etc. is
  succeeded by executing (({ ./configure })) as follows after next time.

      $ ./configure -C

  If you use Fujitsu Fortran compiler in Debian GNU/Linux,
  copy "Config.cache.debian-ffc*" to (({config.cache})) and
  execute (({ ./configure })). So, locations of libraries are
  specified automatically.

      $ cp Config.cache.debian-ffc5 config.cache
      $ ./configure

:(({--enable-mpi}))
  If you set this option, the parallelized version is compiled. 


=end EN



=begin JA
=== Config.mk Խ

嵭 configure ˤä, Ū꤬Ҥ줿
(({ Config.mk })) ե뤬ޤ. 
, ĶˤäƤ configure ΤߤǤԽʬʾ⤢뤿,
ɬפ˱ Config.mk ưԽƲ.

ʲ˼פܤ󤲤ޤ. 

:FC
  Fortran ѥ

:SYSFFLAGS
  ѥ󥯻ɬפʥե饰
  (Fortran ѥ¹Իɬפʥץ)

:SYSLDFLAGS
  󥯻ɬפʥե饰

:SYSLDLIBS
  󥯻ɬפʥ饤֥

:prefix
  dcpam5 Υ饤֥, ⥸塼, ¹ԥե,
  ɥȤΥ󥹥ȡǥ쥯ȥ

:CLEAN_MODS
  make clean ˻Ѥ⥸塼ե

:MAKE
  GNU make ޥ

:AR
  ֥ޥ

:ARFLAGS
  ֻɬפʥե饰

:RANLIB
  ֤Υǥå륳ޥ


=end JA
=begin EN
=== Edit `Config.mk'

A file '(({ Config.mk }))' in which elemental settings are written
is created by above "configure". 
However, the settings may be insufficient by "configure" in some environments.
In that case, edit '(({ Config.mk }))' manually according to need. 

Followings are main items.

:FC
  Fortran compiler

:SYSFFLAGS
  Flags needed when compiled and linked

:SYSLDFLAGS
  Flags needed when linked

:SYSLDLIBS
  Libraries needed when linked

:prefix
  Directory where dcpam5 library, modules, executable files,
  and documentations are installed

:CLEAN_MODS
  Extensions of Module Files used when "make clean"

:MAKE
  GNU make command

:AR
  Archive command

:ARFLAGS
  Flag of Archive command

:RANLIB
  Generate index to archive command

=end EN


=begin JA
=== ɤΥѥ

ӥɤˤɬ GNU make ѤƤ. ¾ "make" ץ
Ѥ, ӥɤԤޤ.
ʹ GNU make Υޥ̾ "make" ɽޤ,
ϥƥ GNU make ޥɤ֤̾Ƥ.

configure ¹Ի, ʲΤ褦 GNU make Υޥ̾
ɽ줿ϤǤ. Υå˽ä GNU make ¹ԤƤ. 

  Execute GNU make in the current directory, as follows.

    /usr/bin/make

ʲΤ褦ʥåɽХӥɤǤ. 

    You have successfully built dcpam5.

=end JA
=begin EN
=== Compile source code

You must use GNU make to build. No other "make" program is acceptable.
"make" tentatively means GNU make at the following.
Replace them with GNU make of your system.

When ./configure is executed, the command name of GNU make is
displayed as follows. Execute GNU make according to the
message.

  Execute GNU make in the current directory, as follows.

    /usr/bin/make

If dcpam5 is built successfully, following messages will be displayed.

    You have successfully built dcpam5.

=end EN


=begin JA
=== ɥȤ

ޥ˥奢ȥɥե󥹤Υѥϥȥǥ쥯ȥ
ˤ, ʲΥޥɤ¹ԤƤ.
((<dcpam5  TGZ ѥå|URL:http://www.gfd-dennou.org/library/dcpam/dcpam5/dcpam5_latest.tgz>))
ꤹˤϴѤߤǤ.

	$ make doc
=end JA
=begin EN
=== Generate documentations

To generate documentations, execute following command in current directory.
If you get from
((<dcpam5 TGZ package|URL:http://www.gfd-dennou.org/library/dcpam/dcpam5/dcpam5_latest.tgz>)),
documentations are already generated.

	$ make doc
=end EN

=begin JA
== ץ¹Ԥμ

ӥɤ, src/main ʲ ((*dcpam_main*)), ((*init_data*)), ((*sst_data*))
ʤɤμ¹ԥե뤬Ƥޤ. 

μ¹ԤμˤĤƤ
((<餯 dcpam5|URL:doc/gokuraku>)) 򻲾ȤƤ. 
#((<餯餯 dcpam5|URL:doc/rakuraku>)) 򻲾ȤƤ. 

=end JA
=begin EN
== Execute programs

If dcpam5 is built successfully,
some executable files ((*dcpam_main*)), ((*init_data*)), ((*sst_data*)) are
created under "src/main".

See ((<GOKURAKU (easiest) dcpam5|URL:doc/gokuraku/index.htm.en>)) for execution of the files. . 
#See ((<RAKURAKU (easier) dcpam5|URL:doc/rakuraku/index.htm.en>)) for execution of the files. 

=end EN


#=begin JA
#== Fortran 90/95 ץԽμ
#
#((<餯餯 dcpam5 ()|URL:doc/tutorial/rakuraku>)) 򻲾ȤƤ.
#
#=end JA
#=begin EN
#== How to edit Fortran 90/95 programs
#
#See ((<RAKURAKU (easier) dcpam5 (under construction)|URL:doc/tutorial/rakuraku/index.htm.en>)). 
#
#=end EN


=begin HTML
<hr>
<small>$Id: INSTALL,v 1.33 2014-03-10 04:37:06 yot Exp $
</small>
=end HTML

#== Mode setting for Emacs
#Local Variables:
#mode: rd
#End:
#
