Update version info for release v4.6.1 (#2122)
[WRF.git] / chem / KPP / configure_kpp
bloba1b8a346b86fbcb0c367f1a82644653a719be75a
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 elif test -e "${FLEX_LIB_DIR}/libfl.so" ; then
84 echo location of flex library: ${FLEX_LIB_DIR}/libfl.so
86 else
87 echo No libfl.a or libfl.so in ${FLEX_LIB_DIR}
88 echo ' check if FLEX_LIB_DIR environment variable is set correctly'
89 echo ' (FLEX_LIB_DIR should be the complete pathname of the FLEX library libfl.a or libfl.so)'
90 echo ' OR: Enter full path to flex library on your system'
91 read FLEX_LIB_DIR
92 if test ! -e ${FLEX_LIB_DIR}/libfl.a && test ! -e ${FLEX_LIB_DIR}/libfl.so ; then
93 echo PROBLEM: libfl.a or libfl.so NOT FOUND IN ${FLEX_LIB_DIR}
94 read FLEX_LIB_DIR
95 fi
101 # get SCC from configure.wrf
103 PCC=`grep -e CC ./configure.wrf | grep -v make | grep -e "=" | grep -v SCC | grep -v TOOLS`
104 PSCC=`grep -e SCC ./configure.wrf | grep -v make | grep -e "="`
107 ##PSCC="SCC = cc"
109 export PCC
110 export PSCC
113 echo $PCC
114 echo $PSCC
115 echo writing chem/${WKC_DIRNAME}/configure.kpp
117 echo "-----------------------------------------"
121 cat <<END1 >chem/${WKC_DIRNAME}/configure.kpp
123 # This file was automatically written by the configure_kpp script
124 # MANUAL CHANGES WILL BE LOST !
126 # this file is in parts based on the original Makefile.defs from KPP
130 $PCC
131 $PSCC
134 # Uncomment or set your path to yacc in your environment
135 # YACC=yacc -d
138 # The name of your lexical analizer. KPP requires FLEX to be used.
139 # FLEX is a public domain lexical analizer and you can download it from
140 # http://www.gnu.org/software/flex/ or any other mirror site. If flex
141 # directory is not included in your path use the complete pathname.
144 FLEX=$FLEX
147 # The complete pathname of the FLEX library (libfl.a).
148 # On many systems this is: /usr/local/util/lib/flex
149 FLEX_LIB_DIR = $FLEX_LIB_DIR
156 CC_FLAGS=$CC_FLAGS
158 ##############################################################################
160 END1
162 exit 0