OSDN Git Service

Add 'accounts' column to interactive reports as well.
[tjqt4port/tj2qt4.git] / configure.in.in
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>
4
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.
8
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.
13
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.
18
19 dnl The following part was taken from the KDE admin directory
20 dnl Start of configure.in.min
21
22 AC_INIT(acinclude.m4) dnl a source file from your sub dir
23
24 dnl This is so we can use kde-common
25 AC_CONFIG_AUX_DIR(admin)
26
27 dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
28 unset CDPATH
29
30 dnl Checking host/target/build systems, for make, install etc.
31 AC_CANONICAL_SYSTEM 
32 dnl Perform program name transformation
33 AC_ARG_PROGRAM
34
35 dnl Automake doc recommends to do this only here. (Janos)
36 AM_INIT_AUTOMAKE(taskjuggler, [2.4.1])
37
38 dnl AM_INIT_AUTOMAKE(@MODULENAME@, @VERSION@) dnl searches for some needed programs
39
40 AC_MSG_CHECKING([for KDE support])
41 AC_ARG_WITH(kde-support,
42         [  --with-kde-support[={yes|no}] Integrate KDE support [default=yes]],
43         [
44                 case "${withval}" in
45                         yes|no) cv_option_kdesupport=$withval;;
46                         *)  AC_MSG_ERROR(bad value ${withval} for --with-kde-support) ;;
47                 esac
48         ], [cv_option_kdesupport=yes])
49 AC_MSG_RESULT([$cv_option_kdesupport])
50
51 if test "$cv_option_kdesupport" = yes ;then
52   KDE_SET_PREFIX
53 fi  
54 KDE_CHECK_LIB64
55
56 dnl generate the config header
57 AM_CONFIG_HEADER(config.h) dnl at the distribution this done
58
59 dnl Checks for programs.
60 AC_CHECK_COMPILERS
61 AC_ENABLE_SHARED(yes)
62 AC_ENABLE_STATIC(no)
63 KDE_PROG_LIBTOOL
64
65 PACKAGES_DIR=/usr/share/doc/packages/taskjuggler/
66 AC_ARG_WITH(
67   docdir,
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)
75
76 dnl for NLS support. Call them in this order!
77 dnl WITH_NLS is for the po files
78 AM_KDE_WITH_NLS
79
80 dnl KDE_USE_QT
81 dnl AC_PATH_KDE
82
83 dnl End of configure.in.min
84
85 AM_CONDITIONAL(include_KDE, test "$cv_option_kdesupport" = yes)
86 AM_CONDITIONAL(include_ARTS, false)
87 AC_PATH_QT
88
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])
92     KDE_CHECK_THREADING
93     AC_PATH_KDE 
94
95     AC_SUBST(KDE_LIBS)
96     dnl These libs are part of KDEPIM
97     LIBKCAL="-lkcal"
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
105 installed!])
106     fi
107     DO_NOT_COMPILE=""
108 else
109     kde_htmldir=${datadir}/taskjuggler
110     echo "ICalReport.tjp" > TestSuite/Syntax/Correct/ignorelist
111     LIBKCAL=""
112     DO_NOT_COMPILE="TaskJugglerUI Contrib"
113 fi
114 AC_SUBST(LIBKCAL)
115
116 AC_CHECK_PROG(PERL, perl, perl, no)
117
118 AC_ARG_ENABLE(
119   docs,
120   AC_HELP_STRING([--disable-docs],[Don't generate documentation]),
121   tj_enable_docs=$enableval,
122 )
123 if test "$tj_enable_docs" = no ; then
124   DO_NOT_COMPILE="$DO_NOT_COMPILE docs man"
125 fi
126
127 AC_DEFUN([CHECK_PERL_MODULE],[ 
128 AC_MSG_CHECKING([for Perl module $1])
129 TMPFILE=conftest.pl
130 rm -f $TMPFILE
131 cat >$TMPFILE <<'EOT'
132 use $1;
133 EOT
134 $PERL $TMPFILE 2> /dev/null
135 if test $? -eq 0 ; then
136     $2="yes"
137     AC_MSG_RESULT(found)
138 else
139     $2="no"
140     AC_MSG_RESULT(not found)
141 fi
142 rm -f $TMPFILE
143 ])
144
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)
149
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"
154   else  
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])
159     fi  
160     AC_CHECK_PROG(DB2HTML, docbook2html, docbook2html, no)
161     if test "$DB2HTML" = no ; then
162       AC_MSG_WARN([HTML manual will not be generated])
163       HTMLMANUAL="no"
164     else
165       HTMLMANUAL="yes"
166     fi
167     AC_SUBST(HTMLMANUAL)
168   
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 \
177             "$DVIPS" = no ; then
178       AC_MSG_WARN([Postscript manual will not be generated])
179       PSMANUAL="no"
180     else
181       PSMANUAL="yes"
182     fi
183     AC_SUBST(PSMANUAL)
184   
185     AC_OUTPUT(docs/en/taskjuggler.xml)
186   fi
187
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"
191   fi  
192 fi
193
194 dnl KDE_INIT_DOXYGEN([The TaskJuggler API Reference], [Version $VERSION])
195