~ubuntu-branches/ubuntu/gutsy/libbonoboui/gutsy

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-01-24 11:47:06 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20070124114706-6qjybegllw5bweh7
Tags: 2.17.90-0ubuntu1
* New upstream release.
* debian/control.in:
  - added libgnomevfs2-dev (>= 2.8) to Build-Depends/Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.10 -*- Autoconf -*-
2
2
 
3
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
 
# 2005  Free Software Foundation, Inc.
 
4
# 2005, 2006  Free Software Foundation, Inc.
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
7
7
# with or without modifications, as long as this notice is preserved.
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
 
14
m4_if(m4_PACKAGE_VERSION, [2.61],,
 
15
[m4_fatal([this file was generated for autoconf 2.61.
 
16
You have another version of autoconf.  If you want to use that,
 
17
you should regenerate the build system entirely.], [63])])
 
18
 
 
19
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
20
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
21
#
 
22
# This file is free software, distributed under the terms of the GNU
 
23
# General Public License.  As a special exception to the GNU General
 
24
# Public License, this file may be distributed as part of a program
 
25
# that contains a configuration script generated by Autoconf, under
 
26
# the same distribution terms as the rest of that program.
 
27
#
 
28
# This file can be copied and used freely without restrictions.  It can
 
29
# be used in projects which are not available under the GNU Public License
 
30
# but which still want to provide support for the GNU gettext functionality.
 
31
#
 
32
# Macro to add for using GNU gettext.
 
33
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
34
#
 
35
# Modified to never use included libintl. 
 
36
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
37
#
 
38
# Major rework to remove unused code
 
39
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
40
#
 
41
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
42
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
43
#
 
44
# Modified to require ngettext
 
45
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
46
#
 
47
# We need this here as well, since someone might use autoconf-2.5x
 
48
# to configure GLib then an older version to configure a package
 
49
# using AM_GLIB_GNU_GETTEXT
 
50
AC_PREREQ(2.53)
 
51
 
 
52
dnl
 
53
dnl We go to great lengths to make sure that aclocal won't 
 
54
dnl try to pull in the installed version of these macros
 
55
dnl when running aclocal in the glib directory.
 
56
dnl
 
57
m4_copy([AC_DEFUN],[glib_DEFUN])
 
58
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
59
dnl
 
60
dnl At the end, if we're not within glib, we'll define the public
 
61
dnl definitions in terms of our private definitions.
 
62
dnl
 
63
 
 
64
# GLIB_LC_MESSAGES
 
65
#--------------------
 
66
glib_DEFUN([GLIB_LC_MESSAGES],
 
67
  [AC_CHECK_HEADERS([locale.h])
 
68
    if test $ac_cv_header_locale_h = yes; then
 
69
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
70
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
71
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
72
    if test $am_cv_val_LC_MESSAGES = yes; then
 
73
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
74
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
75
    fi
 
76
  fi])
 
77
 
 
78
# GLIB_PATH_PROG_WITH_TEST
 
79
#----------------------------
 
80
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
81
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
82
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
83
[# Extract the first word of "$2", so it can be a program name with args.
 
84
set dummy $2; ac_word=[$]2
 
85
AC_MSG_CHECKING([for $ac_word])
 
86
AC_CACHE_VAL(ac_cv_path_$1,
 
87
[case "[$]$1" in
 
88
  /*)
 
89
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
90
  ;;
 
91
  *)
 
92
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
93
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
94
    test -z "$ac_dir" && ac_dir=.
 
95
    if test -f $ac_dir/$ac_word; then
 
96
      if [$3]; then
 
97
        ac_cv_path_$1="$ac_dir/$ac_word"
 
98
        break
 
99
      fi
 
100
    fi
 
101
  done
 
102
  IFS="$ac_save_ifs"
 
103
dnl If no 4th arg is given, leave the cache variable unset,
 
104
dnl so AC_PATH_PROGS will keep looking.
 
105
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
106
])dnl
 
107
  ;;
 
108
esac])dnl
 
109
$1="$ac_cv_path_$1"
 
110
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
111
  AC_MSG_RESULT([$]$1)
 
112
else
 
113
  AC_MSG_RESULT(no)
 
114
fi
 
115
AC_SUBST($1)dnl
 
116
])
 
117
 
 
118
# GLIB_WITH_NLS
 
119
#-----------------
 
120
glib_DEFUN([GLIB_WITH_NLS],
 
121
  dnl NLS is obligatory
 
122
  [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
123
    USE_NLS=yes
 
124
    AC_SUBST(USE_NLS)
 
125
 
 
126
    gt_cv_have_gettext=no
 
127
 
 
128
    CATOBJEXT=NONE
 
129
    XGETTEXT=:
 
130
    INTLLIBS=
 
131
 
 
132
    AC_CHECK_HEADER(libintl.h,
 
133
     [gt_cv_func_dgettext_libintl="no"
 
134
      libintl_extra_libs=""
 
135
 
 
136
      #
 
137
      # First check in libc
 
138
      #
 
139
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
140
        [AC_TRY_LINK([
 
141
#include <libintl.h>
 
142
],
 
143
         [return !ngettext ("","", 1)],
 
144
          gt_cv_func_ngettext_libc=yes,
 
145
          gt_cv_func_ngettext_libc=no)
 
146
        ])
 
147
  
 
148
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
149
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
150
                [AC_TRY_LINK([
 
151
#include <libintl.h>
 
152
],
 
153
                  [return !dgettext ("","")],
 
154
                  gt_cv_func_dgettext_libc=yes,
 
155
                  gt_cv_func_dgettext_libc=no)
 
156
                ])
 
157
      fi
 
158
  
 
159
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
160
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
161
      fi
 
162
 
 
163
      #
 
164
      # If we don't have everything we want, check in libintl
 
165
      #
 
166
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
167
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
168
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
169
        
 
170
        AC_CHECK_LIB(intl, bindtextdomain,
 
171
            [AC_CHECK_LIB(intl, ngettext,
 
172
                    [AC_CHECK_LIB(intl, dgettext,
 
173
                                  gt_cv_func_dgettext_libintl=yes)])])
 
174
 
 
175
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
176
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
177
          AC_MSG_RESULT([])
 
178
          AC_CHECK_LIB(intl, ngettext,
 
179
                [AC_CHECK_LIB(intl, dcgettext,
 
180
                       [gt_cv_func_dgettext_libintl=yes
 
181
                        libintl_extra_libs=-liconv],
 
182
                        :,-liconv)],
 
183
                :,-liconv)
 
184
        fi
 
185
 
 
186
        #
 
187
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
188
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
189
        # and both have dgettext and ngettext
 
190
        #
 
191
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
192
          glib_save_LIBS="$LIBS"
 
193
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
194
          unset ac_cv_func_bind_textdomain_codeset
 
195
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
196
          LIBS="$glib_save_LIBS"
 
197
 
 
198
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
199
            gt_cv_func_dgettext_libc=no
 
200
          else
 
201
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
202
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
203
              gt_cv_func_dgettext_libintl=no
 
204
            fi
 
205
          fi
 
206
        fi
 
207
      fi
 
208
 
 
209
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
210
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
211
        gt_cv_have_gettext=yes
 
212
      fi
 
213
  
 
214
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
215
        INTLLIBS="-lintl $libintl_extra_libs"
 
216
      fi
 
217
  
 
218
      if test "$gt_cv_have_gettext" = "yes"; then
 
219
        AC_DEFINE(HAVE_GETTEXT,1,
 
220
          [Define if the GNU gettext() function is already present or preinstalled.])
 
221
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
222
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
223
        if test "$MSGFMT" != "no"; then
 
224
          glib_save_LIBS="$LIBS"
 
225
          LIBS="$LIBS $INTLLIBS"
 
226
          AC_CHECK_FUNCS(dcgettext)
 
227
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
228
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
229
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
230
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
231
                         return _nl_msg_cat_cntr],
 
232
            [CATOBJEXT=.gmo 
 
233
             DATADIRNAME=share],
 
234
            [case $host in
 
235
            *-*-solaris*)
 
236
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
237
            dnl GNU format message catalog is always supported,
 
238
            dnl since both are added to the libc all together.
 
239
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
240
            dnl and CATOBJEXT=.gmo in this case.
 
241
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
242
              [CATOBJEXT=.gmo 
 
243
               DATADIRNAME=share],
 
244
              [CATOBJEXT=.mo
 
245
               DATADIRNAME=lib])
 
246
            ;;
 
247
            *)
 
248
            CATOBJEXT=.mo
 
249
            DATADIRNAME=lib
 
250
            ;;
 
251
            esac])
 
252
          LIBS="$glib_save_LIBS"
 
253
          INSTOBJEXT=.mo
 
254
        else
 
255
          gt_cv_have_gettext=no
 
256
        fi
 
257
      fi
 
258
    ])
 
259
 
 
260
    if test "$gt_cv_have_gettext" = "yes" ; then
 
261
      AC_DEFINE(ENABLE_NLS, 1,
 
262
        [always defined to indicate that i18n is enabled])
 
263
    fi
 
264
 
 
265
    dnl Test whether we really found GNU xgettext.
 
266
    if test "$XGETTEXT" != ":"; then
 
267
      dnl If it is not GNU xgettext we define it as : so that the
 
268
      dnl Makefiles still can work.
 
269
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
270
        : ;
 
271
      else
 
272
        AC_MSG_RESULT(
 
273
          [found xgettext program is not GNU xgettext; ignore it])
 
274
        XGETTEXT=":"
 
275
      fi
 
276
    fi
 
277
 
 
278
    # We need to process the po/ directory.
 
279
    POSUB=po
 
280
 
 
281
    AC_OUTPUT_COMMANDS(
 
282
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
283
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
284
      esac])
 
285
 
 
286
    dnl These rules are solely for the distribution goal.  While doing this
 
287
    dnl we only have to keep exactly one list of the available catalogs
 
288
    dnl in configure.in.
 
289
    for lang in $ALL_LINGUAS; do
 
290
      GMOFILES="$GMOFILES $lang.gmo"
 
291
      POFILES="$POFILES $lang.po"
 
292
    done
 
293
 
 
294
    dnl Make all variables we use known to autoconf.
 
295
    AC_SUBST(CATALOGS)
 
296
    AC_SUBST(CATOBJEXT)
 
297
    AC_SUBST(DATADIRNAME)
 
298
    AC_SUBST(GMOFILES)
 
299
    AC_SUBST(INSTOBJEXT)
 
300
    AC_SUBST(INTLLIBS)
 
301
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
302
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
303
    AC_SUBST(POFILES)
 
304
    AC_SUBST(POSUB)
 
305
  ])
 
306
 
 
307
# AM_GLIB_GNU_GETTEXT
 
308
# -------------------
 
309
# Do checks necessary for use of gettext. If a suitable implementation 
 
310
# of gettext is found in either in libintl or in the C library,
 
311
# it will set INTLLIBS to the libraries needed for use of gettext
 
312
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
313
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
314
# on various variables needed by the Makefile.in.in installed by 
 
315
# glib-gettextize.
 
316
dnl
 
317
glib_DEFUN([GLIB_GNU_GETTEXT],
 
318
  [AC_REQUIRE([AC_PROG_CC])dnl
 
319
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
320
   
 
321
   GLIB_LC_MESSAGES
 
322
   GLIB_WITH_NLS
 
323
 
 
324
   if test "$gt_cv_have_gettext" = "yes"; then
 
325
     if test "x$ALL_LINGUAS" = "x"; then
 
326
       LINGUAS=
 
327
     else
 
328
       AC_MSG_CHECKING(for catalogs to be installed)
 
329
       NEW_LINGUAS=
 
330
       for presentlang in $ALL_LINGUAS; do
 
331
         useit=no
 
332
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
333
           desiredlanguages="$LINGUAS"
 
334
         else
 
335
           desiredlanguages="$ALL_LINGUAS"
 
336
         fi
 
337
         for desiredlang in $desiredlanguages; do
 
338
           # Use the presentlang catalog if desiredlang is
 
339
           #   a. equal to presentlang, or
 
340
           #   b. a variant of presentlang (because in this case,
 
341
           #      presentlang can be used as a fallback for messages
 
342
           #      which are not translated in the desiredlang catalog).
 
343
           case "$desiredlang" in
 
344
             "$presentlang"*) useit=yes;;
 
345
           esac
 
346
         done
 
347
         if test $useit = yes; then
 
348
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
349
         fi
 
350
       done
 
351
       LINGUAS=$NEW_LINGUAS
 
352
       AC_MSG_RESULT($LINGUAS)
 
353
     fi
 
354
 
 
355
     dnl Construct list of names of catalog files to be constructed.
 
356
     if test -n "$LINGUAS"; then
 
357
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
358
     fi
 
359
   fi
 
360
 
 
361
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
362
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
363
   dnl Try to locate is.
 
364
   MKINSTALLDIRS=
 
365
   if test -n "$ac_aux_dir"; then
 
366
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
367
   fi
 
368
   if test -z "$MKINSTALLDIRS"; then
 
369
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
370
   fi
 
371
   AC_SUBST(MKINSTALLDIRS)
 
372
 
 
373
   dnl Generate list of files to be processed by xgettext which will
 
374
   dnl be included in po/Makefile.
 
375
   test -d po || mkdir po
 
376
   if test "x$srcdir" != "x."; then
 
377
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
378
       posrcprefix="$srcdir/"
 
379
     else
 
380
       posrcprefix="../$srcdir/"
 
381
     fi
 
382
   else
 
383
     posrcprefix="../"
 
384
   fi
 
385
   rm -f po/POTFILES
 
386
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
387
        < $srcdir/po/POTFILES.in > po/POTFILES
 
388
  ])
 
389
 
 
390
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
391
# -------------------------------
 
392
# Define VARIABLE to the location where catalog files will
 
393
# be installed by po/Makefile.
 
394
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
395
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
396
glib_save_prefix="$prefix"
 
397
glib_save_exec_prefix="$exec_prefix"
 
398
glib_save_datarootdir="$datarootdir"
 
399
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
400
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
401
datarootdir=`eval echo "${datarootdir}"`
 
402
if test "x$CATOBJEXT" = "x.mo" ; then
 
403
  localedir=`eval echo "${libdir}/locale"`
 
404
else
 
405
  localedir=`eval echo "${datadir}/locale"`
 
406
fi
 
407
prefix="$glib_save_prefix"
 
408
exec_prefix="$glib_save_exec_prefix"
 
409
datarootdir="$glib_save_datarootdir"
 
410
AC_DEFINE_UNQUOTED($1, "$localedir",
 
411
  [Define the location where the catalogs will be installed])
 
412
])
 
413
 
 
414
dnl
 
415
dnl Now the definitions that aclocal will find
 
416
dnl
 
417
ifdef(glib_configure_in,[],[
 
418
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
419
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
420
])dnl
 
421
 
 
422
# gnome-common.m4
 
423
 
424
 
 
425
dnl GNOME_COMMON_INIT
 
426
 
 
427
AC_DEFUN([GNOME_COMMON_INIT],
 
428
[
 
429
  dnl this macro should come after AC_CONFIG_MACRO_DIR
 
430
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
 
431
 
 
432
  dnl ensure that when the Automake generated makefile calls aclocal,
 
433
  dnl it honours the $ACLOCAL_FLAGS environment variable
 
434
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
 
435
  if test -n "$ac_macro_dir"; then
 
436
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
 
437
  fi
 
438
 
 
439
  AC_SUBST([ACLOCAL_AMFLAGS])
 
440
])
 
441
 
 
442
AC_DEFUN([GNOME_DEBUG_CHECK],
 
443
[
 
444
        AC_ARG_ENABLE([debug],
 
445
                      AC_HELP_STRING([--enable-debug],
 
446
                                     [turn on debugging]),,
 
447
                      [enable_debug=no])
 
448
 
 
449
        if test x$enable_debug = xyes ; then
 
450
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
 
451
                [Enable additional debugging at the expense of performance and size])
 
452
        fi
 
453
])
 
454
 
 
455
dnl GNOME_MAINTAINER_MODE_DEFINES ()
 
456
dnl define DISABLE_DEPRECATED
 
457
dnl
 
458
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
 
459
[
 
460
        AC_REQUIRE([AM_MAINTAINER_MODE])
 
461
 
 
462
        if test $USE_MAINTAINER_MODE = yes; then
 
463
                DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED"
 
464
        else
 
465
                DISABLE_DEPRECATED=""
 
466
        fi
 
467
        AC_SUBST(DISABLE_DEPRECATED)
 
468
])
 
469
 
 
470
dnl GNOME_COMPILE_WARNINGS
 
471
dnl Turn on many useful compiler warnings
 
472
dnl For now, only works on GCC
 
473
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
 
474
    dnl ******************************
 
475
    dnl More compiler warnings
 
476
    dnl ******************************
 
477
 
 
478
    AC_ARG_ENABLE(compile-warnings, 
 
479
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
 
480
                                 [Turn on compiler warnings]),,
 
481
                  [enable_compile_warnings="m4_default([$1],[yes])"])
 
482
 
 
483
    warnCFLAGS=
 
484
    if test "x$GCC" != xyes; then
 
485
        enable_compile_warnings=no
 
486
    fi
 
487
 
 
488
    warning_flags=
 
489
    realsave_CFLAGS="$CFLAGS"
 
490
 
 
491
    case "$enable_compile_warnings" in
 
492
    no)
 
493
        warning_flags=
 
494
        ;;
 
495
    minimum)
 
496
        warning_flags="-Wall"
 
497
        ;;
 
498
    yes)
 
499
        warning_flags="-Wall -Wmissing-prototypes"
 
500
        ;;
 
501
    maximum|error)
 
502
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
 
503
        CFLAGS="$warning_flags $CFLAGS"
 
504
        for option in -Wno-sign-compare; do
 
505
                SAVE_CFLAGS="$CFLAGS"
 
506
                CFLAGS="$CFLAGS $option"
 
507
                AC_MSG_CHECKING([whether gcc understands $option])
 
508
                AC_TRY_COMPILE([], [],
 
509
                        has_option=yes,
 
510
                        has_option=no,)
 
511
                CFLAGS="$SAVE_CFLAGS"
 
512
                AC_MSG_RESULT($has_option)
 
513
                if test $has_option = yes; then
 
514
                  warning_flags="$warning_flags $option"
 
515
                fi
 
516
                unset has_option
 
517
                unset SAVE_CFLAGS
 
518
        done
 
519
        unset option
 
520
        if test "$enable_compile_warnings" = "error" ; then
 
521
            warning_flags="$warning_flags -Werror"
 
522
        fi
 
523
        ;;
 
524
    *)
 
525
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
 
526
        ;;
 
527
    esac
 
528
    CFLAGS="$realsave_CFLAGS"
 
529
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
 
530
    AC_MSG_RESULT($warning_flags)
 
531
 
 
532
    AC_ARG_ENABLE(iso-c,
 
533
                  AC_HELP_STRING([--enable-iso-c],
 
534
                                 [Try to warn if code is not ISO C ]),,
 
535
                  [enable_iso_c=no])
 
536
 
 
537
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
 
538
    complCFLAGS=
 
539
    if test "x$enable_iso_c" != "xno"; then
 
540
        if test "x$GCC" = "xyes"; then
 
541
        case " $CFLAGS " in
 
542
            *[\ \       ]-ansi[\ \      ]*) ;;
 
543
            *) complCFLAGS="$complCFLAGS -ansi" ;;
 
544
        esac
 
545
        case " $CFLAGS " in
 
546
            *[\ \       ]-pedantic[\ \  ]*) ;;
 
547
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
 
548
        esac
 
549
        fi
 
550
    fi
 
551
    AC_MSG_RESULT($complCFLAGS)
 
552
 
 
553
    WARN_CFLAGS="$warning_flags $complCFLAGS"
 
554
    AC_SUBST(WARN_CFLAGS)
 
555
])
 
556
 
 
557
dnl For C++, do basically the same thing.
 
558
 
 
559
AC_DEFUN([GNOME_CXX_WARNINGS],[
 
560
  AC_ARG_ENABLE(cxx-warnings,
 
561
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
 
562
                               [Turn on compiler warnings.]),,
 
563
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
 
564
 
 
565
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
 
566
  warnCXXFLAGS=
 
567
  if test "x$GCC" != xyes; then
 
568
    enable_compile_warnings=no
 
569
  fi
 
570
  if test "x$enable_cxx_warnings" != "xno"; then
 
571
    if test "x$GCC" = "xyes"; then
 
572
      case " $CXXFLAGS " in
 
573
      *[\ \     ]-Wall[\ \      ]*) ;;
 
574
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
 
575
      esac
 
576
 
 
577
      ## -W is not all that useful.  And it cannot be controlled
 
578
      ## with individual -Wno-xxx flags, unlike -Wall
 
579
      if test "x$enable_cxx_warnings" = "xyes"; then
 
580
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
 
581
      fi
 
582
    fi
 
583
  fi
 
584
  AC_MSG_RESULT($warnCXXFLAGS)
 
585
 
 
586
   AC_ARG_ENABLE(iso-cxx,
 
587
                 AC_HELP_STRING([--enable-iso-cxx],
 
588
                                [Try to warn if code is not ISO C++ ]),,
 
589
                 [enable_iso_cxx=no])
 
590
 
 
591
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
 
592
   complCXXFLAGS=
 
593
   if test "x$enable_iso_cxx" != "xno"; then
 
594
     if test "x$GCC" = "xyes"; then
 
595
      case " $CXXFLAGS " in
 
596
      *[\ \     ]-ansi[\ \      ]*) ;;
 
597
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
 
598
      esac
 
599
 
 
600
      case " $CXXFLAGS " in
 
601
      *[\ \     ]-pedantic[\ \  ]*) ;;
 
602
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
 
603
      esac
 
604
     fi
 
605
   fi
 
606
  AC_MSG_RESULT($complCXXFLAGS)
 
607
 
 
608
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
 
609
  AC_SUBST(WARN_CXXFLAGS)
 
610
])
 
611
 
14
612
dnl -*- mode: autoconf -*-
15
613
 
16
614
# serial 1
65
663
  AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
66
664
])
67
665
 
 
666
 
 
667
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
668
# serial 35 IT_PROG_INTLTOOL
 
669
AC_DEFUN([IT_PROG_INTLTOOL],
 
670
[AC_PREREQ([2.50])dnl
 
671
 
 
672
case "$am__api_version" in
 
673
    1.[01234])
 
674
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
675
    ;;
 
676
    *)
 
677
    ;;
 
678
esac
 
679
 
 
680
if test -n "$1"; then
 
681
    AC_MSG_CHECKING(for intltool >= $1)
 
682
 
 
683
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
684
    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
 
685
    [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
 
686
    ]
 
687
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
688
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
689
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
690
fi
 
691
 
 
692
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
693
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
694
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
695
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
696
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
697
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
698
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
699
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
700
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
701
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
702
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
703
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
704
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
705
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
706
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
707
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
708
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
709
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
710
 
 
711
AC_SUBST(INTLTOOL_DESKTOP_RULE)
 
712
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
 
713
AC_SUBST(INTLTOOL_KEYS_RULE)
 
714
AC_SUBST(INTLTOOL_PROP_RULE)
 
715
AC_SUBST(INTLTOOL_OAF_RULE)
 
716
AC_SUBST(INTLTOOL_PONG_RULE)
 
717
AC_SUBST(INTLTOOL_SERVER_RULE)
 
718
AC_SUBST(INTLTOOL_SHEET_RULE)
 
719
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
720
AC_SUBST(INTLTOOL_UI_RULE)
 
721
AC_SUBST(INTLTOOL_XAM_RULE)
 
722
AC_SUBST(INTLTOOL_KBD_RULE)
 
723
AC_SUBST(INTLTOOL_XML_RULE)
 
724
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
725
AC_SUBST(INTLTOOL_CAVES_RULE)
 
726
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
 
727
AC_SUBST(INTLTOOL_THEME_RULE)
 
728
AC_SUBST(INTLTOOL_SERVICE_RULE)
 
729
 
 
730
# Use the tools built into the package, not the ones that are installed.
 
731
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
 
732
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
 
733
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
 
734
 
 
735
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
736
if test -z "$INTLTOOL_PERL"; then
 
737
   AC_MSG_ERROR([perl not found; required for intltool])
 
738
fi
 
739
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
 
740
   AC_MSG_ERROR([perl 5.x required for intltool])
 
741
fi
 
742
if test "x$2" != "xno-xml"; then
 
743
   AC_MSG_CHECKING([for XML::Parser])
 
744
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
745
       AC_MSG_RESULT([ok])
 
746
   else
 
747
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
748
   fi
 
749
fi
 
750
 
 
751
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
 
752
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
 
753
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
 
754
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
 
755
 
 
756
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
757
AC_SUBST(ALL_LINGUAS)
 
758
    
 
759
IT_PO_SUBDIR([po])
 
760
 
 
761
dnl The following is very similar to
 
762
dnl
 
763
dnl     AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
 
764
dnl
 
765
dnl with the following slight differences:
 
766
dnl  - the *.in files are in ac_aux_dir,
 
767
dnl  - if the file haven't changed upon reconfigure, it's not touched,
 
768
dnl  - the evaluation of the third parameter enables a hack which computes
 
769
dnl    the actual value of $libdir,
 
770
dnl  - the user sees "executing intltool commands", instead of
 
771
dnl    "creating intltool-extract" and such.
 
772
dnl
 
773
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
 
774
dnl a reason for it.
 
775
 
 
776
AC_CONFIG_COMMANDS([intltool], [
 
777
 
 
778
for file in intltool-extract intltool-merge intltool-update; do
 
779
  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
 
780
      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
 
781
      -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
 
782
      -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
 
783
      -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
 
784
      -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
 
785
      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
 
786
        < ${ac_aux_dir}/${file}.in > ${file}.out
 
787
  if cmp -s ${file} ${file}.out 2>/dev/null; then
 
788
    rm -f ${file}.out
 
789
  else
 
790
    mv -f ${file}.out ${file}
 
791
  fi
 
792
  chmod ugo+x ${file}
 
793
  chmod u+w ${file}
 
794
done
 
795
 
 
796
],
 
797
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
 
798
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
 
799
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
 
800
INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
 
801
INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
 
802
 
 
803
])
 
804
 
 
805
 
 
806
# IT_PO_SUBDIR(DIRNAME)
 
807
# ---------------------
 
808
# All po subdirs have to be declared with this macro; the subdir "po" is
 
809
# declared by IT_PROG_INTLTOOL.
 
810
#
 
811
AC_DEFUN([IT_PO_SUBDIR],
 
812
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
813
dnl
 
814
dnl The following CONFIG_COMMANDS should be exetuted at the very end
 
815
dnl of config.status.
 
816
AC_CONFIG_COMMANDS_PRE([
 
817
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
818
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
819
    >"$1/stamp-it.tmp"
 
820
    [sed '/^#/d
 
821
         s/^[[].*] *//
 
822
         /^[    ]*$/d
 
823
        '"s|^|  $ac_top_srcdir/|" \
 
824
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
825
    ]
 
826
    if test ! -f "$1/Makefile"; then
 
827
      AC_MSG_ERROR([$1/Makefile is not ready.])
 
828
    fi
 
829
    mv "$1/Makefile" "$1/Makefile.tmp"
 
830
    [sed '/^POTFILES =/,/[^\\]$/ {
 
831
                /^POTFILES =/!d
 
832
                r $1/POTFILES
 
833
          }
 
834
         ' "$1/Makefile.tmp" >"$1/Makefile"]
 
835
    rm -f "$1/Makefile.tmp"
 
836
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
837
  ])
 
838
])dnl
 
839
])
 
840
 
 
841
 
 
842
# deprecated macros
 
843
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
844
# A hint is needed for aclocal from Automake <= 1.9.4:
 
845
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
846
 
 
847
 
68
848
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
69
849
 
70
 
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
 
850
# serial 48 AC_PROG_LIBTOOL
71
851
 
72
852
 
73
853
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1451
2231
  dynamic_linker=no
1452
2232
  ;;
1453
2233
 
 
2234
kfreebsd*-gnu)
 
2235
  version_type=linux
 
2236
  need_lib_prefix=no
 
2237
  need_version=no
 
2238
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
2239
  soname_spec='${libname}${release}${shared_ext}$major'
 
2240
  shlibpath_var=LD_LIBRARY_PATH
 
2241
  shlibpath_overrides_runpath=no
 
2242
  hardcode_into_libs=yes
 
2243
  dynamic_linker='GNU ld.so'
 
2244
  ;;
 
2245
 
1454
2246
freebsd* | dragonfly*)
1455
2247
  # DragonFly does not have aout.  When/if they implement a new
1456
2248
  # versioning mechanism, adjust this.
1606
2398
  ;;
1607
2399
 
1608
2400
# This must be Linux ELF.
1609
 
linux* | k*bsd*-gnu)
 
2401
linux*)
1610
2402
  version_type=linux
1611
2403
  need_lib_prefix=no
1612
2404
  need_version=no
1620
2412
  # before this can be enabled.
1621
2413
  hardcode_into_libs=yes
1622
2414
 
 
2415
  # find out which ABI we are using
 
2416
  libsuff=
 
2417
  case "$host_cpu" in
 
2418
  x86_64*|s390x*|powerpc64*)
 
2419
    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
2420
    if AC_TRY_EVAL(ac_compile); then
 
2421
      case `/usr/bin/file conftest.$ac_objext` in
 
2422
      *64-bit*)
 
2423
        libsuff=64
 
2424
        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
 
2425
        ;;
 
2426
      esac
 
2427
    fi
 
2428
    rm -rf conftest*
 
2429
    ;;
 
2430
  esac
 
2431
 
1623
2432
  # Append ld.so.conf contents to the search path
1624
2433
  if test -f /etc/ld.so.conf; then
1625
 
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,    ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1626
 
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
 
2434
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,        ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
 
2435
    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
1627
2436
  fi
1628
2437
 
1629
2438
  # We used to test for /lib/ld.so.1 and disable shared libraries on
1635
2444
  dynamic_linker='GNU/Linux ld.so'
1636
2445
  ;;
1637
2446
 
1638
 
netbsdelf*-gnu)
 
2447
knetbsd*-gnu)
1639
2448
  version_type=linux
1640
2449
  need_lib_prefix=no
1641
2450
  need_version=no
1644
2453
  shlibpath_var=LD_LIBRARY_PATH
1645
2454
  shlibpath_overrides_runpath=no
1646
2455
  hardcode_into_libs=yes
1647
 
  dynamic_linker='NetBSD ld.elf_so'
 
2456
  dynamic_linker='GNU ld.so'
1648
2457
  ;;
1649
2458
 
1650
2459
netbsd*)
2352
3161
  lt_cv_deplibs_check_method=pass_all
2353
3162
  ;;
2354
3163
 
2355
 
freebsd* | dragonfly*)
 
3164
freebsd* | kfreebsd*-gnu | dragonfly*)
2356
3165
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2357
3166
    case $host_cpu in
2358
3167
    i*86 )
2406
3215
  ;;
2407
3216
 
2408
3217
# This must be Linux ELF.
2409
 
linux* | k*bsd*-gnu)
 
3218
linux*)
2410
3219
  lt_cv_deplibs_check_method=pass_all
2411
3220
  ;;
2412
3221
 
2413
 
netbsd* | netbsdelf*-gnu)
 
3222
netbsd*)
2414
3223
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2415
3224
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2416
3225
  else
3158
3967
  freebsd-elf*)
3159
3968
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3160
3969
    ;;
3161
 
  freebsd* | dragonfly*)
 
3970
  freebsd* | kfreebsd*-gnu | dragonfly*)
3162
3971
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3163
3972
    # conventions
3164
3973
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3317
4126
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3318
4127
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3319
4128
    ;;
3320
 
  linux* | k*bsd*-gnu)
 
4129
  linux*)
3321
4130
    case $cc_basename in
3322
4131
      KCC*)
3323
4132
        # Kuck and Associates, Inc. (KAI) C++ Compiler
3419
4228
        ;;
3420
4229
    esac
3421
4230
    ;;
3422
 
  netbsd* | netbsdelf*-gnu)
 
4231
  netbsd*)
3423
4232
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3424
4233
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3425
4234
      wlarc=
4330
5139
# Is the compiler the GNU C compiler?
4331
5140
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4332
5141
 
 
5142
gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
 
5143
gcc_ver=\`gcc -dumpversion\`
 
5144
 
4333
5145
# An ERE matcher.
4334
5146
EGREP=$lt_EGREP
4335
5147
 
4463
5275
 
4464
5276
# Dependencies to place before the objects being linked to create a
4465
5277
# shared library.
4466
 
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
 
5278
predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
4467
5279
 
4468
5280
# Dependencies to place after the objects being linked to create a
4469
5281
# shared library.
4470
 
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
 
5282
postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
4471
5283
 
4472
5284
# Dependencies to place before the objects being linked to create a
4473
5285
# shared library.
4479
5291
 
4480
5292
# The library search path used internally by the compiler when linking
4481
5293
# a shared library.
4482
 
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
 
5294
compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
4483
5295
 
4484
5296
# Method to check whether dependent libraries are shared objects.
4485
5297
deplibs_check_method=$lt_deplibs_check_method
4559
5371
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4560
5372
 
4561
5373
# Compile-time system search path for libraries
4562
 
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
5374
sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
4563
5375
 
4564
5376
# Run-time system search path for libraries
4565
5377
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4684
5496
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4685
5497
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4686
5498
  ;;
4687
 
linux* | k*bsd*-gnu)
 
5499
linux*)
4688
5500
  if test "$host_cpu" = ia64; then
4689
5501
    symcode='[[ABCDGIRSTW]]'
4690
5502
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4957
5769
            ;;
4958
5770
        esac
4959
5771
        ;;
4960
 
      freebsd* | dragonfly*)
 
5772
      freebsd* | kfreebsd*-gnu | dragonfly*)
4961
5773
        # FreeBSD uses GNU C++
4962
5774
        ;;
4963
5775
      hpux9* | hpux10* | hpux11*)
5000
5812
            ;;
5001
5813
        esac
5002
5814
        ;;
5003
 
      linux* | k*bsd*-gnu)
 
5815
      linux*)
5004
5816
        case $cc_basename in
5005
5817
          KCC*)
5006
5818
            # KAI C++ Compiler
5043
5855
            ;;
5044
5856
        esac
5045
5857
        ;;
5046
 
      netbsd* | netbsdelf*-gnu)
 
5858
      netbsd*)
5047
5859
        ;;
5048
5860
      osf3* | osf4* | osf5*)
5049
5861
        case $cc_basename in
5254
6066
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5255
6067
      ;;
5256
6068
 
5257
 
    linux* | k*bsd*-gnu)
 
6069
    linux*)
5258
6070
      case $cc_basename in
5259
6071
      icc* | ecc*)
5260
6072
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5395
6207
  cygwin* | mingw*)
5396
6208
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5397
6209
  ;;
5398
 
  linux* | k*bsd*-gnu)
5399
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5400
 
  ;;
5401
6210
  *)
5402
6211
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5403
6212
  ;;
5568
6377
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5569
6378
      ;;
5570
6379
 
5571
 
    linux* | k*bsd*-gnu)
 
6380
    linux*)
5572
6381
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5573
6382
        tmp_addflag=
5574
6383
        case $cc_basename,$host_cpu in
5594
6403
  $echo "local: *; };" >> $output_objdir/$libname.ver~
5595
6404
          $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5596
6405
        fi
5597
 
        _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5598
6406
      else
5599
6407
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5600
6408
      fi
5601
6409
      ;;
5602
6410
 
5603
 
    netbsd* | netbsdelf*-gnu)
 
6411
    netbsd*)
5604
6412
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5605
6413
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5606
6414
        wlarc=
5930
6738
      ;;
5931
6739
 
5932
6740
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5933
 
    freebsd* | dragonfly*)
 
6741
    freebsd* | kfreebsd*-gnu | dragonfly*)
5934
6742
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5935
6743
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5936
6744
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6032
6840
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6033
6841
      ;;
6034
6842
 
6035
 
    netbsd* | netbsdelf*-gnu)
 
6843
    netbsd*)
6036
6844
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6037
6845
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6038
6846
      else
6399
7207
    done
6400
7208
  done
6401
7209
done
 
7210
IFS=$as_save_IFS
6402
7211
lt_ac_max=0
6403
7212
lt_ac_count=0
6404
7213
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6431
7240
done
6432
7241
])
6433
7242
SED=$lt_cv_path_SED
 
7243
AC_SUBST([SED])
6434
7244
AC_MSG_RESULT([$SED])
6435
7245
])
6436
7246
 
6572
7382
 
6573
7383
_PKG_TEXT
6574
7384
])],
6575
 
                [$4])
 
7385
                [AC_MSG_RESULT([no])
 
7386
                $4])
6576
7387
elif test $pkg_failed = untried; then
6577
7388
        ifelse([$4], , [AC_MSG_FAILURE(dnl
6578
7389
[The pkg-config script could not be found or is too old.  Make sure it
6591
7402
fi[]dnl
6592
7403
])# PKG_CHECK_MODULES
6593
7404
 
6594
 
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
 
7405
# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
6595
7406
#
6596
7407
# This file is free software; the Free Software Foundation
6597
7408
# gives unlimited permission to copy and/or distribute it,
6601
7412
# ----------------------------
6602
7413
# Automake X.Y traces this macro to ensure aclocal.m4 has been
6603
7414
# generated from the m4 files accompanying Automake X.Y.
6604
 
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 
7415
# (This private macro should not be called outside this file.)
 
7416
AC_DEFUN([AM_AUTOMAKE_VERSION],
 
7417
[am__api_version='1.10'
 
7418
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 
7419
dnl require some minimum version.  Point them to the right macro.
 
7420
m4_if([$1], [1.10], [],
 
7421
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 
7422
])
 
7423
 
 
7424
# _AM_AUTOCONF_VERSION(VERSION)
 
7425
# -----------------------------
 
7426
# aclocal traces this macro to find the Autoconf version.
 
7427
# This is a private macro too.  Using m4_define simplifies
 
7428
# the logic in aclocal, which can simply ignore this definition.
 
7429
m4_define([_AM_AUTOCONF_VERSION], [])
6605
7430
 
6606
7431
# AM_SET_CURRENT_AUTOMAKE_VERSION
6607
7432
# -------------------------------
6608
 
# Call AM_AUTOMAKE_VERSION so it can be traced.
 
7433
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
6609
7434
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6610
7435
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6611
 
         [AM_AUTOMAKE_VERSION([1.9.6])])
 
7436
[AM_AUTOMAKE_VERSION([1.10])dnl
 
7437
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
6612
7438
 
6613
7439
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
6614
7440
 
6665
7491
 
6666
7492
# AM_CONDITIONAL                                            -*- Autoconf -*-
6667
7493
 
6668
 
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
 
7494
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
6669
7495
# Free Software Foundation, Inc.
6670
7496
#
6671
7497
# This file is free software; the Free Software Foundation
6672
7498
# gives unlimited permission to copy and/or distribute it,
6673
7499
# with or without modifications, as long as this notice is preserved.
6674
7500
 
6675
 
# serial 7
 
7501
# serial 8
6676
7502
 
6677
7503
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6678
7504
# -------------------------------------
6681
7507
[AC_PREREQ(2.52)dnl
6682
7508
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
6683
7509
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6684
 
AC_SUBST([$1_TRUE])
6685
 
AC_SUBST([$1_FALSE])
 
7510
AC_SUBST([$1_TRUE])dnl
 
7511
AC_SUBST([$1_FALSE])dnl
 
7512
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
 
7513
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
6686
7514
if $2; then
6687
7515
  $1_TRUE=
6688
7516
  $1_FALSE='#'
6696
7524
Usually this means the macro was only invoked conditionally.]])
6697
7525
fi])])
6698
7526
 
6699
 
 
6700
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
7527
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6701
7528
# Free Software Foundation, Inc.
6702
7529
#
6703
7530
# This file is free software; the Free Software Foundation
6704
7531
# gives unlimited permission to copy and/or distribute it,
6705
7532
# with or without modifications, as long as this notice is preserved.
6706
7533
 
6707
 
# serial 8
 
7534
# serial 9
6708
7535
 
6709
7536
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6710
7537
# written in clear, in which case automake, when reading aclocal.m4,
6732
7559
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
6733
7560
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
6734
7561
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
7562
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
6735
7563
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
6736
7564
                   [depcc="$$1"   am_compiler_list=])
6737
7565
 
6797
7625
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6798
7626
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6799
7627
         >/dev/null 2>conftest.err &&
 
7628
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6800
7629
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6801
7630
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6802
7631
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6849
7678
  AMDEPBACKSLASH='\'
6850
7679
fi
6851
7680
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6852
 
AC_SUBST([AMDEPBACKSLASH])
 
7681
AC_SUBST([AMDEPBACKSLASH])dnl
 
7682
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
6853
7683
])
6854
7684
 
6855
7685
# Generate code to set up dependency tracking.              -*- Autoconf -*-
6874
7704
  # some people rename them; so instead we look at the file content.
6875
7705
  # Grep'ing the first line is not enough: some people post-process
6876
7706
  # each Makefile.in and add a new line on top of each file to say so.
6877
 
  # So let's grep whole file.
6878
 
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 
7707
  # Grep'ing the whole file is not good either: AIX grep has a line
 
7708
  # limit of 2048, but all sed's we know have understand at least 4000.
 
7709
  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
6879
7710
    dirpart=`AS_DIRNAME("$mf")`
6880
7711
  else
6881
7712
    continue
6922
7753
 
6923
7754
# Do all the work for Automake.                             -*- Autoconf -*-
6924
7755
 
6925
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
6926
 
# Free Software Foundation, Inc.
 
7756
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
7757
# 2005, 2006 Free Software Foundation, Inc.
6927
7758
#
6928
7759
# This file is free software; the Free Software Foundation
6929
7760
# gives unlimited permission to copy and/or distribute it,
6946
7777
# arguments mandatory, and then we can depend on a new Autoconf
6947
7778
# release and drop the old call support.
6948
7779
AC_DEFUN([AM_INIT_AUTOMAKE],
6949
 
[AC_PREREQ([2.58])dnl
 
7780
[AC_PREREQ([2.60])dnl
6950
7781
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
6951
7782
dnl the ones we care about.
6952
7783
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6953
7784
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6954
7785
AC_REQUIRE([AC_PROG_INSTALL])dnl
6955
 
# test to see if srcdir already configured
6956
 
if test "`cd $srcdir && pwd`" != "`pwd`" &&
6957
 
   test -f $srcdir/config.status; then
6958
 
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
7786
if test "`cd $srcdir && pwd`" != "`pwd`"; then
 
7787
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 
7788
  # is not polluted with repeated "-I."
 
7789
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 
7790
  # test to see if srcdir already configured
 
7791
  if test -f $srcdir/config.status; then
 
7792
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
7793
  fi
6959
7794
fi
6960
7795
 
6961
7796
# test whether we have cygpath
6975
7810
 AC_SUBST([PACKAGE], [$1])dnl
6976
7811
 AC_SUBST([VERSION], [$2])],
6977
7812
[_AM_SET_OPTIONS([$1])dnl
 
7813
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 
7814
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 
7815
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
6978
7816
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6979
7817
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6980
7818
 
7010
7848
                  [_AM_DEPENDENCIES(CXX)],
7011
7849
                  [define([AC_PROG_CXX],
7012
7850
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
7851
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 
7852
                  [_AM_DEPENDENCIES(OBJC)],
 
7853
                  [define([AC_PROG_OBJC],
 
7854
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
7013
7855
])
7014
7856
])
7015
7857
 
7045
7887
# Define $install_sh.
7046
7888
AC_DEFUN([AM_PROG_INSTALL_SH],
7047
7889
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7048
 
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
7890
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
7049
7891
AC_SUBST(install_sh)])
7050
7892
 
7051
7893
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
7152
7994
 
7153
7995
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
7154
7996
 
7155
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
 
7997
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
7156
7998
# Free Software Foundation, Inc.
7157
7999
#
7158
8000
# This file is free software; the Free Software Foundation
7159
8001
# gives unlimited permission to copy and/or distribute it,
7160
8002
# with or without modifications, as long as this notice is preserved.
7161
8003
 
7162
 
# serial 4
 
8004
# serial 5
7163
8005
 
7164
8006
# AM_MISSING_PROG(NAME, PROGRAM)
7165
8007
# ------------------------------
7175
8017
# If it does, set am_missing_run to use it, otherwise, to nothing.
7176
8018
AC_DEFUN([AM_MISSING_HAS_RUN],
7177
8019
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
8020
AC_REQUIRE_AUX_FILE([missing])dnl
7178
8021
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7179
8022
# Use eval to expand $SHELL
7180
8023
if eval "$MISSING --run true"; then
7185
8028
fi
7186
8029
])
7187
8030
 
7188
 
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
 
8031
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
7189
8032
#
7190
8033
# This file is free software; the Free Software Foundation
7191
8034
# gives unlimited permission to copy and/or distribute it,
7193
8036
 
7194
8037
# AM_PROG_MKDIR_P
7195
8038
# ---------------
7196
 
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
7197
 
#
7198
 
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
7199
 
# created by `make install' are always world readable, even if the
7200
 
# installer happens to have an overly restrictive umask (e.g. 077).
7201
 
# This was a mistake.  There are at least two reasons why we must not
7202
 
# use `-m 0755':
7203
 
#   - it causes special bits like SGID to be ignored,
7204
 
#   - it may be too restrictive (some setups expect 775 directories).
7205
 
#
7206
 
# Do not use -m 0755 and let people choose whatever they expect by
7207
 
# setting umask.
7208
 
#
7209
 
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
7210
 
# Some implementations (such as Solaris 8's) are not thread-safe: if a
7211
 
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
7212
 
# concurrently, both version can detect that a/ is missing, but only
7213
 
# one can create it and the other will error out.  Consequently we
7214
 
# restrict ourselves to GNU make (using the --version option ensures
7215
 
# this.)
 
8039
# Check for `mkdir -p'.
7216
8040
AC_DEFUN([AM_PROG_MKDIR_P],
7217
 
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
7218
 
  # We used to keeping the `.' as first argument, in order to
7219
 
  # allow $(mkdir_p) to be used without argument.  As in
7220
 
  #   $(mkdir_p) $(somedir)
7221
 
  # where $(somedir) is conditionally defined.  However this is wrong
7222
 
  # for two reasons:
7223
 
  #  1. if the package is installed by a user who cannot write `.'
7224
 
  #     make install will fail,
7225
 
  #  2. the above comment should most certainly read
7226
 
  #     $(mkdir_p) $(DESTDIR)$(somedir)
7227
 
  #     so it does not work when $(somedir) is undefined and
7228
 
  #     $(DESTDIR) is not.
7229
 
  #  To support the latter case, we have to write
7230
 
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
7231
 
  #  so the `.' trick is pointless.
7232
 
  mkdir_p='mkdir -p --'
7233
 
else
7234
 
  # On NextStep and OpenStep, the `mkdir' command does not
7235
 
  # recognize any option.  It will interpret all options as
7236
 
  # directories to create, and then abort because `.' already
7237
 
  # exists.
7238
 
  for d in ./-p ./--version;
7239
 
  do
7240
 
    test -d $d && rmdir $d
7241
 
  done
7242
 
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7243
 
  if test -f "$ac_aux_dir/mkinstalldirs"; then
7244
 
    mkdir_p='$(mkinstalldirs)'
7245
 
  else
7246
 
    mkdir_p='$(install_sh) -d'
7247
 
  fi
7248
 
fi
7249
 
AC_SUBST([mkdir_p])])
 
8041
[AC_PREREQ([2.60])dnl
 
8042
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
8043
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
 
8044
dnl while keeping a definition of mkdir_p for backward compatibility.
 
8045
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
 
8046
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
 
8047
dnl Makefile.ins that do not define MKDIR_P, so we do our own
 
8048
dnl adjustment using top_builddir (which is defined more often than
 
8049
dnl MKDIR_P).
 
8050
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
 
8051
case $mkdir_p in
 
8052
  [[\\/$]]* | ?:[[\\/]]*) ;;
 
8053
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
 
8054
esac
 
8055
])
7250
8056
 
7251
8057
# Helper functions for option handling.                     -*- Autoconf -*-
7252
8058
 
7358
8164
if test "$cross_compiling" != no; then
7359
8165
  AC_CHECK_TOOL([STRIP], [strip], :)
7360
8166
fi
7361
 
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
8167
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7362
8168
AC_SUBST([INSTALL_STRIP_PROGRAM])])
7363
8169
 
 
8170
# Copyright (C) 2006  Free Software Foundation, Inc.
 
8171
#
 
8172
# This file is free software; the Free Software Foundation
 
8173
# gives unlimited permission to copy and/or distribute it,
 
8174
# with or without modifications, as long as this notice is preserved.
 
8175
 
 
8176
# _AM_SUBST_NOTMAKE(VARIABLE)
 
8177
# ---------------------------
 
8178
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
 
8179
# This macro is traced by Automake.
 
8180
AC_DEFUN([_AM_SUBST_NOTMAKE])
 
8181
 
7364
8182
# Check how to create a tarball.                            -*- Autoconf -*-
7365
8183
 
7366
8184
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
7457
8275
AC_SUBST([am__untar])
7458
8276
]) # _AM_PROG_TAR
7459
8277
 
7460
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
7461
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
7462
 
#
7463
 
# This file is free software, distributed under the terms of the GNU
7464
 
# General Public License.  As a special exception to the GNU General
7465
 
# Public License, this file may be distributed as part of a program
7466
 
# that contains a configuration script generated by Autoconf, under
7467
 
# the same distribution terms as the rest of that program.
7468
 
#
7469
 
# This file can be copied and used freely without restrictions.  It can
7470
 
# be used in projects which are not available under the GNU Public License
7471
 
# but which still want to provide support for the GNU gettext functionality.
7472
 
#
7473
 
# Macro to add for using GNU gettext.
7474
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
7475
 
#
7476
 
# Modified to never use included libintl. 
7477
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
7478
 
#
7479
 
# Major rework to remove unused code
7480
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
7481
 
#
7482
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
7483
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
7484
 
#
7485
 
# Modified to require ngettext
7486
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
7487
 
#
7488
 
# We need this here as well, since someone might use autoconf-2.5x
7489
 
# to configure GLib then an older version to configure a package
7490
 
# using AM_GLIB_GNU_GETTEXT
7491
 
AC_PREREQ(2.53)
7492
 
 
7493
 
dnl
7494
 
dnl We go to great lengths to make sure that aclocal won't 
7495
 
dnl try to pull in the installed version of these macros
7496
 
dnl when running aclocal in the glib directory.
7497
 
dnl
7498
 
m4_copy([AC_DEFUN],[glib_DEFUN])
7499
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
7500
 
dnl
7501
 
dnl At the end, if we're not within glib, we'll define the public
7502
 
dnl definitions in terms of our private definitions.
7503
 
dnl
7504
 
 
7505
 
# GLIB_LC_MESSAGES
7506
 
#--------------------
7507
 
glib_DEFUN([GLIB_LC_MESSAGES],
7508
 
  [AC_CHECK_HEADERS([locale.h])
7509
 
    if test $ac_cv_header_locale_h = yes; then
7510
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
7511
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
7512
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
7513
 
    if test $am_cv_val_LC_MESSAGES = yes; then
7514
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
7515
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
7516
 
    fi
7517
 
  fi])
7518
 
 
7519
 
# GLIB_PATH_PROG_WITH_TEST
7520
 
#----------------------------
7521
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7522
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7523
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
7524
 
[# Extract the first word of "$2", so it can be a program name with args.
7525
 
set dummy $2; ac_word=[$]2
7526
 
AC_MSG_CHECKING([for $ac_word])
7527
 
AC_CACHE_VAL(ac_cv_path_$1,
7528
 
[case "[$]$1" in
7529
 
  /*)
7530
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7531
 
  ;;
7532
 
  *)
7533
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7534
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
7535
 
    test -z "$ac_dir" && ac_dir=.
7536
 
    if test -f $ac_dir/$ac_word; then
7537
 
      if [$3]; then
7538
 
        ac_cv_path_$1="$ac_dir/$ac_word"
7539
 
        break
7540
 
      fi
7541
 
    fi
7542
 
  done
7543
 
  IFS="$ac_save_ifs"
7544
 
dnl If no 4th arg is given, leave the cache variable unset,
7545
 
dnl so AC_PATH_PROGS will keep looking.
7546
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7547
 
])dnl
7548
 
  ;;
7549
 
esac])dnl
7550
 
$1="$ac_cv_path_$1"
7551
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7552
 
  AC_MSG_RESULT([$]$1)
7553
 
else
7554
 
  AC_MSG_RESULT(no)
7555
 
fi
7556
 
AC_SUBST($1)dnl
7557
 
])
7558
 
 
7559
 
# GLIB_WITH_NLS
7560
 
#-----------------
7561
 
glib_DEFUN([GLIB_WITH_NLS],
7562
 
  dnl NLS is obligatory
7563
 
  [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7564
 
    USE_NLS=yes
7565
 
    AC_SUBST(USE_NLS)
7566
 
 
7567
 
    gt_cv_have_gettext=no
7568
 
 
7569
 
    CATOBJEXT=NONE
7570
 
    XGETTEXT=:
7571
 
    INTLLIBS=
7572
 
 
7573
 
    AC_CHECK_HEADER(libintl.h,
7574
 
     [gt_cv_func_dgettext_libintl="no"
7575
 
      libintl_extra_libs=""
7576
 
 
7577
 
      #
7578
 
      # First check in libc
7579
 
      #
7580
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
7581
 
        [AC_TRY_LINK([
7582
 
#include <libintl.h>
7583
 
],
7584
 
         [return !ngettext ("","", 1)],
7585
 
          gt_cv_func_ngettext_libc=yes,
7586
 
          gt_cv_func_ngettext_libc=no)
7587
 
        ])
7588
 
  
7589
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7590
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
7591
 
                [AC_TRY_LINK([
7592
 
#include <libintl.h>
7593
 
],
7594
 
                  [return !dgettext ("","")],
7595
 
                  gt_cv_func_dgettext_libc=yes,
7596
 
                  gt_cv_func_dgettext_libc=no)
7597
 
                ])
7598
 
      fi
7599
 
  
7600
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7601
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
7602
 
      fi
7603
 
 
7604
 
      #
7605
 
      # If we don't have everything we want, check in libintl
7606
 
      #
7607
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
7608
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
7609
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7610
 
        
7611
 
        AC_CHECK_LIB(intl, bindtextdomain,
7612
 
            [AC_CHECK_LIB(intl, ngettext,
7613
 
                    [AC_CHECK_LIB(intl, dgettext,
7614
 
                                  gt_cv_func_dgettext_libintl=yes)])])
7615
 
 
7616
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7617
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
7618
 
          AC_MSG_RESULT([])
7619
 
          AC_CHECK_LIB(intl, ngettext,
7620
 
                [AC_CHECK_LIB(intl, dcgettext,
7621
 
                       [gt_cv_func_dgettext_libintl=yes
7622
 
                        libintl_extra_libs=-liconv],
7623
 
                        :,-liconv)],
7624
 
                :,-liconv)
7625
 
        fi
7626
 
 
7627
 
        #
7628
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
7629
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
7630
 
        # and both have dgettext and ngettext
7631
 
        #
7632
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7633
 
          glib_save_LIBS="$LIBS"
7634
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
7635
 
          unset ac_cv_func_bind_textdomain_codeset
7636
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
7637
 
          LIBS="$glib_save_LIBS"
7638
 
 
7639
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7640
 
            gt_cv_func_dgettext_libc=no
7641
 
          else
7642
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
7643
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
7644
 
              gt_cv_func_dgettext_libintl=no
7645
 
            fi
7646
 
          fi
7647
 
        fi
7648
 
      fi
7649
 
 
7650
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
7651
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7652
 
        gt_cv_have_gettext=yes
7653
 
      fi
7654
 
  
7655
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7656
 
        INTLLIBS="-lintl $libintl_extra_libs"
7657
 
      fi
7658
 
  
7659
 
      if test "$gt_cv_have_gettext" = "yes"; then
7660
 
        AC_DEFINE(HAVE_GETTEXT,1,
7661
 
          [Define if the GNU gettext() function is already present or preinstalled.])
7662
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7663
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
7664
 
        if test "$MSGFMT" != "no"; then
7665
 
          glib_save_LIBS="$LIBS"
7666
 
          LIBS="$LIBS $INTLLIBS"
7667
 
          AC_CHECK_FUNCS(dcgettext)
7668
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7669
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7670
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
7671
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
7672
 
                         return _nl_msg_cat_cntr],
7673
 
            [CATOBJEXT=.gmo 
7674
 
             DATADIRNAME=share],
7675
 
            [case $host in
7676
 
            *-*-solaris*)
7677
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
7678
 
            dnl GNU format message catalog is always supported,
7679
 
            dnl since both are added to the libc all together.
7680
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
7681
 
            dnl and CATOBJEXT=.gmo in this case.
7682
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
7683
 
              [CATOBJEXT=.gmo 
7684
 
               DATADIRNAME=share],
7685
 
              [CATOBJEXT=.mo
7686
 
               DATADIRNAME=lib])
7687
 
            ;;
7688
 
            *)
7689
 
            CATOBJEXT=.mo
7690
 
            DATADIRNAME=lib
7691
 
            ;;
7692
 
            esac])
7693
 
          LIBS="$glib_save_LIBS"
7694
 
          INSTOBJEXT=.mo
7695
 
        else
7696
 
          gt_cv_have_gettext=no
7697
 
        fi
7698
 
      fi
7699
 
    ])
7700
 
 
7701
 
    if test "$gt_cv_have_gettext" = "yes" ; then
7702
 
      AC_DEFINE(ENABLE_NLS, 1,
7703
 
        [always defined to indicate that i18n is enabled])
7704
 
    fi
7705
 
 
7706
 
    dnl Test whether we really found GNU xgettext.
7707
 
    if test "$XGETTEXT" != ":"; then
7708
 
      dnl If it is not GNU xgettext we define it as : so that the
7709
 
      dnl Makefiles still can work.
7710
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7711
 
        : ;
7712
 
      else
7713
 
        AC_MSG_RESULT(
7714
 
          [found xgettext program is not GNU xgettext; ignore it])
7715
 
        XGETTEXT=":"
7716
 
      fi
7717
 
    fi
7718
 
 
7719
 
    # We need to process the po/ directory.
7720
 
    POSUB=po
7721
 
 
7722
 
    AC_OUTPUT_COMMANDS(
7723
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
7724
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7725
 
      esac])
7726
 
 
7727
 
    dnl These rules are solely for the distribution goal.  While doing this
7728
 
    dnl we only have to keep exactly one list of the available catalogs
7729
 
    dnl in configure.in.
7730
 
    for lang in $ALL_LINGUAS; do
7731
 
      GMOFILES="$GMOFILES $lang.gmo"
7732
 
      POFILES="$POFILES $lang.po"
7733
 
    done
7734
 
 
7735
 
    dnl Make all variables we use known to autoconf.
7736
 
    AC_SUBST(CATALOGS)
7737
 
    AC_SUBST(CATOBJEXT)
7738
 
    AC_SUBST(DATADIRNAME)
7739
 
    AC_SUBST(GMOFILES)
7740
 
    AC_SUBST(INSTOBJEXT)
7741
 
    AC_SUBST(INTLLIBS)
7742
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
7743
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
7744
 
    AC_SUBST(POFILES)
7745
 
    AC_SUBST(POSUB)
7746
 
  ])
7747
 
 
7748
 
# AM_GLIB_GNU_GETTEXT
7749
 
# -------------------
7750
 
# Do checks necessary for use of gettext. If a suitable implementation 
7751
 
# of gettext is found in either in libintl or in the C library,
7752
 
# it will set INTLLIBS to the libraries needed for use of gettext
7753
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
7754
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
7755
 
# on various variables needed by the Makefile.in.in installed by 
7756
 
# glib-gettextize.
7757
 
dnl
7758
 
glib_DEFUN([GLIB_GNU_GETTEXT],
7759
 
  [AC_REQUIRE([AC_PROG_CC])dnl
7760
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
7761
 
   
7762
 
   GLIB_LC_MESSAGES
7763
 
   GLIB_WITH_NLS
7764
 
 
7765
 
   if test "$gt_cv_have_gettext" = "yes"; then
7766
 
     if test "x$ALL_LINGUAS" = "x"; then
7767
 
       LINGUAS=
7768
 
     else
7769
 
       AC_MSG_CHECKING(for catalogs to be installed)
7770
 
       NEW_LINGUAS=
7771
 
       for presentlang in $ALL_LINGUAS; do
7772
 
         useit=no
7773
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
7774
 
           desiredlanguages="$LINGUAS"
7775
 
         else
7776
 
           desiredlanguages="$ALL_LINGUAS"
7777
 
         fi
7778
 
         for desiredlang in $desiredlanguages; do
7779
 
           # Use the presentlang catalog if desiredlang is
7780
 
           #   a. equal to presentlang, or
7781
 
           #   b. a variant of presentlang (because in this case,
7782
 
           #      presentlang can be used as a fallback for messages
7783
 
           #      which are not translated in the desiredlang catalog).
7784
 
           case "$desiredlang" in
7785
 
             "$presentlang"*) useit=yes;;
7786
 
           esac
7787
 
         done
7788
 
         if test $useit = yes; then
7789
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
7790
 
         fi
7791
 
       done
7792
 
       LINGUAS=$NEW_LINGUAS
7793
 
       AC_MSG_RESULT($LINGUAS)
7794
 
     fi
7795
 
 
7796
 
     dnl Construct list of names of catalog files to be constructed.
7797
 
     if test -n "$LINGUAS"; then
7798
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7799
 
     fi
7800
 
   fi
7801
 
 
7802
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
7803
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
7804
 
   dnl Try to locate is.
7805
 
   MKINSTALLDIRS=
7806
 
   if test -n "$ac_aux_dir"; then
7807
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7808
 
   fi
7809
 
   if test -z "$MKINSTALLDIRS"; then
7810
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7811
 
   fi
7812
 
   AC_SUBST(MKINSTALLDIRS)
7813
 
 
7814
 
   dnl Generate list of files to be processed by xgettext which will
7815
 
   dnl be included in po/Makefile.
7816
 
   test -d po || mkdir po
7817
 
   if test "x$srcdir" != "x."; then
7818
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
7819
 
       posrcprefix="$srcdir/"
7820
 
     else
7821
 
       posrcprefix="../$srcdir/"
7822
 
     fi
7823
 
   else
7824
 
     posrcprefix="../"
7825
 
   fi
7826
 
   rm -f po/POTFILES
7827
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
7828
 
        < $srcdir/po/POTFILES.in > po/POTFILES
7829
 
  ])
7830
 
 
7831
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
7832
 
# -------------------------------
7833
 
# Define VARIABLE to the location where catalog files will
7834
 
# be installed by po/Makefile.
7835
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
7836
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
7837
 
glib_save_prefix="$prefix"
7838
 
glib_save_exec_prefix="$exec_prefix"
7839
 
glib_save_datarootdir="$datarootdir"
7840
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
7841
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
7842
 
datarootdir=`eval echo "${datarootdir}"`
7843
 
if test "x$CATOBJEXT" = "x.mo" ; then
7844
 
  localedir=`eval echo "${libdir}/locale"`
7845
 
else
7846
 
  localedir=`eval echo "${datadir}/locale"`
7847
 
fi
7848
 
prefix="$glib_save_prefix"
7849
 
exec_prefix="$glib_save_exec_prefix"
7850
 
datarootdir="$glib_save_datarootdir"
7851
 
AC_DEFINE_UNQUOTED($1, "$localedir",
7852
 
  [Define the location where the catalogs will be installed])
7853
 
])
7854
 
 
7855
 
dnl
7856
 
dnl Now the definitions that aclocal will find
7857
 
dnl
7858
 
ifdef(glib_configure_in,[],[
7859
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
7860
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
7861
 
])dnl
7862
 
 
7863
 
# gnome-common.m4
7864
 
7865
 
 
7866
 
dnl GNOME_COMMON_INIT
7867
 
 
7868
 
AC_DEFUN([GNOME_COMMON_INIT],
7869
 
[
7870
 
  dnl this macro should come after AC_CONFIG_MACRO_DIR
7871
 
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
7872
 
 
7873
 
  dnl ensure that when the Automake generated makefile calls aclocal,
7874
 
  dnl it honours the $ACLOCAL_FLAGS environment variable
7875
 
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
7876
 
  if test -n "$ac_macro_dir"; then
7877
 
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
7878
 
  fi
7879
 
 
7880
 
  AC_SUBST([ACLOCAL_AMFLAGS])
7881
 
])
7882
 
 
7883
 
AC_DEFUN([GNOME_DEBUG_CHECK],
7884
 
[
7885
 
        AC_ARG_ENABLE([debug],
7886
 
                      AC_HELP_STRING([--enable-debug],
7887
 
                                     [turn on debugging]),,
7888
 
                      [enable_debug=no])
7889
 
 
7890
 
        if test x$enable_debug = xyes ; then
7891
 
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
7892
 
                [Enable additional debugging at the expense of performance and size])
7893
 
        fi
7894
 
])
7895
 
 
7896
 
dnl GNOME_MAINTAINER_MODE_DEFINES ()
7897
 
dnl define DISABLE_DEPRECATED
7898
 
dnl
7899
 
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
7900
 
[
7901
 
        AC_REQUIRE([AM_MAINTAINER_MODE])
7902
 
 
7903
 
        if test $USE_MAINTAINER_MODE = yes; then
7904
 
                DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED"
7905
 
        else
7906
 
                DISABLE_DEPRECATED=""
7907
 
        fi
7908
 
        AC_SUBST(DISABLE_DEPRECATED)
7909
 
])
7910
 
 
7911
 
dnl GNOME_COMPILE_WARNINGS
7912
 
dnl Turn on many useful compiler warnings
7913
 
dnl For now, only works on GCC
7914
 
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
7915
 
    dnl ******************************
7916
 
    dnl More compiler warnings
7917
 
    dnl ******************************
7918
 
 
7919
 
    AC_ARG_ENABLE(compile-warnings, 
7920
 
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
7921
 
                                 [Turn on compiler warnings]),,
7922
 
                  [enable_compile_warnings="m4_default([$1],[yes])"])
7923
 
 
7924
 
    warnCFLAGS=
7925
 
    if test "x$GCC" != xyes; then
7926
 
        enable_compile_warnings=no
7927
 
    fi
7928
 
 
7929
 
    warning_flags=
7930
 
    realsave_CFLAGS="$CFLAGS"
7931
 
 
7932
 
    case "$enable_compile_warnings" in
7933
 
    no)
7934
 
        warning_flags=
7935
 
        ;;
7936
 
    minimum)
7937
 
        warning_flags="-Wall"
7938
 
        ;;
7939
 
    yes)
7940
 
        warning_flags="-Wall -Wmissing-prototypes"
7941
 
        ;;
7942
 
    maximum|error)
7943
 
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
7944
 
        CFLAGS="$warning_flags $CFLAGS"
7945
 
        for option in -Wno-sign-compare; do
7946
 
                SAVE_CFLAGS="$CFLAGS"
7947
 
                CFLAGS="$CFLAGS $option"
7948
 
                AC_MSG_CHECKING([whether gcc understands $option])
7949
 
                AC_TRY_COMPILE([], [],
7950
 
                        has_option=yes,
7951
 
                        has_option=no,)
7952
 
                CFLAGS="$SAVE_CFLAGS"
7953
 
                AC_MSG_RESULT($has_option)
7954
 
                if test $has_option = yes; then
7955
 
                  warning_flags="$warning_flags $option"
7956
 
                fi
7957
 
                unset has_option
7958
 
                unset SAVE_CFLAGS
7959
 
        done
7960
 
        unset option
7961
 
        if test "$enable_compile_warnings" = "error" ; then
7962
 
            warning_flags="$warning_flags -Werror"
7963
 
        fi
7964
 
        ;;
7965
 
    *)
7966
 
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
7967
 
        ;;
7968
 
    esac
7969
 
    CFLAGS="$realsave_CFLAGS"
7970
 
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
7971
 
    AC_MSG_RESULT($warning_flags)
7972
 
 
7973
 
    AC_ARG_ENABLE(iso-c,
7974
 
                  AC_HELP_STRING([--enable-iso-c],
7975
 
                                 [Try to warn if code is not ISO C ]),,
7976
 
                  [enable_iso_c=no])
7977
 
 
7978
 
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
7979
 
    complCFLAGS=
7980
 
    if test "x$enable_iso_c" != "xno"; then
7981
 
        if test "x$GCC" = "xyes"; then
7982
 
        case " $CFLAGS " in
7983
 
            *[\ \       ]-ansi[\ \      ]*) ;;
7984
 
            *) complCFLAGS="$complCFLAGS -ansi" ;;
7985
 
        esac
7986
 
        case " $CFLAGS " in
7987
 
            *[\ \       ]-pedantic[\ \  ]*) ;;
7988
 
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
7989
 
        esac
7990
 
        fi
7991
 
    fi
7992
 
    AC_MSG_RESULT($complCFLAGS)
7993
 
 
7994
 
    WARN_CFLAGS="$warning_flags $complCFLAGS"
7995
 
    AC_SUBST(WARN_CFLAGS)
7996
 
])
7997
 
 
7998
 
dnl For C++, do basically the same thing.
7999
 
 
8000
 
AC_DEFUN([GNOME_CXX_WARNINGS],[
8001
 
  AC_ARG_ENABLE(cxx-warnings,
8002
 
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
8003
 
                               [Turn on compiler warnings.]),,
8004
 
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
8005
 
 
8006
 
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
8007
 
  warnCXXFLAGS=
8008
 
  if test "x$GXX" != xyes; then
8009
 
    enable_cxx_warnings=no
8010
 
  fi
8011
 
  if test "x$enable_cxx_warnings" != "xno"; then
8012
 
    if test "x$GXX" = "xyes"; then
8013
 
      case " $CXXFLAGS " in
8014
 
      *[\ \     ]-Wall[\ \      ]*) ;;
8015
 
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
8016
 
      esac
8017
 
 
8018
 
      ## -W is not all that useful.  And it cannot be controlled
8019
 
      ## with individual -Wno-xxx flags, unlike -Wall
8020
 
      if test "x$enable_cxx_warnings" = "xyes"; then
8021
 
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
8022
 
      fi
8023
 
    fi
8024
 
  fi
8025
 
  AC_MSG_RESULT($warnCXXFLAGS)
8026
 
 
8027
 
   AC_ARG_ENABLE(iso-cxx,
8028
 
                 AC_HELP_STRING([--enable-iso-cxx],
8029
 
                                [Try to warn if code is not ISO C++ ]),,
8030
 
                 [enable_iso_cxx=no])
8031
 
 
8032
 
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
8033
 
   complCXXFLAGS=
8034
 
   if test "x$enable_iso_cxx" != "xno"; then
8035
 
     if test "x$GXX" = "xyes"; then
8036
 
      case " $CXXFLAGS " in
8037
 
      *[\ \     ]-ansi[\ \      ]*) ;;
8038
 
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
8039
 
      esac
8040
 
 
8041
 
      case " $CXXFLAGS " in
8042
 
      *[\ \     ]-pedantic[\ \  ]*) ;;
8043
 
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
8044
 
      esac
8045
 
     fi
8046
 
   fi
8047
 
  AC_MSG_RESULT($complCXXFLAGS)
8048
 
 
8049
 
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
8050
 
  AC_SUBST(WARN_CXXFLAGS)
8051
 
])
8052
 
 
8053
 
 
8054
 
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
8055
 
# serial 35 IT_PROG_INTLTOOL
8056
 
AC_DEFUN([IT_PROG_INTLTOOL],
8057
 
[AC_PREREQ([2.50])dnl
8058
 
 
8059
 
case "$am__api_version" in
8060
 
    1.[01234])
8061
 
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
8062
 
    ;;
8063
 
    *)
8064
 
    ;;
8065
 
esac
8066
 
 
8067
 
if test -n "$1"; then
8068
 
    AC_MSG_CHECKING(for intltool >= $1)
8069
 
 
8070
 
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
8071
 
    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
8072
 
    [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
8073
 
    ]
8074
 
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
8075
 
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
8076
 
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
8077
 
fi
8078
 
 
8079
 
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8080
 
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8081
 
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8082
 
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8083
 
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
8084
 
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8085
 
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8086
 
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8087
 
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8088
 
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8089
 
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8090
 
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
8091
 
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8092
 
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8093
 
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8094
 
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8095
 
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8096
 
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8097
 
 
8098
 
AC_SUBST(INTLTOOL_DESKTOP_RULE)
8099
 
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
8100
 
AC_SUBST(INTLTOOL_KEYS_RULE)
8101
 
AC_SUBST(INTLTOOL_PROP_RULE)
8102
 
AC_SUBST(INTLTOOL_OAF_RULE)
8103
 
AC_SUBST(INTLTOOL_PONG_RULE)
8104
 
AC_SUBST(INTLTOOL_SERVER_RULE)
8105
 
AC_SUBST(INTLTOOL_SHEET_RULE)
8106
 
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
8107
 
AC_SUBST(INTLTOOL_UI_RULE)
8108
 
AC_SUBST(INTLTOOL_XAM_RULE)
8109
 
AC_SUBST(INTLTOOL_KBD_RULE)
8110
 
AC_SUBST(INTLTOOL_XML_RULE)
8111
 
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
8112
 
AC_SUBST(INTLTOOL_CAVES_RULE)
8113
 
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
8114
 
AC_SUBST(INTLTOOL_THEME_RULE)
8115
 
AC_SUBST(INTLTOOL_SERVICE_RULE)
8116
 
 
8117
 
# Use the tools built into the package, not the ones that are installed.
8118
 
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
8119
 
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
8120
 
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
8121
 
 
8122
 
AC_PATH_PROG(INTLTOOL_PERL, perl)
8123
 
if test -z "$INTLTOOL_PERL"; then
8124
 
   AC_MSG_ERROR([perl not found; required for intltool])
8125
 
fi
8126
 
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
8127
 
   AC_MSG_ERROR([perl 5.x required for intltool])
8128
 
fi
8129
 
if test "x$2" != "xno-xml"; then
8130
 
   AC_MSG_CHECKING([for XML::Parser])
8131
 
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
8132
 
       AC_MSG_RESULT([ok])
8133
 
   else
8134
 
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
8135
 
   fi
8136
 
fi
8137
 
 
8138
 
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
8139
 
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
8140
 
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
8141
 
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
8142
 
 
8143
 
# Substitute ALL_LINGUAS so we can use it in po/Makefile
8144
 
AC_SUBST(ALL_LINGUAS)
8145
 
    
8146
 
IT_PO_SUBDIR([po])
8147
 
 
8148
 
dnl The following is very similar to
8149
 
dnl
8150
 
dnl     AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
8151
 
dnl
8152
 
dnl with the following slight differences:
8153
 
dnl  - the *.in files are in ac_aux_dir,
8154
 
dnl  - if the file haven't changed upon reconfigure, it's not touched,
8155
 
dnl  - the evaluation of the third parameter enables a hack which computes
8156
 
dnl    the actual value of $libdir,
8157
 
dnl  - the user sees "executing intltool commands", instead of
8158
 
dnl    "creating intltool-extract" and such.
8159
 
dnl
8160
 
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
8161
 
dnl a reason for it.
8162
 
 
8163
 
AC_CONFIG_COMMANDS([intltool], [
8164
 
 
8165
 
for file in intltool-extract intltool-merge intltool-update; do
8166
 
  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
8167
 
      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
8168
 
      -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
8169
 
      -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
8170
 
      -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
8171
 
      -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
8172
 
      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
8173
 
        < ${ac_aux_dir}/${file}.in > ${file}.out
8174
 
  if cmp -s ${file} ${file}.out 2>/dev/null; then
8175
 
    rm -f ${file}.out
8176
 
  else
8177
 
    mv -f ${file}.out ${file}
8178
 
  fi
8179
 
  chmod ugo+x ${file}
8180
 
  chmod u+w ${file}
8181
 
done
8182
 
 
8183
 
],
8184
 
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
8185
 
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
8186
 
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
8187
 
INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
8188
 
INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
8189
 
 
8190
 
])
8191
 
 
8192
 
 
8193
 
# IT_PO_SUBDIR(DIRNAME)
8194
 
# ---------------------
8195
 
# All po subdirs have to be declared with this macro; the subdir "po" is
8196
 
# declared by IT_PROG_INTLTOOL.
8197
 
#
8198
 
AC_DEFUN([IT_PO_SUBDIR],
8199
 
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
8200
 
dnl
8201
 
dnl The following CONFIG_COMMANDS should be exetuted at the very end
8202
 
dnl of config.status.
8203
 
AC_CONFIG_COMMANDS_PRE([
8204
 
  AC_CONFIG_COMMANDS([$1/stamp-it], [
8205
 
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
8206
 
    >"$1/stamp-it.tmp"
8207
 
    [sed '/^#/d
8208
 
         s/^[[].*] *//
8209
 
         /^[    ]*$/d
8210
 
        '"s|^|  $ac_top_srcdir/|" \
8211
 
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
8212
 
    ]
8213
 
    if test ! -f "$1/Makefile"; then
8214
 
      AC_MSG_ERROR([$1/Makefile is not ready.])
8215
 
    fi
8216
 
    mv "$1/Makefile" "$1/Makefile.tmp"
8217
 
    [sed '/^POTFILES =/,/[^\\]$/ {
8218
 
                /^POTFILES =/!d
8219
 
                r $1/POTFILES
8220
 
          }
8221
 
         ' "$1/Makefile.tmp" >"$1/Makefile"]
8222
 
    rm -f "$1/Makefile.tmp"
8223
 
    mv "$1/stamp-it.tmp" "$1/stamp-it"
8224
 
  ])
8225
 
])dnl
8226
 
])
8227
 
 
8228
 
 
8229
 
# deprecated macros
8230
 
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
8231
 
# A hint is needed for aclocal from Automake <= 1.9.4:
8232
 
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
8233
 
 
8234