~ubuntu-branches/ubuntu/trusty/evolution-exchange/trusty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Michael Biebl, Jeremy Bicha, Michael Biebl
  • Date: 2012-06-20 06:48:27 UTC
  • mfrom: (1.1.80) (0.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20120620064827-yzlmon3kc8gzd7pf
Tags: 3.4.3-2
* Team upload.

[ Jeremy Bicha ]
* Drop debian/exchange-connector-setup-2.26.1:
  - The manpage doesn't have any useful information and wasn't
    being installed anyway.

[ Michael Biebl ]
* Strip debian/tmp/ from .install file.
* List missing files on installation.
* Update Vcs-* URLs.
* Drop obsolete Build-Depends on liborbit2-dev and group the evo/eds
  Build-Depends together.
* Drop obsolete workaround to set -fPIC explicitly via CFLAGS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.11.5 -*- Autoconf -*-
2
2
 
3
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
 
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 
4
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
 
5
# Inc.
5
6
# This file is free software; the Free Software Foundation
6
7
# gives unlimited permission to copy and/or distribute it,
7
8
# with or without modifications, as long as this notice is preserved.
13
14
 
14
15
m4_ifndef([AC_AUTOCONF_VERSION],
15
16
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
 
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17
 
[m4_warning([this file was generated for autoconf 2.68.
 
17
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
 
18
[m4_warning([this file was generated for autoconf 2.69.
18
19
You have another version of autoconf.  It may work, but is not guaranteed to.
19
20
If you have problems, you may need to regenerate the build system entirely.
20
21
To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22
 
22
 
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 
23
dnl AM_GCONF_SOURCE_2
 
24
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
 
25
dnl  (i.e. pass to gconftool-2
 
26
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
 
27
dnl  you should install foo.schemas files
 
28
dnl
 
29
 
 
30
AC_DEFUN([AM_GCONF_SOURCE_2],
 
31
[
 
32
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
 
33
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 
34
  else
 
35
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
 
36
  fi
 
37
 
 
38
  AC_ARG_WITH([gconf-source],
 
39
              AC_HELP_STRING([--with-gconf-source=sourceaddress],
 
40
                             [Config database for installing schema files.]),
 
41
              [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
 
42
 
 
43
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
 
44
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
 
45
 
 
46
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
 
47
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
 
48
  fi
 
49
 
 
50
  AC_ARG_WITH([gconf-schema-file-dir],
 
51
              AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
 
52
                             [Directory for installing schema files.]),
 
53
              [GCONF_SCHEMA_FILE_DIR="$withval"],)
 
54
 
 
55
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
 
56
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
 
57
 
 
58
  AC_ARG_ENABLE(schemas-install,
 
59
        AC_HELP_STRING([--disable-schemas-install],
 
60
                       [Disable the schemas installation]),
 
61
     [case ${enableval} in
 
62
       yes|no) ;;
 
63
       *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
 
64
      esac])
 
65
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
 
66
])
 
67
 
 
68
# Configure paths for GLIB
 
69
# Owen Taylor     1997-2001
 
70
 
 
71
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
 
72
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
 
73
dnl gthread, or gio is specified in MODULES, pass to pkg-config
 
74
dnl
 
75
AC_DEFUN([AM_PATH_GLIB_2_0],
 
76
[dnl 
 
77
dnl Get the cflags and libraries from pkg-config
 
78
dnl
 
79
AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
 
80
                    , enable_glibtest=yes)
 
81
 
 
82
  pkg_config_args=glib-2.0
 
83
  for module in . $4
 
84
  do
 
85
      case "$module" in
 
86
         gmodule) 
 
87
             pkg_config_args="$pkg_config_args gmodule-2.0"
 
88
         ;;
 
89
         gmodule-no-export) 
 
90
             pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
 
91
         ;;
 
92
         gobject) 
 
93
             pkg_config_args="$pkg_config_args gobject-2.0"
 
94
         ;;
 
95
         gthread) 
 
96
             pkg_config_args="$pkg_config_args gthread-2.0"
 
97
         ;;
 
98
         gio*) 
 
99
             pkg_config_args="$pkg_config_args $module-2.0"
 
100
         ;;
 
101
      esac
 
102
  done
 
103
 
 
104
  PKG_PROG_PKG_CONFIG([0.16])
 
105
 
 
106
  no_glib=""
 
107
 
 
108
  if test "x$PKG_CONFIG" = x ; then
 
109
    no_glib=yes
 
110
    PKG_CONFIG=no
 
111
  fi
 
112
 
 
113
  min_glib_version=ifelse([$1], ,2.0.0,$1)
 
114
  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
 
115
 
 
116
  if test x$PKG_CONFIG != xno ; then
 
117
    ## don't try to run the test against uninstalled libtool libs
 
118
    if $PKG_CONFIG --uninstalled $pkg_config_args; then
 
119
          echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
 
120
          enable_glibtest=no
 
121
    fi
 
122
 
 
123
    if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
 
124
          :
 
125
    else
 
126
          no_glib=yes
 
127
    fi
 
128
  fi
 
129
 
 
130
  if test x"$no_glib" = x ; then
 
131
    GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
 
132
    GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
 
133
    GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
 
134
    GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
 
135
 
 
136
    GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
 
137
    GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
 
138
    glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
 
139
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
 
140
    glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
 
141
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
 
142
    glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
 
143
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
 
144
    if test "x$enable_glibtest" = "xyes" ; then
 
145
      ac_save_CFLAGS="$CFLAGS"
 
146
      ac_save_LIBS="$LIBS"
 
147
      CFLAGS="$CFLAGS $GLIB_CFLAGS"
 
148
      LIBS="$GLIB_LIBS $LIBS"
 
149
dnl
 
150
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
 
151
dnl checks the results of pkg-config to some extent)
 
152
dnl
 
153
      rm -f conf.glibtest
 
154
      AC_TRY_RUN([
 
155
#include <glib.h>
 
156
#include <stdio.h>
 
157
#include <stdlib.h>
 
158
 
 
159
int 
 
160
main ()
 
161
{
 
162
  unsigned int major, minor, micro;
 
163
  char *tmp_version;
 
164
 
 
165
  fclose (fopen ("conf.glibtest", "w"));
 
166
 
 
167
  /* HP/UX 9 (%@#!) writes to sscanf strings */
 
168
  tmp_version = g_strdup("$min_glib_version");
 
169
  if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, &micro) != 3) {
 
170
     printf("%s, bad version string\n", "$min_glib_version");
 
171
     exit(1);
 
172
   }
 
173
 
 
174
  if ((glib_major_version != $glib_config_major_version) ||
 
175
      (glib_minor_version != $glib_config_minor_version) ||
 
176
      (glib_micro_version != $glib_config_micro_version))
 
177
    {
 
178
      printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
 
179
             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
 
180
             glib_major_version, glib_minor_version, glib_micro_version);
 
181
      printf ("*** was found! If pkg-config was correct, then it is best\n");
 
182
      printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
 
183
      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
 
184
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
 
185
      printf("*** required on your system.\n");
 
186
      printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
 
187
      printf("*** to point to the correct configuration files\n");
 
188
    } 
 
189
  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
 
190
           (glib_minor_version != GLIB_MINOR_VERSION) ||
 
191
           (glib_micro_version != GLIB_MICRO_VERSION))
 
192
    {
 
193
      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
 
194
             GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
 
195
      printf("*** library (version %d.%d.%d)\n",
 
196
             glib_major_version, glib_minor_version, glib_micro_version);
 
197
    }
 
198
  else
 
199
    {
 
200
      if ((glib_major_version > major) ||
 
201
        ((glib_major_version == major) && (glib_minor_version > minor)) ||
 
202
        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
 
203
      {
 
204
        return 0;
 
205
       }
 
206
     else
 
207
      {
 
208
        printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
 
209
               glib_major_version, glib_minor_version, glib_micro_version);
 
210
        printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
 
211
               major, minor, micro);
 
212
        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
 
213
        printf("***\n");
 
214
        printf("*** If you have already installed a sufficiently new version, this error\n");
 
215
        printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
 
216
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
 
217
        printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
 
218
        printf("*** correct copy of pkg-config. (In this case, you will have to\n");
 
219
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
 
220
        printf("*** so that the correct libraries are found at run-time))\n");
 
221
      }
 
222
    }
 
223
  return 1;
 
224
}
 
225
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
 
226
       CFLAGS="$ac_save_CFLAGS"
 
227
       LIBS="$ac_save_LIBS"
 
228
     fi
 
229
  fi
 
230
  if test "x$no_glib" = x ; then
 
231
     AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
 
232
     ifelse([$2], , :, [$2])     
 
233
  else
 
234
     AC_MSG_RESULT(no)
 
235
     if test "$PKG_CONFIG" = "no" ; then
 
236
       echo "*** A new enough version of pkg-config was not found."
 
237
       echo "*** See http://www.freedesktop.org/software/pkgconfig/"
 
238
     else
 
239
       if test -f conf.glibtest ; then
 
240
        :
 
241
       else
 
242
          echo "*** Could not run GLIB test program, checking why..."
 
243
          ac_save_CFLAGS="$CFLAGS"
 
244
          ac_save_LIBS="$LIBS"
 
245
          CFLAGS="$CFLAGS $GLIB_CFLAGS"
 
246
          LIBS="$LIBS $GLIB_LIBS"
 
247
          AC_TRY_LINK([
 
248
#include <glib.h>
 
249
#include <stdio.h>
 
250
],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
 
251
        [ echo "*** The test program compiled, but did not run. This usually means"
 
252
          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
 
253
          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
 
254
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
 
255
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
 
256
          echo "*** is required on your system"
 
257
          echo "***"
 
258
          echo "*** If you have an old version installed, it is best to remove it, although"
 
259
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
 
260
        [ echo "*** The test program failed to compile or link. See the file config.log for the"
 
261
          echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
 
262
          CFLAGS="$ac_save_CFLAGS"
 
263
          LIBS="$ac_save_LIBS"
 
264
       fi
 
265
     fi
 
266
     GLIB_CFLAGS=""
 
267
     GLIB_LIBS=""
 
268
     GLIB_GENMARSHAL=""
 
269
     GOBJECT_QUERY=""
 
270
     GLIB_MKENUMS=""
 
271
     GLIB_COMPILE_RESOURCES=""
 
272
     ifelse([$3], , :, [$3])
 
273
  fi
 
274
  AC_SUBST(GLIB_CFLAGS)
 
275
  AC_SUBST(GLIB_LIBS)
 
276
  AC_SUBST(GLIB_GENMARSHAL)
 
277
  AC_SUBST(GOBJECT_QUERY)
 
278
  AC_SUBST(GLIB_MKENUMS)
 
279
  AC_SUBST(GLIB_COMPILE_RESOURCES)
 
280
  rm -f conf.glibtest
 
281
])
 
282
 
 
283
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
284
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
285
#
 
286
# This file is free software, distributed under the terms of the GNU
 
287
# General Public License.  As a special exception to the GNU General
 
288
# Public License, this file may be distributed as part of a program
 
289
# that contains a configuration script generated by Autoconf, under
 
290
# the same distribution terms as the rest of that program.
 
291
#
 
292
# This file can be copied and used freely without restrictions.  It can
 
293
# be used in projects which are not available under the GNU Public License
 
294
# but which still want to provide support for the GNU gettext functionality.
 
295
#
 
296
# Macro to add for using GNU gettext.
 
297
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
298
#
 
299
# Modified to never use included libintl. 
 
300
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
301
#
 
302
# Major rework to remove unused code
 
303
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
304
#
 
305
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
306
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
307
#
 
308
# Modified to require ngettext
 
309
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
310
#
 
311
# We need this here as well, since someone might use autoconf-2.5x
 
312
# to configure GLib then an older version to configure a package
 
313
# using AM_GLIB_GNU_GETTEXT
 
314
AC_PREREQ(2.53)
 
315
 
 
316
dnl
 
317
dnl We go to great lengths to make sure that aclocal won't 
 
318
dnl try to pull in the installed version of these macros
 
319
dnl when running aclocal in the glib directory.
 
320
dnl
 
321
m4_copy([AC_DEFUN],[glib_DEFUN])
 
322
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
323
dnl
 
324
dnl At the end, if we're not within glib, we'll define the public
 
325
dnl definitions in terms of our private definitions.
 
326
dnl
 
327
 
 
328
# GLIB_LC_MESSAGES
 
329
#--------------------
 
330
glib_DEFUN([GLIB_LC_MESSAGES],
 
331
  [AC_CHECK_HEADERS([locale.h])
 
332
    if test $ac_cv_header_locale_h = yes; then
 
333
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
334
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
335
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
336
    if test $am_cv_val_LC_MESSAGES = yes; then
 
337
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
338
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
339
    fi
 
340
  fi])
 
341
 
 
342
# GLIB_PATH_PROG_WITH_TEST
 
343
#----------------------------
 
344
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
345
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
346
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
347
[# Extract the first word of "$2", so it can be a program name with args.
 
348
set dummy $2; ac_word=[$]2
 
349
AC_MSG_CHECKING([for $ac_word])
 
350
AC_CACHE_VAL(ac_cv_path_$1,
 
351
[case "[$]$1" in
 
352
  /*)
 
353
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
354
  ;;
 
355
  *)
 
356
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
357
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
358
    test -z "$ac_dir" && ac_dir=.
 
359
    if test -f $ac_dir/$ac_word; then
 
360
      if [$3]; then
 
361
        ac_cv_path_$1="$ac_dir/$ac_word"
 
362
        break
 
363
      fi
 
364
    fi
 
365
  done
 
366
  IFS="$ac_save_ifs"
 
367
dnl If no 4th arg is given, leave the cache variable unset,
 
368
dnl so AC_PATH_PROGS will keep looking.
 
369
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
370
])dnl
 
371
  ;;
 
372
esac])dnl
 
373
$1="$ac_cv_path_$1"
 
374
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
375
  AC_MSG_RESULT([$]$1)
 
376
else
 
377
  AC_MSG_RESULT(no)
 
378
fi
 
379
AC_SUBST($1)dnl
 
380
])
 
381
 
 
382
# GLIB_WITH_NLS
 
383
#-----------------
 
384
glib_DEFUN([GLIB_WITH_NLS],
 
385
  dnl NLS is obligatory
 
386
  [USE_NLS=yes
 
387
    AC_SUBST(USE_NLS)
 
388
 
 
389
    gt_cv_have_gettext=no
 
390
 
 
391
    CATOBJEXT=NONE
 
392
    XGETTEXT=:
 
393
    INTLLIBS=
 
394
 
 
395
    AC_CHECK_HEADER(libintl.h,
 
396
     [gt_cv_func_dgettext_libintl="no"
 
397
      libintl_extra_libs=""
 
398
 
 
399
      #
 
400
      # First check in libc
 
401
      #
 
402
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
403
        [AC_TRY_LINK([
 
404
#include <libintl.h>
 
405
],
 
406
         [return !ngettext ("","", 1)],
 
407
          gt_cv_func_ngettext_libc=yes,
 
408
          gt_cv_func_ngettext_libc=no)
 
409
        ])
 
410
  
 
411
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
412
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
413
                [AC_TRY_LINK([
 
414
#include <libintl.h>
 
415
],
 
416
                  [return !dgettext ("","")],
 
417
                  gt_cv_func_dgettext_libc=yes,
 
418
                  gt_cv_func_dgettext_libc=no)
 
419
                ])
 
420
      fi
 
421
  
 
422
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
423
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
424
      fi
 
425
 
 
426
      #
 
427
      # If we don't have everything we want, check in libintl
 
428
      #
 
429
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
430
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
431
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
432
        
 
433
        AC_CHECK_LIB(intl, bindtextdomain,
 
434
            [AC_CHECK_LIB(intl, ngettext,
 
435
                    [AC_CHECK_LIB(intl, dgettext,
 
436
                                  gt_cv_func_dgettext_libintl=yes)])])
 
437
 
 
438
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
439
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
440
          AC_MSG_RESULT([])
 
441
          AC_CHECK_LIB(intl, ngettext,
 
442
                [AC_CHECK_LIB(intl, dcgettext,
 
443
                       [gt_cv_func_dgettext_libintl=yes
 
444
                        libintl_extra_libs=-liconv],
 
445
                        :,-liconv)],
 
446
                :,-liconv)
 
447
        fi
 
448
 
 
449
        #
 
450
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
451
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
452
        # and both have dgettext and ngettext
 
453
        #
 
454
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
455
          glib_save_LIBS="$LIBS"
 
456
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
457
          unset ac_cv_func_bind_textdomain_codeset
 
458
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
459
          LIBS="$glib_save_LIBS"
 
460
 
 
461
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
462
            gt_cv_func_dgettext_libc=no
 
463
          else
 
464
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
465
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
466
              gt_cv_func_dgettext_libintl=no
 
467
            fi
 
468
          fi
 
469
        fi
 
470
      fi
 
471
 
 
472
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
473
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
474
        gt_cv_have_gettext=yes
 
475
      fi
 
476
  
 
477
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
478
        INTLLIBS="-lintl $libintl_extra_libs"
 
479
      fi
 
480
  
 
481
      if test "$gt_cv_have_gettext" = "yes"; then
 
482
        AC_DEFINE(HAVE_GETTEXT,1,
 
483
          [Define if the GNU gettext() function is already present or preinstalled.])
 
484
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
485
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
486
        if test "$MSGFMT" != "no"; then
 
487
          glib_save_LIBS="$LIBS"
 
488
          LIBS="$LIBS $INTLLIBS"
 
489
          AC_CHECK_FUNCS(dcgettext)
 
490
          MSGFMT_OPTS=
 
491
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
492
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
493
msgid ""
 
494
msgstr ""
 
495
"Content-Type: text/plain; charset=UTF-8\n"
 
496
"Project-Id-Version: test 1.0\n"
 
497
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
498
"Last-Translator: test <foo@bar.xx>\n"
 
499
"Language-Team: C <LL@li.org>\n"
 
500
"MIME-Version: 1.0\n"
 
501
"Content-Transfer-Encoding: 8bit\n"
 
502
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
503
          AC_SUBST(MSGFMT_OPTS)
 
504
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
505
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
506
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
507
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
508
                         return _nl_msg_cat_cntr],
 
509
            [CATOBJEXT=.gmo 
 
510
             DATADIRNAME=share],
 
511
            [case $host in
 
512
            *-*-solaris*)
 
513
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
514
            dnl GNU format message catalog is always supported,
 
515
            dnl since both are added to the libc all together.
 
516
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
517
            dnl and CATOBJEXT=.gmo in this case.
 
518
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
519
              [CATOBJEXT=.gmo 
 
520
               DATADIRNAME=share],
 
521
              [CATOBJEXT=.mo
 
522
               DATADIRNAME=lib])
 
523
            ;;
 
524
            *-*-openbsd*)
 
525
            CATOBJEXT=.mo
 
526
            DATADIRNAME=share
 
527
            ;;
 
528
            *)
 
529
            CATOBJEXT=.mo
 
530
            DATADIRNAME=lib
 
531
            ;;
 
532
            esac])
 
533
          LIBS="$glib_save_LIBS"
 
534
          INSTOBJEXT=.mo
 
535
        else
 
536
          gt_cv_have_gettext=no
 
537
        fi
 
538
      fi
 
539
    ])
 
540
 
 
541
    if test "$gt_cv_have_gettext" = "yes" ; then
 
542
      AC_DEFINE(ENABLE_NLS, 1,
 
543
        [always defined to indicate that i18n is enabled])
 
544
    fi
 
545
 
 
546
    dnl Test whether we really found GNU xgettext.
 
547
    if test "$XGETTEXT" != ":"; then
 
548
      dnl If it is not GNU xgettext we define it as : so that the
 
549
      dnl Makefiles still can work.
 
550
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
551
        : ;
 
552
      else
 
553
        AC_MSG_RESULT(
 
554
          [found xgettext program is not GNU xgettext; ignore it])
 
555
        XGETTEXT=":"
 
556
      fi
 
557
    fi
 
558
 
 
559
    # We need to process the po/ directory.
 
560
    POSUB=po
 
561
 
 
562
    AC_OUTPUT_COMMANDS(
 
563
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
564
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
565
      esac])
 
566
 
 
567
    dnl These rules are solely for the distribution goal.  While doing this
 
568
    dnl we only have to keep exactly one list of the available catalogs
 
569
    dnl in configure.ac.
 
570
    for lang in $ALL_LINGUAS; do
 
571
      GMOFILES="$GMOFILES $lang.gmo"
 
572
      POFILES="$POFILES $lang.po"
 
573
    done
 
574
 
 
575
    dnl Make all variables we use known to autoconf.
 
576
    AC_SUBST(CATALOGS)
 
577
    AC_SUBST(CATOBJEXT)
 
578
    AC_SUBST(DATADIRNAME)
 
579
    AC_SUBST(GMOFILES)
 
580
    AC_SUBST(INSTOBJEXT)
 
581
    AC_SUBST(INTLLIBS)
 
582
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
583
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
584
    AC_SUBST(POFILES)
 
585
    AC_SUBST(POSUB)
 
586
  ])
 
587
 
 
588
# AM_GLIB_GNU_GETTEXT
 
589
# -------------------
 
590
# Do checks necessary for use of gettext. If a suitable implementation 
 
591
# of gettext is found in either in libintl or in the C library,
 
592
# it will set INTLLIBS to the libraries needed for use of gettext
 
593
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
594
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
595
# on various variables needed by the Makefile.in.in installed by 
 
596
# glib-gettextize.
 
597
dnl
 
598
glib_DEFUN([GLIB_GNU_GETTEXT],
 
599
  [AC_REQUIRE([AC_PROG_CC])dnl
 
600
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
601
   
 
602
   GLIB_LC_MESSAGES
 
603
   GLIB_WITH_NLS
 
604
 
 
605
   if test "$gt_cv_have_gettext" = "yes"; then
 
606
     if test "x$ALL_LINGUAS" = "x"; then
 
607
       LINGUAS=
 
608
     else
 
609
       AC_MSG_CHECKING(for catalogs to be installed)
 
610
       NEW_LINGUAS=
 
611
       for presentlang in $ALL_LINGUAS; do
 
612
         useit=no
 
613
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
614
           desiredlanguages="$LINGUAS"
 
615
         else
 
616
           desiredlanguages="$ALL_LINGUAS"
 
617
         fi
 
618
         for desiredlang in $desiredlanguages; do
 
619
           # Use the presentlang catalog if desiredlang is
 
620
           #   a. equal to presentlang, or
 
621
           #   b. a variant of presentlang (because in this case,
 
622
           #      presentlang can be used as a fallback for messages
 
623
           #      which are not translated in the desiredlang catalog).
 
624
           case "$desiredlang" in
 
625
             "$presentlang"*) useit=yes;;
 
626
           esac
 
627
         done
 
628
         if test $useit = yes; then
 
629
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
630
         fi
 
631
       done
 
632
       LINGUAS=$NEW_LINGUAS
 
633
       AC_MSG_RESULT($LINGUAS)
 
634
     fi
 
635
 
 
636
     dnl Construct list of names of catalog files to be constructed.
 
637
     if test -n "$LINGUAS"; then
 
638
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
639
     fi
 
640
   fi
 
641
 
 
642
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
643
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
644
   dnl Try to locate is.
 
645
   MKINSTALLDIRS=
 
646
   if test -n "$ac_aux_dir"; then
 
647
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
648
   fi
 
649
   if test -z "$MKINSTALLDIRS"; then
 
650
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
651
   fi
 
652
   AC_SUBST(MKINSTALLDIRS)
 
653
 
 
654
   dnl Generate list of files to be processed by xgettext which will
 
655
   dnl be included in po/Makefile.
 
656
   test -d po || mkdir po
 
657
   if test "x$srcdir" != "x."; then
 
658
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
659
       posrcprefix="$srcdir/"
 
660
     else
 
661
       posrcprefix="../$srcdir/"
 
662
     fi
 
663
   else
 
664
     posrcprefix="../"
 
665
   fi
 
666
   rm -f po/POTFILES
 
667
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
668
        < $srcdir/po/POTFILES.in > po/POTFILES
 
669
  ])
 
670
 
 
671
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
672
# -------------------------------
 
673
# Define VARIABLE to the location where catalog files will
 
674
# be installed by po/Makefile.
 
675
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
676
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
677
glib_save_prefix="$prefix"
 
678
glib_save_exec_prefix="$exec_prefix"
 
679
glib_save_datarootdir="$datarootdir"
 
680
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
681
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
682
datarootdir=`eval echo "${datarootdir}"`
 
683
if test "x$CATOBJEXT" = "x.mo" ; then
 
684
  localedir=`eval echo "${libdir}/locale"`
 
685
else
 
686
  localedir=`eval echo "${datadir}/locale"`
 
687
fi
 
688
prefix="$glib_save_prefix"
 
689
exec_prefix="$glib_save_exec_prefix"
 
690
datarootdir="$glib_save_datarootdir"
 
691
AC_DEFINE_UNQUOTED($1, "$localedir",
 
692
  [Define the location where the catalogs will be installed])
 
693
])
 
694
 
 
695
dnl
 
696
dnl Now the definitions that aclocal will find
 
697
dnl
 
698
ifdef(glib_configure_ac,[],[
 
699
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
700
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
701
])dnl
 
702
 
 
703
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
704
 
705
# Create a temporary file with TEST-FILE as its contents and pass the
 
706
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
707
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
708
AC_DEFUN([GLIB_RUN_PROG],
 
709
[cat >conftest.foo <<_ACEOF
 
710
$2
 
711
_ACEOF
 
712
if AC_RUN_LOG([$1 conftest.foo]); then
 
713
  m4_ifval([$3], [$3], [:])
 
714
m4_ifvaln([$4], [else $4])dnl
 
715
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
716
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
717
fi])
 
718
 
 
719
 
 
720
# nls.m4 serial 5 (gettext-0.18)
 
721
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
 
722
dnl Inc.
 
723
dnl This file is free software; the Free Software Foundation
 
724
dnl gives unlimited permission to copy and/or distribute it,
 
725
dnl with or without modifications, as long as this notice is preserved.
 
726
dnl
 
727
dnl This file can can be used in projects which are not available under
 
728
dnl the GNU General Public License or the GNU Library General Public
 
729
dnl License but which still want to provide support for the GNU gettext
 
730
dnl functionality.
 
731
dnl Please note that the actual code of the GNU gettext library is covered
 
732
dnl by the GNU Library General Public License, and the rest of the GNU
 
733
dnl gettext package package is covered by the GNU General Public License.
 
734
dnl They are *not* in the public domain.
 
735
 
 
736
dnl Authors:
 
737
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
738
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
739
 
 
740
AC_PREREQ([2.50])
 
741
 
 
742
AC_DEFUN([AM_NLS],
 
743
[
 
744
  AC_MSG_CHECKING([whether NLS is requested])
 
745
  dnl Default is enabled NLS
 
746
  AC_ARG_ENABLE([nls],
 
747
    [  --disable-nls           do not use Native Language Support],
 
748
    USE_NLS=$enableval, USE_NLS=yes)
 
749
  AC_MSG_RESULT([$USE_NLS])
 
750
  AC_SUBST([USE_NLS])
 
751
])
 
752
 
 
753
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
754
# serial 1 (pkg-config-0.24)
 
755
 
756
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
757
#
 
758
# This program is free software; you can redistribute it and/or modify
 
759
# it under the terms of the GNU General Public License as published by
 
760
# the Free Software Foundation; either version 2 of the License, or
 
761
# (at your option) any later version.
 
762
#
 
763
# This program is distributed in the hope that it will be useful, but
 
764
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
765
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
766
# General Public License for more details.
 
767
#
 
768
# You should have received a copy of the GNU General Public License
 
769
# along with this program; if not, write to the Free Software
 
770
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
771
#
 
772
# As a special exception to the GNU General Public License, if you
 
773
# distribute this file as part of a program that contains a
 
774
# configuration script generated by Autoconf, you may include it under
 
775
# the same distribution terms that you use for the rest of that program.
 
776
 
 
777
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
778
# ----------------------------------
 
779
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
780
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
781
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
 
782
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
 
783
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 
784
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 
785
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 
786
 
 
787
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
788
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
789
fi
 
790
if test -n "$PKG_CONFIG"; then
 
791
        _pkg_min_version=m4_default([$1], [0.9.0])
 
792
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
793
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
794
                AC_MSG_RESULT([yes])
 
795
        else
 
796
                AC_MSG_RESULT([no])
 
797
                PKG_CONFIG=""
 
798
        fi
 
799
fi[]dnl
 
800
])# PKG_PROG_PKG_CONFIG
 
801
 
 
802
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
803
#
 
804
# Check to see whether a particular set of modules exists.  Similar
 
805
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
806
#
 
807
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
808
# only at the first occurence in configure.ac, so if the first place
 
809
# it's called might be skipped (such as if it is within an "if", you
 
810
# have to call PKG_CHECK_EXISTS manually
 
811
# --------------------------------------------------------------
 
812
AC_DEFUN([PKG_CHECK_EXISTS],
 
813
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
814
if test -n "$PKG_CONFIG" && \
 
815
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
816
  m4_default([$2], [:])
 
817
m4_ifvaln([$3], [else
 
818
  $3])dnl
 
819
fi])
 
820
 
 
821
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
822
# ---------------------------------------------
 
823
m4_define([_PKG_CONFIG],
 
824
[if test -n "$$1"; then
 
825
    pkg_cv_[]$1="$$1"
 
826
 elif test -n "$PKG_CONFIG"; then
 
827
    PKG_CHECK_EXISTS([$3],
 
828
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
 
829
                      test "x$?" != "x0" && pkg_failed=yes ],
 
830
                     [pkg_failed=yes])
 
831
 else
 
832
    pkg_failed=untried
 
833
fi[]dnl
 
834
])# _PKG_CONFIG
 
835
 
 
836
# _PKG_SHORT_ERRORS_SUPPORTED
 
837
# -----------------------------
 
838
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
839
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
840
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
841
        _pkg_short_errors_supported=yes
 
842
else
 
843
        _pkg_short_errors_supported=no
 
844
fi[]dnl
 
845
])# _PKG_SHORT_ERRORS_SUPPORTED
 
846
 
 
847
 
 
848
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
849
# [ACTION-IF-NOT-FOUND])
 
850
#
 
851
#
 
852
# Note that if there is a possibility the first call to
 
853
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
854
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
855
#
 
856
#
 
857
# --------------------------------------------------------------
 
858
AC_DEFUN([PKG_CHECK_MODULES],
 
859
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
860
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
861
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
862
 
 
863
pkg_failed=no
 
864
AC_MSG_CHECKING([for $1])
 
865
 
 
866
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
867
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
868
 
 
869
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
870
and $1[]_LIBS to avoid the need to call pkg-config.
 
871
See the pkg-config man page for more details.])
 
872
 
 
873
if test $pkg_failed = yes; then
 
874
        AC_MSG_RESULT([no])
 
875
        _PKG_SHORT_ERRORS_SUPPORTED
 
876
        if test $_pkg_short_errors_supported = yes; then
 
877
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
 
878
        else 
 
879
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
 
880
        fi
 
881
        # Put the nasty error message in config.log where it belongs
 
882
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
883
 
 
884
        m4_default([$4], [AC_MSG_ERROR(
 
885
[Package requirements ($2) were not met:
 
886
 
 
887
$$1_PKG_ERRORS
 
888
 
 
889
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
890
installed software in a non-standard prefix.
 
891
 
 
892
_PKG_TEXT])[]dnl
 
893
        ])
 
894
elif test $pkg_failed = untried; then
 
895
        AC_MSG_RESULT([no])
 
896
        m4_default([$4], [AC_MSG_FAILURE(
 
897
[The pkg-config script could not be found or is too old.  Make sure it
 
898
is in your PATH or set the PKG_CONFIG environment variable to the full
 
899
path to pkg-config.
 
900
 
 
901
_PKG_TEXT
 
902
 
 
903
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
 
904
        ])
 
905
else
 
906
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
907
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
908
        AC_MSG_RESULT([yes])
 
909
        $3
 
910
fi[]dnl
 
911
])# PKG_CHECK_MODULES
 
912
 
 
913
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
 
914
# Foundation, Inc.
23
915
#
24
916
# This file is free software; the Free Software Foundation
25
917
# gives unlimited permission to copy and/or distribute it,
26
918
# with or without modifications, as long as this notice is preserved.
27
919
 
 
920
# serial 1
 
921
 
28
922
# AM_AUTOMAKE_VERSION(VERSION)
29
923
# ----------------------------
30
924
# Automake X.Y traces this macro to ensure aclocal.m4 has been
34
928
[am__api_version='1.11'
35
929
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36
930
dnl require some minimum version.  Point them to the right macro.
37
 
m4_if([$1], [1.11.1], [],
 
931
m4_if([$1], [1.11.5], [],
38
932
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39
933
])
40
934
 
50
944
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51
945
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52
946
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53
 
[AM_AUTOMAKE_VERSION([1.11.1])dnl
 
947
[AM_AUTOMAKE_VERSION([1.11.5])dnl
54
948
m4_ifndef([AC_AUTOCONF_VERSION],
55
949
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56
950
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57
951
 
58
952
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
59
953
 
60
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
954
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
61
955
#
62
956
# This file is free software; the Free Software Foundation
63
957
# gives unlimited permission to copy and/or distribute it,
64
958
# with or without modifications, as long as this notice is preserved.
65
959
 
 
960
# serial 1
 
961
 
66
962
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67
963
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
68
964
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
144
1040
Usually this means the macro was only invoked conditionally.]])
145
1041
fi])])
146
1042
 
147
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148
 
# Free Software Foundation, Inc.
 
1043
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
 
1044
# 2010, 2011 Free Software Foundation, Inc.
149
1045
#
150
1046
# This file is free software; the Free Software Foundation
151
1047
# gives unlimited permission to copy and/or distribute it,
152
1048
# with or without modifications, as long as this notice is preserved.
153
1049
 
154
 
# serial 10
 
1050
# serial 12
155
1051
 
156
1052
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157
1053
# written in clear, in which case automake, when reading aclocal.m4,
191
1087
  # instance it was reported that on HP-UX the gcc test will end up
192
1088
  # making a dummy file named `D' -- because `-MD' means `put the output
193
1089
  # in D'.
 
1090
  rm -rf conftest.dir
194
1091
  mkdir conftest.dir
195
1092
  # Copy depcomp to subdir because otherwise we won't find it if we're
196
1093
  # using a relative directory.
255
1152
        break
256
1153
      fi
257
1154
      ;;
258
 
    msvisualcpp | msvcmsys)
 
1155
    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
259
1156
      # This compiler won't grok `-c -o', but also, the minuso test has
260
1157
      # not run yet.  These depmodes are late enough in the game, and
261
1158
      # so weak that their functioning should not be impacted.
320
1217
if test "x$enable_dependency_tracking" != xno; then
321
1218
  am_depcomp="$ac_aux_dir/depcomp"
322
1219
  AMDEPBACKSLASH='\'
 
1220
  am__nodep='_no'
323
1221
fi
324
1222
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325
1223
AC_SUBST([AMDEPBACKSLASH])dnl
326
1224
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
1225
AC_SUBST([am__nodep])dnl
 
1226
_AM_SUBST_NOTMAKE([am__nodep])dnl
327
1227
])
328
1228
 
329
1229
# Generate code to set up dependency tracking.              -*- Autoconf -*-
545
1445
done
546
1446
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
547
1447
 
548
 
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 
1448
# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
 
1449
# Inc.
549
1450
#
550
1451
# This file is free software; the Free Software Foundation
551
1452
# gives unlimited permission to copy and/or distribute it,
552
1453
# with or without modifications, as long as this notice is preserved.
553
1454
 
 
1455
# serial 1
 
1456
 
554
1457
# AM_PROG_INSTALL_SH
555
1458
# ------------------
556
1459
# Define $install_sh.
590
1493
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
591
1494
# From Jim Meyering
592
1495
 
593
 
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
594
 
# Free Software Foundation, Inc.
 
1496
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
 
1497
# 2011 Free Software Foundation, Inc.
595
1498
#
596
1499
# This file is free software; the Free Software Foundation
597
1500
# gives unlimited permission to copy and/or distribute it,
611
1514
       [disable], [m4_define([am_maintainer_other], [enable])],
612
1515
       [m4_define([am_maintainer_other], [enable])
613
1516
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
614
 
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
 
1517
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
615
1518
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
616
1519
  AC_ARG_ENABLE([maintainer-mode],
617
1520
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
757
1660
fi
758
1661
])
759
1662
 
760
 
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
1663
# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
 
1664
# Inc.
761
1665
#
762
1666
# This file is free software; the Free Software Foundation
763
1667
# gives unlimited permission to copy and/or distribute it,
764
1668
# with or without modifications, as long as this notice is preserved.
765
1669
 
 
1670
# serial 1
 
1671
 
766
1672
# AM_PROG_MKDIR_P
767
1673
# ---------------
768
1674
# Check for `mkdir -p'.
785
1691
 
786
1692
# Helper functions for option handling.                     -*- Autoconf -*-
787
1693
 
788
 
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 
1694
# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
 
1695
# Foundation, Inc.
789
1696
#
790
1697
# This file is free software; the Free Software Foundation
791
1698
# gives unlimited permission to copy and/or distribute it,
792
1699
# with or without modifications, as long as this notice is preserved.
793
1700
 
794
 
# serial 4
 
1701
# serial 5
795
1702
 
796
1703
# _AM_MANGLE_OPTION(NAME)
797
1704
# -----------------------
799
1706
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
800
1707
 
801
1708
# _AM_SET_OPTION(NAME)
802
 
# ------------------------------
 
1709
# --------------------
803
1710
# Set option NAME.  Presently that only means defining a flag for this option.
804
1711
AC_DEFUN([_AM_SET_OPTION],
805
1712
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
806
1713
 
807
1714
# _AM_SET_OPTIONS(OPTIONS)
808
 
# ----------------------------------
 
1715
# ------------------------
809
1716
# OPTIONS is a space-separated list of Automake options.
810
1717
AC_DEFUN([_AM_SET_OPTIONS],
811
1718
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
881
1788
fi
882
1789
AC_MSG_RESULT(yes)])
883
1790
 
884
 
# Copyright (C) 2009  Free Software Foundation, Inc.
 
1791
# Copyright (C) 2009, 2011  Free Software Foundation, Inc.
885
1792
#
886
1793
# This file is free software; the Free Software Foundation
887
1794
# gives unlimited permission to copy and/or distribute it,
888
1795
# with or without modifications, as long as this notice is preserved.
889
1796
 
890
 
# serial 1
 
1797
# serial 2
891
1798
 
892
1799
# AM_SILENT_RULES([DEFAULT])
893
1800
# --------------------------
902
1809
no)  AM_DEFAULT_VERBOSITY=1;;
903
1810
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
904
1811
esac
 
1812
dnl
 
1813
dnl A few `make' implementations (e.g., NonStop OS and NextStep)
 
1814
dnl do not support nested variable expansions.
 
1815
dnl See automake bug#9928 and bug#10237.
 
1816
am_make=${MAKE-make}
 
1817
AC_CACHE_CHECK([whether $am_make supports nested variables],
 
1818
   [am_cv_make_support_nested_variables],
 
1819
   [if AS_ECHO([['TRUE=$(BAR$(V))
 
1820
BAR0=false
 
1821
BAR1=true
 
1822
V=1
 
1823
am__doit:
 
1824
        @$(TRUE)
 
1825
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
 
1826
  am_cv_make_support_nested_variables=yes
 
1827
else
 
1828
  am_cv_make_support_nested_variables=no
 
1829
fi])
 
1830
if test $am_cv_make_support_nested_variables = yes; then
 
1831
  dnl Using `$V' instead of `$(V)' breaks IRIX make.
 
1832
  AM_V='$(V)'
 
1833
  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
 
1834
else
 
1835
  AM_V=$AM_DEFAULT_VERBOSITY
 
1836
  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
 
1837
fi
 
1838
AC_SUBST([AM_V])dnl
 
1839
AM_SUBST_NOTMAKE([AM_V])dnl
 
1840
AC_SUBST([AM_DEFAULT_V])dnl
 
1841
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
905
1842
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
906
1843
AM_BACKSLASH='\'
907
1844
AC_SUBST([AM_BACKSLASH])dnl
908
1845
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
909
1846
])
910
1847
 
911
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
1848
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
912
1849
#
913
1850
# This file is free software; the Free Software Foundation
914
1851
# gives unlimited permission to copy and/or distribute it,
915
1852
# with or without modifications, as long as this notice is preserved.
916
1853
 
 
1854
# serial 1
 
1855
 
917
1856
# AM_PROG_INSTALL_STRIP
918
1857
# ---------------------
919
1858
# One issue with vendor `install' (even GNU) is that you can't
936
1875
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
937
1876
AC_SUBST([INSTALL_STRIP_PROGRAM])])
938
1877
 
939
 
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 
1878
# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
940
1879
#
941
1880
# This file is free software; the Free Software Foundation
942
1881
# gives unlimited permission to copy and/or distribute it,
943
1882
# with or without modifications, as long as this notice is preserved.
944
1883
 
945
 
# serial 2
 
1884
# serial 3
946
1885
 
947
1886
# _AM_SUBST_NOTMAKE(VARIABLE)
948
1887
# ---------------------------
951
1890
AC_DEFUN([_AM_SUBST_NOTMAKE])
952
1891
 
953
1892
# AM_SUBST_NOTMAKE(VARIABLE)
954
 
# ---------------------------
 
1893
# --------------------------
955
1894
# Public sister of _AM_SUBST_NOTMAKE.
956
1895
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
957
1896
 
958
1897
# Check how to create a tarball.                            -*- Autoconf -*-
959
1898
 
960
 
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
1899
# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
961
1900
#
962
1901
# This file is free software; the Free Software Foundation
963
1902
# gives unlimited permission to copy and/or distribute it,
979
1918
# a tarball read from stdin.
980
1919
#     $(am__untar) < result.tar
981
1920
AC_DEFUN([_AM_PROG_TAR],
982
 
[# Always define AMTAR for backward compatibility.
983
 
AM_MISSING_PROG([AMTAR], [tar])
 
1921
[# Always define AMTAR for backward compatibility.  Yes, it's still used
 
1922
# in the wild :-(  We should find a proper way to deprecate it ...
 
1923
AC_SUBST([AMTAR], ['$${TAR-tar}'])
984
1924
m4_if([$1], [v7],
985
 
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
1925
     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
986
1926
     [m4_case([$1], [ustar],, [pax],,
987
1927
              [m4_fatal([Unknown tar format])])
988
1928
AC_MSG_CHECKING([how to create a $1 tar archive])
1051
1991
AC_SUBST([am__untar])
1052
1992
]) # _AM_PROG_TAR
1053
1993
 
1054
 
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
1055
 
# serial 1 (pkg-config-0.24)
1056
 
1057
 
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1058
 
#
1059
 
# This program is free software; you can redistribute it and/or modify
1060
 
# it under the terms of the GNU General Public License as published by
1061
 
# the Free Software Foundation; either version 2 of the License, or
1062
 
# (at your option) any later version.
1063
 
#
1064
 
# This program is distributed in the hope that it will be useful, but
1065
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
1066
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1067
 
# General Public License for more details.
1068
 
#
1069
 
# You should have received a copy of the GNU General Public License
1070
 
# along with this program; if not, write to the Free Software
1071
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1072
 
#
1073
 
# As a special exception to the GNU General Public License, if you
1074
 
# distribute this file as part of a program that contains a
1075
 
# configuration script generated by Autoconf, you may include it under
1076
 
# the same distribution terms that you use for the rest of that program.
1077
 
 
1078
 
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1079
 
# ----------------------------------
1080
 
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1081
 
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1082
 
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1083
 
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1084
 
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1085
 
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1086
 
 
1087
 
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1088
 
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1089
 
fi
1090
 
if test -n "$PKG_CONFIG"; then
1091
 
        _pkg_min_version=m4_default([$1], [0.9.0])
1092
 
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1093
 
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1094
 
                AC_MSG_RESULT([yes])
1095
 
        else
1096
 
                AC_MSG_RESULT([no])
1097
 
                PKG_CONFIG=""
1098
 
        fi
1099
 
fi[]dnl
1100
 
])# PKG_PROG_PKG_CONFIG
1101
 
 
1102
 
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1103
 
#
1104
 
# Check to see whether a particular set of modules exists.  Similar
1105
 
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1106
 
#
1107
 
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1108
 
# only at the first occurence in configure.ac, so if the first place
1109
 
# it's called might be skipped (such as if it is within an "if", you
1110
 
# have to call PKG_CHECK_EXISTS manually
1111
 
# --------------------------------------------------------------
1112
 
AC_DEFUN([PKG_CHECK_EXISTS],
1113
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1114
 
if test -n "$PKG_CONFIG" && \
1115
 
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1116
 
  m4_default([$2], [:])
1117
 
m4_ifvaln([$3], [else
1118
 
  $3])dnl
1119
 
fi])
1120
 
 
1121
 
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1122
 
# ---------------------------------------------
1123
 
m4_define([_PKG_CONFIG],
1124
 
[if test -n "$$1"; then
1125
 
    pkg_cv_[]$1="$$1"
1126
 
 elif test -n "$PKG_CONFIG"; then
1127
 
    PKG_CHECK_EXISTS([$3],
1128
 
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1129
 
                     [pkg_failed=yes])
1130
 
 else
1131
 
    pkg_failed=untried
1132
 
fi[]dnl
1133
 
])# _PKG_CONFIG
1134
 
 
1135
 
# _PKG_SHORT_ERRORS_SUPPORTED
1136
 
# -----------------------------
1137
 
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1138
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1139
 
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1140
 
        _pkg_short_errors_supported=yes
1141
 
else
1142
 
        _pkg_short_errors_supported=no
1143
 
fi[]dnl
1144
 
])# _PKG_SHORT_ERRORS_SUPPORTED
1145
 
 
1146
 
 
1147
 
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1148
 
# [ACTION-IF-NOT-FOUND])
1149
 
#
1150
 
#
1151
 
# Note that if there is a possibility the first call to
1152
 
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1153
 
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1154
 
#
1155
 
#
1156
 
# --------------------------------------------------------------
1157
 
AC_DEFUN([PKG_CHECK_MODULES],
1158
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1159
 
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1160
 
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1161
 
 
1162
 
pkg_failed=no
1163
 
AC_MSG_CHECKING([for $1])
1164
 
 
1165
 
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1166
 
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1167
 
 
1168
 
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1169
 
and $1[]_LIBS to avoid the need to call pkg-config.
1170
 
See the pkg-config man page for more details.])
1171
 
 
1172
 
if test $pkg_failed = yes; then
1173
 
        AC_MSG_RESULT([no])
1174
 
        _PKG_SHORT_ERRORS_SUPPORTED
1175
 
        if test $_pkg_short_errors_supported = yes; then
1176
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1177
 
        else 
1178
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1179
 
        fi
1180
 
        # Put the nasty error message in config.log where it belongs
1181
 
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1182
 
 
1183
 
        m4_default([$4], [AC_MSG_ERROR(
1184
 
[Package requirements ($2) were not met:
1185
 
 
1186
 
$$1_PKG_ERRORS
1187
 
 
1188
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1189
 
installed software in a non-standard prefix.
1190
 
 
1191
 
_PKG_TEXT])[]dnl
1192
 
        ])
1193
 
elif test $pkg_failed = untried; then
1194
 
        AC_MSG_RESULT([no])
1195
 
        m4_default([$4], [AC_MSG_FAILURE(
1196
 
[The pkg-config script could not be found or is too old.  Make sure it
1197
 
is in your PATH or set the PKG_CONFIG environment variable to the full
1198
 
path to pkg-config.
1199
 
 
1200
 
_PKG_TEXT
1201
 
 
1202
 
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1203
 
        ])
1204
 
else
1205
 
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1206
 
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1207
 
        AC_MSG_RESULT([yes])
1208
 
        $3
1209
 
fi[]dnl
1210
 
])# PKG_CHECK_MODULES
1211
 
 
1212
 
dnl AM_GCONF_SOURCE_2
1213
 
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
1214
 
dnl  (i.e. pass to gconftool-2
1215
 
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
1216
 
dnl  you should install foo.schemas files
1217
 
dnl
1218
 
 
1219
 
AC_DEFUN([AM_GCONF_SOURCE_2],
1220
 
[
1221
 
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
1222
 
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
1223
 
  else
1224
 
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
1225
 
  fi
1226
 
 
1227
 
  AC_ARG_WITH([gconf-source],
1228
 
              AC_HELP_STRING([--with-gconf-source=sourceaddress],
1229
 
                             [Config database for installing schema files.]),
1230
 
              [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
1231
 
 
1232
 
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
1233
 
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
1234
 
 
1235
 
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
1236
 
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
1237
 
  fi
1238
 
 
1239
 
  AC_ARG_WITH([gconf-schema-file-dir],
1240
 
              AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
1241
 
                             [Directory for installing schema files.]),
1242
 
              [GCONF_SCHEMA_FILE_DIR="$withval"],)
1243
 
 
1244
 
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
1245
 
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
1246
 
 
1247
 
  AC_ARG_ENABLE(schemas-install,
1248
 
        AC_HELP_STRING([--disable-schemas-install],
1249
 
                       [Disable the schemas installation]),
1250
 
     [case ${enableval} in
1251
 
       yes|no) ;;
1252
 
       *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
1253
 
      esac])
1254
 
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
1255
 
])
1256
 
 
1257
 
# Configure paths for GLIB
1258
 
# Owen Taylor     1997-2001
1259
 
 
1260
 
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
1261
 
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
1262
 
dnl gthread, or gio is specified in MODULES, pass to pkg-config
1263
 
dnl
1264
 
AC_DEFUN([AM_PATH_GLIB_2_0],
1265
 
[dnl 
1266
 
dnl Get the cflags and libraries from pkg-config
1267
 
dnl
1268
 
AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
1269
 
                    , enable_glibtest=yes)
1270
 
 
1271
 
  pkg_config_args=glib-2.0
1272
 
  for module in . $4
1273
 
  do
1274
 
      case "$module" in
1275
 
         gmodule) 
1276
 
             pkg_config_args="$pkg_config_args gmodule-2.0"
1277
 
         ;;
1278
 
         gmodule-no-export) 
1279
 
             pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
1280
 
         ;;
1281
 
         gobject) 
1282
 
             pkg_config_args="$pkg_config_args gobject-2.0"
1283
 
         ;;
1284
 
         gthread) 
1285
 
             pkg_config_args="$pkg_config_args gthread-2.0"
1286
 
         ;;
1287
 
         gio*) 
1288
 
             pkg_config_args="$pkg_config_args $module-2.0"
1289
 
         ;;
1290
 
      esac
1291
 
  done
1292
 
 
1293
 
  PKG_PROG_PKG_CONFIG([0.16])
1294
 
 
1295
 
  no_glib=""
1296
 
 
1297
 
  if test "x$PKG_CONFIG" = x ; then
1298
 
    no_glib=yes
1299
 
    PKG_CONFIG=no
1300
 
  fi
1301
 
 
1302
 
  min_glib_version=ifelse([$1], ,2.0.0,$1)
1303
 
  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
1304
 
 
1305
 
  if test x$PKG_CONFIG != xno ; then
1306
 
    ## don't try to run the test against uninstalled libtool libs
1307
 
    if $PKG_CONFIG --uninstalled $pkg_config_args; then
1308
 
          echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
1309
 
          enable_glibtest=no
1310
 
    fi
1311
 
 
1312
 
    if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
1313
 
          :
1314
 
    else
1315
 
          no_glib=yes
1316
 
    fi
1317
 
  fi
1318
 
 
1319
 
  if test x"$no_glib" = x ; then
1320
 
    GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
1321
 
    GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
1322
 
    GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
1323
 
    GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
1324
 
 
1325
 
    GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
1326
 
    GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
1327
 
    glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
1328
 
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1329
 
    glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
1330
 
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1331
 
    glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
1332
 
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1333
 
    if test "x$enable_glibtest" = "xyes" ; then
1334
 
      ac_save_CFLAGS="$CFLAGS"
1335
 
      ac_save_LIBS="$LIBS"
1336
 
      CFLAGS="$CFLAGS $GLIB_CFLAGS"
1337
 
      LIBS="$GLIB_LIBS $LIBS"
1338
 
dnl
1339
 
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
1340
 
dnl checks the results of pkg-config to some extent)
1341
 
dnl
1342
 
      rm -f conf.glibtest
1343
 
      AC_TRY_RUN([
1344
 
#include <glib.h>
1345
 
#include <stdio.h>
1346
 
#include <stdlib.h>
1347
 
 
1348
 
int 
1349
 
main ()
1350
 
{
1351
 
  unsigned int major, minor, micro;
1352
 
  char *tmp_version;
1353
 
 
1354
 
  fclose (fopen ("conf.glibtest", "w"));
1355
 
 
1356
 
  /* HP/UX 9 (%@#!) writes to sscanf strings */
1357
 
  tmp_version = g_strdup("$min_glib_version");
1358
 
  if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, &micro) != 3) {
1359
 
     printf("%s, bad version string\n", "$min_glib_version");
1360
 
     exit(1);
1361
 
   }
1362
 
 
1363
 
  if ((glib_major_version != $glib_config_major_version) ||
1364
 
      (glib_minor_version != $glib_config_minor_version) ||
1365
 
      (glib_micro_version != $glib_config_micro_version))
1366
 
    {
1367
 
      printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
1368
 
             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
1369
 
             glib_major_version, glib_minor_version, glib_micro_version);
1370
 
      printf ("*** was found! If pkg-config was correct, then it is best\n");
1371
 
      printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
1372
 
      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1373
 
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1374
 
      printf("*** required on your system.\n");
1375
 
      printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
1376
 
      printf("*** to point to the correct configuration files\n");
1377
 
    } 
1378
 
  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
1379
 
           (glib_minor_version != GLIB_MINOR_VERSION) ||
1380
 
           (glib_micro_version != GLIB_MICRO_VERSION))
1381
 
    {
1382
 
      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
1383
 
             GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
1384
 
      printf("*** library (version %d.%d.%d)\n",
1385
 
             glib_major_version, glib_minor_version, glib_micro_version);
1386
 
    }
1387
 
  else
1388
 
    {
1389
 
      if ((glib_major_version > major) ||
1390
 
        ((glib_major_version == major) && (glib_minor_version > minor)) ||
1391
 
        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
1392
 
      {
1393
 
        return 0;
1394
 
       }
1395
 
     else
1396
 
      {
1397
 
        printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
1398
 
               glib_major_version, glib_minor_version, glib_micro_version);
1399
 
        printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
1400
 
               major, minor, micro);
1401
 
        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
1402
 
        printf("***\n");
1403
 
        printf("*** If you have already installed a sufficiently new version, this error\n");
1404
 
        printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
1405
 
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
1406
 
        printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
1407
 
        printf("*** correct copy of pkg-config. (In this case, you will have to\n");
1408
 
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1409
 
        printf("*** so that the correct libraries are found at run-time))\n");
1410
 
      }
1411
 
    }
1412
 
  return 1;
1413
 
}
1414
 
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1415
 
       CFLAGS="$ac_save_CFLAGS"
1416
 
       LIBS="$ac_save_LIBS"
1417
 
     fi
1418
 
  fi
1419
 
  if test "x$no_glib" = x ; then
1420
 
     AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
1421
 
     ifelse([$2], , :, [$2])     
1422
 
  else
1423
 
     AC_MSG_RESULT(no)
1424
 
     if test "$PKG_CONFIG" = "no" ; then
1425
 
       echo "*** A new enough version of pkg-config was not found."
1426
 
       echo "*** See http://www.freedesktop.org/software/pkgconfig/"
1427
 
     else
1428
 
       if test -f conf.glibtest ; then
1429
 
        :
1430
 
       else
1431
 
          echo "*** Could not run GLIB test program, checking why..."
1432
 
          ac_save_CFLAGS="$CFLAGS"
1433
 
          ac_save_LIBS="$LIBS"
1434
 
          CFLAGS="$CFLAGS $GLIB_CFLAGS"
1435
 
          LIBS="$LIBS $GLIB_LIBS"
1436
 
          AC_TRY_LINK([
1437
 
#include <glib.h>
1438
 
#include <stdio.h>
1439
 
],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
1440
 
        [ echo "*** The test program compiled, but did not run. This usually means"
1441
 
          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
1442
 
          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
1443
 
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1444
 
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
1445
 
          echo "*** is required on your system"
1446
 
          echo "***"
1447
 
          echo "*** If you have an old version installed, it is best to remove it, although"
1448
 
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
1449
 
        [ echo "*** The test program failed to compile or link. See the file config.log for the"
1450
 
          echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
1451
 
          CFLAGS="$ac_save_CFLAGS"
1452
 
          LIBS="$ac_save_LIBS"
1453
 
       fi
1454
 
     fi
1455
 
     GLIB_CFLAGS=""
1456
 
     GLIB_LIBS=""
1457
 
     GLIB_GENMARSHAL=""
1458
 
     GOBJECT_QUERY=""
1459
 
     GLIB_MKENUMS=""
1460
 
     GLIB_COMPILE_RESOURCES=""
1461
 
     ifelse([$3], , :, [$3])
1462
 
  fi
1463
 
  AC_SUBST(GLIB_CFLAGS)
1464
 
  AC_SUBST(GLIB_LIBS)
1465
 
  AC_SUBST(GLIB_GENMARSHAL)
1466
 
  AC_SUBST(GOBJECT_QUERY)
1467
 
  AC_SUBST(GLIB_MKENUMS)
1468
 
  AC_SUBST(GLIB_COMPILE_RESOURCES)
1469
 
  rm -f conf.glibtest
1470
 
])
1471
 
 
1472
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
1473
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1474
 
#
1475
 
# This file is free software, distributed under the terms of the GNU
1476
 
# General Public License.  As a special exception to the GNU General
1477
 
# Public License, this file may be distributed as part of a program
1478
 
# that contains a configuration script generated by Autoconf, under
1479
 
# the same distribution terms as the rest of that program.
1480
 
#
1481
 
# This file can be copied and used freely without restrictions.  It can
1482
 
# be used in projects which are not available under the GNU Public License
1483
 
# but which still want to provide support for the GNU gettext functionality.
1484
 
#
1485
 
# Macro to add for using GNU gettext.
1486
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
1487
 
#
1488
 
# Modified to never use included libintl. 
1489
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
1490
 
#
1491
 
# Major rework to remove unused code
1492
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
1493
 
#
1494
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
1495
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
1496
 
#
1497
 
# Modified to require ngettext
1498
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
1499
 
#
1500
 
# We need this here as well, since someone might use autoconf-2.5x
1501
 
# to configure GLib then an older version to configure a package
1502
 
# using AM_GLIB_GNU_GETTEXT
1503
 
AC_PREREQ(2.53)
1504
 
 
1505
 
dnl
1506
 
dnl We go to great lengths to make sure that aclocal won't 
1507
 
dnl try to pull in the installed version of these macros
1508
 
dnl when running aclocal in the glib directory.
1509
 
dnl
1510
 
m4_copy([AC_DEFUN],[glib_DEFUN])
1511
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
1512
 
dnl
1513
 
dnl At the end, if we're not within glib, we'll define the public
1514
 
dnl definitions in terms of our private definitions.
1515
 
dnl
1516
 
 
1517
 
# GLIB_LC_MESSAGES
1518
 
#--------------------
1519
 
glib_DEFUN([GLIB_LC_MESSAGES],
1520
 
  [AC_CHECK_HEADERS([locale.h])
1521
 
    if test $ac_cv_header_locale_h = yes; then
1522
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1523
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1524
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1525
 
    if test $am_cv_val_LC_MESSAGES = yes; then
1526
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
1527
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
1528
 
    fi
1529
 
  fi])
1530
 
 
1531
 
# GLIB_PATH_PROG_WITH_TEST
1532
 
#----------------------------
1533
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1534
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1535
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
1536
 
[# Extract the first word of "$2", so it can be a program name with args.
1537
 
set dummy $2; ac_word=[$]2
1538
 
AC_MSG_CHECKING([for $ac_word])
1539
 
AC_CACHE_VAL(ac_cv_path_$1,
1540
 
[case "[$]$1" in
1541
 
  /*)
1542
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1543
 
  ;;
1544
 
  *)
1545
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1546
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
1547
 
    test -z "$ac_dir" && ac_dir=.
1548
 
    if test -f $ac_dir/$ac_word; then
1549
 
      if [$3]; then
1550
 
        ac_cv_path_$1="$ac_dir/$ac_word"
1551
 
        break
1552
 
      fi
1553
 
    fi
1554
 
  done
1555
 
  IFS="$ac_save_ifs"
1556
 
dnl If no 4th arg is given, leave the cache variable unset,
1557
 
dnl so AC_PATH_PROGS will keep looking.
1558
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1559
 
])dnl
1560
 
  ;;
1561
 
esac])dnl
1562
 
$1="$ac_cv_path_$1"
1563
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1564
 
  AC_MSG_RESULT([$]$1)
1565
 
else
1566
 
  AC_MSG_RESULT(no)
1567
 
fi
1568
 
AC_SUBST($1)dnl
1569
 
])
1570
 
 
1571
 
# GLIB_WITH_NLS
1572
 
#-----------------
1573
 
glib_DEFUN([GLIB_WITH_NLS],
1574
 
  dnl NLS is obligatory
1575
 
  [USE_NLS=yes
1576
 
    AC_SUBST(USE_NLS)
1577
 
 
1578
 
    gt_cv_have_gettext=no
1579
 
 
1580
 
    CATOBJEXT=NONE
1581
 
    XGETTEXT=:
1582
 
    INTLLIBS=
1583
 
 
1584
 
    AC_CHECK_HEADER(libintl.h,
1585
 
     [gt_cv_func_dgettext_libintl="no"
1586
 
      libintl_extra_libs=""
1587
 
 
1588
 
      #
1589
 
      # First check in libc
1590
 
      #
1591
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1592
 
        [AC_TRY_LINK([
1593
 
#include <libintl.h>
1594
 
],
1595
 
         [return !ngettext ("","", 1)],
1596
 
          gt_cv_func_ngettext_libc=yes,
1597
 
          gt_cv_func_ngettext_libc=no)
1598
 
        ])
1599
 
  
1600
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1601
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1602
 
                [AC_TRY_LINK([
1603
 
#include <libintl.h>
1604
 
],
1605
 
                  [return !dgettext ("","")],
1606
 
                  gt_cv_func_dgettext_libc=yes,
1607
 
                  gt_cv_func_dgettext_libc=no)
1608
 
                ])
1609
 
      fi
1610
 
  
1611
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1612
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
1613
 
      fi
1614
 
 
1615
 
      #
1616
 
      # If we don't have everything we want, check in libintl
1617
 
      #
1618
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
1619
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
1620
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1621
 
        
1622
 
        AC_CHECK_LIB(intl, bindtextdomain,
1623
 
            [AC_CHECK_LIB(intl, ngettext,
1624
 
                    [AC_CHECK_LIB(intl, dgettext,
1625
 
                                  gt_cv_func_dgettext_libintl=yes)])])
1626
 
 
1627
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1628
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
1629
 
          AC_MSG_RESULT([])
1630
 
          AC_CHECK_LIB(intl, ngettext,
1631
 
                [AC_CHECK_LIB(intl, dcgettext,
1632
 
                       [gt_cv_func_dgettext_libintl=yes
1633
 
                        libintl_extra_libs=-liconv],
1634
 
                        :,-liconv)],
1635
 
                :,-liconv)
1636
 
        fi
1637
 
 
1638
 
        #
1639
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
1640
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
1641
 
        # and both have dgettext and ngettext
1642
 
        #
1643
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1644
 
          glib_save_LIBS="$LIBS"
1645
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
1646
 
          unset ac_cv_func_bind_textdomain_codeset
1647
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
1648
 
          LIBS="$glib_save_LIBS"
1649
 
 
1650
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1651
 
            gt_cv_func_dgettext_libc=no
1652
 
          else
1653
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
1654
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
1655
 
              gt_cv_func_dgettext_libintl=no
1656
 
            fi
1657
 
          fi
1658
 
        fi
1659
 
      fi
1660
 
 
1661
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
1662
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
1663
 
        gt_cv_have_gettext=yes
1664
 
      fi
1665
 
  
1666
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1667
 
        INTLLIBS="-lintl $libintl_extra_libs"
1668
 
      fi
1669
 
  
1670
 
      if test "$gt_cv_have_gettext" = "yes"; then
1671
 
        AC_DEFINE(HAVE_GETTEXT,1,
1672
 
          [Define if the GNU gettext() function is already present or preinstalled.])
1673
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1674
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1675
 
        if test "$MSGFMT" != "no"; then
1676
 
          glib_save_LIBS="$LIBS"
1677
 
          LIBS="$LIBS $INTLLIBS"
1678
 
          AC_CHECK_FUNCS(dcgettext)
1679
 
          MSGFMT_OPTS=
1680
 
          AC_MSG_CHECKING([if msgfmt accepts -c])
1681
 
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
1682
 
msgid ""
1683
 
msgstr ""
1684
 
"Content-Type: text/plain; charset=UTF-8\n"
1685
 
"Project-Id-Version: test 1.0\n"
1686
 
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
1687
 
"Last-Translator: test <foo@bar.xx>\n"
1688
 
"Language-Team: C <LL@li.org>\n"
1689
 
"MIME-Version: 1.0\n"
1690
 
"Content-Transfer-Encoding: 8bit\n"
1691
 
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
1692
 
          AC_SUBST(MSGFMT_OPTS)
1693
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1694
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1695
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1696
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1697
 
                         return _nl_msg_cat_cntr],
1698
 
            [CATOBJEXT=.gmo 
1699
 
             DATADIRNAME=share],
1700
 
            [case $host in
1701
 
            *-*-solaris*)
1702
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
1703
 
            dnl GNU format message catalog is always supported,
1704
 
            dnl since both are added to the libc all together.
1705
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
1706
 
            dnl and CATOBJEXT=.gmo in this case.
1707
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
1708
 
              [CATOBJEXT=.gmo 
1709
 
               DATADIRNAME=share],
1710
 
              [CATOBJEXT=.mo
1711
 
               DATADIRNAME=lib])
1712
 
            ;;
1713
 
            *-*-openbsd*)
1714
 
            CATOBJEXT=.mo
1715
 
            DATADIRNAME=share
1716
 
            ;;
1717
 
            *)
1718
 
            CATOBJEXT=.mo
1719
 
            DATADIRNAME=lib
1720
 
            ;;
1721
 
            esac])
1722
 
          LIBS="$glib_save_LIBS"
1723
 
          INSTOBJEXT=.mo
1724
 
        else
1725
 
          gt_cv_have_gettext=no
1726
 
        fi
1727
 
      fi
1728
 
    ])
1729
 
 
1730
 
    if test "$gt_cv_have_gettext" = "yes" ; then
1731
 
      AC_DEFINE(ENABLE_NLS, 1,
1732
 
        [always defined to indicate that i18n is enabled])
1733
 
    fi
1734
 
 
1735
 
    dnl Test whether we really found GNU xgettext.
1736
 
    if test "$XGETTEXT" != ":"; then
1737
 
      dnl If it is not GNU xgettext we define it as : so that the
1738
 
      dnl Makefiles still can work.
1739
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1740
 
        : ;
1741
 
      else
1742
 
        AC_MSG_RESULT(
1743
 
          [found xgettext program is not GNU xgettext; ignore it])
1744
 
        XGETTEXT=":"
1745
 
      fi
1746
 
    fi
1747
 
 
1748
 
    # We need to process the po/ directory.
1749
 
    POSUB=po
1750
 
 
1751
 
    AC_OUTPUT_COMMANDS(
1752
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
1753
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1754
 
      esac])
1755
 
 
1756
 
    dnl These rules are solely for the distribution goal.  While doing this
1757
 
    dnl we only have to keep exactly one list of the available catalogs
1758
 
    dnl in configure.ac.
1759
 
    for lang in $ALL_LINGUAS; do
1760
 
      GMOFILES="$GMOFILES $lang.gmo"
1761
 
      POFILES="$POFILES $lang.po"
1762
 
    done
1763
 
 
1764
 
    dnl Make all variables we use known to autoconf.
1765
 
    AC_SUBST(CATALOGS)
1766
 
    AC_SUBST(CATOBJEXT)
1767
 
    AC_SUBST(DATADIRNAME)
1768
 
    AC_SUBST(GMOFILES)
1769
 
    AC_SUBST(INSTOBJEXT)
1770
 
    AC_SUBST(INTLLIBS)
1771
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
1772
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
1773
 
    AC_SUBST(POFILES)
1774
 
    AC_SUBST(POSUB)
1775
 
  ])
1776
 
 
1777
 
# AM_GLIB_GNU_GETTEXT
1778
 
# -------------------
1779
 
# Do checks necessary for use of gettext. If a suitable implementation 
1780
 
# of gettext is found in either in libintl or in the C library,
1781
 
# it will set INTLLIBS to the libraries needed for use of gettext
1782
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1783
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1784
 
# on various variables needed by the Makefile.in.in installed by 
1785
 
# glib-gettextize.
1786
 
dnl
1787
 
glib_DEFUN([GLIB_GNU_GETTEXT],
1788
 
  [AC_REQUIRE([AC_PROG_CC])dnl
1789
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
1790
 
   
1791
 
   GLIB_LC_MESSAGES
1792
 
   GLIB_WITH_NLS
1793
 
 
1794
 
   if test "$gt_cv_have_gettext" = "yes"; then
1795
 
     if test "x$ALL_LINGUAS" = "x"; then
1796
 
       LINGUAS=
1797
 
     else
1798
 
       AC_MSG_CHECKING(for catalogs to be installed)
1799
 
       NEW_LINGUAS=
1800
 
       for presentlang in $ALL_LINGUAS; do
1801
 
         useit=no
1802
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1803
 
           desiredlanguages="$LINGUAS"
1804
 
         else
1805
 
           desiredlanguages="$ALL_LINGUAS"
1806
 
         fi
1807
 
         for desiredlang in $desiredlanguages; do
1808
 
           # Use the presentlang catalog if desiredlang is
1809
 
           #   a. equal to presentlang, or
1810
 
           #   b. a variant of presentlang (because in this case,
1811
 
           #      presentlang can be used as a fallback for messages
1812
 
           #      which are not translated in the desiredlang catalog).
1813
 
           case "$desiredlang" in
1814
 
             "$presentlang"*) useit=yes;;
1815
 
           esac
1816
 
         done
1817
 
         if test $useit = yes; then
1818
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1819
 
         fi
1820
 
       done
1821
 
       LINGUAS=$NEW_LINGUAS
1822
 
       AC_MSG_RESULT($LINGUAS)
1823
 
     fi
1824
 
 
1825
 
     dnl Construct list of names of catalog files to be constructed.
1826
 
     if test -n "$LINGUAS"; then
1827
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1828
 
     fi
1829
 
   fi
1830
 
 
1831
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1832
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1833
 
   dnl Try to locate is.
1834
 
   MKINSTALLDIRS=
1835
 
   if test -n "$ac_aux_dir"; then
1836
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1837
 
   fi
1838
 
   if test -z "$MKINSTALLDIRS"; then
1839
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1840
 
   fi
1841
 
   AC_SUBST(MKINSTALLDIRS)
1842
 
 
1843
 
   dnl Generate list of files to be processed by xgettext which will
1844
 
   dnl be included in po/Makefile.
1845
 
   test -d po || mkdir po
1846
 
   if test "x$srcdir" != "x."; then
1847
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1848
 
       posrcprefix="$srcdir/"
1849
 
     else
1850
 
       posrcprefix="../$srcdir/"
1851
 
     fi
1852
 
   else
1853
 
     posrcprefix="../"
1854
 
   fi
1855
 
   rm -f po/POTFILES
1856
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1857
 
        < $srcdir/po/POTFILES.in > po/POTFILES
1858
 
  ])
1859
 
 
1860
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1861
 
# -------------------------------
1862
 
# Define VARIABLE to the location where catalog files will
1863
 
# be installed by po/Makefile.
1864
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1865
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1866
 
glib_save_prefix="$prefix"
1867
 
glib_save_exec_prefix="$exec_prefix"
1868
 
glib_save_datarootdir="$datarootdir"
1869
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
1870
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1871
 
datarootdir=`eval echo "${datarootdir}"`
1872
 
if test "x$CATOBJEXT" = "x.mo" ; then
1873
 
  localedir=`eval echo "${libdir}/locale"`
1874
 
else
1875
 
  localedir=`eval echo "${datadir}/locale"`
1876
 
fi
1877
 
prefix="$glib_save_prefix"
1878
 
exec_prefix="$glib_save_exec_prefix"
1879
 
datarootdir="$glib_save_datarootdir"
1880
 
AC_DEFINE_UNQUOTED($1, "$localedir",
1881
 
  [Define the location where the catalogs will be installed])
1882
 
])
1883
 
 
1884
 
dnl
1885
 
dnl Now the definitions that aclocal will find
1886
 
dnl
1887
 
ifdef(glib_configure_ac,[],[
1888
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1889
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1890
 
])dnl
1891
 
 
1892
 
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
1893
 
1894
 
# Create a temporary file with TEST-FILE as its contents and pass the
1895
 
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
1896
 
# 0 and perform ACTION-IF-FAIL for any other exit status.
1897
 
AC_DEFUN([GLIB_RUN_PROG],
1898
 
[cat >conftest.foo <<_ACEOF
1899
 
$2
1900
 
_ACEOF
1901
 
if AC_RUN_LOG([$1 conftest.foo]); then
1902
 
  m4_ifval([$3], [$3], [:])
1903
 
m4_ifvaln([$4], [else $4])dnl
1904
 
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
1905
 
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1906
 
fi])
1907
 
 
1908
 
 
1909
 
# nls.m4 serial 5 (gettext-0.18)
1910
 
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
1911
 
dnl Inc.
1912
 
dnl This file is free software; the Free Software Foundation
1913
 
dnl gives unlimited permission to copy and/or distribute it,
1914
 
dnl with or without modifications, as long as this notice is preserved.
1915
 
dnl
1916
 
dnl This file can can be used in projects which are not available under
1917
 
dnl the GNU General Public License or the GNU Library General Public
1918
 
dnl License but which still want to provide support for the GNU gettext
1919
 
dnl functionality.
1920
 
dnl Please note that the actual code of the GNU gettext library is covered
1921
 
dnl by the GNU Library General Public License, and the rest of the GNU
1922
 
dnl gettext package package is covered by the GNU General Public License.
1923
 
dnl They are *not* in the public domain.
1924
 
 
1925
 
dnl Authors:
1926
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1927
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1928
 
 
1929
 
AC_PREREQ([2.50])
1930
 
 
1931
 
AC_DEFUN([AM_NLS],
1932
 
[
1933
 
  AC_MSG_CHECKING([whether NLS is requested])
1934
 
  dnl Default is enabled NLS
1935
 
  AC_ARG_ENABLE([nls],
1936
 
    [  --disable-nls           do not use Native Language Support],
1937
 
    USE_NLS=$enableval, USE_NLS=yes)
1938
 
  AC_MSG_RESULT([$USE_NLS])
1939
 
  AC_SUBST([USE_NLS])
1940
 
])
1941
 
 
1942
1994
m4_include([m4/as-compiler-flag.m4])
1943
1995
m4_include([m4/evo_krb5_support.m4])
1944
1996
m4_include([m4/evo_ldap_check.m4])