1 dnl Process this file with autoconf to produce a configure script.
2 dnl Created by Anjuta application wizard.
6 m4_define(anjuta_major_version, 2)
7 m4_define(anjuta_minor_version, 32)
8 m4_define(anjuta_micro_version, 1)
9 m4_define(anjuta_nano_version, 0)
10 m4_define(anjuta_version, anjuta_major_version.anjuta_minor_version.anjuta_micro_version.anjuta_nano_version)
12 AC_INIT(anjuta-extras, anjuta_version)
14 ANJUTA_EXTRAS_VERSION=anjuta_version
15 AC_SUBST(ANJUTA_EXTRAS_VERSION)
17 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
18 AC_CONFIG_HEADERS([config.h])
29 BINUTILS_REQUIRED=2.15.92
30 LIBGRAPHVIZ_REQUIRED=1.0
36 AC_SUBST(LIBGRAPHVIZ_REQUIRED)
37 AC_SUBST(BINUTILS_REQUIRED)
38 AC_SUBST(GTK_REQUIRED)
39 AC_SUBST(GLIB_REQUIRED)
40 AC_SUBST(GCONF_REQUIRED)
41 AC_SUBST(GNOME_REQUIRED)
44 dnl ***************************************************************************
45 dnl Check for pkgconfig
46 dnl ***************************************************************************
47 AC_PATH_PROG(PKG_CONFIG, pkg-config,no)
48 if test x$PKGCONFIG_CONFIG = xno; then
49 AC_MSG_ERROR(Please install the pkg-config package from http://www.freedesktop.org/software/pkgconfig/)
52 dnl ***************************************************************************
53 dnl Check for marshal and enum generators
54 dnl ***************************************************************************
55 GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
56 AC_SUBST(GLIB_GENMARSHAL)
57 GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
58 AC_SUBST(GLIB_MKENUMS)
61 dnl ***************************************************************************
62 dnl we need gconftool-2 in order to install the schema
63 dnl ***************************************************************************
64 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
66 if test "x$GCONFTOOL" = "xno"; then
67 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
73 dnl ---------------------------------------------------------------------------
75 GNOME_COMPILE_WARNINGS(maximum)
76 GNOME_CXX_WARNINGS(yes)
77 AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
78 AM_CXXFLAGS="$AM_CXXFLAGS $WARN_CXXFLAGS"
80 dnl Enable debugging mode
82 AC_HELP_STRING([--enable-debug],[Enable debug messages]),
83 AM_CFLAGS="$AM_CFLAGS -DDEBUG"
84 AM_CXXFLAGS="$AM_CXXFLAGS -DDEBUG")
88 dnl ***************************************************************************
89 dnl Internatinalization
90 dnl ***************************************************************************
91 GETTEXT_PACKAGE=anjuta-extras
92 AC_SUBST(GETTEXT_PACKAGE)
93 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
95 IT_PROG_INTLTOOL([0.35.0])
101 dnl Check for libanjuta
102 PKG_CHECK_MODULES(LIBANJUTA, [libanjuta-1.0 >= $ANJUTA_EXTRAS_VERSION])
104 dnl Check for libgnome
105 PKG_CHECK_MODULES(GNOME, libgnomecanvas-2.0 >= $GNOME_REQUIRED)
107 dnl check for gthread
108 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GLIB_REQUIRED)
112 dnl -------------------------------------------------------------
114 AC_ARG_ENABLE(plugin-valgrind,
115 AC_HELP_STRING([--disable-plugin-valgrind],[Disable Valgrind plugin]),
116 [ if test "$enableval" = "no"; then
117 user_disabled_valgrind=1
119 [ user_disabled_valgrind=0 ])
121 AC_MSG_CHECKING(if valgrind plugin is disabled)
122 if test "$user_disabled_valgrind" = 1; then
130 AC_CHECK_LIB(bfd, bfd_get_error, [PLUGIN_VALGRIND_LIBS="-Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic -lz -ldl"],
134 AC_SUBST(PLUGIN_VALGRIND_LIBS)
135 AM_CONDITIONAL(HAVE_PLUGIN_VALGRIND, [test x$valgrind = xyes])
137 dnl check for bfd_get_section_size_before_reloc() in libbfd
138 AC_MSG_CHECKING(for bfd_get_section_size_before_reloc)
144 bfd_get_section_size_before_reloc (section);
147 AC_DEFINE(HAVE_BFD_GET_SECTION_SIZE_BEFORE_RELOC, [], [Define if libbfd
148 contains the function bfd_get_section_size_before_reloc])
153 dnl Check for graphviz (class inheritance and profiler plugins)
154 dnl --------------------------------------------------------------------------
155 dnl FIXME: For some strange reason graphviz-devel rpm install the *.pc files
156 dnl in /usr/lib/graphviz/pkgconfig, instead of usual /usr/lib/pkgconfig. This
157 dnl makes pkgconfig check fail if we don't add the above path in
158 dnl PKG_CONFIG_PATH. We have added both /usr/lib/graphviz/pkgconfig and
159 dnl /usr/local/lib/pkgconfig paths. If graphviz is installed in other prefix
160 dnl (other than /usr or /usr/local or the current installation prefix),
161 dnl following pkgconfig check will fail.
162 dnl --------------------------------------------------------------------------
163 AC_ARG_ENABLE(graphviz,
164 AC_HELP_STRING([--disable-graphviz],[Disable GraphViz support in Anjuta]),
165 [ if test "$enableval" = "no"; then
166 user_disabled_graphviz=1
168 [ user_disabled_graphviz=0 ])
170 AC_MSG_CHECKING(if GraphViz support is disabled)
171 if test "$user_disabled_graphviz" = 1; then
173 libgraphviz_found="no"
177 dnl Set pkgconfig path
178 ANJUTA_PKG_CONFIG_PATH_SAVE="${PKG_CONFIG_PATH}"
179 PKG_CONFIG_PATH="/usr/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
180 PKG_CONFIG_PATH="/usr/local/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
181 PKG_CONFIG_PATH="/usr/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
182 PKG_CONFIG_PATH="/usr/local/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
184 anjuta_save_prefix="$prefix"
185 test "x$prefix" = xNONE && prefix=$ac_default_prefix
186 graphviz_pkgconfig=`eval echo ${libdir}/graphviz/pkgconfig`
187 PKG_CONFIG_PATH="$graphviz_pkgconfig:$PKG_CONFIG_PATH"
188 prefix="$anjuta_save_prefix"
190 export PKG_CONFIG_PATH
191 PKG_CHECK_MODULES(GRAPHVIZ,
192 [libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED],
193 [libgraphviz_found="yes"],
194 [libgraphviz_found="no"])
196 dnl Restore pkgconfig path
197 PKG_CONFIG_PATH="${ANJUTA_PKG_CONFIG_PATH_SAVE}"
198 export PKG_CONFIG_PATH
201 AM_CONDITIONAL(HAVE_GRAPHVIZ, [test x$libgraphviz_found = xyes])
203 dnl Define HAVE_GRAPHVIZ to disable Function Call Chart in the Profiler if
204 dnl Graphviz isn't on the system
205 if test "$libgraphviz_found" = yes; then
206 AC_DEFINE(HAVE_GRAPHVIZ, [], [Define if we have GraphViz >= 2.6.0])
209 dnl we need gconftool-2 in order to install the schema
210 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
212 if test "x$GCONFTOOL" = "xno"; then
213 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
219 dnl -------------------------------------------------------------
221 AC_ARG_ENABLE(plugin-scintilla,
222 AC_HELP_STRING([--disable-plugin-scintilla],[ Scintilla based editor in Anjuta]),
223 [ if test "$enableval" = "no"; then
224 user_disabled_scintilla=1
226 [ user_disabled_scintilla=0 ])
228 AC_MSG_CHECKING(if scintilla plugin is enabled)
229 if test "$user_disabled_scintilla" = 1; then
236 AM_CONDITIONAL(HAVE_PLUGIN_SCINTILLA, [test x$scintilla = xyes])
238 dnl Setup Plugin directories
239 dnl ------------------------
241 dnl In order to pass distcheck, the script has to install the plugin
242 dnl in the correct prefix if defined. This is done using the
243 dnl pkg-config option --define-variable.
244 if test "x$prefix" = "xNONE" ; then
247 pkg_prefix="--define-variable=prefix=$prefix"
250 anjutalibdir=`pkg-config $pkg_prefix --variable=libdir libanjuta-1.0`
251 anjutadatadir=`pkg-config $pkg_prefix --variable=datadir libanjuta-1.0`
252 AC_SUBST(anjutalibdir)
253 AC_SUBST(anjutadatadir)
254 anjuta_plugin_dir='$(anjutalibdir)/anjuta'
255 anjuta_data_dir='$(anjutadatadir)/anjuta'
256 anjuta_ui_dir='$(anjutadatadir)/anjuta/ui'
257 anjuta_glade_dir='$(anjutadatadir)/anjuta/glade'
258 anjuta_image_dir='$(anjutadatadir)/pixmaps/anjuta'
259 AC_SUBST(anjuta_plugin_dir)
260 AC_SUBST(anjuta_data_dir)
261 AC_SUBST(anjuta_ui_dir)
262 AC_SUBST(anjuta_glade_dir)
263 AC_SUBST(anjuta_image_dir)
265 EXTRA_CFLAGS='-DPACKAGE_PIXMAPS_DIR=\""$(anjuta_image_dir)"\" -DPACKAGE_LIB_DIR=\""$(anjutalibdir)"\" -DPACKAGE_DATA_DIR=\""$(anjuta_data_dir)"\"'
266 AC_SUBST(EXTRA_CFLAGS)
268 ANJUTA_PLUGIN_LDFLAGS='-module -avoid-version -no-undefined'
269 AC_SUBST(ANJUTA_PLUGIN_LDFLAGS)
271 PKG_CHECK_MODULES(LIBXML, libxml-2.0)
275 plugins/scratchbox/Makefile
276 plugins/sample1/Makefile
277 plugins/valgrind/Makefile
278 plugins/profiler/Makefile
279 plugins/scintilla/Makefile
280 plugins/scintilla/scintilla/Makefile
281 plugins/scintilla/scintilla/include/Makefile
282 plugins/scintilla/properties/Makefile
288 echo "-------------------------------------------------------------------"
289 echo "Conditionally built plugins:"
290 echo "-------------------------------------------------------------------"
291 if [ test x$libgraphviz_found = xyes ]; then
292 echo "Building performance profiler with function call chart: YES"
294 echo "Building performance profiler with function call chart: NO"
295 echo " Requires graphviz (>= 2.6.0); http://graphviz.org"
297 if [ test x$valgrind = xyes ]; then
298 echo "Building Valgrind debugger plugin: .....................YES"
300 echo "Building Valgrind debugger plugin: .....................NO"
301 echo " Requires binutils-dev"
303 if [ test x$scintilla = xyes ]; then
304 echo "Building Scintilla based editor: .......................YES"
306 echo "Building Scintilla based editor: .......................NO"