2 AC_INIT(src/Makefile.am)
10 GDK_PIXBUF_REQUIRED=2.0.0
13 LIBGLADE_REQUIRED=2.3.0
15 GNOME_UI_REQUIRED=2.12.0
16 GNOME_PRINT_REQUIRED=2.12.0
17 GNOME_PRINT_UI_REQUIRED=2.12.0
18 GNOME_VFS_REQUIRED=2.10.0
20 dnl BONOBO_REQUIRED=2.6.0
21 dnl BONOBO_UI_REQUIRED=2.6.0
23 VTE_NEW_REQUIRED=0.9.0
24 LIBXML_REQUIRED=2.4.23
27 LIBDEVHELP_REQUIRED=0.11
29 GNOMEBUILD_REQUIRED=0.1.3
30 LIBGLADEUI_REQUIRED=3.0.2
31 LIBGRAPHVIZ_REQUIRED=1.0
33 SUBVERSION_REQUIRED=1.0.2
34 GTKSOURCEVIEW_REQUIRED=1.4.0
35 GTKSOURCEVIEW_GNOME_REQUIRED=2.14
36 BINUTILS_REQUIRED=2.15.92
39 dnl LIBGTODO_REQUIRED=0.15
41 AC_SUBST(GLIB_REQUIRED)
42 AC_SUBST(GOBJECT_REQUIRED)
43 AC_SUBST(GMODULE_REQUIRED)
44 AC_SUBST(GDK_PIXBUF_REQUIRED)
45 AC_SUBST(GTK_REQUIRED)
46 AC_SUBST(ORBIT_REQUIRED)
47 AC_SUBST(LIBGLADE_REQUIRED)
48 AC_SUBST(GNOME_REQUIRED)
49 AC_SUBST(GNOME_UI_REQUIRED)
50 AC_SUBST(GNOME_PRINT_REQUIRED)
51 AC_SUBST(GNOME_PRINT_UI_REQUIRED)
52 AC_SUBST(GNOME_VFS_REQUIRED)
53 AC_SUBST(GCONF_REQUIRED)
54 dnl AC_SUBST(BONOBO_REQUIRED)
55 dnl AC_SUBST(BONOBO_UI_REQUIRED)
56 AC_SUBST(VTE_REQUIRED)
57 AC_SUBST(LIBXML_REQUIRED)
58 AC_SUBST(PANGO_REQUIRED)
59 AC_SUBST(VTE_NEW_REQUIRED)
60 AC_SUBST(PCRE_REQUIRED)
61 AC_SUBST(LIBDEVHELP_REQUIRED)
62 AC_SUBST(GDL_REQUIRED)
63 AC_SUBST(GNOMEBUILD_REQUIRED)
64 AC_SUBST(LIBGLADEUI_REQUIRED)
65 AC_SUBST(LIBGRAPHVIZ_REQUIRED)
66 AC_SUBST(NEON_REQUIRED)
67 AC_SUBST(SUBVERSION_REQUIRED)
68 AC_SUBST(GTKSOURCEVIEW_REQUIRED)
69 AC_SUBST(GTKSOURCEVIEW_GNOME_REQUIRED)
70 AC_SUBST(BINUTILS_REQUIRED)
71 AC_SUBST(LIBWNCK_REQUIRED)
73 dnl AC_SUBST(LIBGTODO_REQUIRED)
75 AM_INIT_AUTOMAKE(anjuta, $ANJUTA_VERSION)
76 AM_CONFIG_HEADER(config.h)
79 CFLAGS_WARNINGS="-Wall -Wmissing-prototypes -Wmissing-declarations -Wparentheses -Wpointer-arith"
80 WCXXFLAGS_WARNINGS="-Wall -Wparentheses -Wpointer-arith"
82 if test "x$GCC" = xyes; then
87 AM_CFLAGS="$AM_CFLAGS -O0 -g $CFLAGS_WARNINGS"
88 AM_CXXFLAGS="$AM_CXXFLAGS -O0 -g $CXXFLAGS_WARNINGS"
90 dnl Enable debugging mode
92 [ --enable-debug Enable debug messages],
93 AM_CFLAGS="$AM_CFLAGS -DDEBUG"
94 AM_CXXFLAGS="$AM_CXXFLAGS -DDEBUG")
98 dnl Disable deprecated APIs
99 AC_ARG_ENABLE(deprecated,
100 [ --disable-deprecated Disable deprecated APIs],
101 [ if test "$enableval" = "no"; then
102 DEPRECATED_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED"
104 [ DEPRECATED_FLAGS="" ])
105 AC_SUBST(DEPRECATED_FLAGS)
107 dnl Enable versioned user preferences directory
108 AC_ARG_WITH(pref-suffix,
109 [ --with-pref-suffix=VALUE Suffix to add to user preferences dir.],
110 PREF_SUFFIX="$withval")
112 AC_SUBST(PREF_SUFFIX)
113 AC_DEFINE_UNQUOTED(PREF_SUFFIX,
115 [Suffix to add to preferences directory])
117 dnl Initialize xml-i18n-tools
120 #Check for C Compiler
125 #Check for C++ Compiler
136 dnl ***************************************************************************
137 dnl Check for pkgconfig
138 dnl ***************************************************************************
139 AC_PATH_PROG(PKGCONFIG_CONFIG, pkg-config,no)
140 if test x$PKGCONFIG_CONFIG = xno; then
141 AC_MSG_ERROR(Please install the pkg-config package from http://www.freedesktop.org/software/pkgconfig/)
144 dnl pkg checks are split into separate packages instead of single package
145 dnl because different plugins have different requirements.
147 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
148 AC_SUBST(GLIB_CFLAGS)
151 PKG_CHECK_MODULES(GOBJECT, gobject-2.0 >= $GOBJECT_REQUIRED)
152 AC_SUBST(GOBJECT_CFLAGS)
153 AC_SUBST(GOBJECT_LIBS)
155 PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GMODULE_REQUIRED)
156 AC_SUBST(GMODULE_CFLAGS)
157 AC_SUBST(GMODULE_LIBS)
159 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GTHREAD_REQUIRED)
160 AC_SUBST(GTHREAD_CFLAGS)
161 AC_SUBST(GTHREAD_LIBS)
163 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
167 PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED)
168 AC_SUBST(GDK_PIXBUF_CFLAGS)
169 AC_SUBST(GDK_PIXBUF_LIBS)
171 PKG_CHECK_MODULES(ORBIT, ORBit-2.0 >= $ORBIT_REQUIRED)
172 AC_SUBST(ORBIT_CFLAGS)
175 PKG_CHECK_MODULES(GLADE, libglade-2.0 >= $LIBGLADE_REQUIRED)
176 AC_SUBST(GLADE_CFLAGS)
179 PKG_CHECK_MODULES(GNOME, libgnome-2.0 >= $GNOME_REQUIRED)
180 AC_SUBST(GNOME_CFLAGS)
183 PKG_CHECK_MODULES(GNOME_UI, libgnomeui-2.0 >= $GNOME_UI_REQUIRED)
184 AC_SUBST(GNOME_UI_CFLAGS)
185 AC_SUBST(GNOME_UI_LIBS)
187 PKG_CHECK_MODULES(GNOME_PRINT, libgnomeprint-2.2 >= $GNOME_PRINT_REQUIRED)
188 AC_SUBST(GNOME_PRINT_CFLAGS)
189 AC_SUBST(GNOME_PRINT_LIBS)
191 PKG_CHECK_MODULES(GNOME_PRINT_UI, libgnomeprintui-2.2 >= $GNOME_PRINT_UI_REQUIRED)
192 AC_SUBST(GNOME_PRINT_UI_CFLAGS)
193 AC_SUBST(GNOME_PRINT_UI_LIBS)
195 PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED)
196 AC_SUBST(GNOME_VFS_CFLAGS)
197 AC_SUBST(GNOME_VFS_LIBS)
199 PKG_CHECK_MODULES(GNOME_VFS_MODULE, gnome-vfs-module-2.0 >= $GNOME_VFS_REQUIRED)
200 AC_SUBST(GNOME_VFS_MODULE_CFLAGS)
201 AC_SUBST(GNOME_VFS_MODULE_LIBS)
203 PKG_CHECK_MODULES(GCONF, gconf-2.0 >= $GCONF_REQUIRED)
204 AC_SUBST(GCONF_CFLAGS)
207 dnl PKG_CHECK_MODULES(BONOBO, libbonobo-2.0 >= $BONOBO_REQUIRED)
208 dnl AC_SUBST(BONOBO_CFLAGS)
209 dnl AC_SUBST(BONOBO_LIBS)
211 dnl PKG_CHECK_MODULES(BONOBO_UI, libbonobo-2.0 >= $BONOBO_UI_REQUIRED)
212 dnl AC_SUBST(BONOBO_UI_CFLAGS)
213 dnl AC_SUBST(BONOBO_UI_LIBS)
215 PKG_CHECK_MODULES(VTE, vte >= $VTE_REQUIRED)
219 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED)
220 AC_SUBST(LIBXML_CFLAGS)
221 AC_SUBST(LIBXML_LIBS)
223 PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED)
224 AC_SUBST(PANGO_CFLAGS)
227 PKG_CHECK_MODULES(GDL, gdl-1.0 >= $GDL_REQUIRED gdl-gnome-1.0 >= $GDL_REQUIRED)
231 PKG_CHECK_MODULES(LIBXSLT, libxslt)
232 AC_SUBST(LIBXSLT_CFLAGS)
233 AC_SUBST(LIBXSLT_LIBS)
235 dnl Check for autogen
236 dnl -----------------
237 AC_PATH_PROG(AUTOGEN_PATH, autogen,no)
238 if test x$AUTOGEN_PATH = xno; then
239 AC_MSG_ERROR([Couldn't find autogen, please install the autogen package. You can get it from http://autogen.sourceforge.net/])
242 dnl Check for Devhelp
243 dnl -----------------
245 AC_ARG_ENABLE(plugin-devhelp,
246 [ --enable-plugin-devhelp Enable devhelp plugin support in Anjuta.],
247 [ if test "$enableval" = "yes"; then
248 user_disabled_devhelp=0
250 [ user_disabled_devhelp=1 ] )
252 AC_MSG_CHECKING(if devhelp plugin is disabled)
253 if test "$user_disabled_devhelp" = 1; then
259 PKG_CHECK_MODULES(PLUGIN_DEVHELP,
260 [libdevhelp-1.0 >= $LIBDEVHELP_REQUIRED],
265 AC_MSG_RESULT([version >= 0.11 not found])
269 if test x$devhelp_old = xyes; then
270 PKG_CHECK_MODULES(PLUGIN_DEVHELP, [libdevhelp-1.0 >= 0.9], [devhelp_enabled=yes], [devhelp_enabled=no])
271 if test x$devhelp_enabled = xyes; then
272 AC_DEFINE(HAVE_OLD_DEVHELP, 1, [If old devhelp (>= 0.9 < 0.11) is installed])
275 AC_SUBST(PLUGIN_DEVHELP_CFLAGS)
276 AC_SUBST(PLUGIN_DEVHELP_LIBS)
279 AM_CONDITIONAL(HAVE_PLUGIN_DEVHELP, [test x$devhelp_enabled = xyes])
282 dnl -----------------
283 dnl PKG_CHECK_MODULES(PLUGIN_GTODO, libgtodo-1.0 >= $LIBGTODO_REQUIRED)
284 dnl AC_SUBST(PLUGIN_GTODO_CFLAGS)
285 dnl AC_SUBST(PLUGIN_GTODO_LIBS)
287 dnl Check for Gnome Build
288 dnl ---------------------
290 PKG_CHECK_MODULES(PLUGIN_GNOMEBUILD, gnome-build-1.0 >= $GNOMEBUILD_REQUIRED)
291 AC_SUBST(PLUGIN_GNOMEBUILD_CFLAGS)
292 AC_SUBST(PLUGIN_GNOMEBUILD_LIBS)
295 dnl ---------------------
297 AC_ARG_ENABLE(plugin-glade,
298 [ --disable-plugin-glade Disable glade plugin support in Anjuta.],
299 [ if test "$enableval" = "no"; then
300 user_disabled_glade=1
302 [ user_disabled_glade=0 ] )
304 AC_MSG_CHECKING(if glade plugin is disabled)
305 if test "$user_disabled_glade" = 1; then
307 libgladeui_found="no"
310 PKG_CHECK_MODULES(PLUGIN_GLADE, [libgladeui-1.0 >= $LIBGLADEUI_REQUIRED], [libgladeui_found="yes"], [libgladeui_found="no"])
311 AC_SUBST(PLUGIN_GLADE_CFLAGS)
312 AC_SUBST(PLUGIN_GLADE_LIBS)
315 AM_CONDITIONAL(HAVE_PLUGIN_GLADE, [test x$libgladeui_found = xyes])
317 dnl Check for graphviz (class inheritance plugin)
318 dnl --------------------------------------------------------------------------
319 dnl FIXME: For some strange reason graphviz-devel rpm install the *.pc files
320 dnl in /usr/lib/graphviz/pkgconfig, instead of usual /usr/lib/pkgconfig. This
321 dnl makes pkgconfig check fail if we don't add the above path in
322 dnl PKG_CONFIG_PATH. We have added both /usr/lib/graphviz/pkgconfig and
323 dnl /usr/local/lib/pkgconfig paths. If graphviz is installed in other prefix
324 dnl (other than /usr or /usr/local or the current installation prefix),
325 dnl following pkgconfig check will fail.
326 dnl --------------------------------------------------------------------------
327 AC_ARG_ENABLE(plugin-class-inheritance,
328 [ --disable-plugin-class-inheritance Disable class inheritance graphing plugin support in Anjuta],
329 [ if test "$enableval" = "no"; then
330 user_disabled_inheritance=1
332 [ user_disabled_inheritance=0 ])
334 AC_MSG_CHECKING(if class inheritance plugin is disabled)
335 if test "$user_disabled_inheritance" = 1; then
337 libgraphviz_found="no"
341 dnl Set pkgconfig path
342 ANJUTA_PKG_CONFIG_PATH_SAVE="${PKG_CONFIG_PATH}"
343 PKG_CONFIG_PATH="/usr/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
344 PKG_CONFIG_PATH="/usr/local/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
345 PKG_CONFIG_PATH="/usr/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
346 PKG_CONFIG_PATH="/usr/local/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
348 anjuta_save_prefix="$prefix"
349 test "x$prefix" = xNONE && prefix=$ac_default_prefix
350 graphviz_pkgconfig=`eval echo ${libdir}/graphviz/pkgconfig`
351 PKG_CONFIG_PATH="$graphviz_pkgconfig:$PKG_CONFIG_PATH"
352 prefix="$anjuta_save_prefix"
354 export PKG_CONFIG_PATH
355 PKG_CHECK_MODULES(PLUGIN_CLASS_INHERITANCE,
356 [libgvc >= $LIBGRAPHVIZ_REQUIRED],
357 [libgraphviz_found="yes"],
358 [libgraphviz_found="no"])
359 AC_SUBST(PLUGIN_CLASS_INHERITANCE_CFLAGS)
360 AC_SUBST(PLUGIN_CLASS_INHERITANCE_LIBS)
362 dnl Restore pkgconfig path
363 PKG_CONFIG_PATH="${ANJUTA_PKG_CONFIG_PATH_SAVE}"
364 export PKG_CONFIG_PATH
367 AM_CONDITIONAL(HAVE_PLUGIN_CLASS_INHERITANCE, [test x$libgraphviz_found = xyes])
369 dnl Build gtksourceview plugin only on gnome 2.14
370 dnl -------------------------------------------------------------
372 AC_ARG_ENABLE(plugin-sourceview,
373 [ --disable-plugin-sourceview Disable gtksourceview based editor in Anjuta],
374 [ if test "$enableval" = "no"; then
375 user_disabled_sourceview=1
377 [ user_disabled_sourceview=0 ])
379 AC_MSG_CHECKING(if sourceview plugin is disabled)
380 if test "$user_disabled_sourceview" = 1; then
386 PKG_CHECK_MODULES(PLUGIN_SOURCEVIEW,
387 [libgnome-2.0 >= $GTKSOURCEVIEW_GNOME_REQUIRED,
388 gtksourceview-1.0 >= $GTKSOURCEVIEW_REQUIRED],
391 AC_SUBST(PLUGIN_SOURCEVIEW_CFLAGS)
392 AC_SUBST(PLUGIN_SOURCEVIEW_LIBS)
395 AM_CONDITIONAL(HAVE_PLUGIN_SOURCEVIEW, [test x$sourceview = xyes])
398 dnl -------------------------------------------------------------
400 AC_ARG_ENABLE(plugin-scintilla,
401 [ --disable-plugin-scintilla Disable Scintilla based editor in Anjuta],
402 [ if test "$enableval" = "no"; then
403 user_disabled_scintilla=1
405 [ user_disabled_scintilla=0 ])
407 AC_MSG_CHECKING(if scintilla plugin is disabled)
408 if test "$user_disabled_scintilla" = 1; then
415 AM_CONDITIONAL(HAVE_PLUGIN_SCINTILLA, [test x$scintilla = xyes])
419 dnl -------------------------------------------------------------
421 AC_ARG_ENABLE(plugin-valgrind,
422 [ --disable-plugin-valgrind Disable Valgrind plugin],
423 [ if test "$enableval" = "no"; then
424 user_disabled_valgrind=1
426 [ user_disabled_valgrind=0 ])
428 AC_MSG_CHECKING(if valgrind plugin is disabled)
429 if test "$user_disabled_valgrind" = 1; then
437 AC_CHECK_LIB(bfd, bfd_get_error, [PLUGIN_VALGRIND_LIBS="-Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic"],
441 AC_SUBST(PLUGIN_VALGRIND_LIBS)
442 AM_CONDITIONAL(HAVE_PLUGIN_VALGRIND, [test x$valgrind = xyes])
447 dnl we need gconftool-2 in order to install the schema
448 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
450 if test "x$GCONFTOOL" = "xno"; then
451 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
459 dnl check for bfd_get_section_size_before_reloc() in libbfd
460 AC_MSG_CHECKING(for bfd_get_section_size_before_reloc)
466 bfd_get_section_size_before_reloc (section);
469 AC_DEFINE(HAVE_BFD_GET_SECTION_SIZE_BEFORE_RELOC, [], [Define if libbfd
470 contains the function bfd_get_section_size_before_reloc])
478 dnl Setup Anjuta Library flags
479 dnl --------------------------
480 LIBANJUTA_CFLAGS='$(GNOME_UI_CFLAGS) $(GLADE_CFLAGS) -I$(top_srcdir) -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)\"" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"'
481 LIBANJUTA_LIBS='$(top_builddir)/libanjuta/libanjuta.la'
482 AC_SUBST(LIBANJUTA_CFLAGS)
483 AC_SUBST(LIBANJUTA_LIBS)
485 dnl Setup Plugin directories
486 dnl ------------------------
487 anjuta_plugin_dir='$(libdir)/anjuta'
488 anjuta_data_dir='$(datadir)/anjuta'
489 anjuta_ui_dir='$(datadir)/anjuta/ui'
490 anjuta_glade_dir='$(datadir)/anjuta/glade'
491 anjuta_image_dir='$(datadir)/pixmaps/anjuta'
492 AC_SUBST(anjuta_plugin_dir)
493 AC_SUBST(anjuta_data_dir)
494 AC_SUBST(anjuta_ui_dir)
495 AC_SUBST(anjuta_glade_dir)
496 AC_SUBST(anjuta_image_dir)
498 dnl ***************************************************************************
499 dnl Check for old vte version
500 dnl ***************************************************************************
501 PKG_CHECK_MODULES(VTE, vte >= $VTE_NEW_REQUIRED, OLD_VTE=0, OLD_VTE=1)
503 AC_DEFINE_UNQUOTED(OLD_VTE, $OLD_VTE, [Old version of vte])
505 dnl ***************************************************************************
506 dnl Check for marshal and enum generators
507 dnl ***************************************************************************
508 GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
509 AC_SUBST(GLIB_GENMARSHAL)
510 GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
511 AC_SUBST(GLIB_MKENUMS)
513 dnl ***************************************************************************
514 dnl Internatinalization
515 dnl ***************************************************************************
516 ALL_LINGUAS="az be bg ca cs da de el en_CA en_GB es fi fr ga gl hi hr hu it ja ko mk ml ms nb ne nl pl pa pt pt_BR ru rw sk sq sr sr@Latn sv tr uk zh_CN zh_TW"
517 GETTEXT_PACKAGE=anjuta
518 AC_SUBST(GETTEXT_PACKAGE)
519 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
523 dnl GTK_DOC_CHECK([1.0])
525 dnl ***************************************************************************
526 dnl Check for gtk-doc.
527 dnl ***************************************************************************
528 AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
529 if test "x$with_html_dir" = "x" ; then
530 HTML_DIR='${datadir}/gtk-doc/html'
532 HTML_DIR=$with_html_dir
536 gtk_doc_min_version=1.0
537 AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
538 if pkg-config --atleast-version=$gtk_doc_min_version gtk-doc; then
545 dnl Let people disable the gtk-doc stuff.
546 AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
547 if test x$enable_gtk_doc = xauto ; then
548 if test x$GTKDOC = xtrue ; then
554 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
556 dnl ***************************************************************************
557 dnl Check for Gnome XML [Is this still required?]
558 dnl ***************************************************************************
561 dnl ***************************************************************************
562 dnl Check for ScrollKeeper [No documentation for now]
563 dnl ***************************************************************************
564 dnl AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
565 dnl if test x$SCROLLKEEPER_CONFIG = xno; then
566 dnl AC_MSG_ERROR(Couldn't find scrollkeeper-config, please install the scrollkeeper package. You can get it from http://scrollkeeper.sourceforge.net/)
568 dnl SCROLLKEEPER_REQUIRED=0.1.4
569 dnl AC_SUBST(SCROLLKEEPER_REQUIRED)
571 dnl ***************************************************************************
572 dnl Checking for scrollkeeper version [No documentation for now]
573 dnl ***************************************************************************
574 dnl AC_MSG_CHECKING(for scrollkeeper version number)
575 dnl if scrollkeeper-config --version > /dev/null 2>&1; then
576 dnl version=`scrollkeeper-config --version`; \
577 dnl vers=`echo $version | awk 'BEGIN { FS = "."; } { print $1 * 1000 + $2;}'`; \
578 dnl AC_MSG_RESULT(found $version)
579 dnl SCROLLKEEPER_VERSION_NUM=$vers
581 dnl AC_MSG_ERROR(Did not find scrollkeeper installed)
583 dnl AC_SUBST(SCROLLKEEPER_VERSION_NUM)
585 dnl ***************************************************************************
587 dnl ***************************************************************************
589 AC_PATH_PROG(PCRE_CONFIG, pcre-config,no)
590 if test x$PCRE_CONFIG = xno; then
591 AC_MSG_ERROR(Please install the PCRE package from http://www.pcre.org/)
593 PCRE_CFLAGS=`pcre-config --cflags`
594 PCRE_LIBS=`pcre-config --libs`
596 AC_SUBST(PCRE_CFLAGS)
598 dnl ***************************************************************************
599 dnl Tagmanager checks.
600 dnl ***************************************************************************
602 dnl Define convenience macros
603 dnl -------------------------
604 dnl CHECK_HEADER_DEFINE(LABEL, HEADER [,ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ] ])
605 AC_DEFUN([CHECK_HEADER_DEFINE],
607 AC_MSG_CHECKING("if $1 is defined in $2")
621 dnl Checks for header files.
622 AC_CHECK_HEADERS(dirent.h fcntl.h fnmatch.h stat.h stdlib.h string.h stdint.h)
623 AC_CHECK_HEADERS(time.h types.h unistd.h)
624 AC_CHECK_HEADERS(sys/dir.h sys/stat.h sys/times.h sys/types.h)
626 dnl Checks for typedefs, structures, and compiler characteristics.
628 dnl Disable cygwin check until someone fixes that stupid autoconf warnings.
639 AC_MSG_CHECKING("for fpos_t")
640 AC_EGREP_HEADER(fpos_t, stdio.h, AC_MSG_RESULT(yes),
643 AC_DEFINE(fpos_t, long, [fpos_t is type long])
646 AC_MSG_CHECKING("for clock_t")
647 AC_EGREP_HEADER(clock_t, time.h, AC_MSG_RESULT(yes),
650 AC_DEFINE(clock_t, long, [clock_t is type long])
653 CHECK_HEADER_DEFINE(L_tmpnam, stdio.h,, AC_DEFINE(L_tmpnam, 20, [L_tmpname is 20]))
655 CHECK_HEADER_DEFINE(INT_MAX, limits.h,,
656 CHECK_HEADER_DEFINE(MAXINT, limits.h,
657 AC_DEFINE(INT_MAX, MAXINT, [Maximum int size]), AC_DEFINE(INT_MAX, 32767, [Maximum int size])))
659 AC_MSG_CHECKING(if struct stat contains st_ino)
660 AC_TRY_COMPILE([#include <sys/stat.h>], [
665 ], have_st_ino=yes, have_st_ino=no)
666 AC_MSG_RESULT($have_st_ino)
667 if test yes = "$have_st_ino"; then
668 AC_DEFINE(HAVE_STAT_ST_INO,,[Have stat st_ino])
672 dnl Checks for library functions.
673 AC_CHECK_FUNCS(fnmatch)
674 AC_CHECK_FUNCS(strstr)
675 AC_CHECK_FUNCS(stricmp)
676 AC_CHECK_FUNCS(strnicmp)
677 AC_CHECK_FUNCS(getline)
679 AC_CHECK_FUNCS(fgetpos, have_fgetpos=yes)
681 dnl SEEK_SET should be in stdio.h, but may be in unistd.h on SunOS 4.1.x
682 if test "$have_fgetpos" != yes ; then
683 CHECK_HEADER_DEFINE(SEEK_SET, stdio.h,,
684 CHECK_HEADER_DEFINE(SEEK_SET, unistd.h,,
685 AC_DEFINE(SEEK_SET, 0, [Seek set 0])))
688 AC_CHECK_FUNCS(mkstemp, have_mkstemp=yes)
689 if test "$have_mkstemp" != yes ; then
690 AC_CHECK_FUNCS(chmod)
691 if test "$tmpdir_specified" = yes ; then
692 AC_MSG_RESULT(use of tmpnam overrides temporary directory selection)
695 AC_MSG_CHECKING(directory to use for temporary files)
696 if test -z "$enable_tmpdir" -o "$enable_tmpdir" = no -o "$enable_tmpdir" = yes ;
698 else tmpdir="$enable_tmpdir"
700 if test -d $tmpdir ; then
701 AC_MSG_RESULT($tmpdir)
702 AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [Directory for temporary files])
704 AC_MSG_WARN($tmpdir does not exist)
708 AC_CHECK_FUNCS(strerror opendir)
709 AC_CHECK_FUNCS(clock times, break)
710 AC_CHECK_FUNCS(remove, have_remove=yes,
711 CHECK_HEADER_DEFINE(remove, unistd.h,, AC_DEFINE(remove, unlink, [Remove is unlink])))
713 AC_CHECK_FUNCS(truncate, have_truncate=yes)
714 dnl === Cannot nest AC_CHECK_FUNCS() calls
715 if test "$have_truncate" != yes ; then
716 AC_CHECK_FUNCS(ftruncate, have_ftruncate=yes)
717 if test "$have_ftruncate" != yes ; then
718 AC_CHECK_FUNCS(chsize)
722 AC_CHECK_FUNCS(setenv, have_setenv=yes)
723 dnl === Cannot nest AC_CHECK_FUNCS() calls
724 if test "$have_setenv" != yes ; then
725 AC_CHECK_FUNCS(putenv, have_putenv=yes)
726 if test "$have_putenv" = yes ; then
727 AC_EGREP_HEADER(putenv, stdlib.h, have_putenv_prototype=yes)
728 if test "$have_putenv_prototype" = yes ; then
729 AC_MSG_CHECKING("putenv prototype")
730 AC_EGREP_HEADER([[^A-Za-zo-9_]putenv[ ]*\(.*const.*\)[ ]*;],
731 stdlib.h, AC_MSG_RESULT(correct),
733 AC_MSG_RESULT(no const)
734 AC_DEFINE(NON_CONST_PUTENV_PROTOTYPE,,[putenv has non constant prototype])
741 dnl if test yes = "$CYGWIN"; then with_posix_regex=no; fi
742 if test no != "$with_posix_regex"; then
743 AC_CHECK_FUNCS(regcomp)
744 AC_MSG_CHECKING(if regcomp works)
746 #include <sys/types.h>
750 exit (regcomp (&patbuf, "/hello/", 0) != 0);
751 }],regcomp_works=yes,regcomp_works=no,AC_DEFINE(CHECK_REGCOMP,,[Check regcomp]))
752 AC_MSG_RESULT($regcomp_works)
753 if test yes != "$regcomp_works"; then
754 AC_DEFINE(REGCOMP_BROKEN,,[Regcomp is broken])
758 dnl -----------------------------
759 dnl Checks for FreeBSD Build
760 dnl -----------------------------
761 AC_MSG_CHECKING(if building on FreeBSD)
763 if test `uname -s` = "FreeBSD" ; then
765 FREEBSD_BUILD=-DFREEBSD
766 AC_SUBST(FREEBSD_BUILD)
767 AC_PATH_PROG(GMAKE, gmake, no)
768 if test "x$GMAKE" = "xno"; then
769 AC_ERROR(You need gmake installed to build Anjuta!)
778 dnl Checks for missing prototypes
779 dnl -----------------------------
780 AC_CHECKING("for missing prototypes")
782 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))])
784 if test "$have_remove" = yes ; then
785 CHECK_PROTO(remove, stdio.h)
787 CHECK_PROTO(unlink, unistd.h)
789 CHECK_PROTO(malloc, stdlib.h)
790 CHECK_PROTO(getenv, stdlib.h)
791 CHECK_PROTO(stat, sys/stat.h)
792 CHECK_PROTO(lstat, sys/stat.h)
793 if test "$have_fgetpos" = yes ; then
794 CHECK_PROTO(fgetpos, stdio.h)
796 if test "$have_truncate" = yes ; then
797 CHECK_PROTO(truncate, unistd.h)
799 if test "$have_ftruncate" = yes ; then
800 CHECK_PROTO(ftruncate, unistd.h)
803 dnl **********************************************************
804 dnl check if we have svn libraries to build subversion plugin
805 dnl (stolen from kdevelop ;-)
806 dnl **********************************************************
808 AC_MSG_CHECKING(for Subversion svn-config)
809 AC_ARG_WITH(subversion-dir,
810 [ --with-subversion-dir=DIR where Subversion is installed ],
812 SVNCONFIG="$withval/bin/svn-config"
815 if test -z "$SVNCONFIG"; then
816 _SVNCONFIG="`svn-config --prefix 2> /dev/null`"
817 if test -n "$_SVNCONFIG"; then
818 SVNCONFIG="$_SVNCONFIG/bin/svn-config"
823 if test -x "$SVNCONFIG"; then
824 SVNLD="`$SVNCONFIG --ldflags 2> /dev/null`"
825 SVN_LIB="`$SVNCONFIG --libs --cflags 2> /dev/null` -lsvn_client-1"
826 dnl ugly hack for subversion svn-config problems in 0.14.x, to be removed when svn-config is fixed
827 SVN_INCLUDE="`$SVNCONFIG --includes 2> /dev/null` -I$_SVNCONFIG/include/subversion-1/"
830 AC_MSG_RESULT(not found)
832 dnl just a fallback to debian's config so that it works for me :)
833 AC_ARG_WITH(svn-include,
834 [[ --with-svn-include=DIR Use the given path to the subversion headers.]],
836 if test "$withval" != "yes" -a "$withval" != ""; then
837 SVN_INCLUDES=$withval
840 if test -z "$SVN_INCLUDES"; then
841 SVN_INCLUDES="/usr/local/include /usr/include"
843 AC_MSG_CHECKING([for Subversion headers])
845 for VALUE in $SVN_INCLUDES ; do
846 if test -f $VALUE/subversion-1/svn_types.h ; then
851 if test $SVN_INCLUDE ; then
852 AC_MSG_RESULT([found])
854 AC_MSG_RESULT([not found])
856 SVN_LIBS="/usr/local/lib /usr/lib"
858 [[ --with-svn-lib=DIR Use the given path to the subversion libraries.]],
860 if test "$withval" != "yes" -a "$withval" != ""; then
864 AC_MSG_CHECKING([for Subversion libraries])
866 for VALUE in $SVN_LIBS ; do
867 if ls $VALUE/libsvn_client-1.* 1>/dev/null 2>&1; then
872 if test $SVN_LIB ; then
873 AC_MSG_RESULT([found])
875 AC_MSG_RESULT([not found])
879 dnl ******************************************************************
880 dnl Check for extra libs required by subversion.
881 dnl FIXME: This should actually be done by subversion and not by us.
882 dnl ******************************************************************
884 AC_ARG_ENABLE(plugin-subversion,
885 [ --disable-plugin-subversion Disable subversion support in Anjuta.],
886 [ if test "$enableval" = "no"; then
887 user_disabled_subversion=1
889 [ user_disabled_subversion=0 ] )
891 AC_MSG_CHECKING(if subversion support is disabled)
892 if test "$user_disabled_subversion" = 1; then
900 if test -n "$SVN_INCLUDE" ; then
901 dnl ------------------------------------
902 dnl APR. Required by subversion (devel)
903 dnl ------------------------------------
905 APR_CONFIGS="apr-config /usr/local/apr/bin/apr-config"
906 AC_ARG_WITH(apr-config,
907 [[ --with-apr-config=FILE Use the given path to apr-config when determining
908 APR configuration; defaults to "apr-config"]],
910 if test "$withval" != "yes" -a "$withval" != ""; then
914 AC_MSG_CHECKING([for APR])
916 for VALUE in $APR_CONFIGS ; do
917 if $VALUE --cflags > /dev/null 2>&1 ; then
922 test $VALUE && APR_CONFIG=$VALUE
923 if test $APR_CONFIG ; then
924 AC_MSG_RESULT([found])
925 APR_CFLAGS="`$APR_CONFIG --cflags`"
926 APR_INCLUDE="`$APR_CONFIG --includes`"
927 APR_LIBS="`$APR_CONFIG --link-ld --libs`"
929 AC_MSG_RESULT([not found])
930 dnl AC_MSG_ERROR([APR is required. Try --with-apr-config.])
933 dnl -----------------------------------------
934 dnl APR util. Required by subversion (devel)
935 dnl------------------------------------------
937 APU_CONFIGS="apu-config /usr/local/apr/bin/apu-config"
938 AC_ARG_WITH(apu-config,
939 [[ --with-apu-config=FILE Use the given path to apu-config when determining
940 APR util configuration; defaults to "apu-config"]],
942 if test "$withval" != "yes" -a "$withval" != ""; then
946 AC_MSG_CHECKING([for APR util])
948 for VALUE in $APU_CONFIGS ; do
949 if $VALUE --includes > /dev/null 2>&1 ; then
954 if test $APU_CONFIG ; then
955 AC_MSG_RESULT([found])
956 APR_INCLUDE="$APR_INCLUDE `$APU_CONFIG --includes`"
957 APR_LIBS="$APR_LIBS `$APU_CONFIG --link-ld --libs`"
959 AC_MSG_RESULT([not found])
962 dnl -----------------------------------------
963 dnl NEON. Required by subversion (devel)
964 dnl------------------------------------------
966 dnl Check for neon. It is required by subversion libs, but for
967 dnl for some strange reason it's not in it's dependencies.
968 dnl subversion plugin will be disabled if neon (devel) is not
969 dnl installed, even if subversion (devel) is installed.
971 NEON_CONFIGS="neon-config"
972 AC_ARG_WITH(neon-config,
973 [[ --with-neon-config=FILE Use the given path to neon-config when determining
974 Neon configuration; defaults to "neon-config"]],
976 if test "$withval" != "yes" -a "$withval" != ""; then
977 NEON_CONFIGS=$withval
980 AC_MSG_CHECKING([for Neon])
982 for VALUE in $NEON_CONFIGS ; do
983 if $VALUE --cflags > /dev/null 2>&1 ; then
988 if test $NEON_CONFIG ; then
989 AC_MSG_RESULT([found])
991 AC_MSG_RESULT([not found])
997 dnl ------------------------------------------
998 dnl Finally prepare subversion build flags
999 dnl ------------------------------------------
1001 if test -n "$SVN_INCLUDE" ; then
1002 SVN_INCLUDE="-I$SVN_INCLUDE $APR_INCLUDE"
1003 SVN_LIB="-L$SVN_LIB $APR_LIBS -lsvn_client-1"
1004 SVN_CFLAGS="$APR_CFLAGS"
1007 AM_CONDITIONAL(BUILD_SVN, [test -n "$SVN_INCLUDE"])
1008 AC_SUBST(SVN_INCLUDE)
1010 AC_SUBST(SVN_CFLAGS)
1012 dnl --------- help outputs -----------
1013 dnl manuals/C/Makefile
1014 dnl manuals/C/anjuta-tutorial/Makefile
1015 dnl manuals/C/anjuta-advanced-tutorial/Makefile
1016 dnl manuals/C/anjuta-faqs/Makefile
1017 dnl manuals/C/anjuta-manual/Makefile
1018 dnl manuals/de/Makefile
1019 dnl manuals/de/anjuta-tutorial/Makefile
1020 dnl manuals/ja/Makefile
1021 dnl manuals/ja/anjuta-faqs/Makefile
1022 dnl manuals/ja/anjuta-manual/Makefile
1028 tagmanager/include/Makefile
1029 global-tags/Makefile
1032 libegg/util/Makefile
1033 libegg/treeviewutils/Makefile
1034 libegg/menu/Makefile
1035 libegg/recent-files/Makefile
1036 scintilla/include/Makefile
1039 libanjuta/libanjuta-1.0.pc
1040 libanjuta/interfaces/Makefile
1045 data/properties/Makefile
1047 doc/anjuta_launcher.1
1050 scripts/anjuta_import.sh
1053 plugins/sample1/Makefile
1054 plugins/gtodo/Makefile
1055 plugins/class-gen/Makefile
1056 plugins/patch/Makefile
1057 plugins/editor/Makefile
1058 plugins/document-manager/Makefile
1059 plugins/search/Makefile
1060 plugins/message-view/Makefile
1061 plugins/gdb/Makefile
1062 plugins/gdb/images/Makefile
1063 plugins/debug-manager/Makefile
1064 plugins/debug-manager/images/Makefile
1065 plugins/devhelp/Makefile
1066 plugins/glade/Makefile
1067 plugins/file-manager/Makefile
1068 plugins/file-loader/Makefile
1069 plugins/file-wizard/Makefile
1070 plugins/terminal/Makefile
1071 plugins/build-basic-autotools/Makefile
1072 plugins/profile-default/Makefile
1073 plugins/project-manager/Makefile
1074 plugins/symbol-browser/Makefile
1075 plugins/symbol-browser/images/Makefile
1076 plugins/cvs-plugin/Makefile
1077 plugins/project-wizard/Makefile
1078 plugins/macro/Makefile
1079 plugins/subversion/Makefile
1080 plugins/sourceview/Makefile
1081 plugins/tools/Makefile
1082 plugins/tools/scripts/Makefile
1083 plugins/class-inheritance/Makefile
1084 plugins/valgrind/Makefile
1085 plugins/project-import/Makefile
1086 plugins/project-wizard/templates/Makefile
1087 plugins/project-wizard/templates/terminal/Makefile
1088 plugins/project-wizard/templates/terminal/src/Makefile
1089 plugins/project-wizard/templates/terminal/po/Makefile
1090 plugins/project-wizard/templates/cpp/Makefile
1091 plugins/project-wizard/templates/cpp/src/Makefile
1092 plugins/project-wizard/templates/cpp/po/Makefile
1093 plugins/project-wizard/templates/gtk/Makefile
1094 plugins/project-wizard/templates/gtk/src/Makefile
1095 plugins/project-wizard/templates/gtk/po/Makefile
1096 plugins/project-wizard/templates/anjuta-plugin/Makefile
1097 plugins/project-wizard/templates/anjuta-plugin/src/Makefile
1098 plugins/project-wizard/templates/anjuta-plugin/po/Makefile
1099 plugins/project-wizard/templates/gnome/Makefile
1100 plugins/project-wizard/templates/gnome/src/Makefile
1101 plugins/project-wizard/templates/gnome/po/Makefile
1102 plugins/project-wizard/templates/gtkmm/Makefile
1103 plugins/project-wizard/templates/gtkmm/src/Makefile
1104 plugins/project-wizard/templates/gtkmm/po/Makefile
1105 plugins/project-wizard/templates/gcj/Makefile
1106 plugins/project-wizard/templates/gcj/src/Makefile
1107 plugins/project-wizard/templates/java/Makefile
1108 plugins/project-wizard/templates/java/src/Makefile
1109 plugins/project-wizard/templates/java/po/Makefile
1110 plugins/project-wizard/templates/python/Makefile
1111 plugins/project-wizard/templates/python/src/Makefile
1112 plugins/project-wizard/templates/python/po/Makefile
1113 plugins/project-wizard/templates/mkfile/Makefile
1114 plugins/project-wizard/templates/mkfile/src/Makefile
1115 plugins/project-wizard/templates/mkfile/po/Makefile
1116 plugins/project-wizard/templates/wxwin/Makefile
1117 plugins/project-wizard/templates/wxwin/src/Makefile
1118 plugins/project-wizard/templates/wxwin/po/Makefile
1119 plugins/project-wizard/templates/xlib/Makefile
1120 plugins/project-wizard/templates/xlib/src/Makefile
1121 plugins/project-wizard/templates/xlib/po/Makefile
1122 plugins/project-wizard/templates/xlib-dock/Makefile
1123 plugins/project-wizard/templates/xlib-dock/src/Makefile
1124 plugins/project-wizard/templates/xlib-dock/po/Makefile
1125 plugins/language-support-cpp-java/Makefile
1128 manuals/reference/Makefile
1129 manuals/reference/libanjuta/Makefile
1130 manuals/reference/libanjuta/version.xml
1132 manuals/C/anjuta-manual/Makefile
1133 manuals/C/anjuta-faqs/Makefile
1137 echo "-------------------------------------------------------------------"
1138 echo "Conditionally built plugins:"
1139 echo "-------------------------------------------------------------------"
1140 if [ test -n "$SVN_INCLUDE" ]; then
1141 echo "Building subversion plugin: ............................YES"
1143 echo "Building subversion plugin: ............................NO"
1144 echo " Requires apr (>= 0.9.4); http://subversion.org"
1145 echo " Requires apr-util (>= 0.9.4); http://subversion.org"
1146 echo " Requires neon (>= 0.24.5); http://subversion.org"
1147 echo " Requires subversion (>= 1.0.2); http://subversion.org"
1150 if [ test x$libgladeui_found = xyes ]; then
1151 echo "Building glade plugin: .................................YES"
1153 echo "Building glade plugin: .................................NO"
1154 echo " Requires glade-3 (>= 3.0.2); CVS cvs.gnome.org, module glade-3"
1157 if [ test x$devhelp_enabled = xyes ]; then
1158 echo "Building devhelp plugin: ...............................YES"
1160 echo "Building devhelp plugin: ...............................NO"
1161 echo " Requires devhelp"
1164 if [ test x$libgraphviz_found = xyes ]; then
1165 echo "Building class inheritance plugin: .....................YES"
1167 echo "Building class inheritance plugin: .....................NO"
1168 echo " Requires graphviz (>= 2.6.0); http://graphviz.org"
1171 if [ test x$valgrind = xyes ]; then
1172 echo "Building Valgrind debugger plugin: .....................YES"
1174 echo "Building Valgrind debugger plugin: .....................NO"
1175 echo " Requires binutils-dev"
1178 if [ test x$sourceview = xyes ]; then
1179 echo "Building GtkSourceView based editor: ...................YES"
1181 echo "Building GtkSourceView based editor: ...................NO"
1184 if [ test x$scintilla = xyes ]; then
1185 echo "Building Scintilla based editor: .......................YES"
1187 echo "Building Scintilla based editor: .......................NO"
1189 echo "-------------------------------------------------------------------"