I18N fixing
[gnumeric.git] / configure.in
blob7b3e913948e0c45ba3c0a3fcb49edcbc72b191fc
1 -*- mode: m4 -*-
2 dnl We require Automake 1.7.2, which requires Autoconf 2.54.
3 dnl (It needs _AC_AM_CONFIG_HEADER_HOOK, for example.)
4 AC_PREREQ(2.54)
6 m4_define([gnumeric_version_epoch], [1])
7 m4_define([gnumeric_version_major], [10])
8 m4_define([gnumeric_version_minor], [14])
9 m4_define([gnumeric_version_extra], [])
10 m4_define([gnumeric_version_full],
11     [gnumeric_version_epoch.gnumeric_version_major.gnumeric_version_minor[]gnumeric_version_extra])
13 dnl Emphasize some of the checks.
14 m4_define([BIG_CHECKING], [AC_MSG_CHECKING([
15 ======== $1])])
17 AC_INIT([gnumeric], [gnumeric_version_full],
18         [http://bugzilla.gnome.org/enter_bug.cgi?product=gnumeric])
20 AC_CONFIG_SRCDIR(src/sheet.h)
21 AM_INIT_AUTOMAKE([dist-bzip2])
23 dnl Version info for libraries = CURRENT:REVISION:AGE
24 dnl
25 dnl Within each x.y.*, ABI is maintained backward and _forward_ compatible.
26 dnl (As a consequence, no exported function may be added.)
27 dnl So it's enough to have one interface number per each x.y.* branch.
28 dnl
29 dnl OTOH, we are not able to keep ABI strictly backward compatible throughout
30 dnl the whole x.*.*.
31 dnl The easiest way is to declare no ABI compatibility, ie. AGE is always 0.
32 dnl
33 m4_define([version_iface],
34         m4_eval(100 * gnumeric_version_epoch + gnumeric_version_major))
36 AC_SUBST([VERSION_INFO], [version_iface:gnumeric_version_minor:0])
37 AC_SUBST([VERSION_IFACE], [version_iface])
39 dnl Almost like epoch.major but development versions look forward to the next
40 dnl stable release.
41 AC_SUBST([GNUMERIC_API_VER], [1.10])
43 dnl This one is created by autoheader, ...
44 AC_CONFIG_HEADERS(gnumeric-config.h)
46 dnl ... and this one is a small subset, maintained manually,
47 dnl which will be installed.
48 AC_CONFIG_HEADERS(gnumeric-features.h)
49 dnl
50 dnl Make sure these two won't clash.  Put the following to gnumeric-config.h:
51 AH_BOTTOM([/* Don't include gnumeric-features.h, it's a subset of gnumeric-config.h. */
52 #define GNUMERIC_FEATURES_H])
54 AM_MAINTAINER_MODE
56 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
58 # Make --disable-static the default
59 AC_DISABLE_STATIC
61 dnl We use a LINGUAS file, so we need intltool >= 0.35:
62 IT_PROG_INTLTOOL([0.35.0])
63 IT_PO_SUBDIR(po-functions)
65 if test `expr gnumeric_version_major % 2` -eq 1; then
66     AC_MSG_NOTICE([NOTE: This is a development release])
67     gnumeric_devel=yes
68 else
69     gnumeric_devel=no
72 dnl We use $host and $host_os:
73 AC_CANONICAL_HOST
75 AC_ISC_POSIX
76 AC_PROG_CC
77 AC_PROG_YACC
78 AM_PROG_LEX
79 AC_PROG_LN_S
80 AM_PROG_LIBTOOL
81 DOLT
82 AC_HEADER_STDC
84 dnl Propagate Gnome-specific variable ACLOCAL_FLAGS to Makefile.
85 AC_SUBST(ACLOCAL_AMFLAGS, $ACLOCAL_FLAGS)
87 dnl *****************************
88 # Check for zlib.
89 dnl
90 dnl zlib is needed for the excel plugin; see plugins/excel/Makefile.am
91 dnl
92 _cppflags="${CPPFLAGS}"
93 _ldflags="${LDFLAGS}"
95 AC_ARG_WITH(zlib,
96         AS_HELP_STRING([--with-zlib=DIR], [use libz in DIR]),
97         [case $withval in
98          yes|no) ;;
99          *)     Z_DIR=$withval
100                 CPPFLAGS="${CPPFLAGS} -I$withval/include"
101                 LDFLAGS="${LDFLAGS} -L$withval/lib"
102                 ;;
103          esac])
105 if test "x$with_zlib" != xno; then
106         with_zlib=no
107         AC_CHECK_HEADER(zlib.h, [AC_CHECK_LIB(z, gzread, [with_zlib=yes])])
110 if test "$with_zlib" = no; then
111         AC_MSG_ERROR([*** zlib is required])
114 if test "x${Z_DIR}" != "x"; then
115         Z_CPPFLAGS="-I${Z_DIR}/include"
116         case ${host} in
117         *-*-solaris*)   Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz" ;;
118         *)              Z_LIBS="-L${Z_DIR}/lib -lz" ;;
119         esac
120 else
121         Z_LIBS="-lz"
123 AC_SUBST(Z_CPPFLAGS)
124 AC_SUBST(Z_LIBS)
126 CPPFLAGS=${_cppflags}
127 LDFLAGS=${_ldflags}
129 dnl **********
130 dnl * Goffice 
131 dnl **********
132 # Goffice releases are parallel installable, which do we depend on
133 GOFFICE_API_VER="0.8"
134 AC_SUBST(GOFFICE_API_VER)
135 # Components
136 GOFFICE_PLUGINS_DIR=`pkg-config --variable=PluginDir libgoffice-${GOFFICE_API_VER}`
137 AC_SUBST(GOFFICE_PLUGINS_DIR)
138 GOFFICE_VERSION=`pkg-config --modversion libgoffice-${GOFFICE_API_VER}`
139 AC_SUBST(GOFFICE_VERSION)
142 dnl PKG_PROG_PKG_CONFIG is expanded just before the first occurrence of
143 dnl PKG_CHECK_MODULES.  Since this is inside an `if,' it can escape
144 dnl execution.  Thus we need an explicit call:
145 PKG_PROG_PKG_CONFIG(0.18)
147 dnl *****************************
148 libspreadsheet_reqs="
149         libgoffice-${GOFFICE_API_VER}   >= 0.8.10
150         libgsf-1                >= 1.14.18
151         libxml-2.0              >= 2.4.12
153 gnumeric_reqs="$libspreadsheet_reqs
154         glib-2.0                >= 2.12.0
155         gobject-2.0             >= 2.10.0
156         gmodule-2.0             >= 2.10.0
157         gthread-2.0             >= 2.10.0
158         pango                   >= 1.12.0
159         pangocairo              >= 1.10.0
161 libspreadsheet_gtk_reqs="
162         gtk+-2.0                >= 2.12.0
165 gnumeric_gtk_reqs="$libspreadsheet_gtk_reqs"
167 libspreadsheet_gnome_reqs="
168         libbonobo-2.0           >= 2.2.0
171 gnumeric_gnome_reqs="$libspreadsheet_gnome_reqs
172         libgnomeui-2.0          >= 2.0.0
173         libbonoboui-2.0         >= 2.2.0
174         libgnome-2.0            >= 2.0.0
175         libgsf-gnome-1          >= 1.14.2
178 ui_msg=
180 with_win32=no
181 case $host_os in
182 mingw* | pw32* | cygwin*)
183     with_win32=yes
184     ;;
185 esac
187 dnl *******************
188 dnl Should we use gtk ?
189 dnl *******************
190 gnumeric_with_gtk=true
191 AC_ARG_WITH(gtk, AS_HELP_STRING([--without-gtk], [Build without UI]))
192 if test "x$with_gtk" = xno; then
193         ui_msg="None (Gtk disabled by request)"
194         gnumeric_with_gtk=false
195 else
196         dnl We shouldn't silently default to --without-gtk.
197         dnl If the requirements are not met, fail.
198         ui_msg="Gtk"
199         PKG_CHECK_MODULES(GTK, [$libspreadsheet_gtk_reqs])
200         PKG_CHECK_MODULES(GTK, [$gnumeric_gtk_reqs])
201 fi 
203 if test "x$gnumeric_with_gtk" = xtrue ; then
204         AC_DEFINE(GNM_WITH_GTK, 1, [Define if UI is built])
205         libspreadsheet_reqs="$libspreadsheet_reqs $libspreadsheet_gtk_reqs"
206         gnumeric_reqs="$gnumeric_reqs $gnumeric_gtk_reqs"
209 gnumeric_with_gnome=false
210 if test "x$gnumeric_with_gtk" = xtrue -a "x$with_win32" = xno ; then
211         dnl ************************************
212         dnl Are the GNOME extensions available ?
213         dnl ************************************
215         ui_msg="Gtk+ (Gnome disabled)"
216         AC_ARG_WITH(gnome,
217                 AS_HELP_STRING([--with-gnome], [Use GNOME extensions]),
218                 if test "x$withval" == xyes; then
219                         ui_msg="Gnome"
220                         gnumeric_with_gnome=true
221                 fi
222         )
223         if test "x$gnumeric_with_gnome" = xtrue; then
224                 PKG_CHECK_MODULES(GNOME, [$libspreadsheet_gnome_reqs],
225                         [ui_msg="Gnome"],
226                         [ui_msg="Gtk (missing Gnome dependencies)" ; gnumeric_with_gnome=false])
227                 PKG_CHECK_MODULES(GNOME, [$gnumeric_gnome_reqs],
228                         [ui_msg="Gnome"],
229                         [ui_msg="Gtk (missing Gnome dependencies)" ; gnumeric_with_gnome=false])
230         fi
232         if test "x$gnumeric_with_gnome" = xtrue; then
233                 AC_DEFINE(GNM_WITH_GNOME, 1, [Define if GNOME extensions are available])
234                 libspreadsheet_reqs="$libspreadsheet_reqs $libspreadsheet_gnome_reqs"
235                 gnumeric_reqs="$gnumeric_reqs $gnumeric_gnome_reqs"
236         fi
238 AM_CONDITIONAL(WITH_GTK,   $gnumeric_with_gtk)
239 AM_CONDITIONAL(WITH_GNOME, $gnumeric_with_gnome)
241 dnl ****************************
242 dnl now that we have selected out libraries the whole collection in one
243 dnl shot so that we can have a nice neat compile/link line
244 dnl ****************************
246 PKG_CHECK_MODULES(LIBSPREADSHEET, $libspreadsheet_reqs)
247 AC_SUBST(LIBSPREADSHEET_LIBS)
248 AC_SUBST(LIBSPREADSHEET_CFLAGS)
250 PKG_CHECK_MODULES(GNUMERIC, $gnumeric_reqs)
251 AC_SUBST(GNUMERIC_LIBS)
252 AC_SUBST(GNUMERIC_CFLAGS)
254 with_native_win32=no
255 case $host_os in
256 mingw* | pw32*)
257     with_native_win32=yes
258     AC_ARG_VAR(WINDRES, [The windres executable (used by win32 builds only).])
259     AC_CHECK_TOOL(WINDRES, windres, :)
260     ;;
261 esac
262 AM_CONDITIONAL(WITH_WIN32, test $with_win32 = yes)
263 AM_CONDITIONAL(WITH_NATIVE_WIN32, test $with_native_win32 = yes)
264 AM_CONDITIONAL(CROSS_COMPILING, test x"$cross_compiling" != xno)
266 if test "x$with_win32" = "xyes"; then
267     GNUMERIC_PLUGIN_LDFLAGS="-avoid-version -no-undefined $GNUMERIC_LIBS -Wl,--enable-runtime-pseudo-reloc,--export-all-symbols \$(top_builddir)/src/libspreadsheet.la -s"
268 else
269     GNUMERIC_PLUGIN_LDFLAGS="-avoid-version"
271 AC_SUBST(GNUMERIC_PLUGIN_LDFLAGS)
273 dnl disable for in stable release, enable for development series
274 if test $gnumeric_devel = yes; then
275     CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED"
276     CFLAGS="$CFLAGS -DPANGO_DISABLE_DEPRECATED"
277     if test "x$gnumeric_with_gtk" = xtrue; then
278             CFLAGS="$CFLAGS -DGDK_PIXBUF_DISABLE_DEPRECATED"
279             CFLAGS="$CFLAGS -DGDK_DISABLE_DEPRECATED"
280             CFLAGS="$CFLAGS -DGDK_MULTIHEAD_SAFE"
281             CFLAGS="$CFLAGS -DGTK_DISABLE_DEPRECATED"
282             # CFLAGS="$CFLAGS -DGSEAL_ENABLE"
283     fi
284     if test "x$gnumeric_with_gnome" = xtrue; then
285             CFLAGS="$CFLAGS -DGNOME_DISABLE_DEPRECATED"
286             CFLAGS="$CFLAGS -DBONOBO_DISABLE_DEPRECATED"
287             CFLAGS="$CFLAGS -DBONOBO_UI_DISABLE_DEPRECATED"
288     fi
291 dnl ==============================================
292 dnl Maemo/Hildon based User Interface
294 AC_ARG_ENABLE(hildon,
295         AS_HELP_STRING([--enable-hildon],[Build with Maemo/Hildon support]),
296     enable_hildon="$enableval",
297     enable_hildon=no)
299 if test "x$enable_hildon" = xyes ; then
300     PKG_CHECK_MODULES(HILDON,
301                       hildon-libs hildon-fm libosso,
302                       HAVE_HILDON=yes, HAVE_HILDON=no)
305 if test "x$HAVE_HILDON" = xyes ; then
306     AC_DEFINE(GNM_USE_HILDON, 1, [Build with Maemo/Hildon support])
309 AM_CONDITIONAL(USE_HILDON, test "x$HAVE_HILDON" = xyes)
310 AC_SUBST(HILDON_CFLAGS)
311 AC_SUBST(HILDON_LIBS)
313 dnl The following conditional is set in AM_GCONF_SOURCE_2.
314 dnl Because we may skip its execution, we have to set a default here.
315 m4_pattern_allow([^AM_GCONF_SOURCE_2$])
316 AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [false])
318 dnl *******************
319 dnl Do we need gconf ?
320 dnl *******************
321 gnumeric_with_gconf=false
322 if test ! -z "`echo $GNUMERIC_CFLAGS|grep gconf`"; then
323         dnl ==============================================
324         dnl Special GConf section  (stolen from libgnome)
325         dnl ==============================================
327         dnl Don't publish the GCONFTOOL variable, AM_GCONF_SOURCE_2 has ``gconftool-2'' hardwired.
328         GCONFTOOL=""
329         AC_CHECK_PROG(GCONFTOOL, gconftool-2, gconftool-2)
330         if test x"$GCONFTOOL" = x; then
331                 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
332         fi
333         AM_GCONF_SOURCE_2
334         gnumeric_with_gconf=true
336 AM_CONDITIONAL(WITH_GCONF, $gnumeric_with_gconf)
338 with_corba=false
339 AM_CONDITIONAL(WITH_CORBA, $with_corba)
342 dnl ****************************
343 dnl prep the pixmap generator
344 dnl ****************************
346 AC_ARG_VAR(GLIB_GENMARSHAL, [The glib-genmarshal executable.])
347 AC_CHECK_PROG(GLIB_GENMARSHAL, glib-genmarshal$ac_exeext, glib-genmarshal$ac_exeext)
349 AC_ARG_VAR(GDK_PIXBUF_CSOURCE, [The gdk-pixbuf-csource executable.])
350 AC_CHECK_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource$ac_exeext, gdk-pixbuf-csource$ac_exeext)
352 ## this should come after `AC_PROG_CC'
353 ifdef([GNOME_COMPILE_WARNINGS],
354         [GNOME_COMPILE_WARNINGS] CFLAGS="$CFLAGS $WARN_CFLAGS",
355         []
357 set_more_warnings=yes
358 if test "$GCC" = yes -a "x$set_more_warnings" != xno; then
359         warning_options="-Wsign-compare -Wpointer-arith -Wnested-externs \
360                          -Wchar-subscripts -Wwrite-strings \
361                          -Wdeclaration-after-statement -Wnested-externs \
362                          -Wmissing-noreturn -Wmissing-prototypes \
363                          -Wmissing-declarations -Wno-pointer-sign \
364                          -Werror=format-security -Wbitwise -Wcast-to-as \
365                          -Wdefault-bitfield-sign -Wdo-while -Wparen-string \
366                          -Wptr-subtraction-blows -Wreturn-void -Wtypesign"
367         if test $gnumeric_devel = yes; then
368                 dnl Avoid triggering a warning in gtk+ headers for stable.
369                 warning_options="$warning_options -Wstrict-prototypes"
370         fi
371         for option in $warning_options ; do
372                 SAVE_CFLAGS="$CFLAGS"
373                 CFLAGS="$CFLAGS $option"
374                 AC_MSG_CHECKING([whether gcc understands $option])
375                 AC_TRY_COMPILE([], [],
376                         has_option=yes,
377                         has_option=no,)
378                 if test $has_option = no; then
379                   CFLAGS="$SAVE_CFLAGS"
380                 fi
381                 AC_MSG_RESULT($has_option)
382                 unset has_option
383                 unset SAVE_CFLAGS
384         done
385         unset option
387 AC_SUBST(WARN_CFLAGS)
389 AC_ARG_ENABLE(ssconvert,
390   AS_HELP_STRING([--disable-ssconvert], [Do not build ssconvert (command line spreadsheet conversion tool)]),
391   [], [enable_ssconvert=yes])
392 AM_CONDITIONAL(ENABLE_SSCONVERT, test x"$enable_ssconvert" = xyes)
394 AC_ARG_ENABLE(ssindex,
395   AS_HELP_STRING([--disable-ssindex], [Do not build ssindex (spreadsheet indexer for beagle)]),
396   [], [enable_ssindex=yes])
397 AM_CONDITIONAL(ENABLE_SSINDEX, test x"$enable_ssindex" = xyes)
399 AC_ARG_ENABLE(ssgrep,
400   AS_HELP_STRING([--disable-ssgrep], [Do not build ssgrep (search for supplied strings in spreadsheet)]),
401   [], [enable_ssgrep=yes])
402 AM_CONDITIONAL(ENABLE_SSGREP, test x"$enable_ssgrep" = xyes)
404 AC_ARG_ENABLE(component,
405   AS_HELP_STRING([--disable-component], [Do not build the goffice component]),
406   [], [enable_component=yes])
407 component_dir=""
408 if test x"$enable_component" = xyes; then
409         component_dir="component"
410 else
411         component_dir=""
413 AC_SUBST(COMPONENT_DIR, $component_dir)
415 dnl ****************************
416 dnl GDA Plugin
417 dnl ****************************
418 try_gda=true
419 gda_msg=yes
420 gnomedb_msg=no
421 AC_ARG_WITH(gda,
422         AS_HELP_STRING([--with-gda], [Compile the Gnome Database Access plugin]),
423         if test "x$withval" != xyes; then
424                 try_gda=false
425                 gda_msg="Disabled by request"
426         fi
428 if test "$try_gda" = true; then
429         PKG_CHECK_MODULES(GDA, [libgda-4.0 >= 4.1.1],
430                 [gda_msg=yes],
431                 [gda_msg="NO.  libgda problem"])
432         AC_CHECK_HEADER(libgda/control-center/gdaui-login-dialog.h,
433                         [],
434                         [gda_msg="NO.  libgda problem"])
435         if test "$gda_msg" = yes; then
436                 PKG_CHECK_MODULES(GNOMEDB, [libgnomedb-4.0 >= 3.99.6],
437                         [gnomedb_msg="yes"],
438                         [gnomedb_msg="NO. libgnomedb problem"])
439                 if test "$gnomedb_msg" = yes; then
440                         AC_DEFINE(HAVE_LIBGNOMEDB, 1, [ Define if libgnomedb support is compiled in])
441                 fi
442         fi
444 AM_CONDITIONAL(WITH_GDA, test x"$gda_msg" = xyes)
445 AC_SUBST(GDA_CFLAGS)
446 AC_SUBST(GDA_LIBS)
448 AM_CONDITIONAL(WITH_GNOMEDB, test x"$gnomedb_msg" = xyes)
449 AC_SUBST(GNOMEDB_CFLAGS)
450 AC_SUBST(GNOMEDB_LIBS)
452 dnl ****************************
454 AC_CHECK_DECL(fdopen, fdopen_works=yes, fdopen_works=no)
456 if test $fdopen_works = no ; then
457         unset ac_cv_have_decl_fdopen
458         CFLAGS="$CFLAGS -D_POSIX_SOURCE"
459         AC_MSG_NOTICE([adding -D_POSIX_SOURCE to CFLAGS])
460         AC_CHECK_DECL(fdopen, fdopen_works=yes, fdopen_works=no)
461         if test $fdopen_works = no ; then
462                 AC_MSG_ERROR([fdopen is not available])
463         fi
466 # Unfortunately, -D_POSIX_SOURCE turns off struct timeval on Solaris
467 AC_MSG_CHECKING([whether struct timeval is available])
468 AC_TRY_COMPILE([#include <sys/time.h>], [struct timeval tv;], struct_timeval_works=yes, struct_timeval_works=no)
469 AC_MSG_RESULT($struct_timeval_works)
471 if test $struct_timeval_works = no ; then
472         CFLAGS="$CFLAGS -D__EXTENSIONS__"
473         AC_MSG_CHECKING([whether struct timeval is available with -D__EXTENSIONS__])
474         AC_TRY_COMPILE([#include <sys/time.h>], [struct timeval tv;], struct_timeval_works=yes, struct_timeval_works=no)
475         AC_MSG_RESULT($struct_timeval_works)
476         if test $struct_timeval_works = no ; then
477                 AC_MSG_ERROR([struct timeval is not available])
478         fi
481 AC_CHECK_FUNC(gettimeofday,
482         [AC_DEFINE(HAVE_GETTIMEOFDAY, 1,
483                 [Define if the gettimeofday function is available]
484         )])
486 dnl src/functions/fn-math.c uses M_PI
488 AC_MSG_CHECKING([whether M_PI is available])
489 AC_TRY_COMPILE([#include <math.h>], [double f = M_PI], works_without_bsd_source=yes, works_without_bsd_source=no)
490 AC_MSG_RESULT($works_without_bsd_source)
492 if test $works_without_bsd_source = no ; then
493         CFLAGS="$CFLAGS -D_BSD_SOURCE"
494         AC_MSG_CHECKING([whether M_PI is available with -D_BSD_SOURCE])
495         AC_TRY_COMPILE([#include <math.h>], [double f = M_PI], m_pi_works=yes, m_pi_works=no)
496         AC_MSG_RESULT($m_pi_works)
497         if test $m_pi_works = no ; then
498                 AC_MSG_ERROR([M_PI is not available])
499         fi
502 AC_SUBST(GUILE_LIBS)
503 AC_SUBST(GUILE_INCS)
505 dnl Comment out the guile block:
506 ifelse([
507 dnl check for guile 1.5
508 try_guile=false
509 guile_msg="disabled pending some guile developer interest"
510 enable_guile=false
511 AC_ARG_WITH(guile,
512         AS_HELP_STRING([--with-guile], [Compile with Guile support or without it]),
513         if test "x$withval" = xyes; then
514                 try_guile=true
515         fi
517 if $try_guile; then
518         AC_MSG_CHECKING(for guile >= 1.5)
519         if test "`guile -c '(display (string>=? (version) "1.4.1"))'`" != "#t"; then
520                 AC_MSG_RESULT([Your Guile is too old.  You need Guile 1.5 or later.])
521         else
522                 AC_MSG_RESULT(found)
523                 guile_msg="yes"
524                 enable_guile=true
525         fi
527 if $enable_guile; then
528         GNOME_CHECK_GUILE
530 AM_CONDITIONAL(WITH_GUILE, $enable_guile)
533 dnl **************************************************
534 dnl * psiconv support
535 dnl **************************************************
537 AC_ARG_WITH(psiconv,
538         AS_HELP_STRING([--without-psiconv], [Compile without Psiconv support]))
539 AC_ARG_VAR(PSICONV_CONFIG, [The psiconv-config executable.])
540 if test "x$with_psiconv" != xno; then
541     AC_CHECK_PROG(PSICONV_CONFIG,psiconv-config,psiconv-config)
542     if test x"$PSICONV_CONFIG" = x; then
543         psiconv_msg="missing dependencies"
544     else
545         AC_MSG_CHECKING(for psiconv >= 0.9.3)
546         if $PSICONV_CONFIG --version | awk -F. \
547                 '{exit !($1 > 0 || $2 > 9 || ($2 == 9 && $3 >= 3))}'
548         then
549             PSICONV_CFLAGS=`$PSICONV_CONFIG --cflags`
550             PSICONV_LIBS=`$PSICONV_CONFIG --libs`
551             psiconv_msg=yes
552         else
553             psiconv_msg=no
554         fi
555         AC_MSG_RESULT($psiconv_msg)
556     fi
557 else
558     psiconv_msg=no
560 AM_CONDITIONAL(WITH_PSICONV, test "x$psiconv_msg" = xyes)
561 AC_SUBST(PSICONV_LIBS)
562 AC_SUBST(PSICONV_CFLAGS)
564 try_paradox=true
565 enable_paradox=false
566 AC_ARG_WITH(paradox,
567         AS_HELP_STRING([--without-paradox], [Compile without Paradox support]),
568         if test "x$withval" = xno; then
569                 try_paradox=false
570         fi
573 if $try_paradox; then
574         PKG_CHECK_MODULES(PARADOX,
575                 [pxlib >= 0.4.0],
576                 [paradox_msg="yes"],
577                 [paradox_msg="missing dependencies"])
580 if test "x$paradox_msg" = xyes; then
581         enable_paradox=true
583 AM_CONDITIONAL(WITH_PARADOX, $enable_paradox)
584 AC_SUBST(PARADOX_LIBS)
585 AC_SUBST(PARADOX_CFLAGS)
587 AC_ARG_ENABLE(solver, AS_HELP_STRING([--disable-solver], [Don't compile the solver]))
588 if test "x$enable_solver" = xno; then
589         enable_solver=false
590 else
591         enable_solver=true
592         AC_DEFINE(GNM_ENABLE_SOLVER, 1, [Define if SOLVER is compiled])
594 AM_CONDITIONAL(ENABLE_SOLVER, $enable_solver)
596 plugin_list_given=false
597 PLUGIN_LIST=""
598 AC_ARG_ENABLE(plugins,
599         AS_HELP_STRING([--enable-plugins="text html"], [Compile only the listed plugins]),
600         [plugin_list_given=true
601          test "x$enableval" != xno && PLUGIN_LIST=$enableval
603 AM_CONDITIONAL(PLUGIN_LIST_GIVEN, $plugin_list_given)
604 AC_SUBST(PLUGIN_LIST)
606 POFILES_FULL=
607 for lang in $ALL_LINGUAS; do
608     POFILES_FULL="$POFILES_FULL \$(top_srcdir)/po/$lang.po"
609 done
610 AC_SUBST(POFILES_FULL)
612 AC_SUBST(GETTEXT_PACKAGE, gnumeric)
613 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
614         [The package name, for gettext])
615 AM_GLIB_GNU_GETTEXT
617 dnl Code to handle po-functions/Makefile* and po-functions/POTFILES*
619 dnl First, let me document how the po/ directory is dealt with.
620 dnl Dark mysteries here, so skip the next paragraph if you don't have enough
621 dnl holy water at your hand.  You have been warned.
623 dnl AM_GLIB_GNU_GETTEXT creates an incorrect incarnation of po/POTFILES, as
624 dnl glib-gettext.m4 doesn't know about intltool tags.  Later on, just before
625 dnl config.status is created, a code originating from intltool.m4 creates
626 dnl POTFILES again, this time correctly removing the intltool tags.
627 dnl config.status then creates po/Makefile, again in two steps.  First,
628 dnl po/Makefile.in is created from po/Makefile.in.in the usual way, and then
629 dnl a code registered via the obsolete macro AC_OUTPUT_COMMANDS insterts the
630 dnl contents of file POTFILES to po/Makefile.
632 dnl But both glib-gettext and intltool have the dirname "po/" hardwired, so
633 dnl we are on our own with po-functions.
635 dnl We use a more straightforward approach for po-functions:
636 dnl 1) We create POTFILES immediately here.
637 dnl 2) We let config.status to create Makefile.in.
638 dnl 3) We use AC_CONFIG_COMMANDS to create Makefile.
639 dnl 
640 [# Create po-functions/POTFILES:
641 if test -d po-functions; then
642         rm -f po-functions/POTFILES
643 else
644         mkdir po-functions
646 case "$srcdir" in
647         .)  top_srcdir=.. ;;
648         [\\/]* | ?:[\\/]* )  # Absolute name.
649                 top_srcdir="$srcdir" ;;
650         *)  top_srcdir="../$srcdir" ;;
651 esac
652 sed <$srcdir/po-functions/POTFILES.in -e '/^#/d' -e 's/^[[].*[]] *//' \
653          -e '/^[   ]*$/d' -e "s,^,       $top_srcdir/," | \
654         sed -e '$!s/$/ \\/' >po-functions/POTFILES
656 dnl Finally, register for creation of po-functions/Makefile:
657 dnl We do not currently do anything here.
658 AC_CONFIG_COMMANDS(po-functions/Makefile,
659   [cp po-functions/Makefile.in po-functions/Makefile])
661 SAVE_LIBS="$LIBS"
662 LIBS="$LIBS $GNUMERIC_LIBS"
663 AC_CHECK_FUNCS(mkfifo)
664 LIBS="$SAVE_LIBS"
665 unset SAVE_LIBS
667 dnl Either of these seem to signal IEEE754 math, see mathfunc.c
668 AC_CHECK_HEADERS(ieeefp.h ieee754.h)
670 AC_HEADER_SYS_WAIT
672 dnl Check for some functions
673 AC_CHECK_FUNCS(memmove mkdtemp uname times sysconf)
675 dnl FIXME: Does this really belong here?
676 AC_CHECK_FUNC(bind_textdomain_codeset,,[AC_CHECK_LIB(intl,bind_textdomain_codeset)])
678 dnl check for complete locale implementation
679 AC_CHECK_HEADERS(langinfo.h)
681 dnl check for rlimit
682 AC_CHECK_HEADERS(sys/resource.h)
684 SAVE_CFLAGS=$CFLAGS
685 SAVE_LIBS=$LIBS
686 CFLAGS="$CFLAGS $GNUMERIC_CFLAGS"
687 LIBS="$GNUMERIC_LIBS $LIBS"
689 AC_CHECK_FUNCS(g_option_context_set_delocalize g_hash_table_get_keys)
690 AC_CHECK_FUNCS(gdk_cairo_set_source_rgba)
691 AC_CHECK_FUNCS(gtk_adjustment_configure gtk_adjustment_get_page_increment gtk_adjustment_get_page_size gtk_adjustment_get_lower gtk_adjustment_get_upper gtk_adjustment_get_step_increment gtk_adjustment_set_lower gtk_adjustment_set_upper gtk_adjustment_set_page_increment gtk_adjustment_set_step_increment)
692 AC_CHECK_FUNCS(gtk_cell_renderer_get_alignment gtk_cell_renderer_get_padding)
693 AC_CHECK_FUNCS(gtk_cell_renderer_text_get_background_set gtk_cell_renderer_text_get_foreground_set gtk_cell_renderer_text_get_editable)
694 AC_CHECK_FUNCS(gtk_dialog_get_content_area gtk_dialog_get_action_area)
695 AC_CHECK_FUNCS(gtk_entry_get_text_length gtk_entry_set_icon_from_stock gtk_entry_get_buffer gtk_entry_get_text_area gtk_entry_set_editing_cancelled gtk_entry_get_overwrite_mode)
696 AC_CHECK_FUNCS(gtk_layout_get_bin_window)
697 AC_CHECK_FUNCS(gtk_orientable_set_orientation)
698 AC_CHECK_FUNCS(gtk_selection_data_get_data gtk_selection_data_get_length gtk_selection_data_get_target)
699 AC_CHECK_FUNCS(gtk_table_get_size)
700 AC_CHECK_FUNCS(gtk_tree_view_column_get_button)
701 AC_CHECK_FUNCS(gtk_widget_get_visible gtk_widget_set_visible gtk_widget_get_state gtk_widget_is_toplevel gtk_widget_get_window gtk_widget_get_can_focus gtk_widget_has_focus gtk_widget_get_style gtk_widget_get_allocation gtk_widget_is_sensitive gtk_widget_set_can_focus gtk_widget_set_can_default gtk_widget_get_realized)
702 AC_CHECK_FUNCS(gtk_window_get_default_widget)
703 AC_CHECK_FUNCS(gsf_infile_msvba_steal_modules gsf_open_pkg_foreach_rel )
704 AC_CHECK_FUNCS(pango_font_map_create_context)
706 AC_MSG_CHECKING([for working GTK_WIDGET_REALIZED.])
707 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gtk/gtk.h>]],
708                                 [[GtkWidget *w = NULL;
709                                 (void)(GTK_WIDGET_REALIZED (w));]])],
710                [AC_DEFINE(HAVE_WORKING_GTK_WIDGET_REALIZED, 1, [Define if GTK_WIDGET_REALIZED exists and works])
711                 AC_MSG_RESULT(yes)],
712                [AC_MSG_RESULT(no)])
714 AC_MSG_CHECKING([for GtkEntry::text_area])
715 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gtk/gtk.h>]],
716                                 [[GtkEntry *e = NULL;
717                                 (void)(e->text_area);]])],
718                [AC_DEFINE(HAVE_GTK_ENTRY_TEXT_AREA, 1, [Define if GtkEntry::text_area exists])
719                 AC_MSG_RESULT(yes)],
720                [AC_MSG_RESULT(no)])
722 AC_MSG_CHECKING([for GtkHandleBox::float_window])
723 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gtk/gtk.h>]],
724                                 [[GtkHandleBox *hb = NULL;
725                                 (void)(hb->float_window);]])],
726                [AC_DEFINE(HAVE_GTK_HANDLE_BOX_FLOAT_WINDOW, 1, [Define if GtkHandleBox::float_window exists])
727                 AC_MSG_RESULT(yes)],
728                [AC_MSG_RESULT(no)])
730 AC_MSG_CHECKING([for GtkTable::nrows])
731 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gtk/gtk.h>]],
732                                 [[GtkTable *t = NULL;
733                                 (void)(t->nrows == t->ncols);]])],
734                [AC_DEFINE(HAVE_GTK_TABLE_NROWS, 1, [Define if GtkTable::nrows exists])
735                 AC_MSG_RESULT(yes)],
736                [AC_MSG_RESULT(no)])
738 AC_MSG_CHECKING([for GtkTreeViewColumn::button])
739 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gtk/gtk.h>]],
740                                 [[GtkTreeViewColumn *c = NULL;
741                                 (void)(c->button);]])],
742                [AC_DEFINE(HAVE_GTK_TREE_VIEW_COLUMN_BUTTON, 1, [Define if GtkTreeViewColumn::button exists])
743                 AC_MSG_RESULT(yes)],
744                [AC_MSG_RESULT(no)])
746 AC_MSG_CHECKING([for PANGO_WEIGHT_THIN etc.])
747 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pango/pango.h>]],
748                                 [[(void)(PANGO_WEIGHT_THIN == 42);
749                                 (void)(PANGO_WEIGHT_MEDIUM == 42);
750                                 (void)(PANGO_WEIGHT_ULTRAHEAVY == 42);]])],
751                [AC_DEFINE(HAVE_PANGO_WEIGHT_THIN_ETC, 1, [Define if PANGO_WEIGHT_THIN etc are available])
752                 AC_MSG_RESULT(yes)],
753                [AC_MSG_RESULT(no)])
755 AC_MSG_CHECKING([for OO_NS_CHART_OOO])
756 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gsf/gsf-opendoc-utils.h>]],
757                                 [[(void)((int)OO_NS_CHART_OOO == 42);]])],
758                [AC_DEFINE(HAVE_OO_NS_CHART_OOO, 1, [Define if OO_NS_CHART_OOO is available])
759                 AC_MSG_RESULT(yes)],
760                [AC_MSG_RESULT(no)])
762 CFLAGS=$SAVE_CFLAGS
763 LIBS=$SAVE_LIBS
765 dnl We supply our own lgamma and lgamma_r when missing.
766 AC_CHECK_FUNCS(lgamma_r)
767 if test $ac_cv_func_lgamma_r = no; then
768   AC_CHECK_LIB(m, lgamma_r,
769         [AC_DEFINE(HAVE_LGAMMA_R, 1,
770                 [Define if the lgamma_r function is available]
771          )
772          LIBS="$LIBS -lm"])
774 AC_CHECK_FUNCS(lgamma)
776 AC_C_LONG_DOUBLE
777 float_msg=double
778 AC_ARG_WITH(long_double,
779         AS_HELP_STRING([--with-long-double], [Use long double for floating point]),
780         [if test "x$withval" = xyes; then
781                 SAVE_CFLAGS="$CFLAGS"
782                 SAVE_LIBS="$LIBS"
783                 CFLAGS="$GNUMERIC_CFLAGS"
784                 LIBS="$GNUMERIC_LIBS"
786                 AC_CHECK_HEADERS(sunmath.h)
788                 AC_CHECK_FUNCS(go_render_generall,
789                                ,
790                                AC_MSG_ERROR([libgoffice needs to be compiled with long double support.]))
792                 AC_CHECK_FUNCS(fabsl sqrtl expl expm1l logl log10l log1pl ceill floorl powl hypotl \
793                                 sinl cosl tanl asinl acosl atanl atan2l fmodl lgammal lgammal_r \
794                                 sinhl coshl tanhl asinhl acoshl atanhl \
795                                 isnanl finitel,
796                                 ,
797                                 AC_MSG_ERROR([Long doubles require the $ldfunc function.]))
799                 AC_MSG_CHECKING([checking for working ynl])
800                 AC_TRY_RUN([
801                         #include <math.h>
802                         #ifdef HAVE_SUNMATH_H
803                         #include <sunmath.h>
804                         #endif
805                         int main ()
806                         {
807                                 long double l = ynl (2, 4.0L);
808                                 return !(l >= 0.21 && l <= 0.22);
809                         }],
810                         [AC_DEFINE(HAVE_YNL)
811                         AC_MSG_RESULT(yes)],
812                         AC_MSG_RESULT(no),
813                         [AC_CHECK_FUNCS(ynl)])
815                 AC_MSG_CHECKING([checking for working erfl and erfcl])
816                 AC_TRY_RUN([
817                         #include <math.h>
818                         #ifdef HAVE_SUNMATH_H
819                         #include <sunmath.h>
820                         #endif
821                         int main ()
822                         {
823                                 long double l1 = erfl (1.2L);
824                                 long double l2 = erfcl (1.2L);
825                                 return !(l1 >= 0.91 && l1 <= 0.92 &&
826                                          l2 >= 0.08 && l2 <= 0.09);
827                         }],
828                         [AC_DEFINE(HAVE_ERFL)
829                          AC_DEFINE(HAVE_ERFCL)
830                         AC_MSG_RESULT(yes)],
831                         AC_MSG_RESULT(no),
832                         [AC_CHECK_FUNCS(erfl erfcl)])
834                 CFLAGS="$SAVE_CFLAGS"
835                 LIBS="$SAVE_LIBS"
837                 float_msg="long double (EXPERIMENTAL)"
838                 AC_MSG_WARN([Long double support is experimental -- expect problems])
839                 AC_DEFINE(GNM_WITH_LONG_DOUBLE, 1,
840                         [Define if the long double type is to be used]
841                 )
842         fi]
845 dnl **************************************************
846 dnl * Check for GSettings
847 dnl **************************************************
848 have_gsettings=no
849 AC_CHECK_LIB(gio-2.0,[g_settings_new],
850         [AC_DEFINE(HAVE_G_SETTINGS_NEW, 1,
851                 [Define if the g_settings_new function is available])
852         GLIB_GSETTINGS
853         have_gsettings=yes],
854         [GSETTINGS_RULES=""
855         AC_SUBST(GSETTINGS_RULES)])
856 AM_CONDITIONAL(HAVE_GSETTINGS, test $have_gsettings=yes)
858 dnl **************************************************
859 dnl * Check for Perl
860 dnl **************************************************
862 AC_ARG_VAR(PERL, [The Perl executable.])
863 AC_CHECK_PROG(PERL, perl, perl)
865 want_perl=auto
866 have_perl=no
867 perl_reason=""
868 AC_ARG_WITH(perl, AS_HELP_STRING([--without-perl], [Do not build the Perl plugin loader]),
869         [case $withval in
870         yes) want_perl=yes;;
871         no) want_perl=no;;
872         esac])
873 if test "x$want_perl" = xno ; then
874     perl_reason="disabled by request"
875 else
876     if test "x$PERL" != x; then
877         BIG_CHECKING([for perl ExtUtils::Embed module])
878         if $PERL -e 'eval { require ExtUtils::Embed }; if ($@) { exit(1); } else { exit(0); }'
879         then
880             AC_MSG_RESULT(yes)
882             dnl Use ExtUtils::Embed to figure out the other options.
883             PERL_CCCDLFLAGS=`$PERL -MConfig -e 'print $Config{cccdlflags},"\n";'`
884             PERL_LDDLFLAGS=`$PERL -MConfig -e 'print $Config{lddlflags},"\n";'`
885             PERL_CC=`$PERL -MConfig -e 'print $Config{cc},"\n";'`
886             PERL_LD=`$PERL -MConfig -e 'print $Config{ld},"\n";'`
887             PERL_CCOPTS=`$PERL -MExtUtils::Embed -e ccopts`
888             PERL_LDOPTS=`$PERL -MExtUtils::Embed -e ldopts`
890             AC_MSG_CHECKING([Checking for perl compiler, linker, libraries and headers])
891             rm -f testperl$ac_exeext testperl.$ac_objext testperl.c testperl.err
892             cat > testperl.c <<EOF
893 #include "EXTERN.h"
894 #include "perl.h"
895 #include "XSUB.h"
896 int main () { (void)&perl_construct; return 0; }
898             $PERL_CC $PERL_CCOPTS -c testperl.c >testperl.err 2>&1 &&
899             $PERL_LD -o testperl testperl.o $PERL_LDOPTS >testperl.err 2>&1 &&
900             test -x testperl &&
901             have_perl=yes
902             AC_MSG_RESULT($have_perl)
904             if test "x$have_perl" != xyes; then
905                 perl_reason="failed to compile test program"
906                 cat testperl.err testperl.c >&AS_MESSAGE_LOG_FD
907             fi
909             rm -f testperl$ac_exeext testperl.$ac_objext testperl.c testperl.err
911         else
912             AC_MSG_RESULT(no)
913             perl_reason="missing parts of perl"
914         fi
915     else
916         perl_reason="missing perl"
917     fi
920 if test "$want_perl" = xyes -a "x$have_perl" != xyes; then
921     AC_MSG_ERROR([Perl requested, but not available: $perl_reason])
924 AM_CONDITIONAL(WITH_PERL, test "x$have_perl" = xyes)
925 if test "x$have_perl" = xyes ; then
926     perl_msg="yes (using $PERL)"
927 else
928     perl_msg="no ($perl_reason)"
930 AC_SUBST(PERL_CCCDLFLAGS)
931 AC_SUBST(PERL_LDDLFLAGS)
932 AC_SUBST(PERL_CC)
933 AC_SUBST(PERL_LD)
934 AC_SUBST(PERL_CCOPTS)
935 AC_SUBST(PERL_LDOPTS)
937 dnl **************************************************
938 dnl * Check for Python
939 dnl **************************************************
940 python_msg="yes"
941 GNM_PY_CFLAGS=
942 GNM_PY_LDFLAGS=
943 GNM_PY_LIBADD=
945 AC_ARG_WITH(python, AS_HELP_STRING([--without-python], [Do not build the Python plugin loader]))
946 AC_ARG_VAR(PYTHON, [The Python executable.])
947 case $with_python in
948 yes|no) ;;
949 ?*) AC_MSG_ERROR([You cannot use --with-python with an argument.
950 If you want to specify a path to your Python executable, use:
951         $srcdir/configure PYTHON=/path/to/your/python ...]);;
952 esac
953 if test "x$with_python" != xno; then
954     AC_CHECK_PROGS(PYTHON, python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0)
955     if test "x$PYTHON" = x; then
956         python_msg="could not find python"
957     fi
958 else
959     python_msg="Disabled by request"
962 if test "x$python_msg" = xyes; then
963     BIG_CHECKING([for python = 2.x])
964     [PY_VERSION=`$PYTHON -c 'import sys ; sys.stdout.write(sys.version[0:3])'`
965      major_ver=`$PYTHON -c 'import sys ; sys.stdout.write(sys.version[0:1])'`]
966     if test "x$major_ver" = "x2"; then
967         AC_MSG_RESULT(yes)
968         if test "x$with_native_win32" = xyes ; then
969             # 2.x on linux, 2x on win32
970             PY_VERSION=`echo $PY_VERSION | sed -e 's/\\.//'`
971         fi
972     else
973         AC_MSG_RESULT(no)
974         python_msg="NO.  Python version \"${PY_VERSION}\" is too old."
975     fi
978 if test "x$python_msg" = xyes; then
979     if test "x$PY_PREFIX" = x; then
980         PY_PREFIX=`$PYTHON -c 'import sys ; sys.stdout.write(sys.prefix)'`
981     fi
982     if test "x$PY_INCLUDE_DIR" = x; then
983         if test "x$with_native_win32" = xyes ; then
984             PY_INCLUDE_DIR="$PY_PREFIX/include"
985         else
986             PY_INCLUDE_DIR=`$PYTHON -c 'import sys ; import distutils.sysconfig ; sys.stdout.write(distutils.sysconfig.get_python_inc())'`
987         fi
988     fi
990     BIG_CHECKING(Look for $PY_INCLUDE_DIR/Python.h)
991     if test -f $PY_INCLUDE_DIR/Python.h; then
992         AC_MSG_RESULT(yes)
993     else
994         AC_MSG_RESULT(no)
995         python_msg="unable to find Python.h"
996     fi
999 if test "x$python_msg" = xyes; then
1000     m4_define([pygobject_required_version], [2.12.0])
1001     PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0 >= pygobject_required_version,,
1002       [python_msg="Missing pygobject"])
1005 AM_CONDITIONAL(WITH_PYTHON, test "x$python_msg" = xyes)
1006 if test "x$python_msg" = xyes; then
1007     if test "x$PY_LIB_DIR" = x; then
1008         if test "x$with_native_win32" = xyes ; then
1009             PY_LIB_DIR="$PY_PREFIX/libs"
1010         else
1011             PY_LIB_DIR=`$PYTHON -c 'import sys ; import distutils.sysconfig ; sys.stdout.write(distutils.sysconfig.get_config_var("LIBPL"))'`
1012         fi
1013     fi
1015     GNM_PY_CFLAGS="-I$PY_INCLUDE_DIR $PYGOBJECT_CFLAGS"
1016     GNM_PY_LDFLAGS="-L$PY_LIB_DIR -lpython$PY_VERSION $PYGOBJECT_LIBS"
1017     python_msg="yes (using $PYTHON)"
1019 AC_SUBST(GNM_PY_CFLAGS)
1020 AC_SUBST(GNM_PY_LDFLAGS)
1021 AC_SUBST(GNM_PY_LIBADD)
1023 # Support for PDF docs
1024 AC_ARG_ENABLE(pdfdocs,
1025   AS_HELP_STRING([--enable-pdfdocs],[Generate documentation in Portable Document Format]),
1026   [enable_pdfdocs=$enableval],
1027   [enable_pdfdocs=no])
1028 pdf_msg="No, not requested.";
1029 if test x"$enable_pdfdocs" = xyes; then
1030         pdfroute=""
1031         AC_CHECK_PROG(DBCONTEXT, [dbcontext], [dbcontext], [])
1032         AC_CHECK_PROG(DBLATEX, [dblatex], [dblatex], [])
1033         if test x"$DBCONTEXT" = x"dbcontext"; then
1034                 pdfroute=dbcontext
1035         else
1036                 if test x"$DBLATEX" = x"dblatex"; then
1037                         pdfroute=dblatex
1038                 fi
1039         fi
1040         if test x"$pdfroute" != x""; then
1041                 pdf_msg="Yes, through $pdfroute."
1042         else
1043                 AC_MSG_ERROR([
1044 Did not find a suitable tool for generating Portable Document Format from
1045 DocBook XML - aborting.
1047 Both the DocBook to ConTeXt and the DocBook to LaTeX conversion tool can be
1048 obtained from
1049         http://dblatex.sourceforge.net/
1051                 exit 1
1052         fi
1054 AM_CONDITIONAL(ENABLE_PDFDOCS, test x"$enable_pdfdocs" = xyes)
1055 AM_CONDITIONAL(ENABLE_PDF_VIA_DBCONTEXT, test x"$pdfroute" = x"dbcontext")
1056 AM_CONDITIONAL(ENABLE_PDF_VIA_DBLATEX, test x"$pdfroute" = x"dblatex")
1059 dnl A tricky way to comment out in m4:
1060 ifelse([
1061 dnl **************************************************
1062 dnl * Check for mono
1063 dnl **************************************************
1064 with_mono=no
1065 mono_msg="disabled, still experimental"
1067 AC_ARG_WITH(mono, AS_HELP_STRING([--with-mono], [Compile the mono scripting engine]))
1068 case $with_mono in
1069 no)     mono_msg="Disabled by request";;
1071     PKG_CHECK_MODULES(MONO, mono,
1072         [with_mono=yes
1073          AC_DEFINE(WITH_MONO, 1, [Define if mono .NET engine is available])],
1074         [with_mono=no])
1075     mono_msg=$with_mono
1076     ;;
1077 esac
1078 AM_CONDITIONAL(WITH_MONO, test "x$with_mono" = xyes)
1079 AC_SUBST(MONO_CFLAGS)
1080 AC_SUBST(MONO_LIBS)
1083 dnl **************************************************
1084 dnl * Config defaults (Must be after bonobo)
1085 dnl **************************************************
1087 dnl These are changed in gutils.c for WIN32 packages
1088 AC_SUBST(gnumeric_datadir, '${datadir}/gnumeric/${VERSION}')
1089 AC_SUBST(gnumeric_libdir, '${libdir}/gnumeric/${VERSION}')
1090 AC_SUBST(gnumeric_icondir, '${datadir}/pixmaps/gnumeric')
1091 AC_SUBST(gnumeric_localedir, '${prefix}/${DATADIRNAME}/locale')
1093 AC_SUBST(gnumeric_plugindir, '${gnumeric_libdir}/plugins')
1095 AC_SUBST(YYYYMMDD, `date +%Y%m%d`)
1097 dnl Export to gnumeric-config.h
1098 AC_DEFINE(GNM_VERSION_FULL, "gnumeric_version_full",
1099         [The version number of this release, with optional extra suffix])
1100 AC_DEFINE(GNM_VERSION_EPOCH, gnumeric_version_epoch,
1101         [The Epoch of this release])
1102 AC_DEFINE(GNM_VERSION_MAJOR, gnumeric_version_major,
1103         [The Major version number of this release])
1104 AC_DEFINE(GNM_VERSION_MINOR, gnumeric_version_minor,
1105         [The Minor version number of this release])
1106 AC_DEFINE(GNM_VERSION_EXTRA, "gnumeric_version_extra",
1107         [Extra, possibly empty tag for this release])
1109 AC_OUTPUT([
1110 gnumeric.spec
1111 Makefile
1112 libspreadsheet.pc
1113 icons/Makefile
1114 icons/16x16/Makefile
1115 icons/22x22/Makefile
1116 icons/24x24/Makefile
1117 icons/32x32/Makefile
1118 icons/48x48/Makefile
1119 icons/scalable/Makefile
1120 src/Makefile
1121 src/dialogs/Makefile
1122 src/pixmaps/Makefile
1123 src/widgets/Makefile
1124 src/tools/Makefile
1125 src/cut-n-paste-code/Makefile
1126 doc/Makefile
1127 doc/C/Makefile
1128 doc/C/figures/Makefile
1129 doc/C/figures/icons/Makefile
1130 doc/developer/Makefile
1131 plugins/Makefile
1132 plugins/fn-christian-date/Makefile
1133 plugins/fn-complex/Makefile
1134 plugins/fn-database/Makefile
1135 plugins/fn-date/Makefile
1136 plugins/fn-derivatives/Makefile
1137 plugins/fn-eng/Makefile
1138 plugins/fn-erlang/Makefile
1139 plugins/fn-financial/Makefile
1140 plugins/fn-hebrew-date/Makefile
1141 plugins/fn-info/Makefile
1142 plugins/fn-logical/Makefile
1143 plugins/fn-lookup/Makefile
1144 plugins/fn-math/Makefile
1145 plugins/fn-numtheory/Makefile
1146 plugins/fn-r/Makefile
1147 plugins/fn-stat/Makefile
1148 plugins/fn-string/Makefile
1149 plugins/fn-random/Makefile
1150 plugins/fn-tsa/Makefile
1151 plugins/applix/Makefile
1152 plugins/corba/Makefile
1153 plugins/dif/Makefile
1154 plugins/excel/Makefile
1155 plugins/excelplugins/Makefile
1156 plugins/gda/Makefile
1157 plugins/gnome-db/Makefile
1158 plugins/gnome-glossary/Makefile
1159 plugins/html/Makefile
1160 plugins/lotus-123/Makefile
1161 plugins/lpsolve/Makefile
1162 plugins/nlsolve/Makefile
1163 plugins/glpk/Makefile
1164 plugins/mps/Makefile
1165 plugins/oleo/Makefile
1166 plugins/openoffice/Makefile
1167 plugins/paradox/Makefile
1168 plugins/perl-func/Makefile
1169 plugins/perl-loader/Makefile
1170 plugins/plan-perfect/Makefile
1171 plugins/psiconv/Makefile
1172 plugins/py-func/Makefile
1173 plugins/python-loader/Makefile
1174 plugins/qpro/Makefile
1175 plugins/sample_datasource/Makefile
1176 plugins/sc/Makefile
1177 plugins/sylk/Makefile
1178 plugins/uihello/Makefile
1179 plugins/xbase/Makefile
1180 po/Makefile.in
1181 po-functions/Makefile.in
1182 schemas/Makefile
1183 schemas/org.gnome.gnumeric.gschema.xml.in
1184 schemas/org.gnome.gnumeric.dialogs.gschema.xml.in
1185 schemas/org.gnome.gnumeric.plugin.gschema.xml.in
1186 templates/Makefile
1187 templates/english/Makefile
1188 templates/autoformat/Makefile
1189 test/Makefile
1190 tools/Makefile
1191 tools/win32/Makefile
1192 tools/win32/moduleset
1193 tools/win32/gnumeric.nsi
1194 component/Makefile
1197 echo "
1199 Configuration:
1201         Source code location:   ${srcdir}
1202         Compiler:               ${CC}
1203         Compiler flags:         ${CFLAGS}
1204         Floating point type:    ${float_msg}
1206         UI:                     ${ui_msg}
1208         Perl Support:           ${perl_msg}
1209         Python Support:         ${python_msg}
1211         GDA support:            ${gda_msg}
1212         GNOME-DB support:       ${gnomedb_msg}
1213         Psiconv support:        ${psiconv_msg}
1215         PDF documentation:      ${pdf_msg}
1217 #       Mono support:           ${mono_msg}
1218 #       Guile Support:          ${guile_msg}