Skip to content

Commit 3f83a76

Browse files
committed
Add header check for mmal
1 parent ab58d32 commit 3f83a76

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

configure.ac

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,19 +225,22 @@ AS_IF([test "${MMAL}" = "no"], [
225225
export PKG_CONFIG_PATH
226226
AC_MSG_RESULT($PKG_CONFIG_PATH)
227227
228-
AC_MSG_CHECKING(for MMAL)
229228
AS_IF([pkg-config mmal], [
229+
AC_CHECK_HEADERS(interface/vcos/vcos.h interface/mmal/mmal.h,,[MMAL="no"])
230+
AC_MSG_CHECKING(for MMAL)
231+
AS_IF([test "${MMAL}" = "no"], [
232+
AC_MSG_RESULT([no])
233+
],[
230234
TEMP_CFLAGS="$TEMP_CFLAGS -Irasppicam "`pkg-config --cflags mmal`
231-
TEMP_LIBS="$TEMP_LIBS "`pkg-config --libs mmal`
232-
#pkg config parm does not provide -lvchostif that buildroot requires
233-
TEMP_LIBS="$TEMP_LIBS -lvchostif "
235+
TEMP_LIBS="$TEMP_LIBS "`pkg-config --libs mmal`" -lvchostif "
234236
AC_MSG_RESULT([yes])
235237
AC_DEFINE([HAVE_MMAL], [1], [Define to 1 if MMAL is around])
236-
],[
237-
AC_MSG_RESULT([no])
238-
MMAL="no"
239-
]
240-
)
238+
])
239+
],[
240+
AC_MSG_CHECKING(for MMAL)
241+
AC_MSG_RESULT([no])
242+
MMAL="no"
243+
])
241244
PKG_CONFIG_PATH=$TEMP_PATH
242245
export PKG_CONFIG_PATH
243246
]

0 commit comments

Comments
 (0)