libanjuta: Fix some warnings and made AnjutaPluginDescription a boxed type
[anjuta.git] / configure.ac
blob4b5730db6227785418c13efbbb9cb0be6e868cc2
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, 5)
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.11.0
55 dnl Introspection
56 GI_REQUIRED=0.9.5
58 dnl Various
59 LIBGRAPHVIZ_REQUIRED=1.0
61 dnl Subversion plugin
62 NEON_REQUIRED=0.28.2
63 SVN_MAJOR=1
64 SVN_MINOR=5
65 SVN_PATCH=0
66 SUBVERSION_REQUIRED=$SVN_MAJOR.$SVN_MINOR.$SVN_PATCH
68 AM_INIT_AUTOMAKE([1.10 dist-xz no-dist-gzip])
69 AM_MAINTAINER_MODE([enable])
71 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
73 dnl Check for C Compiler
74 AC_PROG_CC
75 AC_PROG_CPP
76 AC_PROG_LEX
77 if test "$LEX" != "flex"; then
78         AC_MSG_ERROR(flex is required)
80 AC_PROG_YACC
81 if test "$YACC" != "bison -y"; then
82         AC_MSG_ERROR(bison is required)
84 AC_LANG([C])
85 AC_LANG([C++])
86 AC_PROG_CXX
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 better module
172 PKG_CHECK_MODULES([GLIB_NEW],
173    [glib-2.0 >= $GLIB_NEW_REQUIRED],
174    HAVE_GLIB_2_29_2=1,
175    HAVE_GLIB_2_29_2=0)
176 AC_SUBST(HAVE_GLIB_2_29_2)
177 AC_DEFINE_UNQUOTED([GLIB_2_29_2], $HAVE_GLIB_2_29_2, [Define to 1 if glib is version 2.29.2 or greater])
179 dnl Check for autogen
180 dnl -----------------
181 AC_PATH_PROG(AUTOGEN_PATH, autogen,no)
182 if test x$AUTOGEN_PATH = xno; then
183    AC_MSG_WARN([Couldn't find autogen. You will be able to build anjuta without autogen \
184                 but several things won't work. You can get it from http://autogen.sourceforge.net/])
187 dnl Check for Devhelp
188 dnl -----------------
190 AC_ARG_ENABLE(plugin-devhelp,
191   AS_HELP_STRING([--disable-plugin-devhelp],[Disable devhelp plugin support in Anjuta.]),
192   [ if test "$enableval" = "no"; then
193        user_disabled_devhelp=1
194     fi ],
195   [ user_disabled_devhelp=0 ] )
197 AC_MSG_CHECKING(if devhelp plugin is disabled)
198 if test "$user_disabled_devhelp" = 1; then
199         AC_MSG_RESULT(yes)
200         devhelp_enabled="no"
201 else
202         AC_MSG_RESULT(no)
203         PKG_CHECK_MODULES(PLUGIN_DEVHELP,
204                                 [libdevhelp-3.0 >= $LIBDEVHELP_REQUIRED],
205                                 [
206                                     devhelp_enabled=yes
207                                 ], [
208                                     devhelp_enabled=no
209                                 ])
212 AM_CONDITIONAL(HAVE_PLUGIN_DEVHELP, [test x$devhelp_enabled = xyes])
214 dnl Check for Glade3
215 dnl ---------------------
217 AC_ARG_ENABLE(plugin-glade,
218   AS_HELP_STRING([--disable-plugin-glade],[Disable glade plugin support in Anjuta.]),
219   [ if test "$enableval" = "no"; then
220        user_disabled_glade=1
221     fi ],
222   [ user_disabled_glade=0 ] )
224 AC_MSG_CHECKING(if glade plugin is disabled)
225 if test "$user_disabled_glade" = 1; then
226         AC_MSG_RESULT(yes)
227         gladeui_found="no"
228 else
229         AC_MSG_RESULT(no)
230         gladeui_version=0
231         PKG_CHECK_MODULES(PLUGIN_GLADE, gladeui-2.0 >= $GLADEUI_REQUIRED,
232             [
233                 gladeui_found=yes
234             ], [
235                 gladeui_found=no
236             ])
239 AM_CONDITIONAL(HAVE_PLUGIN_GLADE, [test x$gladeui_found = xyes])
241 dnl Check for gtksourceview
242 dnl -------------------------------------------------------------
243 PKG_CHECK_MODULES(SOURCEVIEW,
244                 [gtksourceview-3.0 >= $GTKSOURCEVIEW_REQUIRED])
246 dnl Check for vala
247 dnl -------------------------------------------------------------
249 AC_ARG_ENABLE(vala,
250         AS_HELP_STRING([--disable-vala],[Disable vala support]),
251         [ if test "$enableval" = "no"; then
252                 user_disabled_vala=1
253           fi ],
254         [ user_disabled_vala=0 ])
256 AC_MSG_CHECKING(if vala support is disabled)
257 if test "$user_disabled_vala" = 1; then
258         AC_MSG_RESULT(yes)
259         enable_vala="no"
260 else
261         AC_MSG_RESULT(no)
262         AC_MSG_CHECKING(if libvala is available)
263         PKG_CHECK_EXISTS([ libvala-0.18 ],
264                          [ valaver="-0.18" ],
265                          [ PKG_CHECK_EXISTS([ libvala-0.16 ],
266                                             [ valaver="-0.16" ],
267                                             [ valaver="" ])
268                          ])
269         if test "x$valaver" != "x"; then
270                 AC_MSG_RESULT(yes)
271                 enable_vala="yes"
272                 LIBVALA="libvala${valaver}"
273                 PKG_CHECK_MODULES([VALA], ${LIBVALA})
274         else
275                 AC_MSG_RESULT(no)
276                 enable_vala="no"
277                 VALA_REQUIRED=0.16.0
278         fi
279         AC_SUBST(LIBVALA)
282 if test x$enable_vala = xyes; then
283         AC_PATH_PROGS(VALAC, [valac${valaver} valac], valac)
284         AC_SUBST(VALAC)
287 AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes])
289 dnl Check for Python
290 dnl -------------------------------------------------------------
292 AM_PATH_PYTHON([],
293         [have_python="yes"],
294         [have_python="no"])
296 if test x$have_python = xyes; then
297         if test -x $PYTHON-config; then
298                 PYTHON_CFLAGS=`$PYTHON-config --cflags`
299                 PYTHON_LIBS=`$PYTHON-config --libs`
300                 AC_SUBST(PYTHON_CFLAGS)
301                 AC_SUBST(PYTHON_LIBS)
302         elif test -x $PYTHON$PYTHON_VERSION-config; then
303                 PYTHON_CFLAGS=`$PYTHON$PYTHON_VERSION-config --cflags`
304                 PYTHON_LIBS=`$PYTHON$PYTHON_VERSION-config --libs`
305                 AC_SUBST(PYTHON_CFLAGS)
306                 AC_SUBST(PYTHON_LIBS)           
307         else
308                 have_python="no"
309                 echo "$PYTHON-config or $PYTHON$PYTHON_VERSION-config not found - disabling python"
310         fi
313 AM_CONDITIONAL(HAVE_PYTHON, [test x$have_python = xyes])
315 PKG_CHECK_MODULES([PLUGIN_SYMBOL_DB],
316      [libgda-5.0 >= $GDA5_REQUIRED],,
317      [PKG_CHECK_MODULES([PLUGIN_SYMBOL_DB],
318          [libgda-4.0 >= $GDA4_REQUIRED])])
320 dnl Disable packagekit support
321 dnl -----------------------------------
322 AC_ARG_ENABLE(packagekit,
323   [AC_HELP_STRING([--disable-packagekit],[build without PackageKit support])],,
324   [enable_packagekit=yes])
325 if test "x$enable_packagekit" != "xno"; then
326   AC_DEFINE(ENABLE_PACKAGEKIT, 1, [define to enable PackageKit installer])
329 dnl Setup Anjuta Library flags
330 dnl --------------------------
331 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)"\"'
332 LIBANJUTA_LIBS='$(top_builddir)/libanjuta/libanjuta-3.la'
333 AC_SUBST(LIBANJUTA_CFLAGS)
334 AC_SUBST(LIBANJUTA_LIBS)
336 dnl Setup FooCanvas Library flags
337 dnl --------------------------
338 LIBFOOCANVAS_CFLAGS='-I$(top_srcdir)'
339 LIBFOOCANVAS_LIBS='$(top_builddir)/libfoocanvas/libanjuta-foocanvas.la'
340 AC_SUBST(LIBFOOCANVAS_CFLAGS)
341 AC_SUBST(LIBFOOCANVAS_LIBS)
343 dnl Checks for Xft/XRender for foocanvas
345 AC_CHECK_LIB(Xrender, XRenderFindFormat,
346         [AC_SUBST(RENDER_LIBS, "-lXrender -lXext")
347          AC_DEFINE(HAVE_RENDER, 1, [Define if libXrender is available.])],
348         [AC_SUBST(RENDER_LIBS, "")],
349         [-lXext])
351 dnl Setup Plugin directories
352 dnl ------------------------
353 anjuta_plugin_dir='$(libdir)/anjuta'
354 anjuta_data_dir='$(datadir)/anjuta'
355 anjuta_ui_dir='$(datadir)/anjuta/ui'
356 anjuta_glade_dir='$(datadir)/anjuta/glade'
357 anjuta_image_dir='$(datadir)/pixmaps/anjuta'
358 AC_SUBST(anjuta_plugin_dir)
359 AC_SUBST(anjuta_data_dir)
360 AC_SUBST(anjuta_ui_dir)
361 AC_SUBST(anjuta_glade_dir)
362 AC_SUBST(anjuta_image_dir)
364 dnl ***************************************************************************
365 dnl Check for marshal and enum generators
366 dnl ***************************************************************************
367 GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
368 AC_SUBST(GLIB_GENMARSHAL)
369 GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
370 AC_SUBST(GLIB_MKENUMS)
372 dnl Set up Glade 3 catlog information
373 dnl ---------------------
374 GLADE_PLUGINS_PATH="`$PKG_CONFIG --variable=moduledir gladeui-1.0`"
375 AC_SUBST(GLADE_PLUGINS_PATH)
376 GLADE_CATALOG_PATH="`$PKG_CONFIG --variable=catalogdir gladeui-1.0`"
377 AC_SUBST(GLADE_CATALOG_PATH)
379 dnl ***************************************************************************
380 dnl Internatinalization
381 dnl ***************************************************************************
382 IT_PROG_INTLTOOL([0.40.1])
384 AM_GNU_GETTEXT([external])
385 AM_GNU_GETTEXT_VERSION([0.17])
387 GETTEXT_PACKAGE=anjuta
388 AC_SUBST(GETTEXT_PACKAGE)
389 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
391 BISON_I18N
393 dnl ***************************************************************************
394 dnl Check for gtk-doc.
395 dnl ***************************************************************************
396 GTK_DOC_CHECK([1.4])
398 dnl ***************************************************************************
399 dnl User manual
400 dnl ***************************************************************************
401 GNOME_DOC_INIT([0.18])
403 dnl Define convenience macros
404 dnl -------------------------
405 dnl CHECK_HEADER_DEFINE(LABEL, HEADER [,ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ] ])
406 AC_DEFUN([CHECK_HEADER_DEFINE],
408         AC_MSG_CHECKING("if $1 is defined in $2")
409         AC_EGREP_CPP(yes,
410 [#include <$2>
411 #ifdef $1
412   yes
413 #endif
414 ], [
415         AC_MSG_RESULT(yes)
416         $3
417 ], [
418         AC_MSG_RESULT(no)
419         $4
420 ]) ])
422 dnl Checks for header files.
423 AC_CHECK_HEADERS(dirent.h fcntl.h fnmatch.h stat.h stdlib.h string.h stdint.h)
424 AC_CHECK_HEADERS(time.h types.h unistd.h)
425 AC_CHECK_HEADERS(sys/dir.h sys/stat.h sys/times.h sys/types.h)
427 dnl Checks for typedefs, structures, and compiler characteristics.
429 AC_CANONICAL_HOST
430 CYGWIN=no
431 MINGW32=no
432 case $host_os in
433   *cygwin* ) CYGWIN=yes;;
434   *mingw32* ) MINGW32=yes;;
435 esac
438 dnl Check for bind in libsocket (needed on Solaris)
439 AC_CHECK_LIB(socket, bind)
441 dnl Check for function forkpty and related headers
442 AC_SEARCH_LIBS(forkpty, util, , AC_DEFINE(EMULATE_FORKPTY, [], [Need  to implement our own forkpty()]))
443 AC_CHECK_HEADERS(libutil.h util.h pty.h)
445 dnl Checks for library functions.
446 AC_CHECK_FUNCS(fnmatch)
447 AC_CHECK_FUNCS(strstr)
448 AC_CHECK_FUNCS(stricmp)
449 AC_CHECK_FUNCS(strnicmp)
450 AC_CHECK_FUNCS(getline)
452 dnl for libegg/egg-recent-model.c
453 AC_CHECK_DECLS([lockf])
454 AC_CHECK_FUNCS([lockf])
456 AC_CHECK_FUNCS(fgetpos, have_fgetpos=yes)
458 dnl SEEK_SET should be in stdio.h, but may be in unistd.h on SunOS 4.1.x
459 if test "$have_fgetpos" != yes ; then
460     CHECK_HEADER_DEFINE(SEEK_SET, stdio.h,,
461         CHECK_HEADER_DEFINE(SEEK_SET, unistd.h,,
462             AC_DEFINE(SEEK_SET, 0, [Seek set 0])))
465 AC_CHECK_FUNCS(mkstemp, have_mkstemp=yes)
466 if test "$have_mkstemp" != yes ; then
467     AC_CHECK_FUNCS(chmod)
468     if test "$tmpdir_specified" = yes ; then
469         AC_MSG_RESULT(use of tmpnam overrides temporary directory selection)
470     fi
471 else
472     AC_MSG_CHECKING(directory to use for temporary files)
473     if test -z "$enable_tmpdir" -o "$enable_tmpdir" = no -o "$enable_tmpdir" = yes ;
474         then tmpdir=/tmp
475         else tmpdir="$enable_tmpdir"
476     fi
477     if test -d $tmpdir ; then
478         AC_MSG_RESULT($tmpdir)
479         AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [Directory for temporary files])
480     else
481         AC_MSG_WARN($tmpdir does not exist)
482     fi
485 dnl -----------------------------
486 dnl Checks for FreeBSD Build
487 dnl -----------------------------
488 AC_MSG_CHECKING(if building on FreeBSD)
490 if test `uname -s` = "FreeBSD" ; then
491         AC_MSG_RESULT(yes)
492         FREEBSD_BUILD=-DFREEBSD
493         AC_SUBST(FREEBSD_BUILD)
494         AC_PATH_PROG(GMAKE, gmake, no)
495         if test "x$GMAKE" = "xno"; then
496                 AC_MSG_ERROR(You need gmake installed to build Anjuta!)
497         fi
498 else
499         AC_MSG_RESULT(no)
500         GMAKE="make"
503 AC_SUBST(GMAKE)
505 dnl Checks for missing prototypes
506 dnl -----------------------------
507 AC_MSG_NOTICE([checking for missing prototypes...])
509 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))])
511 if test "$have_remove" = yes ; then
512     CHECK_PROTO(remove, stdio.h)
513 else
514     CHECK_PROTO(unlink, unistd.h)
516 CHECK_PROTO(malloc, stdlib.h)
517 CHECK_PROTO(getenv, stdlib.h)
518 CHECK_PROTO(stat,   sys/stat.h)
519 CHECK_PROTO(lstat,  sys/stat.h)
520 if test "$have_fgetpos" = yes ; then
521     CHECK_PROTO(fgetpos, stdio.h)
523 if test "$have_truncate" = yes ; then
524     CHECK_PROTO(truncate, unistd.h)
526 if test "$have_ftruncate" = yes ; then
527     CHECK_PROTO(ftruncate, unistd.h)
530 dnl  **********************************************************
531 dnl  check if we have svn libraries to build subversion plugin
532 dnl  (stolen from kdevelop ;-)
533 dnl  **********************************************************
535 AC_MSG_CHECKING(for Subversion svn-config)
536 AC_ARG_WITH(subversion-dir,
537                 AS_HELP_STRING([--with-subversion-dir=DIR],[Where Subversion is installed ]),
538                 [
539                                 SVNCONFIG="$withval/bin/svn-config"
540                 ])
542 if test -z "$SVNCONFIG"; then
543                 _SVNCONFIG="`svn-config --prefix 2> /dev/null`"
544                 if test -n "$_SVNCONFIG"; then
545                                 SVNCONFIG="$_SVNCONFIG/bin/svn-config"
546                 fi
549 AC_SUBST(SVNCONFIG)
550 if test -x "$SVNCONFIG"; then
551                 SVNLD="`$SVNCONFIG --ldflags 2> /dev/null`"
552                 SVN_LIB="`$SVNCONFIG --libs --cflags 2> /dev/null` -lsvn_client-1 -lsvn_subr-1"
553                 dnl ugly hack for subversion svn-config problems in 0.14.x, to be removed when svn-config is fixed
554                 SVN_INCLUDE="`$SVNCONFIG --includes 2> /dev/null` -I$_SVNCONFIG/include/subversion-1/"
555                 AC_MSG_RESULT(yes)
556 else
557                 AC_MSG_RESULT(not found)
559                 dnl just a fallback to debian's config so that it works for me :)
560                 AC_ARG_WITH(svn-include,
561                                                                 [[  --with-svn-include=DIR   Use the given path to the subversion headers.]],
562                                                                 [
563                                                                 if test "$withval" != "yes" -a "$withval" != ""; then
564                                                                                 SVN_INCLUDES=$withval
565                                                                 fi
566                                                                 ])
567                 if test -z "$SVN_INCLUDES"; then
568                         SVN_INCLUDES="/usr/local/include /usr/include"
569                 fi
570                 AC_MSG_CHECKING([for Subversion headers])
571                 SVN_INCLUDE=""
572                 for VALUE in $SVN_INCLUDES ; do
573                                 if test -f $VALUE/subversion-1/svn_types.h ; then
574                                                 SVN_INCLUDE=$VALUE/subversion-1
575                                                 break
576                                 fi
577                                 if test -f $VALUE/svn_types.h ; then
578                                                 SVN_INCLUDE=$VALUE
579                                                 break
580                                 fi
581                 done
582                 if test $SVN_INCLUDE ; then
583                                 AC_MSG_RESULT([found])
584                 else
585                                 AC_MSG_RESULT([not found])
586                 fi
587                 SVN_LIBS="/usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib"
588                 AC_ARG_WITH(svn-lib,
589                                                 [[  --with-svn-lib=DIR  Use the given path to the subversion libraries.]],
590                                                 [
591                                                         if test "$withval" != "yes" -a "$withval" != ""; then
592                                                                 SVN_LIBS=$withval
593                                                         fi
594                                                 ])
595                 AC_MSG_CHECKING([for Subversion libraries])
596                 SVN_LIB=""
597                 for VALUE in $SVN_LIBS ; do
598                                 if ls $VALUE/libsvn_client-1.* 1>/dev/null 2>&1; then
599                                                 SVN_LIB=$VALUE
600                                                 break
601                                 fi
602                 done
603                 if test $SVN_LIB ; then
604                                 AC_MSG_RESULT([found])
605                 else
606                                 AC_MSG_RESULT([not found])
607                 fi
610 dnl ******************************************************************
611 dnl Check for extra libs required by subversion.
612 dnl FIXME: This should actually be done by subversion and not by us.
613 dnl ******************************************************************
615 AC_ARG_ENABLE(plugin-subversion,
616   AS_HELP_STRING([--disable-plugin-subversion],[Disable subversion support in Anjuta.]),
617   [ if test "$enableval" = "no"; then
618         user_disabled_subversion=1
619     fi ],
620   [ user_disabled_subversion=0 ] )
622 AC_MSG_CHECKING(if subversion support is disabled)
623 if test "$user_disabled_subversion" = 1; then
624         AC_MSG_RESULT(yes)
625         SVN_INCLUDE=""
626         SVN_LIB=""
627 else
628         AC_MSG_RESULT(no)
631 if test -n "$SVN_INCLUDE" ; then
632         dnl ------------------------------------
633         dnl APR. Required by subversion (devel)
634         dnl ------------------------------------
635         have_atr=no
636         PKG_CHECK_MODULES(APR,                            \
637                 apr-1, have_apr=yes, have_apr=no)
638         if test x"$have_apr" = "xno"; then
639                 SVN_INCLUDE=""
640         fi
642         dnl -----------------------------------------
643         dnl APR util. Required by subversion (devel)
644         dnl------------------------------------------
645         have_atr_util=no
646         PKG_CHECK_MODULES(APR_UTILS,                            \
647                 apr-util-1, have_apr_util=yes, have_apr_util=no)
648         if test x"$have_apr_util" = "xno"; then
649                 SVN_INCLUDE=""
650         fi
652         dnl -----------------------------------------
653         dnl NEON. Required by subversion (devel)
654         dnl------------------------------------------
655         have_neon=no
656         PKG_CHECK_MODULES(NEON,                            \
657                 neon, have_neon=yes, have_neon=no)
658         if test x"$have_neon" = "xno"; then
659                 SVN_INCLUDE=""
660         fi
662         dnl Make sure our SVN version is high enough
663         dnl Eww, eww, eww, this is dirty
664         AC_MSG_CHECKING([for subversion >= $SUBVERSION_REQUIRED])
665         AC_LANG([C])
666         dnl Temporarily set CFLAGS so that include dirs are found
667         CFLAGS_TMP=$CFLAGS
668         CFLAGS="-I$SVN_INCLUDE $APR_CFLAGS"
669         AC_COMPILE_IFELSE(
670                 [AC_LANG_PROGRAM([[#include <svn_version.h>]],
671                         [[
672                                 #if (SVN_VER_MAJOR < $SVN_MAJOR) || (SVN_VER_MINOR < $SVN_MINOR) || (SVN_VER_PATCH < $SVN_PATCH)
673                                 #       error "Version too low"
674                                 #endif
675                         ]])], AC_MSG_RESULT(yes), have_svn_version=no)
676         if test x"$have_svn_version" = "xno"; then
677                 AC_MSG_RESULT(no)
678                 SVN_INCLUDE=""
679         fi
680         CFLAGS=$CFLAGS_TMP
683 dnl ------------------------------------------
684 dnl Finally prepare subversion build flags
685 dnl ------------------------------------------
687 if test -n "$SVN_INCLUDE" ; then
688         SVN_INCLUDE="-I$SVN_INCLUDE"
689         if test x != "x$SVN_LIB" ; then
690             SVN_LIB="-L$SVN_LIB $APR_LIBS $APR_UTILS_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
691         else
692             SVN_LIB="$APR_LIBS $APR_UTILS_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
693         fi
694         SVN_CFLAGS="$APR_CFLAGS $APR_UTILS_CFLAGS $NEON_CFLAGS"
697 AM_CONDITIONAL(BUILD_SVN, [test -n "$SVN_INCLUDE"])
698 AC_SUBST(SVN_INCLUDE)
699 AC_SUBST(SVN_LIB)
700 AC_SUBST(SVN_CFLAGS)
702 dnl ------------------------------------------
703 dnl Symbol-db shared memory checks
704 dnl ------------------------------------------
706 SYMBOL_DB_SHM="/dev/shm"
707 user_specified_shm=0
708 AC_MSG_CHECKING(for symbol-db shared memory)
709 AC_ARG_WITH(symbol-db-shm,
710                 AS_HELP_STRING([--with-symbol-db-shm=DIR],[Where shared memory is placed ]),
711                 [
712                                 user_specified_shm=1
713                                 SYMBOL_DB_SHM="$withval"
714                 ])
715 if test "$user_specified_shm" = 1; then
716         AC_MSG_RESULT(yes)
717 else
718         AC_MSG_RESULT(no)
721 AC_SUBST(SYMBOL_DB_SHM)
724 dnl Check for graphviz (class inheritance and profiler plugins)
725 AC_ARG_ENABLE(graphviz,
726         AS_HELP_STRING([--disable-graphviz],[Disable GraphViz support in Anjuta]),
727         [ if test "$enableval" = "no"; then
728                 user_disabled_graphviz=1
729           fi ],
730         [ user_disabled_graphviz=0 ])
732 AC_MSG_CHECKING(if GraphViz support is disabled)
733 if test "$user_disabled_graphviz" = 1; then
734         AC_MSG_RESULT(yes)
735         libgraphviz_found="no"
736 else
737         AC_MSG_RESULT(no)
738         PKG_CHECK_MODULES(GRAPHVIZ,
739                 [libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED],
740                 [libgraphviz_found="yes"],
741                 [libgraphviz_found="no"])
744 AM_CONDITIONAL(HAVE_GRAPHVIZ, [test x$libgraphviz_found = xyes])
746 dnl Test using autotest
747 dnl -----------------------------
748 AC_CONFIG_TESTDIR(plugins/am-project/tests)
749 AM_MISSING_PROG([AUTOM4TE], [autom4te])
751 AC_CONFIG_FILES([
752 Makefile
753 po/Makefile.in
754 libanjuta/Makefile
755 libanjuta/tests/Makefile
756 libanjuta/interfaces/Makefile
757 libanjuta/libanjuta-3.0.pc
758 libanjuta/anjuta-version.h
759 src/Makefile
760 pixmaps/Makefile
761 pixmaps/16x16/Makefile
762 pixmaps/22x22/Makefile
763 pixmaps/24x24/Makefile
764 pixmaps/32x32/Makefile
765 pixmaps/48x48/Makefile
766 pixmaps/scalable/Makefile
767 data/Makefile
768 data/welcome.txt
769 data/templates/Makefile
770 doc/anjuta.1
771 doc/anjuta-launcher.1
772 doc/Makefile
773 scripts/Makefile
774 launcher/Makefile
775 plugins/Makefile
776 plugins/class-gen/Makefile
777 plugins/class-gen/templates/Makefile
778 plugins/code-analyzer/Makefile
779 plugins/patch/Makefile
780 plugins/document-manager/Makefile
781 plugins/document-manager/images/Makefile
782 plugins/message-view/Makefile
783 plugins/gdb/Makefile
784 plugins/gdb/images/Makefile
785 plugins/debug-manager/Makefile
786 plugins/debug-manager/images/Makefile
787 plugins/devhelp/Makefile
788 plugins/devhelp/images/Makefile
789 plugins/glade/Makefile
790 plugins/glade/images/Makefile
791 plugins/js-debugger/Makefile
792 plugins/file-manager/Makefile
793 plugins/file-loader/Makefile
794 plugins/file-wizard/Makefile
795 plugins/build-basic-autotools/Makefile
796 plugins/project-manager/Makefile
797 plugins/symbol-db/benchmark/Makefile
798 plugins/symbol-db/benchmark/symbol-db/Makefile
799 plugins/symbol-db/benchmark/libgda/Makefile
800 plugins/symbol-db/benchmark/sqlite/Makefile
801 plugins/symbol-db/images/Makefile
802 plugins/symbol-db/Makefile
803 plugins/symbol-db/anjuta-tags/Makefile
804 plugins/project-wizard/Makefile
805 plugins/snippets-manager/Makefile
806 plugins/cvs-plugin/Makefile
807 plugins/subversion/Makefile
808 plugins/git/Makefile
809 plugins/git/images/Makefile
810 plugins/sourceview/Makefile
811 plugins/terminal/Makefile
812 plugins/tools/Makefile
813 plugins/tools/scripts/Makefile
814 plugins/language-manager/Makefile
815 plugins/project-import/Makefile
816 plugins/project-wizard/templates/Makefile
817 plugins/project-wizard/templates/mkfile/Makefile
818 plugins/project-wizard/templates/mkfile/src/Makefile
819 plugins/project-wizard/templates/mkfile/po/Makefile
820 plugins/project-wizard/templates/minimal/Makefile
821 plugins/project-wizard/templates/js_minimal/Makefile
822 plugins/project-wizard/templates/js_minimal/src/Makefile
823 plugins/project-wizard/templates/terminal/Makefile
824 plugins/project-wizard/templates/terminal/src/Makefile
825 plugins/project-wizard/templates/terminal/po/Makefile
826 plugins/project-wizard/templates/cpp/Makefile
827 plugins/project-wizard/templates/cpp/src/Makefile
828 plugins/project-wizard/templates/cpp/po/Makefile
829 plugins/project-wizard/templates/gtk/Makefile
830 plugins/project-wizard/templates/gtk/src/Makefile
831 plugins/project-wizard/templates/gtk/po/Makefile
832 plugins/project-wizard/templates/gtkapplication/Makefile
833 plugins/project-wizard/templates/gtkapplication/src/Makefile
834 plugins/project-wizard/templates/gtkapplication/po/Makefile
835 plugins/project-wizard/templates/anjuta-plugin/Makefile
836 plugins/project-wizard/templates/anjuta-plugin/src/Makefile
837 plugins/project-wizard/templates/anjuta-plugin/po/Makefile
838 plugins/project-wizard/templates/gtkmm/Makefile
839 plugins/project-wizard/templates/gtkmm/src/Makefile
840 plugins/project-wizard/templates/gtkmm/po/Makefile
841 plugins/project-wizard/templates/gcj/Makefile
842 plugins/project-wizard/templates/gcj/src/Makefile
843 plugins/project-wizard/templates/java/Makefile
844 plugins/project-wizard/templates/java/src/Makefile
845 plugins/project-wizard/templates/java/po/Makefile
846 plugins/project-wizard/templates/python/Makefile
847 plugins/project-wizard/templates/python/src/Makefile
848 plugins/project-wizard/templates/python/po/Makefile
849 plugins/project-wizard/templates/pygtk/Makefile
850 plugins/project-wizard/templates/pygtk/src/Makefile
851 plugins/project-wizard/templates/pygtk/po/Makefile
852 plugins/project-wizard/templates/vala-gtk/Makefile
853 plugins/project-wizard/templates/vala-gtk/src/Makefile
854 plugins/project-wizard/templates/wxwin/Makefile
855 plugins/project-wizard/templates/wxwin/src/Makefile
856 plugins/project-wizard/templates/wxwin/po/Makefile
857 plugins/project-wizard/templates/xlib/Makefile
858 plugins/project-wizard/templates/xlib/src/Makefile
859 plugins/project-wizard/templates/xlib/po/Makefile
860 plugins/project-wizard/templates/xlib-dock/Makefile
861 plugins/project-wizard/templates/xlib-dock/src/Makefile
862 plugins/project-wizard/templates/xlib-dock/po/Makefile
863 plugins/project-wizard/templates/sdl/Makefile
864 plugins/project-wizard/templates/sdl/src/Makefile
865 plugins/project-wizard/templates/sdl/po/Makefile
866 plugins/project-wizard/templates/licenses/Makefile
867 plugins/project-wizard/templates/library/Makefile
868 plugins/project-wizard/templates/library/src/Makefile
869 plugins/project-wizard/templates/library/po/Makefile
870 plugins/project-wizard/templates/directory/Makefile
871 plugins/project-wizard/templates/m4/Makefile
872 plugins/project-wizard/templates/gnome-shell-extension/Makefile
873 plugins/project-wizard/templates/gnome-shell-extension/src/Makefile
874 plugins/am-project/Makefile
875 plugins/am-project/tests/atlocal
876 plugins/am-project/tests/Makefile
877 plugins/mk-project/Makefile
878 plugins/dir-project/Makefile
879 plugins/language-support-cpp-java/Makefile
880 plugins/language-support-cpp-java/cxxparser/Makefile
881 plugins/run-program/Makefile
882 plugins/starter/Makefile
883 plugins/indentation-c-style/Makefile
884 plugins/indentation-python-style/Makefile
885 plugins/language-support-js/Makefile
886 plugins/language-support-vala/Makefile
887 plugins/language-support-python/Makefile
888 plugins/python-loader/Makefile
889 anjuta.desktop.in
890 manuals/Makefile
891 manuals/reference/Makefile
892 manuals/reference/libanjuta/Makefile
893 manuals/reference/libanjuta/version.xml
894 manuals/anjuta-manual/Makefile
895 manuals/anjuta-faqs/Makefile
896 manuals/anjuta-build-tutorial/Makefile
897 mime/Makefile
899 AC_OUTPUT
900 echo " "
901 echo "-------------------------------------------------------------------"
902 echo "Conditionally built plugins:"
903 echo "-------------------------------------------------------------------"
904 if [ test -n "$SVN_INCLUDE" ]; then
905         echo "Building subversion plugin: ............................YES"
906 else
907         echo "Building subversion plugin: ............................NO"
908                 echo "        Requires apr (>= 0.9.4); http://subversion.org"
909                 echo "        Requires apr-util (>= 0.9.4); http://subversion.org"
910                 echo "        Requires neon (>= 0.28.2); http://subversion.org"
911                 echo "        Requires subversion (>= 1.5); http://subversion.org"
914 if [ test x$gladeui_found = xyes ]; then
915        echo "Building glade plugin: .................................YES"
916 else
917        echo "Building glade plugin: .................................NO"
918        echo "        Requires glade-3 (>= $GLADEUI_REQUIRED)"
921 if [ test x$devhelp_enabled = xyes ]; then
922        echo "Building devhelp plugin: ...............................YES"
923 else
924        echo "Building devhelp plugin: ...............................NO"
925        echo "        Requires libdevhelp-3.0 (>= $LIBDEVHELP_REQUIRED)"
927 if [ test x$enable_vala = xyes ]; then
928         echo "Building Vala support: .................................YES"
929 else
930         echo "Building Vala support: .................................NO"
931         echo "        Requires libvala (>= $VALA_REQUIRED)"
933 if [ test x$libgraphviz_found = xyes ]; then
934         echo "Building class inheritance plugin: .....................YES"
935 else
936         echo "Building class inheritance plugin: .....................NO"
937         echo "        Requires graphviz (>= 2.6.0); http://graphviz.org"
939 if [ test x$have_python = xyes]; then
940         echo "Building python plugin loaeder: ........................YES"
941 else
942         echo "Building python plugin loaeder: ........................NO"
943         echo "        Requires python"
945 echo "-------------------------------------------------------------------"
946 echo "AM_CFLAGS = $AM_CFLAGS"
947 echo "AM_CXXFLAGS = $AM_CXXFLAGS"