Revision: 6005 http://geany.svn.sourceforge.net/geany/?rev=6005&view=rev Author: colombanw Date: 2011-10-06 00:44:25 +0000 (Thu, 06 Oct 2011) Log Message: ----------- Move configure logic for i18n to its own file
Modified Paths: -------------- trunk/ChangeLog trunk/configure.ac
Added Paths: ----------- trunk/m4/geany-i18n.m4
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-10-06 00:44:06 UTC (rev 6004) +++ trunk/ChangeLog 2011-10-06 00:44:25 UTC (rev 6005) @@ -3,7 +3,7 @@ * autogen.sh, configure.ac: Modernize configure.ac a bit. * configure.ac, m4/geany-revision.m4, m4/geany-binreloc.m4, - m4/geany-gnu-regex.m4, m4/geany-plugins.m4: + m4/geany-gnu-regex.m4, m4/geany-plugins.m4, m4/geany-i18n.m4: Extract some configure logic to separate files for better readability.
Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2011-10-06 00:44:06 UTC (rev 6004) +++ trunk/configure.ac 2011-10-06 00:44:25 UTC (rev 6005) @@ -26,7 +26,6 @@
AC_PROG_INSTALL AC_PROG_LN_S -AC_PROG_INTLTOOL
# autoscan start
@@ -148,26 +147,9 @@
# i18n -GETTEXT_PACKAGE="$PACKAGE" -AC_SUBST([GETTEXT_PACKAGE]) -AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext package.]) +GEANY_I18N
-if test -n "${LINGUAS}"; then - ALL_LINGUAS="${LINGUAS}" -else - if test -z "$conf_dir"; then - conf_dir="." - fi - ALL_LINGUAS=`cd "$conf_dir/po" 2>/dev/null && ls *.po 2>/dev/null | $AWK 'BEGIN { FS="."; ORS=" " } { print $1 }'` -fi
-AM_GLIB_GNU_GETTEXT -# workaround for intltool bug (http://bugzilla.gnome.org/show_bug.cgi?id=490845) -if test "x$MSGFMT" = "xno"; then - AC_MSG_ERROR([msgfmt not found. Please install the gettext package.]) -fi - - # Set ${datadir} if test "x${datadir}" = 'x${prefix}/share' -o "x${datarootdir}" = 'x${prefix}/share'; then if test "x${prefix}" = "xNONE"; then @@ -184,11 +166,6 @@ GEANY_DATA_DIR=`eval echo ${datarootdir}/geany` AC_SUBST([GEANY_DATA_DIR])
-# intltool hack to define install_sh on Debian/Ubuntu systems -if test "x$install_sh" = "x"; then - install_sh="`pwd`/install-sh" - AC_SUBST([install_sh]) -fi
# Output
Added: trunk/m4/geany-i18n.m4 =================================================================== --- trunk/m4/geany-i18n.m4 (rev 0) +++ trunk/m4/geany-i18n.m4 2011-10-06 00:44:25 UTC (rev 6005) @@ -0,0 +1,33 @@ +dnl GEANY_I18N +dnl Setups I18N support. +dnl AC_DEFINEs and AC_SUBSTs GETTEXT_PACKAGE +AC_DEFUN([GEANY_I18N], +[ + AC_REQUIRE([AC_PROG_AWK]) + AC_REQUIRE([AC_PROG_INTLTOOL]) + + GETTEXT_PACKAGE="$PACKAGE" + AC_SUBST([GETTEXT_PACKAGE]) + AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext package.]) + + if test -n "${LINGUAS}"; then + ALL_LINGUAS="${LINGUAS}" + else + if test -z "$conf_dir"; then + conf_dir="." + fi + ALL_LINGUAS=`cd "$conf_dir/po" 2>/dev/null && ls *.po 2>/dev/null | $AWK 'BEGIN { FS="."; ORS=" " } { print $[]1 }'` + fi + + AM_GLIB_GNU_GETTEXT + # workaround for intltool bug (http://bugzilla.gnome.org/show_bug.cgi?id=490845) + if test "x$MSGFMT" = "xno"; then + AC_MSG_ERROR([msgfmt not found. Please install the gettext package.]) + fi + + # intltool hack to define install_sh on Debian/Ubuntu systems + if test "x$install_sh" = "x"; then + install_sh="`pwd`/install-sh" + AC_SUBST([install_sh]) + fi +])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.