1 dnl Configure check stuff for TaskJuggler
2 dnl Copyright (c) 2002 Chris Schlaeger <cs@kde.org>
3 dnl Copyright (c) 2002 Klaas Freitag <freitag@suse.de>
5 dnl This file is free software; you can redistribute it and/or
6 dnl modify it under the terms of version 2 of the GNU General
7 dnl Public License as published by the Free Software Foundation.
9 dnl This library is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this library; see the file COPYING. If not, write to
16 dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 dnl Boston, MA 02110-1301, USA.
19 dnl The following part was taken from the KDE admin directory
20 dnl Start of configure.in.min
22 AC_INIT(acinclude.m4) dnl a source file from your sub dir
24 dnl This is so we can use kde-common
25 AC_CONFIG_AUX_DIR(admin)
27 dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
30 dnl Checking host/target/build systems, for make, install etc.
32 dnl Perform program name transformation
35 dnl Automake doc recommends to do this only here. (Janos)
36 AM_INIT_AUTOMAKE(taskjuggler, [2.4.1])
38 dnl AM_INIT_AUTOMAKE(@MODULENAME@, @VERSION@) dnl searches for some needed programs
40 AC_MSG_CHECKING([for KDE support])
41 AC_ARG_WITH(kde-support,
42 [ --with-kde-support[={yes|no}] Integrate KDE support [default=yes]],
45 yes|no) cv_option_kdesupport=$withval;;
46 *) AC_MSG_ERROR(bad value ${withval} for --with-kde-support) ;;
48 ], [cv_option_kdesupport=yes])
49 AC_MSG_RESULT([$cv_option_kdesupport])
51 if test "$cv_option_kdesupport" = yes ;then
56 dnl generate the config header
57 AM_CONFIG_HEADER(config.h) dnl at the distribution this done
59 dnl Checks for programs.
65 PACKAGES_DIR=/usr/share/doc/packages/taskjuggler/
68 AC_HELP_STRING([--with-docdir=DIR],[Directory where additional
69 documentation will be put
70 (default is /usr/share/doc/packages/taskjuggler]),
71 [ PACKAGES_DIR="${withval}" ]
72 [ cv_option_docdir="${withval}" ])
73 AC_MSG_RESULT([$cv_option_docdir])
74 AC_SUBST(PACKAGES_DIR)
76 dnl for NLS support. Call them in this order!
77 dnl WITH_NLS is for the po files
83 dnl End of configure.in.min
85 AM_CONDITIONAL(include_KDE, test "$cv_option_kdesupport" = yes)
86 AM_CONDITIONAL(include_ARTS, false)
89 find TestSuite -name ignorelist | xargs rm
90 if test "$cv_option_kdesupport" = yes ;then
91 AC_DEFINE(HAVE_KDE,1,[Define if you have KDE])
96 dnl These libs are part of KDEPIM
98 dnl Some distros split off a KDEPIM devel package most people
99 dnl forget to install.
100 KDE_CHECK_HEADERS(libkcal/calendarlocal.h libkcal/todo.h)
101 if test "$ac_cv_header_libkcal_calendarlocal_h" = "no" -o \
102 "$ac_cv_header_libkcal_todo_h" = "no" ; then
103 AC_MSG_ERROR([KDEPIM header files no found. Please make sure
104 you have KDEPIM and the corresponding development packages
109 kde_htmldir=${datadir}/taskjuggler
110 echo "ICalReport.tjp" > TestSuite/Syntax/Correct/ignorelist
112 DO_NOT_COMPILE="TaskJugglerUI Contrib"
116 AC_CHECK_PROG(PERL, perl, perl, no)
120 AC_HELP_STRING([--disable-docs],[Don't generate documentation]),
121 tj_enable_docs=$enableval,
123 if test "$tj_enable_docs" = no ; then
124 DO_NOT_COMPILE="$DO_NOT_COMPILE docs man"
127 AC_DEFUN([CHECK_PERL_MODULE],[
128 AC_MSG_CHECKING([for Perl module $1])
131 cat >$TMPFILE <<'EOT'
134 $PERL $TMPFILE 2> /dev/null
135 if test $? -eq 0 ; then
140 AC_MSG_RESULT(not found)
145 if test "$tj_enable_docs" != "no" ; then
146 dnl Check for the stuff needed to generate man pages
147 AC_CHECK_PROG(XSLTPROC, xsltproc, xsltproc, no)
148 AC_CHECK_PROG(DOCBOOK_TO_MAN, docbook-to-man, docbook-to-man, no)
150 dnl Check for the stuff needed to create the HTML manual
151 if test "$XSLTPROC" = no ; then
152 AC_MSG_WARN([Documentation will not be generated])
153 DO_NOT_COMPILE="${DO_NOT_COMPILE} docs"
155 dnl meinproc is usualy part of kdelibs
156 AC_CHECK_PROG(MEINPROC, meinproc, meinproc, no)
157 if test "$MEINPROC" = no ; then
158 AC_MSG_WARN([KDE online help will not be generated])
160 AC_CHECK_PROG(DB2HTML, docbook2html, docbook2html, no)
161 if test "$DB2HTML" = no ; then
162 AC_MSG_WARN([HTML manual will not be generated])
169 dnl Check for the stuff needed to create the PS manual
170 AC_CHECK_PROG(DB2PS, docbook2ps, docbook2ps, no)
171 AC_CHECK_PROG(DB2PDF, docbook2pdf, docbook2pdf, no)
172 AC_CHECK_PROG(JADE, openjade, openjade, no)
173 AC_CHECK_PROG(JADETEX, jadetex, jadetex, no)
174 AC_CHECK_PROG(DVIPS, dvips, dvips, no)
175 if test "$XSLTPROC" = no -o "$DB2PS" = no -o \
176 "$JADE" = no -o "$JADETEX" = no -o \
178 AC_MSG_WARN([Postscript manual will not be generated])
185 AC_OUTPUT(docs/en/taskjuggler.xml)
188 if test "$DOCBOOK_TO_MAN" = no ; then
189 AC_MSG_WARN([Man pages will not be generated])
190 DO_NOT_COMPILE="${DO_NOT_COMPILE} man"
194 dnl KDE_INIT_DOXYGEN([The TaskJuggler API Reference], [Version $VERSION])