f1d3924066255870d47591c883a31bd6bd73a40c
[pti/rtp.git] / meta-stx / recipes-support / cluster-resource-agents / resource-agents / 03-fix-header-defs-lookup.patch
1 fix header defs lookup
2
3 Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
4 ---
5  configure.ac | 5 ++---
6  1 file changed, 2 insertions(+), 3 deletions(-)
7
8 diff --git a/configure.ac b/configure.ac
9 index 3326b53..8b5706a 100644
10 --- a/configure.ac
11 +++ b/configure.ac
12 @@ -140,9 +140,8 @@ extract_header_define() {
13           Cfile=$srcdir/extract_define.$2.${$}
14           printf "#include <stdio.h>\n" > ${Cfile}.c
15           printf "#include <%s>\n" $1 >> ${Cfile}.c
16 -         printf "int main(int argc, char **argv) { printf(\"%%s\", %s); return 0; }\n" $2 >> ${Cfile}.c
17 -         $CC $CFLAGS ${Cfile}.c -o ${Cfile}
18 -         value=`${Cfile}`
19 +         printf "\"%s\":%s\n" $2 $2 >> ${Cfile}.c
20 +         value=`$CC $CFLAGS -E ${Cfile}.c | grep \"$2\" | cut -f 2 -d ':'`
21           AC_MSG_RESULT($value)
22           printf $value
23           rm -f ${Cfile}.c ${Cfile}
24 -- 
25 1.8.3.1
26