]> git.sur5r.net Git - kconfig-frontends/blobdiff - configure.ac
docs/known-issues: add Cygwin's libglade explicit link againg -png12
[kconfig-frontends] / configure.ac
index 078c2e79885fe66a7b54f7c1e365e084524ae79e..895cd58cf9f76ebbe9beb5832ded31cd38ac0315 100644 (file)
@@ -30,6 +30,17 @@ 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
 LT_PREREQ([2.2.6])
@@ -99,6 +110,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
@@ -200,7 +218,7 @@ AC_SUBST([AM_YFLAGS], ["-t -l -p zconf"])
 # Check for standard headers
 AC_HEADER_STDC
 AC_HEADER_STDBOOL
-AC_CHECK_HEADERS([ fcntl.h libintl.h limits.h locale.h ])
+AC_CHECK_HEADERS([ fcntl.h limits.h locale.h ])
 AC_CHECK_HEADERS([ stdlib.h string.h sys/time.h unistd.h ])
 AC_TYPE_SIZE_T
 
@@ -215,18 +233,34 @@ AC_CHECK_FUNCS([ gettimeofday mkdir regcomp setlocale uname ])
 
 #----------------------------------------
 # Check for gettext, for the kconfig frontends
-AC_SUBST([GETTEXT])
-AC_CHECK_HEADERS(
-    [libintl.h],
-    [ac_ct_gettext_hdr=$ac_header; break],
-    [AC_MSG_WARN([libintl is missing, frontends will not be localised])])
+[has_gettext="$enable_L10n"]
 AS_IF(
-    [test -n "$ac_ct_gettext_hdr"],
+    [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(
         [gettext],,
-        [AC_MSG_WARN([gettext is missing, frontends will not be localised])
-         GETTEXT=-DKBUILD_NO_NLS],
+        [has_gettext=no],
         [#include <$ac_ct_gettext_hdr>])])
+AS_IF(
+    [test "$has_gettext" = "yes"],
+    [LIBS_old="$LIBS"
+     LIBS=
+     AC_SEARCH_LIBS(
+        [gettext],
+        [intl],,
+        [has_gettext=no])
+    intl_LIBS="$LIBS"
+    LIBS="$LIBS_old"])
+AS_IF(
+    [test "$has_gettext" = "no"],
+    [intl_CPPFLAGS=-DKBUILD_NO_NLS])
+AC_SUBST([intl_CPPFLAGS])
+AC_SUBST([intl_LIBS])
 
 #----------------------------------------
 # Check for ncurses, for the mconf & nconf frontends
@@ -237,7 +271,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"],
@@ -267,6 +301,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(
@@ -404,6 +443,9 @@ AM_CONDITIONAL(
 AM_CONDITIONAL(
     [COND_utils],
     [test "$enable_utils" = "yes"])
+AM_CONDITIONAL(
+    [COND_utils_gettext],
+    [test "$has_gettext" = "yes"])
 
 #----------------------------------------
 # Get the version to apply to the parser shared library
@@ -455,5 +497,6 @@ AC_MSG_NOTICE([  - root-menu prompt : $root_menu])
 AC_MSG_NOTICE([  - config prefix    : $config_prefix])
 AC_MSG_NOTICE([- frontends          :$fe_list])
 AC_MSG_NOTICE([  - transform name   : $program_transform_name])
+AC_MSG_NOTICE([  - localised        : $has_gettext])
 AC_MSG_NOTICE([- install utilities  : $enable_utils])
 AC_MSG_NOTICE([- CFLAGS CXXFLAGS    : $wall_CFLAGS $werror_CFLAGS])