Skip to content

Commit

Permalink
autoconf: check the kernel exposes WIMAX_GNL_OP_STATE_GET
Browse files Browse the repository at this point in the history
Starting from here, the tools repository will start requiring a lot
new functionality exposed by the kernel for the next major release.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
  • Loading branch information
Inaky Perez-Gonzalez committed May 15, 2009
1 parent 82ddb51 commit ddc0b93
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
64 changes: 64 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -11621,6 +11621,70 @@ I2400M_INCLUDES="-I${LINUX_KERNEL}/include"
LINUX_INCLUDE_PATH="${LINUX_KERNEL}/include"
{ $as_echo "$as_me:$LINENO: checking whether WIMAX_GNL_OP_STATE_GET is declared" >&5
$as_echo_n "checking whether WIMAX_GNL_OP_STATE_GET is declared... " >&6; }
if test "${ac_cv_have_decl_WIMAX_GNL_OP_STATE_GET+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$LINUX_INCLUDE_PATH/linux/wimax.h>
int
main ()
{
#ifndef WIMAX_GNL_OP_STATE_GET
(void) WIMAX_GNL_OP_STATE_GET;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_have_decl_WIMAX_GNL_OP_STATE_GET=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_decl_WIMAX_GNL_OP_STATE_GET=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_WIMAX_GNL_OP_STATE_GET" >&5
$as_echo "$ac_cv_have_decl_WIMAX_GNL_OP_STATE_GET" >&6; }
if test "x$ac_cv_have_decl_WIMAX_GNL_OP_STATE_GET" = x""yes; then
{ $as_echo "$as_me:$LINENO: Kernel / WiMAX driver is ok (> 2.6.30); has WIMAX_GNL_OP_STATE_GET" >&5
$as_echo "$as_me: Kernel / WiMAX driver is ok (> 2.6.30); has WIMAX_GNL_OP_STATE_GET" >&6;}
else
{ { $as_echo "$as_me:$LINENO: error: Kernel / WiMAX driver is too old (<= 2.6.30); missing WIMAX_GNL_OP_STATE_GET" >&5
$as_echo "$as_me: error: Kernel / WiMAX driver is too old (<= 2.6.30); missing WIMAX_GNL_OP_STATE_GET" >&2;}
{ (exit 1); exit 1; }; }
fi
{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Expand Down
5 changes: 5 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ fi
AC_SUBST(I2400M_INCLUDES, "-I${LINUX_KERNEL}/include")
AC_SUBST(LINUX_INCLUDE_PATH, "${LINUX_KERNEL}/include")

AC_CHECK_DECL(WIMAX_GNL_OP_STATE_GET,
AC_MSG_NOTICE([Kernel / WiMAX driver is ok (> 2.6.30); has WIMAX_GNL_OP_STATE_GET]),
AC_MSG_ERROR([Kernel / WiMAX driver is too old (<= 2.6.30); missing WIMAX_GNL_OP_STATE_GET]),
[#include <$LINUX_INCLUDE_PATH/linux/wimax.h>])

AC_CHECK_LIB(dl, dlopen, dummy=yes,
AC_MSG_ERROR(dynamic linking loader is required))

Expand Down

0 comments on commit ddc0b93

Please sign in to comment.