~ubuntu-branches/ubuntu/vivid/mpich/vivid-proposed

« back to all changes in this revision

Viewing changes to test/mpi/confdb/aclocal_runlog.m4

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2014-04-01 20:24:20 UTC
  • mfrom: (5.2.4 sid)
  • Revision ID: package-import@ubuntu.com-20140401202420-t5ey1ia2klt5dkq3
Tags: 3.1-4
* [c3e3398] Disable test_primitives, which is unreliable on some platforms.
            (Closes: #743047)
* [265a699] Add minimal autotest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
  ac_status=$?
10
10
  AS_ECHO(["$as_me:$LINENO: \$? = $ac_status"]) >&AS_MESSAGE_LOG_FD
11
11
  test $ac_status = 0; }])
 
12
 
12
13
dnl
13
14
dnl PAC_COMMAND_IFELSE is written to replace AC_TRY_EVAL with added logging
14
15
dnl to config.log, i.e. AC_TRY_EVAL does not log anything to config.log.
18
19
dnl PAC_COMMAND_IFELSE(COMMMAND,[ACTION-IF-RUN-OK],[ACTION-IF-RUN-FAIL])
19
20
dnl
20
21
AC_DEFUN([PAC_COMMAND_IFELSE],[
21
 
dnl Should use _AC_DO_TOKENS but use AC_RUN_LOG instead
22
 
dnl because _AC_XX is autoconf's undocumented macro.
23
22
AS_IF([PAC_RUNLOG([$1])],[
24
23
    $2
25
24
],[
30
29
    ])
31
30
])
32
31
])
33
 
dnl
34
 
dnl
35
 
dnl
36
 
AC_DEFUN([PAC_EVAL_IFELSE],[
37
 
dnl Should use _AC_DO_TOKENS but use AC_RUN_LOG instead
38
 
dnl because _AC_XX is autoconf's undocumented macro.
39
 
AS_IF([PAC_RUNLOG([$$1])],[
40
 
    $2
41
 
],[
42
 
    AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD
43
 
    m4_ifvaln([$3],[
44
 
        (exit $ac_status)
45
 
        $3
46
 
    ])
47
 
])
48
 
])
49
 
dnl
50
 
dnl
51
 
dnl
 
32
 
52
33
AC_DEFUN([PAC_RUNLOG_IFELSE],[
53
34
dnl pac_TESTLOG is the internal temporary logfile for this macro.
54
35
pac_TESTLOG="pac_test.log"
62
43
])
63
44
rm -f $pac_TESTLOG
64
45
])
65
 
dnl
66
 
dnl
67
 
dnl
68
 
dnl PAS_VAR_COPY -  A portable layer that mimics AS_VAR_COPY when it is not
69
 
dnl                 defined as in older autoconf, e.g. 2.63 and older.
70
 
dnl                 This macro is absolutely necessary, because AS_VAR_GET in
71
 
dnl                 some newer autoconf, e.g. 2.64, seems to be totally broken,
72
 
dnl                 or behave very different from older autoconf, i.e. 2.63.
73
 
dnl
74
 
AC_DEFUN([PAS_VAR_COPY],[
75
 
m4_ifdef([AS_VAR_COPY], [AS_VAR_COPY([$1],[$2])], [$1=AS_VAR_GET([$2])])
76
 
])
77
 
dnl
78
 
dnl
79
 
dnl
 
46
 
 
47
 
80
48
dnl PAC_VAR_PUSHVAL(VARNAME, [LastSavedValue]))
81
49
dnl
82
50
dnl Save the content of the shell variable, VARNAME, onto a stack.
96
64
dnl define local m4-name pac_stk_level.
97
65
AS_VAR_PUSHDEF([pac_stk_level], [pac_stk_$1_level])
98
66
AS_VAR_SET_IF([pac_stk_level],[
99
 
    dnl autoconf < 2.64 does not have AS_VAR_ARITH, so use expr instead.
100
 
    AS_VAR_SET([pac_stk_level], [`expr $pac_stk_level + 1`])
 
67
    AS_VAR_ARITH([pac_stk_level], [$pac_stk_level + 1])
101
68
],[
102
69
    AS_VAR_SET([pac_stk_level], [0])
103
70
])
106
73
AS_VAR_SET([pac_stk_$1_$pac_stk_level],[$$1])
107
74
AS_VAR_IF([pac_stk_level], [0], [
108
75
    dnl Save the 1st pushed value of VARNAME as pac_FirstSavedValueOf_$VARNAME
109
 
    PAS_VAR_COPY([pac_FirstSavedValueOf_$1],[pac_stk_$1_$pac_stk_level])
 
76
    AS_VAR_COPY([pac_FirstSavedValueOf_$1],[pac_stk_$1_$pac_stk_level])
110
77
])
111
78
ifelse([$2],[],[
112
79
    dnl Save the last pushed value of VARNAME as pac_LastSavedValueOf_$VARNAME
113
 
    PAS_VAR_COPY([pac_LastSavedValueOf_$1],[pac_stk_$1_$pac_stk_level])
 
80
    AS_VAR_COPY([pac_LastSavedValueOf_$1],[pac_stk_$1_$pac_stk_level])
114
81
    dnl AS_ECHO(["pac_LastSavedValueOf_$1 = $pac_LastSavedValueOf_$1"])
115
82
],[
116
83
    dnl Save the last pushed value of VARNAME as $2
117
 
    PAS_VAR_COPY([$2],[pac_stk_$1_$pac_stk_level])
 
84
    AS_VAR_COPY([$2],[pac_stk_$1_$pac_stk_level])
118
85
    dnl AS_ECHO(["$2 = $$2"])
119
86
])
120
87
AS_VAR_POPDEF([pac_stk_level])
123
90
dnl
124
91
dnl
125
92
dnl
126
 
dnl PAC_VAR_POPVAL(VARNAME) 
 
93
dnl PAC_VAR_POPVAL(VARNAME)
127
94
dnl
128
95
dnl Restore variable, VARNAME, from the stack.
129
96
dnl This macro is safe with respect to the nesting.
139
106
        AC_MSG_WARN(["Imbalance of PUSHVAL/POPVAL of $1"])
140
107
    ],[
141
108
        dnl AS_ECHO_N(["POPVAL: pac_stk_level = $pac_stk_level, "])
142
 
        PAS_VAR_COPY([$1],[pac_stk_$1_$pac_stk_level])
 
109
        AS_VAR_COPY([$1],[pac_stk_$1_$pac_stk_level])
143
110
        dnl AS_ECHO(["popped_val = $$1"])
144
 
        dnl autoconf < 2.64 does not have AS_VAR_ARITH, so use expr instead.
145
 
        AS_VAR_SET([pac_stk_level], [`expr $pac_stk_level - 1`])
 
111
        AS_VAR_ARITH([pac_stk_level], [ $pac_stk_level - 1 ])
146
112
    ])
147
113
],[
148
114
    AC_MSG_WARN(["Uninitialized PUSHVAL/POPVAL of $1"])