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, 2)
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_UI_REQUIRED=2.12.0
32 GNOME_PRINT_REQUIRED=2.12.0
33 GNOME_PRINT_UI_REQUIRED=2.12.0
34 GNOME_VFS_REQUIRED=2.10.0
37 VTE_NEW_REQUIRED=0.13.1
38 LIBXML_REQUIRED=2.4.23
41 LIBDEVHELP_REQUIRED=0.13
43 GNOMEBUILD_REQUIRED=0.1.4
44 GLADEUI_REQUIRED=3.0.2
45 GLADEUI_SVN_REQUIRED=3.1.4
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_UI_REQUIRED)
66 AC_SUBST(GNOME_PRINT_REQUIRED)
67 AC_SUBST(GNOME_PRINT_UI_REQUIRED)
68 AC_SUBST(GNOME_VFS_REQUIRED)
69 AC_SUBST(GCONF_REQUIRED)
70 AC_SUBST(VTE_REQUIRED)
71 AC_SUBST(LIBXML_REQUIRED)
72 AC_SUBST(PANGO_REQUIRED)
73 AC_SUBST(VTE_NEW_REQUIRED)
74 AC_SUBST(PCRE_REQUIRED)
75 AC_SUBST(LIBDEVHELP_REQUIRED)
76 AC_SUBST(GDL_REQUIRED)
77 AC_SUBST(GNOMEBUILD_REQUIRED)
78 AC_SUBST(GLADEUI_REQUIRED)
79 AC_SUBST(GLADEUI_SVN_REQUIRED)
80 AC_SUBST(LIBGRAPHVIZ_REQUIRED)
81 AC_SUBST(NEON_REQUIRED)
82 AC_SUBST(SUBVERSION_REQUIRED)
83 AC_SUBST(GTKSOURCEVIEW_REQUIRED)
84 AC_SUBST(GTKSOURCEVIEW_GNOME_REQUIRED)
85 AC_SUBST(GTKSOURCEVIEW_GTK_REQUIRED)
86 AC_SUBST(BINUTILS_REQUIRED)
87 AC_SUBST(LIBWNCK_REQUIRED)
89 dnl AC_SUBST(LIBGTODO_REQUIRED)
91 AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip])
92 AC_CONFIG_HEADERS(config.h)
97 CFLAGS_WARNINGS="-Wall -Wmissing-prototypes -Wmissing-declarations -Wparentheses -Wpointer-arith"
98 WCXXFLAGS_WARNINGS="-Wall -Wparentheses -Wpointer-arith"
100 if test "x$GCC" = x; then
105 AM_CFLAGS="$AM_CFLAGS $CFLAGS_WARNINGS"
106 AM_CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS_WARNINGS"
108 dnl Enable debugging mode
110 [ --enable-debug Enable debug messages],
111 AM_CFLAGS="$AM_CFLAGS -DDEBUG"
112 AM_CXXFLAGS="$AM_CXXFLAGS -DDEBUG")
114 AC_SUBST(AM_CXXFLAGS)
116 dnl Disable deprecated APIs
117 AC_ARG_ENABLE(deprecated,
118 [ --disable-deprecated Disable deprecated APIs],
119 [ if test "$enableval" = "no"; then
120 DEPRECATED_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED"
122 [ DEPRECATED_FLAGS="" ])
123 AC_SUBST(DEPRECATED_FLAGS)
125 dnl Enable versioned user preferences directory
126 AC_ARG_WITH(pref-suffix,
127 [ --with-pref-suffix=VALUE Suffix to add to user preferences dir.],
128 PREF_SUFFIX="$withval")
130 AC_SUBST(PREF_SUFFIX)
131 AC_DEFINE_UNQUOTED(PREF_SUFFIX,
133 [Suffix to add to preferences directory])
135 #Check for C Compiler
140 #Check for C++ Compiler
151 dnl ***************************************************************************
152 dnl Check for pkgconfig
153 dnl ***************************************************************************
154 AC_PATH_PROG(PKGCONFIG_CONFIG, pkg-config,no)
155 if test x$PKGCONFIG_CONFIG = xno; then
156 AC_MSG_ERROR(Please install the pkg-config package from http://www.freedesktop.org/software/pkgconfig/)
159 dnl pkg checks are split into separate packages instead of single package
160 dnl because different plugins have different requirements.
162 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
163 AC_SUBST(GLIB_CFLAGS)
166 PKG_CHECK_MODULES(GOBJECT, gobject-2.0 >= $GOBJECT_REQUIRED)
167 AC_SUBST(GOBJECT_CFLAGS)
168 AC_SUBST(GOBJECT_LIBS)
170 PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GMODULE_REQUIRED)
171 AC_SUBST(GMODULE_CFLAGS)
172 AC_SUBST(GMODULE_LIBS)
174 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GTHREAD_REQUIRED)
175 AC_SUBST(GTHREAD_CFLAGS)
176 AC_SUBST(GTHREAD_LIBS)
178 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
182 PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED)
183 AC_SUBST(GDK_PIXBUF_CFLAGS)
184 AC_SUBST(GDK_PIXBUF_LIBS)
186 PKG_CHECK_MODULES(ORBIT, ORBit-2.0 >= $ORBIT_REQUIRED)
187 AC_SUBST(ORBIT_CFLAGS)
190 PKG_CHECK_MODULES(GLADE, libglade-2.0 >= $LIBGLADE_REQUIRED)
191 AC_SUBST(GLADE_CFLAGS)
194 PKG_CHECK_MODULES(GNOME, libgnome-2.0 >= $GNOME_REQUIRED)
195 AC_SUBST(GNOME_CFLAGS)
198 PKG_CHECK_MODULES(GNOME_UI, libgnomeui-2.0 >= $GNOME_UI_REQUIRED)
199 AC_SUBST(GNOME_UI_CFLAGS)
200 AC_SUBST(GNOME_UI_LIBS)
202 PKG_CHECK_MODULES(GNOME_PRINT, libgnomeprint-2.2 >= $GNOME_PRINT_REQUIRED)
203 AC_SUBST(GNOME_PRINT_CFLAGS)
204 AC_SUBST(GNOME_PRINT_LIBS)
206 PKG_CHECK_MODULES(GNOME_PRINT_UI, libgnomeprintui-2.2 >= $GNOME_PRINT_UI_REQUIRED)
207 AC_SUBST(GNOME_PRINT_UI_CFLAGS)
208 AC_SUBST(GNOME_PRINT_UI_LIBS)
210 PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED)
211 AC_SUBST(GNOME_VFS_CFLAGS)
212 AC_SUBST(GNOME_VFS_LIBS)
214 PKG_CHECK_MODULES(GNOME_VFS_MODULE, gnome-vfs-module-2.0 >= $GNOME_VFS_REQUIRED)
215 AC_SUBST(GNOME_VFS_MODULE_CFLAGS)
216 AC_SUBST(GNOME_VFS_MODULE_LIBS)
218 PKG_CHECK_MODULES(GCONF, gconf-2.0 >= $GCONF_REQUIRED)
219 AC_SUBST(GCONF_CFLAGS)
222 dnl PKG_CHECK_MODULES(BONOBO, libbonobo-2.0 >= $BONOBO_REQUIRED)
223 dnl AC_SUBST(BONOBO_CFLAGS)
224 dnl AC_SUBST(BONOBO_LIBS)
226 dnl PKG_CHECK_MODULES(BONOBO_UI, libbonobo-2.0 >= $BONOBO_UI_REQUIRED)
227 dnl AC_SUBST(BONOBO_UI_CFLAGS)
228 dnl AC_SUBST(BONOBO_UI_LIBS)
230 PKG_CHECK_MODULES(VTE, vte >= $VTE_REQUIRED)
234 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED)
235 AC_SUBST(LIBXML_CFLAGS)
236 AC_SUBST(LIBXML_LIBS)
238 PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED)
239 AC_SUBST(PANGO_CFLAGS)
242 PKG_CHECK_MODULES(GDL, gdl-1.0 >= $GDL_REQUIRED gdl-gnome-1.0 >= $GDL_REQUIRED)
246 PKG_CHECK_MODULES(LIBXSLT, libxslt)
247 AC_SUBST(LIBXSLT_CFLAGS)
248 AC_SUBST(LIBXSLT_LIBS)
250 dnl Check for autogen
251 dnl -----------------
252 AC_PATH_PROG(AUTOGEN_PATH, autogen,no)
253 if test x$AUTOGEN_PATH = xno; then
254 AC_MSG_ERROR([Couldn't find autogen, please install the autogen package. You can get it from http://autogen.sourceforge.net/])
257 dnl Check for Devhelp
258 dnl -----------------
260 AC_ARG_ENABLE(plugin-devhelp,
261 [ --disable-plugin-devhelp Disable devhelp plugin support in Anjuta.],
262 [ if test "$enableval" = "no"; then
263 user_disabled_devhelp=1
265 [ user_disabled_devhelp=0 ] )
267 AC_MSG_CHECKING(if devhelp plugin is disabled)
268 if test "$user_disabled_devhelp" = 1; then
274 PKG_CHECK_MODULES(PLUGIN_DEVHELP,
275 [libdevhelp-1.0 >= $LIBDEVHELP_REQUIRED],
280 AC_MSG_RESULT([version >= 0.11 not found])
284 if test x$devhelp_old = xyes; then
285 PKG_CHECK_MODULES(PLUGIN_DEVHELP, [libdevhelp-1.0 >= 0.9], [devhelp_enabled=yes], [devhelp_enabled=no])
286 if test x$devhelp_enabled = xyes; then
287 AC_DEFINE(HAVE_OLD_DEVHELP, 1, [If old devhelp (>= 0.9 < 0.11) is installed])
290 AC_SUBST(PLUGIN_DEVHELP_CFLAGS)
291 AC_SUBST(PLUGIN_DEVHELP_LIBS)
294 if test x$devhelp_enabled = xyes; then
295 GECKO_HOME=`$PKGCONFIG_CONFIG --variable=gecko_home libdevhelp-1.0`
296 if test x$GECKO_HOME != x; then
297 ANJUTA_LDFLAGS="$ANJUTA_LDFLAGS -R$GECKO_HOME"
300 AC_SUBST(ANJUTA_LDFLAGS)
302 AM_CONDITIONAL(HAVE_PLUGIN_DEVHELP, [test x$devhelp_enabled = xyes])
305 dnl -----------------
306 dnl PKG_CHECK_MODULES(PLUGIN_GTODO, libgtodo-1.0 >= $LIBGTODO_REQUIRED)
307 dnl AC_SUBST(PLUGIN_GTODO_CFLAGS)
308 dnl AC_SUBST(PLUGIN_GTODO_LIBS)
310 dnl Check for Gnome Build
311 dnl ---------------------
313 PKG_CHECK_MODULES(PLUGIN_GNOMEBUILD, gnome-build-1.0 >= $GNOMEBUILD_REQUIRED)
314 AC_SUBST(PLUGIN_GNOMEBUILD_CFLAGS)
315 AC_SUBST(PLUGIN_GNOMEBUILD_LIBS)
318 dnl ---------------------
320 AC_ARG_ENABLE(plugin-glade,
321 [ --disable-plugin-glade Disable glade plugin support in Anjuta.],
322 [ if test "$enableval" = "no"; then
323 user_disabled_glade=1
325 [ user_disabled_glade=0 ] )
327 AC_MSG_CHECKING(if glade plugin is disabled)
328 if test "$user_disabled_glade" = 1; then
330 libgladeui_found="no"
333 PKG_CHECK_MODULES(PLUGIN_GLADE, [gladeui-1.0 >= $GLADEUI_SVN_REQUIRED],
335 libgladeui_found="yes"
337 libgladeui_found="no"
339 if test x$libgladeui_found = xno; then
340 PKG_CHECK_MODULES(PLUGIN_GLADE, [libgladeui-1.0 > $GLADEUI_REQUIRED],
342 libgladeui_found="old"
344 libgladeui_found="no"
347 if test x$libgladeui_found = xold; then
348 libgladeui_found="yes"
349 AC_DEFINE_UNQUOTED(GLADEUI_LAST_PUBLIC, [1], [Last public GLADEUI version])
350 AC_SUBST(GLADEUI_LAST_PUBLIC)
352 if test x$libgladeui_found = xno; then
353 PKG_CHECK_MODULES(PLUGIN_GLADE, [libgladeui-1.0 = $GLADEUI_REQUIRED],
355 libgladeui_found="old"
357 libgladeui_found="no"
360 if test x$libgladeui_found = xold; then
361 libgladeui_found="yes"
362 AC_DEFINE_UNQUOTED(GLADEUI_OLD, [1], [Older GLADEUI version])
363 AC_SUBST(GLADEUI_OLD)
365 AC_SUBST(PLUGIN_GLADE_CFLAGS)
366 AC_SUBST(PLUGIN_GLADE_LIBS)
369 AM_CONDITIONAL(HAVE_PLUGIN_GLADE, [test x$libgladeui_found = xyes])
371 dnl Check for graphviz (class inheritance and profiler plugins)
372 dnl --------------------------------------------------------------------------
373 dnl FIXME: For some strange reason graphviz-devel rpm install the *.pc files
374 dnl in /usr/lib/graphviz/pkgconfig, instead of usual /usr/lib/pkgconfig. This
375 dnl makes pkgconfig check fail if we don't add the above path in
376 dnl PKG_CONFIG_PATH. We have added both /usr/lib/graphviz/pkgconfig and
377 dnl /usr/local/lib/pkgconfig paths. If graphviz is installed in other prefix
378 dnl (other than /usr or /usr/local or the current installation prefix),
379 dnl following pkgconfig check will fail.
380 dnl --------------------------------------------------------------------------
381 AC_ARG_ENABLE(graphviz,
382 [ --disable-graphviz Disable GraphViz support in Anjuta],
383 [ if test "$enableval" = "no"; then
384 user_disabled_graphviz=1
386 [ user_disabled_graphviz=0 ])
388 AC_MSG_CHECKING(if GraphViz support is disabled)
389 if test "$user_disabled_graphviz" = 1; then
391 libgraphviz_found="no"
395 dnl Set pkgconfig path
396 ANJUTA_PKG_CONFIG_PATH_SAVE="${PKG_CONFIG_PATH}"
397 PKG_CONFIG_PATH="/usr/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
398 PKG_CONFIG_PATH="/usr/local/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
399 PKG_CONFIG_PATH="/usr/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
400 PKG_CONFIG_PATH="/usr/local/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
402 anjuta_save_prefix="$prefix"
403 test "x$prefix" = xNONE && prefix=$ac_default_prefix
404 graphviz_pkgconfig=`eval echo ${libdir}/graphviz/pkgconfig`
405 PKG_CONFIG_PATH="$graphviz_pkgconfig:$PKG_CONFIG_PATH"
406 prefix="$anjuta_save_prefix"
408 export PKG_CONFIG_PATH
409 PKG_CHECK_MODULES(GRAPHVIZ,
410 [libgvc >= $LIBGRAPHVIZ_REQUIRED],
411 [libgraphviz_found="yes"],
412 [libgraphviz_found="no"])
413 AC_SUBST(GRAPHVIZ_CFLAGS)
414 AC_SUBST(GRAPHVIZ_LIBS)
416 dnl Restore pkgconfig path
417 PKG_CONFIG_PATH="${ANJUTA_PKG_CONFIG_PATH_SAVE}"
418 export PKG_CONFIG_PATH
421 AM_CONDITIONAL(HAVE_GRAPHVIZ, [test x$libgraphviz_found = xyes])
423 dnl Define HAVE_GRAPHVIZ to disable Function Call Chart in the Profiler if
424 dnl Graphviz isn't on the system
425 if test "$libgraphviz_found" = yes; then
426 AC_DEFINE(HAVE_GRAPHVIZ, [], [Define if we have GraphViz >= 2.6.0])
429 dnl Build gtksourceview plugin only on gnome 2.14 and gtk 2.10
430 dnl -------------------------------------------------------------
432 AC_ARG_ENABLE(plugin-sourceview,
433 [ --disable-plugin-sourceview Disable gtksourceview based editor in Anjuta],
434 [ if test "$enableval" = "no"; then
435 user_disabled_sourceview=1
437 [ user_disabled_sourceview=0 ])
439 AC_MSG_CHECKING(if sourceview plugin is disabled)
440 if test "$user_disabled_sourceview" = 1; then
446 PKG_CHECK_MODULES(PLUGIN_SOURCEVIEW,
447 [libgnome-2.0 >= $GTKSOURCEVIEW_GNOME_REQUIRED,
448 gtk+-2.0 >= $GTKSOURCEVIEW_GTK_REQUIRED,
449 gtksourceview-1.0 >= $GTKSOURCEVIEW_REQUIRED],
452 AC_SUBST(PLUGIN_SOURCEVIEW_CFLAGS)
453 AC_SUBST(PLUGIN_SOURCEVIEW_LIBS)
456 AM_CONDITIONAL(HAVE_PLUGIN_SOURCEVIEW, [test x$sourceview = xyes])
459 dnl -------------------------------------------------------------
461 AC_ARG_ENABLE(plugin-scintilla,
462 [ --disable-plugin-scintilla Disable Scintilla based editor in Anjuta],
463 [ if test "$enableval" = "no"; then
464 user_disabled_scintilla=1
466 [ user_disabled_scintilla=0 ])
468 AC_MSG_CHECKING(if scintilla plugin is disabled)
469 if test "$user_disabled_scintilla" = 1; then
476 AM_CONDITIONAL(HAVE_PLUGIN_SCINTILLA, [test x$scintilla = xyes])
480 dnl -------------------------------------------------------------
482 AC_ARG_ENABLE(plugin-valgrind,
483 [ --disable-plugin-valgrind Disable Valgrind plugin],
484 [ if test "$enableval" = "no"; then
485 user_disabled_valgrind=1
487 [ user_disabled_valgrind=0 ])
489 AC_MSG_CHECKING(if valgrind plugin is disabled)
490 if test "$user_disabled_valgrind" = 1; then
498 AC_CHECK_LIB(bfd, bfd_get_error, [PLUGIN_VALGRIND_LIBS="-Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic"],
502 AC_SUBST(PLUGIN_VALGRIND_LIBS)
503 AM_CONDITIONAL(HAVE_PLUGIN_VALGRIND, [test x$valgrind = xyes])
508 dnl we need gconftool-2 in order to install the schema
509 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
511 if test "x$GCONFTOOL" = "xno"; then
512 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
520 dnl check for bfd_get_section_size_before_reloc() in libbfd
521 AC_MSG_CHECKING(for bfd_get_section_size_before_reloc)
527 bfd_get_section_size_before_reloc (section);
530 AC_DEFINE(HAVE_BFD_GET_SECTION_SIZE_BEFORE_RELOC, [], [Define if libbfd
531 contains the function bfd_get_section_size_before_reloc])
539 dnl Setup Anjuta Library flags
540 dnl --------------------------
541 LIBANJUTA_CFLAGS='$(GNOME_UI_CFLAGS) $(GLADE_CFLAGS) -I$(top_srcdir) -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)\"" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"'
542 LIBANJUTA_LIBS='$(top_builddir)/libanjuta/libanjuta.la'
543 AC_SUBST(LIBANJUTA_CFLAGS)
544 AC_SUBST(LIBANJUTA_LIBS)
546 dnl Setup Plugin directories
547 dnl ------------------------
548 anjuta_plugin_dir='$(libdir)/anjuta'
549 anjuta_data_dir='$(datadir)/anjuta'
550 anjuta_ui_dir='$(datadir)/anjuta/ui'
551 anjuta_glade_dir='$(datadir)/anjuta/glade'
552 anjuta_image_dir='$(datadir)/pixmaps/anjuta'
553 AC_SUBST(anjuta_plugin_dir)
554 AC_SUBST(anjuta_data_dir)
555 AC_SUBST(anjuta_ui_dir)
556 AC_SUBST(anjuta_glade_dir)
557 AC_SUBST(anjuta_image_dir)
559 dnl ***************************************************************************
560 dnl Check for old vte version
561 dnl ***************************************************************************
562 PKG_CHECK_MODULES(VTE, vte >= $VTE_NEW_REQUIRED, OLD_VTE=0, OLD_VTE=1)
564 AC_DEFINE_UNQUOTED(OLD_VTE, $OLD_VTE, [Old version of vte])
566 dnl ***************************************************************************
567 dnl Check for marshal and enum generators
568 dnl ***************************************************************************
569 GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
570 AC_SUBST(GLIB_GENMARSHAL)
571 GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
572 AC_SUBST(GLIB_MKENUMS)
574 dnl ***************************************************************************
575 dnl Internatinalization
576 dnl ***************************************************************************
577 GETTEXT_PACKAGE=anjuta
578 AC_SUBST(GETTEXT_PACKAGE)
579 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
581 IT_PROG_INTLTOOL([0.35.0])
583 dnl ***************************************************************************
584 dnl Check for gtk-doc.
585 dnl ***************************************************************************
588 dnl ***************************************************************************
589 dnl Check for Gnome XML [Is this still required?]
590 dnl ***************************************************************************
593 dnl ***************************************************************************
594 dnl Check for ScrollKeeper [No documentation for now]
595 dnl ***************************************************************************
596 dnl AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
597 dnl if test x$SCROLLKEEPER_CONFIG = xno; then
598 dnl AC_MSG_ERROR(Couldn't find scrollkeeper-config, please install the scrollkeeper package. You can get it from http://scrollkeeper.sourceforge.net/)
600 dnl SCROLLKEEPER_REQUIRED=0.1.4
601 dnl AC_SUBST(SCROLLKEEPER_REQUIRED)
603 dnl ***************************************************************************
604 dnl Checking for scrollkeeper version [No documentation for now]
605 dnl ***************************************************************************
606 dnl AC_MSG_CHECKING(for scrollkeeper version number)
607 dnl if scrollkeeper-config --version > /dev/null 2>&1; then
608 dnl version=`scrollkeeper-config --version`; \
609 dnl vers=`echo $version | awk 'BEGIN { FS = "."; } { print $1 * 1000 + $2;}'`; \
610 dnl AC_MSG_RESULT(found $version)
611 dnl SCROLLKEEPER_VERSION_NUM=$vers
613 dnl AC_MSG_ERROR(Did not find scrollkeeper installed)
615 dnl AC_SUBST(SCROLLKEEPER_VERSION_NUM)
617 dnl ***************************************************************************
619 dnl ***************************************************************************
621 AC_PATH_PROG(PCRE_CONFIG, pcre-config,no)
622 if test x$PCRE_CONFIG = xno; then
623 AC_MSG_ERROR(Please install the PCRE package from http://www.pcre.org/)
625 PCRE_CFLAGS=`pcre-config --cflags`
626 PCRE_LIBS=`pcre-config --libs`
628 AC_SUBST(PCRE_CFLAGS)
630 dnl ***************************************************************************
631 dnl Tagmanager checks.
632 dnl ***************************************************************************
634 dnl Define convenience macros
635 dnl -------------------------
636 dnl CHECK_HEADER_DEFINE(LABEL, HEADER [,ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ] ])
637 AC_DEFUN([CHECK_HEADER_DEFINE],
639 AC_MSG_CHECKING("if $1 is defined in $2")
653 dnl Checks for header files.
654 AC_CHECK_HEADERS(dirent.h fcntl.h fnmatch.h stat.h stdlib.h string.h stdint.h)
655 AC_CHECK_HEADERS(time.h types.h unistd.h)
656 AC_CHECK_HEADERS(sys/dir.h sys/stat.h sys/times.h sys/types.h)
658 dnl Checks for typedefs, structures, and compiler characteristics.
660 dnl Disable cygwin check until someone fixes that stupid autoconf warnings.
671 AC_MSG_CHECKING("for fpos_t")
672 AC_EGREP_HEADER(fpos_t, stdio.h, AC_MSG_RESULT(yes),
675 AC_DEFINE(fpos_t, long, [fpos_t is type long])
678 AC_MSG_CHECKING("for clock_t")
679 AC_EGREP_HEADER(clock_t, time.h, AC_MSG_RESULT(yes),
682 AC_DEFINE(clock_t, long, [clock_t is type long])
685 CHECK_HEADER_DEFINE(L_tmpnam, stdio.h,, AC_DEFINE(L_tmpnam, 20, [L_tmpname is 20]))
687 CHECK_HEADER_DEFINE(INT_MAX, limits.h,,
688 CHECK_HEADER_DEFINE(MAXINT, limits.h,
689 AC_DEFINE(INT_MAX, MAXINT, [Maximum int size]), AC_DEFINE(INT_MAX, 32767, [Maximum int size])))
691 AC_MSG_CHECKING(if struct stat contains st_ino)
692 AC_TRY_COMPILE([#include <sys/stat.h>], [
697 ], have_st_ino=yes, have_st_ino=no)
698 AC_MSG_RESULT($have_st_ino)
699 if test yes = "$have_st_ino"; then
700 AC_DEFINE(HAVE_STAT_ST_INO,,[Have stat st_ino])
704 dnl Checks for library functions.
705 AC_CHECK_FUNCS(fnmatch)
706 AC_CHECK_FUNCS(strstr)
707 AC_CHECK_FUNCS(stricmp)
708 AC_CHECK_FUNCS(strnicmp)
709 AC_CHECK_FUNCS(getline)
711 AC_CHECK_FUNCS(fgetpos, have_fgetpos=yes)
713 dnl SEEK_SET should be in stdio.h, but may be in unistd.h on SunOS 4.1.x
714 if test "$have_fgetpos" != yes ; then
715 CHECK_HEADER_DEFINE(SEEK_SET, stdio.h,,
716 CHECK_HEADER_DEFINE(SEEK_SET, unistd.h,,
717 AC_DEFINE(SEEK_SET, 0, [Seek set 0])))
720 AC_CHECK_FUNCS(mkstemp, have_mkstemp=yes)
721 if test "$have_mkstemp" != yes ; then
722 AC_CHECK_FUNCS(chmod)
723 if test "$tmpdir_specified" = yes ; then
724 AC_MSG_RESULT(use of tmpnam overrides temporary directory selection)
727 AC_MSG_CHECKING(directory to use for temporary files)
728 if test -z "$enable_tmpdir" -o "$enable_tmpdir" = no -o "$enable_tmpdir" = yes ;
730 else tmpdir="$enable_tmpdir"
732 if test -d $tmpdir ; then
733 AC_MSG_RESULT($tmpdir)
734 AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [Directory for temporary files])
736 AC_MSG_WARN($tmpdir does not exist)
740 AC_CHECK_FUNCS(strerror opendir)
741 AC_CHECK_FUNCS(clock times, break)
742 AC_CHECK_FUNCS(remove, have_remove=yes,
743 CHECK_HEADER_DEFINE(remove, unistd.h,, AC_DEFINE(remove, unlink, [Remove is unlink])))
745 AC_CHECK_FUNCS(truncate, have_truncate=yes)
746 dnl === Cannot nest AC_CHECK_FUNCS() calls
747 if test "$have_truncate" != yes ; then
748 AC_CHECK_FUNCS(ftruncate, have_ftruncate=yes)
749 if test "$have_ftruncate" != yes ; then
750 AC_CHECK_FUNCS(chsize)
754 AC_CHECK_FUNCS(setenv, have_setenv=yes)
755 dnl === Cannot nest AC_CHECK_FUNCS() calls
756 if test "$have_setenv" != yes ; then
757 AC_CHECK_FUNCS(putenv, have_putenv=yes)
758 if test "$have_putenv" = yes ; then
759 AC_EGREP_HEADER(putenv, stdlib.h, have_putenv_prototype=yes)
760 if test "$have_putenv_prototype" = yes ; then
761 AC_MSG_CHECKING("putenv prototype")
762 AC_EGREP_HEADER([[^A-Za-zo-9_]putenv[ ]*\(.*const.*\)[ ]*;],
763 stdlib.h, AC_MSG_RESULT(correct),
765 AC_MSG_RESULT(no const)
766 AC_DEFINE(NON_CONST_PUTENV_PROTOTYPE,,[putenv has non constant prototype])
773 dnl if test yes = "$CYGWIN"; then with_posix_regex=no; fi
774 if test no != "$with_posix_regex"; then
775 AC_CHECK_FUNCS(regcomp)
776 AC_MSG_CHECKING(if regcomp works)
778 #include <sys/types.h>
782 exit (regcomp (&patbuf, "/hello/", 0) != 0);
783 }],regcomp_works=yes,regcomp_works=no,AC_DEFINE(CHECK_REGCOMP,,[Check regcomp]))
784 AC_MSG_RESULT($regcomp_works)
785 if test yes != "$regcomp_works"; then
786 AC_DEFINE(REGCOMP_BROKEN,,[Regcomp is broken])
790 dnl -----------------------------
791 dnl Checks for FreeBSD Build
792 dnl -----------------------------
793 AC_MSG_CHECKING(if building on FreeBSD)
795 if test `uname -s` = "FreeBSD" ; then
797 FREEBSD_BUILD=-DFREEBSD
798 AC_SUBST(FREEBSD_BUILD)
799 AC_PATH_PROG(GMAKE, gmake, no)
800 if test "x$GMAKE" = "xno"; then
801 AC_ERROR(You need gmake installed to build Anjuta!)
810 dnl Checks for missing prototypes
811 dnl -----------------------------
812 AC_CHECKING("for missing prototypes")
814 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))])
816 if test "$have_remove" = yes ; then
817 CHECK_PROTO(remove, stdio.h)
819 CHECK_PROTO(unlink, unistd.h)
821 CHECK_PROTO(malloc, stdlib.h)
822 CHECK_PROTO(getenv, stdlib.h)
823 CHECK_PROTO(stat, sys/stat.h)
824 CHECK_PROTO(lstat, sys/stat.h)
825 if test "$have_fgetpos" = yes ; then
826 CHECK_PROTO(fgetpos, stdio.h)
828 if test "$have_truncate" = yes ; then
829 CHECK_PROTO(truncate, unistd.h)
831 if test "$have_ftruncate" = yes ; then
832 CHECK_PROTO(ftruncate, unistd.h)
835 dnl **********************************************************
836 dnl check if we have svn libraries to build subversion plugin
837 dnl (stolen from kdevelop ;-)
838 dnl **********************************************************
840 AC_MSG_CHECKING(for Subversion svn-config)
841 AC_ARG_WITH(subversion-dir,
842 [ --with-subversion-dir=DIR where Subversion is installed ],
844 SVNCONFIG="$withval/bin/svn-config"
847 if test -z "$SVNCONFIG"; then
848 _SVNCONFIG="`svn-config --prefix 2> /dev/null`"
849 if test -n "$_SVNCONFIG"; then
850 SVNCONFIG="$_SVNCONFIG/bin/svn-config"
855 if test -x "$SVNCONFIG"; then
856 SVNLD="`$SVNCONFIG --ldflags 2> /dev/null`"
857 SVN_LIB="`$SVNCONFIG --libs --cflags 2> /dev/null` -lsvn_client-1"
858 dnl ugly hack for subversion svn-config problems in 0.14.x, to be removed when svn-config is fixed
859 SVN_INCLUDE="`$SVNCONFIG --includes 2> /dev/null` -I$_SVNCONFIG/include/subversion-1/"
862 AC_MSG_RESULT(not found)
864 dnl just a fallback to debian's config so that it works for me :)
865 AC_ARG_WITH(svn-include,
866 [[ --with-svn-include=DIR Use the given path to the subversion headers.]],
868 if test "$withval" != "yes" -a "$withval" != ""; then
869 SVN_INCLUDES=$withval
872 if test -z "$SVN_INCLUDES"; then
873 SVN_INCLUDES="/usr/local/include /usr/include"
875 AC_MSG_CHECKING([for Subversion headers])
877 for VALUE in $SVN_INCLUDES ; do
878 if test -f $VALUE/subversion-1/svn_types.h ; then
883 if test $SVN_INCLUDE ; then
884 AC_MSG_RESULT([found])
886 AC_MSG_RESULT([not found])
888 SVN_LIBS="/usr/local/lib /usr/lib"
890 [[ --with-svn-lib=DIR Use the given path to the subversion libraries.]],
892 if test "$withval" != "yes" -a "$withval" != ""; then
896 AC_MSG_CHECKING([for Subversion libraries])
898 for VALUE in $SVN_LIBS ; do
899 if ls $VALUE/libsvn_client-1.* 1>/dev/null 2>&1; then
904 if test $SVN_LIB ; then
905 AC_MSG_RESULT([found])
907 AC_MSG_RESULT([not found])
911 dnl ******************************************************************
912 dnl Check for extra libs required by subversion.
913 dnl FIXME: This should actually be done by subversion and not by us.
914 dnl ******************************************************************
916 AC_ARG_ENABLE(plugin-subversion,
917 [ --disable-plugin-subversion Disable subversion support in Anjuta.],
918 [ if test "$enableval" = "no"; then
919 user_disabled_subversion=1
921 [ user_disabled_subversion=0 ] )
923 AC_MSG_CHECKING(if subversion support is disabled)
924 if test "$user_disabled_subversion" = 1; then
932 if test -n "$SVN_INCLUDE" ; then
933 dnl ------------------------------------
934 dnl APR. Required by subversion (devel)
935 dnl ------------------------------------
937 APR_CONFIGS="apr-config /usr/local/apr/bin/apr-config/ apr-1-config "
938 AC_ARG_WITH(apr-config,
939 [[ --with-apr-config=FILE Use the given path to apr-config when determining
940 APR configuration; defaults to "apr-config"]],
942 if test "$withval" != "yes" -a "$withval" != ""; then
946 AC_MSG_CHECKING([for APR])
948 for VALUE in $APR_CONFIGS ; do
949 if $VALUE --cflags > /dev/null 2>&1 ; then
954 test $VALUE && APR_CONFIG=$VALUE
955 if test $APR_CONFIG ; then
956 AC_MSG_RESULT([found])
957 APR_CFLAGS="`$APR_CONFIG --cflags` `$APR_CONFIG --cppflags`"
958 APR_INCLUDE="`$APR_CONFIG --includes`"
959 APR_LIBS="`$APR_CONFIG --link-ld --libs`"
961 AC_MSG_RESULT([not found])
962 dnl AC_MSG_ERROR([APR is required. Try --with-apr-config.])
965 dnl -----------------------------------------
966 dnl APR util. Required by subversion (devel)
967 dnl------------------------------------------
969 APU_CONFIGS="apu-config /usr/local/apr/bin/apu-config apu-1-config"
970 AC_ARG_WITH(apu-config,
971 [[ --with-apu-config=FILE Use the given path to apu-config when determining
972 APR util configuration; defaults to "apu-config"]],
974 if test "$withval" != "yes" -a "$withval" != ""; then
978 AC_MSG_CHECKING([for APR util])
980 for VALUE in $APU_CONFIGS ; do
981 if $VALUE --includes > /dev/null 2>&1 ; then
986 if test $APU_CONFIG ; then
987 AC_MSG_RESULT([found])
988 APR_INCLUDE="$APR_INCLUDE `$APU_CONFIG --includes`"
989 APR_LIBS="$APR_LIBS `$APU_CONFIG --link-ld --libs`"
991 AC_MSG_RESULT([not found])
994 dnl -----------------------------------------
995 dnl NEON. Required by subversion (devel)
996 dnl------------------------------------------
998 dnl Check for neon. It is required by subversion libs, but for
999 dnl for some strange reason it's not in it's dependencies.
1000 dnl subversion plugin will be disabled if neon (devel) is not
1001 dnl installed, even if subversion (devel) is installed.
1003 NEON_CONFIGS="neon-config"
1004 AC_ARG_WITH(neon-config,
1005 [[ --with-neon-config=FILE Use the given path to neon-config when determining
1006 Neon configuration; defaults to "neon-config"]],
1008 if test "$withval" != "yes" -a "$withval" != ""; then
1009 NEON_CONFIGS=$withval
1012 AC_MSG_CHECKING([for Neon])
1014 for VALUE in $NEON_CONFIGS ; do
1015 if $VALUE --cflags > /dev/null 2>&1 ; then
1020 if test $NEON_CONFIG ; then
1021 AC_MSG_RESULT([found])
1023 AC_MSG_RESULT([not found])
1029 dnl ------------------------------------------
1030 dnl Finally prepare subversion build flags
1031 dnl ------------------------------------------
1033 if test -n "$SVN_INCLUDE" ; then
1034 SVN_INCLUDE="-I$SVN_INCLUDE $APR_INCLUDE"
1035 SVN_LIB="-L$SVN_LIB $APR_LIBS -lsvn_client-1"
1036 SVN_CFLAGS="$APR_CFLAGS"
1039 AM_CONDITIONAL(BUILD_SVN, [test -n "$SVN_INCLUDE"])
1040 AC_SUBST(SVN_INCLUDE)
1042 AC_SUBST(SVN_CFLAGS)
1044 dnl --------- help outputs -----------
1045 dnl manuals/C/Makefile
1046 dnl manuals/C/anjuta-tutorial/Makefile
1047 dnl manuals/C/anjuta-advanced-tutorial/Makefile
1048 dnl manuals/C/anjuta-faqs/Makefile
1049 dnl manuals/C/anjuta-manual/Makefile
1050 dnl manuals/de/Makefile
1051 dnl manuals/de/anjuta-tutorial/Makefile
1052 dnl manuals/ja/Makefile
1053 dnl manuals/ja/anjuta-faqs/Makefile
1054 dnl manuals/ja/anjuta-manual/Makefile
1060 tagmanager/include/Makefile
1061 global-tags/Makefile
1063 libegg/util/Makefile
1064 libegg/treeviewutils/Makefile
1065 libegg/menu/Makefile
1066 libegg/recent-files/Makefile
1069 libanjuta/libanjuta-1.0.pc
1070 libanjuta/interfaces/Makefile
1075 data/properties/Makefile
1077 doc/anjuta_launcher.1
1080 scripts/anjuta_import.sh
1083 plugins/sample1/Makefile
1084 plugins/gtodo/Makefile
1085 plugins/class-gen/Makefile
1086 plugins/class-gen/templates/Makefile
1087 plugins/patch/Makefile
1088 plugins/editor/Makefile
1089 plugins/editor/scintilla/Makefile
1090 plugins/editor/scintilla/include/Makefile
1091 plugins/document-manager/Makefile
1092 plugins/search/Makefile
1093 plugins/message-view/Makefile
1094 plugins/gdb/Makefile
1095 plugins/gdb/images/Makefile
1096 plugins/debug-manager/Makefile
1097 plugins/debug-manager/images/Makefile
1098 plugins/devhelp/Makefile
1099 plugins/glade/Makefile
1100 plugins/file-manager/Makefile
1101 plugins/file-loader/Makefile
1102 plugins/file-wizard/Makefile
1103 plugins/terminal/Makefile
1104 plugins/build-basic-autotools/Makefile
1105 plugins/profiler/Makefile
1106 plugins/project-manager/Makefile
1107 plugins/symbol-browser/Makefile
1108 plugins/symbol-browser/images/Makefile
1109 plugins/cvs-plugin/Makefile
1110 plugins/project-wizard/Makefile
1111 plugins/macro/Makefile
1112 plugins/subversion/Makefile
1113 plugins/sourceview/Makefile
1114 plugins/tools/Makefile
1115 plugins/tools/scripts/Makefile
1116 plugins/class-inheritance/Makefile
1117 plugins/valgrind/Makefile
1118 plugins/project-import/Makefile
1119 plugins/project-wizard/templates/Makefile
1120 plugins/project-wizard/templates/terminal/Makefile
1121 plugins/project-wizard/templates/terminal/src/Makefile
1122 plugins/project-wizard/templates/terminal/po/Makefile
1123 plugins/project-wizard/templates/cpp/Makefile
1124 plugins/project-wizard/templates/cpp/src/Makefile
1125 plugins/project-wizard/templates/cpp/po/Makefile
1126 plugins/project-wizard/templates/gtk/Makefile
1127 plugins/project-wizard/templates/gtk/src/Makefile
1128 plugins/project-wizard/templates/gtk/po/Makefile
1129 plugins/project-wizard/templates/anjuta-plugin/Makefile
1130 plugins/project-wizard/templates/anjuta-plugin/src/Makefile
1131 plugins/project-wizard/templates/anjuta-plugin/po/Makefile
1132 plugins/project-wizard/templates/gnome/Makefile
1133 plugins/project-wizard/templates/gnome/src/Makefile
1134 plugins/project-wizard/templates/gnome/po/Makefile
1135 plugins/project-wizard/templates/gtkmm/Makefile
1136 plugins/project-wizard/templates/gtkmm/src/Makefile
1137 plugins/project-wizard/templates/gtkmm/po/Makefile
1138 plugins/project-wizard/templates/gcj/Makefile
1139 plugins/project-wizard/templates/gcj/src/Makefile
1140 plugins/project-wizard/templates/java/Makefile
1141 plugins/project-wizard/templates/java/src/Makefile
1142 plugins/project-wizard/templates/java/po/Makefile
1143 plugins/project-wizard/templates/python/Makefile
1144 plugins/project-wizard/templates/python/src/Makefile
1145 plugins/project-wizard/templates/python/po/Makefile
1146 plugins/project-wizard/templates/wxwin/Makefile
1147 plugins/project-wizard/templates/wxwin/src/Makefile
1148 plugins/project-wizard/templates/wxwin/po/Makefile
1149 plugins/project-wizard/templates/xlib/Makefile
1150 plugins/project-wizard/templates/xlib/src/Makefile
1151 plugins/project-wizard/templates/xlib/po/Makefile
1152 plugins/project-wizard/templates/xlib-dock/Makefile
1153 plugins/project-wizard/templates/xlib-dock/src/Makefile
1154 plugins/project-wizard/templates/xlib-dock/po/Makefile
1155 plugins/language-support-cpp-java/Makefile
1158 manuals/reference/Makefile
1159 manuals/reference/libanjuta/Makefile
1160 manuals/reference/libanjuta/version.xml
1161 manuals/anjuta-manual/Makefile
1162 manuals/anjuta-faqs/Makefile
1166 echo "-------------------------------------------------------------------"
1167 echo "Conditionally built plugins:"
1168 echo "-------------------------------------------------------------------"
1169 if [ test -n "$SVN_INCLUDE" ]; then
1170 echo "Building subversion plugin: ............................YES"
1172 echo "Building subversion plugin: ............................NO"
1173 echo " Requires apr (>= 0.9.4); http://subversion.org"
1174 echo " Requires apr-util (>= 0.9.4); http://subversion.org"
1175 echo " Requires neon (>= 0.24.5); http://subversion.org"
1176 echo " Requires subversion (>= 1.0.2); http://subversion.org"
1179 if [ test x$libgladeui_found = xyes ]; then
1180 echo "Building glade plugin: .................................YES"
1182 echo "Building glade plugin: .................................NO"
1183 echo " Requires glade-3 (>= 3.0.2)"
1186 if [ test x$devhelp_enabled = xyes ]; then
1187 echo "Building devhelp plugin: ...............................YES"
1189 echo "Building devhelp plugin: ...............................NO"
1190 echo " Requires devhelp"
1193 if [ test x$libgraphviz_found = xyes ]; then
1194 echo "Building class inheritance plugin: .....................YES"
1195 echo "Building performance profiler with function call chart: YES"
1197 echo "Building class inheritance plugin: .....................NO"
1198 echo " Requires graphviz (>= 2.6.0); http://graphviz.org"
1199 echo "Building performance profiler with function call chart: NO"
1200 echo " Requires graphviz (>= 2.6.0); http://graphviz.org"
1203 if [ test x$valgrind = xyes ]; then
1204 echo "Building Valgrind debugger plugin: .....................YES"
1206 echo "Building Valgrind debugger plugin: .....................NO"
1207 echo " Requires binutils-dev"
1210 if [ test x$sourceview = xyes ]; then
1211 echo "Building GtkSourceView based editor: ...................YES"
1213 echo "Building GtkSourceView based editor: ...................NO"
1216 if [ test x$scintilla = xyes ]; then
1217 echo "Building Scintilla based editor: .......................YES"
1219 echo "Building Scintilla based editor: .......................NO"
1221 echo "-------------------------------------------------------------------"