aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/pacemaker/pacemaker-1.0.8/fix-header-defs-lookup.patch
blob: 02ce26ec909cbdca06f8c2e2c8e57d1ace6ad349 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Index: Pacemaker-1-0-Pacemaker-1.0.8/configure.ac
===================================================================
--- Pacemaker-1-0-Pacemaker-1.0.8.orig/configure.ac	2010-04-06 13:08:53.000000000 +0400
+++ Pacemaker-1-0-Pacemaker-1.0.8/configure.ac	2010-04-06 13:08:58.000000000 +0400
@@ -106,9 +106,8 @@
 	  Cfile=/tmp/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 ':' | sed 's,^",,' | sed 's,"$,,'`
 	  AC_MSG_RESULT($value)
 	  printf $value
 	  rm -f ${Cfile}.c ${Cfile}