]> git.sur5r.net Git - kconfig-frontends/commitdiff
configure: cleanup the gettext checks
authorYann E. MORIN" <yann.morin.1998@free.fr>
Mon, 28 May 2012 19:00:33 +0000 (21:00 +0200)
committerYann E. MORIN" <yann.morin.1998@free.fr>
Mon, 28 May 2012 19:00:33 +0000 (21:00 +0200)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
configure.ac

index d31465a3b73dbb3670a2f2da0f9b4de6f5453f70..a01b71547b6b50c959321dbe16efecaaa567dc80 100644 (file)
@@ -215,29 +215,32 @@ AC_CHECK_FUNCS([ gettimeofday mkdir regcomp setlocale uname ])
 
 #----------------------------------------
 # Check for gettext, for the kconfig frontends
-AC_SUBST([intl_CPPFLAGS])
-AC_SUBST([intl_LIBS])
+[has_gettext=yes]
 AC_CHECK_HEADERS(
     [libintl.h],
     [ac_ct_gettext_hdr=$ac_header; break],
-    [AC_MSG_WARN([libintl is missing, frontends will not be localised])
-     intl_CPPFLAGS=-DKBUILD_NO_NLS])
+    [has_gettext=no])
 AS_IF(
-    [test -n "$ac_ct_gettext_hdr"],
+    [test "$has_gettext" = "yes"],
     [AC_CHECK_DECL(
         [gettext],,
-        [AC_MSG_WARN([gettext is missing, frontends will not be localised])
-         intl_CPPFLAGS=-DKBUILD_NO_NLS],
-        [#include <$ac_ct_gettext_hdr>])
-     LIBS_old="$LIBS"
+        [has_gettext=no],
+        [#include <$ac_ct_gettext_hdr>])])
+AS_IF(
+    [test "$has_gettext" = "yes"],
+    [LIBS_old="$LIBS"
      LIBS=
      AC_SEARCH_LIBS(
         [gettext],
         [intl],,
-        [AC_MSG_WARN([gettext is missing, frontends will not be localised])
-         intl_CPPFLAGS=-DKBUILD_NO_NLS])
+        [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
@@ -466,5 +469,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])