]> git.sur5r.net Git - kconfig-frontends/blobdiff - configure.ac
Synchronsie with 3.7-rc3
[kconfig-frontends] / configure.ac
index c062cb729158a103c5c7ce1d0de5742eec99f7cc..473755d820869dd821b67c1bc9c0a9945db2718f 100644 (file)
@@ -30,8 +30,20 @@ AS_IF(
 
 AM_INIT_AUTOMAKE
 
+AS_IF(
+    [test "$(${srcdir}/scripts/version.sh --internal)" = "hg"],
+    [AM_SILENT_RULES],
+    [AM_SILENT_RULES([yes])])
+
+AS_IF(
+    [test $AM_DEFAULT_VERBOSITY -eq 0],
+    [SILENT_MAKEFLAGS="--no-print-directory -s"],
+    [SILENT_MAKEFLAGS=""])
+AC_SUBST([SILENT_MAKEFLAGS])
+
 #----------------------------------------
 # Prepare libtool
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl Automake, we have a problem...
 LT_PREREQ([2.2.6])
 LT_INIT([disable-static])
 
@@ -99,6 +111,13 @@ AC_ARG_ENABLE(
         [install utilities to manage .config files (default=no)])])
 AC_SUBST([enable_utils], [${enable_utils:-yes}])
 
+AC_ARG_ENABLE(
+    [L10n],
+    [AS_HELP_STRING(
+        [--disable-L10n],
+        [enable localisation (L10n) (default=auto)])])
+AC_SUBST([enable_L10n], [${enable_L10n:-yes}])
+
 #----------------------------------------
 # Options to selectively enable/disable frontends
 # All are selected by default
@@ -214,12 +233,31 @@ AC_CHECK_FUNCS([ strcasecmp strchr strcspn strdup strncasecmp strpbrk strrchr st
 AC_CHECK_FUNCS([ gettimeofday mkdir regcomp setlocale uname ])
 
 #----------------------------------------
-# Check for gettext, for the kconfig frontends
-[has_gettext=yes]
+# Check headers and macros for circle queues
 AC_CHECK_HEADERS(
-    [libintl.h],
-    [ac_ct_gettext_hdr=$ac_header; break],
-    [has_gettext=no])
+    [sys/queue.h],
+    [AC_MSG_CHECKING([for CIRCLEQ_XXX macros in sys/queue.h])
+     AC_PREPROC_IFELSE(
+        [AC_LANG_PROGRAM(
+            [[#include <sys/queue.h>
+              #ifndef CIRCLEQ_HEAD
+              #error no
+              #endif]]
+            [[]])],
+        [AC_MSG_RESULT([yes])],
+        [AC_MSG_RESULT([no])
+         AC_MSG_ERROR([CIRCLEQ_XXX macros not defined in sys/queue.h (parser)])])],
+    [AC_MSG_ERROR([could not find sys/queue.h header (parser)])])
+
+#----------------------------------------
+# Check for gettext, for the kconfig frontends
+[has_gettext="$enable_L10n"]
+AS_IF(
+    [test "$has_gettext" = "yes"],
+    [AC_CHECK_HEADERS(
+        [libintl.h],
+        [ac_ct_gettext_hdr=$ac_header; break],
+        [has_gettext=no])])
 AS_IF(
     [test "$has_gettext" = "yes"],
     [AC_CHECK_DECL(
@@ -251,7 +289,7 @@ AS_IF(
      LIBS_old="$LIBS"
      LIBS=
      AC_CHECK_HEADERS(
-        [ncurses/ncurses.h ncurses/curses.h ncursesw/curses.h ncurses.h curses.h],
+        [ncursesw/curses.h ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h],
         [CURSES_LOC=$ac_header; break])
      AS_IF(
         [test -z "$CURSES_LOC"],
@@ -281,6 +319,11 @@ AS_IF(
 AS_IF(
     [test "$need_panel_menu" = "yes" -o "$need_panel_menu" = "auto"],
     [AC_SUBST([ncurses_extra_LIBS])
+     AC_SUBST([ncurses_extra_CPPFLAGS])
+     AS_CASE(
+        [$CURSES_LOC],
+        [ncursesw/*],[ncurses_extra_CPPFLAGS="-I/usr/include/ncursesw"],
+        [ncurses/*],[ncurses_extra_CPPFLAGS="-I/usr/include/ncurses"])
      LIBS_old="$LIBS"
      LIBS=
      AC_SEARCH_LIBS(