summaryrefslogtreecommitdiff
path: root/configure.ac.in
blob: c2bafcbdd1298fcb085ad5363a67a08bc725c3f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
dnl
dnl Copyright (c) 2004 - 2010 The Xfce development team
dnl
dnl

dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([xfce4_docs_version_major], [4])
m4_define([xfce4_docs_version_minor], [7])
m4_define([xfce4_docs_version_micro], [0])
m4_define([xfce4_docs_version_nano],  []) dnl leave this empty to have no nano version
m4_define([xfce4_docs_version_build], [@REVISION@])
m4_define([xfce4_docs_version_tag],   [git])
m4_define([xfce4_docs_version], [xfce4_docs_version_major().xfce4_docs_version_minor().xfce4_docs_version_micro()ifelse(xfce4_docs_version_nano(), [], [], [.xfce4_docs_version_nano()])ifelse(xfce4_docs_version_tag(), [git], [xfce4_docs_version_tag()-xfce4_docs_version_build()], [xfce4_docs_version_tag()])])

dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2002 - 2010
        The Xfce development team. All rights reserved.])
AC_INIT([xfce4-docs], [xfce4_docs_version], [http://bugzilla.xfce.org/], [xfce4-docs])
AC_PREREQ([2.50])
AC_REVISION([xfce4_docs_version_build])

dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([1.8 no-dist-gzip dist-bzip2 tar-ustar])
AM_MAINTAINER_MODE()
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_INSTALL()

dnl **************************
dnl *** Substitute version ***
dnl **************************
XFCE4_DOCS_VERSION=xfce4_docs_version()
XFCE4_DOCS_VERSION_MAJOR=xfce4_docs_version_major()
XFCE4_DOCS_VERSION_MINOR=xfce4_docs_version_minor()
XFCE4_DOCS_VERSION_MICRO=xfce4_docs_version_micro()
AC_SUBST([XFCE4_DOCS_VERSION])
AC_SUBST([XFCE4_DOCS_VERSION_API])
AC_SUBST([XFCE4_DOCS_VERSION_MAJOR])
AC_SUBST([XFCE4_DOCS_VERSION_MINOR])
AC_SUBST([XFCE4_DOCS_VERSION_MICRO])

dnl ***************************************************
dnl *** Check if we need to build the documentation ***
dnl ***************************************************
AC_ARG_ENABLE([gen-doc], [AC_HELP_STRING([--enable-gen-doc],
              [Generate HTML documentation (requires gnome-doc-utils) [default=no]])],,
              [enable_gen_doc=no])
if test x"$enable_gen_doc" = x"yes"; then
  XDT_CHECK_PACKAGE([GNOME_DOC_UTILS], [gnome-doc-utils], [0.19.2],
  [
    AC_PATH_PROG([XML2PO], [xml2po], [no])
    if test x"$XML2PO" = x"no"; then
      enable_gen_doc=no
    fi

    AC_PATH_PROG([GNOME_DOC_TOOL], [gnome-doc-tool], [no])
    if test x"$GNOME_DOC_TOOL" = x"no"; then
      enable_gen_doc=no
    fi

    AC_PATH_PROG([XMLLINT], [xmllint], [no])
    if test x"$XMLLINT" = x"no"; then
      enable_gen_doc=no
    fi

    AC_PATH_PROG([XSLTPROC], [xsltproc], [no])
    if test x"$XSLTPROC" = x"no"; then
      enable_gen_doc=no
    fi
  ],
  [
    enable_gen_doc=no
  ])

  if test x"$enable_gen_doc" = x"no"; then
    AC_MSG_ERROR([Compiling with --enable-gen-doc but one of xml2po, xsltproc, xmllint or gnome-doc-utils package is missing.])
  fi
elif test ! -d "${srcdir}/xfce-users-guide/html"; then
  AC_MSG_ERROR([No precompiled HTML found in this packages, please retry with --enable-gen-doc.])
fi
AM_CONDITIONAL([GENERATE_DOCUMENTATION], [test x"$enable_gen_doc" = x"yes"])

dnl *********************************
dnl *** Substitute platform flags ***
dnl *********************************
AC_MSG_CHECKING([PLATFORM_CPPFLAGS])
AC_MSG_RESULT([$PLATFORM_CPPFLAGS])
AC_SUBST([PLATFORM_CPPFLAGS])
AC_MSG_CHECKING([PLATFORM_CFLAGS])
AC_MSG_RESULT([$PLATFORM_CFLAGS])
AC_SUBST([PLATFORM_CFLAGS])
AC_MSG_CHECKING([PLATFORM_LDFLAGS])
AC_MSG_RESULT([$PLATFORM_LDFLAGS])
AC_SUBST([PLATFORM_LDFLAGS])

AC_OUTPUT([
Makefile
xfce-user-guide/Makefile
xfce-user-guide/images/Makefile
xfce-user-guide/images/el/Makefile
xfce-user-guide/po/Makefile
])

dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
if test x"$enable_gen_doc" = x"yes"; then
echo "* Documentation: yes (generate)"
elif test -d "${srcdir}/xfce-users-guide/html"; then
echo "* Documentation: yes (in tarball)"
else
echo "* Documentation: no"
fi
echo