diff options
author | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-05-14 22:16:58 -0700 |
---|---|---|
committer | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-05-14 22:16:58 -0700 |
commit | ddc0b935aa179afa99db5d89a2b990b2f15d9e57 (patch) | |
tree | 8c702ae09e6f1ec411b9c75436396a9ad132fdf6 | |
parent | 82ddb5106585cfde399b3cbfa739d41174cb21f2 (diff) |
autoconf: check the kernel exposes WIMAX_GNL_OP_STATE_GET
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>
-rwxr-xr-x | configure | 64 | ||||
-rw-r--r-- | configure.in | 5 |
2 files changed, 69 insertions, 0 deletions
@@ -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 diff --git a/configure.in b/configure.in index fc92997..8efaae9 100644 --- a/configure.in +++ b/configure.in @@ -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)) |