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