Update files for release
[anjuta.git] / configure.ac
blob619f1269a76fa37af03e37fc7478d57a55ad5b8f
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,  13)
7 m4_define(anjuta_micro_version,  90)
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.34.0
35 GTK_REQUIRED=3.10.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 LIBXML_REQUIRED=2.4.23
41 GDL_REQUIRED=3.5.5
42 LIBWNCK_REQUIRED=2.12
44 dnl GtkSourceView
45 GTKSOURCEVIEW_REQUIRED=3.0.0
47 dnl Terminal
48 VTE_REQUIRED=0.27.6
50 dnl Devhelp
51 LIBDEVHELP_REQUIRED=3.7.4
53 dnl Glade
54 GLADEUI_REQUIRED=3.12.0
56 dnl Introspection
57 GI_REQUIRED=0.9.5
59 dnl Subversion plugin
60 NEON_REQUIRED=0.28.2
61 SERF_REQUIRED=1.2.0
62 SVN_MAJOR=1
63 SVN_MINOR=5
64 SVN_PATCH=0
65 SUBVERSION_REQUIRED=$SVN_MAJOR.$SVN_MINOR.$SVN_PATCH
67 AM_INIT_AUTOMAKE([1.10 dist-xz no-dist-gzip tar-ustar])
68 AM_MAINTAINER_MODE([enable])
70 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
72 dnl Check for C Compiler
73 AC_PROG_CC
74 AC_PROG_CPP
75 AC_PROG_LEX
76 if test "$LEX" != "flex"; then
77         AC_MSG_ERROR(flex is required)
79 AC_PROG_YACC
80 if test "$YACC" != "bison -y"; then
81         AC_MSG_ERROR(bison is required)
83 AC_LANG([C])
84 AC_LANG([C++])
85 AC_PROG_CXX
86 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],,
87    AC_MSG_ERROR([C++ Compiler required to compile Anjuta]))
88 AM_PROG_CC_C_O
90 GNOME_COMPILE_WARNINGS([maximum])
91 AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
92 AM_CXXFLAGS="$AM_CXXFLAGS $WARN_CXXFLAGS"
94 dnl Enable debugging mode
95 AC_ARG_ENABLE(debug,
96   AS_HELP_STRING([--enable-debug],[Enable debug messages]),
97   [if test "x$enableval" = "xyes"; then
98       AM_CFLAGS="$AM_CFLAGS -DDEBUG"
99   fi]
100   AM_CXXFLAGS="$AM_CXXFLAGS -DDEBUG")
101 AC_SUBST(AM_CFLAGS)
102 AC_SUBST(AM_CXXFLAGS)
104 ANJUTA_LDFLAGS="-no-undefined"
105 ANJUTA_PLUGIN_LDFLAGS="-module -avoid-version -no-undefined"
106 AC_SUBST(ANJUTA_LDFLAGS)
107 AC_SUBST(ANJUTA_PLUGIN_LDFLAGS)
109 dnl GSettings
110 GLIB_GSETTINGS
112 dnl Disable deprecated APIs
113 dnl if test x$MAINT = x; then
114 dnl     DEPRECATED_FLAGS="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
115 dnl     AC_SUBST(DEPRECATED_FLAGS)
116 dnl fi
118 dnl Check for pkg-config
119 PKG_PROG_PKG_CONFIG([0.22])
121 dnl Enable versioned user preferences directory
122 AC_ARG_WITH(pref-suffix,
123   AS_HELP_STRING([--with-pref-suffix=VALUE],[Suffix to add to user preferences dir.]),
124   PREF_SUFFIX="$withval")
126 AC_SUBST(PREF_SUFFIX)
127 AC_DEFINE_UNQUOTED(PREF_SUFFIX,
128       "${PREF_SUFFIX}",
129           [Suffix to add to preferences directory])
131 # Initialize libtool
132 LT_PREREQ([2.2])
133 LT_INIT([disable-static])
135 dnl ***************************************************************************
136 dnl Check for GObject-Introspection
137 dnl ***************************************************************************
138 m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [GOBJECT_INTROSPECTION_CHECK([0.6.7])],
139 [AM_CONDITIONAL(HAVE_INTROSPECTION, false)])
141 dnl ***************************************************************************
142 dnl Set gjsdir
143 dnl ***************************************************************************
144 gjsdir=`pkg-config --variable=jsdir gjs-1.0`
145 AC_SUBST(gjsdir)
147 dnl Check base modules
149 PKG_CHECK_MODULES([ANJUTA],
150    [gthread-2.0 >= $GTHREAD_REQUIRED
151         glib-2.0 >= $GLIB_REQUIRED
152         gio-2.0 >= $GLIB_REQUIRED
153         gmodule-2.0 >= $GLIB_REQUIRED
154         gtk+-3.0 >= $GTK_REQUIRED
155         gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED])
157 PKG_CHECK_MODULES([XML],
158    [libxml-2.0 >= $LIBXML_REQUIRED])
160 PKG_CHECK_MODULES([GDL],
161    [gdl-3.0 >= $GDL_REQUIRED])
163 PKG_CHECK_MODULES([GDA],
164    [libgda-5.0 >= $GDA5_REQUIRED],,
165    [PKG_CHECK_MODULES([GDA],
166       [libgda-4.0 >= $GDA4_REQUIRED])])
168 dnl Check for autogen
169 dnl -----------------
170 AC_PATH_PROG(AUTOGEN_PATH, autogen,no)
171 if test x$AUTOGEN_PATH = xno; then
172    AC_MSG_WARN([Couldn't find autogen. You will be able to build anjuta without autogen \
173                 but several things won't work. You can get it from http://autogen.sourceforge.net/])
176 dnl Check for Terminal
177 dnl ---------------------
179 AC_ARG_ENABLE(plugin-terminal,
180   AS_HELP_STRING([--disable-plugin-terminal],[Disable terminal plugin support in Anjuta.]),
181   [ if test "$enableval" = "no"; then
182        user_disabled_terminal=1
183     fi ],
184   [ user_disabled_terminal=0 ] )
186 AC_MSG_CHECKING(if terminal plugin is disabled)
187 if test "$user_disabled_terminal" = 1; then
188         AC_MSG_RESULT(yes)
189         terminal_enabled="no"
190 else
191         AC_MSG_RESULT(no)
192         PKG_CHECK_EXISTS([vte-2.91 >= $VTE_REQUIRED],
193                  [vte_2_91_enabled=yes],
194                  [vte_2_91_enabled=no])
195         if test $vte_2_91_enabled = yes; then
196                 PKG_CHECK_MODULES(PLUGIN_TERMINAL, [vte-2.91 >= $VTE_REQUIRED],
197                         [terminal_enabled=yes],
198                         [terminal_enabled=no])
199                 AC_DEFINE(HAVE_VTE_2_91,1,[libvte 2.91 support])
200         else
201                 PKG_CHECK_MODULES(PLUGIN_TERMINAL, [vte-2.90 >= $VTE_REQUIRED],
202                         [terminal_enabled=yes],
203                         [terminal_enabled=no])
204                 AC_DEFINE(HAVE_VTE_2_90,1,[libvte 2.90 support])
205         fi
208 AM_CONDITIONAL(HAVE_PLUGIN_TERMINAL, [test x$terminal_enabled = xyes])
210 dnl Check for Devhelp
211 dnl -----------------
213 AC_ARG_ENABLE(plugin-devhelp,
214   AS_HELP_STRING([--disable-plugin-devhelp],[Disable devhelp plugin support in Anjuta.]),
215   [ if test "$enableval" = "no"; then
216        user_disabled_devhelp=1
217     fi ],
218   [ user_disabled_devhelp=0 ] )
220 AC_MSG_CHECKING(if devhelp plugin is disabled)
221 if test "$user_disabled_devhelp" = 1; then
222         AC_MSG_RESULT(yes)
223         devhelp_enabled="no"
224 else
225         AC_MSG_RESULT(no)
226         PKG_CHECK_MODULES(PLUGIN_DEVHELP,
227                                 [libdevhelp-3.0 >= $LIBDEVHELP_REQUIRED],
228                                 [
229                                     devhelp_enabled=yes
230                                 ], [
231                                     devhelp_enabled=no
232                                 ])
235 if test "x$devhelp_enabled" = "xyes"; then
236         case "$PLUGIN_DEVHELP_LIBS" in
237                 *webkit2gtk-3.0*)
238                         AC_DEFINE([HAVE_WEBKIT2], [1], [Defined if devhelp is built against webkitgtk2])
239                         ;;
240                 esac
242 AM_CONDITIONAL(HAVE_PLUGIN_DEVHELP, [test x$devhelp_enabled = xyes])
244 dnl Check for Glade3
245 dnl ---------------------
247 AC_ARG_ENABLE(plugin-glade,
248   AS_HELP_STRING([--disable-plugin-glade],[Disable glade plugin support in Anjuta.]),
249   [ if test "$enableval" = "no"; then
250        user_disabled_glade=1
251     fi ],
252   [ user_disabled_glade=0 ] )
254 AC_MSG_CHECKING(if glade plugin is disabled)
255 if test "$user_disabled_glade" = 1; then
256         AC_MSG_RESULT(yes)
257         gladeui_found="no"
258 else
259         AC_MSG_RESULT(no)
260         gladeui_version=0
261         PKG_CHECK_MODULES(PLUGIN_GLADE, gladeui-2.0 >= $GLADEUI_REQUIRED,
262             [
263                 gladeui_found=yes
264             ], [
265                 gladeui_found=no
266             ])
269 AM_CONDITIONAL(HAVE_PLUGIN_GLADE, [test x$gladeui_found = xyes])
271 dnl Glade catalog
272 dnl ---------------------
274 AC_ARG_ENABLE(glade-catalog,
275   AS_HELP_STRING([--enable-glade-catalog], [Enable glade catalog. Glade UI libraries must be installed]),
276   [ user_enabled_glade_catalog=1 ],
277   [ user_enabled_glade_catalog=0 ])
279 glade_catalog_enabled="no"
281 AC_MSG_CHECKING(if glade catalog is enabled)
282 if test "$gladeui_found" = "yes"; then
283   if test "$user_enabled_glade_catalog" = 1; then
284     AC_MSG_RESULT(yes)
285     glade_catalog_enabled="yes"
286     GLADE_CATALOG_PATH=`pkg-config --variable=catalogdir gladeui-2.0`
287     GLADE_PLUGINS_PATH=`pkg-config --variable=moduledir gladeui-2.0`
289     AC_SUBST(GLADE_CATALOG_PATH)
290     AC_SUBST(GLADE_PLUGINS_PATH)
291   else
292     AC_MSG_RESULT(no) 
293   fi
294 else
295   AC_MSG_RESULT(no)
298 AM_CONDITIONAL(ENABLE_GLADE_CATALOG, [test x$glade_catalog_enabled = xyes])
300 dnl Check for gtksourceview
301 dnl -------------------------------------------------------------
302 PKG_CHECK_MODULES(SOURCEVIEW,
303                 [gtksourceview-3.0 >= $GTKSOURCEVIEW_REQUIRED])
306 dnl Check for libsqlite3 used in symbol-db benchmarks
307 dnl -------------------------------------------------------------
308 PKG_CHECK_MODULES(SQLITE, sqlite3, sqlite3_found=yes, sqlite3_found=no)
309 AM_CONDITIONAL(HAVE_SQLITE, [test x$sqlite3_found = xyes])
312 dnl Check for vala
313 dnl -------------------------------------------------------------
315 AC_ARG_ENABLE(vala,
316         AS_HELP_STRING([--disable-vala],[Disable vala support]),
317         [ if test "$enableval" = "no"; then
318                 user_disabled_vala=1
319           fi ],
320         [ user_disabled_vala=0 ])
322 AC_MSG_CHECKING(if vala support is disabled)
323 if test "$user_disabled_vala" = 1; then
324         AC_MSG_RESULT(yes)
325         enable_vala="no"
326 else
327         AC_MSG_RESULT(no)
328         AC_MSG_CHECKING(if libvala is available)
329         m4_foreach([VERSION], [[0.18], [0.20], [0.22], [0.24], [0.26]],
330                 [PKG_CHECK_EXISTS([ libvala-VERSION ],
331                          [ valaver="-VERSION" ])
332                          ])
333         if test "x$valaver" != "x"; then
334                 AC_MSG_RESULT(yes)
335                 enable_vala="yes"
336                 LIBVALA="libvala${valaver}"
337                 PKG_CHECK_MODULES([VALA], ${LIBVALA})
338         else
339                 AC_MSG_RESULT(no)
340                 enable_vala="no"
341                 VALA_REQUIRED=0.18.0
342         fi
343         AC_SUBST(LIBVALA)
346 if test x$enable_vala = xyes; then
347         AC_PATH_PROGS(VALAC, [valac${valaver} valac], valac)
348         AC_SUBST(VALAC)
351 AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes])
353 dnl Check for Python
354 dnl -------------------------------------------------------------
356 AM_PATH_PYTHON([],
357         [have_python="yes"],
358         [have_python="no"])
360 if test x$have_python = xyes; then
361         if test -x $PYTHON-config; then
362                 PYTHON_CFLAGS=`$PYTHON-config --cflags`
363                 PYTHON_LIBS=`$PYTHON-config --libs`
364                 AC_SUBST(PYTHON_CFLAGS)
365                 AC_SUBST(PYTHON_LIBS)
366         elif test -x $PYTHON$PYTHON_VERSION-config; then
367                 PYTHON_CFLAGS=`$PYTHON$PYTHON_VERSION-config --cflags`
368                 PYTHON_LIBS=`$PYTHON$PYTHON_VERSION-config --libs`
369                 AC_SUBST(PYTHON_CFLAGS)
370                 AC_SUBST(PYTHON_LIBS)           
371         else
372                 have_python="no"
373                 echo "$PYTHON-config or $PYTHON$PYTHON_VERSION-config not found - disabling python"
374         fi
377 AM_CONDITIONAL(HAVE_PYTHON, [test x$have_python = xyes])
379 dnl Disable packagekit support
380 dnl -----------------------------------
381 AC_ARG_ENABLE(packagekit,
382   [AC_HELP_STRING([--disable-packagekit],[build without PackageKit support])],,
383   [enable_packagekit=yes])
384 if test "x$enable_packagekit" != "xno"; then
385   AC_DEFINE(ENABLE_PACKAGEKIT, 1, [define to enable PackageKit installer])
388 dnl Setup Anjuta Library flags
389 dnl --------------------------
390 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)"\"'
391 LIBANJUTA_LIBS='$(top_builddir)/libanjuta/libanjuta-3.la'
392 AC_SUBST(LIBANJUTA_CFLAGS)
393 AC_SUBST(LIBANJUTA_LIBS)
395 dnl Setup FooCanvas Library flags
396 dnl --------------------------
397 LIBFOOCANVAS_CFLAGS='-I$(top_srcdir)'
398 LIBFOOCANVAS_LIBS='$(top_builddir)/libfoocanvas/libanjuta-foocanvas.la'
399 AC_SUBST(LIBFOOCANVAS_CFLAGS)
400 AC_SUBST(LIBFOOCANVAS_LIBS)
402 dnl Checks for Xft/XRender for foocanvas
404 AC_CHECK_LIB(Xrender, XRenderFindFormat,
405         [AC_SUBST(RENDER_LIBS, "-lXrender -lXext")
406          AC_DEFINE(HAVE_RENDER, 1, [Define if libXrender is available.])],
407         [AC_SUBST(RENDER_LIBS, "")],
408         [-lXext])
410 dnl Setup Plugin directories
411 dnl ------------------------
412 anjuta_plugin_dir='$(libdir)/anjuta'
413 anjuta_data_dir='$(datadir)/anjuta'
414 anjuta_ui_dir='$(datadir)/anjuta/ui'
415 anjuta_glade_dir='$(datadir)/anjuta/glade'
416 anjuta_image_dir='$(datadir)/pixmaps/anjuta'
417 AC_SUBST(anjuta_plugin_dir)
418 AC_SUBST(anjuta_data_dir)
419 AC_SUBST(anjuta_ui_dir)
420 AC_SUBST(anjuta_glade_dir)
421 AC_SUBST(anjuta_image_dir)
423 dnl ***************************************************************************
424 dnl Check for marshal and enum generators
425 dnl ***************************************************************************
426 GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
427 AC_SUBST(GLIB_GENMARSHAL)
428 GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
429 AC_SUBST(GLIB_MKENUMS)
431 dnl ***************************************************************************
432 dnl Internatinalization
433 dnl ***************************************************************************
434 IT_PROG_INTLTOOL([0.40.1])
436 AM_GNU_GETTEXT([external])
437 AM_GNU_GETTEXT_VERSION([0.17])
439 GETTEXT_PACKAGE=anjuta
440 AC_SUBST(GETTEXT_PACKAGE)
441 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
443 BISON_I18N
445 dnl ***************************************************************************
446 dnl Check for gtk-doc.
447 dnl ***************************************************************************
448 GTK_DOC_CHECK([1.4])
450 dnl ***************************************************************************
451 dnl User manual
452 dnl ***************************************************************************
453 YELP_HELP_INIT
455 dnl Define convenience macros
456 dnl -------------------------
457 dnl CHECK_HEADER_DEFINE(LABEL, HEADER [,ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ] ])
458 AC_DEFUN([CHECK_HEADER_DEFINE],
460         AC_MSG_CHECKING("if $1 is defined in $2")
461         AC_EGREP_CPP(yes,
462 [#include <$2>
463 #ifdef $1
464   yes
465 #endif
466 ], [
467         AC_MSG_RESULT(yes)
468         $3
469 ], [
470         AC_MSG_RESULT(no)
471         $4
472 ]) ])
474 dnl Checks for header files.
475 AC_CHECK_HEADERS(dirent.h fcntl.h fnmatch.h stat.h stdlib.h string.h stdint.h)
476 AC_CHECK_HEADERS(time.h types.h unistd.h)
477 AC_CHECK_HEADERS(sys/dir.h sys/stat.h sys/times.h sys/types.h)
479 dnl Checks for typedefs, structures, and compiler characteristics.
481 AC_CANONICAL_HOST
482 CYGWIN=no
483 MINGW32=no
484 case $host_os in
485   *cygwin* ) CYGWIN=yes;;
486   *mingw32* ) MINGW32=yes;;
487 esac
490 dnl Check for bind in libsocket (needed on Solaris)
491 AC_CHECK_LIB(socket, bind)
493 dnl Check for function forkpty and related headers
494 AC_SEARCH_LIBS(forkpty, util, , AC_DEFINE(EMULATE_FORKPTY, [], [Need  to implement our own forkpty()]))
495 AC_CHECK_HEADERS(libutil.h util.h pty.h)
497 dnl Checks for library functions.
498 AC_CHECK_FUNCS(fnmatch)
499 AC_CHECK_FUNCS(strstr)
500 AC_CHECK_FUNCS(stricmp)
501 AC_CHECK_FUNCS(strnicmp)
502 AC_CHECK_FUNCS(getline)
504 dnl for libegg/egg-recent-model.c
505 AC_CHECK_DECLS([lockf])
506 AC_CHECK_FUNCS([lockf])
508 AC_CHECK_FUNCS(fgetpos, have_fgetpos=yes)
510 dnl SEEK_SET should be in stdio.h, but may be in unistd.h on SunOS 4.1.x
511 if test "$have_fgetpos" != yes ; then
512     CHECK_HEADER_DEFINE(SEEK_SET, stdio.h,,
513         CHECK_HEADER_DEFINE(SEEK_SET, unistd.h,,
514             AC_DEFINE(SEEK_SET, 0, [Seek set 0])))
517 AC_CHECK_FUNCS(mkstemp, have_mkstemp=yes)
518 if test "$have_mkstemp" != yes ; then
519     AC_CHECK_FUNCS(chmod)
520     if test "$tmpdir_specified" = yes ; then
521         AC_MSG_RESULT(use of tmpnam overrides temporary directory selection)
522     fi
523 else
524     AC_MSG_CHECKING(directory to use for temporary files)
525     if test -z "$enable_tmpdir" -o "$enable_tmpdir" = no -o "$enable_tmpdir" = yes ;
526         then tmpdir=/tmp
527         else tmpdir="$enable_tmpdir"
528     fi
529     if test -d $tmpdir ; then
530         AC_MSG_RESULT($tmpdir)
531         AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [Directory for temporary files])
532     else
533         AC_MSG_WARN($tmpdir does not exist)
534     fi
537 dnl -----------------------------
538 dnl Checks for FreeBSD Build
539 dnl -----------------------------
540 AC_MSG_CHECKING(if building on FreeBSD)
542 if test `uname -s` = "FreeBSD" ; then
543         AC_MSG_RESULT(yes)
544         FREEBSD_BUILD=-DFREEBSD
545         AC_SUBST(FREEBSD_BUILD)
546         AC_PATH_PROG(GMAKE, gmake, no)
547         if test "x$GMAKE" = "xno"; then
548                 AC_MSG_ERROR(You need gmake installed to build Anjuta!)
549         fi
550 else
551         AC_MSG_RESULT(no)
552         GMAKE="make"
555 AC_SUBST(GMAKE)
557 dnl Checks for missing prototypes
558 dnl -----------------------------
559 AC_MSG_NOTICE([checking for missing prototypes...])
561 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))])
563 if test "$have_remove" = yes ; then
564     CHECK_PROTO(remove, stdio.h)
565 else
566     CHECK_PROTO(unlink, unistd.h)
568 CHECK_PROTO(malloc, stdlib.h)
569 CHECK_PROTO(getenv, stdlib.h)
570 CHECK_PROTO(stat,   sys/stat.h)
571 CHECK_PROTO(lstat,  sys/stat.h)
572 if test "$have_fgetpos" = yes ; then
573     CHECK_PROTO(fgetpos, stdio.h)
575 if test "$have_truncate" = yes ; then
576     CHECK_PROTO(truncate, unistd.h)
578 if test "$have_ftruncate" = yes ; then
579     CHECK_PROTO(ftruncate, unistd.h)
582 dnl  **********************************************************
583 dnl  check if we have svn libraries to build subversion plugin
584 dnl  (stolen from kdevelop ;-)
585 dnl  **********************************************************
587 AC_MSG_CHECKING(for Subversion svn-config)
588 AC_ARG_WITH(subversion-dir,
589                 AS_HELP_STRING([--with-subversion-dir=DIR],[Where Subversion is installed ]),
590                 [
591                                 SVNCONFIG="$withval/bin/svn-config"
592                 ])
594 if test -z "$SVNCONFIG"; then
595                 _SVNCONFIG="`svn-config --prefix 2> /dev/null`"
596                 if test -n "$_SVNCONFIG"; then
597                                 SVNCONFIG="$_SVNCONFIG/bin/svn-config"
598                 fi
601 AC_SUBST(SVNCONFIG)
602 if test -x "$SVNCONFIG"; then
603                 SVNLD="`$SVNCONFIG --ldflags 2> /dev/null`"
604                 SVN_LIB="`$SVNCONFIG --libs --cflags 2> /dev/null` -lsvn_client-1 -lsvn_subr-1"
605                 dnl ugly hack for subversion svn-config problems in 0.14.x, to be removed when svn-config is fixed
606                 SVN_INCLUDE="`$SVNCONFIG --includes 2> /dev/null` -I$_SVNCONFIG/include/subversion-1/"
607                 AC_MSG_RESULT(yes)
608 else
609                 AC_MSG_RESULT(not found)
611                 dnl just a fallback to debian's config so that it works for me :)
612                 AC_ARG_WITH(svn-include,
613                                                                 [[  --with-svn-include=DIR   Use the given path to the subversion headers.]],
614                                                                 [
615                                                                 if test "$withval" != "yes" -a "$withval" != ""; then
616                                                                                 SVN_INCLUDES=$withval
617                                                                 fi
618                                                                 ])
619                 if test -z "$SVN_INCLUDES"; then
620                         SVN_INCLUDES="/usr/local/include /usr/include"
621                 fi
622                 AC_MSG_CHECKING([for Subversion headers])
623                 SVN_INCLUDE=""
624                 for VALUE in $SVN_INCLUDES ; do
625                                 if test -f $VALUE/subversion-1/svn_types.h ; then
626                                                 SVN_INCLUDE=$VALUE/subversion-1
627                                                 break
628                                 fi
629                                 if test -f $VALUE/svn_types.h ; then
630                                                 SVN_INCLUDE=$VALUE
631                                                 break
632                                 fi
633                 done
634                 if test $SVN_INCLUDE ; then
635                                 AC_MSG_RESULT([found])
636                 else
637                                 AC_MSG_RESULT([not found])
638                 fi
639                 SVN_LIBS="/usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib"
640                 AC_ARG_WITH(svn-lib,
641                                                 [[  --with-svn-lib=DIR  Use the given path to the subversion libraries.]],
642                                                 [
643                                                         if test "$withval" != "yes" -a "$withval" != ""; then
644                                                                 SVN_LIBS=$withval
645                                                         fi
646                                                 ])
647                 AC_MSG_CHECKING([for Subversion libraries])
648                 SVN_LIB=""
649                 for VALUE in $SVN_LIBS ; do
650                                 if ls $VALUE/libsvn_client-1.* 1>/dev/null 2>&1; then
651                                                 SVN_LIB=$VALUE
652                                                 break
653                                 fi
654                 done
655                 if test $SVN_LIB ; then
656                                 AC_MSG_RESULT([found])
657                 else
658                                 AC_MSG_RESULT([not found])
659                 fi
662 dnl ******************************************************************
663 dnl Check for extra libs required by subversion.
664 dnl FIXME: This should actually be done by subversion and not by us.
665 dnl        See http://subversion.tigris.org/issues/show_bug.cgi?id=4435
666 dnl ******************************************************************
668 AC_ARG_ENABLE(plugin-subversion,
669   AS_HELP_STRING([--disable-plugin-subversion],[Disable subversion support in Anjuta.]),
670   [ if test "$enableval" = "no"; then
671         user_disabled_subversion=1
672     fi ],
673   [ user_disabled_subversion=0 ] )
675 AC_ARG_ENABLE(neon,
676         AS_HELP_STRING([--disable-neon],[Disable neon support in Subversion plugin]),
677         [ if test "$enableval" = "no"; then
678                 user_disabled_neon=1
679           fi ],
680         [ user_disabled_neon=0 ])
682 AC_ARG_ENABLE(serf,
683         AS_HELP_STRING([--disable-serf],[Disable serf support in Subversion plugin]),
684         [ if test "$enableval" = "no"; then
685                 user_disabled_serf=1
686           fi ],
687         [ user_disabled_serf=0 ])
689 AC_MSG_CHECKING(if subversion support is disabled)
690 if test "$user_disabled_subversion" = 1; then
691         AC_MSG_RESULT(yes)
692         SVN_INCLUDE=""
693         SVN_LIB=""
694 else
695         AC_MSG_RESULT(no)
698 if test -n "$SVN_INCLUDE" ; then
699         dnl ------------------------------------
700         dnl APR. Required by subversion (devel)
701         dnl ------------------------------------
702         have_atr=no
703         PKG_CHECK_MODULES(APR,                            \
704                 apr-1, have_apr=yes, have_apr=no)
705         if test x"$have_apr" = "xno"; then
706                 SVN_INCLUDE=""
707         fi
709         dnl -----------------------------------------
710         dnl APR util. Required by subversion (devel)
711         dnl------------------------------------------
712         have_atr_util=no
713         PKG_CHECK_MODULES(APR_UTILS,                            \
714                 apr-util-1, have_apr_util=yes, have_apr_util=no)
715         if test x"$have_apr_util" = "xno"; then
716                 SVN_INCLUDE=""
717         fi
719         dnl ----------------------------------------------------------
720         dnl NEON/SERF. Required by subversion (devel) for HTTP support
721         dnl-----------------------------------------------------------
722         # Subversion <= 1.7 relies on neon (recommended) or serf.
723         # Subversion 1.8 dropped neon support and uses serf to talk
724         # to HTTP servers.
725         #
726         # Subversion can be built without HTTP client support so neon and
727         # serf aren't hard requirements. But if present on the system
728         # it is reasonable to assume that Subversion is linked to them.
729         if test "$user_disabled_neon" = 0; then
730                 have_neon=no
731                 PKG_CHECK_MODULES(NEON,                            \
732                         neon, have_neon=yes, have_neon=no)
733         fi
734         if test "$user_disabled_serf" = 0; then
735                 have_serf=no
736                 PKG_CHECK_MODULES(SERF,                            \
737                         serf-1, have_serf=yes, have_serf=no)
738         fi
740         dnl Make sure our SVN version is high enough
741         dnl Eww, eww, eww, this is dirty
742         AC_MSG_CHECKING([for subversion >= $SUBVERSION_REQUIRED])
743         AC_LANG([C])
744         dnl Temporarily set CFLAGS so that include dirs are found
745         CFLAGS_TMP=$CFLAGS
746         CFLAGS="-I$SVN_INCLUDE $APR_CFLAGS"
747         AC_COMPILE_IFELSE(
748                 [AC_LANG_PROGRAM([[#include <svn_version.h>]],
749                         [[
750                                 #if (SVN_VER_MAJOR < $SVN_MAJOR) || (SVN_VER_MINOR < $SVN_MINOR) || (SVN_VER_PATCH < $SVN_PATCH)
751                                 #       error "Version too low"
752                                 #endif
753                         ]])], AC_MSG_RESULT(yes), have_svn_version=no)
754         if test x"$have_svn_version" = "xno"; then
755                 AC_MSG_RESULT(no)
756                 SVN_INCLUDE=""
757         fi
758         CFLAGS=$CFLAGS_TMP
761 dnl ------------------------------------------
762 dnl Finally prepare subversion build flags
763 dnl ------------------------------------------
765 if test -n "$SVN_INCLUDE" ; then
766         SVN_INCLUDE="-I$SVN_INCLUDE"
767         if test x != "x$SVN_LIB" ; then
768             SVN_LIB="-L$SVN_LIB $APR_LIBS $APR_UTILS_LIBS $NEON_LIBS $SERF_LIBS -lsvn_client-1 -lsvn_subr-1"
769         else
770             SVN_LIB="$APR_LIBS $APR_UTILS_LIBS $NEON_LIBS $SERF_LIBS -lsvn_client-1 -lsvn_subr-1"
771         fi
772         SVN_CFLAGS="$APR_CFLAGS $APR_UTILS_CFLAGS $NEON_CFLAGS $SERF_CFLAGS"
775 AM_CONDITIONAL(BUILD_SVN, [test -n "$SVN_INCLUDE"])
776 AC_SUBST(SVN_INCLUDE)
777 AC_SUBST(SVN_LIB)
778 AC_SUBST(SVN_CFLAGS)
780 dnl ------------------------------------------
781 dnl Symbol-db shared memory checks
782 dnl ------------------------------------------
784 SYMBOL_DB_SHM="/dev/shm"
785 user_specified_shm=0
786 AC_MSG_CHECKING(for symbol-db shared memory)
787 AC_ARG_WITH(symbol-db-shm,
788                 AS_HELP_STRING([--with-symbol-db-shm=DIR],[Where shared memory is placed ]),
789                 [
790                                 user_specified_shm=1
791                                 SYMBOL_DB_SHM="$withval"
792                 ])
793 if test "$user_specified_shm" = 1; then
794         AC_MSG_RESULT(yes)
795 else
796         AC_MSG_RESULT(no)
799 AC_SUBST(SYMBOL_DB_SHM)
801 dnl On Linux, need librt for shm_open/shm_unlink
802 bck_LIBS="$LIBS"
803 AC_SEARCH_LIBS(shm_open, rt, [SHM_LIBS="$LIBS"], [AC_MSG_ERROR([Failed to find library with shm_open()])])
804 AC_SUBST(SHM_LIBS)
805 LIBS="$bck_LIBS"
807 dnl Test using autotest
808 dnl -----------------------------
809 AC_CONFIG_TESTDIR(plugins/am-project/tests)
810 AM_MISSING_PROG([AUTOM4TE], [autom4te])
812 AC_CONFIG_FILES([
813 Makefile
814 po/Makefile.in
815 libanjuta/Makefile
816 libanjuta/tests/Makefile
817 libanjuta/interfaces/Makefile
818 libanjuta/libanjuta-3.0.pc
819 libanjuta/anjuta-version.h
820 src/Makefile
821 pixmaps/Makefile
822 pixmaps/hicolor/Makefile
823 pixmaps/hicolor/16x16/Makefile
824 pixmaps/hicolor/22x22/Makefile
825 pixmaps/hicolor/24x24/Makefile
826 pixmaps/hicolor/32x32/Makefile
827 pixmaps/hicolor/48x48/Makefile
828 pixmaps/hicolor/scalable/Makefile
829 pixmaps/HighContrast/Makefile
830 pixmaps/HighContrast/16x16/Makefile
831 pixmaps/HighContrast/22x22/Makefile
832 pixmaps/HighContrast/24x24/Makefile
833 pixmaps/HighContrast/32x32/Makefile
834 pixmaps/HighContrast/48x48/Makefile
835 pixmaps/HighContrast/256x256/Makefile
836 data/Makefile
837 data/welcome.txt
838 data/templates/Makefile
839 doc/anjuta.1
840 doc/anjuta-launcher.1
841 doc/Makefile
842 scripts/Makefile
843 launcher/Makefile
844 plugins/Makefile
845 plugins/class-gen/Makefile
846 plugins/class-gen/templates/Makefile
847 plugins/patch/Makefile
848 plugins/document-manager/Makefile
849 plugins/document-manager/images/Makefile
850 plugins/message-view/Makefile
851 plugins/gdb/Makefile
852 plugins/gdb/images/Makefile
853 plugins/debug-manager/Makefile
854 plugins/debug-manager/images/Makefile
855 plugins/devhelp/Makefile
856 plugins/devhelp/images/Makefile
857 plugins/glade/Makefile
858 plugins/glade/images/Makefile
859 plugins/js-debugger/Makefile
860 plugins/file-manager/Makefile
861 plugins/file-loader/Makefile
862 plugins/file-wizard/Makefile
863 plugins/build-basic-autotools/Makefile
864 plugins/project-manager/Makefile
865 plugins/symbol-db/benchmark/Makefile
866 plugins/symbol-db/benchmark/symbol-db/Makefile
867 plugins/symbol-db/benchmark/libgda/Makefile
868 plugins/symbol-db/benchmark/sqlite/Makefile
869 plugins/symbol-db/images/Makefile
870 plugins/symbol-db/Makefile
871 plugins/symbol-db/anjuta-tags/Makefile
872 plugins/project-wizard/Makefile
873 plugins/snippets-manager/Makefile
874 plugins/cvs-plugin/Makefile
875 plugins/subversion/Makefile
876 plugins/git/Makefile
877 plugins/git/images/Makefile
878 plugins/git/tests/Makefile
879 plugins/sourceview/Makefile
880 plugins/terminal/Makefile
881 plugins/tools/Makefile
882 plugins/tools/scripts/Makefile
883 plugins/language-manager/Makefile
884 plugins/project-import/Makefile
885 plugins/project-wizard/templates/Makefile
886 plugins/project-wizard/templates/mkfile/Makefile
887 plugins/project-wizard/templates/mkfile/src/Makefile
888 plugins/project-wizard/templates/mkfile/po/Makefile
889 plugins/project-wizard/templates/minimal/Makefile
890 plugins/project-wizard/templates/js_minimal/Makefile
891 plugins/project-wizard/templates/js_minimal/src/Makefile
892 plugins/project-wizard/templates/terminal/Makefile
893 plugins/project-wizard/templates/terminal/src/Makefile
894 plugins/project-wizard/templates/terminal/po/Makefile
895 plugins/project-wizard/templates/cpp/Makefile
896 plugins/project-wizard/templates/cpp/src/Makefile
897 plugins/project-wizard/templates/cpp/po/Makefile
898 plugins/project-wizard/templates/gtk/Makefile
899 plugins/project-wizard/templates/gtk/src/Makefile
900 plugins/project-wizard/templates/gtk/po/Makefile
901 plugins/project-wizard/templates/gtkapplication/Makefile
902 plugins/project-wizard/templates/gtkapplication/src/Makefile
903 plugins/project-wizard/templates/gtkapplication/po/Makefile
904 plugins/project-wizard/templates/anjuta-plugin/Makefile
905 plugins/project-wizard/templates/anjuta-plugin/src/Makefile
906 plugins/project-wizard/templates/anjuta-plugin/po/Makefile
907 plugins/project-wizard/templates/gtkmm/Makefile
908 plugins/project-wizard/templates/gtkmm/src/Makefile
909 plugins/project-wizard/templates/gtkmm/po/Makefile
910 plugins/project-wizard/templates/gcj/Makefile
911 plugins/project-wizard/templates/gcj/src/Makefile
912 plugins/project-wizard/templates/java/Makefile
913 plugins/project-wizard/templates/java/src/Makefile
914 plugins/project-wizard/templates/java/po/Makefile
915 plugins/project-wizard/templates/python/Makefile
916 plugins/project-wizard/templates/python/src/Makefile
917 plugins/project-wizard/templates/python/po/Makefile
918 plugins/project-wizard/templates/pygtk/Makefile
919 plugins/project-wizard/templates/pygtk/src/Makefile
920 plugins/project-wizard/templates/pygtk/po/Makefile
921 plugins/project-wizard/templates/vala-gtk/Makefile
922 plugins/project-wizard/templates/vala-gtk/src/Makefile
923 plugins/project-wizard/templates/wxwin/Makefile
924 plugins/project-wizard/templates/wxwin/src/Makefile
925 plugins/project-wizard/templates/wxwin/po/Makefile
926 plugins/project-wizard/templates/xlib/Makefile
927 plugins/project-wizard/templates/xlib/src/Makefile
928 plugins/project-wizard/templates/xlib/po/Makefile
929 plugins/project-wizard/templates/xlib-dock/Makefile
930 plugins/project-wizard/templates/xlib-dock/src/Makefile
931 plugins/project-wizard/templates/xlib-dock/po/Makefile
932 plugins/project-wizard/templates/sdl/Makefile
933 plugins/project-wizard/templates/sdl/src/Makefile
934 plugins/project-wizard/templates/sdl/po/Makefile
935 plugins/project-wizard/templates/library/Makefile
936 plugins/project-wizard/templates/library/src/Makefile
937 plugins/project-wizard/templates/library/po/Makefile
938 plugins/project-wizard/templates/directory/Makefile
939 plugins/project-wizard/templates/m4/Makefile
940 plugins/project-wizard/templates/gnome-shell-extension/Makefile
941 plugins/project-wizard/templates/gnome-shell-extension/src/Makefile
942 plugins/project-wizard/templates/vala-library/Makefile
943 plugins/project-wizard/templates/vala-library/src/Makefile
944 plugins/project-wizard/templates/vala-library/po/Makefile
945 plugins/am-project/Makefile
946 plugins/am-project/tests/atlocal
947 plugins/am-project/tests/Makefile
948 plugins/mk-project/Makefile
949 plugins/dir-project/Makefile
950 plugins/language-support-cpp-java/Makefile
951 plugins/run-program/Makefile
952 plugins/starter/Makefile
953 plugins/indentation-c-style/Makefile
954 plugins/indentation-python-style/Makefile
955 plugins/language-support-js/Makefile
956 plugins/language-support-vala/Makefile
957 plugins/language-support-python/Makefile
958 plugins/parser-cxx/Makefile
959 plugins/parser-cxx/cxxparser/Makefile
960 plugins/python-loader/Makefile
961 plugins/jhbuild/Makefile
962 plugins/quick-open/Makefile
963 anjuta.desktop.in
964 manuals/Makefile
965 manuals/reference/Makefile
966 manuals/reference/libanjuta/Makefile
967 manuals/reference/libanjuta/version.xml
968 manuals/anjuta-manual/Makefile
969 manuals/anjuta-faqs/Makefile
970 manuals/anjuta-build-tutorial/Makefile
971 mime/Makefile
973 AC_OUTPUT
974 echo " "
975 echo "-------------------------------------------------------------------"
976 echo "Conditionally built plugins:"
977 echo "-------------------------------------------------------------------"
978 if [ test -n "$SVN_INCLUDE" ]; then
979         echo "Building subversion plugin: ............................YES"
980 else
981         echo "Building subversion plugin: ............................NO"
982                 echo "        Requires apr (>= 0.9.4); http://subversion.org"
983                 echo "        Requires apr-util (>= 0.9.4); http://subversion.org"
984                 echo "        Requires neon (>= 0.28.2); http://subversion.org"
985                 echo "        Requires subversion (>= 1.5); http://subversion.org"
988 if [ test x$gladeui_found = xyes ]; then
989        echo "Building glade plugin: .................................YES"
990 else
991        echo "Building glade plugin: .................................NO"
992        echo "        Requires glade-3 (>= $GLADEUI_REQUIRED)"
995 if [ test x$devhelp_enabled = xyes ]; then
996        echo "Building devhelp plugin: ...............................YES"
997 else
998        echo "Building devhelp plugin: ...............................NO"
999        echo "        Requires libdevhelp-3.0 (>= $LIBDEVHELP_REQUIRED)"
1002 if [ test x$terminal_enabled = xyes ]; then
1003        echo "Building terminal plugin: ..............................YES"
1004 else
1005        echo "Building terminal plugin: ..............................NO"
1006        echo "        Requires vte-2.91 (>= $VTE_REQUIRED)"
1009 if [ test x$enable_vala = xyes ]; then
1010         echo "Building Vala support: .................................YES"
1011 else
1012         echo "Building Vala support: .................................NO"
1013         echo "        Requires libvala (>= $VALA_REQUIRED)"
1015 if [ test x$have_python = xyes]; then
1016         echo "Building python plugin loaeder: ........................YES"
1017 else
1018         echo "Building python plugin loaeder: ........................NO"
1019         echo "        Requires python"
1021 echo "-------------------------------------------------------------------"
1022 echo "AM_CFLAGS = $AM_CFLAGS"
1023 echo "AM_CXXFLAGS = $AM_CXXFLAGS"