File: configure.in

package info (click to toggle)
grisbi 0.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 15,180 kB
  • ctags: 7,111
  • sloc: ansic: 114,821; sh: 11,374; makefile: 1,102; perl: 370; yacc: 291
file content (307 lines) | stat: -rw-r--r-- 6,993 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
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
AC_INIT(grisbi,0.6.0)
AC_CONFIG_SRCDIR(src/main.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([-Wall foreign])
AM_MAINTAINER_MODE

AC_GNU_SOURCE

dnl Standard checks
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AM_PROG_LIBTOOL
AC_LIBTOOL_DLOPEN_SELF
AC_SUBST(LIBTOOL_DEPS)
AC_SUBST(lt_prog_compiler_wl)
dnl Check if we have backtrace support
AC_CHECK_FUNCS(backtrace)
AC_CONFIG_MACRO_DIR([macros])

dnl Check for NLS support.                                                      
ALL_LINGUAS="cs da de el eo es fa fr he it nl pl pt_BR ro ru zh_CN"
AM_GNU_GETTEXT
AC_CHECK_LIB(intl,main)


dnl
dnl Standard GTK checks
dnl
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.2.0 glib-2.0 >= 2.2 gmodule-2.0 >= 2.2])
LDFLAGS="${LDFLAGS}"
CFLAGS="${CFLAGS} ${GTK_CFLAGS}"

AC_SUBST(GTK_LIBS)


dnl
dnl Check whether GLib modules are supported, to determine whether we
dnl can support plugins.
dnl
AC_MSG_CHECKING(whether GLib supports loadable modules)
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$GLIB_LIBS $GTK_LIBS $LIBS"
AC_TRY_RUN([
#include <glib.h>
#include <gmodule.h>
#include <stdio.h>
#include <stdlib.h>

int 
main ()
{
  if (g_module_supported())
    return 0;	/* success */
  else
    return 1;	/* failure */
}
], ac_cv_glib_supports_modules=yes, ac_cv_glib_supports_modules=no,
   [echo $ac_n "cross compiling; assumed OK... $ac_c"
    ac_cv_glib_supports_modules=yes])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
if test "$ac_cv_glib_supports_modules" = yes ; then
  AC_MSG_RESULT(yes)
  have_plugins=yes
else
  AC_MSG_RESULT(no)
  have_plugins=no
fi

dnl
dnl balance estimate
dnl
AC_ARG_WITH(balance_estimate,
	AC_HELP_STRING([--with-balance-estimate],
	[add the support of balance estimate.]),
[
  AC_DEFINE(ENABLE_BALANCE_ESTIMATE, 1, [Define if balance estimate is enabled])
])

dnl
dnl check whether plugins should be enabled and, if they should be,
dnl
AC_ARG_WITH(plugins,
	AC_HELP_STRING([--with-plugins],
	[support plugins.]),
[
  case "$withval" in
  "" | y | ye | yes )
    if test x$have_plugins = xno
    then
      AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
    fi
    ;;
  n | no)
    have_plugins=no
    ;;
  *)
    if test x$have_plugins = xno
    then
      AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.])
    fi
    ;;
  esac
])


dnl
dnl Where plugins are located
dnl
AM_CONDITIONAL(HAVE_PLUGINS, test x$have_plugins = xyes)
if test x$have_plugins = xyes
then
  AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled])
fi


dnl
dnl XML2
dnl
PKG_CHECK_MODULES(XML2, libxml-2.0 >= 2.0, , noxml2=true)
if test x$noxml2 == xtrue
then
	AC_MSG_RESULT([libxml2 support not available, this Grisbi build will not be able to load Gnucash files.])
	CFLAGS="${CFLAGS} -DNOXML2"
fi
AM_CONDITIONAL(HAVE_XML2, test x$noxml2 != xtrue)


dnl
dnl OpenSSL Check
dnl
PKG_CHECK_MODULES(OpenSSL, libssl, , nossl=true)
if test x$nossl == xtrue
then
	AC_MSG_RESULT([OpenSSL support not available, this Grisbi build will not be able to crypt/decrypt files.])
	CFLAGS="${CFLAGS} -DNOSSL"
fi
AM_CONDITIONAL(HAVE_SSL, test x$nossl != xtrue)


dnl
dnl Check for cunit
dnl
AC_CHECK_HEADER(CUnit/Basic.h,,nocunit=true)
AC_ARG_WITH(cunit,
	AC_HELP_STRING([--with-cunit],
	[build grisbi with cunit tests [default=without]]),
	[build_cunit=$withval],
	[build_cunit=no]
)
if test x$build_cunit != xyes
then
	nocunit=true
else
	if test x$nocunit != xtrue
	then
		nocunit=false
		CFLAGS="${CFLAGS} -DHAVE_CUNIT"
		LDFLAGS="${LDFLAGS} -lcunit"
	else
		AC_MSG_RESULT([libcunit header missing. Check your libcunit installation])
	fi
fi
AM_CONDITIONAL(HAVE_CUNIT, test x$nocunit != xtrue)


dnl
dnl Check for libofx
dnl
AC_CHECK_HEADER(libofx/libofx.h,,noofx=true)
AC_ARG_WITH(ofx,
	AC_HELP_STRING([--without-ofx],
	[build grisbi without ofx support [default=with]]),
	[build_ofx=$withval],
	[build_ofx=yes]
)
if test x$build_ofx != xno
then
    if test x$noofx != xtrue
    then
        AC_CHECK_LIB(ofx, ofx_set_status_cb, HAVE_OFX_SET_STATUS_CB="true")
    else
        noofx=true
        AC_MSG_RESULT([Libofx header missing. Check your libofx installation])
    fi
else
    noofx=true
fi
AM_CONDITIONAL(HAVE_OFX, test x$noofx != xtrue)
AM_CONDITIONAL(HAVE_OFX_SET_STATUS_CB, test x$OFX_SET_STATUS_CB != xtrue)


dnl
dnl ElectricFence support
dnl
dnl --enable-electricfence flag
AC_ARG_ENABLE(electricfence,
	[AC_HELP_STRING([--enable-electricfence],
	[Enable compilation with ElectricFence (default=no)])],,
	enable_electricfence=no)
AC_CHECK_LIB(efence,malloc,electricfence=yes,electricfence=no)
if test "x$enable_electricfence" = xyes ; then
	if test "x$electricfence" = xyes ; then
		AC_MSG_WARN([ElectricFence is enabled])
		LDFLAGS="${LDFLAGS} -lefence"
	else
		AC_MSG_ERROR([Can't find the ElectriceFence library !])
	fi
fi

dnl
dnl WError support
dnl
AC_ARG_ENABLE(werror,
 	[AC_HELP_STRING([--enable-werror],
 	[Treates warning as errors (default=no)])],,
 	enable_werror=no)
if test "x$enable_werror" = xyes ; then
	if test "x$GCC" = "xyes" ; then
		CFLAGS="$CFLAGS -Wall -Werror"
		AC_MSG_WARN([Werror and Wall flags are enabled])
	else
		AC_MSG_WARN([WError and WAll can be enabled only with gcc])
	fi
fi

dnl
dnl GMemProfile support 
dnl
AC_ARG_ENABLE(gmemprofile,
 	[AC_HELP_STRING([--enable-gmemprofile],
 	[Outputs a summary of memory usage when grisbi terminates (default=no)])],,
 	enable_gmemprofile=no)
if test "x$enable_gmemprofile" = xyes ; then
	GSB_GMEMPROFILE=1
	AC_MSG_WARN([g_mem_profile is enabled])
else
	GSB_GMEMPROFILE=0
fi
AC_DEFINE_UNQUOTED([GSB_GMEMPROFILE], [${GSB_GMEMPROFILE}], 
	[define to 1 if g_mem_profile support is enabled])
AC_SUBST(GSB_GMEMPROFILE)


dnl
dnl NoOptim support 
dnl
AC_ARG_ENABLE(nooptim,
 	[AC_HELP_STRING([--enable-nooptim],
 	[Outputs a summary of memory usage when grisbi terminates (default=no)])],,
 	enable_nooptim=no)
if test "x$enable_nooptim" = xyes ; then
	CFLAGS="$CFLAGS -O0"
	AC_MSG_WARN([-O0 is enabled])
fi
AC_DEFINE_UNQUOTED([GSB_NOOPTIM], [${GSB_NOOPTIM}], 
	[define to 1 if g_no_optim support is enabled])
AC_SUBST(GSB_NOOPTIM)



AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)

AC_SUBST(XML2_LIBS)
AC_SUBST(XML2_CFLAGS)

AC_SUBST(prefix)
AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(export_dynamic_flag_spec_CXX)
AC_SUBST(export_dynamic_flag_spec)
AC_SUBST(lt_prog_compiler_wl)

dnl ******************************
dnl Makefiles
dnl ******************************

AC_OUTPUT([
Makefile
help/Makefile
help/C/Makefile
help/de/Makefile
help/en/Makefile
help/fr/Makefile
help/tips/Makefile
intl/Makefile
macros/Makefile
pixmaps/Makefile
pixmaps/flags/Makefile
po/Makefile.in
share/Makefile
share/categories/Makefile
share/categories/C/Makefile
share/categories/fr/Makefile
share/categories/fr_FR/Makefile
share/categories/de_DE/Makefile
share/categories/de_AT/Makefile
share/categories/ru/Makefile
src/Makefile
src/plugins/gnucash/Makefile
src/plugins/ofx/Makefile
src/plugins/openssl/Makefile
])