# HG changeset patch # User aurel # Date 1129671448 0 # Node ID 55b28be7a0e67410d5c168738888712ee80dc0ca # Parent 3e8a61c10b47874cf91ef70ecd8e5697aea7a69b modify DirectFB version detection so that it only requires pre-processing diff -r 3e8a61c10b47 -r 55b28be7a0e6 configure --- a/configure Tue Oct 18 21:34:54 2005 +0000 +++ b/configure Tue Oct 18 21:37:28 2005 +0000 @@ -3454,21 +3454,20 @@ _directfb=no cat > $TMPC < -int main(void) { IDirectFB *foo; return 0; } +int main(void) { IDirectFB *foo; DirectFBInit(0,0); return 0; } EOF linux && test -c /dev/fb0 && cc_check $_inc_directfb -ldirectfb && _directfb=yes fi if test "$_directfb" = yes; then -cat > $TMPC < -int main(void) { - printf ("%i",(directfb_major_version*100+directfb_minor_version)*100+directfb_micro_version); - return 0; -} -EOF - if cc_check $_inc_directfb -ldirectfb && "$TMPO" >> "$TMPLOG" ; then - _directfb_version=`"$TMPO"` + cat > $TMPC << EOF +#include +int +dfb_ver = DIRECTFB_MAJOR_VERSION DIRECTFB_MINOR_VERSION DIRECTFB_MICRO_VERSION +; +EOF + if $_cc -E $TMPC $_inc_directfb > "$TMPO"; then + _directfb_version=`sed -n 's/^dfb_ver[^1-9]*\(.*\)/\1/p' "$TMPO" | tr -d '() '` _def_directfb_version="#define DIRECTFBVERSION $_directfb_version" if test "$_directfb_version" -ge 913; then _res_comment="$_directfb_version"