summaryrefslogtreecommitdiffstats
path: root/configure.in
blob: 7940c1eeb9293b93d31bf87362c69f5a4a4d7a25 (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
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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
dnl =======================================================
dnl FILE: ./admin/configure.in.min
dnl =======================================================

dnl    This file is part of the KDE libraries/packages
dnl    Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
 
dnl    This file is free software; you can redistribute it and/or
dnl    modify it under the terms of the GNU Library General Public
dnl    License as published by the Free Software Foundation; either
dnl    version 2 of the License, or (at your option) any later version.
 
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 GNU
dnl    Library General Public License for more details.
 
dnl    You should have received a copy of the GNU Library General Public License
dnl    along with this library; see the file COPYING.LIB.  If not, write to
dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl    Boston, MA 02111-1307, USA.

# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas

dnl Process this file with autoconf to produce a configure script.

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(kmymoney2, 1.0.4) dnl searches for some needed programs

KDE_SET_PREFIX

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

dnl for NLS support. Call them in this order!
dnl WITH_NLS is for the po files
AM_KDE_WITH_NLS

KDE_USE_QT(3.3.1)
AC_PATH_KDE
dnl =======================================================
dnl FILE: configure.in.in
dnl =======================================================

#MIN_CONFIG(3.3.1)

dnl PACKAGE set before

KDE_ENABLE_HIDDEN_VISIBILITY

AM_KDE_MIN_VERSION(3, 4, 0)

dnl
dnl check for a recent autoconf version
dnl
AC_PREREQ(2.53)

dnl
dnl check for atoll and strtoll
dnl
AC_FUNC_CHECK(atoll, [AC_DEFINE_UNQUOTED(HAVE_ATOLL, 1, [define if you have atoll])])
AC_FUNC_CHECK(strtoll, [AC_DEFINE_UNQUOTED(HAVE_STRTOLL, 1, [define if you have strtoll])])
AC_CHECK_LIB(m, round, [AC_DEFINE_UNQUOTED(HAVE_ROUND, 1, [define if you have round])]
)

dnl
dnl add check for project's memory leak checker
dnl
AC_MEMORY_LEAK_CHECK()

dnl
dnl add checks for cppunit
dnl
AM_PATH_CPPUNIT(1.8.0,
	AM_CONDITIONAL(CPPUNIT, test "x$no_cppunit" = x)
	AC_DEFINE_UNQUOTED(HAVE_LIBCPPUNIT, 1, [Define if you have libcppunit])
	AC_SUBST(CPPUNIT_LIBS),
	AM_CONDITIONAL(CPPUNIT, test "x$no_cppunit" = x)
	AC_SUBST(CPPUNIT_LIBS)
	)

dnl
dnl check for tools required for generation of PDF documentation 
dnl
AC_PDF_GENERATION()

dnl
dnl check for kdchart
dnl 
dnl AC_KDCHART()
AC_DEFINE_UNQUOTED(HAVE_KDCHART, "1", [Define if you have libkdchart])
AC_DEFINE_UNQUOTED(HAVE_KDCHART_SETPROP, "1", [Define if you have KDChartListTableData::setProp method])


dnl
dnl check for libofx
dnl 
AC_LIBOFX()

dnl
dnl check for library build for Qt-Designer
dnl
AC_QTDESIGNER_SUPPORT()

dnl
dnl check for sqlite3 support
dnl
AC_SQLITE3()

dnl CXXFLAGS="$NOOPT_CXXFLAGS" dnl __kdevelop[noopt]__
CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS" dnl __kdevelop[exc]__
dnl KDE_NEED_FLEX dnl __kdevelop__
dnl AC_PROG_YACC dnl __kdevelop__

#
# make sure the UIC compiler uses our own widget lib
#
X=`echo $UIC | grep -- -L`
if test "x$X" = "x"; then
	echo "UIC does not support -L option!!";
fi
UIC=`echo $UIC -L \$\(top_builddir\)/kmymoney2/widgets/.libs`

#
# create header directory, make symlinks
#

rm -rf kmymoney
mkdir kmymoney

echo Generating symlinks to header files
CURDIR=
if test "x${srcdir}" = "x${srcdir#/}"; then
  CURDIR=`pwd`/
fi
BASEDIR=$CURDIR$srcdir


while read a; do
  MFILES=$(find $BASEDIR/$a -name Makefile.am);
  for MFILE in $MFILES; do
    DIR=$(dirname $MFILE)
    HFILES=$(grep -v noinst_HEADERS $MFILE | grep _HEADERS)
    for HFILE in $HFILES; do
      case $HFILE in
        =|*_HEADERS|\\)
          ;;
        *)
          ln -s $DIR/$HFILE kmymoney/$HFILE
          ;;
      esac
    done
  done
done < $srcdir/inst-apps

dnl =======================================================
dnl FILE: kmymoney2/widgets/configure.in.in
dnl =======================================================

AC_CONFIG_FILES([ kmymoney2/widgets/makekdewidgets ])
KDE_CREATE_SUBDIRSLIST
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ libkgpgfile/Makefile ])
AC_CONFIG_FILES([ libkdchart/Makefile ])
AC_CONFIG_FILES([ kmymoney2/Makefile ])
AC_CONFIG_FILES([ kmymoney2/converter/Makefile ])
AC_CONFIG_FILES([ kmymoney2/dialogs/Makefile ])
AC_CONFIG_FILES([ kmymoney2/dialogs/settings/Makefile ])
AC_CONFIG_FILES([ kmymoney2/html/Makefile ])
AC_CONFIG_FILES([ kmymoney2/html/images/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/128x128/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/128x128/apps/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/16x16/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/16x16/actions/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/22x22/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/22x22/actions/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/32x32/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/32x32/apps/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/48x48/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/48x48/apps/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/64x64/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/64x64/apps/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/Tango/scalable/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/hicolor/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/hicolor/16x16/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/hicolor/16x16/actions/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/hicolor/22x22/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/hicolor/22x22/actions/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/hicolor/32x32/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/hicolor/32x32/apps/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/hicolor/48x48/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/hicolor/48x48/apps/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/hicolor/64x64/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/hicolor/64x64/apps/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/128x128/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/128x128/apps/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/16x16/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/16x16/actions/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/22x22/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/22x22/actions/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/32x32/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/32x32/apps/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/48x48/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/48x48/apps/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/64x64/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/64x64/apps/Makefile ])
AC_CONFIG_FILES([ kmymoney2/icons/oxygen/scalable/Makefile ])
AC_CONFIG_FILES([ kmymoney2/misc/Makefile ])
AC_CONFIG_FILES([ kmymoney2/mymoney/Makefile ])
AC_CONFIG_FILES([ kmymoney2/mymoney/storage/Makefile ])
AC_CONFIG_FILES([ kmymoney2/pics/Makefile ])
AC_CONFIG_FILES([ kmymoney2/plugins/Makefile ])
AC_CONFIG_FILES([ kmymoney2/plugins/interfaces/Makefile ])
AC_CONFIG_FILES([ kmymoney2/plugins/ofximport/Makefile ])
AC_CONFIG_FILES([ kmymoney2/plugins/ofximport/dialogs/Makefile ])
AC_CONFIG_FILES([ kmymoney2/reports/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/C/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/de_AT/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/de_CH/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/de_DE/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/dk/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/el_GR/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/en_GB/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/en_US/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/es_AR/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/es_ES/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/es_MX/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/fr_CA/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/fr_CH/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/fr_FR/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/gl_ES/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/hu_HU/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/it/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/jp/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/nl_NL/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/pt_BR/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/pt_PT/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/ro_RO/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/ru_RU/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/sk/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/tr_TR/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/zh_CN/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/zh_HK/Makefile ])
AC_CONFIG_FILES([ kmymoney2/templates/zh_TW/Makefile ])
AC_CONFIG_FILES([ kmymoney2/views/Makefile ])
AC_CONFIG_FILES([ kmymoney2/widgets/Makefile ])
AC_CONFIG_FILES([ kmymoney2/wizards/Makefile ])
AC_CONFIG_FILES([ kmymoney2/wizards/newaccountwizard/Makefile ])
AC_CONFIG_FILES([ kmymoney2/wizards/newuserwizard/Makefile ])
AC_CONFIG_FILES([ kmymoney2/wizards/wizardpages/Makefile ])
AC_CONFIG_FILES([ po/Makefile ])
AC_CONFIG_FILES([ developer-doc/Makefile ])
AC_CONFIG_FILES([ developer-doc/phb/Makefile ])
AC_CONFIG_FILES([ doc/Makefile ])
AC_CONFIG_FILES([ doc/en/Makefile ])
AC_CONFIG_FILES([ contrib/Makefile ])
AC_OUTPUT
echo ""
echo ""
echo "Configure results (user options):"
echo "------------------------------------------"
echo "OFX plugin:                            $enable_ofxplugin"

echo ""

echo "OFX direct connect:                    $enable_ofxbanking"

echo ""

echo "Chart support:                         yes"

echo ""

echo "SQLITE3 support:                       $enable_sqlite3"

echo "------------------------------------------"
echo ""
echo ""
echo "Configure results (developer options):"
echo "------------------------------------------"
if test "x$use_memory_leak_check" != "xno"; then
	echo "Memory leak check support:             yes"
else
	echo "Memory leak check support:             no"
fi

echo ""

if test "$enable_qtdesigner" = "yes"; then
	echo "Qt-Designer library support:           yes"
else
	echo "Qt-Designer library support:           no"
fi

echo ""

echo "PDF document generation:               $enable_pdfdocs"

echo ""

if test x$no_cppunit = x; then
	echo "CPPUNIT support:                       yes"
	echo "        online tests:                  "$enable_online_tests;
elif test x$no_cppunit = xuser; then
	echo "CPPUNIT support:                       disabled"
else
	echo "CPPUNIT support:                       no"
	echo "    You are missing the CPPUNIT headers and libraries"
	echo "    The unit test framework support won't be compiled."
	echo "    This is not relevant for the usage of the application.";
	echo "    Unit tests are only required by the developers.";
fi

echo "------------------------------------------"
# 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