1 From be38dc1816d4de1a1b463988763f50226eb8417f Mon Sep 17 00:00:00 2001
 
   2 From: Otavio Salvador <otavio@ossystems.com.br>
 
   3 Date: Thu, 7 Nov 2013 10:50:51 -0200
 
   4 Subject: [PATCH] configure.ac: Fix checking for include headers in multiple
 
   6 Organization: O.S. Systems Software LTDA.
 
   8 This fixes the support for proper detecting Freescale specific headers
 
   9 in include/linux and include/uapi.
 
  11 Without this patch we have the configure log with the same feature in
 
  12 'enabled' and 'disabled' state and it was impossible to override the
 
  15 Upstream-Status: Pending
 
  17 Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
 
  19  configure.ac | 19 ++++++++-----------
 
  20  1 file changed, 8 insertions(+), 11 deletions(-)
 
  22 diff --git a/configure.ac b/configure.ac
 
  23 index d74ee0e..f11c76c 100755
 
  26 @@ -58,13 +58,9 @@ AC_DEFUN([CHECK_DISABLE_FEATURE],
 
  27          [use_[$1]=$enableval],
 
  29      if test "$use_[$1]" = "yes"; then
 
  30 -        SAVE_CPPFLAGS="$CPPFLAGS"
 
  31 -        CPPFLAGS=`$PKG_CONFIG --cflags libfslaudiocodec`
 
  32 -        CPPFLAGS+=`$PKG_CONFIG --cflags libfslvideocodec`
 
  33 -        CPPFLAGS+=`$PKG_CONFIG --cflags libfslparser`
 
  34 -        CPPFLAGS+=`$PKG_CONFIG --cflags libfslvpuwrap`
 
  35 -        AC_CHECK_HEADERS([$4], HAVE_[$3]=yes, HAVE_[$3]=no && break)
 
  36 -        CPPFLAGS="$SAVE_CPPFLAGS"
 
  38 +            AC_CHECK_HEADERS([$h], HAVE_[$3]=yes && break, HAVE_[$3]=no)
 
  40          if test "x$HAVE_[$3]" = "xyes"; then
 
  41              enabled_feature="$enabled_feature\n\t\t[$5]"
 
  43 @@ -283,12 +279,13 @@ CHECK_DISABLE_FEATURE(beep, [Disable beep audio decoder], [BEEP], [fsl_unia.h],
 
  45  CHECK_DISABLE_FEATURE(v4lsink, [Disable fsl v4l sink], [V4L_SINK], [linux/videodev2.h], [plugin: v4lsink])
 
  47 +# Allow headers to be inside include/uapi and include/linux
 
  48  saved_CFLAGS="$CFLAGS"
 
  49  CFLAGS="$CFLAGS $IPU_CFLAGS"
 
  50 -CHECK_DISABLE_FEATURE(isink, [Disable fsl ipu sink], [I_SINK], [linux/mxcfb.h], [plugin: isink])
 
  51 -CHECK_DISABLE_FEATURE(isink, [Disable fsl ipu sink], [I_SINK], [uapi/mxcfb.h], [plugin: isink])
 
  52 -CHECK_DISABLE_FEATURE(ipucsc, [Disable fsl ipu csc], [I_CSC], [linux/mxcfb.h], [plugin: ipucsc])
 
  53 -CHECK_DISABLE_FEATURE(ipucsc, [Disable fsl ipu csc], [I_CSC], [uapi/mxcfb.h], [plugin: ipucsc])
 
  55 +CHECK_DISABLE_FEATURE(isink, [Disable fsl ipu sink], [I_SINK], [linux/mxcfb.h uapi/mxcfb.h], [plugin: isink])
 
  56 +CHECK_DISABLE_FEATURE(ipucsc, [Disable fsl ipu csc], [I_CSC], [linux/mxcfb.h uapi/mxcfb.h], [plugin: ipucsc])
 
  60  CHECK_DISABLE_FEATURE(ipulib, [Disable ipu lib], [IPU_LIB], [mxc_ipu_hl_lib.h], [library: libipu])