-
Notifications
You must be signed in to change notification settings - Fork 761
/
configure.in
590 lines (464 loc) · 19.4 KB
/
configure.in
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
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
# -*-shell-script-*-
# FILE:
# configure.in
#
# FUNCTION:
# implements checks vfor a variety of system-specific functions
#
# Contents:
# Headers - Autoconf header stuff
# Variables - Hardcoded variables
# Programs - Check for programs binaries
# Functions - Check for functions
# With - Check for --with/without options
# Enable - Check for --enable/disable options
# Libraries - Check for libraries
# Footer - Autoconf footer stuff
### --------------------------------------------------------------------------
### Headers
### check for various programs, and stuff (do this first because later
### commands depend on them):
AC_INIT(src/guile/gnucash.h.in)
AM_INIT_AUTOMAKE(gnucash,1.3.5)
dnl Set of available languages.
ALL_LINGUAS="fr de en_GB sv"
AC_PROG_INSTALL
AC_PROG_RANLIB
### AC_PROG_CC sets CFLAGS if it's not already set.
AC_PROG_CC
AC_ISC_POSIX
AC_C_BIGENDIAN
AC_PROG_MAKE_SET
AC_CHECK_FUNCS(stpcpy)
### --------------------------------------------------------------------------
### Fix up prefix for recursive expansion
test "x$prefix" = xNONE && prefix=$ac_default_prefix
### --------------------------------------------------------------------------
### Useful POSIX shell functions
###
# This has to be a variable because we need to be able to export it,
# and POSIX shells AFAIK don't have "export -f"
gnc_recursively_expand_var () {
# Note that this function will only work for cases where any sign of
# a $ means that there is a variable reference that can be expanded.
# I.e. it would fail miserably for something like pattern='^bar.*$'.
local expanded_var=${1}
while echo $expanded_var | grep '\$' > /dev/null
do
expanded_var=`eval echo ${expanded_var}`
done
echo $expanded_var
}
### --------------------------------------------------------------------------
### Variables
### Set up all the initial variable values...
# USE_QUICKFILL:
AC_DEFINE(USE_QUICKFILL,1)
# Should we uses color (red/black) balances?
AC_ARG_ENABLE( color,
[ --disable-color don't use color (red/black) balances],
AC_DEFINE(USE_NO_COLOR,1),
AC_DEFINE(USE_NO_COLOR,0) )
AC_ARG_WITH( opt-style-install,
[ --with-opt-style-install install everything in subdirs of --prefix],
OPT_STYLE_INSTALL=1
CPPFLAGS="$CPPFLAGS -I$prefix/include"
CFLAGS="$CLFAGS -L$prefix/lib",
OPT_STYLE_INSTALL=0)
AC_SUBST(OPT_STYLE_INSTALL)
AC_ARG_ENABLE( debug,
[ --enable-debug compile with debugging flags set],
CFLAGS="${CFLAGS} -g -Wall"
LDFLAGS="${LDFLAGS} -g -Wall"
AC_DEFINE(DEBUG_MEMORY,1) AC_DEFINE(USE_DEBUG,1),
AC_DEFINE(DEBUG_MEMORY,0) AC_DEFINE(USE_DEBUG,0) )
AC_ARG_ENABLE( warnings,
[ --enable-warnings compile with lots of warnings generated],
CFLAGS="${CFLAGS} -g -Wall -ansi -pedantic -Wwrite-strings -Wid-clash-31 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Woverloaded-virtual -Winline -felide-constructors -fnonnull-objects"
LDFLAGS="${LDFLAGS} -g -Wall"
AC_DEFINE(DEBUG_MEMORY,1) AC_DEFINE(USE_DEBUG,1) )
### --------------------------------------------------------------------------
### i18n
AC_ARG_WITH( locale-dir,
[ --with-locale-dir=PATH specify where to look for locale-specific information],
LOCALE_DIR="$with_locale_dir",
LOCALE_DIR="$prefix/share/locale")
GNC_EXPANDED_LOCALE_DIR=`gnc_recursively_expand_var "${LOCALE_DIR}"`
AC_SUBST(LOCALE_DIR)
AC_SUBST(GNC_EXPANDED_LOCALE_DIR)
AC_CHECK_HEADER(locale.h, ac_cv_header_locale_h=yes, ac_cv_header_locale_h=no)
AC_CAN_USE_GNU_GETTEXT
### --------------------------------------------------------------------------
## qt-version of gnucash
# The qt version of gnucash is far from doing anything usefull, so most people
# don't care about it. Those who want to play with it, must specify --enable-qt
AC_ARG_ENABLE(qt,
[ --enable-qt enable building of the Qt version of gnucash],
GNC_QT_ENABLED=yes)
if test x"$GNC_QT_ENABLED" = xyes; then
QT_TARGET="qt.real"
QT_STATIC_TARGET="qt.static.real"
else
QT_TARGET="qt.disable"
QT_STATIC_TARGET="qt.disable"
fi
AC_SUBST(QT_TARGET)
AC_SUBST(QT_STATIC_TARGET)
### --------------------------------------------------------------------------
### Check for perl
# Check for perl, force version 5
# AC_CHECK_PROGS(PERL,perl5 perl) # Sets @PERL@
AC_PATH_PROG(PERL, perl)
AC_ARG_WITH(perl,
[ --with-perl=FILE which perl executable to use ],
PERL="${with_perl}")
# Make sure Perl was found
if test x"$PERL" = x; then
AC_MSG_ERROR([Cannot find Perl. Try using the --with-perl flag.])
fi
# Make sure it's version 5 or later
if "$PERL" -e 'exit 1 if $] < 5.0'; then
:
else
AC_MSG_ERROR([Found ${PERL} reports version ]
[`${PERL} -e 'print $]'`, need version 5.*])
fi
AC_SUBST(PERL)
# Now check for perl headers
# This appears to be what Perl's ExtUtils::MakeMaker module does, so
# I'm reasonably sure it's correct.
# PERLINCL="/usr/lib/perl5/i386-linux/5.00404"
#
PERLINCL=`$PERL -MConfig -e 'print $Config{"archlibexp"}'`
AC_ARG_WITH( perl-includes,
[ --with-perl-includes=DIR specify where to look for perl includes],
PERLINCL="$with_perl_includes" )
if test ! -d ${PERLINCL}/CORE; then
AC_MSG_ERROR([Missing directory ${PERLINCL}/CORE in the perl include directory])
fi
AC_SUBST(PERLINCL)
### -------------------------------------------------------------------
# Check for 'swig'
AC_PATH_PROG(SWIG,swig,no) # Sets @SWIG@
AC_ARG_WITH(swig,
[ --with-swig=FILE which swig executable to use ],
SWIG="${with_swig}")
if test x"$SWIG" = xno; then
AC_MSG_ERROR([Cannot find Swig. Try using the --with-swig flag.])
fi
### -------------------------------------------------------------------
# Let the user specify glib paths:
GLIB_CONFIG_BIN="glib-config"
AC_ARG_WITH( glib-config,
[ --with-glib-config=executable which glib-config to use to find glib ],
GLIB_CONFIG_BIN="$with_glib_config")
# If the user hasn't specified the binary, then try to find it.
if test x"${GLIB_CONFIG_BIN}" = x
then
AC_PATH_PROG(GLIB_CONFIG_BIN, glib-config, GLIB_CONFIG_NOT_FOUND)
fi
AC_SUBST(GLIB_CONFIG_BIN)
# Let the user specify gnome paths:
GNOME_CONFIG_BIN="gnome-config"
AC_ARG_WITH( gnome-config,
[ --with-gnome-config=executable which gnome-config to use to find gnome ],
GNOME_CONFIG_BIN="$with_gnome_config")
# If the user hasn't specified the binary, then try to find it.
if test x"${GNOME_CONFIG_BIN}" = x
then
AC_PATH_PROG(GNOME_CONFIG_BIN, gnome-config, GNOME_CONFIG_NOT_FOUND)
fi
AC_SUBST(GNOME_CONFIG_BIN)
### --------------------------------------------------------------------------
### Libraries
LIBS="$LIBS -lm"
# We're going to set up our own X configure variables. These are only
# used in side configure. At the end, we use them to set X_LIBS.
# This allows us to be careful about libarary ordering, in case that's
# important.
AC_PATH_XTRA
if test x"$no_x" = xyes; then
AC_ERROR([Can not find X11 development headers or libraries.])
fi
# This is how to use the variables set by AC_PATH_XTRA:
# cc @X_CFLAGS@ -c -o foo.o foo.c
# cc @X_LIBS@ (-lfoo...) @X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@
# (But see also the test for Motif libraries, below.)
# (Perhaps X_LIBS should have been called X_LDFLAGS.)
# XXX - Not all programs need all of these, surely.
X_LIBS="$X_LIBS -lXext -lXmu -lXt -lX11"
# XXX - Ask Motif what it wants
MOTIF_LIBS="-lXm"
### --------------------------------------------------------------------------
### Motif libs -- these are needed for the motif builds only
# Let the user specify motif paths:
AC_ARG_WITH( motif,
[ --with-motif=PATH specify where to look for motif includes and libs],
X_LIBS="${X_LIBS} -L$with_motif/lib" X_CFLAGS="$X_CFLAGS -I$with_motif/include" )
AC_ARG_WITH( motif-includes,
[ --with-motif-includes=DIR specify where to look for motif includes],
X_CFLAGS="${X_CFLAGS} -I$with_motif_includes" )
AC_ARG_WITH( motif-libraries,
[ --with-motif-libraries=DIR specify where to look for motif libs],
X_LIBS="${X_LIBS} -L$with_motif_libraries" )
### --------------------------------------------------------------------------
### Gnome libs -- these are needed for the gnome builds only
# Let the user specify gnome paths:
# -I...libgnomesupport is to fix bug in gnome-1.3 release
#
# I believe all the gnome configuration can and should be superceded by
# --with-gnome-config.
AC_ARG_WITH( gnome,
[ --with-gnome=PATH specify where to look for gnome includes and libs],
X_LIBS="${X_LIBS} -L$with_gnome/lib" X_CFLAGS="$X_CFLAGS -I$with_gnome/include -I$with_gnome/lib/gnome-libs/include" )
AC_ARG_WITH( gnome-includes,
[ --with-gnome-includes=DIR specify where to look for gnome includes],
X_CFLAGS="${X_CFLAGS} -I$with_gnome_includes -I$with_gnome_includes/libgnomesupport" )
AC_ARG_WITH( gnome-libraries,
[ --with-gnome-libraries=DIR specify where to look for gnome libs],
X_LIBS="${X_LIBS} -L$with_gnome_libraries" )
# Let the user specify imlib paths:
AC_ARG_WITH( imlib,
[ --with-imlib=PATH specify where to look for imlib includes and libs],
X_LIBS="${X_LIBS} -L$with_imlib/lib" X_CFLAGS="$X_CFLAGS -I$with_imlib/include" )
### --------------------------------------------------------------------------
# The XmHTML widget is used by motif and gnome alike.
AC_ARG_WITH( xmhtml-includes,
[ --with-xmhtml-includes=DIR specify where to look for xmhtml headers],
X_CFLAGS="-I$with_xmhtml_includes ${X_CFLAGS}" )
AC_ARG_WITH( xmhtml-libraries,
[ --with-xmhtml-libraries=DIR specify where to look for xmhtml libs],
X_LIBS="-L$with_xmhtml_libraries ${X_LIBS}" )
# the XmHTML widget needs libz, libjpeg, libpng and libm
# it also uses #ifdef's not #if's so DONT #def to zero.
AC_CHECK_LIB(z, deflateEnd,
AC_DEFINE(HAVE_ZLIB,1) LIBS="-lz $LIBS")
AC_CHECK_LIB(jpeg, jpeg_read_scanlines,
AC_DEFINE(HAVE_JPEG,1) LIBS="-ljpeg $LIBS")
AC_CHECK_LIB(png, png_read_image,
AC_DEFINE(HAVE_PNG,1) LIBS="-lpng $LIBS")
# This should be done in the OTHER_LIBRARIES argument to AC_CHECK_LIB
# if it's actually needed and Makefile.in's should be using
# X_PRE_LIBS, X_LIBS, and X_EXTRA_LIBS, rather than relying on LIBS.
# LIBS="-lXmu -lXt -lXext $X_PRE_LIBS -lX11 $X_LIBS $X_EXTRA_LIBS $LIBS"
AC_CHECK_LIB(Xpm, XpmReadFileToXpmImage,
AC_DEFINE(HAVE_XPM,1) X_LIBS="-lXpm $X_LIBS",
AC_DEFINE(HAVE_XPM,0), $X_PRE_LIBS -lX11 $X_LIBS $X_EXTRA_LIBS)
# Don't build the xmhtml source if user already has it installed...
# this is ugly, there must be a nicer way of setting this up ...
AC_CHECK_LIB(XmHTML, XmHTMLTextScrollToLine,
MOTIF_LIBS="-lXmHTML $MOTIF_LIBS",
,
$X_PRE_LIBS $MOTIF_LIBS $X_EXTRA_LIBS $X_LIBS)
AC_SUBST(XMHTML_TARGET)
AC_SUBST(XMHTML_INC)
### -------------------------------------------------------------------------
## gtk-xmhtml
# if gtk-xmhtml header or library not found, gnome builds are disabled
# make gnome will run make gnome.disabled which echoes a warning message
## XXX - need to do this because gtk-xmhtml requires glibconfig.h
## and I don't want CPPFLAGS permanently altered.
## If there's a better way to tackle this please let me know!
OLDCPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS `$GNOME_CONFIG_BIN --cflags gnome`"
# gnome targets if all goes well
# XXX - should we shift these to the rest of the gnome configuration
# section?
GNOME_TARGET="gnome.real"
GNOME_STATIC_TARGET="gnome.static.real"
#AC_CHECK_HEADER might work, but I'm not sure it uses CPPFLAGS
# this guarantees it - it works. Promise!!
AC_MSG_CHECKING([gtk-xmhtml/gtk-xmhtml.h])
AC_TRY_CPP([#include <gtk-xmhtml/gtk-xmhtml.h>], AC_MSG_RESULT(yes) ,
AC_MSG_WARN([Cannot find gtk-xmhtml.h -- gnome build disabled (not required for motif)])
GNOME_TARGET="gnome.disabled"
GNOME_STATIC_TARGET="gnome.disabled")
#undo damage to CPPFLAGS
CPPFLAGS="$OLDCPPFLAGS"
### --------------------------------------------------------------------------
# If readline exists, just assume that guile needs it. It probably does.
AC_CHECK_LIB(readline, readline)
### --------------------------------------------------------------------------
EXTRALIBS=`$GNOME_CONFIG_BIN --libs gtkxmhtml`
#check for gtkxmhtml, export library link to variable GTK_XMHTML
AC_CHECK_LIB(gtkxmhtml, gtk_xmhtml_new,
GTK_XMHTML="gtkxmhtml",
AC_MSG_WARN([Cannotfind libgtkxmhtml -- gnome build disabled (not required for motif)])
GNOME_TARGET="gnome.disabled"
GNOME_STATIC_TARGET="gnome.disabled",
$EXTRALIBS)
AC_SUBST(GTK_XMHTML)
### --------------------------------------------------------------------------
EXTRALIBS=`$GNOME_CONFIG_BIN --libs print`
# check for gnome-print and enable it via HAVE_LIBGNOMEPRINT
# if found
AC_CHECK_LIB(gnomeprint, gnome_print_context_new, , , $EXTRALIBS)
# XXX - should we export these here or later in the configure script?
AC_SUBST(GNOME_TARGET)
AC_SUBST(GNOME_STATIC_TARGET)
### --------------------------------------------------------------------------
### Guile (libraries and executable)
# Don't disable this. It's the only reliable way to detect guile's
# settings on current guile installs. If it doesn't work for you, then
# don't specify --with-guile-config. (RLB)
# In the long run, --with-guile should go away in favor of
# --with-guile-config. It might make sense to do this now. If you have
# guile 1.3 installed, but don't have guile-config, your install is
# most likely broken anyway, and should be fixed. (RLB)
# Let the user override the guile-config executable.
AC_ARG_WITH( guile-config,
[ --with-guile-config=executable which guile-config to use to find guile ],
AC_MSG_CHECKING([for guile-config])
AC_MSG_RESULT([${with_guile_config}])
GUILE_CONFIG="$with_guile_config"
LIBS="`${GUILE_CONFIG} link` ${LIBS}"
CFLAGS="$CFLAGS `${GUILE_CONFIG} compile`")
if test x"$GUILE_CONFIG" = x; then
# Try to find a default guile-config
AC_PATH_PROG(GUILE_CONFIG,guile-config)
fi
# Still allow the old method (for now).
AC_ARG_WITH( guile,
[ --with-guile=PATH specify where to look for guile includes and libs],
LIBS="-L$with_guile/lib ${LIBS}" CFLAGS="$CFLAGS -I$with_guile/include")
# You can't have both...
if test x"$GUILE_CONFIG" != x && test x"$with_guile" != x ; then
AC_MSG_ERROR([${GUILE_CONFIG} ================ ${with_guile}])
AC_MSG_ERROR([You cannot specify both --with-guile and --with-guile-config])
fi
if test x"$GUILE_CONFIG" = x; then
# If we didn't get GUILE_CONFIG, then do things the old, dumb way.
# Have to use AC_TRY_LINK here because AC_CHECK_LIB caches the
# results, so one failure makes all further attempts fail.
GNC_LIBS_SAFE=${LIBS}
AC_CACHE_CHECK([for guile], ac_cv_lib_guile,
for GNC_TEST_LIBS in "-lguile" "-lguile -ldl" "-lguile -lqthreads" \
"-lguile -ltermcap" "-lguile -lqthreads -ltermcap" \
"-lguile -lreadline -lncurses"; do
if test x"${GUILELIBS}" != x; then
ac_cv_lib_guile=${GUILELIBS}
break
else
LIBS="${GNC_TEST_LIBS} ${GNC_LIBS_SAFE}"
AC_TRY_LINK([#include<guile/gh.h>], [gh_eval_file;],
GUILELIBS="${GNC_TEST_LIBS}")
fi
done)
GUILELIBS=${ac_cv_lib_guile}
else
# We did find a suitable guile-config. Use that.
# and use any guile binary in that same directory.
GUILE_INC=`${GUILE_CONFIG} compile`
GUILELIBS=`${GUILE_CONFIG} link`
fi
# Find the appropriate guile binary.
if test x"$GUILE_CONFIG" != x; then
AC_PATH_PROG(GUILE_BIN, guile,,`dirname ${GUILE_CONFIG}`)
fi
# If that didn't work, try the --with-guile directory, if any.
if test x"$GUILE_BIN" = x && test x"$with_guile" != x; then
AC_PATH_PROG(GUILE_BIN, guile,,`${with_guile}/bin`)
fi
# Final stab at locating a guile binary.
if test x"${GUILE_BIN}" = x; then
AC_PATH_PROG(GUILE_BIN,guile)
fi
if test x"${GUILELIBS}" = x || test x"${GUILE_BIN}" = x; then
AC_MSG_ERROR([Cannot configure guile bits. Do you have guile 1.3 installed?])
fi
# Get just the directory for the guile binary.
GUILE_BIN=`dirname ${GUILE_BIN}`
AC_SUBST(GUILE_CONFIG)
AC_SUBST(GUILE_BIN)
AC_SUBST(GUILE_INC)
AC_SUBST(GUILELIBS)
### --------------------------------------------------------------------------
### Plotutils
#AC_CHECK_LIB(plot, pl_openpl,
# AC_DEFINE(HAVE_PLOTUTILS,1)
# HAVE_PLOTUTILS=1
# AC_DEFINE(PLOTUTILS_LIBS,"-lXaw -lXt -lplot"),
# ,
# $X_PRE_LIBS $MOTIF_LIBS $X_EXTRA_LIBS -lXaw $X_LIBS)
# We need this in at least one of the Makefile.in's
#AC_SUBST(HAVE_PLOTUTILS)
#AC_SUBST(PLOTUTILS_LIBS)
AC_SUBST(MOTIF_LIBS)
### --------------------------------------------------------------------------
#############################################################
### Set up the install style and all the default paths... ###
# some confusion due to FSSTND stuff --
# the readme's and miscellaneous docs are in /usr/doc (or equivalent)
# the online help system is in /usr/share/gnucash/Doc and various subdirs
# the parsed-html report supsystem is in /usr/share/gnucash/Reports
if test ${OPT_STYLE_INSTALL} = 1
then
GNC_DOCDIR='${prefix}/doc'
GNC_BINDIR='${prefix}/bin'
GNC_LIBDIR='${prefix}/lib'
GNC_CONFIGDIR='${sysconfdir}'
GNC_SHAREDIR='${datadir}'
else
GNC_DOCDIR='${prefix}/doc/gnucash'
GNC_BINDIR='${prefix}/bin'
GNC_LIBDIR='${prefix}/lib/gnucash'
GNC_CONFIGDIR='${sysconfdir}/gnucash'
GNC_SHAREDIR='${datadir}/gnucash'
fi
GNC_EXPANDED_LIBDIR=`gnc_recursively_expand_var "${GNC_LIBDIR}"`
GNC_EXPANDED_CONFIGDIR=`gnc_recursively_expand_var "${GNC_CONFIGDIR}"`
GNC_EXPANDED_SHAREDIR=`gnc_recursively_expand_var "${GNC_SHAREDIR}"`
GNC_MANDIR='${mandir}'
AC_SUBST(GNC_DOCDIR)
AC_SUBST(GNC_BINDIR)
AC_SUBST(GNC_LIBDIR)
AC_SUBST(GNC_CONFIGDIR)
AC_SUBST(GNC_SHAREDIR)
AC_SUBST(GNC_MANDIR)
AC_SUBST(GNC_EXPANDED_LIBDIR)
AC_SUBST(GNC_EXPANDED_CONFIGDIR)
AC_SUBST(GNC_EXPANDED_SHAREDIR)
# HACK : inserts the path to gnucash.pm, which is used in the
# reporting code and is defined in gnucash.h
GNC_EXPANDED_PERLLIBPATH=`gnc_recursively_expand_var "${GNC_LIBDIR}"`
AC_SUBST(GNC_EXPANDED_PERLLIBPATH)
# Get the absolute top level directory. This is only used to add some
# ./lib/* paths to PATH for local build binaries like gwrap. For all
# other purposes, you should probably be using top_srcdir. configure
# automagically provides it, but you have to be careful to set it
# directly within each Makefile.in since it's the *relative* path to
# the top of the source tree rather than an absolute path. You can't
# just put it in Makefile.init.in or Makefile.common.
ABSOLUTE_TOP_SRCDIR=`pwd`
AC_SUBST(ABSOLUTE_TOP_SRCDIR)
AC_CONFIG_HEADER(config.h)
AC_OUTPUT(Makefile
Makefile.init
make-gnucash-patch
src/Makefile
src/engine/Makefile
src/guile/Makefile
src/guile/gnucash.h
src/guile/i18n.h
src/scm/Makefile
src/scm/bootstrap.scm
src/g-wrap/Makefile
src/gnome/Makefile
src/motif/Makefile
src/qt/Makefile
src/quotes/gnc-prices
src/register/Makefile
src/register/gnome/Makefile
src/reports/Makefile
src/swig/Makefile
src/swig/perl5/Makefile
po/Makefile.in
po/extract-macros.perl
include/messages_i18n.h
rpm/gnucash.spec
lib/Makefile
lib/Xbae-4.6.2-linas/Makefile
lib/Xbae-4.6.2-linas/src/Makefile
lib/ComboBox-1.33/Makefile,
chmod a+x ./gnucash
chmod a+x ./make-gnucash-patch)