#!/bin/sh # +-======-+ # Copyright (c) 2003-2007 United States Government as represented by # the Admistrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE, # REPRODUCTION, DISTRIBUTION, MODIFICATION AND REDISTRIBUTION OF CERTAIN # COMPUTER SOFTWARE ORIGINALLY RELEASED BY THE UNITED STATES GOVERNMENT AS # REPRESENTED BY THE GOVERNMENT AGENCY LISTED BELOW ("GOVERNMENT AGENCY"). # THE UNITED STATES GOVERNMENT, AS REPRESENTED BY GOVERNMENT AGENCY, IS AN # INTENDED THIRD-PARTY BENEFICIARY OF ALL SUBSEQUENT DISTRIBUTIONS OR # REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. ANYONE WHO USES, REPRODUCES, # DISTRIBUTES, MODIFIES OR REDISTRIBUTES THE SUBJECT SOFTWARE, AS DEFINED # HEREIN, OR ANY PART THEREOF, IS, BY THAT ACTION, ACCEPTING IN FULL THE # RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS AGREEMENT. # # Government Agency: National Aeronautics and Space Administration # Government Agency Original Software Designation: GSC-15354-1 # Government Agency Original Software Title: GEOS-5 GCM Modeling Software # User Registration Requested. Please Visit http://opensource.gsfc.nasa.gov # Government Agency Point of Contact for Original Software: # Dale Hithon, SRA Assistant, (301) 286-2691 # # +-======-+ # # Creates configuration Makefile. Before attempting to make anything # in this directory, enter # # ./configure # # !REVISION HISTORY # # 09oct97 da Silva Initial code. # 19oct97 da Silva Simplified. # 22oct97 Jing Guo Converted to libpsas.a environment # - special configuration for CRAY # - fool-prove configuration # - additional information # 23dec99 da Silva Modified error messages. # #..................................................................... c=`basename $0 .sh` # Node > OS # --------------------------------------- # Node specific configuration # --------------------------------------- makeconf="Makefile.conf.`uname -n | awk '{print $1}' | cut -f1 -d.`" # Machine specific # ---------------- if [ ! -r ${makeconf} ]; then echo "$c: not using site specific ${makeconf} in `pwd`" 1>&2 machine="`uname -m | awk '{print $1}'`" machine=`echo $machine | tr "[a-z]" "[A-Z]"` if [ $?F90 != 0 ]; then compiler=$F90 makeconf="Makefile.conf.`uname -s | awk '{print $1}'`" makeconf="${makeconf}.${machine}.${compiler}" fi fi # Site specific configuration # --------------------------- if [ ! -r ${makeconf} ]; then echo "$c: not using site specific ${makeconf} in `pwd`" 1>&2 makeconf="Makefile.conf.`uname -s | awk '{print $1}'`" fi # if the OS is UNICOS, it does not follow the convention # ------------------------------------------------------ if [ ! -r ${makeconf} ]; then echo "$c: cannot find ${makeconf} in `pwd`" 1>&2 mech="`uname -m | awk '{print $1}'`" if [ "${mech}" = CRAY ]; then makeconf="Makefile.conf.UNICOS" fi fi # if all are failed, make a simple one # --------------------------------------- if [ ! -r ${makeconf} ]; then echo "$c: cannot find ${makeconf} in `pwd` " 1>&2 makeconf="Makefile.conf.unknown" if [ ! -r ${makeconf} ]; then touch ${makeconf} fi fi rm -f Makefile.conf ln -s ${makeconf} Makefile.conf echo "$c: using ${makeconf} in `pwd`" 1>&2 # Configure subdirectories # ------------------------ make conf #.