~ubuntu-branches/ubuntu/utopic/anjuta/utopic-proposed

« back to all changes in this revision

Viewing changes to .pc/03_valac_0.22.patch/configure.ac

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson, Jackson Doak
  • Date: 2014-07-12 15:17:39 UTC
  • mfrom: (1.4.14)
  • Revision ID: package-import@ubuntu.com-20140712151739-p9xy0ntlgbpm2nxq
Tags: 2:3.12.0-1
* Team upload.

[ Jackson Doak ]
* New upstream release
* Drop 03_valac_0.22.patch, fixed upstream\
* debian/control:
  - Bump b-dep version on libgtk-3-dev (>= 3.6.0), libglib2.0-dev (>= 2.34.0)
  - Bump stardards-version to 3.9.5. No changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl Process this file with autoconf to produce a configure script.
2
 
 
3
 
AC_PREREQ(2.65)
4
 
 
5
 
m4_define(anjuta_major_version,  3)
6
 
m4_define(anjuta_minor_version,  8)
7
 
m4_define(anjuta_micro_version,  4)
8
 
m4_define(anjuta_version, anjuta_major_version.anjuta_minor_version.anjuta_micro_version)
9
 
m4_define(bugzilla_version, anjuta_major_version.anjuta_minor_version.anjuta_micro_version)
10
 
 
11
 
AC_INIT([Anjuta],[anjuta_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=anjuta],[anjuta],[http://www.anjuta.org/])
12
 
 
13
 
AC_CONFIG_HEADERS([config.h])
14
 
AC_CONFIG_SRCDIR([src/main.c])
15
 
AC_CONFIG_MACRO_DIR([m4])
16
 
 
17
 
 
18
 
AC_DEFINE(ANJUTA_MAJOR_VERSION, anjuta_major_version, [Anjuta major version])
19
 
AC_SUBST(ANJUTA_MAJOR_VERSION, anjuta_major_version)
20
 
AC_DEFINE(ANJUTA_MINOR_VERSION, anjuta_minor_version, [Anjuta minor version])
21
 
AC_SUBST(ANJUTA_MINOR_VERSION, anjuta_minor_version)
22
 
AC_DEFINE(ANJUTA_MICRO_VERSION, anjuta_micro_version, [Anjuta micro version])
23
 
AC_SUBST(ANJUTA_MICRO_VERSION, anjuta_micro_version)
24
 
AC_DEFINE(ANJUTA_VERSION, anjuta_version, [Anjuta version])
25
 
AC_SUBST(ANJUTA_VERSION)
26
 
 
27
 
ANJUTA_VERSION=anjuta_version
28
 
AC_SUBST(ANJUTA_VERSION)
29
 
 
30
 
BUGZILLA_VERSION=bugzilla_version
31
 
AC_SUBST(BUGZILLA_VERSION)
32
 
 
33
 
dnl Anjuta core
34
 
GLIB_REQUIRED=2.32.0
35
 
GTK_REQUIRED=3.4.0
36
 
GTHREAD_REQUIRED=2.22.0
37
 
GDK_PIXBUF_REQUIRED=2.0.0
38
 
GDA4_REQUIRED=4.2.0
39
 
GDA5_REQUIRED=5.0.0
40
 
VTE_REQUIRED=0.27.6
41
 
LIBXML_REQUIRED=2.4.23
42
 
GDL_REQUIRED=3.5.5
43
 
LIBWNCK_REQUIRED=2.12
44
 
 
45
 
dnl GtkSourceView
46
 
GTKSOURCEVIEW_REQUIRED=3.0.0
47
 
 
48
 
dnl Devhelp
49
 
LIBDEVHELP_REQUIRED=3.7.4
50
 
 
51
 
dnl Glade
52
 
GLADEUI_REQUIRED=3.12.0
53
 
 
54
 
dnl Introspection
55
 
GI_REQUIRED=0.9.5
56
 
 
57
 
dnl Subversion plugin
58
 
NEON_REQUIRED=0.28.2
59
 
SVN_MAJOR=1
60
 
SVN_MINOR=5
61
 
SVN_PATCH=0
62
 
SUBVERSION_REQUIRED=$SVN_MAJOR.$SVN_MINOR.$SVN_PATCH
63
 
 
64
 
AM_INIT_AUTOMAKE([1.10 dist-xz no-dist-gzip])
65
 
AM_MAINTAINER_MODE([enable])
66
 
 
67
 
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
68
 
 
69
 
dnl Check for C Compiler
70
 
AC_PROG_CC
71
 
AC_PROG_CPP
72
 
AC_PROG_LEX
73
 
if test "$LEX" != "flex"; then
74
 
        AC_MSG_ERROR(flex is required)
75
 
fi
76
 
AC_PROG_YACC
77
 
if test "$YACC" != "bison -y"; then
78
 
        AC_MSG_ERROR(bison is required)
79
 
fi
80
 
AC_LANG([C])
81
 
AC_LANG([C++])
82
 
AC_PROG_CXX
83
 
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],,
84
 
   AC_MSG_ERROR([C++ Compiler required to compile Anjuta]))
85
 
AM_PROG_CC_C_O
86
 
 
87
 
GNOME_COMPILE_WARNINGS([maximum])
88
 
AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
89
 
AM_CXXFLAGS="$AM_CXXFLAGS $WARN_CXXFLAGS"
90
 
 
91
 
dnl Enable debugging mode
92
 
AC_ARG_ENABLE(debug,
93
 
  AS_HELP_STRING([--enable-debug],[Enable debug messages]),
94
 
  [if test "x$enableval" = "xyes"; then
95
 
      AM_CFLAGS="$AM_CFLAGS -DDEBUG"
96
 
  fi]
97
 
  AM_CXXFLAGS="$AM_CXXFLAGS -DDEBUG")
98
 
AC_SUBST(AM_CFLAGS)
99
 
AC_SUBST(AM_CXXFLAGS)
100
 
 
101
 
ANJUTA_LDFLAGS="-no-undefined"
102
 
ANJUTA_PLUGIN_LDFLAGS="-module -avoid-version -no-undefined"
103
 
AC_SUBST(ANJUTA_LDFLAGS)
104
 
AC_SUBST(ANJUTA_PLUGIN_LDFLAGS)
105
 
 
106
 
dnl GSettings
107
 
GLIB_GSETTINGS
108
 
 
109
 
dnl Disable deprecated APIs
110
 
dnl if test x$MAINT = x; then
111
 
dnl     DEPRECATED_FLAGS="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
112
 
dnl     AC_SUBST(DEPRECATED_FLAGS)
113
 
dnl fi
114
 
 
115
 
dnl Check for pkg-config
116
 
PKG_PROG_PKG_CONFIG([0.22])
117
 
 
118
 
dnl Enable versioned user preferences directory
119
 
AC_ARG_WITH(pref-suffix,
120
 
  AS_HELP_STRING([--with-pref-suffix=VALUE],[Suffix to add to user preferences dir.]),
121
 
  PREF_SUFFIX="$withval")
122
 
 
123
 
AC_SUBST(PREF_SUFFIX)
124
 
AC_DEFINE_UNQUOTED(PREF_SUFFIX,
125
 
      "${PREF_SUFFIX}",
126
 
          [Suffix to add to preferences directory])
127
 
 
128
 
# Initialize libtool
129
 
LT_PREREQ([2.2])
130
 
LT_INIT([disable-static])
131
 
 
132
 
dnl ***************************************************************************
133
 
dnl Check for GObject-Introspection
134
 
dnl ***************************************************************************
135
 
m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [GOBJECT_INTROSPECTION_CHECK([0.6.7])],
136
 
[AM_CONDITIONAL(HAVE_INTROSPECTION, false)])
137
 
 
138
 
dnl ***************************************************************************
139
 
dnl Set gjsdir
140
 
dnl ***************************************************************************
141
 
gjsdir=`pkg-config --variable=jsdir gjs-1.0`
142
 
AC_SUBST(gjsdir)
143
 
 
144
 
dnl Check base modules
145
 
 
146
 
PKG_CHECK_MODULES([ANJUTA],
147
 
   [gthread-2.0 >= $GTHREAD_REQUIRED
148
 
        glib-2.0 >= $GLIB_REQUIRED
149
 
        gio-2.0 >= $GLIB_REQUIRED
150
 
        gmodule-2.0 >= $GLIB_REQUIRED
151
 
        gtk+-3.0 >= $GTK_REQUIRED
152
 
        gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED])
153
 
 
154
 
PKG_CHECK_MODULES([XML],
155
 
   [libxml-2.0 >= $LIBXML_REQUIRED])
156
 
 
157
 
PKG_CHECK_MODULES([GDL],
158
 
   [gdl-3.0 >= $GDL_REQUIRED])
159
 
 
160
 
PKG_CHECK_MODULES([GDA],
161
 
   [libgda-5.0 >= $GDA5_REQUIRED],,
162
 
   [PKG_CHECK_MODULES([GDA],
163
 
      [libgda-4.0 >= $GDA4_REQUIRED])])
164
 
        
165
 
PKG_CHECK_MODULES([VTE],
166
 
   [vte-2.90 >= $VTE_REQUIRED])
167
 
 
168
 
dnl Check for autogen
169
 
dnl -----------------
170
 
AC_PATH_PROG(AUTOGEN_PATH, autogen,no)
171
 
if test x$AUTOGEN_PATH = xno; then
172
 
   AC_MSG_WARN([Couldn't find autogen. You will be able to build anjuta without autogen \
173
 
                but several things won't work. You can get it from http://autogen.sourceforge.net/])
174
 
fi
175
 
 
176
 
dnl Check for Devhelp
177
 
dnl -----------------
178
 
 
179
 
AC_ARG_ENABLE(plugin-devhelp,
180
 
  AS_HELP_STRING([--disable-plugin-devhelp],[Disable devhelp plugin support in Anjuta.]),
181
 
  [ if test "$enableval" = "no"; then
182
 
       user_disabled_devhelp=1
183
 
    fi ],
184
 
  [ user_disabled_devhelp=0 ] )
185
 
 
186
 
AC_MSG_CHECKING(if devhelp plugin is disabled)
187
 
if test "$user_disabled_devhelp" = 1; then
188
 
        AC_MSG_RESULT(yes)
189
 
        devhelp_enabled="no"
190
 
else
191
 
        AC_MSG_RESULT(no)
192
 
        PKG_CHECK_MODULES(PLUGIN_DEVHELP,
193
 
                                [libdevhelp-3.0 >= $LIBDEVHELP_REQUIRED],
194
 
                                [
195
 
                                    devhelp_enabled=yes
196
 
                                ], [
197
 
                                    devhelp_enabled=no
198
 
                                ])
199
 
fi
200
 
 
201
 
if test "x$devhelp_enabled" = "xyes"; then
202
 
        case "$PLUGIN_DEVHELP_LIBS" in
203
 
                *webkit2gtk-3.0*)
204
 
                        AC_DEFINE([HAVE_WEBKIT2], [1], [Defined if devhelp is built against webkitgtk2])
205
 
                        ;;
206
 
                esac
207
 
fi
208
 
AM_CONDITIONAL(HAVE_PLUGIN_DEVHELP, [test x$devhelp_enabled = xyes])
209
 
 
210
 
dnl Check for Glade3
211
 
dnl ---------------------
212
 
 
213
 
AC_ARG_ENABLE(plugin-glade,
214
 
  AS_HELP_STRING([--disable-plugin-glade],[Disable glade plugin support in Anjuta.]),
215
 
  [ if test "$enableval" = "no"; then
216
 
       user_disabled_glade=1
217
 
    fi ],
218
 
  [ user_disabled_glade=0 ] )
219
 
 
220
 
AC_MSG_CHECKING(if glade plugin is disabled)
221
 
if test "$user_disabled_glade" = 1; then
222
 
        AC_MSG_RESULT(yes)
223
 
        gladeui_found="no"
224
 
else
225
 
        AC_MSG_RESULT(no)
226
 
        gladeui_version=0
227
 
        PKG_CHECK_MODULES(PLUGIN_GLADE, gladeui-2.0 >= $GLADEUI_REQUIRED,
228
 
            [
229
 
                gladeui_found=yes
230
 
            ], [
231
 
                gladeui_found=no
232
 
            ])
233
 
fi
234
 
 
235
 
AM_CONDITIONAL(HAVE_PLUGIN_GLADE, [test x$gladeui_found = xyes])
236
 
 
237
 
dnl Glade catalog
238
 
dnl ---------------------
239
 
 
240
 
AC_ARG_ENABLE(glade-catalog,
241
 
  AS_HELP_STRING([--enable-glade-catalog], [Enable glade catalog. Glade UI libraries must be installed]),
242
 
  [ user_enabled_glade_catalog=1 ],
243
 
  [ user_enabled_glade_catalog=0 ])
244
 
 
245
 
glade_catalog_enabled="no"
246
 
 
247
 
AC_MSG_CHECKING(if glade catalog is enabled)
248
 
if test "$gladeui_found" = "yes"; then
249
 
  if test "$user_enabled_glade_catalog" = 1; then
250
 
    AC_MSG_RESULT(yes)
251
 
    glade_catalog_enabled="yes"
252
 
    GLADE_CATALOG_PATH=`pkg-config --variable=catalogdir gladeui-2.0`
253
 
    GLADE_PLUGINS_PATH=`pkg-config --variable=moduledir gladeui-2.0`
254
 
 
255
 
    AC_SUBST(GLADE_CATALOG_PATH)
256
 
    AC_SUBST(GLADE_PLUGINS_PATH)
257
 
  else
258
 
    AC_MSG_RESULT(no) 
259
 
  fi
260
 
else
261
 
  AC_MSG_RESULT(no)
262
 
fi
263
 
 
264
 
AM_CONDITIONAL(ENABLE_GLADE_CATALOG, [test x$glade_catalog_enabled = xyes])
265
 
 
266
 
dnl Check for gtksourceview
267
 
dnl -------------------------------------------------------------
268
 
PKG_CHECK_MODULES(SOURCEVIEW,
269
 
                [gtksourceview-3.0 >= $GTKSOURCEVIEW_REQUIRED])
270
 
 
271
 
dnl Check for vala
272
 
dnl -------------------------------------------------------------
273
 
 
274
 
AC_ARG_ENABLE(vala,
275
 
        AS_HELP_STRING([--disable-vala],[Disable vala support]),
276
 
        [ if test "$enableval" = "no"; then
277
 
                user_disabled_vala=1
278
 
          fi ],
279
 
        [ user_disabled_vala=0 ])
280
 
 
281
 
AC_MSG_CHECKING(if vala support is disabled)
282
 
if test "$user_disabled_vala" = 1; then
283
 
        AC_MSG_RESULT(yes)
284
 
        enable_vala="no"
285
 
else
286
 
        AC_MSG_RESULT(no)
287
 
        AC_MSG_CHECKING(if libvala is available)
288
 
        PKG_CHECK_EXISTS([ libvala-0.20 ],
289
 
                         [ valaver="-0.20" ],
290
 
                         [ PKG_CHECK_EXISTS([ libvala-0.18 ],
291
 
                                            [ valaver="-0.18" ],
292
 
                                            [ valaver="" ])
293
 
                         ])
294
 
        if test "x$valaver" != "x"; then
295
 
                AC_MSG_RESULT(yes)
296
 
                enable_vala="yes"
297
 
                LIBVALA="libvala${valaver}"
298
 
                PKG_CHECK_MODULES([VALA], ${LIBVALA})
299
 
        else
300
 
                AC_MSG_RESULT(no)
301
 
                enable_vala="no"
302
 
                VALA_REQUIRED=0.18.0
303
 
        fi
304
 
        AC_SUBST(LIBVALA)
305
 
fi
306
 
 
307
 
if test x$enable_vala = xyes; then
308
 
        AC_PATH_PROGS(VALAC, [valac${valaver} valac], valac)
309
 
        AC_SUBST(VALAC)
310
 
fi
311
 
 
312
 
AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes])
313
 
 
314
 
dnl Check for Python
315
 
dnl -------------------------------------------------------------
316
 
 
317
 
AM_PATH_PYTHON([],
318
 
        [have_python="yes"],
319
 
        [have_python="no"])
320
 
 
321
 
if test x$have_python = xyes; then
322
 
        if test -x $PYTHON-config; then
323
 
                PYTHON_CFLAGS=`$PYTHON-config --cflags`
324
 
                PYTHON_LIBS=`$PYTHON-config --libs`
325
 
                AC_SUBST(PYTHON_CFLAGS)
326
 
                AC_SUBST(PYTHON_LIBS)
327
 
        elif test -x $PYTHON$PYTHON_VERSION-config; then
328
 
                PYTHON_CFLAGS=`$PYTHON$PYTHON_VERSION-config --cflags`
329
 
                PYTHON_LIBS=`$PYTHON$PYTHON_VERSION-config --libs`
330
 
                AC_SUBST(PYTHON_CFLAGS)
331
 
                AC_SUBST(PYTHON_LIBS)           
332
 
        else
333
 
                have_python="no"
334
 
                echo "$PYTHON-config or $PYTHON$PYTHON_VERSION-config not found - disabling python"
335
 
        fi
336
 
fi
337
 
 
338
 
AM_CONDITIONAL(HAVE_PYTHON, [test x$have_python = xyes])
339
 
 
340
 
dnl Disable packagekit support
341
 
dnl -----------------------------------
342
 
AC_ARG_ENABLE(packagekit,
343
 
  [AC_HELP_STRING([--disable-packagekit],[build without PackageKit support])],,
344
 
  [enable_packagekit=yes])
345
 
if test "x$enable_packagekit" != "xno"; then
346
 
  AC_DEFINE(ENABLE_PACKAGEKIT, 1, [define to enable PackageKit installer])
347
 
fi
348
 
 
349
 
dnl Setup Anjuta Library flags
350
 
dnl --------------------------
351
 
LIBANJUTA_CFLAGS='$(ANJUTA_CFLAGS) $(GDL_CFLAGS) $(DEPRECATED_FLAGS) -I$(top_srcdir) -I$(top_builddir)/libanjuta -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)"\" -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"'
352
 
LIBANJUTA_LIBS='$(top_builddir)/libanjuta/libanjuta-3.la'
353
 
AC_SUBST(LIBANJUTA_CFLAGS)
354
 
AC_SUBST(LIBANJUTA_LIBS)
355
 
 
356
 
dnl Setup FooCanvas Library flags
357
 
dnl --------------------------
358
 
LIBFOOCANVAS_CFLAGS='-I$(top_srcdir)'
359
 
LIBFOOCANVAS_LIBS='$(top_builddir)/libfoocanvas/libanjuta-foocanvas.la'
360
 
AC_SUBST(LIBFOOCANVAS_CFLAGS)
361
 
AC_SUBST(LIBFOOCANVAS_LIBS)
362
 
 
363
 
dnl Checks for Xft/XRender for foocanvas
364
 
dnl
365
 
AC_CHECK_LIB(Xrender, XRenderFindFormat,
366
 
        [AC_SUBST(RENDER_LIBS, "-lXrender -lXext")
367
 
         AC_DEFINE(HAVE_RENDER, 1, [Define if libXrender is available.])],
368
 
        [AC_SUBST(RENDER_LIBS, "")],
369
 
        [-lXext])
370
 
 
371
 
dnl Setup Plugin directories
372
 
dnl ------------------------
373
 
anjuta_plugin_dir='$(libdir)/anjuta'
374
 
anjuta_data_dir='$(datadir)/anjuta'
375
 
anjuta_ui_dir='$(datadir)/anjuta/ui'
376
 
anjuta_glade_dir='$(datadir)/anjuta/glade'
377
 
anjuta_image_dir='$(datadir)/pixmaps/anjuta'
378
 
AC_SUBST(anjuta_plugin_dir)
379
 
AC_SUBST(anjuta_data_dir)
380
 
AC_SUBST(anjuta_ui_dir)
381
 
AC_SUBST(anjuta_glade_dir)
382
 
AC_SUBST(anjuta_image_dir)
383
 
 
384
 
dnl ***************************************************************************
385
 
dnl Check for marshal and enum generators
386
 
dnl ***************************************************************************
387
 
GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
388
 
AC_SUBST(GLIB_GENMARSHAL)
389
 
GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
390
 
AC_SUBST(GLIB_MKENUMS)
391
 
 
392
 
dnl ***************************************************************************
393
 
dnl Internatinalization
394
 
dnl ***************************************************************************
395
 
IT_PROG_INTLTOOL([0.40.1])
396
 
 
397
 
GETTEXT_PACKAGE=anjuta
398
 
AC_SUBST(GETTEXT_PACKAGE)
399
 
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
400
 
 
401
 
BISON_I18N
402
 
 
403
 
dnl ***************************************************************************
404
 
dnl Check for gtk-doc.
405
 
dnl ***************************************************************************
406
 
GTK_DOC_CHECK([1.4])
407
 
 
408
 
dnl ***************************************************************************
409
 
dnl User manual
410
 
dnl ***************************************************************************
411
 
YELP_HELP_INIT
412
 
 
413
 
dnl Define convenience macros
414
 
dnl -------------------------
415
 
dnl CHECK_HEADER_DEFINE(LABEL, HEADER [,ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ] ])
416
 
AC_DEFUN([CHECK_HEADER_DEFINE],
417
 
[
418
 
        AC_MSG_CHECKING("if $1 is defined in $2")
419
 
        AC_EGREP_CPP(yes,
420
 
[#include <$2>
421
 
#ifdef $1
422
 
  yes
423
 
#endif
424
 
], [
425
 
        AC_MSG_RESULT(yes)
426
 
        $3
427
 
], [
428
 
        AC_MSG_RESULT(no)
429
 
        $4
430
 
]) ])
431
 
 
432
 
dnl Checks for header files.
433
 
AC_CHECK_HEADERS(dirent.h fcntl.h fnmatch.h stat.h stdlib.h string.h stdint.h)
434
 
AC_CHECK_HEADERS(time.h types.h unistd.h)
435
 
AC_CHECK_HEADERS(sys/dir.h sys/stat.h sys/times.h sys/types.h)
436
 
 
437
 
dnl Checks for typedefs, structures, and compiler characteristics.
438
 
 
439
 
AC_CANONICAL_HOST
440
 
CYGWIN=no
441
 
MINGW32=no
442
 
case $host_os in
443
 
  *cygwin* ) CYGWIN=yes;;
444
 
  *mingw32* ) MINGW32=yes;;
445
 
esac
446
 
 
447
 
 
448
 
dnl Check for bind in libsocket (needed on Solaris)
449
 
AC_CHECK_LIB(socket, bind)
450
 
 
451
 
dnl Check for function forkpty and related headers
452
 
AC_SEARCH_LIBS(forkpty, util, , AC_DEFINE(EMULATE_FORKPTY, [], [Need  to implement our own forkpty()]))
453
 
AC_CHECK_HEADERS(libutil.h util.h pty.h)
454
 
 
455
 
dnl Checks for library functions.
456
 
AC_CHECK_FUNCS(fnmatch)
457
 
AC_CHECK_FUNCS(strstr)
458
 
AC_CHECK_FUNCS(stricmp)
459
 
AC_CHECK_FUNCS(strnicmp)
460
 
AC_CHECK_FUNCS(getline)
461
 
 
462
 
dnl for libegg/egg-recent-model.c
463
 
AC_CHECK_DECLS([lockf])
464
 
AC_CHECK_FUNCS([lockf])
465
 
 
466
 
AC_CHECK_FUNCS(fgetpos, have_fgetpos=yes)
467
 
 
468
 
dnl SEEK_SET should be in stdio.h, but may be in unistd.h on SunOS 4.1.x
469
 
if test "$have_fgetpos" != yes ; then
470
 
    CHECK_HEADER_DEFINE(SEEK_SET, stdio.h,,
471
 
        CHECK_HEADER_DEFINE(SEEK_SET, unistd.h,,
472
 
            AC_DEFINE(SEEK_SET, 0, [Seek set 0])))
473
 
fi
474
 
 
475
 
AC_CHECK_FUNCS(mkstemp, have_mkstemp=yes)
476
 
if test "$have_mkstemp" != yes ; then
477
 
    AC_CHECK_FUNCS(chmod)
478
 
    if test "$tmpdir_specified" = yes ; then
479
 
        AC_MSG_RESULT(use of tmpnam overrides temporary directory selection)
480
 
    fi
481
 
else
482
 
    AC_MSG_CHECKING(directory to use for temporary files)
483
 
    if test -z "$enable_tmpdir" -o "$enable_tmpdir" = no -o "$enable_tmpdir" = yes ;
484
 
        then tmpdir=/tmp
485
 
        else tmpdir="$enable_tmpdir"
486
 
    fi
487
 
    if test -d $tmpdir ; then
488
 
        AC_MSG_RESULT($tmpdir)
489
 
        AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir", [Directory for temporary files])
490
 
    else
491
 
        AC_MSG_WARN($tmpdir does not exist)
492
 
    fi
493
 
fi
494
 
 
495
 
dnl -----------------------------
496
 
dnl Checks for FreeBSD Build
497
 
dnl -----------------------------
498
 
AC_MSG_CHECKING(if building on FreeBSD)
499
 
 
500
 
if test `uname -s` = "FreeBSD" ; then
501
 
        AC_MSG_RESULT(yes)
502
 
        FREEBSD_BUILD=-DFREEBSD
503
 
        AC_SUBST(FREEBSD_BUILD)
504
 
        AC_PATH_PROG(GMAKE, gmake, no)
505
 
        if test "x$GMAKE" = "xno"; then
506
 
                AC_MSG_ERROR(You need gmake installed to build Anjuta!)
507
 
        fi
508
 
else
509
 
        AC_MSG_RESULT(no)
510
 
        GMAKE="make"
511
 
fi
512
 
 
513
 
AC_SUBST(GMAKE)
514
 
 
515
 
dnl Checks for missing prototypes
516
 
dnl -----------------------------
517
 
AC_MSG_NOTICE([checking for missing prototypes...])
518
 
 
519
 
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))])
520
 
 
521
 
if test "$have_remove" = yes ; then
522
 
    CHECK_PROTO(remove, stdio.h)
523
 
else
524
 
    CHECK_PROTO(unlink, unistd.h)
525
 
fi
526
 
CHECK_PROTO(malloc, stdlib.h)
527
 
CHECK_PROTO(getenv, stdlib.h)
528
 
CHECK_PROTO(stat,   sys/stat.h)
529
 
CHECK_PROTO(lstat,  sys/stat.h)
530
 
if test "$have_fgetpos" = yes ; then
531
 
    CHECK_PROTO(fgetpos, stdio.h)
532
 
fi
533
 
if test "$have_truncate" = yes ; then
534
 
    CHECK_PROTO(truncate, unistd.h)
535
 
fi
536
 
if test "$have_ftruncate" = yes ; then
537
 
    CHECK_PROTO(ftruncate, unistd.h)
538
 
fi
539
 
 
540
 
dnl  **********************************************************
541
 
dnl  check if we have svn libraries to build subversion plugin
542
 
dnl  (stolen from kdevelop ;-)
543
 
dnl  **********************************************************
544
 
 
545
 
AC_MSG_CHECKING(for Subversion svn-config)
546
 
AC_ARG_WITH(subversion-dir,
547
 
                AS_HELP_STRING([--with-subversion-dir=DIR],[Where Subversion is installed ]),
548
 
                [
549
 
                                SVNCONFIG="$withval/bin/svn-config"
550
 
                ])
551
 
 
552
 
if test -z "$SVNCONFIG"; then
553
 
                _SVNCONFIG="`svn-config --prefix 2> /dev/null`"
554
 
                if test -n "$_SVNCONFIG"; then
555
 
                                SVNCONFIG="$_SVNCONFIG/bin/svn-config"
556
 
                fi
557
 
fi
558
 
 
559
 
AC_SUBST(SVNCONFIG)
560
 
if test -x "$SVNCONFIG"; then
561
 
                SVNLD="`$SVNCONFIG --ldflags 2> /dev/null`"
562
 
                SVN_LIB="`$SVNCONFIG --libs --cflags 2> /dev/null` -lsvn_client-1 -lsvn_subr-1"
563
 
                dnl ugly hack for subversion svn-config problems in 0.14.x, to be removed when svn-config is fixed
564
 
                SVN_INCLUDE="`$SVNCONFIG --includes 2> /dev/null` -I$_SVNCONFIG/include/subversion-1/"
565
 
                AC_MSG_RESULT(yes)
566
 
else
567
 
                AC_MSG_RESULT(not found)
568
 
 
569
 
                dnl just a fallback to debian's config so that it works for me :)
570
 
                AC_ARG_WITH(svn-include,
571
 
                                                                [[  --with-svn-include=DIR   Use the given path to the subversion headers.]],
572
 
                                                                [
573
 
                                                                if test "$withval" != "yes" -a "$withval" != ""; then
574
 
                                                                                SVN_INCLUDES=$withval
575
 
                                                                fi
576
 
                                                                ])
577
 
                if test -z "$SVN_INCLUDES"; then
578
 
                        SVN_INCLUDES="/usr/local/include /usr/include"
579
 
                fi
580
 
                AC_MSG_CHECKING([for Subversion headers])
581
 
                SVN_INCLUDE=""
582
 
                for VALUE in $SVN_INCLUDES ; do
583
 
                                if test -f $VALUE/subversion-1/svn_types.h ; then
584
 
                                                SVN_INCLUDE=$VALUE/subversion-1
585
 
                                                break
586
 
                                fi
587
 
                                if test -f $VALUE/svn_types.h ; then
588
 
                                                SVN_INCLUDE=$VALUE
589
 
                                                break
590
 
                                fi
591
 
                done
592
 
                if test $SVN_INCLUDE ; then
593
 
                                AC_MSG_RESULT([found])
594
 
                else
595
 
                                AC_MSG_RESULT([not found])
596
 
                fi
597
 
                SVN_LIBS="/usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib"
598
 
                AC_ARG_WITH(svn-lib,
599
 
                                                [[  --with-svn-lib=DIR  Use the given path to the subversion libraries.]],
600
 
                                                [
601
 
                                                        if test "$withval" != "yes" -a "$withval" != ""; then
602
 
                                                                SVN_LIBS=$withval
603
 
                                                        fi
604
 
                                                ])
605
 
                AC_MSG_CHECKING([for Subversion libraries])
606
 
                SVN_LIB=""
607
 
                for VALUE in $SVN_LIBS ; do
608
 
                                if ls $VALUE/libsvn_client-1.* 1>/dev/null 2>&1; then
609
 
                                                SVN_LIB=$VALUE
610
 
                                                break
611
 
                                fi
612
 
                done
613
 
                if test $SVN_LIB ; then
614
 
                                AC_MSG_RESULT([found])
615
 
                else
616
 
                                AC_MSG_RESULT([not found])
617
 
                fi
618
 
fi
619
 
 
620
 
dnl ******************************************************************
621
 
dnl Check for extra libs required by subversion.
622
 
dnl FIXME: This should actually be done by subversion and not by us.
623
 
dnl ******************************************************************
624
 
 
625
 
AC_ARG_ENABLE(plugin-subversion,
626
 
  AS_HELP_STRING([--disable-plugin-subversion],[Disable subversion support in Anjuta.]),
627
 
  [ if test "$enableval" = "no"; then
628
 
        user_disabled_subversion=1
629
 
    fi ],
630
 
  [ user_disabled_subversion=0 ] )
631
 
 
632
 
AC_MSG_CHECKING(if subversion support is disabled)
633
 
if test "$user_disabled_subversion" = 1; then
634
 
        AC_MSG_RESULT(yes)
635
 
        SVN_INCLUDE=""
636
 
        SVN_LIB=""
637
 
else
638
 
        AC_MSG_RESULT(no)
639
 
fi
640
 
 
641
 
if test -n "$SVN_INCLUDE" ; then
642
 
        dnl ------------------------------------
643
 
        dnl APR. Required by subversion (devel)
644
 
        dnl ------------------------------------
645
 
        have_atr=no
646
 
        PKG_CHECK_MODULES(APR,                            \
647
 
                apr-1, have_apr=yes, have_apr=no)
648
 
        if test x"$have_apr" = "xno"; then
649
 
                SVN_INCLUDE=""
650
 
        fi
651
 
 
652
 
        dnl -----------------------------------------
653
 
        dnl APR util. Required by subversion (devel)
654
 
        dnl------------------------------------------
655
 
        have_atr_util=no
656
 
        PKG_CHECK_MODULES(APR_UTILS,                            \
657
 
                apr-util-1, have_apr_util=yes, have_apr_util=no)
658
 
        if test x"$have_apr_util" = "xno"; then
659
 
                SVN_INCLUDE=""
660
 
        fi
661
 
 
662
 
        dnl -----------------------------------------
663
 
        dnl NEON. Required by subversion (devel)
664
 
        dnl------------------------------------------
665
 
        have_neon=no
666
 
        PKG_CHECK_MODULES(NEON,                            \
667
 
                neon, have_neon=yes, have_neon=no)
668
 
        if test x"$have_neon" = "xno"; then
669
 
                SVN_INCLUDE=""
670
 
        fi
671
 
 
672
 
        dnl Make sure our SVN version is high enough
673
 
        dnl Eww, eww, eww, this is dirty
674
 
        AC_MSG_CHECKING([for subversion >= $SUBVERSION_REQUIRED])
675
 
        AC_LANG([C])
676
 
        dnl Temporarily set CFLAGS so that include dirs are found
677
 
        CFLAGS_TMP=$CFLAGS
678
 
        CFLAGS="-I$SVN_INCLUDE $APR_CFLAGS"
679
 
        AC_COMPILE_IFELSE(
680
 
                [AC_LANG_PROGRAM([[#include <svn_version.h>]],
681
 
                        [[
682
 
                                #if (SVN_VER_MAJOR < $SVN_MAJOR) || (SVN_VER_MINOR < $SVN_MINOR) || (SVN_VER_PATCH < $SVN_PATCH)
683
 
                                #       error "Version too low"
684
 
                                #endif
685
 
                        ]])], AC_MSG_RESULT(yes), have_svn_version=no)
686
 
        if test x"$have_svn_version" = "xno"; then
687
 
                AC_MSG_RESULT(no)
688
 
                SVN_INCLUDE=""
689
 
        fi
690
 
        CFLAGS=$CFLAGS_TMP
691
 
fi
692
 
 
693
 
dnl ------------------------------------------
694
 
dnl Finally prepare subversion build flags
695
 
dnl ------------------------------------------
696
 
 
697
 
if test -n "$SVN_INCLUDE" ; then
698
 
        SVN_INCLUDE="-I$SVN_INCLUDE"
699
 
        if test x != "x$SVN_LIB" ; then
700
 
            SVN_LIB="-L$SVN_LIB $APR_LIBS $APR_UTILS_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
701
 
        else
702
 
            SVN_LIB="$APR_LIBS $APR_UTILS_LIBS $NEON_LIBS -lsvn_client-1 -lsvn_subr-1"
703
 
        fi
704
 
        SVN_CFLAGS="$APR_CFLAGS $APR_UTILS_CFLAGS $NEON_CFLAGS"
705
 
fi
706
 
 
707
 
AM_CONDITIONAL(BUILD_SVN, [test -n "$SVN_INCLUDE"])
708
 
AC_SUBST(SVN_INCLUDE)
709
 
AC_SUBST(SVN_LIB)
710
 
AC_SUBST(SVN_CFLAGS)
711
 
 
712
 
dnl ------------------------------------------
713
 
dnl Symbol-db shared memory checks
714
 
dnl ------------------------------------------
715
 
 
716
 
SYMBOL_DB_SHM="/dev/shm"
717
 
user_specified_shm=0
718
 
AC_MSG_CHECKING(for symbol-db shared memory)
719
 
AC_ARG_WITH(symbol-db-shm,
720
 
                AS_HELP_STRING([--with-symbol-db-shm=DIR],[Where shared memory is placed ]),
721
 
                [
722
 
                                user_specified_shm=1
723
 
                                SYMBOL_DB_SHM="$withval"
724
 
                ])
725
 
if test "$user_specified_shm" = 1; then
726
 
        AC_MSG_RESULT(yes)
727
 
else
728
 
        AC_MSG_RESULT(no)
729
 
fi
730
 
 
731
 
AC_SUBST(SYMBOL_DB_SHM)
732
 
 
733
 
dnl Test using autotest
734
 
dnl -----------------------------
735
 
AC_CONFIG_TESTDIR(plugins/am-project/tests)
736
 
AM_MISSING_PROG([AUTOM4TE], [autom4te])
737
 
 
738
 
AC_CONFIG_FILES([
739
 
Makefile
740
 
po/Makefile.in
741
 
libanjuta/Makefile
742
 
libanjuta/tests/Makefile
743
 
libanjuta/interfaces/Makefile
744
 
libanjuta/libanjuta-3.0.pc
745
 
libanjuta/anjuta-version.h
746
 
src/Makefile
747
 
pixmaps/Makefile
748
 
pixmaps/16x16/Makefile
749
 
pixmaps/22x22/Makefile
750
 
pixmaps/24x24/Makefile
751
 
pixmaps/32x32/Makefile
752
 
pixmaps/48x48/Makefile
753
 
pixmaps/scalable/Makefile
754
 
data/Makefile
755
 
data/welcome.txt
756
 
data/templates/Makefile
757
 
doc/anjuta.1
758
 
doc/anjuta-launcher.1
759
 
doc/Makefile
760
 
scripts/Makefile
761
 
launcher/Makefile
762
 
plugins/Makefile
763
 
plugins/class-gen/Makefile
764
 
plugins/class-gen/templates/Makefile
765
 
plugins/patch/Makefile
766
 
plugins/document-manager/Makefile
767
 
plugins/document-manager/images/Makefile
768
 
plugins/message-view/Makefile
769
 
plugins/gdb/Makefile
770
 
plugins/gdb/images/Makefile
771
 
plugins/debug-manager/Makefile
772
 
plugins/debug-manager/images/Makefile
773
 
plugins/devhelp/Makefile
774
 
plugins/devhelp/images/Makefile
775
 
plugins/glade/Makefile
776
 
plugins/glade/images/Makefile
777
 
plugins/js-debugger/Makefile
778
 
plugins/file-manager/Makefile
779
 
plugins/file-loader/Makefile
780
 
plugins/file-wizard/Makefile
781
 
plugins/build-basic-autotools/Makefile
782
 
plugins/project-manager/Makefile
783
 
plugins/symbol-db/benchmark/Makefile
784
 
plugins/symbol-db/benchmark/symbol-db/Makefile
785
 
plugins/symbol-db/benchmark/libgda/Makefile
786
 
plugins/symbol-db/benchmark/sqlite/Makefile
787
 
plugins/symbol-db/images/Makefile
788
 
plugins/symbol-db/Makefile
789
 
plugins/symbol-db/anjuta-tags/Makefile
790
 
plugins/project-wizard/Makefile
791
 
plugins/snippets-manager/Makefile
792
 
plugins/cvs-plugin/Makefile
793
 
plugins/subversion/Makefile
794
 
plugins/git/Makefile
795
 
plugins/git/images/Makefile
796
 
plugins/sourceview/Makefile
797
 
plugins/terminal/Makefile
798
 
plugins/tools/Makefile
799
 
plugins/tools/scripts/Makefile
800
 
plugins/language-manager/Makefile
801
 
plugins/project-import/Makefile
802
 
plugins/project-wizard/templates/Makefile
803
 
plugins/project-wizard/templates/mkfile/Makefile
804
 
plugins/project-wizard/templates/mkfile/src/Makefile
805
 
plugins/project-wizard/templates/mkfile/po/Makefile
806
 
plugins/project-wizard/templates/minimal/Makefile
807
 
plugins/project-wizard/templates/js_minimal/Makefile
808
 
plugins/project-wizard/templates/js_minimal/src/Makefile
809
 
plugins/project-wizard/templates/terminal/Makefile
810
 
plugins/project-wizard/templates/terminal/src/Makefile
811
 
plugins/project-wizard/templates/terminal/po/Makefile
812
 
plugins/project-wizard/templates/cpp/Makefile
813
 
plugins/project-wizard/templates/cpp/src/Makefile
814
 
plugins/project-wizard/templates/cpp/po/Makefile
815
 
plugins/project-wizard/templates/gtk/Makefile
816
 
plugins/project-wizard/templates/gtk/src/Makefile
817
 
plugins/project-wizard/templates/gtk/po/Makefile
818
 
plugins/project-wizard/templates/gtkapplication/Makefile
819
 
plugins/project-wizard/templates/gtkapplication/src/Makefile
820
 
plugins/project-wizard/templates/gtkapplication/po/Makefile
821
 
plugins/project-wizard/templates/anjuta-plugin/Makefile
822
 
plugins/project-wizard/templates/anjuta-plugin/src/Makefile
823
 
plugins/project-wizard/templates/anjuta-plugin/po/Makefile
824
 
plugins/project-wizard/templates/gtkmm/Makefile
825
 
plugins/project-wizard/templates/gtkmm/src/Makefile
826
 
plugins/project-wizard/templates/gtkmm/po/Makefile
827
 
plugins/project-wizard/templates/gcj/Makefile
828
 
plugins/project-wizard/templates/gcj/src/Makefile
829
 
plugins/project-wizard/templates/java/Makefile
830
 
plugins/project-wizard/templates/java/src/Makefile
831
 
plugins/project-wizard/templates/java/po/Makefile
832
 
plugins/project-wizard/templates/python/Makefile
833
 
plugins/project-wizard/templates/python/src/Makefile
834
 
plugins/project-wizard/templates/python/po/Makefile
835
 
plugins/project-wizard/templates/pygtk/Makefile
836
 
plugins/project-wizard/templates/pygtk/src/Makefile
837
 
plugins/project-wizard/templates/pygtk/po/Makefile
838
 
plugins/project-wizard/templates/vala-gtk/Makefile
839
 
plugins/project-wizard/templates/vala-gtk/src/Makefile
840
 
plugins/project-wizard/templates/wxwin/Makefile
841
 
plugins/project-wizard/templates/wxwin/src/Makefile
842
 
plugins/project-wizard/templates/wxwin/po/Makefile
843
 
plugins/project-wizard/templates/xlib/Makefile
844
 
plugins/project-wizard/templates/xlib/src/Makefile
845
 
plugins/project-wizard/templates/xlib/po/Makefile
846
 
plugins/project-wizard/templates/xlib-dock/Makefile
847
 
plugins/project-wizard/templates/xlib-dock/src/Makefile
848
 
plugins/project-wizard/templates/xlib-dock/po/Makefile
849
 
plugins/project-wizard/templates/sdl/Makefile
850
 
plugins/project-wizard/templates/sdl/src/Makefile
851
 
plugins/project-wizard/templates/sdl/po/Makefile
852
 
plugins/project-wizard/templates/library/Makefile
853
 
plugins/project-wizard/templates/library/src/Makefile
854
 
plugins/project-wizard/templates/library/po/Makefile
855
 
plugins/project-wizard/templates/directory/Makefile
856
 
plugins/project-wizard/templates/m4/Makefile
857
 
plugins/project-wizard/templates/gnome-shell-extension/Makefile
858
 
plugins/project-wizard/templates/gnome-shell-extension/src/Makefile
859
 
plugins/am-project/Makefile
860
 
plugins/am-project/tests/atlocal
861
 
plugins/am-project/tests/Makefile
862
 
plugins/mk-project/Makefile
863
 
plugins/dir-project/Makefile
864
 
plugins/language-support-cpp-java/Makefile
865
 
plugins/run-program/Makefile
866
 
plugins/starter/Makefile
867
 
plugins/indentation-c-style/Makefile
868
 
plugins/indentation-python-style/Makefile
869
 
plugins/language-support-js/Makefile
870
 
plugins/language-support-vala/Makefile
871
 
plugins/language-support-python/Makefile
872
 
plugins/parser-cxx/Makefile
873
 
plugins/parser-cxx/cxxparser/Makefile
874
 
plugins/python-loader/Makefile
875
 
plugins/jhbuild/Makefile
876
 
plugins/quick-open/Makefile
877
 
anjuta.desktop.in
878
 
manuals/Makefile
879
 
manuals/reference/Makefile
880
 
manuals/reference/libanjuta/Makefile
881
 
manuals/reference/libanjuta/version.xml
882
 
manuals/anjuta-manual/Makefile
883
 
manuals/anjuta-faqs/Makefile
884
 
manuals/anjuta-build-tutorial/Makefile
885
 
mime/Makefile
886
 
])
887
 
AC_OUTPUT
888
 
echo " "
889
 
echo "-------------------------------------------------------------------"
890
 
echo "Conditionally built plugins:"
891
 
echo "-------------------------------------------------------------------"
892
 
if [ test -n "$SVN_INCLUDE" ]; then
893
 
        echo "Building subversion plugin: ............................YES"
894
 
else
895
 
        echo "Building subversion plugin: ............................NO"
896
 
                echo "        Requires apr (>= 0.9.4); http://subversion.org"
897
 
                echo "        Requires apr-util (>= 0.9.4); http://subversion.org"
898
 
                echo "        Requires neon (>= 0.28.2); http://subversion.org"
899
 
                echo "        Requires subversion (>= 1.5); http://subversion.org"
900
 
fi
901
 
 
902
 
if [ test x$gladeui_found = xyes ]; then
903
 
       echo "Building glade plugin: .................................YES"
904
 
else
905
 
       echo "Building glade plugin: .................................NO"
906
 
       echo "        Requires glade-3 (>= $GLADEUI_REQUIRED)"
907
 
fi
908
 
 
909
 
if [ test x$devhelp_enabled = xyes ]; then
910
 
       echo "Building devhelp plugin: ...............................YES"
911
 
else
912
 
       echo "Building devhelp plugin: ...............................NO"
913
 
       echo "        Requires libdevhelp-3.0 (>= $LIBDEVHELP_REQUIRED)"
914
 
fi
915
 
if [ test x$enable_vala = xyes ]; then
916
 
        echo "Building Vala support: .................................YES"
917
 
else
918
 
        echo "Building Vala support: .................................NO"
919
 
        echo "        Requires libvala (>= $VALA_REQUIRED)"
920
 
fi
921
 
if [ test x$have_python = xyes]; then
922
 
        echo "Building python plugin loaeder: ........................YES"
923
 
else
924
 
        echo "Building python plugin loaeder: ........................NO"
925
 
        echo "        Requires python"
926
 
fi
927
 
echo "-------------------------------------------------------------------"
928
 
echo "AM_CFLAGS = $AM_CFLAGS"
929
 
echo "AM_CXXFLAGS = $AM_CXXFLAGS"