Added "conv-config.sh", which wraps "conv-mach.sh" and adds default
[charm.git] / src / scripts / conv-config.sh
1 #!/bin/sh
2 #
3 # Generic converse configuration script:
4 #   Reads various configuration scripts and sets defaults.
5
6 if [ -z "$CHARMINC" ]
7 then
8         echo "conv-config.sh: CHARMINC must point to the charm include dir"
9         exit 1
10 fi
11
12 if [ -r $CHARMINC/conv-mach-pre.sh ]
13 then
14 . $CHARMINC/conv-mach-pre.sh
15 fi
16
17 if [ ! -r $CHARMINC/conv-mach.sh ]
18 then
19         echo "Can't find conv-mach.sh in $CHARMINC directory."
20         exit 1
21 fi
22
23 . $CHARMINC/conv-mach.sh
24
25 [ -z "$CMK_C_OPTIMIZE" ] && CMK_C_OPTIMIZE="-O"
26 [ -z "$CMK_C_DEBUG" ] && CMK_C_DEBUG="-g"
27 [ -z "$CMK_CXX_OPTIMIZE" ] && CMK_CXX_OPTIMIZE="$CMK_C_OPTIMIZE"
28 [ -z "$CMK_CXX_DEBUG" ] && CMK_CXX_DEBUG="$CMK_C_DEBUG"
29 [ -z "$CMK_F90_OPTIMIZE" ] && CMK_F90_OPTIMIZE="-O"
30 [ -z "$CMK_F90_DEBUG" ] && CMK_F90_DEBUG="-O"
31
32 [ -z "$CMK_CC" ] && CMK_CC='cc '
33 [ -z "$CMK_CXX" ] && CMK_CXX='c++ '
34 [ -z "$CMK_SUF" ] && CMK_SUF='o'
35 [ -z "$CMK_AR" ] && CMK_AR='ar q'
36 [ -z "$CMK_QT" ] && CMK_QT='generic'
37 [ -z "$CMK_LD" ] && CMK_LD="$CMK_CC"
38 [ -z "$CMK_LDXX" ] && CMK_LDXX="$CMK_CXX"
39
40 [ -z "$CMK_CF90_FIXED" ] && CMK_CF90_FIXED="$CMK_CF90"
41 [ -z "$CMK_CC_RELIABLE" ] && CMK_CC_RELIABLE="$CMK_CC"
42 [ -z "$CMK_CC_FASTEST" ] && CMK_CC_FASTEST="$CMK_CC"
43 [ -z "$CMK_CC_RELIABLE" ] && CMK_CC_RELIABLE="$CMK_CC"
44 [ -z "$CMK_SEQ_CC" ] && CMK_SEQ_CC="$CMK_CC"
45 [ -z "$CMK_SEQ_CXX" ] && CMK_SEQ_CXX="$CMK_CXX"
46 [ -z "$CMK_SEQ_LD" ] && CMK_SEQ_LD="$CMK_LD"
47 [ -z "$CMK_SEQ_LDXX" ] && CMK_SEQ_LDXX="$CMK_LDXX"
48 [ -z "$CMK_SEQ_F90" ] && CMK_SEQ_F90="$CMK_CF90"
49 [ -z "$CMK_SEQ_AR" ] && CMK_SEQ_AR="$CMK_AR"
50 [ -z "$CMK_SEQ_RANLIB" ] && CMK_SEQ_RANLIB="$CMK_RANLIB"
51
52 if [ -r $CHARMINC/conv-mach-opt.sh ]
53 then
54 . $CHARMINC/conv-mach-opt.sh
55 fi
56