~ubuntu-branches/ubuntu/quantal/gnumeric/quantal

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Gauvain Pocentek
  • Date: 2009-06-07 11:10:47 UTC
  • mfrom: (1.1.19 upstream) (2.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090607111047-l3rtbzfjxvmi1kx0
Tags: 1.9.8-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Promoted gnumeric-doc to Recommends in gnumeric package for help to be
    installed automatically
  - gnumeric-gtk is a transitional package
  - gnumeric conflicts with gnumeric-gtk << 1.8.3-3ubuntu1
  - call initltool-update in po*
  - remove psiconv support (psiconv is in universe):
    o debian/control: remove B-D on libpsiconv-dev
    o debian/rules: don't pass --with-psiconv to ./configure

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
AC_PREREQ(2.54)
5
5
 
6
6
m4_define([gnumeric_version_epoch], [1])
7
 
m4_define([gnumeric_version_major], [8])
8
 
m4_define([gnumeric_version_minor], [4])
 
7
m4_define([gnumeric_version_major], [9])
 
8
m4_define([gnumeric_version_minor], [8])
9
9
m4_define([gnumeric_version_extra], [])
10
10
m4_define([gnumeric_version_full],
11
11
    [gnumeric_version_epoch.gnumeric_version_major.gnumeric_version_minor[]gnumeric_version_extra])
38
38
 
39
39
dnl Almost like epoch.major but development versions look forward to the next
40
40
dnl stable release.
41
 
AC_SUBST([GNUMERIC_API_VER], [1.8])
 
41
AC_SUBST([GNUMERIC_API_VER], [1.10])
42
42
 
43
43
dnl This one is created by autoheader, ...
44
44
AC_CONFIG_HEADERS(gnumeric-config.h)
56
56
# Make --disable-static the default
57
57
AC_DISABLE_STATIC
58
58
 
59
 
dnl We use the XGETTEXT_KEYWORDS variable, thus we need intltool >= 0.29:
60
 
AC_PROG_INTLTOOL([0.29])
 
59
dnl We use a LINGUAS file, so we need intltool >= 0.35:
 
60
IT_PROG_INTLTOOL([0.35.0])
 
61
IT_PO_SUBDIR(po-functions)
61
62
 
62
63
if test `expr gnumeric_version_major % 2` -eq 1; then
63
64
    AC_MSG_NOTICE([NOTE: This is a development release])
75
76
AM_PROG_LEX
76
77
AC_PROG_LN_S
77
78
AM_PROG_LIBTOOL
 
79
DOLT
78
80
AC_HEADER_STDC
79
81
 
80
82
dnl Propagate Gnome-specific variable ACLOCAL_FLAGS to Makefile.
81
83
AC_SUBST(ACLOCAL_AMFLAGS, $ACLOCAL_FLAGS)
82
84
 
83
 
if test "$GCC" = "yes"; then
84
 
  gcc_check=`$CC -v 2>&1 | grep '^gcc version 2\.96'`
85
 
  if test "$gcc_check" != ""; then
86
 
    # I know a dead parrot when I see one, and I am looking at
87
 
    # one now.
88
 
    AC_MSG_ERROR([You cannot compile Gnumeric with RedHat gcc 2.96.
89
 
We have seen too many subtle compiler errors.
90
 
Please use another compiler, for example a gcc 2.95 series compiler.])
91
 
    # Mate, this parrot wouldn't "vooom!" if you put four million
92
 
    # Volts through it!
93
 
    #
94
 
    # Actually, the real problem here is that there are so many
95
 
    # different compilers calling themselves 2.96.  RedHat, listen
96
 
    # up!  That's a MAJOR BLUNDER!  If the user just thinks of it
97
 
    # as "gcc 2.96" then how the H*** are we going to get bug
98
 
    # reports we can use?  Chances are the newer 2.96 compilers
99
 
    # are just fine, but how can we know?
100
 
  fi
101
 
fi
102
 
 
103
85
dnl *****************************
104
86
# Check for zlib.
105
87
dnl
109
91
_ldflags="${LDFLAGS}"
110
92
 
111
93
AC_ARG_WITH(zlib,
112
 
        [[  --with-zlib=DIR       use libz in DIR]],
 
94
        AS_HELP_STRING([--with-zlib=DIR], [use libz in DIR]),
113
95
        [case $withval in
114
96
         yes|no) ;;
115
97
         *)     Z_DIR=$withval
142
124
CPPFLAGS=${_cppflags}
143
125
LDFLAGS=${_ldflags}
144
126
 
 
127
dnl **********
 
128
dnl * Goffice 
 
129
dnl **********
 
130
# Goffice releases are parallel installable, which do we depend on
 
131
GOFFICE_API_VER="0.8"
 
132
AC_SUBST(GOFFICE_API_VER)
 
133
# Components
 
134
GOFFICE_PLUGINS_DIR=`pkg-config --variable=PluginDir libgoffice-0.8`
 
135
AC_SUBST(GOFFICE_PLUGINS_DIR)
 
136
 
145
137
dnl PKG_PROG_PKG_CONFIG is expanded just before the first occurrence of
146
138
dnl PKG_CHECK_MODULES.  Since this is inside an `if,' it can escape
147
139
dnl execution.  Thus we need an explicit call:
148
140
PKG_PROG_PKG_CONFIG(0.18)
149
141
 
150
 
libgoffice=libgoffice-0.6
151
 
goffice_ver=`pkg-config --modversion $libgoffice`
152
 
AC_SUBST(LIBGOFFICE,$libgoffice)
153
 
AC_SUBST(GOFFICE_VERSION,$goffice_ver)
154
 
 
155
142
dnl *****************************
156
143
libspreadsheet_reqs="
157
 
        $libgoffice             >= 0.6.3
158
 
        libgsf-1                >= 1.14.6
 
144
        libgoffice-${GOFFICE_API_VER}   >= 0.7.7
 
145
        libgsf-1                >= 1.14.14
159
146
        libxml-2.0              >= 2.4.12
160
147
"
161
148
gnumeric_reqs="$libspreadsheet_reqs
162
 
        glib-2.0                >= 2.6.0
163
 
        gobject-2.0             >= 2.6.0
164
 
        gmodule-2.0             >= 2.6.0
165
 
        gthread-2.0             >= 2.6.0
166
 
        pango                   >= 1.8.1
167
 
        pangoft2                >= 1.8.1
 
149
        glib-2.0                >= 2.12.0
 
150
        gobject-2.0             >= 2.10.0
 
151
        gmodule-2.0             >= 2.10.0
 
152
        gthread-2.0             >= 2.10.0
 
153
        pango                   >= 1.12.0
 
154
        pangocairo              >= 1.10.0
168
155
"
169
156
libspreadsheet_gtk_reqs="
170
157
        libglade-2.0            >= 2.3.6
171
 
        gtk+-2.0                >= 2.10.0
 
158
        gtk+-2.0                >= 2.12.0
172
159
"
173
160
 
174
161
gnumeric_gtk_reqs="$libspreadsheet_gtk_reqs"
 
162
 
175
163
libspreadsheet_gnome_reqs="
176
 
        libgnomeui-2.0          >= 2.0.0
177
 
        gconf-2.0
178
164
        libbonobo-2.0           >= 2.2.0
179
165
"
 
166
 
180
167
gnumeric_gnome_reqs="$libspreadsheet_gnome_reqs
 
168
        libgnomeui-2.0          >= 2.0.0
181
169
        libbonoboui-2.0         >= 2.2.0
182
170
        libgnome-2.0            >= 2.0.0
183
171
        libgsf-gnome-1          >= 1.14.2
185
173
 
186
174
ui_msg=
187
175
 
 
176
with_win32=no
 
177
case $host_os in
 
178
mingw* | pw32* | cygwin*)
 
179
    with_win32=yes
 
180
    ;;
 
181
esac
 
182
 
188
183
dnl *******************
189
184
dnl Should we use gtk ?
190
185
dnl *******************
191
186
gnumeric_with_gtk=true
192
 
AC_ARG_WITH(gtk, [--without-gtk    Build without UI])
 
187
AC_ARG_WITH(gtk, AS_HELP_STRING([--without-gtk], [Build without UI]))
193
188
if test "x$with_gtk" = xno; then
194
189
        ui_msg="None (Gtk disabled by request)"
195
190
        gnumeric_with_gtk=false
201
196
        PKG_CHECK_MODULES(GTK, [$gnumeric_gtk_reqs])
202
197
fi 
203
198
 
204
 
gnumeric_with_gnome=$gnumeric_with_gtk
205
 
if test "x$gnumeric_with_gtk" = "xtrue" ; then
 
199
if test "x$gnumeric_with_gtk" = xtrue ; then
206
200
        AC_DEFINE(GNM_WITH_GTK, 1, [Define if UI is built])
207
201
        libspreadsheet_reqs="$libspreadsheet_reqs $libspreadsheet_gtk_reqs"
208
202
        gnumeric_reqs="$gnumeric_reqs $gnumeric_gtk_reqs"
 
203
fi
209
204
 
 
205
gnumeric_with_gnome=false
 
206
if test "x$gnumeric_with_gtk" = xtrue -a "x$with_win32" = xno ; then
210
207
        dnl ************************************
211
208
        dnl Are the GNOME extensions available ?
212
209
        dnl ************************************
213
210
 
214
 
        gnumeric_with_gnome=true
 
211
        ui_msg="Gtk+ (Gnome disabled)"
215
212
        AC_ARG_WITH(gnome,
216
 
                [--{with,without}-gnome    Use GNOME extensions],
217
 
                if test "x$withval" = xno; then
218
 
                        gnumeric_with_gnome=false
219
 
                        ui_msg="Gtk+ (Gnome disabled by request)"
 
213
                AS_HELP_STRING([--with-gnome], [Use GNOME extensions]),
 
214
                if test "x$withval" == xyes; then
 
215
                        ui_msg="Gnome"
 
216
                        gnumeric_with_gnome=true
220
217
                fi
221
218
        )
222
 
        if test "x$gnumeric_with_gnome" = "xtrue"; then
 
219
        if test "x$gnumeric_with_gnome" = xtrue; then
223
220
                PKG_CHECK_MODULES(GNOME, [$libspreadsheet_gnome_reqs],
224
221
                        [ui_msg="Gnome"],
225
 
                        [ui_msg="Gtk (missing gnome dependencies)" ; gnumeric_with_gnome=false])
 
222
                        [ui_msg="Gtk (missing Gnome dependencies)" ; gnumeric_with_gnome=false])
226
223
                PKG_CHECK_MODULES(GNOME, [$gnumeric_gnome_reqs],
227
224
                        [ui_msg="Gnome"],
228
 
                        [ui_msg="Gtk (missing gnome dependencies)" ; gnumeric_with_gnome=false])
 
225
                        [ui_msg="Gtk (missing Gnome dependencies)" ; gnumeric_with_gnome=false])
229
226
        fi
230
227
 
231
 
        if test "x$gnumeric_with_gnome" = "xtrue"; then
 
228
        if test "x$gnumeric_with_gnome" = xtrue; then
232
229
                AC_DEFINE(GNM_WITH_GNOME, 1, [Define if GNOME extensions are available])
233
230
                libspreadsheet_reqs="$libspreadsheet_reqs $libspreadsheet_gnome_reqs"
234
231
                gnumeric_reqs="$gnumeric_reqs $gnumeric_gnome_reqs"
250
247
AC_SUBST(GNUMERIC_LIBS)
251
248
AC_SUBST(GNUMERIC_CFLAGS)
252
249
 
253
 
with_win32=no
 
250
with_native_win32=no
254
251
case $host_os in
255
 
mingw* | pw32* | cygwin*)
256
 
    with_win32=yes
257
 
    GNUMERIC_PLUGIN_LDFLAGS="-no-undefined $GNUMERIC_LIBS -Wl,--enable-runtime-pseudo-relo,--export-all-symbols \$(top_builddir)/src/libspreadsheet.la -s"
 
252
mingw* | pw32*)
 
253
    with_native_win32=yes
258
254
    AC_ARG_VAR(WINDRES, [The windres executable (used by win32 builds only).])
259
255
    AC_CHECK_TOOL(WINDRES, windres, :)
260
256
    ;;
261
257
esac
262
258
AM_CONDITIONAL(WITH_WIN32, test $with_win32 = yes)
263
 
AM_CONDITIONAL(CROSS_COMPILING, test x"$cross_compiling" != "xno")
 
259
AM_CONDITIONAL(WITH_NATIVE_WIN32, test $with_native_win32 = yes)
 
260
AM_CONDITIONAL(CROSS_COMPILING, test x"$cross_compiling" != xno)
264
261
 
265
 
GNUMERIC_PLUGIN_LDFLAGS="-avoid-version $GNUMERIC_PLUGIN_LDFLAGS"
 
262
if test "x$with_win32" = "xyes"; then
 
263
    GNUMERIC_PLUGIN_LDFLAGS="-avoid-version -no-undefined $GNUMERIC_LIBS -Wl,--enable-runtime-pseudo-relo,--export-all-symbols \$(top_builddir)/src/libspreadsheet.la -s"
 
264
else
 
265
    GNUMERIC_PLUGIN_LDFLAGS="-avoid-version"
 
266
fi
266
267
AC_SUBST(GNUMERIC_PLUGIN_LDFLAGS)
267
268
 
268
269
dnl disable for in stable release, enable for development series
269
270
if test $gnumeric_devel = yes; then
270
271
    CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED"
271
272
    CFLAGS="$CFLAGS -DPANGO_DISABLE_DEPRECATED"
272
 
    if test "x$gnumeric_with_gtk" = "xtrue"; then
 
273
    if test "x$gnumeric_with_gtk" = xtrue; then
273
274
            CFLAGS="$CFLAGS -DGDK_PIXBUF_DISABLE_DEPRECATED"
274
275
            CFLAGS="$CFLAGS -DGDK_DISABLE_DEPRECATED"
275
276
            CFLAGS="$CFLAGS -DGDK_MULTIHEAD_SAFE"
276
277
            CFLAGS="$CFLAGS -DGTK_DISABLE_DEPRECATED"
277
278
            CFLAGS="$CFLAGS -DLIBGLADE_DISABLE_DEPRECATED"
278
279
    fi
279
 
    if test "x$gnumeric_with_gnome" = "xtrue"; then
 
280
    if test "x$gnumeric_with_gnome" = xtrue; then
280
281
            CFLAGS="$CFLAGS -DGNOME_DISABLE_DEPRECATED"
281
282
            CFLAGS="$CFLAGS -DBONOBO_DISABLE_DEPRECATED"
282
283
            CFLAGS="$CFLAGS -DBONOBO_UI_DISABLE_DEPRECATED"
287
288
dnl Maemo/Hildon based User Interface
288
289
 
289
290
AC_ARG_ENABLE(hildon,
290
 
        AC_HELP_STRING([--enable-hildon],[Build with Maemo/Hildon support]),
 
291
        AS_HELP_STRING([--enable-hildon],[Build with Maemo/Hildon support]),
291
292
    enable_hildon="$enableval",
292
293
    enable_hildon=no)
293
294
 
294
 
if test "x$enable_hildon" = "xyes" ; then
 
295
if test "x$enable_hildon" = xyes ; then
295
296
    PKG_CHECK_MODULES(HILDON,
296
297
                      hildon-libs hildon-fm libosso,
297
298
                      HAVE_HILDON=yes, HAVE_HILDON=no)
298
299
fi
299
300
 
300
 
if test "x$HAVE_HILDON" = "xyes" ; then
 
301
if test "x$HAVE_HILDON" = xyes ; then
301
302
    AC_DEFINE(GNM_USE_HILDON, 1, [Build with Maemo/Hildon support])
302
303
fi
303
304
 
304
 
AM_CONDITIONAL(USE_HILDON, test "x$HAVE_HILDON" = "xyes")
 
305
AM_CONDITIONAL(USE_HILDON, test "x$HAVE_HILDON" = xyes)
305
306
AC_SUBST(HILDON_CFLAGS)
306
307
AC_SUBST(HILDON_LIBS)
307
308
 
308
 
dnl ==============================================
309
 
dnl GNOME Specific extensions
310
 
 
311
309
dnl The following conditional is set in AM_GCONF_SOURCE_2.
312
310
dnl Because we may skip its execution, we have to set a default here.
313
311
m4_pattern_allow([^AM_GCONF_SOURCE_2$])
314
312
AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [false])
315
313
 
316
 
with_corba=false
317
 
if test "x${gnumeric_with_gnome}" = "xtrue"; then
318
 
 
 
314
dnl *******************
 
315
dnl Do we need gconf ?
 
316
dnl *******************
 
317
gnumeric_with_gconf=false
 
318
if test ! -z "`echo $GNUMERIC_CFLAGS|grep gconf`"; then
319
319
        dnl ==============================================
320
320
        dnl Special GConf section  (stolen from libgnome)
321
321
        dnl ==============================================
327
327
                AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
328
328
        fi
329
329
        AM_GCONF_SOURCE_2
 
330
        gnumeric_with_gconf=true
 
331
fi
 
332
AM_CONDITIONAL(WITH_GCONF, $gnumeric_with_gconf)
330
333
 
331
 
        dnl *************
332
 
        dnl Corba support
333
 
        dnl *************
334
 
        PKG_CHECK_MODULES(CORBA_LIBS,
335
 
                [ORBit-2.0 >= 2.4.2
336
 
                libbonobo-2.0 >= 2.0.0
337
 
                bonobo-activation-2.0 >= 1.0.2],
338
 
                [with_corba=true],
339
 
                [with_corba=false])
340
 
        if test "x$with_corba" = "xtrue" ; then
341
 
                ORBIT="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
342
 
                BONOBO_IDL_DIR="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
343
 
                BONOBO_ACTIVATION_IDL_DIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
344
 
                ORBIT_IDL="${ORBIT} -I${BONOBO_IDL_DIR} -I${BONOBO_ACTIVATION_IDL_DIR}"
345
 
                AC_SUBST(ORBIT_IDL)
346
 
        fi
347
 
fi
 
334
with_corba=false
348
335
AM_CONDITIONAL(WITH_CORBA, $with_corba)
349
336
 
350
337
 
364
351
        []
365
352
)
366
353
set_more_warnings=yes
367
 
if test "$GCC" = "yes" -a "x$set_more_warnings" != "xno"; then
368
 
        for option in -Wsign-compare -Wpointer-arith -Wnested-externs -Wchar-subscripts -Wwrite-strings -Wdeclaration-after-statement -Wnested-externs -Wmissing-noreturn -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-pointer-sign \
 
354
if test "$GCC" = yes -a "x$set_more_warnings" != xno; then
 
355
        for option in -Wsign-compare -Wpointer-arith -Wnested-externs -Wchar-subscripts -Wwrite-strings -Wdeclaration-after-statement -Wnested-externs -Wmissing-noreturn -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-pointer-sign -Werror=format-security \
369
356
        -Wbitwise -Wcast-to-as -Wdefault-bitfield-sign -Wdo-while -Wparen-string -Wptr-subtraction-blows -Wreturn-void -Wtypesign ; do
370
357
                SAVE_CFLAGS="$CFLAGS"
371
358
                CFLAGS="$CFLAGS $option"
385
372
AC_SUBST(WARN_CFLAGS)
386
373
 
387
374
AC_ARG_ENABLE(ssconvert,
388
 
  [--disable-ssconvert          Do not build ssconvert (command line spreadsheet conversion tool)],
 
375
  AS_HELP_STRING([--disable-ssconvert], [Do not build ssconvert (command line spreadsheet conversion tool)]),
389
376
  [], [enable_ssconvert=yes])
390
 
AM_CONDITIONAL(ENABLE_SSCONVERT, test x"$enable_ssconvert" = "xyes")
 
377
AM_CONDITIONAL(ENABLE_SSCONVERT, test x"$enable_ssconvert" = xyes)
391
378
 
392
379
AC_ARG_ENABLE(ssindex,
393
 
  [--disable-ssindex            Do no build ssindex (spreadsheet indexer for beagle)],
 
380
  AS_HELP_STRING([--disable-ssindex], [Do not build ssindex (spreadsheet indexer for beagle)]),
394
381
  [], [enable_ssindex=yes])
395
 
AM_CONDITIONAL(ENABLE_SSINDEX, test x"$enable_ssindex" = "xyes")
 
382
AM_CONDITIONAL(ENABLE_SSINDEX, test x"$enable_ssindex" = xyes)
 
383
 
 
384
AC_ARG_ENABLE(ssgrep,
 
385
  AS_HELP_STRING([--disable-ssgrep], [Do not build ssgrep (search for supplied strings in spreadsheet)]),
 
386
  [], [enable_ssgrep=yes])
 
387
AM_CONDITIONAL(ENABLE_SSGREP, test x"$enable_ssgrep" = xyes)
 
388
 
 
389
AC_ARG_ENABLE(component,
 
390
  AS_HELP_STRING([--disable-component], [Do not build the goffice component]),
 
391
  [], [enable_component=yes])
 
392
component_dir=""
 
393
if test x"$enable_component" = xyes; then
 
394
        component_dir="component"
 
395
else
 
396
        component_dir=""
 
397
fi
 
398
AC_SUBST(COMPONENT_DIR, $component_dir)
396
399
 
397
400
dnl ****************************
398
401
dnl GDA Plugin
401
404
gda_msg=yes
402
405
gnomedb_msg=no
403
406
AC_ARG_WITH(gda,
404
 
        [--{with,without}-gda      Compile the Gnome Database Access plugin],
 
407
        AS_HELP_STRING([--with-gda], [Compile the Gnome Database Access plugin]),
405
408
        if test "x$withval" != xyes; then
406
409
                try_gda=false
407
410
                gda_msg="Disabled by request"
408
411
        fi
409
412
)
410
 
if test "$try_gda" = "true"; then
411
 
        PKG_CHECK_MODULES(GDA, [libgda-3.0 >= 3.1.1],
 
413
if test "$try_gda" = true; then
 
414
        PKG_CHECK_MODULES(GDA, [libgda-4.0 >= 3.99.6],
412
415
                [gda_msg=yes],
413
416
                [gda_msg="NO.  libgda problem"])
414
 
        if test "$gda_msg" = "yes"; then
415
 
                PKG_CHECK_MODULES(GNOMEDB, [libgnomedb-3.0 >= 3.0.1],
 
417
        if test "$gda_msg" = yes; then
 
418
                PKG_CHECK_MODULES(GNOMEDB, [libgnomedb-4.0 >= 3.99.6],
416
419
                        [gnomedb_msg="yes"],
417
420
                        [gnomedb_msg="NO. libgnomedb problem"])
418
 
                if test "$gnomedb_msg" = "yes"; then
 
421
                if test "$gnomedb_msg" = yes; then
419
422
                        AC_DEFINE(HAVE_LIBGNOMEDB, 1, [ Define if libgnomedb support is compiled in])
420
423
                fi
421
424
        fi
422
425
fi
423
 
AM_CONDITIONAL(WITH_GDA, test x"$gda_msg" = "xyes")
 
426
AM_CONDITIONAL(WITH_GDA, test x"$gda_msg" = xyes)
424
427
AC_SUBST(GDA_CFLAGS)
425
428
AC_SUBST(GDA_LIBS)
426
429
 
427
 
AM_CONDITIONAL(WITH_GNOMEDB, test x"$gnomedb_msg" = "xyes")
 
430
AM_CONDITIONAL(WITH_GNOMEDB, test x"$gnomedb_msg" = xyes)
428
431
AC_SUBST(GNOMEDB_CFLAGS)
429
432
AC_SUBST(GNOMEDB_LIBS)
430
433
 
431
434
dnl ****************************
432
 
dnl GB Plugin
433
 
dnl ****************************
434
 
#try_gda=true
435
 
#gb_msg=yes
436
 
try_gb=no
437
 
gb_msg="disabled due to lack of gb maintenance"
438
 
AC_ARG_WITH(gb,
439
 
        [--{with,without}-gb       Compile the Gnome Basic plugin],
440
 
        if test "x$withval" = xyes; then
441
 
                #try_gb=true
442
 
                gb_msg="We are not joking.  There is no upstream maintainer for GB"
443
 
                #gb_msg="Disabled by request"
444
 
        fi
445
 
)
446
 
if test "$try_gb" = "true"; then
447
 
        PKG_CHECK_MODULES(GB, [libgb == 1.17],
448
 
                [gb_msg=yes],
449
 
                [gb_msg="NO.  gb problem"])
450
 
fi
451
 
AM_CONDITIONAL(WITH_GB, test x"$gb_msg" = "xyes")
452
 
AC_SUBST(GB_CFLAGS)
453
 
AC_SUBST(GB_LIBS)
454
 
 
455
 
dnl ****************************
456
435
 
457
436
AC_CHECK_DECL(fdopen, fdopen_works=yes, fdopen_works=no)
458
437
 
512
491
guile_msg="disabled pending some guile developer interest"
513
492
enable_guile=false
514
493
AC_ARG_WITH(guile,
515
 
        [--{with,without}-guile    Compile with Guile support or without it],
 
494
        AS_HELP_STRING([--with-guile], [Compile with Guile support or without it]),
516
495
        if test "x$withval" = xyes; then
517
496
                try_guile=true
518
497
        fi
538
517
dnl **************************************************
539
518
 
540
519
AC_ARG_WITH(psiconv,
541
 
        [--{with,without}-psiconv  Compile with Psiconv support or without it])
 
520
        AS_HELP_STRING([--without-psiconv], [Compile without Psiconv support]))
542
521
AC_ARG_VAR(PSICONV_CONFIG, [The psiconv-config executable.])
543
522
if test "x$with_psiconv" != xno; then
544
523
    AC_CHECK_PROG(PSICONV_CONFIG,psiconv-config,psiconv-config)
560
539
else
561
540
    psiconv_msg=no
562
541
fi
563
 
AM_CONDITIONAL(WITH_PSICONV, test "x$psiconv_msg" = "xyes")
 
542
AM_CONDITIONAL(WITH_PSICONV, test "x$psiconv_msg" = xyes)
564
543
AC_SUBST(PSICONV_LIBS)
565
544
AC_SUBST(PSICONV_CFLAGS)
566
545
 
567
546
try_paradox=true
568
547
enable_paradox=false
569
548
AC_ARG_WITH(paradox,
570
 
        [--{with,without}-paradox  Compile with Paradox support or without it],
 
549
        AS_HELP_STRING([--without-paradox], [Compile without Paradox support]),
571
550
        if test "x$withval" = xno; then
572
551
                try_paradox=false
573
552
        fi
580
559
                [paradox_msg="missing dependencies"])
581
560
fi
582
561
 
583
 
if test "x$paradox_msg" = "xyes"; then
 
562
if test "x$paradox_msg" = xyes; then
584
563
        enable_paradox=true
585
564
fi
586
565
AM_CONDITIONAL(WITH_PARADOX, $enable_paradox)
587
566
AC_SUBST(PARADOX_LIBS)
588
567
AC_SUBST(PARADOX_CFLAGS)
589
568
 
590
 
AC_ARG_ENABLE(solver, [--disable-solver  Don't compile the solver])
 
569
AC_ARG_ENABLE(solver, AS_HELP_STRING([--disable-solver], [Don't compile the solver]))
591
570
if test "x$enable_solver" = xno; then
592
571
        enable_solver=false
593
572
else
599
578
plugin_list_given=false
600
579
PLUGIN_LIST=""
601
580
AC_ARG_ENABLE(plugins,
602
 
        [--enable-plugins="text html"  Compile only the listed plugins],
 
581
        AS_HELP_STRING([--enable-plugins="text html"], [Compile only the listed plugins]),
603
582
        [plugin_list_given=true
604
583
         test "x$enableval" != xno && PLUGIN_LIST=$enableval
605
584
])
606
585
AM_CONDITIONAL(PLUGIN_LIST_GIVEN, $plugin_list_given)
607
586
AC_SUBST(PLUGIN_LIST)
608
587
 
609
 
 
610
 
# i18n stuff
611
 
ifelse([
612
 
 
613
 
  TRANSLATORS:
614
 
  Please note that gnumeric has both po/ and po-functions/ directories.
615
 
  If you add a new language to ALL_LINGUAS, please make sure that both
616
 
  po/ and po-functions/ have .po files that correspond to your language.
617
 
  If you only add one to po/, the build will break in po-functions/.
618
 
])
619
 
# "id" can go back when there is a po-function translation too.
620
 
AC_SUBST(ALL_LINGUAS, "am ar az bg ca cs da de dz el en_CA en_GB es et fi fr ga gl he hr hu it ja ko lt lv mk ml mr ms nb ne nl nn oc pl pt pt_BR ro ru rw sk sr sr@Latn sv te tr uk vi zh_CN zh_TW")
621
 
 
622
588
POFILES_FULL=
623
589
for lang in $ALL_LINGUAS; do
624
590
    POFILES_FULL="$POFILES_FULL \$(top_srcdir)/po/$lang.po"
670
636
        sed -e '$!s/$/ \\/' >po-functions/POTFILES
671
637
]
672
638
dnl Finally, register for creation of po-functions/Makefile:
 
639
dnl We do not currently do anything here.
673
640
AC_CONFIG_COMMANDS(po-functions/Makefile,
674
 
  [sed -e "/POTFILES =/r po-functions/POTFILES" \
675
 
        po-functions/Makefile.in > po-functions/Makefile])
 
641
  [cp po-functions/Makefile.in po-functions/Makefile])
676
642
 
677
643
SAVE_LIBS="$LIBS"
678
644
LIBS="$LIBS $GNUMERIC_LIBS"
699
665
SAVE_LIBS=$LIBS
700
666
CFLAGS="$CFLAGS $GNUMERIC_CFLAGS"
701
667
LIBS="$GNUMERIC_LIBS $LIBS"
702
 
AC_CHECK_FUNCS(g_date_set_time_t g_slice_alloc gtk_recent_manager_get_default)
 
668
 
 
669
AC_CHECK_FUNCS(g_date_set_time_t g_slice_alloc g_option_context_set_delocalize)
 
670
AC_CHECK_FUNCS(pango_font_map_create_context)
 
671
AC_CHECK_FUNCS(gtk_recent_manager_get_default gtk_orientable_set_orientation gtk_adjustment_configure gsf_open_pkg_foreach_rel)
 
672
AC_CHECK_FUNCS(gsf_infile_msvba_steal_modules)
 
673
 
 
674
AC_MSG_CHECKING([for PANGO_WEIGHT_THIN etc.])
 
675
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pango/pango.h>]],
 
676
                                [[(void)(PANGO_WEIGHT_THIN == 42);
 
677
                                (void)(PANGO_WEIGHT_MEDIUM == 42);
 
678
                                (void)(PANGO_WEIGHT_ULTRAHEAVY == 42);]])],
 
679
               [AC_DEFINE(HAVE_PANGO_WEIGHT_THIN_ETC, 1, [Define if PANGO_WEIGHT_THIN etc are available])
 
680
                AC_MSG_RESULT(yes)],
 
681
               [AC_MSG_RESULT(no)])
 
682
 
703
683
CFLAGS=$SAVE_CFLAGS
704
684
LIBS=$SAVE_LIBS
705
685
 
717
697
AC_C_LONG_DOUBLE
718
698
float_msg=double
719
699
AC_ARG_WITH(long_double,
720
 
        [--{with,without}-long-double           Use long double for floating point],
 
700
        AS_HELP_STRING([--with-long-double], [Use long double for floating point]),
721
701
        [if test "x$withval" = xyes; then
722
702
                SAVE_CFLAGS="$CFLAGS"
723
703
                SAVE_LIBS="$LIBS"
789
769
want_perl=auto
790
770
have_perl=no
791
771
perl_reason=""
792
 
AC_ARG_WITH(perl, [--{with,without}-perl   Compile the Perl plugin loader],
 
772
AC_ARG_WITH(perl, AS_HELP_STRING([--without-perl], [Do not build the Perl plugin loader]),
793
773
        [case $withval in
794
774
        yes) want_perl=yes;;
795
775
        no) want_perl=no;;
868
848
GNM_PY_LDFLAGS=
869
849
GNM_PY_LIBADD=
870
850
 
871
 
AC_ARG_WITH(python, [--{with,without}-python   Compile the Python plugin loader])
 
851
AC_ARG_WITH(python, AS_HELP_STRING([--without-python], [Do not build the Python plugin loader]))
872
852
AC_ARG_VAR(PYTHON, [The Python executable.])
873
853
case $with_python in
874
854
yes|no) ;;
891
871
     major_ver=`$PYTHON -c 'import sys ; sys.stdout.write(sys.version[0:1])'`]
892
872
    if test "x$major_ver" = "x2"; then
893
873
        AC_MSG_RESULT(yes)
894
 
        if test "x$with_win32" = "xyes" ; then
 
874
        if test "x$with_native_win32" = xyes ; then
895
875
            # 2.x on linux, 2x on win32
896
876
            PY_VERSION=`echo $PY_VERSION | sed -e 's/\\.//'`
897
877
        fi
906
886
        PY_PREFIX=`$PYTHON -c 'import sys ; sys.stdout.write(sys.prefix)'`
907
887
    fi
908
888
    if test "x$PY_INCLUDE_DIR" = x; then
909
 
        if test "x$with_win32" = "xyes" ; then
 
889
        if test "x$with_native_win32" = xyes ; then
910
890
            PY_INCLUDE_DIR="$PY_PREFIX/include"
911
891
        else
912
892
            PY_INCLUDE_DIR=`$PYTHON -c 'import sys ; import distutils.sysconfig ; sys.stdout.write(distutils.sysconfig.get_python_inc())'`
931
911
AM_CONDITIONAL(WITH_PYTHON, test "x$python_msg" = xyes)
932
912
if test "x$python_msg" = xyes; then
933
913
    if test "x$PY_LIB_DIR" = x; then
934
 
        if test "x$with_win32" = "xyes" ; then
 
914
        if test "x$with_native_win32" = xyes ; then
935
915
            PY_LIB_DIR="$PY_PREFIX/libs"
936
916
        else
937
917
            PY_LIB_DIR=`$PYTHON -c 'import sys ; import distutils.sysconfig ; sys.stdout.write(distutils.sysconfig.get_config_var("LIBPL"))'`
952
932
  [enable_pdfdocs=$enableval],
953
933
  [enable_pdfdocs=no])
954
934
pdf_msg="No, not requested.";
955
 
if test x"$enable_pdfdocs" = "xyes"; then
 
935
if test x"$enable_pdfdocs" = xyes; then
956
936
        pdfroute=""
957
937
        AC_CHECK_PROG(DBCONTEXT, [dbcontext], [dbcontext], [])
958
938
        AC_CHECK_PROG(DBLATEX, [dblatex], [dblatex], [])
977
957
                exit 1  
978
958
        fi
979
959
fi
980
 
AM_CONDITIONAL(ENABLE_PDFDOCS, test x"$enable_pdfdocs" = "xyes")
 
960
AM_CONDITIONAL(ENABLE_PDFDOCS, test x"$enable_pdfdocs" = xyes)
981
961
AM_CONDITIONAL(ENABLE_PDF_VIA_DBCONTEXT, test x"$pdfroute" = x"dbcontext")
982
962
AM_CONDITIONAL(ENABLE_PDF_VIA_DBLATEX, test x"$pdfroute" = x"dblatex")
983
963
 
990
970
with_mono=no
991
971
mono_msg="disabled, still experimental"
992
972
 
993
 
AC_ARG_WITH(mono, [--{with,without}-mono     Compile the mono scripting engine])
 
973
AC_ARG_WITH(mono, AS_HELP_STRING([--with-mono], [Compile the mono scripting engine]))
994
974
case $with_mono in
995
975
no)     mono_msg="Disabled by request";;
996
976
*)
1001
981
    mono_msg=$with_mono
1002
982
    ;;
1003
983
esac
1004
 
AM_CONDITIONAL(WITH_MONO, test "x$with_mono" = "xyes")
 
984
AM_CONDITIONAL(WITH_MONO, test "x$with_mono" = xyes)
1005
985
AC_SUBST(MONO_CFLAGS)
1006
986
AC_SUBST(MONO_LIBS)
1007
987
])
1008
988
 
1009
989
dnl **************************************************
1010
 
dnl * Goffice component stuff
1011
 
dnl **************************************************
1012
 
GOFFICE_PLUGINS_DIR=`pkg-config --variable=GOffice_plugins_dir $libgoffice`
1013
 
AC_SUBST(GOFFICE_PLUGINS_DIR)
1014
 
 
1015
 
dnl **************************************************
1016
990
dnl * Config defaults (Must be after bonobo)
1017
991
dnl **************************************************
1018
992
dnl
1041
1015
Makefile
1042
1016
libspreadsheet.pc
1043
1017
icons/Makefile
 
1018
icons/16x16/Makefile
 
1019
icons/22x22/Makefile
 
1020
icons/24x24/Makefile
 
1021
icons/32x32/Makefile
 
1022
icons/48x48/Makefile
 
1023
icons/scalable/Makefile
1044
1024
src/Makefile
1045
1025
src/dialogs/Makefile
1046
1026
src/pixmaps/Makefile
1109
1089
test/Makefile
1110
1090
tools/Makefile
1111
1091
tools/win32/gnumeric.nsi
 
1092
component/Makefile
1112
1093
])
1113
1094
 
1114
1095
echo "