1*4882a593Smuzhiyundnl Do not call GNOME_DOC_DEFINES directly.  It is split out from
2*4882a593Smuzhiyundnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
3*4882a593SmuzhiyunAC_DEFUN([GNOME_DOC_DEFINES],
4*4882a593Smuzhiyun[
5*4882a593SmuzhiyunAC_ARG_WITH([help-dir],
6*4882a593Smuzhiyun  AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
7*4882a593Smuzhiyun  [with_help_dir='${datadir}/gnome/help'])
8*4882a593SmuzhiyunHELP_DIR="$with_help_dir"
9*4882a593SmuzhiyunAC_SUBST(HELP_DIR)
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunAC_ARG_WITH([omf-dir],
12*4882a593Smuzhiyun  AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
13*4882a593Smuzhiyun  [with_omf_dir='${datadir}/omf'])
14*4882a593SmuzhiyunOMF_DIR="$with_omf_dir"
15*4882a593SmuzhiyunAC_SUBST(OMF_DIR)
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunAC_ARG_WITH([help-formats],
18*4882a593Smuzhiyun  AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
19*4882a593Smuzhiyun  [with_help_formats=''])
20*4882a593SmuzhiyunDOC_USER_FORMATS="$with_help_formats"
21*4882a593SmuzhiyunAC_SUBST(DOC_USER_FORMATS)
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunAC_ARG_ENABLE([scrollkeeper],
24*4882a593Smuzhiyun	[AC_HELP_STRING([--disable-scrollkeeper],
25*4882a593Smuzhiyun			[do not make updates to the scrollkeeper database])],,
26*4882a593Smuzhiyun	enable_scrollkeeper=yes)
27*4882a593SmuzhiyunAM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
28*4882a593Smuzhiyun
29*4882a593Smuzhiyundnl disable scrollkeeper automatically for distcheck
30*4882a593SmuzhiyunDISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
31*4882a593SmuzhiyunAC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
32*4882a593Smuzhiyun
33*4882a593SmuzhiyunAM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
34*4882a593Smuzhiyun])
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun# GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
37*4882a593Smuzhiyun#
38*4882a593SmuzhiyunAC_DEFUN([GNOME_DOC_INIT],
39*4882a593Smuzhiyun[AC_REQUIRE([AC_PROG_LN_S])dnl
40*4882a593Smuzhiyun
41*4882a593Smuzhiyunif test -z "$AM_DEFAULT_VERBOSITY"; then
42*4882a593Smuzhiyun  AM_DEFAULT_VERBOSITY=1
43*4882a593Smuzhiyunfi
44*4882a593SmuzhiyunAC_SUBST([AM_DEFAULT_VERBOSITY])
45*4882a593Smuzhiyun
46*4882a593Smuzhiyunifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunAC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required])
49*4882a593SmuzhiyunPKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
50*4882a593Smuzhiyun	[gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
51*4882a593Smuzhiyun
52*4882a593Smuzhiyunif test "$gdu_cv_have_gdu" = "yes"; then
53*4882a593Smuzhiyun	AC_MSG_RESULT([yes])
54*4882a593Smuzhiyun	ifelse([$2],,[:],[$2])
55*4882a593Smuzhiyunelse
56*4882a593Smuzhiyun	AC_MSG_RESULT([no])
57*4882a593Smuzhiyun	ifelse([$3],,[:],[$3])
58*4882a593Smuzhiyunfi
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunGNOME_DOC_DEFINES
61*4882a593Smuzhiyun])
62