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