summaryrefslogtreecommitdiff
path: root/configure.in
blob: 3874236ca2b88750d3d0e6d92078e7f22c5c84cf (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
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
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
AC_INIT(bin/build-ooo)
AC_PREREQ(2.51)
AC_PREFIX_DEFAULT(/usr)

DEFAULT_TAG=OOO_2_0_0

OOO_BUILDMAJOR_VERSION=2
OOO_BUILDMINOR_VERSION=0
OOO_BUILDMICRO_VERSION=0
dnl this includes pre-pended period.
OOO_BUILDSTRIKE_VERSION=.1
OOO_BUILDVERSION="$OOO_BUILDMAJOR_VERSION.$OOO_BUILDMINOR_VERSION.$OOO_BUILDMICRO_VERSION$OOO_BUILDSTRIKE_VERSION"

AM_INIT_AUTOMAKE(ooo-build, $OOO_BUILDVERSION)
AC_SUBST(OOO_BUILDVERSION)

dnl for strike versioning
OOO_BUILD_EXTENSION="(build $OOO_BUILDMICRO_VERSION$OOO_BUILDSTRIKE_VERSION)"
AC_SUBST(OOO_BUILD_EXTENSION)

PROPAGATED_ARGS=$ac_configure_args
AC_SUBST(PROPAGATED_ARGS)

AC_ARG_WITH(tag,
[
  --with-tag              define the tag to use, defaults to the latest
			  release
			  
			  Example:  --with-tag=src680-m110],
,)

AC_ARG_WITH(srcdir,
[
  --with-srcdir           define the directory where to download the source
			  tarball and other extra sources.],
,)

AC_ARG_WITH(win32,
[
  --with-win32            define the build to be on win32; this sets a number
			  of defaults suitable for that platform.],
,)

AC_ARG_WITH(internal-gcc,
[
  --with-internal-gcc     build our own gcc (gcc-3.4.1 with enum and
			  visibility patches).],
,)

AC_ARG_WITH(distro,
[
  --with-distro           build with a specific distributions patch-set

			  Values are:  NLD (the default), Debian, Ark, ...],
,)

AC_ARG_WITH(lang,
[
  --with-lang             define the localizations to build. The English one
			  is built by default.

			  Examples:  --with-lang="en-US de fr it"
				     --with-lang=ALL],
,)

AC_ARG_ENABLE(dbgutil,
[  --enable-dbgutil:       Include additional debugging utilities, such as
                          assertions, object counting, etc. Larger build.
                          (this generates a non-product build)
],,)

AC_ARG_ENABLE(mono,
[  --enable-mono          Enables the compilation of the Mono bindings
],,)

AC_ARG_ENABLE(access,
[  --disable-access       Disable the Access import pieces.
],,)

AC_ARG_WITH(system-mdbtools,
[
  --with-system-mdbtools     Use system libmdb* for the Access base backend
],,)

AC_ARG_ENABLE(cairo,
[
  --enable-cairo          Enables cairo canvas backend.],
,)

AC_ARG_ENABLE(hunspell,
[
  --enable-hunspell          Enables Hunspell UNO component.],
,)

AC_ARG_WITH(system-hunspell,
[
  --with-system-hunspell     Use system libhunspell to build the Hunspell
                             UNO component],
,)

AC_ARG_WITH(ooo-builddir,
[
  --with-ooo-builddir     define the directory where openoffice.org will be
			  compiled, e.g. the root of an ooo cvs checkout.],
,)

AC_ARG_WITH(installed-ooo-dirname,
[
  --with-installed-ooo-dirname
			  specify the directory name of the core OOo network
			  install dir, for example "openoffice" or "ooo-1.1",
			  yielding a core install directory of
			  /usr/lib/openoffice or /usr/lib/ooo-1.1.

			  Example:  --with-installed-ooo-dirname=ooo-1.1],
,)

AC_ARG_WITH(binsuffix,
[
  --with-binsuffix
			  specify the suffix to be used on the end of script
			  names, to allow parallel installation of two versions.
			  
			  Default:  --with-binsuffix=2.0],
,)

AC_ARG_WITH(docdir,
[
  --with-docdir           define the directory name where the extra
			  documentation will be installed.

			  Example:  --with-docdir=/usr/share/doc/packages/OpenOffice.org],
,)

AC_ARG_WITH(vendor,
[
  --with-vendor           specify an overall Vendor name to simplify
			  configuration and packaging when a vendor does the
			  same thing for multiple Distributions],
,)

AC_ARG_WITH(num-cpus,
[
  --with-num-cpus         Number of build processes/cpus to use (number of
			  projects that will build at the same time).
			  Multi-process/multi-cpu builds can save a lot of time
			  on multi-cpu machines.],
,)

AC_ARG_WITH(gcc-speedup,
[
  --with-gcc-speedup      Tool to use to speedup the compilation. Currently
			  ccache (caching results of previous compilation) and
			  icecream (distributed compiling tool) are supported.
			  Both can be used at the same time.

			  Example: --with-gcc-speedup=ccache,icecream],
,)

AC_ARG_WITH(icecream-max-jobs,
[
  --with-icecream-max-jobs
			  Maximum number of jobs that make will issue at
			  the same time. Defaults to 10.],
,)

AC_ARG_WITH(icecream-bindir,
[
  --with-icecream-bindir  Location of icecream's gcc and g++.
			  Defaults to /opt/icecream/bin.],
,)

AC_ARG_ENABLE(gtk,
[
  --disable-gtk           Disables gtk+ native widgets and Gnome icons.],
,)

AC_ARG_ENABLE(kde,
[
  --disable-kde           Disables KDE native widgets and KDE icons.],
,)

AC_ARG_ENABLE(gcc33,
[
  --enable-gcc33          Force use of gcc33/g++33 (ie, compat-gcc) on systems
			  that use gcc 3.4 as the default compiler.],
,)

AC_ARG_ENABLE(strip,
[
  --disable-strip
			  Disables the stripping of installed binaries, so 
			  debugging symbols are not removed.],
,)

AC_ARG_ENABLE(post-install-scripts,
[
  --disable-post-install-scripts
			  Disables post install scripts within make install.
			  It is usefull when creating a package from the
			  installed files. The scripts are then run by
			  the package after it is installed.],
,)

AC_ARG_WITH(arch,
[
  --with-arch             Define the architecture that we will target.

                          Usage: --with-arch=(x86|ppc|sparc)],
,)

AC_ARG_WITH(openclipart,
[
  --with-openclipart  Build and install OOo galleries from the Open Clip Art
                      Library. The parameter is either a version of the library
		      or an absolute path to the prebuilt and preinstalled .png
		      files.
		      
		      Example:	--with-openclipart=0.13
		    		--with-openclipart=/usr/share/openclipart],
,)

dnl
dnl Items here only to make --help work nicely:
dnl 
AC_ARG_ENABLE(java,
[
  --with-java           build ooo with a Jdk & Java support],
,)
dnl
dnl Mirror
dnl
AC_ARG_WITH(mirror,
[
  --with-mirror		Specify a mirror of the go-ooo.org packages directory.
			
			Example: --with-mirror=http://foo.bar.baz/mirror],
,)

AM_MAINTAINER_MODE

dnl
dnl Setup the misc. tweaks we need.
dnl
BASEDIR=`pwd`
TOOLSDIR=$BASEDIR

AC_PATH_PROG(PERL, perl)
if test -z "PERL"; then
   AC_MSG_ERROR([perl not found; required for ooo-build])
fi
AC_SUBST(PERL)
INTLTOOL_PERL=$PERL
AC_SUBST(INTLTOOL_PERL)

AC_PATH_PROG(PKG_CONFIG, pkg-config)
if test ! -x "$PKG_CONFIG" ; then
   AC_MSG_ERROR([
*** You need the latest pkg-config.
*** Get the latest version of pkg-config from
*** <http://www.freedesktop.org/software/pkgconfig/>.])
fi
AC_SUBST(PKG_CONFIG)

PKG_CHECK_MODULES( FOO_COMMON, 
		   [ libxml-2.0 fontconfig >= 1.0.1 ],
		   have_common=true, have_common=false )
PKG_CHECK_MODULES( FOO_OPTIONAL,
		   [ gtk+-2.0 libstartup-notification-1.0 ],
		   have_optional=true, have_optional=false )

# NB. according to:
#   http://sources.redhat.com/ml/bug-automake/2002/msg02066.html
# it's a really bad idea to do conditional tests for things.
#
if test "z$with_win32" = "z" -a "z`uname -o`" = "zCygwin" ; then
    AC_MSG_WARN([On Cygwin, automatically using --with-win32])
    with_win32="yes"
fi
if test "z$with_win32" = "z"; then
    if test ! $have_common; then
	AC_MSG_ERROR([Library requirements were not met])
    fi
    BUILD_WIN32=
else
    if test "z$with_distro" = "z"; then
	with_distro="Win32"
    fi

    BUILD_WIN32=yes
fi

AC_SUBST(BUILD_WIN32)

if test "z$with_tag" = "z"; then
   with_tag=$DEFAULT_TAG
fi

APPLY_DIR="$TOOLSDIR/patches/OOO_2_0"

# search more dirs for the apply file
# the default dir is defined by the selected tag
# the alternatives are derived by removing a part (suffix) of the tag
while test "$APPLY_DIR" != "$TOOLSDIR/patches/" ; do
   test -f $APPLY_DIR/apply && break
   APPLY_DIR=${APPLY_DIR%?}
done
test "$APPLY_DIR" = "$TOOLSDIR/patches/" && APPLY_DIR="$TOOLSDIR/patches"
if test -f $APPLY_DIR/apply; then
   AC_MSG_RESULT([found $with_tag, using $APPLY_DIR/apply])
else
   AC_MSG_ERROR([Can't locate patch set for: $with_tag])
fi
CVSTAG=$with_tag
AC_SUBST(CVSTAG)
AC_SUBST(APPLY_DIR)

# FIXME: We currently do not support starting build with already unpackaged
# sources, so the following warning is always printed
warn_use_download="	./download
"
AC_MSG_CHECKING( for directory where to download sources )
if test "z$with_srcdir" = "z"; then
    SRCDIR=$BASEDIR/src
elif (echo "${with_srcdir}" | grep -v -q "^/"); then
    AC_MSG_ERROR([--with-srcdir= must be an absolute path]);
else
    SRCDIR=$with_srcdir
fi
AC_MSG_RESULT([$SRCDIR])

BUILDDIR=$BASEDIR/build
if test "z$with_ooo_builddir" = "z"; then
   OOBUILDDIR=$BUILDDIR/$CVSTAG
else
   OOBUILDDIR=$with_ooo_builddir
fi

rm -f $BASEDIR/stamp/patch.apply

AC_SUBST(SRCDIR)
AC_SUBST(BUILDDIR)
AC_SUBST(TOOLSDIR)
AC_SUBST(OOBUILDDIR)

if test "z$with_win32" != "z"; then
    AC_PATH_PROG(CABEXTRACT, cabextract)
    if test "!" -x "$CABEXTRACT" ; then
      AC_MSG_ERROR([
*** The cabextract utility must be installed.])
    fi
fi

if test "z$with_distro" = "z"; then
   with_distro="NLD";
fi
DISTRO=$with_distro
AC_SUBST(DISTRO)

VENDORNAME=OpenOffice
if test "z$with_vendor" != "z"; then
    VENDORNAME="$with_vendor"
fi
AC_SUBST(VENDORNAME)

dnl
dnl Debian specific hard-coded defaults.
dnl

dnl
dnl Ark Linux specific hard-coded defaults.
dnl
if test "z$with_distro" = "zArk"; then
    if test "z$with_vendor" = "z"; then
        with_vendor="Ark Linux"
    fi
fi

if test "z$with_java" = "zno"; then
   AC_PATH_PROG(XSLTPROC, xsltproc, no)
   if test "$XSLTPROC" = "no"; then
      AC_MSG_ERROR([xsltproc is required to build without java])
   fi
fi

AC_CHECK_HEADER(security/pam_appl.h, have_pam=true, have_pam=false)
AC_CHECK_HEADER(png.h, have_png=true, have_png=false)
AC_CHECK_HEADER(zlib.h, have_zlib=true, have_zlib=false)

if test "z$with_win32" = "z"; then
    if ! $have_pam; then
	AC_MSG_ERROR(install pam-devel)
    fi
    if ! $have_png; then
	AC_MSG_ERROR(install png-devel)
    fi

    if ! $have_zlib; then
	AC_MSG_ERROR(install zlib-devel)
    fi

fi

AC_CHECK_PROG(ACONF, autoconf, yes)
if ! test "z$ACONF" = "zyes"; then
    AC_MSG_ERROR( autoconf must be installed )
fi

AC_CHECK_PROG(FLEX, flex, yes)
if ! test "z$FLEX" = "zyes"; then
   AC_MSG_ERROR( flex must be installed )
fi

AC_CHECK_PROG(BISON, bison, yes)
if ! test "z$BISON" = "zyes"; then
   AC_MSG_ERROR( bison must be installed )
fi

if test "z$with_internal_gcc" = "zyes" ; then
   SYSTEM_GCC=
   gcc_to_use="internal (will be built)"
else
   SYSTEM_GCC=true
   gcc_to_use="from system"
fi
AC_SUBST(SYSTEM_GCC)

BUILD_NCPUS=1
if test "z$with_num_cpus" != "z"; then
   BUILD_NCPUS=$with_num_cpus
fi
AC_SUBST(BUILD_NCPUS)

AC_CHECK_PROG(CCACHE, ccache, yes)

ENABLE_CCACHE=""
ENABLE_ICECREAM=""
for enable_speedup in `echo "$with_gcc_speedup" | sed 's/,/ /g'`
do
    if test "$enable_speedup" = "ccache"; then
        if test "$CCACHE" != "yes"; then
            AC_MSG_ERROR([ccache not found, but set in --with-gcc-speedup])
        else
            ENABLE_CCACHE="yes"
        fi
    elif test "$enable_speedup" = "icecream"; then
        ENABLE_ICECREAM="yes"
    fi
done
AC_SUBST(ENABLE_CCACHE)
AC_SUBST(ENABLE_ICECREAM)

ICECREAM_JOBS="10"
if test "z$with_icecream_max_jobs" != "z"; then
    if test "$with_icecream_max_jobs" -gt "10"; then
        AC_MSG_WARN([dmake is limited to 10 jobs, using --with-icecream-max-jobs=10 (instead of $with_num_jobs).])
        with_icecream_max_jobs="10"
    fi
    ICECREAM_JOBS="$with_icecream_max_jobs"
fi
AC_SUBST(ICECREAM_JOBS)

ICECREAM_BINDIR="/opt/icecream/bin"
if test "z$with_icecream_bindir" != "z"; then
    ICECREAM_BINDIR="$with_icecream_bindir"
fi
if test "z$ENABLE_ICECREAM" = "zyes"; then
    if test ! -x "$ICECREAM_BINDIR/gcc" -o ! -x "$ICECREAM_BINDIR/g++" ; then
        AC_MSG_ERROR([icecream's gcc and g++ not found, please set --with-icecream-bindir])
    fi
fi
AC_SUBST(ICECREAM_BINDIR)

if test "z$with_distro" = "zKDE"; then
   if test "z$enable_kde" = "z" ; then
        enable_kde=true
   fi
fi

AC_MSG_CHECKING([for widget sets])
OOO_WIDGET_FLAGS=
WITH_ICONS="hicontrast"
if test "$enable_kde" != "no"; then
   if test "z$with_win32" = "z"; then
      OOO_WIDGET_FLAGS="--enable-kde "
      widget_sets="kde"
      WITH_ICONS="crystal $WITH_ICONS"
   fi
fi
if test "$enable_gtk" != "no"; then
   if test "z$with_win32" = "z"; then
      OOO_WIDGET_FLAGS="--enable-gtk $OOO_WIDGET_FLAGS"
      widget_sets="gtk $widget_sets"
      WITH_ICONS="industrial $WITH_ICONS"

      PKG_CHECK_MODULES( FOO_GTK, [ gtk+-2.0 ],
         have_gtk=true, have_gtk=false )
      if ! $have_gtk; then
         AC_MSG_ERROR([Gtk+ library requirements were not met])
      fi
   fi
else
   OOO_WIDGET_FLAGS="--disable-gtk $OOO_WIDGET_FLAGS"
fi
if test "z$with_win32" != "z"; then
      WITH_ICONS="crystal industrial $WITH_ICONS"
fi
OOO_CUSTOM_IMAGES=
OOO_EXTRA_ARTWORK=extras-2.tar.bz2
OOO_CRYSTAL_IMAGES=ooo_crystal_images-6.tar.bz2
AC_SUBST(OOO_CUSTOM_IMAGES)
AC_SUBST(OOO_EXTRA_ARTWORK)
AC_SUBST(OOO_CRYSTAL_IMAGES)

AC_MSG_RESULT($OOO_WIDGET_FLAGS)
AC_SUBST(OOO_WIDGET_FLAGS)
AC_SUBST(WITH_ICONS)

if test "z$BUILD_WIN32" = "zyes" -a "z$enable_cairo" = "z" ; then
    AC_MSG_WARN([On Cygwin, automatically using --disable-cairo])
    enable_cairo="no"
fi

if test "$enable_cairo" != "no"; then
   if test "$with_system_cairo" = "yes"; then
	SYSTEM_CAIRO=TRUE
   fi
   CAIRO_ENABLED=TRUE
   GLITZ_VER=0.4.3
   CAIRO_VER=1.0.2
   CAIRO_CONFIGURE_FLAG="--enable-cairo=yes"
   cairo_enabled=yes
else
   CAIRO_ENABLED=
   GLITZ_VER=
   CAIRO_VER=
   CAIRO_CONFIGURE_FLAG="--enable-cairo=no"
   cairo_enabled=no
fi
AC_SUBST(CAIRO_ENABLED)
AC_SUBST(SYSTEM_CAIRO)
AC_SUBST(GLITZ_VER)
AC_SUBST(CAIRO_VER)
AC_SUBST(CAIRO_CONFIGURE_FLAG)

AC_MSG_CHECKING([whether Hunspell UNO is enabled])
if test "$enable_hunspell" == "yes" ; then
   HUNSPELL_UNO_SRC=hunspell_UNO_1.1.tar.gz
   hunspell_uno_enabled="yes"
else
   HUNSPELL_UNO_SRC=
   hunspell_uno_enabled="no"
fi
AC_MSG_RESULT([$hunspell_uno_enabled])
AC_SUBST(HUNSPELL_UNO_SRC)

AC_MSG_CHECKING([for libhunspell])
if test "z$HUNSPELL_UNO_SRC" != "z" ; then
    if test "z$with_system_hunspell" != "zyes" ; then
	HUNSPELL_LIB_SRC=hunspell-1.0.8.tar.gz
	hunspell_lib_result="yes"
    else
	HUNSPELL_LIB_SRC=
	hunspell_lib_result="from system"
    fi
else
	HUNSPELL_LIB_SRC=
	hunspell_lib_result="no needed"
fi
AC_MSG_RESULT([$hunspell_lib_result])
AC_SUBST(HUNSPELL_LIB_SRC)

BUILD_MOZILLA_SOURCE='mozilla-source-1.7.5.tar.gz'
AC_SUBST(BUILD_MOZILLA_SOURCE)

FORCE_GCC33=""
if test "z$enable_gcc33" != "z"; then
   FORCE_GCC33="YES"
fi
AC_SUBST(FORCE_GCC33)

RUN_POST_INSTALL_SCRIPTS="yes"
if test "z$enable_post_install_scripts" = "zno"; then
   RUN_POST_INSTALL_SCRIPTS="no"
fi
AC_SUBST(RUN_POST_INSTALL_SCRIPTS)

OOO_STRIP="yes"
if test "z$enable_strip" = "zno"; then
   OOO_STRIP="no"
fi
AC_SUBST(OOO_STRIP)

ARCHITECTURE="unxlngi4"
if test "z$with_arch" != "z"; then
    if test "z$with_arch" = "zppc"; then
        ARCHITECTURE="unxlngppc"
    fi
    if test "z$with_arch" = "zsparc"; then
        ARCHITECTURE="unxlngs"
    fi
fi
AC_SUBST(ARCHITECTURE)

AC_MSG_CHECKING([for broken aliases])
if `alias gcc > /dev/null 2>&1`; then
   AC_MSG_ERROR( you can't alias your gcc - that's broken );
fi
AC_MSG_RESULT(ok)

AC_MSG_CHECKING([for Open Clip Art Library])
OPENCLIPART_VER=
OPENCLIPART_DIR=
if test "z$with_openclipart" != "z" -a "z$with_openclipart" != "zno" ; then
    if test "z$with_openclipart" = "zyes" ; then
	# the gallery from the source tarball by default
	OPENCLIPART_VER=0.12
    elif (echo "$with_openclipart" | grep "^[[0-9\.]]*$") ; then
	# it's a version number
	OPENCLIPART_VER=$with_openclipart
    elif test "z${with_openclipart%%/*}" = "z" ; then
	# it's an absolute path
	if test -d $with_openclipart ; then
	    OPENCLIPART_DIR=$with_openclipart
	else
	    AC_MSG_ERROR([The directory \"$with_openclipart\" does not exist.])
	fi
    else
	AC_MSG_ERROR([--with-openclipart requires either a version number or an absolute path])
    fi
fi
if test "z$OPENCLIPART_VER" != "z" && ! which inkscape >/dev/null 2>&1 ; then
    AC_MSG_ERROR([inkscape is necessary to process Open Clip Art library from sources])
fi    
AC_MSG_RESULT([${OPENCLIPART_VER:-${OPENCLIPART_DIR:-no}}])
AC_SUBST(OPENCLIPART_VER)
AC_SUBST(OPENCLIPART_DIR)

AC_MSG_CHECKING([for ooo-version])
OOO_MAJOR=2.0
OOO_VERSION=2.0
AC_MSG_RESULT([$OOO_VERSION])
AC_SUBST(OOO_VERSION)

AC_MSG_CHECKING([for binsuffix])

if test "z$with_binsuffix" = "zno"; then
    OOO_BINSUFFIX=
elif test "z$with_binsuffix" != "z"; then
    OOO_BINSUFFIX=$with_binsuffix
else
    OOO_BINSUFFIX=2.0
fi
AC_MSG_RESULT([$OOO_BINSUFFIX])
AC_SUBST(OOO_BINSUFFIX)

datestamp=`date '+%Y%m%d.%H%M'`;
SNAPSHOT_TAG="$datestamp.$TAG";
AC_SUBST(SNAPSHOT_TAG)

if test "z$with_installed_ooo_dirname" != "z"; then
   OOOINSTALLDIRNAME=$with_installed_ooo_dirname
else
   OOOINSTALLDIRNAME=ooo-$OOO_MAJOR
fi
AC_SUBST(OOOINSTALLDIRNAME)

if test "z$with_docdir" != "z"; then
    docdir="$with_docdir"
else
    docdir="$datadir/doc/packages/OpenOffice.org"
fi
AC_SUBST(docdir)

# WARNING: The --with-lang= configure option changed, see
#  http://blog.janik.cz/archives/permalinks/2004-11-02T20_04_29.html
#  e.g.
#  --with-lang="ALL"      # see solenv/inc/postset.mk
#  --with-lang="en-US cs"
#  --with-lang="ALL xy"
AC_MSG_CHECKING([for requested localizations])
if test "z$with_lang" = "z" -o "z$with_lang" = "zyes" ; then
    with_lang="en-US"
elif test "z$with_lang" = "zno" ; then
    AC_MSG_WARN([One localization must be built, at least! Defaulting to English.])
    with_lang="en-US"
fi
OOO_LANGS="$with_lang"
AC_MSG_RESULT([$OOO_LANGS])
AC_SUBST(OOO_LANGS)

AC_MSG_CHECKING([whether to enable Mono bindings])
if test -n "$enable_mono" ; then
    if test "$enable_mono" != "no" ; then
	ENABLE_MONO=TRUE
	mono_enabled=yes
    else
	ENABLE_MONO=FALSE
	mono_enabled=no
    fi
else
    # mono is not explicitly requested. Though, ooo-build will install
    # the extra sources to support the build with mono
    mono_enabled=supported
    ENABLE_MONO=SUPPORTED
fi
AC_MSG_RESULT([$mono_enabled])
AC_SUBST(ENABLE_MONO)

AC_MSG_CHECKING([whether to enable Access import])
if test "$enable_access" = "no"; then
    access_enabled=no
    ENABLE_ACCESS=
else
    if test "$with_system_mdbtools" = "yes"; then
        SYSTEM_MDBTOOLS=YES
    fi
    access_enabled=yes
    ENABLE_ACCESS=TRUE
    MDBTOOLS_SRC=mdbtools-0.6pre1.tar.gz
fi
AC_MSG_RESULT([$access_enabled])
AC_SUBST(ENABLE_ACCESS)
AC_SUBST(MDBTOOLS_SRC)
AC_SUBST(SYSTEM_MDBTOOLS)

AC_MSG_CHECKING([whether to enable debugging code])
if test "$enable_dbgutil" = "yes" ; then
    build_product=debug
else
    build_product=product
fi

MIRROR="http://go-ooo.org/packages"
if test "z$with_mirror" != "z" ; then
   MIRROR="$with_mirror"
fi
AC_SUBST(MIRROR)

AC_CONFIG_FILES([download], [chmod +x download])
AC_CONFIG_FILES([scratch/place], [chmod +x scratch/place])
AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update], [chmod +x intltool*])
AC_OUTPUT([ 
Makefile
ooo1.1.spec
bin/setup
bin/Makefile
desktop/Makefile
distro-configs/Makefile
distro-configs/Ark.conf
distro-configs/Common.conf
distro-configs/Debian.conf
distro-configs/Debian64.conf
distro-configs/Ubuntu.conf
distro-configs/Ubuntu64.conf
distro-configs/NLD.conf
distro-configs/NLD64.conf
distro-configs/SUSE.conf
distro-configs/Mandriva.conf
distro-configs/Mandriva64.conf
distro-configs/Gentoo.conf
distro-configs/QiLinux.conf
distro-configs/Frugalware.conf
distro-configs/Frugalware64.conf
fonts/Makefile
patches/Makefile
patches/a11y/Makefile
patches/cairo/Makefile
patches/evo2/Makefile
patches/vba/Makefile
patches/mono/Makefile
patches/src680/Makefile
patches/OOO_2_0/Makefile
patches/64bit/Makefile
po/Makefile
doc/Makefile
src/Makefile
stamp/Makefile
man/Makefile
www/Makefile
www/images/Makefile
www/tinder-scripts/Makefile
])

if test "$ENABLE_CCACHE" = "yes"; then
    ccache_message="yes"
else
    ccache_message="no"
fi
if test "$ENABLE_ICECREAM" = "yes"; then
    icecream_message="yes, in '$ICECREAM_BINDIR'. Max number of jobs is '$ICECREAM_JOBS'"
else
    icecream_message="no"
fi

echo "
Building openoffice
	tag:                $CVSTAG
	apply rules:        $APPLY_DIR/apply
	build dir:          $OOBUILDDIR
	tools dir:          $TOOLSDIR
	src package dir:    $SRCDIR
	distro:             $with_distro
	widget sets:        ${widget_sets:-disabled}
	icons:              ${WITH_ICONS:-default}
	gcc to use:         $gcc_to_use
	hunspell-uno:	    $hunspell_uno_enabled
	hunspell-lib:	    $hunspell_lib_result
	openclipart:        ${OPENCLIPART_VER:-${OPENCLIPART_DIR:-no}}
	mono bindings:	    $mono_enabled
	mdbtools/access:    $access_enabled
	java:               ${with_java:-yes}
	ooo-install-dir:    $OOOINSTALLDIRNAME
	force gcc33:        ${FORCE_GCC33:-no}
	ccache:             $ccache_message
	icecream:           $icecream_message
	cairo:		    $cairo_enabled
	build type:	    $build_product build
	download mirror:    $MIRROR

To build run:
$warn_use_download	make
	bin/ooinstall <path-to-install>

	This is ooo-build-2-0 - the stable branch for 2.0 release.
	If you want to build something cool, unstable, and risky, use HEAD.

"