Commit e0a6c255 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

HACKING Makefile.am acinclude.m4 applied (modified) patch from Raphaël

2005-01-20  Sven Neumann  <sven@gimp.org>

	* HACKING
	* Makefile.am
	* acinclude.m4
	* autogen.sh: applied (modified) patch from Raphaël Quinet that
	allows to build GIMP from CVS without having gtk-doc installed.
	If you need to do this, pass --disable-gtk-doc to autogen.sh.

	* configure.in: removed --disable-devel-docs option since it has
	become obsolete now.

	* devel-docs/Makefile.am: require gtk-doc when running 'make dist'.
parent 3884c9b7
2005-01-20 Sven Neumann <sven@gimp.org>
* HACKING
* Makefile.am
* acinclude.m4
* autogen.sh: applied (modified) patch from Raphaël Quinet that
allows to build GIMP from CVS without having gtk-doc installed.
If you need to do this, pass --disable-gtk-doc to autogen.sh.
* configure.in: removed --disable-devel-docs option since it has
become obsolete now.
* devel-docs/Makefile.am: require gtk-doc when running 'make dist'.
2005-01-20 Sven Neumann <sven@gimp.org>
* app/paint-funcs/scale-funcs.[ch]: applied patch from Geert
......
......@@ -63,6 +63,11 @@ the GIMP API reference manuals, you can set AUTOGEN_CONFIGURE_ARGS to
"--enable-gtk-doc". Please note that you will then need a recent
version of gtk-doc as well as a working setup for handling DocBook/XML.
If you do not have a recent version of gtk-doc, you can pass the
option "--disable-gtk-doc" to autogen.sh. This will completely
disable the support for gtk-doc so you will not be able to generate
the API documentation.
CVS
---
......
## Process this file with automake to produce Makefile.in
SUBDIRS = \
m4macros \
tools \
regexrepl \
cursors \
themes \
po \
po-libgimp \
po-plug-ins \
po-script-fu \
data \
menus \
tips \
libgimpbase \
libgimpcolor \
libgimpmath \
libgimpmodule \
libgimpthumb \
libgimpwidgets \
libgimp \
app \
$(GIMP_MODULES) \
$(GIMP_PLUGINS) \
etc \
$(GIMP_DEVEL_DOCS) \
m4macros \
tools \
regexrepl \
cursors \
themes \
po \
po-libgimp \
po-plug-ins \
po-script-fu \
data \
menus \
tips \
libgimpbase \
libgimpcolor \
libgimpmath \
libgimpmodule \
libgimpthumb \
libgimpwidgets \
libgimp \
app \
$(GIMP_MODULES) \
$(GIMP_PLUGINS) \
etc \
devel-docs \
docs
bin_SCRIPTS = gimptool-@GIMP_TOOL_VERSION@ @GIMPINSTALL@
......
......@@ -364,3 +364,55 @@ dnl That should be it. Now just export out symbols:
AC_SUBST(ALSA_CFLAGS)
AC_SUBST(ALSA_LIBS)
])
dnl The following lines were copied from gtk-doc.m4
dnl Usage:
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
AC_DEFUN([GTK_DOC_CHECK],
[
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
dnl for overriding the documentation installation directory
AC_ARG_WITH(html-dir,
AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
[with_html_dir='${datadir}/gtk-doc/html'])
HTML_DIR="$with_html_dir"
AC_SUBST(HTML_DIR)
dnl enable/disable documentation building
AC_ARG_ENABLE(gtk-doc,
AC_HELP_STRING([--enable-gtk-doc],
[use gtk-doc to build documentation (default=no)]),,
enable_gtk_doc=no)
have_gtk_doc=no
if test x$enable_gtk_doc = xyes; then
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
have_gtk_doc=yes
fi
dnl do we want to do a version check?
ifelse([$1],[],,
[gtk_doc_min_version=$1
if test "$have_gtk_doc" = yes; then
AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
have_gtk_doc=no
fi
fi
])
if test "$have_gtk_doc" != yes; then
enable_gtk_doc=no
fi
fi
AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
])
......@@ -77,20 +77,35 @@ if test x$LIBTOOLIZE != x; then
check_version $VER $LIBTOOL_REQUIRED_VERSION
fi
echo -n "checking for gtkdocize ... "
if (gtkdocize --version) < /dev/null > /dev/null 2>&1; then
echo "yes"
# check if gtk-doc is explicitely disabled
for ag_option in $AUTOGEN_CONFIGURE_ARGS $@
do
case $ag_option in
-disable-gtk-doc | --disable-gtk-doc)
enable_gtk_doc=no
;;
esac
done
if test x$enable_gtk_doc = xno; then
echo "skipping test for gtkdocize"
else
echo
echo " You must have gtk-doc installed to compile $PROJECT."
echo " Install the appropriate package for your distribution,"
echo " or get the source tarball at"
echo " http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
DIE=1
echo -n "checking for gtkdocize ... "
if (gtkdocize --version) < /dev/null > /dev/null 2>&1; then
echo "yes"
else
echo
echo " You must have gtk-doc installed to compile $PROJECT."
echo " Install the appropriate package for your distribution,"
echo " or get the source tarball at"
echo " http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
echo " You can also use the option --disable-gtk-doc to skip"
echo " this test but then you will not be able to generate a"
echo " configure script that can build the API documentation."
DIE=1
fi
fi
echo -n "checking for autoconf >= $AUTOCONF_REQUIRED_VERSION ... "
if (autoconf --version) < /dev/null > /dev/null 2>&1; then
VER=`autoconf --version \
......@@ -211,7 +226,7 @@ fi
if test -z "$ACLOCAL_FLAGS"; then
acdir=`$ACLOCAL --print-ac-dir`
m4list="glib-2.0.m4 glib-gettext.m4 gtk-doc.m4 gtk-2.0.m4 intltool.m4 pkg.m4"
m4list="glib-2.0.m4 glib-gettext.m4 gtk-2.0.m4 intltool.m4 pkg.m4"
for file in $m4list
do
......@@ -220,9 +235,9 @@ if test -z "$ACLOCAL_FLAGS"; then
echo "WARNING: aclocal's directory is $acdir, but..."
echo " no file $acdir/$file"
echo " You may see fatal macro warnings below."
echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
echo " environment variable to \"-I /some/dir\", or install"
echo " $acdir/$file."
echo " If these files are installed in /some/dir, set the "
echo " ACLOCAL_FLAGS environment variable to \"-I /some/dir\""
echo " or install $acdir/$file."
echo
fi
done
......@@ -238,7 +253,18 @@ if test $RC -ne 0; then
fi
$LIBTOOLIZE --force || exit $?
gtkdocize || exit $?
if test x$enable_gtk_doc = xno; then
if test -f gtk-doc.make; then :; else
echo "EXTRA_DIST = missing-gtk-doc" > gtk-doc.make
fi
echo "WARNING: You have disabled gtk-doc."
echo " As a result, you will not be able to generate the API"
echo " documentation and 'make dist' will not work."
echo
else
gtkdocize || exit $?
fi
# optionally feature autoheader
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader || exit 1
......
......@@ -1403,17 +1403,6 @@ AM_CONDITIONAL(HAVE_XSLTPROC, test "x$XSLTPROC" != "xno")
GTK_DOC_CHECK([1.0])
dnl Allow skipping the devel-docs dir entirely
AC_ARG_ENABLE(devel-docs, [ --disable-devel-docs disable building and installation of developer docs],, enable_devel_docs=yes)
GIMP_DEVEL_DOCS=devel-docs
if test x$enable_devel_docs = xno; then
enable_gtk_doc=no
GIMP_DEVEL_DOCS=
fi
AC_SUBST(GIMP_DEVEL_DOCS)
dnl NOTE: We need to use a separate automake conditional for this
dnl to make this work with the tarballs.
AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
......@@ -1428,7 +1417,7 @@ AC_ARG_ENABLE(default-binary, [ --enable-default-binary install this as the def
AM_CONDITIONAL(DEFAULT_BINARY, test x$enable_default_binary = xyes)
AC_ARG_ENABLE(gimp-console, [ --enable-gimp-console build a console-only binary which does not link GTK+ (default=no)], , enable_gimp_console=no)
AC_ARG_ENABLE(gimp-console, [ --enable-gimp-console build a console-only binary which does not link GTK+], , enable_gimp_console=no)
AM_CONDITIONAL(ENABLE_GIMP_CONSOLE, test x$enable_gimp_console = xyes)
......
......@@ -25,3 +25,16 @@ EXTRA_DIST = \
structure.xml \
undo.txt \
xcf.txt
# require gtk-doc when making dist
#
if ENABLE_GTK_DOC
dist-check-gtk-doc:
else
dist-check-gtk-doc:
@echo "*** gtk-doc must be enabled in order to make dist"
@false
endif
dist-hook: dist-check-gtk-doc
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment