27 lines
804 B
Diff
27 lines
804 B
Diff
fix header defs lookup
|
|
|
|
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
|
|
---
|
|
configure.ac | 5 ++---
|
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 3326b53..8b5706a 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -140,9 +140,8 @@ extract_header_define() {
|
|
Cfile=$srcdir/extract_define.$2.${$}
|
|
printf "#include <stdio.h>\n" > ${Cfile}.c
|
|
printf "#include <%s>\n" $1 >> ${Cfile}.c
|
|
- printf "int main(int argc, char **argv) { printf(\"%%s\", %s); return 0; }\n" $2 >> ${Cfile}.c
|
|
- $CC $CFLAGS ${Cfile}.c -o ${Cfile}
|
|
- value=`${Cfile}`
|
|
+ printf "\"%s\":%s\n" $2 $2 >> ${Cfile}.c
|
|
+ value=`$CC $CFLAGS -E ${Cfile}.c | grep \"$2\" | cut -f 2 -d ':'`
|
|
AC_MSG_RESULT($value)
|
|
printf $value
|
|
rm -f ${Cfile}.c ${Cfile}
|
|
--
|
|
1.8.3.1
|
|
|