1 AC_INIT(src/gnumeric.h)
3 AM_CONFIG_HEADER(config.h)
4 AM_INIT_AUTOMAKE(gnumeric,0.49)
6 AM_ACLOCAL_INCLUDE(macros)
17 ## this should come after `AC_PROG_CC'
18 GNOME_COMPILE_WARNINGS
26 if test $ac_cv_header_alloca_h = yes; then
27 GNUMERIC_HAVE_ALLOCA_H=1
29 GNUMERIC_HAVE_ALLOCA_H=0
31 AC_SUBST(GNUMERIC_HAVE_ALLOCA_H)
33 AC_SUBST(QTTHREADS_LIB)
35 AC_SUBST(READLINE_LIB)
38 AC_ARG_WITH(guile,[--with-guile Include Guile support],[GNOME_CHECK_GUILE])
44 dnl **************************************************
45 dnl * internationalization support
46 dnl **************************************************
49 dnl Check doc/translating.sgml for a description of how to translate
50 dnl and why we have so many translations.
52 ALL_LINGUAS="cs da de en_GB es es_DO es_GT es_HN es_MX es_PA es_PE es_SV et fi fr ga hu hr it ja ko nl no pt pt_BR ru pl sk zh_TW.Big5 sv uk zh_CN.GB2312"
54 # AM_GNOME_GETTEXT above substs $DATADIRNAME
55 # this is the directory where the *.{mo,gmo} files are installed
56 gnomelocaledir='${prefix}/${DATADIRNAME}/locale'
57 AC_SUBST(gnomelocaledir)
59 AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
63 dnl On Solaris finite() needs ieeefp.h
65 AC_CHECK_HEADERS(ieeefp.h)
67 dnl Check for some functions
68 AC_CHECK_FUNCS(random drand48)
70 dnl **************************************************
72 dnl **************************************************
73 GNOMEGNORBA_LIBS="$GNOMEGNORBA_LIBS"
74 AC_SUBST(GNOMEGNORBA_LIBS)
76 dnl ******************************
77 dnl gnome-xml checking
78 dnl ******************************
79 AC_MSG_CHECKING(for GnomeXML libraries >= 1.8.5)
80 if xml-config --libs print > /dev/null 2>&1; then
81 vers=`xml-config --version | sed -e "s/libxml //" | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
82 if test "$vers" -ge 1008005; then
85 AC_MSG_ERROR(You need at least GnomeXML 1.8.5 for this version of Gnumeric)
88 AC_MSG_ERROR(Did not find GnomeXML installed)
92 dnl **************************************************
94 dnl **************************************************
96 AC_CHECK_PROG(perl_val, perl, true, false)
98 AC_MSG_CHECKING(for perl ExtUtils::Embed module)
99 perl -e 'eval { require ExtUtils::Embed }; if ($@) { exit(1); } else { exit(0); }'
100 if test "x$?" = "x0"; then
103 dnl Use ExtUtils::Embed to figure out the other options.
104 PERL_CCCDLFLAGS=`perl -MConfig -e 'print $Config{cccdlflags},"\n";'`
105 PERL_LDDLFLAGS=`perl -MConfig -e 'print $Config{lddlflags},"\n";'`
106 PERL_CC=`perl -MConfig -e 'print $Config{cc},"\n";'`
107 PERL_LD=`perl -MConfig -e 'print $Config{ld},"\n";'`
108 PERL_CCOPTS=`perl -MExtUtils::Embed -e ccopts`
109 PERL_LDOPTS=`perl -MExtUtils::Embed -e ldopts`
110 AC_SUBST(PERL_CCCDLFLAGS)
111 AC_SUBST(PERL_LDDLFLAGS)
114 AC_SUBST(PERL_CCOPTS)
115 AC_SUBST(PERL_LDOPTS)
121 AM_CONDITIONAL(WITH_PERL, $perl_val)
123 dnl **************************************************
124 dnl * Check for Python
125 dnl **************************************************
126 AC_CHECK_PROG(python_val, python, true, false)
128 PY_PREFIX=`python -c 'import sys ; print sys.prefix'`
129 PY_EXEC_PREFIX=`python -c 'import sys ; print sys.exec_prefix'`
130 changequote(<<, >>)dnl
131 PY_VERSION=`python -c 'import sys ; print sys.version[0:3]'`
133 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h; then
134 PY_LIBS="python$PY_VERSION"
135 PY_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config"
136 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
137 PY_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PY_VERSION/config/Makefile"
138 PY_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE`
139 PY_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE`
140 PY_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PY_MAKEFILE`
141 PY_EXTRA_LIBS="$PY_LOCALMODLIBS $PY_BASEMODLIBS $PY_OTHER_LIBS"
145 AC_SUBST(PY_EXTRA_LIBS)
150 AM_CONDITIONAL(WITH_PYTHON, $python_val)
152 dnl ******************************
154 dnl ******************************
160 [--{with,without}-bonobo Compile with Bonobo support or without it],
161 if test x$withval = xno; then
166 gnumeric_executable=gnumeric
167 AC_SUBST(gnumeric_executable)
169 AC_MSG_CHECKING(for Bonobo >= 0.9)
170 if gnome-config --libs bonobo > /dev/null 2>&1; then
171 vers=`gnome-config --modversion bonobo`
174 bonobo-0.[[012345678]]) bonobo_ok=false ;;
183 AC_DEFINE(ENABLE_BONOBO)
187 gnumeric_executable=gnumeric-bonobo
189 AC_MSG_RESULT(not found)
192 AM_CONDITIONAL(BONOBO, $have_bonobo)
194 dnl ******************************
195 dnl Kludge for Libole2 virtual link.
196 dnl ******************************
197 AM_CONDITIONAL(LIBOLE2_PUBLIC_LIBRARY, false)
199 dnl ******************************
201 dnl ******************************
209 [--{with,without}-gb Compile with Gb support or without it],
210 if test x$withval = xno; then
216 AC_MSG_CHECKING(for Gb >= 0.0.8)
217 if gnome-config --libs gb > /dev/null 2>&1; then
218 vers=`gnome-config --modversion gb | awk 'BEGIN { FS = "."; } { print $1 * 10000 + $2 * 100 + $3; }'`
219 if test "$vers" -ge 000008; then
231 GB_LIBS=`gnome-config --libs gb`
232 GB_CFLAGS=`gnome-config --cflags gb`
237 AC_MSG_RESULT(not found)
240 AM_CONDITIONAL(WITH_GB, $have_gb)
244 dnl ******************************
245 dnl GnomePrint checking
246 dnl ******************************
247 AC_MSG_CHECKING(for GnomePrint libraries >= 0.13)
248 if gnome-config --libs print > /dev/null 2>&1; then
249 vers=`gnome-config --modversion print | sed -e "s/gnome-print-//" | \
250 awk 'BEGIN { FS = "."; } { print $1 * 1000 + $2;}'`
251 if test "$vers" -ge 14; then
254 AC_MSG_ERROR(You need at least GNOME print 0.14 for this version of Gnumeric)
257 AC_MSG_ERROR(Did not find GnomePrint installed)
260 dnl ******************************
261 dnl LibGlade checking
262 dnl ******************************
263 AC_MSG_CHECKING(for Glade libraries >= 0.11)
264 if gnome-config --libs libglade > /dev/null 2>&1; then
265 vers=`gnome-config --modversion libglade | awk 'BEGIN { FS = "."; } { print $1 * 1000 + $2;}'`
266 if test "$vers" -ge 11; then
269 AC_MSG_ERROR(You need at least libglade 0.11 for this version of Gnumeric)
272 AC_MSG_ERROR(Did not find libGlade installed)
275 dnl ******************************
277 dnl ******************************
278 AC_MSG_CHECKING(for GTK >= 1.2.2)
279 if gtk-config --version > /dev/null 2>&1; then
280 dnl We need the "%d" in order not to get e-notation on hpux.
281 vers=`gtk-config --version | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
282 if test "$vers" -ge 1002002; then
285 AC_MSG_ERROR(You need at least GTK+ 1.2.2 for this version of Gnumeric)
288 AC_MSG_ERROR(Did not find GTK+ installed)
291 EXTRA_GNOME_LIBS=`gnome-config --libs gnomeui print libglade $bonobo`
292 EXTRA_GNOME_CFLAGS=`gnome-config --cflags gnomeui print libglade $bonobo`
293 AC_SUBST(EXTRA_GNOME_LIBS)
294 AC_SUBST(EXTRA_GNOME_CFLAGS)
296 AM_CONDITIONAL(LIBOLE2_PUBLIC_LIBRARY, false)
306 src/functions/Makefile
310 wizards/graphics/Makefile
316 plugins/sample/Makefile
318 plugins/sylk/Makefile
319 plugins/excel/Makefile
320 plugins/excel/libole2/Makefile
322 plugins/lotus-123/Makefile
323 plugins/oleo/Makefile
324 plugins/python/Makefile
325 plugins/perl/Makefile
326 plugins/perl/ext/Makefile.PL
327 plugins/guile/Makefile
328 plugins/ff-csv/Makefile
329 plugins/text/Makefile
330 plugins/xbase/Makefile
331 plugins/html/Makefile
333 plugins/plan-perfect/Makefile
339 ],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
346 Source code location: ${srcdir}
349 GB Support: ${gb_msg}
350 Bonobo Support: ${bonobo_msg}
352 if $have_bonobo; then
354 The Bonobo version of gnumeric is not supported,
355 this code is changing extremely rapidly. For any given
356 release it may not compile or depend on unreleased packages.
358 Please do not file bonobo related bug reports.