updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / chem / KPP / configure_kpp
blobd2fe9259a9f71183540b5995c8fa35a7b0fae063
1 #!/bin/sh
3 # much of the nice documentation for some of the options was taken from
4 # KPP's Makefile.defs. To give a little credit let's
5 cat chem/KPP/documentation/wkc_kpp.txt
8 # The name of your lexical analizer. KPP requires FLEX to be used.
9 # FLEX is a public domain lexical analizer and you can download it from
10 # http://www.gnu.org/software/flex/ or any other mirror site. If flex
11 # directory is not included in your path use the complete pathname.
13 FLEX="flex"
18 # The complete pathname of the FLEX library (libfl.a).
19 # On many systems this is: /usr/local/util/lib/flex
20 # on other systems, the path can be a bit strange
21 # FLEX_LIB_DIR=/afs/ipp-garching.mpg.de/rs_aix53/soft/gnu/lib
22 # the default is FLEX_LIB_DIR="/usr/lib"
25 # Look for flex lib directory
26 # if FLEX_LIB_DIR environment variable is not set then check in /usr/lib
28 if test -z "$FLEX_LIB_DIR" ; then
29 for p in /usr/lib
31 if test -d $p ; then
32 FLEX_LIB_DIR=$p
33 break
35 done
38 # if FLEX_LIB_DIR environment variable is not set then check in /usr/lib64
40 if test -z "$FLEX_LIB_DIR" ; then
41 for p in /usr/lib64
43 if test -d $p ; then
44 FLEX_LIB_DIR=$p
45 break
47 done
51 # if FLEX_LIB_DIR environment variable is not set then check in /usr/local/lib
53 if test -z "$FLEX_LIB_DIR" ; then
54 for p in /usr/local/lib
56 if test -d $p ; then
57 FLEX_LIB_DIR=$p
58 break
60 done
64 # Platform independent C compiler flags. By default "-O0" is used which
65 # turns off all optimisation. If you are experiencing problems you may try
66 # "-g" to include debuging informations.
68 CC_FLAGS="-O0"
72 export FLEX
73 export FLEX_LIB_DIR
74 export CC_FLAGS
76 echo "------------------------------------------"
77 echo " configure_kpp, settings:"
79 # see if we can find libfl.a
80 if test -e "${FLEX_LIB_DIR}/libfl.a" ; then
81 echo location of flex library: ${FLEX_LIB_DIR}/libfl.a
83 else
84 echo No libfl.a in ${FLEX_LIB_DIR}
85 echo ' check if FLEX_LIB_DIR environment variable is set correctly'
86 echo ' (FLEX_LIB_DIR should be the complete pathname of the FLEX library libfl.a)'
87 echo ' OR: Enter full path to flex library on your system'
88 read FLEX_LIB_DIR
89 if test ! -e ${FLEX_LIB_DIR}/libfl.a ; then
90 echo PROBLEM: libfl.a NOT FOUND IN ${FLEX_LIB_DIR}
91 read FLEX_LIB_DIR
92 fi
98 # get SCC from configure.wrf
100 PCC=`grep -e CC ./configure.wrf | grep -v make | grep -e "=" | grep -v SCC | grep -v TOOLS`
101 PSCC=`grep -e SCC ./configure.wrf | grep -v make | grep -e "="`
104 ##PSCC="SCC = cc"
106 export PCC
107 export PSCC
110 echo $PCC
111 echo $PSCC
112 echo writing chem/${WKC_DIRNAME}/configure.kpp
114 echo "-----------------------------------------"
118 cat <<END1 >chem/${WKC_DIRNAME}/configure.kpp
120 # This file was automatically written by the configure_kpp script
121 # MANUAL CHANGES WILL BE LOST !
123 # this file is in parts based on the original Makefile.defs from KPP
127 $PCC
128 $PSCC
131 # Uncomment or set your path to yacc in your environment
132 # YACC=yacc -d
135 # The name of your lexical analizer. KPP requires FLEX to be used.
136 # FLEX is a public domain lexical analizer and you can download it from
137 # http://www.gnu.org/software/flex/ or any other mirror site. If flex
138 # directory is not included in your path use the complete pathname.
141 FLEX=$FLEX
144 # The complete pathname of the FLEX library (libfl.a).
145 # On many systems this is: /usr/local/util/lib/flex
146 FLEX_LIB_DIR = $FLEX_LIB_DIR
153 CC_FLAGS=$CC_FLAGS
155 ##############################################################################
157 END1
159 exit 0