Updated Spanish translation
[anjuta.git] / configure.ac
blobd5f75bc3bcf9914cf97422b16d9ab24784f098b4
1 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ(2.65)
5 m4_define(anjuta_major_version,  3)
6 m4_define(anjuta_minor_version, 3)
7 m4_define(anjuta_micro_version, 5)
8 m4_define(anjuta_version, anjuta_major_version.anjuta_minor_version.anjuta_micro_version)
9 m4_define(bugzilla_version, anjuta_major_version.anjuta_minor_version.anjuta_micro_version)
11 AC_INIT([Anjuta],[anjuta_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=anjuta],[anjuta],[http://www.anjuta.org/])
13 AC_CONFIG_HEADERS([config.h])
14 AC_CONFIG_SRCDIR([src/main.c])
15 AC_CONFIG_MACRO_DIR([m4])
18 AC_DEFINE(ANJUTA_MAJOR_VERSION, anjuta_major_version, [Anjuta major version])
19 AC_SUBST(ANJUTA_MAJOR_VERSION, anjuta_major_version)
20 AC_DEFINE(ANJUTA_MINOR_VERSION, anjuta_minor_version, [Anjuta minor version])
21 AC_SUBST(ANJUTA_MINOR_VERSION, anjuta_minor_version)
22 AC_DEFINE(ANJUTA_MICRO_VERSION, anjuta_micro_version, [Anjuta micro version])
23 AC_SUBST(ANJUTA_MICRO_VERSION, anjuta_micro_version)
24 AC_DEFINE(ANJUTA_VERSION, anjuta_version, [Anjuta version])
25 AC_SUBST(ANJUTA_VERSION)
27 ANJUTA_VERSION=anjuta_version
28 AC_SUBST(ANJUTA_VERSION)
30 BUGZILLA_VERSION=bugzilla_version
31 AC_SUBST(BUGZILLA_VERSION)
33 dnl Anjuta core
34 GLIB_REQUIRED=2.28.0
35 GLIB_NEW_REQUIRED=2.29.2
36 GTK_REQUIRED=3.0.0
37 GTHREAD_REQUIRED=2.22.0
38 GDK_PIXBUF_REQUIRED=2.0.0
39 GDA4_REQUIRED=4.2.0
40 GDA5_REQUIRED=4.99.0
41 VTE_REQUIRED=0.27.6
42 LIBXML_REQUIRED=2.4.23
43 GDL_REQUIRED=2.91.4
44 LIBWNCK_REQUIRED=2.12
46 dnl GtkSourceView
47 GTKSOURCEVIEW_REQUIRED=2.91.8
49 dnl Devhelp
50 LIBDEVHELP_REQUIRED=3.0.0
52 dnl Glade
53 GLADEUI_REQUIRED=3.9.2
55 dnl Vala
56 VALA14_REQUIRED=0.13.3
58 dnl Introspection
59 GI_REQUIRED=0.9.5
61 dnl Various
62 LIBGRAPHVIZ_REQUIRED=1.0
64 dnl Subversion plugin
65 NEON_REQUIRED=0.28.2
66 SVN_MAJOR=1
67 SVN_MINOR=5
68 SVN_PATCH=0
69 SUBVERSION_REQUIRED=$SVN_MAJOR.$SVN_MINOR.$SVN_PATCH
71 AM_INIT_AUTOMAKE([1.10 dist-xz no-dist-gzip])
72 AM_MAINTAINER_MODE([enable])
74 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
76 dnl Check for C Compiler
77 AC_PROG_CC
78 AC_PROG_CPP
79 AC_PROG_LEX
80 if test "$LEX" != "flex"; then
81         AC_MSG_ERROR(flex is required)
83 AC_PROG_YACC
84 if test "$YACC" != "bison -y"; then
85         AC_MSG_ERROR(bison is required)
87 AC_LANG([C])
88 AC_LANG([C++])
89 AC_PROG_CXX
90 AM_PROG_CC_C_O
92 GNOME_COMPILE_WARNINGS([maximum])
93 AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
94 AM_CXXFLAGS="$AM_CXXFLAGS $WARN_CXXFLAGS"
96 dnl Enable debugging mode
97 AC_ARG_ENABLE(debug,
98   AS_HELP_STRING([--enable-debug],[Enable debug messages]),
99   [if test "x$enableval" = "xyes"; then
100       AM_CFLAGS="$AM_CFLAGS -DDEBUG"
101   fi]
102   AM_CXXFLAGS="$AM_CXXFLAGS -DDEBUG")
103 AC_SUBST(AM_CFLAGS)
104 AC_SUBST(AM_CXXFLAGS)
106 ANJUTA_LDFLAGS="-no-undefined"
107 ANJUTA_PLUGIN_LDFLAGS="-module -avoid-version -no-undefined"
108 AC_SUBST(ANJUTA_LDFLAGS)
109 AC_SUBST(ANJUTA_PLUGIN_LDFLAGS)
111 dnl GSettings
112 GLIB_GSETTINGS
114 dnl Disable deprecated APIs
115 dnl if test x$MAINT = x; then
116 dnl     DEPRECATED_FLAGS="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
117 dnl     AC_SUBST(DEPRECATED_FLAGS)
118 dnl fi
120 dnl Check for pkg-config
121 PKG_PROG_PKG_CONFIG([0.22])
123 dnl Enable versioned user preferences directory
124 AC_ARG_WITH(pref-suffix,
125   AS_HELP_STRING([--with-pref-suffix=VALUE],[Suffix to add to user preferences dir.]),
126   PREF_SUFFIX="$withval")
128 AC_SUBST(PREF_SUFFIX)
129 AC_DEFINE_UNQUOTED(PREF_SUFFIX,
130       "${PREF_SUFFIX}",
131           [Suffix to add to preferences directory])
133 # Initialize libtool
134 LT_PREREQ([2.2])
135 LT_INIT([disable-static])
137 dnl ***************************************************************************
138 dnl Check for GObject-Introspection
139 dnl ***************************************************************************
140 m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [GOBJECT_INTROSPECTION_CHECK([0.6.7])],
141 [AM_CONDITIONAL(HAVE_INTROSPECTION, false)])
143 dnl ***************************************************************************
144 dnl Set gjsdir
145 dnl ***************************************************************************
146 gjsdir=`pkg-config --variable=jsdir gjs-1.0`
147 AC_SUBST(gjsdir)
149 dnl Check base modules
151 PKG_CHECK_MODULES([ANJUTA],
152    [gthread-2.0 >= $GTHREAD_REQUIRED
153         glib-2.0 >= $GLIB_REQUIRED
154         gio-2.0 >= $GLIB_REQUIRED
155         gmodule-2.0 >= $GLIB_REQUIRED
156         gtk+-3.0 >= $GTK_REQUIRED
157         gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED])
159 PKG_CHECK_MODULES([XML],
160    [libxml-2.0 >= $LIBXML_REQUIRED])
162 PKG_CHECK_MODULES([GDL],
163    [gdl-3.0 >= $GDL_REQUIRED])
165 PKG_CHECK_MODULES([GDA],
166    [libgda-5.0 >= $GDA5_REQUIRED],,
167    [PKG_CHECK_MODULES([GDA],
168       [libgda-4.0 >= $GDA4_REQUIRED])])
169         
170 PKG_CHECK_MODULES([VTE],
171    [vte-2.90 >= $VTE_REQUIRED])
173 dnl Check for better module
175 PKG_CHECK_MODULES([GLIB_NEW],
176    [glib-2.0 >= $GLIB_NEW_REQUIRED],
177    HAVE_GLIB_2_29_2=1,
178    HAVE_GLIB_2_29_2=0)
179 AC_SUBST(HAVE_GLIB_2_29_2)
180 AC_DEFINE_UNQUOTED([GLIB_2_29_2], $HAVE_GLIB_2_29_2, [Define to 1 if glib is version 2.29.2 or greater])
182 dnl Check for autogen
183 dnl -----------------
184 AC_PATH_PROG(AUTOGEN_PATH, autogen,no)
185 if test x$AUTOGEN_PATH = xno; then
186    AC_MSG_WARN([Couldn't find autogen. You will be able to build anjuta without autogen \
187                 but several things won't work. You can get it from http://autogen.sourceforge.net/])
190 dnl Check for Devhelp
191 dnl -----------------
193 AC_ARG_ENABLE(plugin-devhelp,
194   AS_HELP_STRING([--disable-plugin-devhelp],[Disable devhelp plugin support in Anjuta.]),
195   [ if test "$enableval" = "no"; then
196        user_disabled_devhelp=1
197     fi ],
198   [ user_disabled_devhelp=0 ] )
200 AC_MSG_CHECKING(if devhelp plugin is disabled)
201 if test "$user_disabled_devhelp" = 1; then
202         AC_MSG_RESULT(yes)
203         devhelp_enabled="no"
204 else
205         AC_MSG_RESULT(no)
206         PKG_CHECK_MODULES(PLUGIN_DEVHELP,
207                                 [libdevhelp-3.0 >= $LIBDEVHELP_REQUIRED],
208                                 [
209                                     devhelp_enabled=yes
210                                 ], [
211                                     devhelp_enabled=no
212                                 ])
215 AM_CONDITIONAL(HAVE_PLUGIN_DEVHELP, [test x$devhelp_enabled = xyes])
217 dnl Check for Glade3
218 dnl ---------------------
220 AC_ARG_ENABLE(plugin-glade,
221   AS_HELP_STRING([--disable-plugin-glade],[Disable glade plugin support in Anjuta.]),
222   [ if test "$enableval" = "no"; then
223        user_disabled_glade=1
224     fi ],
225   [ user_disabled_glade=0 ] )
227 AC_MSG_CHECKING(if glade plugin is disabled)
228 if test "$user_disabled_glade" = 1; then
229         AC_MSG_RESULT(yes)
230         gladeui_found="no"
231 else
232         AC_MSG_RESULT(no)
233         gladeui_version=0
234         PKG_CHECK_MODULES(PLUGIN_GLADE, gladeui-2.0 >= $GLADEUI_REQUIRED,
235             [
236                 gladeui_found=yes
237             ], [
238                 gladeui_found=no
239             ])
242 AM_CONDITIONAL(HAVE_PLUGIN_GLADE, [test x$gladeui_found = xyes])
244 dnl Check for gtksourceview
245 dnl -------------------------------------------------------------
246 PKG_CHECK_MODULES(SOURCEVIEW,
247                 [gtksourceview-3.0 >= $GTKSOURCEVIEW_REQUIRED])
249 dnl Check for vala
250 dnl -------------------------------------------------------------
252 AC_ARG_ENABLE(vala,
253         AS_HELP_STRING([--disable-vala],[Disable vala support]),
254         [ if test "$enableval" = "no"; then
255                 user_disabled_vala=1
256           fi ],
257         [ user_disabled_vala=0 ])
259 AC_MSG_CHECKING(if vala support is disabled)
260 if test "$user_disabled_vala" = 1; then
261         AC_MSG_RESULT(yes)
262         enable_vala="no"
263 else
264         AC_MSG_RESULT(no)
265         enable_vala="yes"
266         PKG_CHECK_EXISTS([ libvala-0.16 ],
267                          [ valaver="-0.16" ],
268                          [ PKG_CHECK_EXISTS([ libvala-0.14 >= $VALA14_REQUIRED ],
269                                             [ valaver="-0.14" ],
270                                             [ valaver="" ])
271                          ])
272         if test "x$valaver" != "x"; then
273                 LIBVALA="libvala${valaver}"
274                 PKG_CHECK_MODULES([VALA], ${LIBVALA})
275         fi
276         AC_SUBST(LIBVALA)
279 if test x$enable_vala = xyes; then
280         AC_PATH_PROGS(VALAC, [valac${valaver} valac], valac)
281         AC_SUBST(VALAC)
284 AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes])
286 dnl Check for Python
287 dnl -------------------------------------------------------------
289 AM_PATH_PYTHON([],
290         [have_python="yes"],
291         [have_python="no"])
293 if test x$have_python = xyes; then
294         if test -x $PYTHON-config; then
295                 PYTHON_CFLAGS=`$PYTHON-config --cflags`
296                 PYTHON_LIBS=`$PYTHON-config --libs`
297                 AC_SUBST(PYTHON_CFLAGS)
298                 AC_SUBST(PYTHON_LIBS)
299         else
300                 have_python="no"
301         fi
304 AM_CONDITIONAL(HAVE_PYTHON, [test x$have_python = xyes])
306 PKG_CHECK_MODULES([PLUGIN_SYMBOL_DB],
307      [libgda-5.0 >= $GDA5_REQUIRED],,
308      [PKG_CHECK_MODULES([PLUGIN_SYMBOL_DB],
309          [libgda-4.0 >= $GDA4_REQUIRED])])
311 dnl Disable packagekit support
312 dnl -----------------------------------
313 AC_ARG_ENABLE(packagekit,
314   [AC_HELP_STRING([--disable-packagekit],[build without PackageKit support])],,
315   [enable_packagekit=yes])
316 if test "x$enable_packagekit" != "xno"; then
317   AC_DEFINE(ENABLE_PACKAGEKIT, 1, [define to enable PackageKit installer])
320 dnl Setup Anjuta Library flags
321 dnl --------------------------
322 LIBANJUTA_CFLAGS='$(ANJUTA_CFLAGS) $(GDL_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)"\"'
323 LIBANJUTA_LIBS='$(top_builddir)/libanjuta/libanjuta-3.la'
324 AC_SUBST(LIBANJUTA_CFLAGS)
325 AC_SUBST(LIBANJUTA_LIBS)
327 dnl Setup FooCanvas Library flags
328 dnl --------------------------
329 LIBFOOCANVAS_CFLAGS='-I$(top_srcdir)'
330 LIBFOOCANVAS_LIBS='$(top_builddir)/libfoocanvas/libanjuta-foocanvas.la'
331 AC_SUBST(LIBFOOCANVAS_CFLAGS)
332 AC_SUBST(LIBFOOCANVAS_LIBS)
334 dnl Checks for Xft/XRender for foocanvas
336 AC_CHECK_LIB(Xrender, XRenderFindFormat,
337         [AC_SUBST(RENDER_LIBS, "-lXrender -lXext")
338          AC_DEFINE(HAVE_RENDER, 1, [Define if libXrender is available.])],
339         [AC_SUBST(RENDER_LIBS, "")],
340         [-lXext])
342 dnl Setup Plugin directories
343 dnl ------------------------
344 anjuta_plugin_dir='$(libdir)/anjuta'
345 anjuta_data_dir='$(datadir)/anjuta'
346 anjuta_ui_dir='$(datadir)/anjuta/ui'
347 anjuta_glade_dir='$(datadir)/anjuta/glade'
348 anjuta_image_dir='$(datadir)/pixmaps/anjuta'
349 AC_SUBST(anjuta_plugin_dir)
350 AC_SUBST(anjuta_data_dir)
351 AC_SUBST(anjuta_ui_dir)
352 AC_SUBST(anjuta_glade_dir)
353 AC_SUBST(anjuta_image_dir)
355 dnl ***************************************************************************
356 dnl Check for marshal and enum generators
357 dnl ***************************************************************************
358 GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
359 AC_SUBST(GLIB_GENMARSHAL)
360 GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
361 AC_SUBST(GLIB_MKENUMS)
363 dnl Set up Glade 3 catlog information
364 dnl ---------------------
365 GLADE_PLUGINS_PATH="`$PKG_CONFIG --variable=moduledir gladeui-1.0`"
366 AC_SUBST(GLADE_PLUGINS_PATH)
367 GLADE_CATALOG_PATH="`$PKG_CONFIG --variable=catalogdir gladeui-1.0`"
368 AC_SUBST(GLADE_CATALOG_PATH)
370 dnl ***************************************************************************
371 dnl Internatinalization
372 dnl ***************************************************************************
373 IT_PROG_INTLTOOL([0.40.1])
375 AM_GNU_GETTEXT([external])
376 AM_GNU_GETTEXT_VERSION([0.17])
378 GETTEXT_PACKAGE=anjuta
379 AC_SUBST(GETTEXT_PACKAGE)
380 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
382 BISON_I18N
384 dnl ***************************************************************************
385 dnl Check for gtk-doc.
386 dnl ***************************************************************************
387 GTK_DOC_CHECK([1.4])
389 dnl ***************************************************************************
390 dnl User manual
391 dnl ***************************************************************************
392 GNOME_DOC_INIT([0.18])
394 dnl Define convenience macros
395 dnl -------------------------
396 dnl CHECK_HEADER_DEFINE(LABEL, HEADER [,ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ] ])
397 AC_DEFUN([CHECK_HEADER_DEFINE],
399         AC_MSG_CHECKING("if $1 is defined in $2")
400         AC_EGREP_CPP(yes,
401 [#include <$2>
402 #ifdef $1
403   yes
404 #endif
405 ], [
406         AC_MSG_RESULT(yes)
407         $3
408 ], [
409         AC_MSG_RESULT(no)
410         $4
411 ]) ])
413 dnl Checks for header files.
414 AC_CHECK_HEADERS(dirent.h fcntl.h fnmatch.h stat.h stdlib.h string.h stdint.h)
415 AC_CHECK_HEADERS(time.h types.h unistd.h)
416 AC_CHECK_HEADERS(sys/dir.h sys/stat.h sys/times.h sys/types.h)
418 dnl Checks for typedefs, structures, and compiler characteristics.
420 AC_CANONICAL_HOST
421 CYGWIN=no
422 MINGW32=no
423 case $host_os in
424   *cygwin* ) CYGWIN=yes;;
425   *mingw32* ) MINGW32=yes;;
426 esac
429 dnl Check for bind in libsocket (needed on Solaris)
430 AC_CHECK_LIB(socket, bind)
432 dnl Check for function forkpty and related headers
433 AC_SEARCH_LIBS(forkpty, util, , AC_DEFINE(EMULATE_FORKPTY, [], [Need  to implement our own forkpty()]))
434 AC_CHECK_HEADERS(libutil.h util.h pty.h)
436 dnl Checks for library functions.
437 AC_CHECK_FUNCS(fnmatch)
438 AC_CHECK_FUNCS(strstr)
439 AC_CHECK_FUNCS(stricmp)
440 AC_CHECK_FUNCS(strnicmp)
441 AC_CHECK_FUNCS(getline)
443 dnl for libegg/egg-recent-model.c
444 AC_CHECK_DECLS([lockf])
445 AC_CHECK_FUNCS([lockf])
447 AC_CHECK_FUNCS(fgetpos, have_fgetpos=yes)
449 dnl SEEK_SET should be in stdio.h, but may be in unistd.h on SunOS 4.1.x
450 if test "$have_fgetpos" != yes ; then
451     CHECK_HEADER_DEFINE(SEEK_SET, stdio.h,,
452         CHECK_HEADER_DEFINE(SEEK_SET, unistd.h,,
453             AC_DEFINE(SEEK_SET, 0, [Seek set 0])))
456 AC_CHECK_FUNCS(mkstemp, have_mkstemp=yes)
457 if test "$have_mkstemp" != yes ; then
458     AC_CHECK_FUNCS(chmod)
459     if test "$tmpdir_specified" = yes ; then
460         AC_MSG_RESULT(use of tmpnam overrides temporary directory selection)
461     fi
462 else
463     AC_MSG_CHECKING(directory to use for temporary files)
464     if test -z "$enable_tmpdir" -o "$enable_tmpdir" = no -o "$enable_tmpdir" = yes ;
465         then tmpdir=/tmp
466         else tmpdir="$enable_tmpdir"
467     fi
468     if test -d $tmpdir ; then
469         AC_MSG_RESULT($tmpdir)
470         AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [Directory for temporary files])
471     else
472         AC_MSG_WARN($tmpdir does not exist)
473     fi
476 dnl -----------------------------
477 dnl Checks for FreeBSD Build
478 dnl -----------------------------
479 AC_MSG_CHECKING(if building on FreeBSD)
481 if test `uname -s` = "FreeBSD" ; then
482         AC_MSG_RESULT(yes)
483         FREEBSD_BUILD=-DFREEBSD
484         AC_SUBST(FREEBSD_BUILD)
485         AC_PATH_PROG(GMAKE, gmake, no)
486         if test "x$GMAKE" = "xno"; then
487                 AC_MSG_ERROR(You need gmake installed to build Anjuta!)
488         fi
489 else
490         AC_MSG_RESULT(no)
491         GMAKE="make"
494 AC_SUBST(GMAKE)
496 dnl Checks for missing prototypes
497 dnl -----------------------------
498 AC_MSG_NOTICE([checking for missing prototypes...])
500 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))])
502 if test "$have_remove" = yes ; then
503     CHECK_PROTO(remove, stdio.h)
504 else
505     CHECK_PROTO(unlink, unistd.h)
507 CHECK_PROTO(malloc, stdlib.h)
508 CHECK_PROTO(getenv, stdlib.h)
509 CHECK_PROTO(stat,   sys/stat.h)
510 CHECK_PROTO(lstat,  sys/stat.h)
511 if test "$have_fgetpos" = yes ; then
512     CHECK_PROTO(fgetpos, stdio.h)
514 if test "$have_truncate" = yes ; then
515     CHECK_PROTO(truncate, unistd.h)
517 if test "$have_ftruncate" = yes ; then
518     CHECK_PROTO(ftruncate, unistd.h)
521 dnl  **********************************************************
522 dnl  check if we have svn libraries to build subversion plugin
523 dnl  (stolen from kdevelop ;-)
524 dnl  **********************************************************
526 AC_MSG_CHECKING(for Subversion svn-config)
527 AC_ARG_WITH(subversion-dir,
528                 AS_HELP_STRING([--with-subversion-dir=DIR],[Where Subversion is installed ]),
529                 [
530                                 SVNCONFIG="$withval/bin/svn-config"
531                 ])
533 if test -z "$SVNCONFIG"; then
534                 _SVNCONFIG="`svn-config --prefix 2> /dev/null`"
535                 if test -n "$_SVNCONFIG"; then
536                                 SVNCONFIG="$_SVNCONFIG/bin/svn-config"
537                 fi
540 AC_SUBST(SVNCONFIG)
541 if test -x "$SVNCONFIG"; then
542                 SVNLD="`$SVNCONFIG --ldflags 2> /dev/null`"
543                 SVN_LIB="`$SVNCONFIG --libs --cflags 2> /dev/null` -lsvn_client-1 -lsvn_subr-1"
544                 dnl ugly hack for subversion svn-config problems in 0.14.x, to be removed when svn-config is fixed
545                 SVN_INCLUDE="`$SVNCONFIG --includes 2> /dev/null` -I$_SVNCONFIG/include/subversion-1/"
546                 AC_MSG_RESULT(yes)
547 else
548                 AC_MSG_RESULT(not found)
550                 dnl just a fallback to debian's config so that it works for me :)
551                 AC_ARG_WITH(svn-include,
552                                                                 [[  --with-svn-include=DIR   Use the given path to the subversion headers.]],
553                                                                 [
554                                                                 if test "$withval" != "yes" -a "$withval" != ""; then
555                                                                                 SVN_INCLUDES=$withval
556                                                                 fi
557                                                                 ])
558                 if test -z "$SVN_INCLUDES"; then
559                         SVN_INCLUDES="/usr/local/include /usr/include"
560                 fi
561                 AC_MSG_CHECKING([for Subversion headers])
562                 SVN_INCLUDE=""
563                 for VALUE in $SVN_INCLUDES ; do
564                                 if test -f $VALUE/subversion-1/svn_types.h ; then
565                                                 SVN_INCLUDE=$VALUE/subversion-1
566                                                 break
567                                 fi
568                                 if test -f $VALUE/svn_types.h ; then
569                                                 SVN_INCLUDE=$VALUE
570                                                 break
571                                 fi
572                 done
573                 if test $SVN_INCLUDE ; then
574                                 AC_MSG_RESULT([found])
575                 else
576                                 AC_MSG_RESULT([not found])
577                 fi
578                 SVN_LIBS="/usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib"
579                 AC_ARG_WITH(svn-lib,
580                                                 [[  --with-svn-lib=DIR  Use the given path to the subversion libraries.]],
581                                                 [
582                                                         if test "$withval" != "yes" -a "$withval" != ""; then
583                                                                 SVN_LIBS=$withval
584                                                         fi
585                                                 ])
586                 AC_MSG_CHECKING([for Subversion libraries])
587                 SVN_LIB=""
588                 for VALUE in $SVN_LIBS ; do
589                                 if ls $VALUE/libsvn_client-1.* 1>/dev/null 2>&1; then
590                                                 SVN_LIB=$VALUE
591                                                 break
592                                 fi
593                 done
594                 if test $SVN_LIB ; then
595                                 AC_MSG_RESULT([found])
596                 else
597                                 AC_MSG_RESULT([not found])
598                 fi
601 dnl ******************************************************************
602 dnl Check for extra libs required by subversion.
603 dnl FIXME: This should actually be done by subversion and not by us.
604 dnl ******************************************************************
606 AC_ARG_ENABLE(plugin-subversion,
607   AS_HELP_STRING([--disable-plugin-subversion],[Disable subversion support in Anjuta.]),
608   [ if test "$enableval" = "no"; then
609         user_disabled_subversion=1
610     fi ],
611   [ user_disabled_subversion=0 ] )
613 AC_MSG_CHECKING(if subversion support is disabled)
614 if test "$user_disabled_subversion" = 1; then
615         AC_MSG_RESULT(yes)
616         SVN_INCLUDE=""
617         SVN_LIB=""
618 else
619         AC_MSG_RESULT(no)
622 if test -n "$SVN_INCLUDE" ; then
623         dnl ------------------------------------
624         dnl APR. Required by subversion (devel)
625         dnl ------------------------------------
626         have_atr=no
627         PKG_CHECK_MODULES(APR,                            \
628                 apr-1, have_apr=yes, have_apr=no)
629         if test x"$have_apr" = "xno"; then
630                 SVN_INCLUDE=""
631         fi
633         dnl -----------------------------------------
634         dnl APR util. Required by subversion (devel)
635         dnl------------------------------------------
636         have_atr_util=no
637         PKG_CHECK_MODULES(APR_UTILS,                            \
638                 apr-util-1, have_apr_util=yes, have_apr_util=no)
639         if test x"$have_apr_util" = "xno"; then
640                 SVN_INCLUDE=""
641         fi
643         dnl -----------------------------------------
644         dnl NEON. Required by subversion (devel)
645         dnl------------------------------------------
646         have_neon=no
647         PKG_CHECK_MODULES(NEON,                            \
648                 neon, have_neon=yes, have_neon=no)
649         if test x"$have_neon" = "xno"; then
650                 SVN_INCLUDE=""
651         fi
653         dnl Make sure our SVN version is high enough
654         dnl Eww, eww, eww, this is dirty
655         AC_MSG_CHECKING([for subversion >= $SUBVERSION_REQUIRED])
656         AC_LANG([C])
657         dnl Temporarily set CFLAGS so that include dirs are found
658         CFLAGS_TMP=$CFLAGS
659         CFLAGS="-I$SVN_INCLUDE $APR_CFLAGS"
660         AC_COMPILE_IFELSE(
661                 [AC_LANG_PROGRAM([[#include <svn_version.h>]],
662                         [[
663                                 #if (SVN_VER_MAJOR < $SVN_MAJOR) || (SVN_VER_MINOR < $SVN_MINOR) || (SVN_VER_PATCH < $SVN_PATCH)
664                                 #       error "Version too low"
665                                 #endif
666                         ]])], AC_MSG_RESULT(yes), have_svn_version=no)
667         if test x"$have_svn_version" = "xno"; then
668                 AC_MSG_RESULT(no)
669                 SVN_INCLUDE=""
670         fi
671         CFLAGS=$CFLAGS_TMP
674 dnl ------------------------------------------
675 dnl Finally prepare subversion build flags
676 dnl ------------------------------------------
678 if test -n "$SVN_INCLUDE" ; then
679         SVN_INCLUDE="-I$SVN_INCLUDE"
680         if test x != "x$SVN_LIB" ; then
681             SVN_LIB="-L$SVN_LIB $APR_LIBS $APR_UTILS_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
682         else
683             SVN_LIB="$APR_LIBS $APR_UTILS_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
684         fi
685         SVN_CFLAGS="$APR_CFLAGS $APR_UTILS_CFLAGS $NEON_CFLAGS"
688 AM_CONDITIONAL(BUILD_SVN, [test -n "$SVN_INCLUDE"])
689 AC_SUBST(SVN_INCLUDE)
690 AC_SUBST(SVN_LIB)
691 AC_SUBST(SVN_CFLAGS)
693 dnl ------------------------------------------
694 dnl Symbol-db shared memory checks
695 dnl ------------------------------------------
697 SYMBOL_DB_SHM="/dev/shm"
698 user_specified_shm=0
699 AC_MSG_CHECKING(for symbol-db shared memory)
700 AC_ARG_WITH(symbol-db-shm,
701                 AS_HELP_STRING([--with-symbol-db-shm=DIR],[Where shared memory is placed ]),
702                 [
703                                 user_specified_shm=1
704                                 SYMBOL_DB_SHM="$withval"
705                 ])
706 if test "$user_specified_shm" = 1; then
707         AC_MSG_RESULT(yes)
708 else
709         AC_MSG_RESULT(no)
712 AC_SUBST(SYMBOL_DB_SHM)
715 dnl Check for graphviz (class inheritance and profiler plugins)
716 AC_ARG_ENABLE(graphviz,
717         AS_HELP_STRING([--disable-graphviz],[Disable GraphViz support in Anjuta]),
718         [ if test "$enableval" = "no"; then
719                 user_disabled_graphviz=1
720           fi ],
721         [ user_disabled_graphviz=0 ])
723 AC_MSG_CHECKING(if GraphViz support is disabled)
724 if test "$user_disabled_graphviz" = 1; then
725         AC_MSG_RESULT(yes)
726         libgraphviz_found="no"
727 else
728         AC_MSG_RESULT(no)
729         PKG_CHECK_MODULES(GRAPHVIZ,
730                 [libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED],
731                 [libgraphviz_found="yes"],
732                 [libgraphviz_found="no"])
735 AM_CONDITIONAL(HAVE_GRAPHVIZ, [test x$libgraphviz_found = xyes])
737 dnl Test using autotest
738 dnl -----------------------------
739 AC_CONFIG_TESTDIR(plugins/am-project/tests)
740 AM_MISSING_PROG([AUTOM4TE], [autom4te])
742 AC_CONFIG_FILES([
743 Makefile
744 po/Makefile.in
745 libanjuta/Makefile
746 libanjuta/tests/Makefile
747 libanjuta/interfaces/Makefile
748 libanjuta/libanjuta-3.0.pc
749 libanjuta/anjuta-version.h
750 src/Makefile
751 pixmaps/Makefile
752 pixmaps/16x16/Makefile
753 pixmaps/22x22/Makefile
754 pixmaps/24x24/Makefile
755 pixmaps/32x32/Makefile
756 pixmaps/48x48/Makefile
757 pixmaps/scalable/Makefile
758 data/Makefile
759 data/welcome.txt
760 doc/anjuta.1
761 doc/anjuta-launcher.1
762 doc/Makefile
763 scripts/Makefile
764 launcher/Makefile
765 plugins/Makefile
766 plugins/class-gen/Makefile
767 plugins/class-gen/templates/Makefile
768 plugins/code-analyzer/Makefile
769 plugins/patch/Makefile
770 plugins/document-manager/Makefile
771 plugins/document-manager/images/Makefile
772 plugins/message-view/Makefile
773 plugins/gdb/Makefile
774 plugins/gdb/images/Makefile
775 plugins/debug-manager/Makefile
776 plugins/debug-manager/images/Makefile
777 plugins/devhelp/Makefile
778 plugins/devhelp/images/Makefile
779 plugins/glade/Makefile
780 plugins/glade/images/Makefile
781 plugins/js-debugger/Makefile
782 plugins/file-manager/Makefile
783 plugins/file-loader/Makefile
784 plugins/file-wizard/Makefile
785 plugins/build-basic-autotools/Makefile
786 plugins/project-manager/Makefile
787 plugins/symbol-db/benchmark/Makefile
788 plugins/symbol-db/benchmark/symbol-db/Makefile
789 plugins/symbol-db/benchmark/libgda/Makefile
790 plugins/symbol-db/benchmark/sqlite/Makefile
791 plugins/symbol-db/images/Makefile
792 plugins/symbol-db/Makefile
793 plugins/symbol-db/anjuta-tags/Makefile
794 plugins/project-wizard/Makefile
795 plugins/snippets-manager/Makefile
796 plugins/cvs-plugin/Makefile
797 plugins/subversion/Makefile
798 plugins/git/Makefile
799 plugins/git/images/Makefile
800 plugins/sourceview/Makefile
801 plugins/terminal/Makefile
802 plugins/tools/Makefile
803 plugins/tools/scripts/Makefile
804 plugins/language-manager/Makefile
805 plugins/project-import/Makefile
806 plugins/project-wizard/templates/Makefile
807 plugins/project-wizard/templates/mkfile/Makefile
808 plugins/project-wizard/templates/mkfile/src/Makefile
809 plugins/project-wizard/templates/mkfile/po/Makefile
810 plugins/project-wizard/templates/minimal/Makefile
811 plugins/project-wizard/templates/js_minimal/Makefile
812 plugins/project-wizard/templates/js_minimal/src/Makefile
813 plugins/project-wizard/templates/terminal/Makefile
814 plugins/project-wizard/templates/terminal/src/Makefile
815 plugins/project-wizard/templates/terminal/po/Makefile
816 plugins/project-wizard/templates/cpp/Makefile
817 plugins/project-wizard/templates/cpp/src/Makefile
818 plugins/project-wizard/templates/cpp/po/Makefile
819 plugins/project-wizard/templates/gtk/Makefile
820 plugins/project-wizard/templates/gtk/src/Makefile
821 plugins/project-wizard/templates/gtk/po/Makefile
822 plugins/project-wizard/templates/gtkapplication/Makefile
823 plugins/project-wizard/templates/gtkapplication/src/Makefile
824 plugins/project-wizard/templates/gtkapplication/po/Makefile
825 plugins/project-wizard/templates/anjuta-plugin/Makefile
826 plugins/project-wizard/templates/anjuta-plugin/src/Makefile
827 plugins/project-wizard/templates/anjuta-plugin/po/Makefile
828 plugins/project-wizard/templates/gtkmm/Makefile
829 plugins/project-wizard/templates/gtkmm/src/Makefile
830 plugins/project-wizard/templates/gtkmm/po/Makefile
831 plugins/project-wizard/templates/gcj/Makefile
832 plugins/project-wizard/templates/gcj/src/Makefile
833 plugins/project-wizard/templates/java/Makefile
834 plugins/project-wizard/templates/java/src/Makefile
835 plugins/project-wizard/templates/java/po/Makefile
836 plugins/project-wizard/templates/python/Makefile
837 plugins/project-wizard/templates/python/src/Makefile
838 plugins/project-wizard/templates/python/po/Makefile
839 plugins/project-wizard/templates/pygtk/Makefile
840 plugins/project-wizard/templates/pygtk/src/Makefile
841 plugins/project-wizard/templates/pygtk/po/Makefile
842 plugins/project-wizard/templates/vala-gtk/Makefile
843 plugins/project-wizard/templates/vala-gtk/src/Makefile
844 plugins/project-wizard/templates/wxwin/Makefile
845 plugins/project-wizard/templates/wxwin/src/Makefile
846 plugins/project-wizard/templates/wxwin/po/Makefile
847 plugins/project-wizard/templates/xlib/Makefile
848 plugins/project-wizard/templates/xlib/src/Makefile
849 plugins/project-wizard/templates/xlib/po/Makefile
850 plugins/project-wizard/templates/xlib-dock/Makefile
851 plugins/project-wizard/templates/xlib-dock/src/Makefile
852 plugins/project-wizard/templates/xlib-dock/po/Makefile
853 plugins/project-wizard/templates/sdl/Makefile
854 plugins/project-wizard/templates/sdl/src/Makefile
855 plugins/project-wizard/templates/sdl/po/Makefile
856 plugins/project-wizard/templates/licenses/Makefile
857 plugins/project-wizard/templates/library/Makefile
858 plugins/project-wizard/templates/library/src/Makefile
859 plugins/project-wizard/templates/library/po/Makefile
860 plugins/project-wizard/templates/directory/Makefile
861 plugins/project-wizard/templates/m4/Makefile
862 plugins/project-wizard/templates/gnome-shell-extension/Makefile
863 plugins/project-wizard/templates/gnome-shell-extension/src/Makefile
864 plugins/am-project/Makefile
865 plugins/am-project/tests/atlocal
866 plugins/am-project/tests/Makefile
867 plugins/mk-project/Makefile
868 plugins/dir-project/Makefile
869 plugins/language-support-cpp-java/Makefile
870 plugins/language-support-cpp-java/cxxparser/Makefile
871 plugins/run-program/Makefile
872 plugins/starter/Makefile
873 plugins/language-support-js/Makefile
874 plugins/language-support-vala/Makefile
875 plugins/language-support-python/Makefile
876 plugins/python-loader/Makefile
877 anjuta.desktop.in
878 manuals/Makefile
879 manuals/reference/Makefile
880 manuals/reference/libanjuta/Makefile
881 manuals/reference/libanjuta/version.xml
882 manuals/anjuta-manual/Makefile
883 manuals/anjuta-faqs/Makefile
884 manuals/anjuta-build-tutorial/Makefile
885 mime/Makefile
887 AC_OUTPUT
888 echo " "
889 echo "-------------------------------------------------------------------"
890 echo "Conditionally built plugins:"
891 echo "-------------------------------------------------------------------"
892 if [ test -n "$SVN_INCLUDE" ]; then
893         echo "Building subversion plugin: ............................YES"
894 else
895         echo "Building subversion plugin: ............................NO"
896                 echo "        Requires apr (>= 0.9.4); http://subversion.org"
897                 echo "        Requires apr-util (>= 0.9.4); http://subversion.org"
898                 echo "        Requires neon (>= 0.28.2); http://subversion.org"
899                 echo "        Requires subversion (>= 1.5); http://subversion.org"
902 if [ test x$gladeui_found = xyes ]; then
903        echo "Building glade plugin: .................................YES"
904 else
905        echo "Building glade plugin: .................................NO"
906        echo "        Requires glade-3 (>= $GLADEUI_REQUIRED)"
909 if [ test x$devhelp_enabled = xyes ]; then
910        echo "Building devhelp plugin: ...............................YES"
911 else
912        echo "Building devhelp plugin: ...............................NO"
913        echo "        Requires libdevhelp-3.0 (>= $LIBDEVHELP_REQUIRED)"
915 if [ test x$enable_vala = xyes ]; then
916         echo "Building Vala support: .................................YES"
917 else
918         echo "Building Vala support: .................................NO"
919         echo "        Requires libvala (>= $VALA_REQUIRED)"
921 if [ test x$libgraphviz_found = xyes ]; then
922         echo "Building class inheritance plugin: .....................YES"
923 else
924         echo "Building class inheritance plugin: .....................NO"
925         echo "        Requires graphviz (>= 2.6.0); http://graphviz.org"
927 echo "-------------------------------------------------------------------"
928 echo "AM_CFLAGS = $AM_CFLAGS"
929 echo "AM_CXXFLAGS = $AM_CXXFLAGS"