dnl Configure check stuff for TaskJuggler dnl Copyright (c) 2002 Chris Schlaeger dnl Copyright (c) 2002 Klaas Freitag dnl This file is free software; you can redistribute it and/or dnl modify it under the terms of version 2 of the GNU General dnl Public License as published by the Free Software Foundation. dnl This library is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl You should have received a copy of the GNU General Public License dnl along with this library; see the file COPYING. If not, write to dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, dnl Boston, MA 02110-1301, USA. dnl The following part was taken from the KDE admin directory dnl Start of configure.in.min AC_INIT(acinclude.m4) dnl a source file from your sub dir dnl This is so we can use kde-common AC_CONFIG_AUX_DIR(admin) dnl This ksh/zsh feature conflicts with `cd blah ; pwd` unset CDPATH dnl Checking host/target/build systems, for make, install etc. AC_CANONICAL_SYSTEM dnl Perform program name transformation AC_ARG_PROGRAM dnl Automake doc recommends to do this only here. (Janos) AM_INIT_AUTOMAKE(taskjuggler, [2.4.1+git]) dnl AM_INIT_AUTOMAKE(@MODULENAME@, @VERSION@) dnl searches for some needed programs AC_MSG_CHECKING([for KDE support]) AC_ARG_WITH(kde-support, [ --with-kde-support[={yes|no}] Integrate KDE support [default=yes]], [ case "${withval}" in yes|no) cv_option_kdesupport=$withval;; *) AC_MSG_ERROR(bad value ${withval} for --with-kde-support) ;; esac ], [cv_option_kdesupport=yes]) AC_MSG_RESULT([$cv_option_kdesupport]) if test "$cv_option_kdesupport" = yes ;then KDE_SET_PREFIX fi KDE_CHECK_LIB64 dnl generate the config header AM_CONFIG_HEADER(config.h) dnl at the distribution this done dnl Checks for programs. AC_CHECK_COMPILERS AC_ENABLE_SHARED(yes) AC_ENABLE_STATIC(no) KDE_PROG_LIBTOOL PACKAGES_DIR=${prefix}/share/doc/packages/taskjuggler/ AC_ARG_WITH( docdir, AC_HELP_STRING([--with-docdir=DIR],[Directory where additional documentation will be put (default is /usr/share/doc/packages/taskjuggler]), [ PACKAGES_DIR="${withval}" ] [ cv_option_docdir="${withval}" ]) AC_MSG_RESULT([$cv_option_docdir]) AC_SUBST(PACKAGES_DIR) dnl for NLS support. Call them in this order! dnl WITH_NLS is for the po files AM_KDE_WITH_NLS dnl KDE_USE_QT dnl AC_PATH_KDE dnl End of configure.in.min AM_CONDITIONAL(include_KDE, test "$cv_option_kdesupport" = yes) AM_CONDITIONAL(include_ARTS, false) AC_PATH_QT find TestSuite -name ignorelist | xargs rm if test "$cv_option_kdesupport" = yes ;then AC_DEFINE(HAVE_KDE,1,[Define if you have KDE]) KDE_CHECK_THREADING AC_PATH_KDE AC_SUBST(KDE_LIBS) dnl These libs are part of KDEPIM LIBKCAL="-lkcal" dnl Some distros split off a KDEPIM devel package most people dnl forget to install. KDE_CHECK_HEADERS(libkcal/calendarlocal.h libkcal/todo.h) if test "$ac_cv_header_libkcal_calendarlocal_h" = "no" -o \ "$ac_cv_header_libkcal_todo_h" = "no" ; then AC_MSG_ERROR([KDEPIM header files no found. Please make sure you have KDEPIM and the corresponding development packages installed!]) fi DO_NOT_COMPILE="" else kde_htmldir=${datadir}/taskjuggler echo "ICalReport.tjp" > TestSuite/Syntax/Correct/ignorelist LIBKCAL="" DO_NOT_COMPILE="TaskJugglerUI Contrib" fi AC_SUBST(LIBKCAL) AC_CHECK_PROG(PERL, perl, perl, no) AC_ARG_ENABLE( docs, AC_HELP_STRING([--disable-docs],[Don't generate documentation]), tj_enable_docs=$enableval, ) if test "$tj_enable_docs" = no ; then DO_NOT_COMPILE="$DO_NOT_COMPILE docs man" fi AC_DEFUN([CHECK_PERL_MODULE],[ AC_MSG_CHECKING([for Perl module $1]) TMPFILE=conftest.pl rm -f $TMPFILE cat >$TMPFILE <<'EOT' use $1; EOT $PERL $TMPFILE 2> /dev/null if test $? -eq 0 ; then $2="yes" AC_MSG_RESULT(found) else $2="no" AC_MSG_RESULT(not found) fi rm -f $TMPFILE ]) if test "$tj_enable_docs" != "no" ; then dnl Check for the stuff needed to generate man pages AC_CHECK_PROG(XSLTPROC, xsltproc, xsltproc, no) AC_CHECK_PROG(DOCBOOK_TO_MAN, docbook-to-man, docbook-to-man, no) dnl Check for the stuff needed to create the HTML manual if test "$XSLTPROC" = no ; then AC_MSG_WARN([Documentation will not be generated]) DO_NOT_COMPILE="${DO_NOT_COMPILE} docs" else dnl meinproc is usualy part of kdelibs AC_CHECK_PROG(MEINPROC, meinproc, meinproc, no) if test "$MEINPROC" = no ; then AC_MSG_WARN([KDE online help will not be generated]) fi AC_CHECK_PROG(DB2HTML, docbook2html, docbook2html, no) if test "$DB2HTML" = no ; then AC_MSG_WARN([HTML manual will not be generated]) HTMLMANUAL="no" else HTMLMANUAL="yes" fi AC_SUBST(HTMLMANUAL) dnl Check for the stuff needed to create the PS manual AC_CHECK_PROG(DB2PS, docbook2ps, docbook2ps, no) AC_CHECK_PROG(DB2PDF, docbook2pdf, docbook2pdf, no) AC_CHECK_PROG(JADE, openjade, openjade, no) AC_CHECK_PROG(JADETEX, jadetex, jadetex, no) AC_CHECK_PROG(DVIPS, dvips, dvips, no) if test "$XSLTPROC" = no -o "$DB2PS" = no -o \ "$JADE" = no -o "$JADETEX" = no -o \ "$DVIPS" = no ; then AC_MSG_WARN([Postscript manual will not be generated]) PSMANUAL="no" else PSMANUAL="yes" fi AC_SUBST(PSMANUAL) AC_OUTPUT(docs/en/taskjuggler.xml) fi if test "$DOCBOOK_TO_MAN" = no ; then AC_MSG_WARN([Man pages will not be generated]) DO_NOT_COMPILE="${DO_NOT_COMPILE} man" fi fi dnl KDE_INIT_DOXYGEN([The TaskJuggler API Reference], [Version $VERSION])