File: configure.in

package info (click to toggle)
taskjuggler 2.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,156 kB
  • ctags: 3,713
  • sloc: cpp: 37,683; sh: 13,617; xml: 6,021; perl: 5,207; lisp: 538; makefile: 283; python: 258
file content (270 lines) | stat: -rw-r--r-- 8,832 bytes parent folder | download
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
dnl =======================================================
dnl FILE: configure.in.in
dnl =======================================================

dnl    Configure check stuff for TaskJuggler
dnl    Copyright (c) 2002 Chris Schlaeger <cs@kde.org>
dnl    Copyright (c) 2002 Klaas Freitag <freitag@suse.de>

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.3])

dnl AM_INIT_AUTOMAKE(taskjuggler-2.4.3, "3.3.91") 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

AC_MSG_CHECKING([for iCal support])
AC_ARG_WITH(ical-support,
        [  --with-ical-support[={yes|no}] Enable iCal support [default=yes]],
        [
                case "${withval}" in
                        yes|no) cv_option_icalsupport=$withval;;
                        *)  AC_MSG_ERROR(bad value ${withval} for --with-ical-support) ;;
                esac
        ], [cv_option_icalsupport=yes])
AC_MSG_RESULT([$cv_option_icalsupport])

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)
    DO_NOT_COMPILE=""
else
    kde_htmldir=${datadir}/taskjuggler
    DO_NOT_COMPILE="TaskJugglerUI Contrib"
fi

if test "$cv_option_icalsupport" = yes ; then
    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
    AC_DEFINE(HAVE_ICAL_SUPPORT,1,[Define if you have iCal (KDEPIM3) support])
else
    echo "ICalReport.tjp" > TestSuite/Syntax/Correct/ignorelist
    LIBKCAL=""
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])

KDE_CREATE_SUBDIRSLIST
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ Contrib/Makefile ])
AC_CONFIG_FILES([ Contrib/kate/Makefile ])
AC_CONFIG_FILES([ Examples/Makefile ])
AC_CONFIG_FILES([ Examples/BigProject/Makefile ])
AC_CONFIG_FILES([ Examples/BigProject/Common/Makefile ])
AC_CONFIG_FILES([ Examples/BigProject/Project1/Makefile ])
AC_CONFIG_FILES([ Examples/BigProject/Project2/Makefile ])
AC_CONFIG_FILES([ Examples/FirstProject/Makefile ])
AC_CONFIG_FILES([ Examples/ShiftSchedule/Makefile ])
AC_CONFIG_FILES([ TaskJugglerUI/Makefile ])
AC_CONFIG_FILES([ TaskJugglerUI/Templates/Makefile ])
AC_CONFIG_FILES([ TaskJugglerUI/Templates/en_US/Makefile ])
AC_CONFIG_FILES([ TaskJugglerUI/pics/Makefile ])
AC_CONFIG_FILES([ TestSuite/Makefile ])
AC_CONFIG_FILES([ docs/Makefile ])
AC_CONFIG_FILES([ docs/en/Makefile ])
AC_CONFIG_FILES([ i18n/Makefile ])
AC_CONFIG_FILES([ i18n/TaskJugglerUI/Makefile ])
AC_CONFIG_FILES([ man/Makefile ])
AC_CONFIG_FILES([ man/en/Makefile ])
AC_CONFIG_FILES([ taskjuggler/Makefile ])
AC_OUTPUT
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
  # And if so, warn when they don't match
  if test "$kde_libs_prefix" != "$given_prefix"; then
    # And if kde doesn't know about the prefix yet
    echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
    if test $? -ne 0; then
      echo ""
      echo "Warning: you chose to install this package in $given_prefix,"
      echo "but KDE was found in $kde_libs_prefix."
      echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
      echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
      echo "Then restart KDE."
      echo ""
    fi
  fi
fi

if test "$all_tests" = "bad"; then
  if test ! "$cache_file" = "/dev/null"; then
    echo ""
    echo "Please remove the file $cache_file after changing your setup"
    echo "so that configure will find the changes next time."
    echo ""
  fi
else
  echo ""
  echo "Good - your configure finished. Start make now"
  echo ""
fi