From: Yann E. MORIN" Date: Wed, 17 Oct 2012 22:31:53 +0000 (+0200) Subject: configure: check for sys/queue.h and CIRCLEQ_XXX X-Git-Tag: v3.7.0.0~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fdc3918b26b86e90273be709ae3513425ba5822f;p=kconfig-frontends configure: check for sys/queue.h and CIRCLEQ_XXX mconf and nconf need the CIRCLEQ_XXX macros defined in sys/queue.h, so check for them, as they are missing on legacy systems (eg. Debian potato). Signed-off-by: "Yann E. MORIN" --- diff --git a/configure.ac b/configure.ac index 895cd58..e1bbca0 100644 --- a/configure.ac +++ b/configure.ac @@ -176,6 +176,7 @@ AC_SUBST([kf_CFLAGS], ["$wall_CFLAGS $werror_CFLAGS"]) #---------------------------------------- # Dependencies that will be needed, depending on the frontends +[need_circleq="$enable_mconf"] AS_CASE( ["$enable_mconf":"$enable_nconf"], [*yes*], [need_curses=yes], @@ -262,6 +263,36 @@ AS_IF( AC_SUBST([intl_CPPFLAGS]) AC_SUBST([intl_LIBS]) +#---------------------------------------- +# Check headers and macros for circle queues +AS_IF( + [test "$need_circleq" = "yes" -o "$need_circleq" = "auto"], + [AC_CHECK_HEADERS( + [sys/queue.h], + [AC_MSG_CHECKING([for CIRCLEQ_XXX macros in sys/queue.h]) + AC_PREPROC_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #ifndef CIRCLEQ_HEAD + #error no + #endif]] + [[]])], + [AC_MSG_RESULT([yes]) + has_circleq=yes], + [AC_MSG_RESULT([no]) + AS_IF( + [test "$need_circleq" = "yes"], + [AC_MSG_ERROR([CIRCLEQ_XXX macros not defined in sys/queue.h (frontend: mconf)])], + [has_circleq=no])])], + [AS_IF( + [test "$need_circleq" = "yes"], + [AC_MSG_ERROR([could not find sys/queue.h header (frontend: mconf)])], + [has_circleq=no])])]) + +AS_IF( + [test "$has_circleq" = "no"], + [enable_mconf=no]) + #---------------------------------------- # Check for ncurses, for the mconf & nconf frontends AS_IF(