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])
[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
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(
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"],
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(