author | Myhailo Danylenko <isbear@ukrpost.net> |
Wed, 14 Nov 2012 16:27:49 +0200 | |
changeset 629 | 5ed754060736 |
parent 537 | bdc5234550d2 |
permissions | -rw-r--r-- |
629 | 1 |
dnl -*- mode: autoconf -*- |
2 |
||
3 |
# serial 1 |
|
4 |
||
537
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
5 |
dnl Usage: |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
6 |
dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
7 |
AC_DEFUN([GTK_DOC_CHECK], |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
8 |
[ |
629 | 9 |
AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
537
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
10 |
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
11 |
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first |
629 | 12 |
|
13 |
dnl check for tools we added during development |
|
14 |
AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) |
|
15 |
AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) |
|
16 |
AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) |
|
17 |
||
537
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
18 |
dnl for overriding the documentation installation directory |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
19 |
AC_ARG_WITH([html-dir], |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
20 |
AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
21 |
[with_html_dir='${datadir}/gtk-doc/html']) |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
22 |
HTML_DIR="$with_html_dir" |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
23 |
AC_SUBST([HTML_DIR]) |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
24 |
|
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
25 |
dnl enable/disable documentation building |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
26 |
AC_ARG_ENABLE([gtk-doc], |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
27 |
AS_HELP_STRING([--enable-gtk-doc], |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
28 |
[use gtk-doc to build documentation [[default=no]]]),, |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
29 |
[enable_gtk_doc=no]) |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
30 |
|
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
31 |
if test x$enable_gtk_doc = xyes; then |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
32 |
ifelse([$1],[], |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
33 |
[PKG_CHECK_EXISTS([gtk-doc],, |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
34 |
AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
35 |
[PKG_CHECK_EXISTS([gtk-doc >= $1],, |
629 | 36 |
AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) |
37 |
dnl don't check for glib if we build glib |
|
38 |
if test "x$PACKAGE_NAME" != "xglib"; then |
|
39 |
dnl don't fail if someone does not have glib |
|
40 |
PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,) |
|
41 |
fi |
|
537
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
42 |
fi |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
43 |
|
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
44 |
AC_MSG_CHECKING([whether to build gtk-doc documentation]) |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
45 |
AC_MSG_RESULT($enable_gtk_doc) |
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
46 |
|
629 | 47 |
dnl enable/disable output formats |
48 |
AC_ARG_ENABLE([gtk-doc-html], |
|
49 |
AS_HELP_STRING([--enable-gtk-doc-html], |
|
50 |
[build documentation in html format [[default=yes]]]),, |
|
51 |
[enable_gtk_doc_html=yes]) |
|
52 |
AC_ARG_ENABLE([gtk-doc-pdf], |
|
53 |
AS_HELP_STRING([--enable-gtk-doc-pdf], |
|
54 |
[build documentation in pdf format [[default=no]]]),, |
|
55 |
[enable_gtk_doc_pdf=no]) |
|
56 |
||
57 |
if test -z "$GTKDOC_MKPDF"; then |
|
58 |
enable_gtk_doc_pdf=no |
|
59 |
fi |
|
60 |
||
537
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
61 |
|
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
62 |
AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) |
629 | 63 |
AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) |
64 |
AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) |
|
537
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
65 |
AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) |
629 | 66 |
AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) |
537
bdc5234550d2
Added support for Dolt in the build process.
Mikael Hallendal <micke@imendio.com>
parents:
diff
changeset
|
67 |
]) |