495
dnl Do not call GNOME_DOC_DEFINES directly. It is split out from
496
dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
497
AC_DEFUN([GNOME_DOC_DEFINES],
499
AC_ARG_WITH([help-dir],
500
AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
501
[with_help_dir='${datadir}/gnome/help'])
502
HELP_DIR="$with_help_dir"
505
AC_ARG_WITH([omf-dir],
506
AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
507
[with_omf_dir='${datadir}/omf'])
508
OMF_DIR="$with_omf_dir"
511
AC_ARG_WITH([help-formats],
512
AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
513
[with_help_formats=''])
514
DOC_USER_FORMATS="$with_help_formats"
515
AC_SUBST(DOC_USER_FORMATS)
517
AC_ARG_ENABLE([scrollkeeper],
518
[AC_HELP_STRING([--disable-scrollkeeper],
519
[do not make updates to the scrollkeeper database])],,
520
enable_scrollkeeper=yes)
521
AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
523
dnl disable scrollkeeper automatically for distcheck
524
DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
525
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
527
AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
530
# GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
532
AC_DEFUN([GNOME_DOC_INIT],
534
ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
536
PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
537
[gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
539
if test "$gdu_cv_have_gdu" = "yes"; then
540
ifelse([$2],,[:],[$2])
542
ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
548
dnl -*- mode: autoconf -*-
553
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
554
AC_DEFUN([GTK_DOC_CHECK],
556
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
557
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
558
dnl for overriding the documentation installation directory
559
AC_ARG_WITH([html-dir],
560
AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
561
[with_html_dir='${datadir}/gtk-doc/html'])
562
HTML_DIR="$with_html_dir"
565
dnl enable/disable documentation building
566
AC_ARG_ENABLE([gtk-doc],
567
AS_HELP_STRING([--enable-gtk-doc],
568
[use gtk-doc to build documentation [[default=no]]]),,
571
if test x$enable_gtk_doc = xyes; then
573
[PKG_CHECK_EXISTS([gtk-doc],,
574
AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
575
[PKG_CHECK_EXISTS([gtk-doc >= $1],,
576
AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
579
AC_MSG_CHECKING([whether to build gtk-doc documentation])
580
AC_MSG_RESULT($enable_gtk_doc)
582
AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
584
AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
585
AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
589
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
590
# serial 40 IT_PROG_INTLTOOL
591
AC_DEFUN([IT_PROG_INTLTOOL],
592
[AC_PREREQ([2.50])dnl
594
case "$am__api_version" in
596
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
602
if test -n "$1"; then
603
AC_MSG_CHECKING([for intltool >= $1])
605
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
606
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
607
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
609
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
610
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
611
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
614
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
615
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
616
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
617
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
618
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
621
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
622
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
623
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
624
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
625
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
626
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
627
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
628
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
629
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
630
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
631
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
632
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
633
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
634
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
635
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
636
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
637
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
638
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
639
INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
641
AC_SUBST(INTLTOOL_DESKTOP_RULE)
642
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
643
AC_SUBST(INTLTOOL_KEYS_RULE)
644
AC_SUBST(INTLTOOL_PROP_RULE)
645
AC_SUBST(INTLTOOL_OAF_RULE)
646
AC_SUBST(INTLTOOL_PONG_RULE)
647
AC_SUBST(INTLTOOL_SERVER_RULE)
648
AC_SUBST(INTLTOOL_SHEET_RULE)
649
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
650
AC_SUBST(INTLTOOL_UI_RULE)
651
AC_SUBST(INTLTOOL_XAM_RULE)
652
AC_SUBST(INTLTOOL_KBD_RULE)
653
AC_SUBST(INTLTOOL_XML_RULE)
654
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
655
AC_SUBST(INTLTOOL_CAVES_RULE)
656
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
657
AC_SUBST(INTLTOOL_THEME_RULE)
658
AC_SUBST(INTLTOOL_SERVICE_RULE)
659
AC_SUBST(INTLTOOL_POLICY_RULE)
661
# Check the gettext tools to make sure they are GNU
662
AC_PATH_PROG(XGETTEXT, xgettext)
663
AC_PATH_PROG(MSGMERGE, msgmerge)
664
AC_PATH_PROG(MSGFMT, msgfmt)
665
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
666
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
668
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
669
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
670
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
671
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
672
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
675
AC_PATH_PROG(INTLTOOL_PERL, [perl])
676
if test -z "$INTLTOOL_PERL"; then
677
AC_MSG_ERROR([perl not found; required for intltool])
679
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
680
AC_MSG_ERROR([perl 5.x required for intltool])
682
if test "x$2" != "xno-xml"; then
683
AC_MSG_CHECKING([for XML::Parser])
684
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
687
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
691
# Substitute ALL_LINGUAS so we can use it in po/Makefile
692
AC_SUBST(ALL_LINGUAS)
694
# Set DATADIRNAME correctly if it is not set yet
695
# (copied from glib-gettext.m4)
696
if test -z "$DATADIRNAME"; then
698
[AC_LANG_PROGRAM([[]],
699
[[extern int _nl_msg_cat_cntr;
700
return _nl_msg_cat_cntr]])],
704
dnl On Solaris, if bind_textdomain_codeset is in libc,
705
dnl GNU format message catalog is always supported,
706
dnl since both are added to the libc all together.
707
dnl Hence, we'd like to go with DATADIRNAME=share
709
AC_CHECK_FUNC(bind_textdomain_codeset,
710
[DATADIRNAME=share], [DATADIRNAME=lib])
717
AC_SUBST(DATADIRNAME)
724
# IT_PO_SUBDIR(DIRNAME)
725
# ---------------------
726
# All po subdirs have to be declared with this macro; the subdir "po" is
727
# declared by IT_PROG_INTLTOOL.
729
AC_DEFUN([IT_PO_SUBDIR],
730
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
732
dnl The following CONFIG_COMMANDS should be exetuted at the very end
733
dnl of config.status.
734
AC_CONFIG_COMMANDS_PRE([
735
AC_CONFIG_COMMANDS([$1/stamp-it], [
736
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
741
'"s|^| $ac_top_srcdir/|" \
742
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
744
if test ! -f "$1/Makefile"; then
745
AC_MSG_ERROR([$1/Makefile is not ready.])
747
mv "$1/Makefile" "$1/Makefile.tmp"
748
[sed '/^POTFILES =/,/[^\\]$/ {
752
' "$1/Makefile.tmp" >"$1/Makefile"]
753
rm -f "$1/Makefile.tmp"
754
mv "$1/stamp-it.tmp" "$1/stamp-it"
761
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
762
# A hint is needed for aclocal from Automake <= 1.9.4:
763
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
766
499
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
768
501
# serial 52 Debian 1.5.26-1ubuntu1 AC_PROG_LIBTOOL