Updated Spanish translation
[anjuta.git] / configure.in
blob352af460328a0798c8e3e4faf5d43e96d3969b45
1 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ(2.59)
5 m4_define(anjuta_major_version,  2)
6 m4_define(anjuta_minor_version, 27)
7 m4_define(anjuta_micro_version,  5)
8 m4_define(anjuta_nano_version, 0)
9 m4_define(anjuta_version, anjuta_major_version.anjuta_minor_version.anjuta_micro_version.anjuta_nano_version)
11 AC_INIT(anjuta, anjuta_version, http://bugzilla.gnome.org/enter_bug.cgi?product=anjuta)
12 AC_CONFIG_SRCDIR(src/main.c)
14 AC_DEFINE(ANJUTA_MAJOR_VERSION, anjuta_major_version, [Anjuta major version])
15 AC_SUBST(ANJUTA_MAJOR_VERSION, anjuta_major_version)
16 AC_DEFINE(ANJUTA_MINOR_VERSION, anjuta_minor_version, [Anjuta minor version])
17 AC_SUBST(ANJUTA_MINOR_VERSION, anjuta_minor_version)
18 AC_DEFINE(ANJUTA_MICRO_VERSION, anjuta_micro_version, [Anjuta micro version])
19 AC_SUBST(ANJUTA_MICRO_VERSION, anjuta_micro_version)
20 AC_DEFINE(ANJUTA_VERSION, anjuta_version, [Anjuta version])
21 AC_SUBST(ANJUTA_VERSION)
23 ANJUTA_VERSION=anjuta_version
24 AC_SUBST(ANJUTA_VERSION)
26 GLIB_REQUIRED=2.16.0
27 GDK_PIXBUF_REQUIRED=2.0.0
28 GTK_REQUIRED=2.14.0
29 ORBIT_REQUIRED=2.6.0
30 GCONF_REQUIRED=2.12.0
31 VTE_REQUIRED=0.9.0
32 VTE_NEW_REQUIRED=0.13.1
33 LIBXML_REQUIRED=2.4.23
34 LIBDEVHELP_REQUIRED=0.22
35 GDL_REQUIRED=2.27.1
36 GLADEUI_REQUIRED=3.6.0
37 NEON_REQUIRED=0.28.2
38 SVN_MAJOR=1
39 SVN_MINOR=5
40 SVN_PATCH=0
41 SUBVERSION_REQUIRED=$SVN_MAJOR.$SVN_MINOR.$SVN_PATCH
42 GTKSOURCEVIEW_REQUIRED=2.4.0
43 LIBWNCK_REQUIRED=2.12
44 GDA_REQUIRED=4.0.0
45 UNIQUE_REQUIRED=1.0.0
47 AC_SUBST(GLIB_REQUIRED)
48 AC_SUBST(GDK_PIXBUF_REQUIRED)
49 AC_SUBST(GTK_REQUIRED)
50 AC_SUBST(ORBIT_REQUIRED)
51 AC_SUBST(VTE_REQUIRED)
52 AC_SUBST(LIBXML_REQUIRED)
53 AC_SUBST(PANGO_REQUIRED)
54 AC_SUBST(VTE_NEW_REQUIRED)
55 AC_SUBST(LIBDEVHELP_REQUIRED)
56 AC_SUBST(GDL_REQUIRED)
57 AC_SUBST(GLADEUI_REQUIRED)
58 AC_SUBST(NEON_REQUIRED)
59 AC_SUBST(SUBVERSION_REQUIRED)
60 AC_SUBST(GTKSOURCEVIEW_REQUIRED)
61 AC_SUBST(LIBWNCK_REQUIRED)
62 AC_SUBST(GDA_REQUIRED)
63 AC_SUBST(UNIQUE_REQUIRED)
65 AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip])
66 AC_CONFIG_HEADERS(config.h)
67 AC_DISABLE_STATIC
68 AM_MAINTAINER_MODE
69 GNOME_DOC_INIT
71 #Check for C Compiler
72 AC_PROG_CC
73 AC_PROG_CPP
74 AC_LANG_C
75 AM_PROG_CC_C_O
77 GNOME_COMPILE_WARNINGS(maximum)
78 AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
80 dnl Enable debugging mode
81 AC_ARG_ENABLE(debug,
82   AC_HELP_STRING([--enable-debug],[Enable debug messages]),
83   AM_CFLAGS="$AM_CFLAGS -DDEBUG")
84 AC_SUBST(AM_CFLAGS)
86 ANJUTA_LDFLAGS="-no-undefined"
87 ANJUTA_PLUGIN_LDFLAGS="-module -avoid-version -no-undefined"
88 AC_SUBST(ANJUTA_LDFLAG)
89 AC_SUBST(ANJUTA_PLUGIN_LDFLAGS)
91 dnl Disable deprecated APIs
92 dnl if test x$MAINT = x; then
93 dnl     DEPRECATED_FLAGS="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
94 dnl     AC_SUBST(DEPRECATED_FLAGS)
95 dnl fi
97 dnl Enable versioned user preferences directory
98 AC_ARG_WITH(pref-suffix,
99   AC_HELP_STRING([--with-pref-suffix=VALUE],[Suffix to add to user preferences dir.]),
100   PREF_SUFFIX="$withval")
102 AC_SUBST(PREF_SUFFIX)
103 AC_DEFINE_UNQUOTED(PREF_SUFFIX,
104       "${PREF_SUFFIX}",
105           [Suffix to add to preferences directory])
107 AC_ISC_POSIX
108 AC_HEADER_STDC
109 AM_DISABLE_STATIC
110 AM_PROG_LIBTOOL
112 AC_TYPE_SIGNAL
114 dnl ***************************************************************************
115 dnl Check for GConf stuff to handle schema installation
116 dnl ***************************************************************************
117 AC_PATH_PROG(GCONFTOOL, gconftool-2)
118 AM_GCONF_SOURCE_2
120 dnl ***************************************************************************
121 dnl Check for pkgconfig
122 dnl ***************************************************************************
123 AC_PATH_PROG(PKGCONFIG_CONFIG, pkg-config,no)
124 if test x$PKGCONFIG_CONFIG = xno; then
125   AC_MSG_ERROR(Please install the pkg-config package from http://www.freedesktop.org/software/pkgconfig/)
128 dnl pkg checks are split into separate packages instead of single package
129 dnl because different plugins have different requirements.
131 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED unique-1.0 >= $UNIQUE_REQUIRED)
133 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
135 PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED)
137 PKG_CHECK_MODULES(ORBIT, ORBit-2.0 >= $ORBIT_REQUIRED)
139 PKG_CHECK_MODULES(GCONF, gconf-2.0 >= $GCONF_REQUIRED)
141 PKG_CHECK_MODULES(VTE, vte >= $VTE_REQUIRED)
143 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED)
145 PKG_CHECK_MODULES(GDL, gdl-1.0 >= $GDL_REQUIRED)
147 PKG_CHECK_MODULES(LIBXSLT, libxslt)
149 dnl Check for autogen
150 dnl -----------------
151 AC_PATH_PROG(AUTOGEN_PATH, autogen,no)
152 if test x$AUTOGEN_PATH = xno; then
153    AC_MSG_ERROR([Couldn't find autogen, please install the autogen package. You can get it from http://autogen.sourceforge.net/])
156 dnl Check for perl required by gbf-am/mkfile
157 dnl ----------------------------------------
158 # Automake backend requirements
159 # Also needed by Makefile backend
160 AC_PATH_PROG(PERL, perl)
161 if test -z "$PERL"; then
162    AC_MSG_ERROR([perl not found])
164 $PERL -e 'require 5.005;' || {
165    AC_MSG_ERROR([perl 5.005 or better is required])
168 # Check for perl Locale::gettext module
169 if test "x$PERL" != x; then
170         AC_MSG_CHECKING(for perl module Locale::gettext)
171         $PERL "-MLocale::gettext" -e exit > /dev/null 2>&1
172         if test $? -ne 0; then
173                 AC_MSG_ERROR([not found, you should installed perl-gettext package for your distribution]);
174         else
175         AC_MSG_RESULT(ok);
176         fi
179 dnl Check for Devhelp
180 dnl -----------------
182 AC_ARG_ENABLE(plugin-devhelp,
183   AC_HELP_STRING([--disable-plugin-devhelp],[Disable devhelp plugin support in Anjuta.]),
184   [ if test "$enableval" = "no"; then
185        user_disabled_devhelp=1
186     fi ],
187   [ user_disabled_devhelp=0 ] )
189 AC_MSG_CHECKING(if devhelp plugin is disabled)
190 if test "$user_disabled_devhelp" = 1; then
191         AC_MSG_RESULT(yes)
192         devhelp_enabled="no"
193 else
194         AC_MSG_RESULT(no)
195         PKG_CHECK_MODULES(PLUGIN_DEVHELP, 
196                                 [libdevhelp-1.0 >= $LIBDEVHELP_REQUIRED webkit-1.0],
197                                 [
198                                     devhelp_enabled=yes
199                                 ], [
200                                     devhelp_enabled=no
201                                 ])
204 AM_CONDITIONAL(HAVE_PLUGIN_DEVHELP, [test x$devhelp_enabled = xyes])
206 dnl Check for Glade3
207 dnl ---------------------
209 AC_ARG_ENABLE(plugin-glade,
210   AC_HELP_STRING([--disable-plugin-glade],[Disable glade plugin support in Anjuta.]),
211   [ if test "$enableval" = "no"; then
212        user_disabled_glade=1
213     fi ],
214   [ user_disabled_glade=0 ] )
216 AC_MSG_CHECKING(if glade plugin is disabled)
217 if test "$user_disabled_glade" = 1; then
218         AC_MSG_RESULT(yes)
219         gladeui_found="no"
220 else
221         AC_MSG_RESULT(no)
222         gladeui_version=0
223         PKG_CHECK_MODULES(PLUGIN_GLADE, gladeui-1.0 >= $GLADEUI_REQUIRED,
224             [
225                 gladeui_found=yes
226             ], [
227                 gladeui_found=no
228             ])
231 AM_CONDITIONAL(HAVE_PLUGIN_GLADE, [test x$gladeui_found = xyes])
233 dnl Build gtksourceview plugin only on gnome 2.14 and gtk 2.10
234 dnl -------------------------------------------------------------
236 AC_ARG_ENABLE(plugin-sourceview,
237         AC_HELP_STRING([--disable-plugin-sourceview],[Disable gtksourceview based editor in Anjuta]), 
238         [ if test "$enableval" = "no"; then
239                 user_disabled_sourceview=1
240           fi ],
241         [ user_disabled_sourceview=0 ])
243 AC_MSG_CHECKING(if sourceview plugin is disabled)
244 if test "$user_disabled_sourceview" = 1; then
245         AC_MSG_RESULT(yes)
246         sourceview="no"
247 else
248         AC_MSG_RESULT(no)
249         
250         PKG_CHECK_MODULES(PLUGIN_SOURCEVIEW,
251                 [gtksourceview-2.0 >= $GTKSOURCEVIEW_REQUIRED],
252                 [sourceview="yes"],
253                 [sourceview="no"])
256 AM_CONDITIONAL(HAVE_PLUGIN_SOURCEVIEW, [test x$sourceview = xyes])
258 PKG_CHECK_MODULES(PLUGIN_SYMBOL_DB,
259                 [libgda-4.0 >= $GDA_REQUIRED])
261 dnl Setup Anjuta Library flags
262 dnl --------------------------
263 LIBANJUTA_CFLAGS='$(GLIB_CFLAGS) $(GTK_CFLAGS) $(GCONF_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)"\"'
264 LIBANJUTA_LIBS='$(top_builddir)/libanjuta/libanjuta.la'
265 AC_SUBST(LIBANJUTA_CFLAGS)
266 AC_SUBST(LIBANJUTA_LIBS)
268 dnl Setup Plugin directories
269 dnl ------------------------
270 anjuta_plugin_dir='$(libdir)/anjuta'
271 anjuta_data_dir='$(datadir)/anjuta'
272 anjuta_ui_dir='$(datadir)/anjuta/ui'
273 anjuta_glade_dir='$(datadir)/anjuta/glade'
274 anjuta_image_dir='$(datadir)/pixmaps/anjuta'
275 AC_SUBST(anjuta_plugin_dir)
276 AC_SUBST(anjuta_data_dir)
277 AC_SUBST(anjuta_ui_dir)
278 AC_SUBST(anjuta_glade_dir)
279 AC_SUBST(anjuta_image_dir)
281 dnl ***************************************************************************
282 dnl Check for old vte version
283 dnl ***************************************************************************
284 PKG_CHECK_MODULES(VTE, vte >= $VTE_NEW_REQUIRED, OLD_VTE=0, OLD_VTE=1)
285 AC_SUBST(OLD_VTE)
286 AC_DEFINE_UNQUOTED(OLD_VTE, $OLD_VTE, [Old version of vte])
288 dnl ***************************************************************************
289 dnl Check for marshal and enum generators
290 dnl ***************************************************************************
291 GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
292 AC_SUBST(GLIB_GENMARSHAL)
293 GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
294 AC_SUBST(GLIB_MKENUMS)
296 dnl Set up Glade 3 catlog information
297 dnl ---------------------
298 GLADE_PLUGINS_PATH="`$PKG_CONFIG --variable=moduledir gladeui-1.0`"
299 AC_SUBST(GLADE_PLUGINS_PATH)
300 GLADE_CATALOG_PATH="`$PKG_CONFIG --variable=catalogdir gladeui-1.0`"
301 AC_SUBST(GLADE_CATALOG_PATH)
303 dnl ***************************************************************************
304 dnl Internatinalization
305 dnl ***************************************************************************
306 GETTEXT_PACKAGE=anjuta
307 AC_SUBST(GETTEXT_PACKAGE)
308 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
309 AM_GLIB_GNU_GETTEXT
310 IT_PROG_INTLTOOL([0.35.0])
312 dnl ***************************************************************************
313 dnl Check for gtk-doc.
314 dnl ***************************************************************************
315 GTK_DOC_CHECK([1.4])
317 dnl Define convenience macros
318 dnl -------------------------
319 dnl CHECK_HEADER_DEFINE(LABEL, HEADER [,ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ] ])
320 AC_DEFUN([CHECK_HEADER_DEFINE],
322         AC_MSG_CHECKING("if $1 is defined in $2")
323         AC_EGREP_CPP(yes,
324 [#include <$2>
325 #ifdef $1
326   yes
327 #endif
328 ], [
329         AC_MSG_RESULT(yes)
330         $3
331 ], [
332         AC_MSG_RESULT(no)
333         $4
334 ]) ])
336 dnl Checks for header files.
337 AC_CHECK_HEADERS(dirent.h fcntl.h fnmatch.h stat.h stdlib.h string.h stdint.h)
338 AC_CHECK_HEADERS(time.h types.h unistd.h)
339 AC_CHECK_HEADERS(sys/dir.h sys/stat.h sys/times.h sys/types.h)
341 dnl Checks for typedefs, structures, and compiler characteristics.
343 dnl Disable cygwin check until someone fixes that stupid autoconf warnings.
344 dnl AC_CYGWIN
345 dnl AC_MINGW
347 AC_C_CONST
348 AC_OBJEXT
349 AC_EXEEXT
351 AC_TYPE_SIZE_T
352 AC_TYPE_OFF_T
354 AC_MSG_CHECKING("for fpos_t")
355 AC_EGREP_HEADER(fpos_t, stdio.h, AC_MSG_RESULT(yes),
357     AC_MSG_RESULT(no)
358     AC_DEFINE(fpos_t, long, [fpos_t is type long])
361 AC_MSG_CHECKING("for clock_t")
362 AC_EGREP_HEADER(clock_t, time.h, AC_MSG_RESULT(yes),
364     AC_MSG_RESULT(no)
365     AC_DEFINE(clock_t, long, [clock_t is type long])
368 CHECK_HEADER_DEFINE(L_tmpnam, stdio.h,, AC_DEFINE(L_tmpnam, 20, [L_tmpname is 20]))
370 CHECK_HEADER_DEFINE(INT_MAX, limits.h,,
371     CHECK_HEADER_DEFINE(MAXINT, limits.h,
372         AC_DEFINE(INT_MAX, MAXINT, [Maximum int size]), AC_DEFINE(INT_MAX, 32767, [Maximum int size])))
374 AC_MSG_CHECKING(if struct stat contains st_ino)
375 AC_TRY_COMPILE([#include <sys/stat.h>], [
376     struct stat st;
377     stat(".", &st);
378     if (st.st_ino > 0)
379         exit(0);
380 ], have_st_ino=yes, have_st_ino=no)
381 AC_MSG_RESULT($have_st_ino)
382 if test yes = "$have_st_ino"; then
383     AC_DEFINE(HAVE_STAT_ST_INO,,[Have stat st_ino])
387 dnl Check for bind in libsocket (needed on Solaris)
388 AC_CHECK_LIB(socket, bind)
390 dnl Check for function forkpty and related headers
391 AC_SEARCH_LIBS(forkpty, util, , AC_DEFINE(EMULATE_FORKPTY, [], [Need  to implement our own forkpty()]))
392 AC_CHECK_HEADERS(libutil.h util.h pty.h)
394 dnl Checks for library functions.
395 AC_CHECK_FUNCS(fnmatch)
396 AC_CHECK_FUNCS(strstr)
397 AC_CHECK_FUNCS(stricmp)
398 AC_CHECK_FUNCS(strnicmp)
399 AC_CHECK_FUNCS(getline)
401 dnl for libegg/egg-recent-model.c
402 AC_CHECK_DECLS([lockf])
403 AC_CHECK_FUNCS([lockf])
405 AC_CHECK_FUNCS(fgetpos, have_fgetpos=yes)
407 dnl SEEK_SET should be in stdio.h, but may be in unistd.h on SunOS 4.1.x
408 if test "$have_fgetpos" != yes ; then
409     CHECK_HEADER_DEFINE(SEEK_SET, stdio.h,,
410         CHECK_HEADER_DEFINE(SEEK_SET, unistd.h,,
411             AC_DEFINE(SEEK_SET, 0, [Seek set 0])))
414 AC_CHECK_FUNCS(mkstemp, have_mkstemp=yes)
415 if test "$have_mkstemp" != yes ; then
416     AC_CHECK_FUNCS(chmod)
417     if test "$tmpdir_specified" = yes ; then
418         AC_MSG_RESULT(use of tmpnam overrides temporary directory selection)
419     fi
420 else
421     AC_MSG_CHECKING(directory to use for temporary files)
422     if test -z "$enable_tmpdir" -o "$enable_tmpdir" = no -o "$enable_tmpdir" = yes ;
423         then tmpdir=/tmp
424         else tmpdir="$enable_tmpdir"
425     fi
426     if test -d $tmpdir ; then
427         AC_MSG_RESULT($tmpdir)
428         AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [Directory for temporary files])
429     else
430         AC_MSG_WARN($tmpdir does not exist)
431     fi
434 AC_CHECK_FUNCS(strerror opendir)
435 AC_CHECK_FUNCS(clock times, break)
436 AC_CHECK_FUNCS(remove, have_remove=yes,
437     CHECK_HEADER_DEFINE(remove, unistd.h,, AC_DEFINE(remove, unlink, [Remove is unlink])))
439 AC_CHECK_FUNCS(truncate, have_truncate=yes)
440 dnl === Cannot nest AC_CHECK_FUNCS() calls
441 if test "$have_truncate" != yes  ; then
442     AC_CHECK_FUNCS(ftruncate, have_ftruncate=yes)
443     if test "$have_ftruncate" != yes ; then
444         AC_CHECK_FUNCS(chsize)
445     fi
448 AC_CHECK_FUNCS(setenv, have_setenv=yes)
449 dnl === Cannot nest AC_CHECK_FUNCS() calls
450 if test "$have_setenv" != yes ; then
451     AC_CHECK_FUNCS(putenv, have_putenv=yes)
452     if test "$have_putenv" = yes ; then
453         AC_EGREP_HEADER(putenv, stdlib.h, have_putenv_prototype=yes)
454         if test "$have_putenv_prototype" = yes ; then
455             AC_MSG_CHECKING("putenv prototype")
456             AC_EGREP_HEADER([[^A-Za-zo-9_]putenv[   ]*\(.*const.*\)[    ]*;],
457                 stdlib.h, AC_MSG_RESULT(correct),
458                 [
459                     AC_MSG_RESULT(no const)
460                     AC_DEFINE(NON_CONST_PUTENV_PROTOTYPE,,[putenv has non constant prototype])
461                 ])
462         fi
463     fi
467 dnl if test yes = "$CYGWIN"; then with_posix_regex=no; fi
468 if test no != "$with_posix_regex"; then
469     AC_CHECK_FUNCS(regcomp)
470     AC_MSG_CHECKING(if regcomp works)
471     AC_TRY_RUN([
472 #include <sys/types.h>
473 #include <regex.h>
474 main() {
475     regex_t patbuf;
476     exit (regcomp (&patbuf, "/hello/", 0) != 0);
477 }],regcomp_works=yes,regcomp_works=no,AC_DEFINE(CHECK_REGCOMP,,[Check regcomp]))
478     AC_MSG_RESULT($regcomp_works)
479     if test yes != "$regcomp_works"; then
480         AC_DEFINE(REGCOMP_BROKEN,,[Regcomp is broken])
481     fi
484 dnl -----------------------------
485 dnl Checks for FreeBSD Build
486 dnl -----------------------------
487 AC_MSG_CHECKING(if building on FreeBSD)
489 if test `uname -s` = "FreeBSD" ; then
490         AC_MSG_RESULT(yes)
491         FREEBSD_BUILD=-DFREEBSD
492         AC_SUBST(FREEBSD_BUILD)
493         AC_PATH_PROG(GMAKE, gmake, no)
494         if test "x$GMAKE" = "xno"; then
495                 AC_ERROR(You need gmake installed to build Anjuta!)
496         fi
497 else
498         AC_MSG_RESULT(no)
499         GMAKE="make"
502 AC_SUBST(GMAKE)
504 dnl Checks for missing prototypes
505 dnl -----------------------------
506 AC_CHECKING("for missing prototypes")
508 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))])
510 if test "$have_remove" = yes ; then
511     CHECK_PROTO(remove, stdio.h)
512 else
513     CHECK_PROTO(unlink, unistd.h)
515 CHECK_PROTO(malloc, stdlib.h)
516 CHECK_PROTO(getenv, stdlib.h)
517 CHECK_PROTO(stat,   sys/stat.h)
518 CHECK_PROTO(lstat,  sys/stat.h)
519 if test "$have_fgetpos" = yes ; then
520     CHECK_PROTO(fgetpos, stdio.h)
522 if test "$have_truncate" = yes ; then
523     CHECK_PROTO(truncate, unistd.h)
525 if test "$have_ftruncate" = yes ; then
526     CHECK_PROTO(ftruncate, unistd.h)
529 dnl  **********************************************************
530 dnl  check if we have svn libraries to build subversion plugin
531 dnl  (stolen from kdevelop ;-)
532 dnl  **********************************************************
534 AC_MSG_CHECKING(for Subversion svn-config)
535 AC_ARG_WITH(subversion-dir,
536                 AC_HELP_STRING([--with-subversion-dir=DIR],[Where Subversion is installed ]),
537                 [
538                                 SVNCONFIG="$withval/bin/svn-config"
539                 ])
541 if test -z "$SVNCONFIG"; then
542                 _SVNCONFIG="`svn-config --prefix 2> /dev/null`"
543                 if test -n "$_SVNCONFIG"; then
544                                 SVNCONFIG="$_SVNCONFIG/bin/svn-config"
545                 fi
548 AC_SUBST(SVNCONFIG)
549 if test -x "$SVNCONFIG"; then
550                 SVNLD="`$SVNCONFIG --ldflags 2> /dev/null`"
551                 SVN_LIB="`$SVNCONFIG --libs --cflags 2> /dev/null` -lsvn_client-1 -lsvn_subr-1"
552                 dnl ugly hack for subversion svn-config problems in 0.14.x, to be removed when svn-config is fixed
553                 SVN_INCLUDE="`$SVNCONFIG --includes 2> /dev/null` -I$_SVNCONFIG/include/subversion-1/"
554                 AC_MSG_RESULT(yes)
555 else
556                 AC_MSG_RESULT(not found)
557                 
558                 dnl just a fallback to debian's config so that it works for me :)
559                 AC_ARG_WITH(svn-include,
560                                                                 [[  --with-svn-include=DIR   Use the given path to the subversion headers.]],
561                                                                 [
562                                                                 if test "$withval" != "yes" -a "$withval" != ""; then
563                                                                                 SVN_INCLUDES=$withval
564                                                                 fi
565                                                                 ])
566                 if test -z "$SVN_INCLUDES"; then
567                         SVN_INCLUDES="/usr/local/include /usr/include"
568                 fi
569                 AC_MSG_CHECKING([for Subversion headers])
570                 SVN_INCLUDE=""
571                 for VALUE in $SVN_INCLUDES ; do
572                                 if test -f $VALUE/subversion-1/svn_types.h ; then
573                                                 SVN_INCLUDE=$VALUE/subversion-1
574                                                 break
575                                 fi
576                                 if test -f $VALUE/svn_types.h ; then
577                                                 SVN_INCLUDE=$VALUE
578                                                 break
579                                 fi
580                 done
581                 if test $SVN_INCLUDE ; then
582                                 AC_MSG_RESULT([found])
583                 else
584                                 AC_MSG_RESULT([not found])
585                 fi
586                 SVN_LIBS="/usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib"
587                 AC_ARG_WITH(svn-lib,
588                                                 [[  --with-svn-lib=DIR  Use the given path to the subversion libraries.]],
589                                                 [
590                                                         if test "$withval" != "yes" -a "$withval" != ""; then
591                                                                 SVN_LIBS=$withval
592                                                         fi
593                                                 ])
594                 AC_MSG_CHECKING([for Subversion libraries])
595                 SVN_LIB=""
596                 for VALUE in $SVN_LIBS ; do
597                                 if ls $VALUE/libsvn_client-1.* 1>/dev/null 2>&1; then
598                                                 SVN_LIB=$VALUE
599                                                 break
600                                 fi
601                 done
602                 if test $SVN_LIB ; then
603                                 AC_MSG_RESULT([found])
604                 else
605                                 AC_MSG_RESULT([not found])
606                 fi
609 dnl ******************************************************************
610 dnl Check for extra libs required by subversion.
611 dnl FIXME: This should actually be done by subversion and not by us.
612 dnl ******************************************************************
614 AC_ARG_ENABLE(plugin-subversion,
615   AC_HELP_STRING([--disable-plugin-subversion],[Disable subversion support in Anjuta.]),
616   [ if test "$enableval" = "no"; then
617         user_disabled_subversion=1
618     fi ],
619   [ user_disabled_subversion=0 ] )
621 AC_MSG_CHECKING(if subversion support is disabled)
622 if test "$user_disabled_subversion" = 1; then
623         AC_MSG_RESULT(yes)
624         SVN_INCLUDE=""
625         SVN_LIB=""
626 else
627         AC_MSG_RESULT(no)
630 if test -n "$SVN_INCLUDE" ; then
631         dnl ------------------------------------
632         dnl APR. Required by subversion (devel)
633         dnl ------------------------------------
634         have_atr=no
635         PKG_CHECK_MODULES(APR,                            \
636                 apr-1, have_apr=yes, have_apr=no)
637         if test x"$have_apr" = "xno"; then
638                 SVN_INCLUDE=""
639         fi
640         
641         dnl -----------------------------------------
642         dnl APR util. Required by subversion (devel)
643         dnl------------------------------------------
644         have_atr_util=no
645         PKG_CHECK_MODULES(APR_UTILS,                            \
646                 apr-util-1, have_apr_util=yes, have_apr_util=no)
647         if test x"$have_apr_util" = "xno"; then
648                 SVN_INCLUDE=""
649         fi
650         
651         dnl -----------------------------------------
652         dnl NEON. Required by subversion (devel)
653         dnl------------------------------------------
654         have_neon=no
655         PKG_CHECK_MODULES(NEON,                            \
656                 neon, have_neon=yes, have_neon=no)
657         if test x"$have_neon" = "xno"; then
658                 SVN_INCLUDE=""
659         fi
661         dnl Make sure our SVN version is high enough
662         dnl Eww, eww, eww, this is dirty
663         AC_MSG_CHECKING([for subversion >= $SUBVERSION_REQUIRED])
664         AC_LANG(C)
665         dnl Temporarily set CFLAGS so that include dirs are found
666         CFLAGS_TMP=$CFLAGS
667         CFLAGS="-I$SVN_INCLUDE $APR_CFLAGS"
668         AC_COMPILE_IFELSE(
669                 [AC_LANG_PROGRAM([[#include <svn_version.h>]],
670                         [[
671                                 #if (SVN_VER_MAJOR < $SVN_MAJOR) || (SVN_VER_MINOR < $SVN_MINOR) || (SVN_VER_PATCH < $SVN_PATCH)
672                                 #       error "Version too low"
673                                 #endif
674                         ]])], AC_MSG_RESULT(yes), have_svn_version=no)
675         if test x"$have_svn_version" = "xno"; then
676                 AC_MSG_RESULT(no)
677                 SVN_INCLUDE=""
678         fi
679         CFLAGS=$CFLAGS_TMP
682 dnl ------------------------------------------
683 dnl Finally prepare subversion build flags
684 dnl ------------------------------------------
686 if test -n "$SVN_INCLUDE" ; then
687         SVN_INCLUDE="-I$SVN_INCLUDE"
688         if test x != "x$SVN_LIB" ; then
689             SVN_LIB="-L$SVN_LIB $APR_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
690         else
691             SVN_LIB="$APR_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
692         fi
693         SVN_CFLAGS="$APR_CFLAGS $NEON_CFLAGS"
696 AM_CONDITIONAL(BUILD_SVN, [test -n "$SVN_INCLUDE"])
697 AC_SUBST(SVN_INCLUDE)
698 AC_SUBST(SVN_LIB)
699 AC_SUBST(SVN_CFLAGS)
701 dnl --------- help outputs -----------
702 dnl manuals/C/Makefile
703 dnl manuals/C/anjuta-tutorial/Makefile
704 dnl manuals/C/anjuta-advanced-tutorial/Makefile
705 dnl manuals/C/anjuta-faqs/Makefile
706 dnl manuals/C/anjuta-manual/Makefile
707 dnl manuals/de/Makefile
708 dnl manuals/de/anjuta-tutorial/Makefile
709 dnl manuals/ja/Makefile
710 dnl manuals/ja/anjuta-faqs/Makefile
711 dnl manuals/ja/anjuta-manual/Makefile
713 AC_OUTPUT([
714 Makefile
715 po/Makefile.in
716 libanjuta/Makefile
717 libanjuta/libanjuta-1.0.pc
718 libanjuta/anjuta-version.h
719 libanjuta/interfaces/Makefile
720 src/Makefile
721 pixmaps/Makefile
722 data/Makefile
723 data/welcome.txt
724 doc/anjuta.1
725 doc/anjuta-launcher.1
726 doc/Makefile
727 scripts/Makefile
728 launcher/Makefile
729 plugins/Makefile
730 plugins/gtodo/Makefile
731 plugins/class-gen/Makefile
732 plugins/class-gen/templates/Makefile
733 plugins/patch/Makefile
734 plugins/document-manager/Makefile
735 plugins/document-manager/images/Makefile
736 plugins/search/Makefile
737 plugins/message-view/Makefile
738 plugins/gdb/Makefile
739 plugins/gdb/images/Makefile
740 plugins/debug-manager/Makefile
741 plugins/debug-manager/images/Makefile
742 plugins/devhelp/Makefile
743 plugins/glade/Makefile
744 plugins/file-manager/Makefile
745 plugins/file-loader/Makefile
746 plugins/file-wizard/Makefile
747 plugins/terminal/Makefile
748 plugins/build-basic-autotools/Makefile
749 plugins/project-manager/Makefile
750 plugins/gbf-am/Makefile
751 plugins/gbf-am/gbf-am-parse
752 plugins/gbf-am/GBF/Makefile
753 plugins/gbf-mkfile/Makefile
754 plugins/gbf-mkfile/gbf-mkfile-parse
755 plugins/gbf-mkfile/GBF/Makefile
756 plugins/symbol-db/benchmark/Makefile
757 plugins/symbol-db/images/Makefile
758 plugins/symbol-db/Makefile
759 plugins/symbol-db/anjuta-tags/Makefile
760 plugins/symbol-db/test-queries/Makefile
761 plugins/cvs-plugin/Makefile
762 plugins/project-wizard/Makefile
763 plugins/macro/Makefile
764 plugins/subversion/Makefile
765 plugins/git/Makefile
766 plugins/sourceview/Makefile
767 plugins/tools/Makefile
768 plugins/tools/scripts/Makefile
769 plugins/language-manager/Makefile
770 plugins/project-import/Makefile
771 plugins/project-wizard/templates/Makefile
772 plugins/project-wizard/templates/mkfile/Makefile
773 plugins/project-wizard/templates/mkfile/src/Makefile
774 plugins/project-wizard/templates/mkfile/po/Makefile
775 plugins/project-wizard/templates/minimal/Makefile
776 plugins/project-wizard/templates/terminal/Makefile
777 plugins/project-wizard/templates/terminal/src/Makefile
778 plugins/project-wizard/templates/terminal/po/Makefile
779 plugins/project-wizard/templates/cpp/Makefile
780 plugins/project-wizard/templates/cpp/src/Makefile
781 plugins/project-wizard/templates/cpp/po/Makefile
782 plugins/project-wizard/templates/gtk/Makefile
783 plugins/project-wizard/templates/gtk/src/Makefile
784 plugins/project-wizard/templates/gtk/po/Makefile
785 plugins/project-wizard/templates/anjuta-plugin/Makefile
786 plugins/project-wizard/templates/anjuta-plugin/src/Makefile
787 plugins/project-wizard/templates/anjuta-plugin/po/Makefile
788 plugins/project-wizard/templates/anjuta-plugin-vala/Makefile
789 plugins/project-wizard/templates/anjuta-plugin-vala/src/Makefile
790 plugins/project-wizard/templates/anjuta-plugin-vala/po/Makefile
791 plugins/project-wizard/templates/gtkmm/Makefile
792 plugins/project-wizard/templates/gtkmm/src/Makefile
793 plugins/project-wizard/templates/gtkmm/po/Makefile
794 plugins/project-wizard/templates/gcj/Makefile
795 plugins/project-wizard/templates/gcj/src/Makefile
796 plugins/project-wizard/templates/java/Makefile
797 plugins/project-wizard/templates/java/src/Makefile
798 plugins/project-wizard/templates/java/po/Makefile
799 plugins/project-wizard/templates/python/Makefile
800 plugins/project-wizard/templates/python/src/Makefile
801 plugins/project-wizard/templates/python/po/Makefile
802 plugins/project-wizard/templates/wxwin/Makefile
803 plugins/project-wizard/templates/wxwin/src/Makefile
804 plugins/project-wizard/templates/wxwin/po/Makefile
805 plugins/project-wizard/templates/xlib/Makefile
806 plugins/project-wizard/templates/xlib/src/Makefile
807 plugins/project-wizard/templates/xlib/po/Makefile
808 plugins/project-wizard/templates/xlib-dock/Makefile
809 plugins/project-wizard/templates/xlib-dock/src/Makefile
810 plugins/project-wizard/templates/xlib-dock/po/Makefile
811 plugins/project-wizard/templates/sdl/Makefile
812 plugins/project-wizard/templates/sdl/src/Makefile
813 plugins/project-wizard/templates/sdl/po/Makefile
814 plugins/project-wizard/templates/licenses/Makefile
815 plugins/project-wizard/templates/gnome-applet/Makefile
816 plugins/project-wizard/templates/gnome-applet/src/Makefile
817 plugins/project-wizard/templates/gnome-applet/po/Makefile
818 plugins/project-wizard/templates/library/Makefile
819 plugins/project-wizard/templates/library/src/Makefile
820 plugins/project-wizard/templates/library/po/Makefile
821 plugins/project-wizard/templates/m4/Makefile
822 plugins/language-support-cpp-java/Makefile
823 plugins/run-program/Makefile
824 plugins/starter/Makefile
825 anjuta.desktop.in
826 manuals/Makefile
827 manuals/reference/Makefile
828 manuals/reference/libanjuta/Makefile
829 manuals/reference/libanjuta/version.xml
830 manuals/anjuta-manual/Makefile
831 manuals/anjuta-faqs/Makefile
832 manuals/anjuta-build-tutorial/Makefile
833 mime/Makefile
835 chmod +x ${ac_top_build_dir}plugins/gbf-am/gbf-am-parse
836 chmod +x ${ac_top_build_dir}plugins/gbf-mkfile/gbf-mkfile-parse
837 echo " "
838 echo "-------------------------------------------------------------------"
839 echo "Conditionally built plugins:"
840 echo "-------------------------------------------------------------------"
841 if [ test -n "$SVN_INCLUDE" ]; then
842         echo "Building subversion plugin: ............................YES"
843 else
844         echo "Building subversion plugin: ............................NO"
845                 echo "        Requires apr (>= 0.9.4); http://subversion.org"
846                 echo "        Requires apr-util (>= 0.9.4); http://subversion.org"
847                 echo "        Requires neon (>= 0.28.2); http://subversion.org"
848                 echo "        Requires subversion (>= 1.5); http://subversion.org"
851 if [ test x$gladeui_found = xyes ]; then
852        echo "Building glade plugin: .................................YES"
853 else
854        echo "Building glade plugin: .................................NO"
855        echo "        Requires glade-3 (>= $GLADEUI_REQUIRED)"
858 if [ test x$devhelp_enabled = xyes ]; then
859        echo "Building devhelp plugin: ...............................YES"
860 else
861        echo "Building devhelp plugin: ...............................NO"
862        echo "        Requires devhelp >= 0.22"
865 if [ test x$sourceview = xyes ]; then
866         echo "Building GtkSourceView based editor: ...................YES"
867 else
868         echo "Building GtkSourceView based editor: ...................NO"
870 echo "-------------------------------------------------------------------"
871 echo "AM_CFLAGS = $AM_CFLAGS"