mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Fix bug in AM_GNU_GETTEXT triggered by BSD/OS
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@321 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d41e87f91e
commit
f47bc0dc25
@ -1,5 +1,10 @@
|
|||||||
1999-11-17 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
1999-11-17 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
|
* configure.in: Use LYX_GNU_GETTEXT.
|
||||||
|
|
||||||
|
* acinclude.m4 (LYX_GNU_GETTEXT): new macro, essentially a copy of
|
||||||
|
AM_GNU_GETTEXT with a bug fixed.
|
||||||
|
|
||||||
* src/lyx_cb.C (RunLinuxDoc): add a cast to please dec cxx.
|
* src/lyx_cb.C (RunLinuxDoc): add a cast to please dec cxx.
|
||||||
|
|
||||||
* src/chset.C: add "using std::ifstream;" to please dec cxx.
|
* src/chset.C: add "using std::ifstream;" to please dec cxx.
|
||||||
|
137
acinclude.m4
137
acinclude.m4
@ -685,3 +685,140 @@ extern int select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func
|
|||||||
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234,($ac_cv_func_select_arg234))
|
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234,($ac_cv_func_select_arg234))
|
||||||
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5,($ac_cv_func_select_arg5))
|
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5,($ac_cv_func_select_arg5))
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl This is taken from gettext.m4, but a bug has been fixed
|
||||||
|
# Macro to add for using GNU gettext.
|
||||||
|
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||||
|
#
|
||||||
|
# This file can be copied and used freely without restrictions. It can
|
||||||
|
# be used in projects which are not available under the GNU Public License
|
||||||
|
# but which still want to provide support for the GNU gettext functionality.
|
||||||
|
# Please note that the actual code is *not* freely available.
|
||||||
|
|
||||||
|
# serial 5
|
||||||
|
|
||||||
|
AC_DEFUN(LYX_GNU_GETTEXT,
|
||||||
|
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_CC])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||||
|
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||||
|
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||||
|
AC_REQUIRE([AC_C_CONST])dnl
|
||||||
|
AC_REQUIRE([AC_C_INLINE])dnl
|
||||||
|
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||||
|
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||||
|
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||||
|
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
|
||||||
|
unistd.h sys/param.h])
|
||||||
|
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
||||||
|
strdup __argz_count __argz_stringify __argz_next])
|
||||||
|
|
||||||
|
if test "${ac_cv_func_stpcpy+set}" != "set"; then
|
||||||
|
AC_CHECK_FUNCS(stpcpy)
|
||||||
|
fi
|
||||||
|
if test "${ac_cv_func_stpcpy}" = "yes"; then
|
||||||
|
AC_DEFINE(HAVE_STPCPY)
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_LC_MESSAGES
|
||||||
|
AM_WITH_NLS
|
||||||
|
|
||||||
|
if test "x$CATOBJEXT" != "x"; then
|
||||||
|
if test "x$ALL_LINGUAS" = "x"; then
|
||||||
|
LINGUAS=
|
||||||
|
else
|
||||||
|
AC_MSG_CHECKING(for catalogs to be installed)
|
||||||
|
NEW_LINGUAS=
|
||||||
|
dnl =============Fix is here !===============================
|
||||||
|
dnl Some sh do not like substituation in bounds of for loops
|
||||||
|
dnl for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
||||||
|
tmplinguas=${LINGUAS=$ALL_LINGUAS}
|
||||||
|
for lang in ${tmplinguas}; do
|
||||||
|
dnl =========================================================
|
||||||
|
case "$ALL_LINGUAS" in
|
||||||
|
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
LINGUAS=$NEW_LINGUAS
|
||||||
|
AC_MSG_RESULT($LINGUAS)
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl Construct list of names of catalog files to be constructed.
|
||||||
|
if test -n "$LINGUAS"; then
|
||||||
|
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl The reference to <locale.h> in the installed <libintl.h> file
|
||||||
|
dnl must be resolved because we cannot expect the users of this
|
||||||
|
dnl to define HAVE_LOCALE_H.
|
||||||
|
if test $ac_cv_header_locale_h = yes; then
|
||||||
|
INCLUDE_LOCALE_H="#include <locale.h>"
|
||||||
|
else
|
||||||
|
INCLUDE_LOCALE_H="\
|
||||||
|
/* The system does not provide the header <locale.h>. Take care yourself. */"
|
||||||
|
fi
|
||||||
|
AC_SUBST(INCLUDE_LOCALE_H)
|
||||||
|
|
||||||
|
dnl Determine which catalog format we have (if any is needed)
|
||||||
|
dnl For now we know about two different formats:
|
||||||
|
dnl Linux libc-5 and the normal X/Open format
|
||||||
|
test -d intl || mkdir intl
|
||||||
|
if test "$CATOBJEXT" = ".cat"; then
|
||||||
|
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
|
||||||
|
|
||||||
|
dnl Transform the SED scripts while copying because some dumb SEDs
|
||||||
|
dnl cannot handle comments.
|
||||||
|
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
|
||||||
|
fi
|
||||||
|
dnl po2tbl.sed is always needed.
|
||||||
|
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
|
||||||
|
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
|
||||||
|
|
||||||
|
dnl In the intl/Makefile.in we have a special dependency which makes
|
||||||
|
dnl only sense for gettext. We comment this out for non-gettext
|
||||||
|
dnl packages.
|
||||||
|
if test "$PACKAGE" = "gettext"; then
|
||||||
|
GT_NO="#NO#"
|
||||||
|
GT_YES=
|
||||||
|
else
|
||||||
|
GT_NO=
|
||||||
|
GT_YES="#YES#"
|
||||||
|
fi
|
||||||
|
AC_SUBST(GT_NO)
|
||||||
|
AC_SUBST(GT_YES)
|
||||||
|
|
||||||
|
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||||
|
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
||||||
|
dnl Try to locate is.
|
||||||
|
MKINSTALLDIRS=
|
||||||
|
if test -n "$ac_aux_dir"; then
|
||||||
|
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||||
|
fi
|
||||||
|
if test -z "$MKINSTALLDIRS"; then
|
||||||
|
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||||
|
fi
|
||||||
|
AC_SUBST(MKINSTALLDIRS)
|
||||||
|
|
||||||
|
dnl *** For now the libtool support in intl/Makefile is not for real.
|
||||||
|
l=
|
||||||
|
AC_SUBST(l)
|
||||||
|
|
||||||
|
dnl Generate list of files to be processed by xgettext which will
|
||||||
|
dnl be included in po/Makefile.
|
||||||
|
test -d po || mkdir po
|
||||||
|
if test "x$srcdir" != "x."; then
|
||||||
|
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
|
||||||
|
posrcprefix="$srcdir/"
|
||||||
|
else
|
||||||
|
posrcprefix="../$srcdir/"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
posrcprefix="../"
|
||||||
|
fi
|
||||||
|
rm -f po/POTFILES
|
||||||
|
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||||
|
< $srcdir/po/POTFILES.in > po/POTFILES
|
||||||
|
])
|
||||||
|
@ -145,7 +145,7 @@ AC_LANG_C
|
|||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
AC_C_INLINE
|
AC_C_INLINE
|
||||||
# Do the real setup now
|
# Do the real setup now
|
||||||
AM_GNU_GETTEXT
|
LYX_GNU_GETTEXT
|
||||||
# a hack for those who try to change LyX, but do not have gettext installed
|
# a hack for those who try to change LyX, but do not have gettext installed
|
||||||
case "${XGETTEXT}" in
|
case "${XGETTEXT}" in
|
||||||
*:) XGETTEXT='cp ${srcdir}/lyx.pot ./${PACKAGE}.po ; :'
|
*:) XGETTEXT='cp ${srcdir}/lyx.pot ./${PACKAGE}.po ; :'
|
||||||
|
Loading…
Reference in New Issue
Block a user