~ubuntu-branches/ubuntu/utopic/adios/utopic

« back to all changes in this revision

Viewing changes to adios_config

  • Committer: Package Import Robot
  • Author(s): Alastair McKinstry
  • Date: 2013-12-09 15:21:31 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20131209152131-jtd4fpmdv3xnunnm
Tags: 1.5.0-1
* New upstream.
* Standards-Version: 3.9.5
* Include latest config.{sub,guess} 
* New watch file.
* Create libadios-bin for binaries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
fi
14
14
. ${FLAGSFILE}
15
15
 
 
16
GITSTATFILE=`dirname $0`/git.status
 
17
if [ -f ${GITSTATFILE} ]; then
 
18
    . ${GITSTATFILE}
 
19
fi
 
20
 
16
21
function Usage () {
17
 
    echo "`basename $0` [-d | -c | -l] [-f] [-r] [-s] [-v]
 
22
    echo "`basename $0` [-d | -c | -l] [-f] [-r] [-s] [-1] [-v] [-i]
18
23
Arguments
19
 
   -d   Print base directory for ADIOS install
20
 
   -c   Print compiler flags for C/C++, using ADIOS write/read methods
21
 
   -l   Print linker flags for C/C++, using ADIOS write/read methods
 
24
   -d   Base directory for ADIOS install
 
25
   -c   Compiler flags for C/C++, using ADIOS write/read methods
 
26
   -l   Linker flags for C/C++, using ADIOS write/read methods
 
27
 
22
28
   -f   Print above flags for Fortran90
23
29
   -r   Print above flags for using ADIOS read library only.
24
30
   -s   Print above flags for using ADIOS in a sequential code (no MPI). 
25
 
   -v   Print version of the installed package
 
31
   -1   Print above flags for using old Read API of ADIOS.
 
32
 
 
33
   -v   Version of the installed package
 
34
   -i   More installation information about the package
 
35
 
26
36
Notes
27
37
   - Multiple options of d,c,l are enabled. In such a case, the output is
28
38
     a list of FLAG=flags, where FLAG is one of (DIR, CFLAGS, LDFLAGS)
41
51
OPT_SEQ=no
42
52
NFLAGS_ASKED=0
43
53
 
44
 
while getopts ":dclfrsvh" Option
 
54
while getopts ":dclfrs1vih" Option
45
55
do          
46
56
  case $Option in               
47
57
        d) PRINT_DIR=yes; let "NFLAGS_ASKED=NFLAGS_ASKED+1";;
50
60
        f) OPT_FORTRAN=yes;;
51
61
        r) OPT_READ=yes;;
52
62
        s) OPT_SEQ=yes;;
53
 
        v) echo "$VERSIONSTRING"; exit 0;;
 
63
        1) OPT_V1=yes;;
 
64
        v) echo "$VERSIONSTRING"; 
 
65
           exit 0;;
 
66
        i) echo "ADIOS $VERSIONSTRING"; 
 
67
           echo "Installed from source directory: $SRCDIR"; 
 
68
           if [ ! -z "$GITLOG" ]; then echo "$GITLOG"; fi 
 
69
           if [ ! -z "$GITSTAT" ]; then echo "Git status of source directory:"; echo "$GITSTAT"; fi 
 
70
           exit 0;;
54
71
        h) Usage; exit 0;;
55
72
        *) echo "Invalid option -$Option."; Usage; exit 255;;   # DEFAULT
56
73
  esac
79
96
if [ "$PRINT_CFLAGS" == "yes" ]; then
80
97
    if [ "$OPT_READ" == "yes" ]; then
81
98
        if [ "$OPT_SEQ" == "yes" ]; then
82
 
            CFLAGS="$ADIOSREAD_SEQ_INC"
 
99
            if [ "$OPT_V1" == "yes" ]; then
 
100
                CFLAGS="$ADIOSREAD_SEQ_V1_INC"
 
101
            else
 
102
                CFLAGS="$ADIOSREAD_SEQ_INC"
 
103
            fi
83
104
        else
84
 
            CFLAGS="$ADIOSREAD_INC"
 
105
            if [ "$OPT_V1" == "yes" ]; then
 
106
                CFLAGS="$ADIOSREAD_V1_INC"
 
107
            else
 
108
                CFLAGS="$ADIOSREAD_INC"
 
109
            fi
85
110
        fi 
86
111
    else
87
112
        if [ "$OPT_SEQ" == "yes" ]; then
101
126
        if [ "$OPT_READ" == "yes" ]; then
102
127
            # ADIOSREAD + SEQ
103
128
            if [ "$OPT_FORTRAN" == "yes" ]; then
104
 
                LDFLAGS="$ADIOSREAD_SEQ_FLIB"
 
129
                if [ "$OPT_V1" == "yes" ]; then
 
130
                    LDFLAGS="$ADIOSREAD_SEQ_V1_FLIB"
 
131
                else
 
132
                    LDFLAGS="$ADIOSREAD_SEQ_FLIB"
 
133
                fi
105
134
            else
106
135
                LDFLAGS="$ADIOSREAD_SEQ_CLIB"
107
136
            fi
108
137
        else  # ADIOS + SEQ
109
138
            if [ "$OPT_FORTRAN" == "yes" ]; then
110
 
                #LDFLAGS="$ADIOS_SEQ_FLIB"
111
 
                LDFLAGS="There is no Fortran library of ADIOS for sequential codes"
 
139
                if [ "$OPT_V1" == "yes" ]; then
 
140
                    LDFLAGS="$ADIOS_SEQ_V1_FLIB"
 
141
                else
 
142
                    LDFLAGS="$ADIOS_SEQ_FLIB"
 
143
                fi
112
144
            else
113
145
                LDFLAGS="$ADIOS_SEQ_CLIB"
114
146
            fi
116
148
    elif [ "$OPT_READ" == "yes" ]; then
117
149
        # ADIOSREAD + parallel code
118
150
        if [ "$OPT_FORTRAN" == "yes" ]; then
119
 
            LDFLAGS="$ADIOSREAD_FLIB"
 
151
            if [ "$OPT_V1" == "yes" ]; then
 
152
                LDFLAGS="$ADIOSREAD_V1_FLIB"
 
153
            else
 
154
                LDFLAGS="$ADIOSREAD_FLIB"
 
155
            fi
120
156
        else
121
157
            LDFLAGS="$ADIOSREAD_CLIB"
122
158
        fi
123
159
    else 
124
160
        # ADIOS + parallel code
125
161
        if [ "$OPT_FORTRAN" == "yes" ]; then
126
 
            LDFLAGS="$ADIOS_FLIB"
 
162
            if [ "$OPT_V1" == "yes" ]; then
 
163
                LDFLAGS="$ADIOS_V1_FLIB"
 
164
            else
 
165
                LDFLAGS="$ADIOS_FLIB"
 
166
            fi
127
167
        else
128
168
            LDFLAGS="$ADIOS_CLIB"
129
169
        fi