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