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