symbol-db: many fixes on GPtrArray usage thanks to newer glib. Scan async.
[anjuta.git] / configure.in
blob3774ad83d34460ebc6c3ac2ce00b890306a16d17
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,  5)
8 m4_define(anjuta_nano_version, 0)
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.7.8
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-1.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 Setup Anjuta Library flags
280 dnl --------------------------
281 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)"\"'
282 LIBANJUTA_LIBS='$(top_builddir)/libanjuta/libanjuta.la'
283 AC_SUBST(LIBANJUTA_CFLAGS)
284 AC_SUBST(LIBANJUTA_LIBS)
286 dnl Setup FooCanvas Library flags
287 dnl --------------------------
288 LIBFOOCANVAS_CFLAGS='-I$(top_srcdir)'
289 LIBFOOCANVAS_LIBS='$(top_builddir)/libfoocanvas/libanjuta-foocanvas.la'
290 AC_SUBST(LIBFOOCANVAS_CFLAGS)
291 AC_SUBST(LIBFOOCANVAS_LIBS)
293 dnl Checks for Xft/XRender for foocanvas
295 AC_CHECK_LIB(Xrender, XRenderFindFormat, 
296         [AC_SUBST(RENDER_LIBS, "-lXrender -lXext")
297          AC_DEFINE(HAVE_RENDER, 1, [Define if libXrender is available.])],
298         [AC_SUBST(RENDER_LIBS, "")],
299         [-lXext])
301 dnl Setup Plugin directories
302 dnl ------------------------
303 anjuta_plugin_dir='$(libdir)/anjuta'
304 anjuta_data_dir='$(datadir)/anjuta'
305 anjuta_ui_dir='$(datadir)/anjuta/ui'
306 anjuta_glade_dir='$(datadir)/anjuta/glade'
307 anjuta_image_dir='$(datadir)/pixmaps/anjuta'
308 AC_SUBST(anjuta_plugin_dir)
309 AC_SUBST(anjuta_data_dir)
310 AC_SUBST(anjuta_ui_dir)
311 AC_SUBST(anjuta_glade_dir)
312 AC_SUBST(anjuta_image_dir)
314 dnl ***************************************************************************
315 dnl Check for old vte version
316 dnl ***************************************************************************
317 PKG_CHECK_MODULES(VTE, vte >= $VTE_REQUIRED)
319 dnl ***************************************************************************
320 dnl Check for marshal and enum generators
321 dnl ***************************************************************************
322 GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
323 AC_SUBST(GLIB_GENMARSHAL)
324 GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
325 AC_SUBST(GLIB_MKENUMS)
327 dnl Set up Glade 3 catlog information
328 dnl ---------------------
329 GLADE_PLUGINS_PATH="`$PKG_CONFIG --variable=moduledir gladeui-1.0`"
330 AC_SUBST(GLADE_PLUGINS_PATH)
331 GLADE_CATALOG_PATH="`$PKG_CONFIG --variable=catalogdir gladeui-1.0`"
332 AC_SUBST(GLADE_CATALOG_PATH)
334 dnl ***************************************************************************
335 dnl Internatinalization
336 dnl ***************************************************************************
337 GETTEXT_PACKAGE=anjuta
338 AC_SUBST(GETTEXT_PACKAGE)
339 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
340 AM_GLIB_GNU_GETTEXT
341 IT_PROG_INTLTOOL([0.40.1])
343 dnl ***************************************************************************
344 dnl Check for gtk-doc.
345 dnl ***************************************************************************
346 GTK_DOC_CHECK([1.4])
348 dnl Define convenience macros
349 dnl -------------------------
350 dnl CHECK_HEADER_DEFINE(LABEL, HEADER [,ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ] ])
351 AC_DEFUN([CHECK_HEADER_DEFINE],
353         AC_MSG_CHECKING("if $1 is defined in $2")
354         AC_EGREP_CPP(yes,
355 [#include <$2>
356 #ifdef $1
357   yes
358 #endif
359 ], [
360         AC_MSG_RESULT(yes)
361         $3
362 ], [
363         AC_MSG_RESULT(no)
364         $4
365 ]) ])
367 dnl Checks for header files.
368 AC_CHECK_HEADERS(dirent.h fcntl.h fnmatch.h stat.h stdlib.h string.h stdint.h)
369 AC_CHECK_HEADERS(time.h types.h unistd.h)
370 AC_CHECK_HEADERS(sys/dir.h sys/stat.h sys/times.h sys/types.h)
372 dnl Checks for typedefs, structures, and compiler characteristics.
374 dnl Disable cygwin check until someone fixes that stupid autoconf warnings.
375 dnl AC_CYGWIN
376 dnl AC_MINGW
378 AC_C_CONST
379 AC_OBJEXT
380 AC_EXEEXT
382 AC_TYPE_SIZE_T
383 AC_TYPE_OFF_T
385 AC_MSG_CHECKING("for fpos_t")
386 AC_EGREP_HEADER(fpos_t, stdio.h, AC_MSG_RESULT(yes),
388     AC_MSG_RESULT(no)
389     AC_DEFINE(fpos_t, long, [fpos_t is type long])
392 AC_MSG_CHECKING("for clock_t")
393 AC_EGREP_HEADER(clock_t, time.h, AC_MSG_RESULT(yes),
395     AC_MSG_RESULT(no)
396     AC_DEFINE(clock_t, long, [clock_t is type long])
399 CHECK_HEADER_DEFINE(L_tmpnam, stdio.h,, AC_DEFINE(L_tmpnam, 20, [L_tmpname is 20]))
401 CHECK_HEADER_DEFINE(INT_MAX, limits.h,,
402     CHECK_HEADER_DEFINE(MAXINT, limits.h,
403         AC_DEFINE(INT_MAX, MAXINT, [Maximum int size]), AC_DEFINE(INT_MAX, 32767, [Maximum int size])))
405 AC_MSG_CHECKING(if struct stat contains st_ino)
406 AC_TRY_COMPILE([#include <sys/stat.h>], [
407     struct stat st;
408     stat(".", &st);
409     if (st.st_ino > 0)
410         exit(0);
411 ], have_st_ino=yes, have_st_ino=no)
412 AC_MSG_RESULT($have_st_ino)
413 if test yes = "$have_st_ino"; then
414     AC_DEFINE(HAVE_STAT_ST_INO,,[Have stat st_ino])
418 dnl Check for bind in libsocket (needed on Solaris)
419 AC_CHECK_LIB(socket, bind)
421 dnl Check for function forkpty and related headers
422 AC_SEARCH_LIBS(forkpty, util, , AC_DEFINE(EMULATE_FORKPTY, [], [Need  to implement our own forkpty()]))
423 AC_CHECK_HEADERS(libutil.h util.h pty.h)
425 dnl Checks for library functions.
426 AC_CHECK_FUNCS(fnmatch)
427 AC_CHECK_FUNCS(strstr)
428 AC_CHECK_FUNCS(stricmp)
429 AC_CHECK_FUNCS(strnicmp)
430 AC_CHECK_FUNCS(getline)
432 dnl for libegg/egg-recent-model.c
433 AC_CHECK_DECLS([lockf])
434 AC_CHECK_FUNCS([lockf])
436 AC_CHECK_FUNCS(fgetpos, have_fgetpos=yes)
438 dnl SEEK_SET should be in stdio.h, but may be in unistd.h on SunOS 4.1.x
439 if test "$have_fgetpos" != yes ; then
440     CHECK_HEADER_DEFINE(SEEK_SET, stdio.h,,
441         CHECK_HEADER_DEFINE(SEEK_SET, unistd.h,,
442             AC_DEFINE(SEEK_SET, 0, [Seek set 0])))
445 AC_CHECK_FUNCS(mkstemp, have_mkstemp=yes)
446 if test "$have_mkstemp" != yes ; then
447     AC_CHECK_FUNCS(chmod)
448     if test "$tmpdir_specified" = yes ; then
449         AC_MSG_RESULT(use of tmpnam overrides temporary directory selection)
450     fi
451 else
452     AC_MSG_CHECKING(directory to use for temporary files)
453     if test -z "$enable_tmpdir" -o "$enable_tmpdir" = no -o "$enable_tmpdir" = yes ;
454         then tmpdir=/tmp
455         else tmpdir="$enable_tmpdir"
456     fi
457     if test -d $tmpdir ; then
458         AC_MSG_RESULT($tmpdir)
459         AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [Directory for temporary files])
460     else
461         AC_MSG_WARN($tmpdir does not exist)
462     fi
465 AC_CHECK_FUNCS(strerror opendir)
466 AC_CHECK_FUNCS(clock times, break)
467 AC_CHECK_FUNCS(remove, have_remove=yes,
468     CHECK_HEADER_DEFINE(remove, unistd.h,, AC_DEFINE(remove, unlink, [Remove is unlink])))
470 AC_CHECK_FUNCS(truncate, have_truncate=yes)
471 dnl === Cannot nest AC_CHECK_FUNCS() calls
472 if test "$have_truncate" != yes  ; then
473     AC_CHECK_FUNCS(ftruncate, have_ftruncate=yes)
474     if test "$have_ftruncate" != yes ; then
475         AC_CHECK_FUNCS(chsize)
476     fi
479 AC_CHECK_FUNCS(setenv, have_setenv=yes)
480 dnl === Cannot nest AC_CHECK_FUNCS() calls
481 if test "$have_setenv" != yes ; then
482     AC_CHECK_FUNCS(putenv, have_putenv=yes)
483     if test "$have_putenv" = yes ; then
484         AC_EGREP_HEADER(putenv, stdlib.h, have_putenv_prototype=yes)
485         if test "$have_putenv_prototype" = yes ; then
486             AC_MSG_CHECKING("putenv prototype")
487             AC_EGREP_HEADER([[^A-Za-zo-9_]putenv[   ]*\(.*const.*\)[    ]*;],
488                 stdlib.h, AC_MSG_RESULT(correct),
489                 [
490                     AC_MSG_RESULT(no const)
491                     AC_DEFINE(NON_CONST_PUTENV_PROTOTYPE,,[putenv has non constant prototype])
492                 ])
493         fi
494     fi
497 dnl -----------------------------
498 dnl Checks for FreeBSD Build
499 dnl -----------------------------
500 AC_MSG_CHECKING(if building on FreeBSD)
502 if test `uname -s` = "FreeBSD" ; then
503         AC_MSG_RESULT(yes)
504         FREEBSD_BUILD=-DFREEBSD
505         AC_SUBST(FREEBSD_BUILD)
506         AC_PATH_PROG(GMAKE, gmake, no)
507         if test "x$GMAKE" = "xno"; then
508                 AC_ERROR(You need gmake installed to build Anjuta!)
509         fi
510 else
511         AC_MSG_RESULT(no)
512         GMAKE="make"
515 AC_SUBST(GMAKE)
517 dnl Checks for missing prototypes
518 dnl -----------------------------
519 AC_CHECKING("for missing prototypes")
521 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))])
523 if test "$have_remove" = yes ; then
524     CHECK_PROTO(remove, stdio.h)
525 else
526     CHECK_PROTO(unlink, unistd.h)
528 CHECK_PROTO(malloc, stdlib.h)
529 CHECK_PROTO(getenv, stdlib.h)
530 CHECK_PROTO(stat,   sys/stat.h)
531 CHECK_PROTO(lstat,  sys/stat.h)
532 if test "$have_fgetpos" = yes ; then
533     CHECK_PROTO(fgetpos, stdio.h)
535 if test "$have_truncate" = yes ; then
536     CHECK_PROTO(truncate, unistd.h)
538 if test "$have_ftruncate" = yes ; then
539     CHECK_PROTO(ftruncate, unistd.h)
542 dnl  **********************************************************
543 dnl  check if we have svn libraries to build subversion plugin
544 dnl  (stolen from kdevelop ;-)
545 dnl  **********************************************************
547 AC_MSG_CHECKING(for Subversion svn-config)
548 AC_ARG_WITH(subversion-dir,
549                 AC_HELP_STRING([--with-subversion-dir=DIR],[Where Subversion is installed ]),
550                 [
551                                 SVNCONFIG="$withval/bin/svn-config"
552                 ])
554 if test -z "$SVNCONFIG"; then
555                 _SVNCONFIG="`svn-config --prefix 2> /dev/null`"
556                 if test -n "$_SVNCONFIG"; then
557                                 SVNCONFIG="$_SVNCONFIG/bin/svn-config"
558                 fi
561 AC_SUBST(SVNCONFIG)
562 if test -x "$SVNCONFIG"; then
563                 SVNLD="`$SVNCONFIG --ldflags 2> /dev/null`"
564                 SVN_LIB="`$SVNCONFIG --libs --cflags 2> /dev/null` -lsvn_client-1 -lsvn_subr-1"
565                 dnl ugly hack for subversion svn-config problems in 0.14.x, to be removed when svn-config is fixed
566                 SVN_INCLUDE="`$SVNCONFIG --includes 2> /dev/null` -I$_SVNCONFIG/include/subversion-1/"
567                 AC_MSG_RESULT(yes)
568 else
569                 AC_MSG_RESULT(not found)
570                 
571                 dnl just a fallback to debian's config so that it works for me :)
572                 AC_ARG_WITH(svn-include,
573                                                                 [[  --with-svn-include=DIR   Use the given path to the subversion headers.]],
574                                                                 [
575                                                                 if test "$withval" != "yes" -a "$withval" != ""; then
576                                                                                 SVN_INCLUDES=$withval
577                                                                 fi
578                                                                 ])
579                 if test -z "$SVN_INCLUDES"; then
580                         SVN_INCLUDES="/usr/local/include /usr/include"
581                 fi
582                 AC_MSG_CHECKING([for Subversion headers])
583                 SVN_INCLUDE=""
584                 for VALUE in $SVN_INCLUDES ; do
585                                 if test -f $VALUE/subversion-1/svn_types.h ; then
586                                                 SVN_INCLUDE=$VALUE/subversion-1
587                                                 break
588                                 fi
589                                 if test -f $VALUE/svn_types.h ; then
590                                                 SVN_INCLUDE=$VALUE
591                                                 break
592                                 fi
593                 done
594                 if test $SVN_INCLUDE ; then
595                                 AC_MSG_RESULT([found])
596                 else
597                                 AC_MSG_RESULT([not found])
598                 fi
599                 SVN_LIBS="/usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib"
600                 AC_ARG_WITH(svn-lib,
601                                                 [[  --with-svn-lib=DIR  Use the given path to the subversion libraries.]],
602                                                 [
603                                                         if test "$withval" != "yes" -a "$withval" != ""; then
604                                                                 SVN_LIBS=$withval
605                                                         fi
606                                                 ])
607                 AC_MSG_CHECKING([for Subversion libraries])
608                 SVN_LIB=""
609                 for VALUE in $SVN_LIBS ; do
610                                 if ls $VALUE/libsvn_client-1.* 1>/dev/null 2>&1; then
611                                                 SVN_LIB=$VALUE
612                                                 break
613                                 fi
614                 done
615                 if test $SVN_LIB ; then
616                                 AC_MSG_RESULT([found])
617                 else
618                                 AC_MSG_RESULT([not found])
619                 fi
622 dnl ******************************************************************
623 dnl Check for extra libs required by subversion.
624 dnl FIXME: This should actually be done by subversion and not by us.
625 dnl ******************************************************************
627 AC_ARG_ENABLE(plugin-subversion,
628   AC_HELP_STRING([--disable-plugin-subversion],[Disable subversion support in Anjuta.]),
629   [ if test "$enableval" = "no"; then
630         user_disabled_subversion=1
631     fi ],
632   [ user_disabled_subversion=0 ] )
634 AC_MSG_CHECKING(if subversion support is disabled)
635 if test "$user_disabled_subversion" = 1; then
636         AC_MSG_RESULT(yes)
637         SVN_INCLUDE=""
638         SVN_LIB=""
639 else
640         AC_MSG_RESULT(no)
643 if test -n "$SVN_INCLUDE" ; then
644         dnl ------------------------------------
645         dnl APR. Required by subversion (devel)
646         dnl ------------------------------------
647         have_atr=no
648         PKG_CHECK_MODULES(APR,                            \
649                 apr-1, have_apr=yes, have_apr=no)
650         if test x"$have_apr" = "xno"; then
651                 SVN_INCLUDE=""
652         fi
653         
654         dnl -----------------------------------------
655         dnl APR util. Required by subversion (devel)
656         dnl------------------------------------------
657         have_atr_util=no
658         PKG_CHECK_MODULES(APR_UTILS,                            \
659                 apr-util-1, have_apr_util=yes, have_apr_util=no)
660         if test x"$have_apr_util" = "xno"; then
661                 SVN_INCLUDE=""
662         fi
663         
664         dnl -----------------------------------------
665         dnl NEON. Required by subversion (devel)
666         dnl------------------------------------------
667         have_neon=no
668         PKG_CHECK_MODULES(NEON,                            \
669                 neon, have_neon=yes, have_neon=no)
670         if test x"$have_neon" = "xno"; then
671                 SVN_INCLUDE=""
672         fi
674         dnl Make sure our SVN version is high enough
675         dnl Eww, eww, eww, this is dirty
676         AC_MSG_CHECKING([for subversion >= $SUBVERSION_REQUIRED])
677         AC_LANG(C)
678         dnl Temporarily set CFLAGS so that include dirs are found
679         CFLAGS_TMP=$CFLAGS
680         CFLAGS="-I$SVN_INCLUDE $APR_CFLAGS"
681         AC_COMPILE_IFELSE(
682                 [AC_LANG_PROGRAM([[#include <svn_version.h>]],
683                         [[
684                                 #if (SVN_VER_MAJOR < $SVN_MAJOR) || (SVN_VER_MINOR < $SVN_MINOR) || (SVN_VER_PATCH < $SVN_PATCH)
685                                 #       error "Version too low"
686                                 #endif
687                         ]])], AC_MSG_RESULT(yes), have_svn_version=no)
688         if test x"$have_svn_version" = "xno"; then
689                 AC_MSG_RESULT(no)
690                 SVN_INCLUDE=""
691         fi
692         CFLAGS=$CFLAGS_TMP
695 dnl ------------------------------------------
696 dnl Finally prepare subversion build flags
697 dnl ------------------------------------------
699 if test -n "$SVN_INCLUDE" ; then
700         SVN_INCLUDE="-I$SVN_INCLUDE"
701         if test x != "x$SVN_LIB" ; then
702             SVN_LIB="-L$SVN_LIB $APR_LIBS $APR_UTILS_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
703         else
704             SVN_LIB="$APR_LIBS $APR_UTILS_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
705         fi
706         SVN_CFLAGS="$APR_CFLAGS $APR_UTILS_CFLAGS $NEON_CFLAGS"
709 AM_CONDITIONAL(BUILD_SVN, [test -n "$SVN_INCLUDE"])
710 AC_SUBST(SVN_INCLUDE)
711 AC_SUBST(SVN_LIB)
712 AC_SUBST(SVN_CFLAGS)
714 dnl ------------------------------------------
715 dnl Symbol-db shared memory checks
716 dnl ------------------------------------------
718 SYMBOL_DB_SHM="/dev/shm"
719 user_specified_shm=0
720 AC_MSG_CHECKING(for symbol-db shared memory)
721 AC_ARG_WITH(symbol-db-shm,
722                 AC_HELP_STRING([--with-symbol-db-shm=DIR],[Where shared memory is placed ]),
723                 [
724                                 user_specified_shm=1
725                                 SYMBOL_DB_SHM="$withval"
726                 ])
727 if test "$user_specified_shm" = 1; then
728         AC_MSG_RESULT(yes)
729 else
730         AC_MSG_RESULT(no)
733 AC_SUBST(SYMBOL_DB_SHM)
736 dnl Check for graphviz (class inheritance and profiler plugins)
737 AC_ARG_ENABLE(graphviz,
738         AC_HELP_STRING([--disable-graphviz],[Disable GraphViz support in Anjuta]), 
739         [ if test "$enableval" = "no"; then
740                 user_disabled_graphviz=1
741           fi ],
742         [ user_disabled_graphviz=0 ])
744 AC_MSG_CHECKING(if GraphViz support is disabled)
745 if test "$user_disabled_graphviz" = 1; then
746         AC_MSG_RESULT(yes)
747         libgraphviz_found="no"
748 else
749         AC_MSG_RESULT(no)
750         PKG_CHECK_MODULES(GRAPHVIZ,
751                 [libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED], 
752                 [libgraphviz_found="yes"],
753                 [libgraphviz_found="no"])
756 AM_CONDITIONAL(HAVE_GRAPHVIZ, [test x$libgraphviz_found = xyes])
758 AC_OUTPUT([
759 Makefile
760 po/Makefile.in
761 libfoocanvas/Makefile
762 libanjuta/Makefile
763 libanjuta/libanjuta-1.0.pc
764 libanjuta/anjuta-version.h
765 libanjuta/interfaces/Makefile
766 src/Makefile
767 pixmaps/Makefile
768 pixmaps/16x16/Makefile
769 pixmaps/22x22/Makefile
770 pixmaps/24x24/Makefile
771 pixmaps/32x32/Makefile
772 pixmaps/48x48/Makefile
773 pixmaps/scalable/Makefile
774 data/Makefile
775 data/welcome.txt
776 doc/anjuta.1
777 doc/anjuta-launcher.1
778 doc/Makefile
779 scripts/Makefile
780 launcher/Makefile
781 plugins/Makefile
782 plugins/gtodo/Makefile
783 plugins/class-gen/Makefile
784 plugins/class-gen/templates/Makefile
785 plugins/class-inheritance/Makefile
786 plugins/patch/Makefile
787 plugins/document-manager/Makefile
788 plugins/document-manager/images/Makefile
789 plugins/search/Makefile
790 plugins/message-view/Makefile
791 plugins/gdb/Makefile
792 plugins/gdb/images/Makefile
793 plugins/debug-manager/Makefile
794 plugins/debug-manager/images/Makefile
795 plugins/devhelp/Makefile
796 plugins/glade/Makefile
797 plugins/js-debugger/Makefile
798 plugins/file-manager/Makefile
799 plugins/file-loader/Makefile
800 plugins/file-wizard/Makefile
801 plugins/terminal/Makefile
802 plugins/build-basic-autotools/Makefile
803 plugins/project-manager/Makefile
804 plugins/gbf-am/Makefile
805 plugins/gbf-am/gbf-am-parse
806 plugins/gbf-am/GBF/Makefile
807 plugins/gbf-mkfile/Makefile
808 plugins/gbf-mkfile/gbf-mkfile-parse
809 plugins/gbf-mkfile/GBF/Makefile
810 plugins/symbol-db/benchmark/Makefile
811 plugins/symbol-db/benchmark/symbol-db/Makefile
812 plugins/symbol-db/benchmark/libgda/Makefile
813 plugins/symbol-db/benchmark/sqlite/Makefile
814 plugins/symbol-db/images/Makefile
815 plugins/symbol-db/Makefile
816 plugins/symbol-db/anjuta-tags/Makefile
817 plugins/project-wizard/Makefile
818 plugins/macro/Makefile
819 plugins/cvs-plugin/Makefile
820 plugins/subversion/Makefile
821 plugins/git/Makefile
822 plugins/sourceview/Makefile
823 plugins/tools/Makefile
824 plugins/tools/scripts/Makefile
825 plugins/language-manager/Makefile
826 plugins/project-import/Makefile
827 plugins/project-wizard/templates/Makefile
828 plugins/project-wizard/templates/mkfile/Makefile
829 plugins/project-wizard/templates/mkfile/src/Makefile
830 plugins/project-wizard/templates/mkfile/po/Makefile
831 plugins/project-wizard/templates/minimal/Makefile
832 plugins/project-wizard/templates/js_minimal/Makefile
833 plugins/project-wizard/templates/js_minimal/src/Makefile
834 plugins/project-wizard/templates/terminal/Makefile
835 plugins/project-wizard/templates/terminal/src/Makefile
836 plugins/project-wizard/templates/terminal/po/Makefile
837 plugins/project-wizard/templates/cpp/Makefile
838 plugins/project-wizard/templates/cpp/src/Makefile
839 plugins/project-wizard/templates/cpp/po/Makefile
840 plugins/project-wizard/templates/gtk/Makefile
841 plugins/project-wizard/templates/gtk/src/Makefile
842 plugins/project-wizard/templates/gtk/po/Makefile
843 plugins/project-wizard/templates/anjuta-plugin/Makefile
844 plugins/project-wizard/templates/anjuta-plugin/src/Makefile
845 plugins/project-wizard/templates/anjuta-plugin/po/Makefile
846 plugins/project-wizard/templates/gtkmm/Makefile
847 plugins/project-wizard/templates/gtkmm/src/Makefile
848 plugins/project-wizard/templates/gtkmm/po/Makefile
849 plugins/project-wizard/templates/gcj/Makefile
850 plugins/project-wizard/templates/gcj/src/Makefile
851 plugins/project-wizard/templates/java/Makefile
852 plugins/project-wizard/templates/java/src/Makefile
853 plugins/project-wizard/templates/java/po/Makefile
854 plugins/project-wizard/templates/python/Makefile
855 plugins/project-wizard/templates/python/src/Makefile
856 plugins/project-wizard/templates/python/po/Makefile
857 plugins/project-wizard/templates/wxwin/Makefile
858 plugins/project-wizard/templates/wxwin/src/Makefile
859 plugins/project-wizard/templates/wxwin/po/Makefile
860 plugins/project-wizard/templates/xlib/Makefile
861 plugins/project-wizard/templates/xlib/src/Makefile
862 plugins/project-wizard/templates/xlib/po/Makefile
863 plugins/project-wizard/templates/xlib-dock/Makefile
864 plugins/project-wizard/templates/xlib-dock/src/Makefile
865 plugins/project-wizard/templates/xlib-dock/po/Makefile
866 plugins/project-wizard/templates/sdl/Makefile
867 plugins/project-wizard/templates/sdl/src/Makefile
868 plugins/project-wizard/templates/sdl/po/Makefile
869 plugins/project-wizard/templates/licenses/Makefile
870 plugins/project-wizard/templates/gnome-applet/Makefile
871 plugins/project-wizard/templates/gnome-applet/src/Makefile
872 plugins/project-wizard/templates/gnome-applet/po/Makefile
873 plugins/project-wizard/templates/library/Makefile
874 plugins/project-wizard/templates/library/src/Makefile
875 plugins/project-wizard/templates/library/po/Makefile
876 plugins/project-wizard/templates/directory/Makefile
877 plugins/project-wizard/templates/m4/Makefile
878 plugins/dir-project/Makefile
879 plugins/language-support-cpp-java/Makefile
880 plugins/language-support-cpp-java/cxxparser/Makefile
881 plugins/run-program/Makefile
882 plugins/starter/Makefile
883 plugins/language-support-js/Makefile
884 plugins/language-support-vala/Makefile
885 anjuta.desktop.in
886 manuals/Makefile
887 manuals/reference/Makefile
888 manuals/reference/libanjuta/Makefile
889 manuals/reference/libanjuta/version.xml
890 manuals/anjuta-manual/Makefile
891 manuals/anjuta-faqs/Makefile
892 manuals/anjuta-build-tutorial/Makefile
893 mime/Makefile
895 chmod +x ${ac_top_build_dir}plugins/gbf-am/gbf-am-parse
896 chmod +x ${ac_top_build_dir}plugins/gbf-mkfile/gbf-mkfile-parse
897 echo " "
898 echo "-------------------------------------------------------------------"
899 echo "Conditionally built plugins:"
900 echo "-------------------------------------------------------------------"
901 if [ test -n "$SVN_INCLUDE" ]; then
902         echo "Building subversion plugin: ............................YES"
903 else
904         echo "Building subversion plugin: ............................NO"
905                 echo "        Requires apr (>= 0.9.4); http://subversion.org"
906                 echo "        Requires apr-util (>= 0.9.4); http://subversion.org"
907                 echo "        Requires neon (>= 0.28.2); http://subversion.org"
908                 echo "        Requires subversion (>= 1.5); http://subversion.org"
911 if [ test x$gladeui_found = xyes ]; then
912        echo "Building glade plugin: .................................YES"
913 else
914        echo "Building glade plugin: .................................NO"
915        echo "        Requires glade-3 (>= $GLADEUI_REQUIRED)"
918 if [ test x$devhelp_enabled = xyes ]; then
919        echo "Building devhelp plugin: ...............................YES"
920 else
921        echo "Building devhelp plugin: ...............................NO"
922        echo "        Requires devhelp >= 0.22"
925 if [ test x$sourceview = xyes ]; then
926         echo "Building GtkSourceView based editor: ...................YES"
927 else
928         echo "Building GtkSourceView based editor: ...................NO"
930 if [ test x$enable_vala = xyes ]; then
931         echo "Building Vala support: .................................YES"
932 else
933         echo "Building Vala support: .................................NO"
934         echo "        Requires libvala (>= $VALA_REQUIRED)"
936 if [ test x$libgraphviz_found = xyes ]; then
937         echo "Building class inheritance plugin: .....................YES"
938 else
939         echo "Building class inheritance plugin: .....................NO"
940         echo "        Requires graphviz (>= 2.6.0); http://graphviz.org"
942 echo "-------------------------------------------------------------------"
943 echo "AM_CFLAGS = $AM_CFLAGS"
944 echo "AM_CXXFLAGS = $AM_CXXFLAGS"