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