Recognize #!/bin/dash as shebang for Shell files (closes #3470986)
[geany-mirror.git] / m4 / geany-i18n.m4
blobc9c5d72b94629e71953f387b792d44a4e0e6233e
1 dnl GEANY_I18N
2 dnl Setups I18N support.
3 dnl AC_DEFINEs and AC_SUBSTs GETTEXT_PACKAGE
4 AC_DEFUN([GEANY_I18N],
6         AC_REQUIRE([AC_PROG_AWK])
7         AC_REQUIRE([AC_PROG_INTLTOOL])
9         GETTEXT_PACKAGE="$PACKAGE"
10         AC_SUBST([GETTEXT_PACKAGE])
11         AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext package.])
13         if test -n "${LINGUAS}"; then
14                 ALL_LINGUAS="${LINGUAS}"
15         else
16                 if test -z "$conf_dir"; then
17                         conf_dir="."
18                 fi
19                 ALL_LINGUAS=`cd "$conf_dir/po" 2>/dev/null && ls *.po 2>/dev/null | $AWK 'BEGIN { FS="."; ORS=" " } { print $[]1 }'`
20         fi
22         AM_GLIB_GNU_GETTEXT
23         # workaround for intltool bug (http://bugzilla.gnome.org/show_bug.cgi?id=490845)
24         if test "x$MSGFMT" = "xno"; then
25                 AC_MSG_ERROR([msgfmt not found. Please install the gettext package.])
26         fi
28         # intltool hack to define install_sh on Debian/Ubuntu systems
29         if test "x$install_sh" = "x"; then
30                 install_sh="`pwd`/install-sh"
31                 AC_SUBST([install_sh])
32         fi