snippet-manager: Basic export feature done.
[anjuta.git] / configure.in
blobddcad059edf99977842d7c3281fa07e61b3d59cd
1 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ(2.59)
5 m4_define(anjuta_major_version,  2)
6 m4_define(anjuta_minor_version, 31)
7 m4_define(anjuta_micro_version,  6)
8 m4_define(anjuta_nano_version, 1)
9 m4_define(anjuta_version, anjuta_major_version.anjuta_minor_version.anjuta_micro_version.anjuta_nano_version)
11 AC_INIT(anjuta, anjuta_version, http://bugzilla.gnome.org/enter_bug.cgi?product=anjuta)
12 AC_CONFIG_SRCDIR(src/main.c)
14 AC_DEFINE(ANJUTA_MAJOR_VERSION, anjuta_major_version, [Anjuta major version])
15 AC_SUBST(ANJUTA_MAJOR_VERSION, anjuta_major_version)
16 AC_DEFINE(ANJUTA_MINOR_VERSION, anjuta_minor_version, [Anjuta minor version])
17 AC_SUBST(ANJUTA_MINOR_VERSION, anjuta_minor_version)
18 AC_DEFINE(ANJUTA_MICRO_VERSION, anjuta_micro_version, [Anjuta micro version])
19 AC_SUBST(ANJUTA_MICRO_VERSION, anjuta_micro_version)
20 AC_DEFINE(ANJUTA_VERSION, anjuta_version, [Anjuta version])
21 AC_SUBST(ANJUTA_VERSION)
23 ANJUTA_VERSION=anjuta_version
24 AC_SUBST(ANJUTA_VERSION)
26 dnl Anjuta core
27 GTK_REQUIRED=2.20.0
28 GTHREAD_REQUIRED=2.22.0
29 GDK_PIXBUF_REQUIRED=2.0.0
30 GCONF_REQUIRED=2.12.0
31 GDA_REQUIRED=4.1.6
32 VTE_REQUIRED=0.13.1
33 LIBXML_REQUIRED=2.4.23
34 GDL_REQUIRED=2.27.1
35 LIBWNCK_REQUIRED=2.12
36 UNIQUE_REQUIRED=1.0.0
38 dnl GtkSourceView
39 GTKSOURCEVIEW_REQUIRED=2.9.7
41 dnl Devhelp
42 LIBDEVHELP_REQUIRED=0.22
44 dnl Glade
45 GLADEUI_REQUIRED=3.7.1
47 dnl Vala
48 VALA_REQUIRED=0.9.4
50 dnl Introspection
51 GI_REQUIRED=0.6.6
53 dnl Various
54 LIBGRAPHVIZ_REQUIRED=1.0
56 dnl Subversion plugin
57 NEON_REQUIRED=0.28.2
58 SVN_MAJOR=1
59 SVN_MINOR=5
60 SVN_PATCH=0
61 SUBVERSION_REQUIRED=$SVN_MAJOR.$SVN_MINOR.$SVN_PATCH
63 AM_INIT_AUTOMAKE([1.11 dist-bzip2 no-dist-gzip])
64 AM_SILENT_RULES([yes])
65 AC_CONFIG_HEADERS(config.h)
66 AC_DISABLE_STATIC
67 AM_MAINTAINER_MODE
68 GNOME_DOC_INIT
70 dnl Check for C Compiler
71 AC_PROG_CC
72 AC_PROG_CPP
73 AC_LANG_C
74 AC_PROG_CXX
75 AM_PROG_CC_C_O
77 GNOME_COMPILE_WARNINGS(maximum)
78 AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
79 AM_CXXFLAGS="$AM_CXXFLAGS $WARN_CXXFLAGS"
81 dnl Enable debugging mode
82 AC_ARG_ENABLE(debug,
83   AC_HELP_STRING([--enable-debug],[Enable debug messages]),
84   [if test "x$enableval" = "xyes"; then
85       AM_CFLAGS="$AM_CFLAGS -DDEBUG"
86   fi]
87   AM_CXXFLAGS="$AM_CXXFLAGS -DDEBUG")
88 AC_SUBST(AM_CFLAGS)
89 AC_SUBST(AM_CXXFLAGS)
91 ANJUTA_LDFLAGS="-no-undefined"
92 ANJUTA_PLUGIN_LDFLAGS="-module -avoid-version -no-undefined"
93 AC_SUBST(ANJUTA_LDFLAGS)
94 AC_SUBST(ANJUTA_PLUGIN_LDFLAGS)
96 dnl Disable deprecated APIs
97 dnl if test x$MAINT = x; then
98 dnl     DEPRECATED_FLAGS="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
99 dnl     AC_SUBST(DEPRECATED_FLAGS)
100 dnl fi
102 dnl Enable versioned user preferences directory
103 AC_ARG_WITH(pref-suffix,
104   AC_HELP_STRING([--with-pref-suffix=VALUE],[Suffix to add to user preferences dir.]),
105   PREF_SUFFIX="$withval")
107 AC_SUBST(PREF_SUFFIX)
108 AC_DEFINE_UNQUOTED(PREF_SUFFIX,
109       "${PREF_SUFFIX}",
110           [Suffix to add to preferences directory])
112 AM_DISABLE_STATIC
113 AM_PROG_LIBTOOL
115 AC_TYPE_SIGNAL
117 dnl ***************************************************************************
118 dnl Check for GConf stuff to handle schema installation
119 dnl ***************************************************************************
120 AC_PATH_PROG(GCONFTOOL, gconftool-2)
121 AM_GCONF_SOURCE_2
123 dnl ***************************************************************************
124 dnl Check for GObject-Introspection
125 dnl ***************************************************************************
126 m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [GOBJECT_INTROSPECTION_CHECK([0.6.7])], 
127 [AM_CONDITIONAL(HAVE_INTROSPECTION, false)])
129 dnl ***************************************************************************
130 dnl Set gjsdir
131 dnl ***************************************************************************
132 gjsdir=`pkg-config --variable=jsdir gjs-1.0`
133 AC_SUBST(gjsdir)
135 dnl ***************************************************************************
136 dnl Check for pkgconfig
137 dnl ***************************************************************************
138 AC_PATH_PROG(PKG_CONFIG, pkg-config,no)
139 if test x$PKG_CONFIG = xno; then
140   AC_MSG_ERROR(Please install the pkg-config package from http://www.freedesktop.org/software/pkgconfig/)
143 dnl Check base modules
145 PKG_CHECK_MODULES([ANJUTA], 
146    [gthread-2.0 >= $GTHREAD_REQUIRED 
147         unique-1.0 >= $UNIQUE_REQUIRED
148         dbus-glib-1 gtk+-2.0 >= $GTK_REQUIRED
149         gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED
150         gconf-2.0 >= $GCONF_REQUIRED
151         vte >= $VTE_REQUIRED
152         libxml-2.0 >= $LIBXML_REQUIRED
153         gdl-1.0 >= $GDL_REQUIRED
154         libgda-4.0 >= $GDA_REQUIRED
155         libxslt])
157 dnl Check for autogen
158 dnl -----------------
159 AC_PATH_PROG(AUTOGEN_PATH, autogen,no)
160 if test x$AUTOGEN_PATH = xno; then
161    AC_MSG_ERROR([Couldn't find autogen, please install the autogen package. You can get it from http://autogen.sourceforge.net/])
164 dnl Check for perl required by gbf-am/mkfile
165 dnl ----------------------------------------
166 # Automake backend requirements
167 # Also needed by Makefile backend
168 AC_PATH_PROG(PERL, perl)
169 if test -z "$PERL"; then
170    AC_MSG_ERROR([perl not found])
172 $PERL -e 'require 5.005;' || {
173    AC_MSG_ERROR([perl 5.005 or better is required])
176 # Check for perl Locale::gettext module
177 if test "x$PERL" != x; then
178         AC_MSG_CHECKING(for perl module Locale::gettext)
179         $PERL "-MLocale::gettext" -e exit > /dev/null 2>&1
180         if test $? -ne 0; then
181                 AC_MSG_ERROR([not found, you should installed perl-gettext package for your distribution]);
182         else
183         AC_MSG_RESULT(ok);
184         fi
187 dnl Check for Devhelp
188 dnl -----------------
190 AC_ARG_ENABLE(plugin-devhelp,
191   AC_HELP_STRING([--disable-plugin-devhelp],[Disable devhelp plugin support in Anjuta.]),
192   [ if test "$enableval" = "no"; then
193        user_disabled_devhelp=1
194     fi ],
195   [ user_disabled_devhelp=0 ] )
197 AC_MSG_CHECKING(if devhelp plugin is disabled)
198 if test "$user_disabled_devhelp" = 1; then
199         AC_MSG_RESULT(yes)
200         devhelp_enabled="no"
201 else
202         AC_MSG_RESULT(no)
203         PKG_CHECK_MODULES(PLUGIN_DEVHELP, 
204                                 [libdevhelp-2.0 >= $LIBDEVHELP_REQUIRED webkit-1.0],
205                                 [
206                                     devhelp_enabled=yes
207                                 ], [
208                                     devhelp_enabled=no
209                                 ])
212 AM_CONDITIONAL(HAVE_PLUGIN_DEVHELP, [test x$devhelp_enabled = xyes])
214 dnl Check for Glade3
215 dnl ---------------------
217 AC_ARG_ENABLE(plugin-glade,
218   AC_HELP_STRING([--disable-plugin-glade],[Disable glade plugin support in Anjuta.]),
219   [ if test "$enableval" = "no"; then
220        user_disabled_glade=1
221     fi ],
222   [ user_disabled_glade=0 ] )
224 AC_MSG_CHECKING(if glade plugin is disabled)
225 if test "$user_disabled_glade" = 1; then
226         AC_MSG_RESULT(yes)
227         gladeui_found="no"
228 else
229         AC_MSG_RESULT(no)
230         gladeui_version=0
231         PKG_CHECK_MODULES(PLUGIN_GLADE, gladeui-1.0 >= $GLADEUI_REQUIRED,
232             [
233                 gladeui_found=yes
234             ], [
235                 gladeui_found=no
236             ])
239 AM_CONDITIONAL(HAVE_PLUGIN_GLADE, [test x$gladeui_found = xyes])
241 dnl Check for gtksourceview
242 dnl -------------------------------------------------------------
244 AC_ARG_ENABLE(plugin-sourceview,
245         AC_HELP_STRING([--disable-plugin-sourceview],[Disable gtksourceview based editor in Anjuta]), 
246         [ if test "$enableval" = "no"; then
247                 user_disabled_sourceview=1
248           fi ],
249         [ user_disabled_sourceview=0 ])
251 AC_MSG_CHECKING(if sourceview plugin is disabled)
252 if test "$user_disabled_sourceview" = 1; then
253         AC_MSG_RESULT(yes)
254         sourceview="no"
255 else
256         AC_MSG_RESULT(no)
257         sourceview="yes"
258         PKG_CHECK_MODULES(PLUGIN_SOURCEVIEW,
259                 [gtksourceview-2.0 >= $GTKSOURCEVIEW_REQUIRED])
262 AM_CONDITIONAL(HAVE_PLUGIN_SOURCEVIEW, [test x$sourceview = xyes])
264 dnl Check for vala
265 dnl -------------------------------------------------------------
267 PKG_CHECK_MODULES(VALA,
268         [vala-1.0 >= $VALA_REQUIRED],
269         [enable_vala="yes"],
270         [enable_vala="no"])
272 if test x$enable_vala = xyes; then
273         AC_PATH_PROG(VALAC, valac, valac)
274         AC_SUBST(VALAC)
277 AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes])
279 dnl Check for Python
280 dnl -------------------------------------------------------------
282 AM_PATH_PYTHON([],
283         [have_python="yes"],
284         [have_python="no"])
286 if test x$have_python = xyes; then
287         if test -x $PYTHON-config; then
288                 PYTHON_CFLAGS=`$PYTHON-config --cflags`
289                 PYTHON_LIBS=`$PYTHON-config --libs`
290                 AC_SUBST(PYTHON_CFLAGS)
291                 AC_SUBST(PYTHON_LIBS)
292         else
293                 have_python="no"
294         fi
297 AM_CONDITIONAL(HAVE_PYTHON, [test x$have_python = xyes])
299 PKG_CHECK_MODULES(PLUGIN_SYMBOL_DB,
300                 [libgda-4.0 >= $GDA_REQUIRED])
302 dnl Setup Anjuta Library flags
303 dnl --------------------------
304 LIBANJUTA_CFLAGS='$(ANJUTA_CFLAGS) $(DEPRECATED_FLAGS) -I$(top_srcdir) -I$(top_builddir)/libanjuta -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)"\" -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"'
305 LIBANJUTA_LIBS='$(top_builddir)/libanjuta/libanjuta.la'
306 AC_SUBST(LIBANJUTA_CFLAGS)
307 AC_SUBST(LIBANJUTA_LIBS)
309 dnl Setup FooCanvas Library flags
310 dnl --------------------------
311 LIBFOOCANVAS_CFLAGS='-I$(top_srcdir)'
312 LIBFOOCANVAS_LIBS='$(top_builddir)/libfoocanvas/libanjuta-foocanvas.la'
313 AC_SUBST(LIBFOOCANVAS_CFLAGS)
314 AC_SUBST(LIBFOOCANVAS_LIBS)
316 dnl Checks for Xft/XRender for foocanvas
318 AC_CHECK_LIB(Xrender, XRenderFindFormat, 
319         [AC_SUBST(RENDER_LIBS, "-lXrender -lXext")
320          AC_DEFINE(HAVE_RENDER, 1, [Define if libXrender is available.])],
321         [AC_SUBST(RENDER_LIBS, "")],
322         [-lXext])
324 dnl Setup Plugin directories
325 dnl ------------------------
326 anjuta_plugin_dir='$(libdir)/anjuta'
327 anjuta_data_dir='$(datadir)/anjuta'
328 anjuta_ui_dir='$(datadir)/anjuta/ui'
329 anjuta_glade_dir='$(datadir)/anjuta/glade'
330 anjuta_image_dir='$(datadir)/pixmaps/anjuta'
331 AC_SUBST(anjuta_plugin_dir)
332 AC_SUBST(anjuta_data_dir)
333 AC_SUBST(anjuta_ui_dir)
334 AC_SUBST(anjuta_glade_dir)
335 AC_SUBST(anjuta_image_dir)
337 dnl ***************************************************************************
338 dnl Check for old vte version
339 dnl ***************************************************************************
340 PKG_CHECK_MODULES(VTE, vte >= $VTE_REQUIRED)
342 dnl ***************************************************************************
343 dnl Check for marshal and enum generators
344 dnl ***************************************************************************
345 GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
346 AC_SUBST(GLIB_GENMARSHAL)
347 GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
348 AC_SUBST(GLIB_MKENUMS)
350 dnl Set up Glade 3 catlog information
351 dnl ---------------------
352 GLADE_PLUGINS_PATH="`$PKG_CONFIG --variable=moduledir gladeui-1.0`"
353 AC_SUBST(GLADE_PLUGINS_PATH)
354 GLADE_CATALOG_PATH="`$PKG_CONFIG --variable=catalogdir gladeui-1.0`"
355 AC_SUBST(GLADE_CATALOG_PATH)
357 dnl ***************************************************************************
358 dnl Internatinalization
359 dnl ***************************************************************************
360 GETTEXT_PACKAGE=anjuta
361 AC_SUBST(GETTEXT_PACKAGE)
362 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
363 AM_GLIB_GNU_GETTEXT
364 IT_PROG_INTLTOOL([0.40.1])
366 dnl ***************************************************************************
367 dnl Check for gtk-doc.
368 dnl ***************************************************************************
369 GTK_DOC_CHECK([1.4])
371 dnl Define convenience macros
372 dnl -------------------------
373 dnl CHECK_HEADER_DEFINE(LABEL, HEADER [,ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ] ])
374 AC_DEFUN([CHECK_HEADER_DEFINE],
376         AC_MSG_CHECKING("if $1 is defined in $2")
377         AC_EGREP_CPP(yes,
378 [#include <$2>
379 #ifdef $1
380   yes
381 #endif
382 ], [
383         AC_MSG_RESULT(yes)
384         $3
385 ], [
386         AC_MSG_RESULT(no)
387         $4
388 ]) ])
390 dnl Checks for header files.
391 AC_CHECK_HEADERS(dirent.h fcntl.h fnmatch.h stat.h stdlib.h string.h stdint.h)
392 AC_CHECK_HEADERS(time.h types.h unistd.h)
393 AC_CHECK_HEADERS(sys/dir.h sys/stat.h sys/times.h sys/types.h)
395 dnl Checks for typedefs, structures, and compiler characteristics.
397 dnl Disable cygwin check until someone fixes that stupid autoconf warnings.
398 dnl AC_CYGWIN
399 dnl AC_MINGW
401 AC_C_CONST
402 AC_OBJEXT
403 AC_EXEEXT
405 AC_TYPE_SIZE_T
406 AC_TYPE_OFF_T
408 AC_MSG_CHECKING("for fpos_t")
409 AC_EGREP_HEADER(fpos_t, stdio.h, AC_MSG_RESULT(yes),
411     AC_MSG_RESULT(no)
412     AC_DEFINE(fpos_t, long, [fpos_t is type long])
415 AC_MSG_CHECKING("for clock_t")
416 AC_EGREP_HEADER(clock_t, time.h, AC_MSG_RESULT(yes),
418     AC_MSG_RESULT(no)
419     AC_DEFINE(clock_t, long, [clock_t is type long])
422 CHECK_HEADER_DEFINE(L_tmpnam, stdio.h,, AC_DEFINE(L_tmpnam, 20, [L_tmpname is 20]))
424 CHECK_HEADER_DEFINE(INT_MAX, limits.h,,
425     CHECK_HEADER_DEFINE(MAXINT, limits.h,
426         AC_DEFINE(INT_MAX, MAXINT, [Maximum int size]), AC_DEFINE(INT_MAX, 32767, [Maximum int size])))
428 AC_MSG_CHECKING(if struct stat contains st_ino)
429 AC_TRY_COMPILE([#include <sys/stat.h>], [
430     struct stat st;
431     stat(".", &st);
432     if (st.st_ino > 0)
433         exit(0);
434 ], have_st_ino=yes, have_st_ino=no)
435 AC_MSG_RESULT($have_st_ino)
436 if test yes = "$have_st_ino"; then
437     AC_DEFINE(HAVE_STAT_ST_INO,,[Have stat st_ino])
441 dnl Check for bind in libsocket (needed on Solaris)
442 AC_CHECK_LIB(socket, bind)
444 dnl Check for function forkpty and related headers
445 AC_SEARCH_LIBS(forkpty, util, , AC_DEFINE(EMULATE_FORKPTY, [], [Need  to implement our own forkpty()]))
446 AC_CHECK_HEADERS(libutil.h util.h pty.h)
448 dnl Checks for library functions.
449 AC_CHECK_FUNCS(fnmatch)
450 AC_CHECK_FUNCS(strstr)
451 AC_CHECK_FUNCS(stricmp)
452 AC_CHECK_FUNCS(strnicmp)
453 AC_CHECK_FUNCS(getline)
455 dnl for libegg/egg-recent-model.c
456 AC_CHECK_DECLS([lockf])
457 AC_CHECK_FUNCS([lockf])
459 AC_CHECK_FUNCS(fgetpos, have_fgetpos=yes)
461 dnl SEEK_SET should be in stdio.h, but may be in unistd.h on SunOS 4.1.x
462 if test "$have_fgetpos" != yes ; then
463     CHECK_HEADER_DEFINE(SEEK_SET, stdio.h,,
464         CHECK_HEADER_DEFINE(SEEK_SET, unistd.h,,
465             AC_DEFINE(SEEK_SET, 0, [Seek set 0])))
468 AC_CHECK_FUNCS(mkstemp, have_mkstemp=yes)
469 if test "$have_mkstemp" != yes ; then
470     AC_CHECK_FUNCS(chmod)
471     if test "$tmpdir_specified" = yes ; then
472         AC_MSG_RESULT(use of tmpnam overrides temporary directory selection)
473     fi
474 else
475     AC_MSG_CHECKING(directory to use for temporary files)
476     if test -z "$enable_tmpdir" -o "$enable_tmpdir" = no -o "$enable_tmpdir" = yes ;
477         then tmpdir=/tmp
478         else tmpdir="$enable_tmpdir"
479     fi
480     if test -d $tmpdir ; then
481         AC_MSG_RESULT($tmpdir)
482         AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [Directory for temporary files])
483     else
484         AC_MSG_WARN($tmpdir does not exist)
485     fi
488 AC_CHECK_FUNCS(strerror opendir)
489 AC_CHECK_FUNCS(clock times, break)
490 AC_CHECK_FUNCS(remove, have_remove=yes,
491     CHECK_HEADER_DEFINE(remove, unistd.h,, AC_DEFINE(remove, unlink, [Remove is unlink])))
493 AC_CHECK_FUNCS(truncate, have_truncate=yes)
494 dnl === Cannot nest AC_CHECK_FUNCS() calls
495 if test "$have_truncate" != yes  ; then
496     AC_CHECK_FUNCS(ftruncate, have_ftruncate=yes)
497     if test "$have_ftruncate" != yes ; then
498         AC_CHECK_FUNCS(chsize)
499     fi
502 AC_CHECK_FUNCS(setenv, have_setenv=yes)
503 dnl === Cannot nest AC_CHECK_FUNCS() calls
504 if test "$have_setenv" != yes ; then
505     AC_CHECK_FUNCS(putenv, have_putenv=yes)
506     if test "$have_putenv" = yes ; then
507         AC_EGREP_HEADER(putenv, stdlib.h, have_putenv_prototype=yes)
508         if test "$have_putenv_prototype" = yes ; then
509             AC_MSG_CHECKING("putenv prototype")
510             AC_EGREP_HEADER([[^A-Za-zo-9_]putenv[   ]*\(.*const.*\)[    ]*;],
511                 stdlib.h, AC_MSG_RESULT(correct),
512                 [
513                     AC_MSG_RESULT(no const)
514                     AC_DEFINE(NON_CONST_PUTENV_PROTOTYPE,,[putenv has non constant prototype])
515                 ])
516         fi
517     fi
520 dnl -----------------------------
521 dnl Checks for FreeBSD Build
522 dnl -----------------------------
523 AC_MSG_CHECKING(if building on FreeBSD)
525 if test `uname -s` = "FreeBSD" ; then
526         AC_MSG_RESULT(yes)
527         FREEBSD_BUILD=-DFREEBSD
528         AC_SUBST(FREEBSD_BUILD)
529         AC_PATH_PROG(GMAKE, gmake, no)
530         if test "x$GMAKE" = "xno"; then
531                 AC_ERROR(You need gmake installed to build Anjuta!)
532         fi
533 else
534         AC_MSG_RESULT(no)
535         GMAKE="make"
538 AC_SUBST(GMAKE)
540 dnl Checks for missing prototypes
541 dnl -----------------------------
542 AC_CHECKING("for missing prototypes")
544 AC_DEFUN([CHECK_PROTO], [AC_EGREP_HEADER([[^A-Za-z0-9_]$1([   ]+[A-Za-z0-9_]*)?\(], $2,, AC_DEFINE(patsubst([NEED_PROTO_NAME], [NAME], translit($1, [a-z], [A-Z])),,[Do not know]) AC_MSG_RESULT(adding prototype for $1))])
546 if test "$have_remove" = yes ; then
547     CHECK_PROTO(remove, stdio.h)
548 else
549     CHECK_PROTO(unlink, unistd.h)
551 CHECK_PROTO(malloc, stdlib.h)
552 CHECK_PROTO(getenv, stdlib.h)
553 CHECK_PROTO(stat,   sys/stat.h)
554 CHECK_PROTO(lstat,  sys/stat.h)
555 if test "$have_fgetpos" = yes ; then
556     CHECK_PROTO(fgetpos, stdio.h)
558 if test "$have_truncate" = yes ; then
559     CHECK_PROTO(truncate, unistd.h)
561 if test "$have_ftruncate" = yes ; then
562     CHECK_PROTO(ftruncate, unistd.h)
565 dnl  **********************************************************
566 dnl  check if we have svn libraries to build subversion plugin
567 dnl  (stolen from kdevelop ;-)
568 dnl  **********************************************************
570 AC_MSG_CHECKING(for Subversion svn-config)
571 AC_ARG_WITH(subversion-dir,
572                 AC_HELP_STRING([--with-subversion-dir=DIR],[Where Subversion is installed ]),
573                 [
574                                 SVNCONFIG="$withval/bin/svn-config"
575                 ])
577 if test -z "$SVNCONFIG"; then
578                 _SVNCONFIG="`svn-config --prefix 2> /dev/null`"
579                 if test -n "$_SVNCONFIG"; then
580                                 SVNCONFIG="$_SVNCONFIG/bin/svn-config"
581                 fi
584 AC_SUBST(SVNCONFIG)
585 if test -x "$SVNCONFIG"; then
586                 SVNLD="`$SVNCONFIG --ldflags 2> /dev/null`"
587                 SVN_LIB="`$SVNCONFIG --libs --cflags 2> /dev/null` -lsvn_client-1 -lsvn_subr-1"
588                 dnl ugly hack for subversion svn-config problems in 0.14.x, to be removed when svn-config is fixed
589                 SVN_INCLUDE="`$SVNCONFIG --includes 2> /dev/null` -I$_SVNCONFIG/include/subversion-1/"
590                 AC_MSG_RESULT(yes)
591 else
592                 AC_MSG_RESULT(not found)
593                 
594                 dnl just a fallback to debian's config so that it works for me :)
595                 AC_ARG_WITH(svn-include,
596                                                                 [[  --with-svn-include=DIR   Use the given path to the subversion headers.]],
597                                                                 [
598                                                                 if test "$withval" != "yes" -a "$withval" != ""; then
599                                                                                 SVN_INCLUDES=$withval
600                                                                 fi
601                                                                 ])
602                 if test -z "$SVN_INCLUDES"; then
603                         SVN_INCLUDES="/usr/local/include /usr/include"
604                 fi
605                 AC_MSG_CHECKING([for Subversion headers])
606                 SVN_INCLUDE=""
607                 for VALUE in $SVN_INCLUDES ; do
608                                 if test -f $VALUE/subversion-1/svn_types.h ; then
609                                                 SVN_INCLUDE=$VALUE/subversion-1
610                                                 break
611                                 fi
612                                 if test -f $VALUE/svn_types.h ; then
613                                                 SVN_INCLUDE=$VALUE
614                                                 break
615                                 fi
616                 done
617                 if test $SVN_INCLUDE ; then
618                                 AC_MSG_RESULT([found])
619                 else
620                                 AC_MSG_RESULT([not found])
621                 fi
622                 SVN_LIBS="/usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib"
623                 AC_ARG_WITH(svn-lib,
624                                                 [[  --with-svn-lib=DIR  Use the given path to the subversion libraries.]],
625                                                 [
626                                                         if test "$withval" != "yes" -a "$withval" != ""; then
627                                                                 SVN_LIBS=$withval
628                                                         fi
629                                                 ])
630                 AC_MSG_CHECKING([for Subversion libraries])
631                 SVN_LIB=""
632                 for VALUE in $SVN_LIBS ; do
633                                 if ls $VALUE/libsvn_client-1.* 1>/dev/null 2>&1; then
634                                                 SVN_LIB=$VALUE
635                                                 break
636                                 fi
637                 done
638                 if test $SVN_LIB ; then
639                                 AC_MSG_RESULT([found])
640                 else
641                                 AC_MSG_RESULT([not found])
642                 fi
645 dnl ******************************************************************
646 dnl Check for extra libs required by subversion.
647 dnl FIXME: This should actually be done by subversion and not by us.
648 dnl ******************************************************************
650 AC_ARG_ENABLE(plugin-subversion,
651   AC_HELP_STRING([--disable-plugin-subversion],[Disable subversion support in Anjuta.]),
652   [ if test "$enableval" = "no"; then
653         user_disabled_subversion=1
654     fi ],
655   [ user_disabled_subversion=0 ] )
657 AC_MSG_CHECKING(if subversion support is disabled)
658 if test "$user_disabled_subversion" = 1; then
659         AC_MSG_RESULT(yes)
660         SVN_INCLUDE=""
661         SVN_LIB=""
662 else
663         AC_MSG_RESULT(no)
666 if test -n "$SVN_INCLUDE" ; then
667         dnl ------------------------------------
668         dnl APR. Required by subversion (devel)
669         dnl ------------------------------------
670         have_atr=no
671         PKG_CHECK_MODULES(APR,                            \
672                 apr-1, have_apr=yes, have_apr=no)
673         if test x"$have_apr" = "xno"; then
674                 SVN_INCLUDE=""
675         fi
676         
677         dnl -----------------------------------------
678         dnl APR util. Required by subversion (devel)
679         dnl------------------------------------------
680         have_atr_util=no
681         PKG_CHECK_MODULES(APR_UTILS,                            \
682                 apr-util-1, have_apr_util=yes, have_apr_util=no)
683         if test x"$have_apr_util" = "xno"; then
684                 SVN_INCLUDE=""
685         fi
686         
687         dnl -----------------------------------------
688         dnl NEON. Required by subversion (devel)
689         dnl------------------------------------------
690         have_neon=no
691         PKG_CHECK_MODULES(NEON,                            \
692                 neon, have_neon=yes, have_neon=no)
693         if test x"$have_neon" = "xno"; then
694                 SVN_INCLUDE=""
695         fi
697         dnl Make sure our SVN version is high enough
698         dnl Eww, eww, eww, this is dirty
699         AC_MSG_CHECKING([for subversion >= $SUBVERSION_REQUIRED])
700         AC_LANG(C)
701         dnl Temporarily set CFLAGS so that include dirs are found
702         CFLAGS_TMP=$CFLAGS
703         CFLAGS="-I$SVN_INCLUDE $APR_CFLAGS"
704         AC_COMPILE_IFELSE(
705                 [AC_LANG_PROGRAM([[#include <svn_version.h>]],
706                         [[
707                                 #if (SVN_VER_MAJOR < $SVN_MAJOR) || (SVN_VER_MINOR < $SVN_MINOR) || (SVN_VER_PATCH < $SVN_PATCH)
708                                 #       error "Version too low"
709                                 #endif
710                         ]])], AC_MSG_RESULT(yes), have_svn_version=no)
711         if test x"$have_svn_version" = "xno"; then
712                 AC_MSG_RESULT(no)
713                 SVN_INCLUDE=""
714         fi
715         CFLAGS=$CFLAGS_TMP
718 dnl ------------------------------------------
719 dnl Finally prepare subversion build flags
720 dnl ------------------------------------------
722 if test -n "$SVN_INCLUDE" ; then
723         SVN_INCLUDE="-I$SVN_INCLUDE"
724         if test x != "x$SVN_LIB" ; then
725             SVN_LIB="-L$SVN_LIB $APR_LIBS $APR_UTILS_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
726         else
727             SVN_LIB="$APR_LIBS $APR_UTILS_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
728         fi
729         SVN_CFLAGS="$APR_CFLAGS $APR_UTILS_CFLAGS $NEON_CFLAGS"
732 AM_CONDITIONAL(BUILD_SVN, [test -n "$SVN_INCLUDE"])
733 AC_SUBST(SVN_INCLUDE)
734 AC_SUBST(SVN_LIB)
735 AC_SUBST(SVN_CFLAGS)
737 dnl ------------------------------------------
738 dnl Symbol-db shared memory checks
739 dnl ------------------------------------------
741 SYMBOL_DB_SHM="/dev/shm"
742 user_specified_shm=0
743 AC_MSG_CHECKING(for symbol-db shared memory)
744 AC_ARG_WITH(symbol-db-shm,
745                 AC_HELP_STRING([--with-symbol-db-shm=DIR],[Where shared memory is placed ]),
746                 [
747                                 user_specified_shm=1
748                                 SYMBOL_DB_SHM="$withval"
749                 ])
750 if test "$user_specified_shm" = 1; then
751         AC_MSG_RESULT(yes)
752 else
753         AC_MSG_RESULT(no)
756 AC_SUBST(SYMBOL_DB_SHM)
759 dnl Check for graphviz (class inheritance and profiler plugins)
760 AC_ARG_ENABLE(graphviz,
761         AC_HELP_STRING([--disable-graphviz],[Disable GraphViz support in Anjuta]), 
762         [ if test "$enableval" = "no"; then
763                 user_disabled_graphviz=1
764           fi ],
765         [ user_disabled_graphviz=0 ])
767 AC_MSG_CHECKING(if GraphViz support is disabled)
768 if test "$user_disabled_graphviz" = 1; then
769         AC_MSG_RESULT(yes)
770         libgraphviz_found="no"
771 else
772         AC_MSG_RESULT(no)
773         PKG_CHECK_MODULES(GRAPHVIZ,
774                 [libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED], 
775                 [libgraphviz_found="yes"],
776                 [libgraphviz_found="no"])
779 AM_CONDITIONAL(HAVE_GRAPHVIZ, [test x$libgraphviz_found = xyes])
781 AC_OUTPUT([
782 Makefile
783 po/Makefile.in
784 libfoocanvas/Makefile
785 libanjuta/Makefile
786 libanjuta/libanjuta-1.0.pc
787 libanjuta/anjuta-version.h
788 libanjuta/interfaces/Makefile
789 src/Makefile
790 pixmaps/Makefile
791 pixmaps/16x16/Makefile
792 pixmaps/22x22/Makefile
793 pixmaps/24x24/Makefile
794 pixmaps/32x32/Makefile
795 pixmaps/48x48/Makefile
796 pixmaps/scalable/Makefile
797 data/Makefile
798 data/welcome.txt
799 doc/anjuta.1
800 doc/anjuta-launcher.1
801 doc/Makefile
802 scripts/Makefile
803 launcher/Makefile
804 plugins/Makefile
805 plugins/gtodo/Makefile
806 plugins/class-gen/Makefile
807 plugins/class-gen/templates/Makefile
808 plugins/class-inheritance/Makefile
809 plugins/patch/Makefile
810 plugins/document-manager/Makefile
811 plugins/document-manager/images/Makefile
812 plugins/search/Makefile
813 plugins/message-view/Makefile
814 plugins/gdb/Makefile
815 plugins/gdb/images/Makefile
816 plugins/debug-manager/Makefile
817 plugins/debug-manager/images/Makefile
818 plugins/devhelp/Makefile
819 plugins/glade/Makefile
820 plugins/js-debugger/Makefile
821 plugins/file-manager/Makefile
822 plugins/file-loader/Makefile
823 plugins/file-wizard/Makefile
824 plugins/terminal/Makefile
825 plugins/build-basic-autotools/Makefile
826 plugins/project-manager/Makefile
827 plugins/gbf-am/Makefile
828 plugins/gbf-am/gbf-am-parse
829 plugins/gbf-am/GBF/Makefile
830 plugins/gbf-mkfile/Makefile
831 plugins/gbf-mkfile/gbf-mkfile-parse
832 plugins/gbf-mkfile/GBF/Makefile
833 plugins/symbol-db/benchmark/Makefile
834 plugins/symbol-db/benchmark/symbol-db/Makefile
835 plugins/symbol-db/benchmark/libgda/Makefile
836 plugins/symbol-db/benchmark/sqlite/Makefile
837 plugins/symbol-db/images/Makefile
838 plugins/symbol-db/Makefile
839 plugins/symbol-db/anjuta-tags/Makefile
840 plugins/project-wizard/Makefile
841 plugins/snippets-manager/Makefile
842 plugins/cvs-plugin/Makefile
843 plugins/subversion/Makefile
844 plugins/git/Makefile
845 plugins/sourceview/Makefile
846 plugins/tools/Makefile
847 plugins/tools/scripts/Makefile
848 plugins/language-manager/Makefile
849 plugins/project-import/Makefile
850 plugins/project-wizard/templates/Makefile
851 plugins/project-wizard/templates/mkfile/Makefile
852 plugins/project-wizard/templates/mkfile/src/Makefile
853 plugins/project-wizard/templates/mkfile/po/Makefile
854 plugins/project-wizard/templates/minimal/Makefile
855 plugins/project-wizard/templates/js_minimal/Makefile
856 plugins/project-wizard/templates/js_minimal/src/Makefile
857 plugins/project-wizard/templates/terminal/Makefile
858 plugins/project-wizard/templates/terminal/src/Makefile
859 plugins/project-wizard/templates/terminal/po/Makefile
860 plugins/project-wizard/templates/cpp/Makefile
861 plugins/project-wizard/templates/cpp/src/Makefile
862 plugins/project-wizard/templates/cpp/po/Makefile
863 plugins/project-wizard/templates/gtk/Makefile
864 plugins/project-wizard/templates/gtk/src/Makefile
865 plugins/project-wizard/templates/gtk/po/Makefile
866 plugins/project-wizard/templates/anjuta-plugin/Makefile
867 plugins/project-wizard/templates/anjuta-plugin/src/Makefile
868 plugins/project-wizard/templates/anjuta-plugin/po/Makefile
869 plugins/project-wizard/templates/gtkmm/Makefile
870 plugins/project-wizard/templates/gtkmm/src/Makefile
871 plugins/project-wizard/templates/gtkmm/po/Makefile
872 plugins/project-wizard/templates/gcj/Makefile
873 plugins/project-wizard/templates/gcj/src/Makefile
874 plugins/project-wizard/templates/java/Makefile
875 plugins/project-wizard/templates/java/src/Makefile
876 plugins/project-wizard/templates/java/po/Makefile
877 plugins/project-wizard/templates/python/Makefile
878 plugins/project-wizard/templates/python/src/Makefile
879 plugins/project-wizard/templates/python/po/Makefile
880 plugins/project-wizard/templates/pygtk/Makefile
881 plugins/project-wizard/templates/pygtk/src/Makefile
882 plugins/project-wizard/templates/pygtk/po/Makefile
883 plugins/project-wizard/templates/pygtk/data/Makefile
884 plugins/project-wizard/templates/wxwin/Makefile
885 plugins/project-wizard/templates/wxwin/src/Makefile
886 plugins/project-wizard/templates/wxwin/po/Makefile
887 plugins/project-wizard/templates/xlib/Makefile
888 plugins/project-wizard/templates/xlib/src/Makefile
889 plugins/project-wizard/templates/xlib/po/Makefile
890 plugins/project-wizard/templates/xlib-dock/Makefile
891 plugins/project-wizard/templates/xlib-dock/src/Makefile
892 plugins/project-wizard/templates/xlib-dock/po/Makefile
893 plugins/project-wizard/templates/sdl/Makefile
894 plugins/project-wizard/templates/sdl/src/Makefile
895 plugins/project-wizard/templates/sdl/po/Makefile
896 plugins/project-wizard/templates/licenses/Makefile
897 plugins/project-wizard/templates/library/Makefile
898 plugins/project-wizard/templates/library/src/Makefile
899 plugins/project-wizard/templates/library/po/Makefile
900 plugins/project-wizard/templates/directory/Makefile
901 plugins/project-wizard/templates/m4/Makefile
902 plugins/dir-project/Makefile
903 plugins/language-support-cpp-java/Makefile
904 plugins/language-support-cpp-java/cxxparser/Makefile
905 plugins/run-program/Makefile
906 plugins/starter/Makefile
907 plugins/language-support-js/Makefile
908 plugins/language-support-vala/Makefile
909 plugins/language-support-python/Makefile
910 plugins/python-loader/Makefile
911 anjuta.desktop.in
912 manuals/Makefile
913 manuals/reference/Makefile
914 manuals/reference/libanjuta/Makefile
915 manuals/reference/libanjuta/version.xml
916 manuals/anjuta-manual/Makefile
917 manuals/anjuta-faqs/Makefile
918 manuals/anjuta-build-tutorial/Makefile
919 mime/Makefile
921 chmod +x ${ac_top_build_dir}plugins/gbf-am/gbf-am-parse
922 chmod +x ${ac_top_build_dir}plugins/gbf-mkfile/gbf-mkfile-parse
923 echo " "
924 echo "-------------------------------------------------------------------"
925 echo "Conditionally built plugins:"
926 echo "-------------------------------------------------------------------"
927 if [ test -n "$SVN_INCLUDE" ]; then
928         echo "Building subversion plugin: ............................YES"
929 else
930         echo "Building subversion plugin: ............................NO"
931                 echo "        Requires apr (>= 0.9.4); http://subversion.org"
932                 echo "        Requires apr-util (>= 0.9.4); http://subversion.org"
933                 echo "        Requires neon (>= 0.28.2); http://subversion.org"
934                 echo "        Requires subversion (>= 1.5); http://subversion.org"
937 if [ test x$gladeui_found = xyes ]; then
938        echo "Building glade plugin: .................................YES"
939 else
940        echo "Building glade plugin: .................................NO"
941        echo "        Requires glade-3 (>= $GLADEUI_REQUIRED)"
944 if [ test x$devhelp_enabled = xyes ]; then
945        echo "Building devhelp plugin: ...............................YES"
946 else
947        echo "Building devhelp plugin: ...............................NO"
948        echo "        Requires libdevhelp-2.0 (>= $LIBDEVHELP_REQUIRED)"
951 if [ test x$sourceview = xyes ]; then
952         echo "Building GtkSourceView based editor: ...................YES"
953 else
954         echo "Building GtkSourceView based editor: ...................NO"
956 if [ test x$enable_vala = xyes ]; then
957         echo "Building Vala support: .................................YES"
958 else
959         echo "Building Vala support: .................................NO"
960         echo "        Requires libvala (>= $VALA_REQUIRED)"
962 if [ test x$libgraphviz_found = xyes ]; then
963         echo "Building class inheritance plugin: .....................YES"
964 else
965         echo "Building class inheritance plugin: .....................NO"
966         echo "        Requires graphviz (>= 2.6.0); http://graphviz.org"
968 echo "-------------------------------------------------------------------"
969 echo "AM_CFLAGS = $AM_CFLAGS"
970 echo "AM_CXXFLAGS = $AM_CXXFLAGS"