1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348
|
=================================================================
What's new
=================================================================
1) ADFH/HDF5 option to configure
2) shared libraries
3) debugging option
4) large file support
5) Added LOWERCASE__ (g77) and UPPERCASE__ to the Fortran
to C interface and control of this with configure
6) configure options for Windows
7) bug fixes
8) The library is now created as SYSTEM/libcgns.a (same place
as the object files) instead of lib/libcgns.SYSTEM.a
9) The distribution and use of the CGNS software is now
covered by the the zlib/libpng License
see below for configuring the options
There is also a new subdirectory, f2c, which contains some simple
code to help with setting up the Fortran to C interface. See the
README in that directory.
=================================================================
To compile the CGNS library under Unix, Linux, Cygwin, Mac, .etc:
=================================================================
chmod +x configure
./configure [options]
make [SYSTEM=XXX] [target]
The arguments in [] are optional, and if given should be specified
without the [].
The recognized options to configure are:
--enable-gcc
Normally, the configure script will search for the native C compiler (cc)
before trying to find gcc. This option reverses this order.
--enable-debug[=OPTS]
This enables a debug version of the library. Normally, this just sets the
-g option for compiling, and prevents stripping the library and
executables. If 'OPTS' is given, this is taken as the compile options
to be used instead. i.e. --enable-debug=-g gives the default.
--with-system=XXX
overrides the default system type (see below) and sets the system type
to 'XXX'. If not given, the system type will be determined from the
'cgsystem' script.
--enable-64bit
This option turns on 64-bit compilation, where applicable.
--enable-lfs
This enables large file support (files larger than 2 Gb), where
applicable. Your kernel must also be capable of LFS for this to
make a difference.
--with-fortran[=F2C]
By default the Fortran interface is enabled, and the configure script
trys to determine the proper Fortran to C interface. If you specify
--without-fortran or --with-fortran=no, the Fortran interface will
not be built. To change the Fortran to C interface, specify 'F2C' as
one of LOWERCASE, LOWERCASE_, LOWERCASE__, UPPERCASE, UPPERCASE_, or
UPPERCASE__.
*** NOTE ***
If you are using g77, and want to use the compiler without the
-fno-second-underscore flag, then use --with-fortran=LOWERCASE__.
This should work fine with the MLL routines, but you will NOT
be able to use the ADF routines, since you will get unresolved
external references when you try to link. The reason is that g77
appends 2 underscores to names which have an underscore in them
(the cg_* routines), but only 1 underscore to names that don't
(the adf* routines). I don't know why - but that what's
happening (at least with my version of g77). You may play
around with the test case in the f2c subdirectory and see if
you can come up with a solution - if so, let me know.
************
--enable-shared[=all]
This enables the building of a shared library. Currently, only Linux,
HP, SGI and SUN OS's are supported. If you specify --enable-shared=all,
then the script will also attempt to use shared libraries for HDF5,
zlib, and sziplib if HDF5 support is being built.
--with-hdf5[=DIR]
This enables the ADFH interface to HDF5, instead of the ADF default.
If 'DIR' is specified, then it should be the top-level directory of
the HDF5 distribution. If not given, the script will check if HDF5
is installed and use that. If not installed, then the script will
search for a local distribution.
--with-zlib[=LIB]
This specifies that zlib is to be used with HDF5. This is only needed
if HDF5 was built with zlib support. If 'LIB' is given,it should be the
pathname to the zlib library. If not given, the script will check for
first an installed version, and then a local distribution.
--with-szip[=LIB]
This specifies that szip is to be used with HDF5. This is only needed
if HDF5 was built with szip support. If 'LIB' is given,it should be the
pathname to the szip library. If not given, the script will check for
first an installed version, and then a local distribution.
--prefix=PREFIX
--exec_prefix=EPREFIX
--libdir=LIBDIR
--includedir=INCLUDEDIR
These set the installation directories for the CGNS library and headers.
By default, the library will be installed as:
/usr/local/lib/libcgns.a
and the headers as:
/usr/local/include/cgnslib.h
/usr/local/include/cgnslib_f.h
/usr/local/include/cgnswin_f.h
See the autoconf documentation for a description of these options, or
run './configure --help' for a brief overview. Use absolute paths or
shell environment variables when specifying a directory, since the
'configure' is interpreted by 'sh' not 'csh'. i.e: use --prefix=$HOME
instead of --prefix=~ .
The configure script creates 2 files which get included by Makefile.
The first is 'make.system', which consists of the single line
SYSTEM=XXX
and defines the default system type. This file is overwritten any
time the 'configure' script is run. The second file contains the
system specific settings, 'make.defs'. This is renamed to 'make.XXX'
where XXX is the system type, if the file does not already exist.
If you need to change any of the makefile settings, the 'make.XXX'
file is the one to do it in.
The 'SYSTEM=XXX' argument to make overrides the default SYSTEM setting
defined in the 'make.system' file. The 'XXX' here is the desired system
type. In order to build the library the file 'make.XXX' must exist.
Make will put all the object modules in a subdirectory with the
same name as the system type, and the library will be named
lib/libcgns.XXX.a where XXX is the system type.
The available make targets are:
all
This is the default target (if target is not given). This builds
the CGNS library 'lib/libcgns.XXX.a'
clean
This removes all the object files. The library is not affected.
distclean
Removes the object files, library and files generated by 'configure'
install
Installs the library and headers. Builds the library if needed.
You will need write permission to the installation directories.
uninstall
Uninstalls the library and headers. You will need write permission
to the installation directories.
----------------------------------------------------------------------
For compiling on multiple platforms, run 'configure' on each platform
to create the make.XXX files, edit them if needed, then use:
make SYSTEM=XXX
This will override the SYSTEM setting in 'make.system', which will be
set to that for the system on which 'configure' was last run.
You may also use the 'build' script, which uses 'cgsystem' to get the
system type, then runs "make SYSTEM=XXX'. This script will also create
the 'make.XXX' file if it does not already exist.
./build [[-][enable-]64[bit]]
The only argument to 'build' is the 64-bit flag.
----------------------------------------------------------------------
The system type is determined by executing the 'cgsystem' script.
./cgsystem [[-][enable-]64[bit]] [[-]cur[rent]] [[-]conf[igure]]
Again, everything in [] are optional, and the [] are not included.
If no arguments are given, then 'cgsystem' returns the default
system type. The '[-][enable-]64[bit]' option enables 64-bit as for
the 'configure' script. The '[-]cur[rent]' option returns the
current system type, which is that defined in 'make.system', and
the '[-]conf[igure]' option will update the 'make.system' file.
Currently defined system types are:
ALPHA DEC Alpha/OSF
APOLLO HP 300 running Domain/OS
BSD386 80[345]86 running BSD
BSDM68K Motorola 68K running NetBSD
BSDMIPS Mips running NetBSD
CONVEX Convex
CRAY Cray, Cray-2, Cray XMP
CYGWIN POSIX emulation on top of Windows
DARWIN Macintosh running Darwin
DEC DEC
FREEBSD FreeBSD
HPPA HP 9000 PA-Risc
HPPA10 HP 9000 PA-Risc running OS 10.x
HPPA11 HP 9000 PA-Risc running OS 11.x (32-bit)
HPPA64 HP 9000 PA-Risc running OS 11.x (64-bit)
HPIT HP with 64-bit Intel processor (32-bit)
HPIT64 HP with 64-bit Intel processor (64-bit)
HP HP
I860 Intel Hypercube
IBM IBM running AIX
IBM64 IBM with AIX 4.3 or above (64-bit)
LINUX Linux
LINUX64 64-bit Linux
M88K Motorola M88100 running Real/IX
MACOSX Power Macintosh runing OSx
NETBSD NetBSD not defined elseware
NEXT NeXT
OS2 OS/2
PGON Intel Paragon
SGI5 Silicon Graphics running OS 5.x
SGI6 Silicon Graphics running OS 6.x
SGI64 Silicon Graphics (64-bit)
SGI Silicon Graphics
SUN3 Sun 3
SUN4 Sun 4, 4c, sparc, .etc
SUN64 Sun 4 (64-bit)
SUN Sun
VAX DEC/Microvax
UNKNOWN couldn't determine system type
Executing './cgsystem [-]help', will display the above information.
=================================================================
To compile under MS Windows:
=================================================================
configure.bat [options]
then
gmake
if using GNU make, or
nmake
if using nmake.
NOTE: This assumes that the cl compiler is in your path, and that the
INCLUDE and LIB environment variables are set to include the
directories containing the MSC include files and libraries.
If not, you will need to use full path names to cl and link,
and define INCLUDE and LIB in make.win32. You may also execute
VCVARS32.BAT in the BIN directory of your VC installation to
set these up prior to running nmake.
VC7 USERS: I have added code to cgnslib.c to handle the unresolved
reference to __ftol2. You will need to add -DNEED_FTOL2 to
your compile options for cgnslib.c to enable this, or add
ftol2.obj to your link line.
see http://www.manusoft.com/Resources/ARXTips/Main.stm
The options to configure are:
-ML
Build library as single-threaded using libc.lib (this is the default)
-MT
Build library as multi-threaded using libcmt.lib
-MD
Build library as multi-threaded using run-time library mscvrt.lib
-debug
Enable debug (-Zi) option for compiler and (/debug) for linker
-lfs
Enable large file support (files larger then 2 Gb)
-gmake
Create a gmake compatible makefile, instead of nmake
-f2c [type]
Allows you to override the default Fortran to C interface, which
is compatible with Visual Fortran. I you are using a Fortran
compiler which uses Unix-type interfaces (i.e. Absoft Fortran),
then specify the Fortran to C interface with 'type' as one of
LOWERCASE, LOWERCASE_, LOWERCASE__, UPPERCASE, UPPERCASE_, or
UPPERCASE__. If 'type' is not given, it defaults to LOWERCASE_,
which is the most common. You may also disable the Fortran to C
interface completely by setting 'type' to none.
-ifort
Configure to use the Intel Fortran compiler, ifort. This option
will set the UPPERCASE Fortran to C interface option, and replace
the F77=f77 with F77=ifort in the make.WIN32 file.
-absoft
Configure to use the absoft Fortran compiler. This option will
set the LOWERCASE Fortran to C interface option. Since the absoft
compiler is case-sensitive, you should use lowercase to call
the CGNS routines from your Fortran code. If you want to use
uppercase calls, then use the -f2c UPPERCASE option.
-install instdir
Sets the installation directory to 'instdir'. The directory should
be specified without spaces, i.e. use c:\Progra~1\CGNS instead
of c:\Program Files\CGNS. The default is the root directory of the
current drive. The library will be installed as:
%installdir%\lib\libcgns.lib
and the headers
%installdir%\include\cgnslib.h
%installdir%\include\cgnslib_f.h
%installdir%\include\cgnswin_f.h
-hdf5 [hdf5dir]
This enables the ADFH interface to HDF5, instead of the ADF default.
If 'hdf5dir' is specified, then it should be the top-level directory of
the HDF5 distribution. If not given, the script will search the current
drive for a local distribution.
-zlib [zliblib]
This specifies that zlib is to be used with HDF5. This is only needed
if HDF5 was built with zlib support. If 'zliblib' is given,it should be
the pathname to the zlib library. If not given, the script will search
the current drive for the library.
-szip [sziplib]
This specifies that szip is to be used with HDF5. This is only needed
if HDF5 was built with szip support. If 'sziplib' is given,it should be
the pathname to the szip library. If not given, the script will search
the current drive for the library.
The 'cgsystem.bat' supports only the [-]conf[igure] option
and returns 'WIN32'
----------------------------------------------------------------------
If you have any additions or corrections to make, please send them to:
Bruce Wedan
bruce.wedan@ansys.com
|