1 dnl Process this file with autoconf to produce a configure script.
5 m4_define(anjuta_major_version, 2)
6 m4_define(anjuta_minor_version, 1)
7 m4_define(anjuta_micro_version, 3)
8 m4_define(anjuta_version, anjuta_major_version.anjuta_minor_version.anjuta_micro_version)
10 AC_INIT(anjuta, anjuta_version, http://bugzilla.gnome.org/enter_bug.cgi?product=anjuta)
11 AC_CONFIG_SRCDIR(src/main.c)
13 AC_DEFINE(ANJUTA_MAJOR_VERSION, anjuta_major_version, [Anjuta major version])
14 AC_SUBST(ANJUTA_MAJOR_VERSION, anjuta_major_version)
15 AC_DEFINE(ANJUTA_MINOR_VERSION, anjuta_minor_version, [Anjuta minor version])
16 AC_SUBST(ANJUTA_MINOR_VERSION, anjuta_minor_version)
17 AC_DEFINE(ANJUTA_MICRO_VERSION, anjuta_micro_version, [Anjuta micro version])
18 AC_SUBST(ANJUTA_MICRO_VERSION, anjuta_micro_version)
19 AC_DEFINE(ANJUTA_VERSION, anjuta_version, [Anjuta version])
20 AC_SUBST(ANJUTA_VERSION)
23 GOBJECT_REQUIRED=2.8.0
24 GMODULE_REQUIRED=2.8.0
25 GTHREAD_REQUIRED=2.8.0
26 GDK_PIXBUF_REQUIRED=2.0.0
29 LIBGLADE_REQUIRED=2.3.0
31 GNOME_CANVAS_REQUIRED=2.12.0
32 GNOME_UI_REQUIRED=2.12.0
33 GNOME_PRINT_REQUIRED=2.12.0
34 GNOME_PRINT_UI_REQUIRED=2.12.0
35 GNOME_VFS_REQUIRED=2.10.0
38 VTE_NEW_REQUIRED=0.13.1
39 LIBXML_REQUIRED=2.4.23
42 LIBDEVHELP_REQUIRED=0.13
44 GNOMEBUILD_REQUIRED=0.1.4
45 GLADEUI_REQUIRED=3.0.2
46 LIBGRAPHVIZ_REQUIRED=1.0
48 SUBVERSION_REQUIRED=1.0.2
49 GTKSOURCEVIEW_REQUIRED=1.4.0
50 GTKSOURCEVIEW_GNOME_REQUIRED=2.14
51 GTKSOURCEVIEW_GTK_REQUIRED=2.10
52 BINUTILS_REQUIRED=2.15.92
55 dnl LIBGTODO_REQUIRED=0.15
57 AC_SUBST(GLIB_REQUIRED)
58 AC_SUBST(GOBJECT_REQUIRED)
59 AC_SUBST(GMODULE_REQUIRED)
60 AC_SUBST(GDK_PIXBUF_REQUIRED)
61 AC_SUBST(GTK_REQUIRED)
62 AC_SUBST(ORBIT_REQUIRED)
63 AC_SUBST(LIBGLADE_REQUIRED)
64 AC_SUBST(GNOME_REQUIRED)
65 AC_SUBST(GNOME_CANVAS_REQUIRED)
66 AC_SUBST(GNOME_UI_REQUIRED)
67 AC_SUBST(GNOME_PRINT_REQUIRED)
68 AC_SUBST(GNOME_PRINT_UI_REQUIRED)
69 AC_SUBST(GNOME_VFS_REQUIRED)
70 AC_SUBST(GCONF_REQUIRED)
71 AC_SUBST(VTE_REQUIRED)
72 AC_SUBST(LIBXML_REQUIRED)
73 AC_SUBST(PANGO_REQUIRED)
74 AC_SUBST(VTE_NEW_REQUIRED)
75 AC_SUBST(PCRE_REQUIRED)
76 AC_SUBST(LIBDEVHELP_REQUIRED)
77 AC_SUBST(GDL_REQUIRED)
78 AC_SUBST(GNOMEBUILD_REQUIRED)
79 AC_SUBST(GLADEUI_REQUIRED)
80 AC_SUBST(GLADEUI_SVN_REQUIRED)
81 AC_SUBST(LIBGRAPHVIZ_REQUIRED)
82 AC_SUBST(NEON_REQUIRED)
83 AC_SUBST(SUBVERSION_REQUIRED)
84 AC_SUBST(GTKSOURCEVIEW_REQUIRED)
85 AC_SUBST(GTKSOURCEVIEW_GNOME_REQUIRED)
86 AC_SUBST(GTKSOURCEVIEW_GTK_REQUIRED)
87 AC_SUBST(BINUTILS_REQUIRED)
88 AC_SUBST(LIBWNCK_REQUIRED)
90 dnl AC_SUBST(LIBGTODO_REQUIRED)
92 AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip])
93 AC_CONFIG_HEADERS(config.h)
98 GNOME_COMPILE_WARNINGS(maximum)
100 dnl Enable debugging mode
102 [ --enable-debug Enable debug messages],
103 AM_CFLAGS="$AM_CFLAGS -DDEBUG"
104 AM_CXXFLAGS="$AM_CXXFLAGS -DDEBUG")
106 AC_SUBST(AM_CXXFLAGS)
108 ANJUTA_LDFLAGS="-no-undefined"
109 ANJUTA_PLUGIN_LDFLAGS="-module -avoid-version -no-undefined"
110 AC_SUBST(ANJUTA_LDFLAG)
111 AC_SUBST(ANJUTA_PLUGIN_LDFLAGS)
113 dnl Disable deprecated APIs
114 AC_ARG_ENABLE(deprecated,
115 [ --disable-deprecated Disable deprecated APIs],
116 [ if test "$enableval" = "no"; then
117 DEPRECATED_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED"
119 [ DEPRECATED_FLAGS="" ])
120 AC_SUBST(DEPRECATED_FLAGS)
122 dnl Enable versioned user preferences directory
123 AC_ARG_WITH(pref-suffix,
124 [ --with-pref-suffix=VALUE Suffix to add to user preferences dir.],
125 PREF_SUFFIX="$withval")
127 AC_SUBST(PREF_SUFFIX)
128 AC_DEFINE_UNQUOTED(PREF_SUFFIX,
130 [Suffix to add to preferences directory])
132 #Check for C Compiler
137 #Check for C++ Compiler
148 dnl ***************************************************************************
149 dnl Check for pkgconfig
150 dnl ***************************************************************************
151 AC_PATH_PROG(PKGCONFIG_CONFIG, pkg-config,no)
152 if test x$PKGCONFIG_CONFIG = xno; then
153 AC_MSG_ERROR(Please install the pkg-config package from http://www.freedesktop.org/software/pkgconfig/)
156 dnl pkg checks are split into separate packages instead of single package
157 dnl because different plugins have different requirements.
159 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
160 AC_SUBST(GLIB_CFLAGS)
163 PKG_CHECK_MODULES(GOBJECT, gobject-2.0 >= $GOBJECT_REQUIRED)
164 AC_SUBST(GOBJECT_CFLAGS)
165 AC_SUBST(GOBJECT_LIBS)
167 PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GMODULE_REQUIRED)
168 AC_SUBST(GMODULE_CFLAGS)
169 AC_SUBST(GMODULE_LIBS)
171 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GTHREAD_REQUIRED)
172 AC_SUBST(GTHREAD_CFLAGS)
173 AC_SUBST(GTHREAD_LIBS)
175 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
179 PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED)
180 AC_SUBST(GDK_PIXBUF_CFLAGS)
181 AC_SUBST(GDK_PIXBUF_LIBS)
183 PKG_CHECK_MODULES(ORBIT, ORBit-2.0 >= $ORBIT_REQUIRED)
184 AC_SUBST(ORBIT_CFLAGS)
187 PKG_CHECK_MODULES(GLADE, libglade-2.0 >= $LIBGLADE_REQUIRED)
188 AC_SUBST(GLADE_CFLAGS)
191 PKG_CHECK_MODULES(GNOME, libgnome-2.0 >= $GNOME_REQUIRED)
192 AC_SUBST(GNOME_CFLAGS)
195 PKG_CHECK_MODULES(GNOME_CANVAS, libgnomecanvas-2.0 >= $GNOME_CANVAS_REQUIRED)
196 AC_SUBST(GNOME_CANVAS_CFLAGS)
197 AC_SUBST(GNOME_CANVAS_LIBS)
199 PKG_CHECK_MODULES(GNOME_UI, libgnomeui-2.0 >= $GNOME_UI_REQUIRED)
200 AC_SUBST(GNOME_UI_CFLAGS)
201 AC_SUBST(GNOME_UI_LIBS)
203 PKG_CHECK_MODULES(GNOME_PRINT, libgnomeprint-2.2 >= $GNOME_PRINT_REQUIRED)
204 AC_SUBST(GNOME_PRINT_CFLAGS)
205 AC_SUBST(GNOME_PRINT_LIBS)
207 PKG_CHECK_MODULES(GNOME_PRINT_UI, libgnomeprintui-2.2 >= $GNOME_PRINT_UI_REQUIRED)
208 AC_SUBST(GNOME_PRINT_UI_CFLAGS)
209 AC_SUBST(GNOME_PRINT_UI_LIBS)
211 PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED)
212 AC_SUBST(GNOME_VFS_CFLAGS)
213 AC_SUBST(GNOME_VFS_LIBS)
215 PKG_CHECK_MODULES(GNOME_VFS_MODULE, gnome-vfs-module-2.0 >= $GNOME_VFS_REQUIRED)
216 AC_SUBST(GNOME_VFS_MODULE_CFLAGS)
217 AC_SUBST(GNOME_VFS_MODULE_LIBS)
219 PKG_CHECK_MODULES(GCONF, gconf-2.0 >= $GCONF_REQUIRED)
220 AC_SUBST(GCONF_CFLAGS)
223 PKG_CHECK_MODULES(VTE, vte >= $VTE_REQUIRED)
227 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED)
228 AC_SUBST(LIBXML_CFLAGS)
229 AC_SUBST(LIBXML_LIBS)
231 PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED)
232 AC_SUBST(PANGO_CFLAGS)
235 PKG_CHECK_MODULES(GDL, gdl-1.0 >= $GDL_REQUIRED gdl-gnome-1.0 >= $GDL_REQUIRED)
239 PKG_CHECK_MODULES(LIBXSLT, libxslt)
240 AC_SUBST(LIBXSLT_CFLAGS)
241 AC_SUBST(LIBXSLT_LIBS)
243 dnl Check for autogen
244 dnl -----------------
245 AC_PATH_PROG(AUTOGEN_PATH, autogen,no)
246 if test x$AUTOGEN_PATH = xno; then
247 AC_MSG_ERROR([Couldn't find autogen, please install the autogen package. You can get it from http://autogen.sourceforge.net/])
250 dnl Check for Devhelp
251 dnl -----------------
253 AC_ARG_ENABLE(plugin-devhelp,
254 [ --disable-plugin-devhelp Disable devhelp plugin support in Anjuta.],
255 [ if test "$enableval" = "no"; then
256 user_disabled_devhelp=1
258 [ user_disabled_devhelp=0 ] )
260 AC_MSG_CHECKING(if devhelp plugin is disabled)
261 if test "$user_disabled_devhelp" = 1; then
267 PKG_CHECK_MODULES(PLUGIN_DEVHELP,
268 [libdevhelp-1.0 >= $LIBDEVHELP_REQUIRED],
273 AC_MSG_RESULT([version >= 0.11 not found])
277 if test x$devhelp_old = xyes; then
278 PKG_CHECK_MODULES(PLUGIN_DEVHELP, [libdevhelp-1.0 >= 0.9], [devhelp_enabled=yes], [devhelp_enabled=no])
279 if test x$devhelp_enabled = xyes; then
280 AC_DEFINE(HAVE_OLD_DEVHELP, 1, [If old devhelp (>= 0.9 < 0.11) is installed])
283 AC_SUBST(PLUGIN_DEVHELP_CFLAGS)
284 AC_SUBST(PLUGIN_DEVHELP_LIBS)
287 if test x$devhelp_enabled = xyes; then
288 GECKO_HOME=`$PKGCONFIG_CONFIG --variable=gecko_home libdevhelp-1.0`
289 if test x$GECKO_HOME != x; then
290 ANJUTA_LDFLAGS="$ANJUTA_LDFLAGS -R$GECKO_HOME"
293 AC_SUBST(ANJUTA_LDFLAGS)
295 AM_CONDITIONAL(HAVE_PLUGIN_DEVHELP, [test x$devhelp_enabled = xyes])
298 dnl -----------------
299 dnl PKG_CHECK_MODULES(PLUGIN_GTODO, libgtodo-1.0 >= $LIBGTODO_REQUIRED)
300 dnl AC_SUBST(PLUGIN_GTODO_CFLAGS)
301 dnl AC_SUBST(PLUGIN_GTODO_LIBS)
303 dnl Check for Gnome Build
304 dnl ---------------------
306 PKG_CHECK_MODULES(PLUGIN_GNOMEBUILD, gnome-build-1.0 >= $GNOMEBUILD_REQUIRED)
307 AC_SUBST(PLUGIN_GNOMEBUILD_CFLAGS)
308 AC_SUBST(PLUGIN_GNOMEBUILD_LIBS)
311 dnl ---------------------
313 AC_ARG_ENABLE(plugin-glade,
314 [ --disable-plugin-glade Disable glade plugin support in Anjuta.],
315 [ if test "$enableval" = "no"; then
316 user_disabled_glade=1
318 [ user_disabled_glade=0 ] )
320 AC_MSG_CHECKING(if glade plugin is disabled)
321 if test "$user_disabled_glade" = 1; then
323 libgladeui_found="no"
326 AC_PATH_PROG(PKG_PATH, pkg-config, no)
328 PKG_CHECK_MODULES(PLUGIN_GLADE, gladeui-1.0,
330 libgladeui_found="yes"
331 gladeui_version=`$PKG_PATH --modversion gladeui-1.0 | sed -e 's,\.,,g'`
333 libgladeui_found="no"
335 if test x$libgladeui_found = xno; then
336 PKG_CHECK_MODULES(PLUGIN_GLADE, [libgladeui-1.0 >= $GLADEUI_REQUIRED],
338 libgladeui_found="yes"
339 gladeui_version=`$PKG_PATH --modversion libgladeui-1.0 | sed -e 's,\.,,g'`
341 libgladeui_found="no"
344 AC_DEFINE_UNQUOTED(GLADEUI_VERSION, [$gladeui_version], [GLADEUI version])
345 AC_SUBST(GLADEUI_VERSION)
346 AC_SUBST(PLUGIN_GLADE_CFLAGS)
347 AC_SUBST(PLUGIN_GLADE_LIBS)
350 AM_CONDITIONAL(HAVE_PLUGIN_GLADE, [test x$libgladeui_found = xyes])
352 dnl Check for graphviz (class inheritance and profiler plugins)
353 dnl --------------------------------------------------------------------------
354 dnl FIXME: For some strange reason graphviz-devel rpm install the *.pc files
355 dnl in /usr/lib/graphviz/pkgconfig, instead of usual /usr/lib/pkgconfig. This
356 dnl makes pkgconfig check fail if we don't add the above path in
357 dnl PKG_CONFIG_PATH. We have added both /usr/lib/graphviz/pkgconfig and
358 dnl /usr/local/lib/pkgconfig paths. If graphviz is installed in other prefix
359 dnl (other than /usr or /usr/local or the current installation prefix),
360 dnl following pkgconfig check will fail.
361 dnl --------------------------------------------------------------------------
362 AC_ARG_ENABLE(graphviz,
363 [ --disable-graphviz Disable GraphViz support in Anjuta],
364 [ if test "$enableval" = "no"; then
365 user_disabled_graphviz=1
367 [ user_disabled_graphviz=0 ])
369 AC_MSG_CHECKING(if GraphViz support is disabled)
370 if test "$user_disabled_graphviz" = 1; then
372 libgraphviz_found="no"
376 dnl Set pkgconfig path
377 ANJUTA_PKG_CONFIG_PATH_SAVE="${PKG_CONFIG_PATH}"
378 PKG_CONFIG_PATH="/usr/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
379 PKG_CONFIG_PATH="/usr/local/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
380 PKG_CONFIG_PATH="/usr/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
381 PKG_CONFIG_PATH="/usr/local/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
383 anjuta_save_prefix="$prefix"
384 test "x$prefix" = xNONE && prefix=$ac_default_prefix
385 graphviz_pkgconfig=`eval echo ${libdir}/graphviz/pkgconfig`
386 PKG_CONFIG_PATH="$graphviz_pkgconfig:$PKG_CONFIG_PATH"
387 prefix="$anjuta_save_prefix"
389 export PKG_CONFIG_PATH
390 PKG_CHECK_MODULES(GRAPHVIZ,
391 [libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED],
392 [libgraphviz_found="yes"],
393 [libgraphviz_found="no"])
394 AC_SUBST(GRAPHVIZ_CFLAGS)
395 AC_SUBST(GRAPHVIZ_LIBS)
397 dnl Restore pkgconfig path
398 PKG_CONFIG_PATH="${ANJUTA_PKG_CONFIG_PATH_SAVE}"
399 export PKG_CONFIG_PATH
402 AM_CONDITIONAL(HAVE_GRAPHVIZ, [test x$libgraphviz_found = xyes])
404 dnl Define HAVE_GRAPHVIZ to disable Function Call Chart in the Profiler if
405 dnl Graphviz isn't on the system
406 if test "$libgraphviz_found" = yes; then
407 AC_DEFINE(HAVE_GRAPHVIZ, [], [Define if we have GraphViz >= 2.6.0])
410 dnl Build gtksourceview plugin only on gnome 2.14 and gtk 2.10
411 dnl -------------------------------------------------------------
413 AC_ARG_ENABLE(plugin-sourceview,
414 [ --disable-plugin-sourceview Disable gtksourceview based editor in Anjuta],
415 [ if test "$enableval" = "no"; then
416 user_disabled_sourceview=1
418 [ user_disabled_sourceview=0 ])
420 AC_MSG_CHECKING(if sourceview plugin is disabled)
421 if test "$user_disabled_sourceview" = 1; then
427 PKG_CHECK_MODULES(PLUGIN_SOURCEVIEW,
428 [libgnome-2.0 >= $GTKSOURCEVIEW_GNOME_REQUIRED,
429 gtk+-2.0 >= $GTKSOURCEVIEW_GTK_REQUIRED,
430 gtksourceview-1.0 >= $GTKSOURCEVIEW_REQUIRED],
433 AC_SUBST(PLUGIN_SOURCEVIEW_CFLAGS)
434 AC_SUBST(PLUGIN_SOURCEVIEW_LIBS)
437 AM_CONDITIONAL(HAVE_PLUGIN_SOURCEVIEW, [test x$sourceview = xyes])
440 dnl -------------------------------------------------------------
442 AC_ARG_ENABLE(plugin-scintilla,
443 [ --disable-plugin-scintilla Disable Scintilla based editor in Anjuta],
444 [ if test "$enableval" = "no"; then
445 user_disabled_scintilla=1
447 [ user_disabled_scintilla=0 ])
449 AC_MSG_CHECKING(if scintilla plugin is disabled)
450 if test "$user_disabled_scintilla" = 1; then
457 AM_CONDITIONAL(HAVE_PLUGIN_SCINTILLA, [test x$scintilla = xyes])
461 dnl -------------------------------------------------------------
463 AC_ARG_ENABLE(plugin-valgrind,
464 [ --disable-plugin-valgrind Disable Valgrind plugin],
465 [ if test "$enableval" = "no"; then
466 user_disabled_valgrind=1
468 [ user_disabled_valgrind=0 ])
470 AC_MSG_CHECKING(if valgrind plugin is disabled)
471 if test "$user_disabled_valgrind" = 1; then
479 AC_CHECK_LIB(bfd, bfd_get_error, [PLUGIN_VALGRIND_LIBS="-Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic"],
483 AC_SUBST(PLUGIN_VALGRIND_LIBS)
484 AM_CONDITIONAL(HAVE_PLUGIN_VALGRIND, [test x$valgrind = xyes])
489 dnl we need gconftool-2 in order to install the schema
490 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
492 if test "x$GCONFTOOL" = "xno"; then
493 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
501 dnl check for bfd_get_section_size_before_reloc() in libbfd
502 AC_MSG_CHECKING(for bfd_get_section_size_before_reloc)
508 bfd_get_section_size_before_reloc (section);
511 AC_DEFINE(HAVE_BFD_GET_SECTION_SIZE_BEFORE_RELOC, [], [Define if libbfd
512 contains the function bfd_get_section_size_before_reloc])
520 dnl Setup Anjuta Library flags
521 dnl --------------------------
522 LIBANJUTA_CFLAGS='$(GNOME_UI_CFLAGS) $(GLADE_CFLAGS) -I$(top_srcdir) -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)\"" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"'
523 LIBANJUTA_LIBS='$(top_builddir)/libanjuta/libanjuta.la'
524 AC_SUBST(LIBANJUTA_CFLAGS)
525 AC_SUBST(LIBANJUTA_LIBS)
527 dnl Setup Plugin directories
528 dnl ------------------------
529 anjuta_plugin_dir='$(libdir)/anjuta'
530 anjuta_data_dir='$(datadir)/anjuta'
531 anjuta_ui_dir='$(datadir)/anjuta/ui'
532 anjuta_glade_dir='$(datadir)/anjuta/glade'
533 anjuta_image_dir='$(datadir)/pixmaps/anjuta'
534 AC_SUBST(anjuta_plugin_dir)
535 AC_SUBST(anjuta_data_dir)
536 AC_SUBST(anjuta_ui_dir)
537 AC_SUBST(anjuta_glade_dir)
538 AC_SUBST(anjuta_image_dir)
540 dnl ***************************************************************************
541 dnl Check for old vte version
542 dnl ***************************************************************************
543 PKG_CHECK_MODULES(VTE, vte >= $VTE_NEW_REQUIRED, OLD_VTE=0, OLD_VTE=1)
545 AC_DEFINE_UNQUOTED(OLD_VTE, $OLD_VTE, [Old version of vte])
547 dnl ***************************************************************************
548 dnl Check for marshal and enum generators
549 dnl ***************************************************************************
550 GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
551 AC_SUBST(GLIB_GENMARSHAL)
552 GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
553 AC_SUBST(GLIB_MKENUMS)
555 dnl ***************************************************************************
556 dnl Internatinalization
557 dnl ***************************************************************************
558 GETTEXT_PACKAGE=anjuta
559 AC_SUBST(GETTEXT_PACKAGE)
560 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
562 IT_PROG_INTLTOOL([0.35.0])
564 dnl ***************************************************************************
565 dnl Check for gtk-doc.
566 dnl ***************************************************************************
569 dnl ***************************************************************************
570 dnl Check for Gnome XML [Is this still required?]
571 dnl ***************************************************************************
574 dnl ***************************************************************************
575 dnl Check for ScrollKeeper [No documentation for now]
576 dnl ***************************************************************************
577 dnl AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
578 dnl if test x$SCROLLKEEPER_CONFIG = xno; then
579 dnl AC_MSG_ERROR(Couldn't find scrollkeeper-config, please install the scrollkeeper package. You can get it from http://scrollkeeper.sourceforge.net/)
581 dnl SCROLLKEEPER_REQUIRED=0.1.4
582 dnl AC_SUBST(SCROLLKEEPER_REQUIRED)
584 dnl ***************************************************************************
585 dnl Checking for scrollkeeper version [No documentation for now]
586 dnl ***************************************************************************
587 dnl AC_MSG_CHECKING(for scrollkeeper version number)
588 dnl if scrollkeeper-config --version > /dev/null 2>&1; then
589 dnl version=`scrollkeeper-config --version`; \
590 dnl vers=`echo $version | awk 'BEGIN { FS = "."; } { print $1 * 1000 + $2;}'`; \
591 dnl AC_MSG_RESULT(found $version)
592 dnl SCROLLKEEPER_VERSION_NUM=$vers
594 dnl AC_MSG_ERROR(Did not find scrollkeeper installed)
596 dnl AC_SUBST(SCROLLKEEPER_VERSION_NUM)
598 dnl ***************************************************************************
600 dnl ***************************************************************************
602 AC_PATH_PROG(PCRE_CONFIG, pcre-config,no)
603 if test x$PCRE_CONFIG = xno; then
604 AC_MSG_ERROR(Please install the PCRE package from http://www.pcre.org/)
606 PCRE_CFLAGS=`pcre-config --cflags`
607 PCRE_LIBS=`pcre-config --libs`
609 AC_SUBST(PCRE_CFLAGS)
611 dnl ***************************************************************************
612 dnl Tagmanager checks.
613 dnl ***************************************************************************
615 dnl Define convenience macros
616 dnl -------------------------
617 dnl CHECK_HEADER_DEFINE(LABEL, HEADER [,ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ] ])
618 AC_DEFUN([CHECK_HEADER_DEFINE],
620 AC_MSG_CHECKING("if $1 is defined in $2")
634 dnl Checks for header files.
635 AC_CHECK_HEADERS(dirent.h fcntl.h fnmatch.h stat.h stdlib.h string.h stdint.h)
636 AC_CHECK_HEADERS(time.h types.h unistd.h)
637 AC_CHECK_HEADERS(sys/dir.h sys/stat.h sys/times.h sys/types.h)
639 dnl Checks for typedefs, structures, and compiler characteristics.
641 dnl Disable cygwin check until someone fixes that stupid autoconf warnings.
652 AC_MSG_CHECKING("for fpos_t")
653 AC_EGREP_HEADER(fpos_t, stdio.h, AC_MSG_RESULT(yes),
656 AC_DEFINE(fpos_t, long, [fpos_t is type long])
659 AC_MSG_CHECKING("for clock_t")
660 AC_EGREP_HEADER(clock_t, time.h, AC_MSG_RESULT(yes),
663 AC_DEFINE(clock_t, long, [clock_t is type long])
666 CHECK_HEADER_DEFINE(L_tmpnam, stdio.h,, AC_DEFINE(L_tmpnam, 20, [L_tmpname is 20]))
668 CHECK_HEADER_DEFINE(INT_MAX, limits.h,,
669 CHECK_HEADER_DEFINE(MAXINT, limits.h,
670 AC_DEFINE(INT_MAX, MAXINT, [Maximum int size]), AC_DEFINE(INT_MAX, 32767, [Maximum int size])))
672 AC_MSG_CHECKING(if struct stat contains st_ino)
673 AC_TRY_COMPILE([#include <sys/stat.h>], [
678 ], have_st_ino=yes, have_st_ino=no)
679 AC_MSG_RESULT($have_st_ino)
680 if test yes = "$have_st_ino"; then
681 AC_DEFINE(HAVE_STAT_ST_INO,,[Have stat st_ino])
685 dnl Check for function forkpty in libutil
686 AC_CHECK_LIB(util, forkpty)
688 dnl Checks for library functions.
689 AC_CHECK_FUNCS(fnmatch)
690 AC_CHECK_FUNCS(strstr)
691 AC_CHECK_FUNCS(stricmp)
692 AC_CHECK_FUNCS(strnicmp)
693 AC_CHECK_FUNCS(getline)
695 AC_CHECK_FUNCS(fgetpos, have_fgetpos=yes)
697 dnl SEEK_SET should be in stdio.h, but may be in unistd.h on SunOS 4.1.x
698 if test "$have_fgetpos" != yes ; then
699 CHECK_HEADER_DEFINE(SEEK_SET, stdio.h,,
700 CHECK_HEADER_DEFINE(SEEK_SET, unistd.h,,
701 AC_DEFINE(SEEK_SET, 0, [Seek set 0])))
704 AC_CHECK_FUNCS(mkstemp, have_mkstemp=yes)
705 if test "$have_mkstemp" != yes ; then
706 AC_CHECK_FUNCS(chmod)
707 if test "$tmpdir_specified" = yes ; then
708 AC_MSG_RESULT(use of tmpnam overrides temporary directory selection)
711 AC_MSG_CHECKING(directory to use for temporary files)
712 if test -z "$enable_tmpdir" -o "$enable_tmpdir" = no -o "$enable_tmpdir" = yes ;
714 else tmpdir="$enable_tmpdir"
716 if test -d $tmpdir ; then
717 AC_MSG_RESULT($tmpdir)
718 AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [Directory for temporary files])
720 AC_MSG_WARN($tmpdir does not exist)
724 AC_CHECK_FUNCS(strerror opendir)
725 AC_CHECK_FUNCS(clock times, break)
726 AC_CHECK_FUNCS(remove, have_remove=yes,
727 CHECK_HEADER_DEFINE(remove, unistd.h,, AC_DEFINE(remove, unlink, [Remove is unlink])))
729 AC_CHECK_FUNCS(truncate, have_truncate=yes)
730 dnl === Cannot nest AC_CHECK_FUNCS() calls
731 if test "$have_truncate" != yes ; then
732 AC_CHECK_FUNCS(ftruncate, have_ftruncate=yes)
733 if test "$have_ftruncate" != yes ; then
734 AC_CHECK_FUNCS(chsize)
738 AC_CHECK_FUNCS(setenv, have_setenv=yes)
739 dnl === Cannot nest AC_CHECK_FUNCS() calls
740 if test "$have_setenv" != yes ; then
741 AC_CHECK_FUNCS(putenv, have_putenv=yes)
742 if test "$have_putenv" = yes ; then
743 AC_EGREP_HEADER(putenv, stdlib.h, have_putenv_prototype=yes)
744 if test "$have_putenv_prototype" = yes ; then
745 AC_MSG_CHECKING("putenv prototype")
746 AC_EGREP_HEADER([[^A-Za-zo-9_]putenv[ ]*\(.*const.*\)[ ]*;],
747 stdlib.h, AC_MSG_RESULT(correct),
749 AC_MSG_RESULT(no const)
750 AC_DEFINE(NON_CONST_PUTENV_PROTOTYPE,,[putenv has non constant prototype])
757 dnl if test yes = "$CYGWIN"; then with_posix_regex=no; fi
758 if test no != "$with_posix_regex"; then
759 AC_CHECK_FUNCS(regcomp)
760 AC_MSG_CHECKING(if regcomp works)
762 #include <sys/types.h>
766 exit (regcomp (&patbuf, "/hello/", 0) != 0);
767 }],regcomp_works=yes,regcomp_works=no,AC_DEFINE(CHECK_REGCOMP,,[Check regcomp]))
768 AC_MSG_RESULT($regcomp_works)
769 if test yes != "$regcomp_works"; then
770 AC_DEFINE(REGCOMP_BROKEN,,[Regcomp is broken])
774 dnl -----------------------------
775 dnl Checks for FreeBSD Build
776 dnl -----------------------------
777 AC_MSG_CHECKING(if building on FreeBSD)
779 if test `uname -s` = "FreeBSD" ; then
781 FREEBSD_BUILD=-DFREEBSD
782 AC_SUBST(FREEBSD_BUILD)
783 AC_PATH_PROG(GMAKE, gmake, no)
784 if test "x$GMAKE" = "xno"; then
785 AC_ERROR(You need gmake installed to build Anjuta!)
794 dnl Checks for missing prototypes
795 dnl -----------------------------
796 AC_CHECKING("for missing prototypes")
798 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))])
800 if test "$have_remove" = yes ; then
801 CHECK_PROTO(remove, stdio.h)
803 CHECK_PROTO(unlink, unistd.h)
805 CHECK_PROTO(malloc, stdlib.h)
806 CHECK_PROTO(getenv, stdlib.h)
807 CHECK_PROTO(stat, sys/stat.h)
808 CHECK_PROTO(lstat, sys/stat.h)
809 if test "$have_fgetpos" = yes ; then
810 CHECK_PROTO(fgetpos, stdio.h)
812 if test "$have_truncate" = yes ; then
813 CHECK_PROTO(truncate, unistd.h)
815 if test "$have_ftruncate" = yes ; then
816 CHECK_PROTO(ftruncate, unistd.h)
819 dnl **********************************************************
820 dnl check if we have svn libraries to build subversion plugin
821 dnl (stolen from kdevelop ;-)
822 dnl **********************************************************
824 AC_MSG_CHECKING(for Subversion svn-config)
825 AC_ARG_WITH(subversion-dir,
826 [ --with-subversion-dir=DIR where Subversion is installed ],
828 SVNCONFIG="$withval/bin/svn-config"
831 if test -z "$SVNCONFIG"; then
832 _SVNCONFIG="`svn-config --prefix 2> /dev/null`"
833 if test -n "$_SVNCONFIG"; then
834 SVNCONFIG="$_SVNCONFIG/bin/svn-config"
839 if test -x "$SVNCONFIG"; then
840 SVNLD="`$SVNCONFIG --ldflags 2> /dev/null`"
841 SVN_LIB="`$SVNCONFIG --libs --cflags 2> /dev/null` -lsvn_client-1 -lsvn_subr-1"
842 dnl ugly hack for subversion svn-config problems in 0.14.x, to be removed when svn-config is fixed
843 SVN_INCLUDE="`$SVNCONFIG --includes 2> /dev/null` -I$_SVNCONFIG/include/subversion-1/"
846 AC_MSG_RESULT(not found)
848 dnl just a fallback to debian's config so that it works for me :)
849 AC_ARG_WITH(svn-include,
850 [[ --with-svn-include=DIR Use the given path to the subversion headers.]],
852 if test "$withval" != "yes" -a "$withval" != ""; then
853 SVN_INCLUDES=$withval
856 if test -z "$SVN_INCLUDES"; then
857 SVN_INCLUDES="/usr/local/include /usr/include"
859 AC_MSG_CHECKING([for Subversion headers])
861 for VALUE in $SVN_INCLUDES ; do
862 if test -f $VALUE/subversion-1/svn_types.h ; then
863 SVN_INCLUDE=$VALUE/subversion-1
866 if test -f $VALUE/svn_types.h ; then
871 if test $SVN_INCLUDE ; then
872 AC_MSG_RESULT([found])
874 AC_MSG_RESULT([not found])
876 SVN_LIBS="/usr/local/lib /usr/lib"
878 [[ --with-svn-lib=DIR Use the given path to the subversion libraries.]],
880 if test "$withval" != "yes" -a "$withval" != ""; then
884 AC_MSG_CHECKING([for Subversion libraries])
886 for VALUE in $SVN_LIBS ; do
887 if ls $VALUE/libsvn_client-1.* 1>/dev/null 2>&1; then
892 if test $SVN_LIB ; then
893 AC_MSG_RESULT([found])
895 AC_MSG_RESULT([not found])
899 dnl ******************************************************************
900 dnl Check for extra libs required by subversion.
901 dnl FIXME: This should actually be done by subversion and not by us.
902 dnl ******************************************************************
904 AC_ARG_ENABLE(plugin-subversion,
905 [ --disable-plugin-subversion Disable subversion support in Anjuta.],
906 [ if test "$enableval" = "no"; then
907 user_disabled_subversion=1
909 [ user_disabled_subversion=0 ] )
911 AC_MSG_CHECKING(if subversion support is disabled)
912 if test "$user_disabled_subversion" = 1; then
920 if test -n "$SVN_INCLUDE" ; then
921 dnl ------------------------------------
922 dnl APR. Required by subversion (devel)
923 dnl ------------------------------------
925 APR_CONFIGS="apr-config /usr/local/apr/bin/apr-config/ apr-1-config "
926 AC_ARG_WITH(apr-config,
927 [[ --with-apr-config=FILE Use the given path to apr-config when determining
928 APR configuration; defaults to "apr-config"]],
930 if test "$withval" != "yes" -a "$withval" != ""; then
934 AC_MSG_CHECKING([for APR])
936 for VALUE in $APR_CONFIGS ; do
937 if $VALUE --cflags > /dev/null 2>&1 ; then
942 test $VALUE && APR_CONFIG=$VALUE
943 if test $APR_CONFIG ; then
944 AC_MSG_RESULT([found])
945 APR_CFLAGS="`$APR_CONFIG --cflags` `$APR_CONFIG --cppflags`"
946 APR_INCLUDE="`$APR_CONFIG --includes`"
947 APR_LIBS="`$APR_CONFIG --link-ld --libs`"
949 AC_MSG_RESULT([not found])
950 dnl AC_MSG_ERROR([APR is required. Try --with-apr-config.])
953 dnl -----------------------------------------
954 dnl APR util. Required by subversion (devel)
955 dnl------------------------------------------
957 APU_CONFIGS="apu-config /usr/local/apr/bin/apu-config apu-1-config"
958 AC_ARG_WITH(apu-config,
959 [[ --with-apu-config=FILE Use the given path to apu-config when determining
960 APR util configuration; defaults to "apu-config"]],
962 if test "$withval" != "yes" -a "$withval" != ""; then
966 AC_MSG_CHECKING([for APR util])
968 for VALUE in $APU_CONFIGS ; do
969 if $VALUE --includes > /dev/null 2>&1 ; then
974 if test $APU_CONFIG ; then
975 AC_MSG_RESULT([found])
976 APR_INCLUDE="$APR_INCLUDE `$APU_CONFIG --includes`"
977 APR_LIBS="$APR_LIBS `$APU_CONFIG --link-ld --libs`"
979 AC_MSG_RESULT([not found])
982 dnl -----------------------------------------
983 dnl NEON. Required by subversion (devel)
984 dnl------------------------------------------
986 dnl Check for neon. It is required by subversion libs, but for
987 dnl for some strange reason it's not in it's dependencies.
988 dnl subversion plugin will be disabled if neon (devel) is not
989 dnl installed, even if subversion (devel) is installed.
991 NEON_CONFIGS="neon-config"
992 AC_ARG_WITH(neon-config,
993 [[ --with-neon-config=FILE Use the given path to neon-config when determining
994 Neon configuration; defaults to "neon-config"]],
996 if test "$withval" != "yes" -a "$withval" != ""; then
997 NEON_CONFIGS=$withval
1000 AC_MSG_CHECKING([for Neon])
1002 for VALUE in $NEON_CONFIGS ; do
1003 if $VALUE --cflags > /dev/null 2>&1 ; then
1008 if test $NEON_CONFIG ; then
1009 AC_MSG_RESULT([found])
1011 AC_MSG_RESULT([not found])
1017 dnl ------------------------------------------
1018 dnl Finally prepare subversion build flags
1019 dnl ------------------------------------------
1021 if test -n "$SVN_INCLUDE" ; then
1022 SVN_INCLUDE="-I$SVN_INCLUDE $APR_INCLUDE"
1023 SVN_LIB="-L$SVN_LIB $APR_LIBS -lsvn_client-1 -lsvn_subr-1"
1024 SVN_CFLAGS="$APR_CFLAGS"
1027 AM_CONDITIONAL(BUILD_SVN, [test -n "$SVN_INCLUDE"])
1028 AC_SUBST(SVN_INCLUDE)
1030 AC_SUBST(SVN_CFLAGS)
1032 dnl --------- help outputs -----------
1033 dnl manuals/C/Makefile
1034 dnl manuals/C/anjuta-tutorial/Makefile
1035 dnl manuals/C/anjuta-advanced-tutorial/Makefile
1036 dnl manuals/C/anjuta-faqs/Makefile
1037 dnl manuals/C/anjuta-manual/Makefile
1038 dnl manuals/de/Makefile
1039 dnl manuals/de/anjuta-tutorial/Makefile
1040 dnl manuals/ja/Makefile
1041 dnl manuals/ja/anjuta-faqs/Makefile
1042 dnl manuals/ja/anjuta-manual/Makefile
1048 tagmanager/include/Makefile
1049 global-tags/Makefile
1051 libegg/util/Makefile
1052 libegg/treeviewutils/Makefile
1053 libegg/menu/Makefile
1054 libegg/recent-files/Makefile
1057 libanjuta/libanjuta-1.0.pc
1058 libanjuta/interfaces/Makefile
1063 data/properties/Makefile
1065 doc/anjuta_launcher.1
1068 scripts/anjuta_import.sh
1071 plugins/sample1/Makefile
1072 plugins/gtodo/Makefile
1073 plugins/class-gen/Makefile
1074 plugins/class-gen/templates/Makefile
1075 plugins/patch/Makefile
1076 plugins/editor/Makefile
1077 plugins/editor/scintilla/Makefile
1078 plugins/editor/scintilla/include/Makefile
1079 plugins/document-manager/Makefile
1080 plugins/search/Makefile
1081 plugins/message-view/Makefile
1082 plugins/gdb/Makefile
1083 plugins/gdb/images/Makefile
1084 plugins/debug-manager/Makefile
1085 plugins/debug-manager/images/Makefile
1086 plugins/devhelp/Makefile
1087 plugins/glade/Makefile
1088 plugins/file-manager/Makefile
1089 plugins/file-loader/Makefile
1090 plugins/file-wizard/Makefile
1091 plugins/terminal/Makefile
1092 plugins/build-basic-autotools/Makefile
1093 plugins/profiler/Makefile
1094 plugins/project-manager/Makefile
1095 plugins/symbol-browser/Makefile
1096 plugins/symbol-browser/images/Makefile
1097 plugins/cvs-plugin/Makefile
1098 plugins/project-wizard/Makefile
1099 plugins/macro/Makefile
1100 plugins/subversion/Makefile
1101 plugins/sourceview/Makefile
1102 plugins/tools/Makefile
1103 plugins/tools/scripts/Makefile
1104 plugins/class-inheritance/Makefile
1105 plugins/valgrind/Makefile
1106 plugins/project-import/Makefile
1107 plugins/project-wizard/templates/Makefile
1108 plugins/project-wizard/templates/mkfile/Makefile
1109 plugins/project-wizard/templates/mkfile/src/Makefile
1110 plugins/project-wizard/templates/mkfile/po/Makefile
1111 plugins/project-wizard/templates/minimal/Makefile
1112 plugins/project-wizard/templates/terminal/Makefile
1113 plugins/project-wizard/templates/terminal/src/Makefile
1114 plugins/project-wizard/templates/terminal/po/Makefile
1115 plugins/project-wizard/templates/cpp/Makefile
1116 plugins/project-wizard/templates/cpp/src/Makefile
1117 plugins/project-wizard/templates/cpp/po/Makefile
1118 plugins/project-wizard/templates/gtk/Makefile
1119 plugins/project-wizard/templates/gtk/src/Makefile
1120 plugins/project-wizard/templates/gtk/po/Makefile
1121 plugins/project-wizard/templates/anjuta-plugin/Makefile
1122 plugins/project-wizard/templates/anjuta-plugin/src/Makefile
1123 plugins/project-wizard/templates/anjuta-plugin/po/Makefile
1124 plugins/project-wizard/templates/gnome/Makefile
1125 plugins/project-wizard/templates/gnome/src/Makefile
1126 plugins/project-wizard/templates/gnome/po/Makefile
1127 plugins/project-wizard/templates/gtkmm/Makefile
1128 plugins/project-wizard/templates/gtkmm/src/Makefile
1129 plugins/project-wizard/templates/gtkmm/po/Makefile
1130 plugins/project-wizard/templates/gcj/Makefile
1131 plugins/project-wizard/templates/gcj/src/Makefile
1132 plugins/project-wizard/templates/java/Makefile
1133 plugins/project-wizard/templates/java/src/Makefile
1134 plugins/project-wizard/templates/java/po/Makefile
1135 plugins/project-wizard/templates/python/Makefile
1136 plugins/project-wizard/templates/python/src/Makefile
1137 plugins/project-wizard/templates/python/po/Makefile
1138 plugins/project-wizard/templates/wxwin/Makefile
1139 plugins/project-wizard/templates/wxwin/src/Makefile
1140 plugins/project-wizard/templates/wxwin/po/Makefile
1141 plugins/project-wizard/templates/xlib/Makefile
1142 plugins/project-wizard/templates/xlib/src/Makefile
1143 plugins/project-wizard/templates/xlib/po/Makefile
1144 plugins/project-wizard/templates/xlib-dock/Makefile
1145 plugins/project-wizard/templates/xlib-dock/src/Makefile
1146 plugins/project-wizard/templates/xlib-dock/po/Makefile
1147 plugins/project-wizard/templates/sdl/Makefile
1148 plugins/project-wizard/templates/sdl/src/Makefile
1149 plugins/project-wizard/templates/sdl/po/Makefile
1150 plugins/language-support-cpp-java/Makefile
1153 manuals/reference/Makefile
1154 manuals/reference/libanjuta/Makefile
1155 manuals/reference/libanjuta/version.xml
1156 manuals/anjuta-manual/Makefile
1157 manuals/anjuta-faqs/Makefile
1161 echo "-------------------------------------------------------------------"
1162 echo "Conditionally built plugins:"
1163 echo "-------------------------------------------------------------------"
1164 if [ test -n "$SVN_INCLUDE" ]; then
1165 echo "Building subversion plugin: ............................YES"
1167 echo "Building subversion plugin: ............................NO"
1168 echo " Requires apr (>= 0.9.4); http://subversion.org"
1169 echo " Requires apr-util (>= 0.9.4); http://subversion.org"
1170 echo " Requires neon (>= 0.24.5); http://subversion.org"
1171 echo " Requires subversion (>= 1.0.2); http://subversion.org"
1174 if [ test x$libgladeui_found = xyes ]; then
1175 echo "Building glade plugin: .................................YES"
1177 echo "Building glade plugin: .................................NO"
1178 echo " Requires glade-3 (>= 3.0.2)"
1181 if [ test x$devhelp_enabled = xyes ]; then
1182 echo "Building devhelp plugin: ...............................YES"
1184 echo "Building devhelp plugin: ...............................NO"
1185 echo " Requires devhelp"
1188 if [ test x$libgraphviz_found = xyes ]; then
1189 echo "Building class inheritance plugin: .....................YES"
1190 echo "Building performance profiler with function call chart: YES"
1192 echo "Building class inheritance plugin: .....................NO"
1193 echo " Requires graphviz (>= 2.6.0); http://graphviz.org"
1194 echo "Building performance profiler with function call chart: NO"
1195 echo " Requires graphviz (>= 2.6.0); http://graphviz.org"
1198 if [ test x$valgrind = xyes ]; then
1199 echo "Building Valgrind debugger plugin: .....................YES"
1201 echo "Building Valgrind debugger plugin: .....................NO"
1202 echo " Requires binutils-dev"
1205 if [ test x$sourceview = xyes ]; then
1206 echo "Building GtkSourceView based editor: ...................YES"
1208 echo "Building GtkSourceView based editor: ...................NO"
1211 if [ test x$scintilla = xyes ]; then
1212 echo "Building Scintilla based editor: .......................YES"
1214 echo "Building Scintilla based editor: .......................NO"
1216 echo "-------------------------------------------------------------------"