~ubuntu-branches/ubuntu/vivid/xfwm4/vivid

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Jackson Doak
  • Date: 2015-03-17 06:37:11 UTC
  • mfrom: (3.1.16 experimental)
  • Revision ID: package-import@ubuntu.com-20150317063711-wwwlp96euewqu6uh
Tags: 4.12.1-1ubuntu1
* Merge from debian exp. Remaining changes:
  - Add -DMONITOR_ROOT_PIXMAP to CPPFLAGS for xubuntu seamless greeter
    to desktop transition

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
If you have problems, you may need to regenerate the build system entirely.
21
21
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
22
 
23
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
24
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
25
 
#
26
 
# This file is free software, distributed under the terms of the GNU
27
 
# General Public License.  As a special exception to the GNU General
28
 
# Public License, this file may be distributed as part of a program
29
 
# that contains a configuration script generated by Autoconf, under
30
 
# the same distribution terms as the rest of that program.
31
 
#
32
 
# This file can be copied and used freely without restrictions.  It can
33
 
# be used in projects which are not available under the GNU Public License
34
 
# but which still want to provide support for the GNU gettext functionality.
35
 
#
36
 
# Macro to add for using GNU gettext.
37
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
38
 
#
39
 
# Modified to never use included libintl. 
40
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
41
 
#
42
 
# Major rework to remove unused code
43
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
44
 
#
45
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
46
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
47
 
#
48
 
# Modified to require ngettext
49
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
50
 
#
51
 
# We need this here as well, since someone might use autoconf-2.5x
52
 
# to configure GLib then an older version to configure a package
53
 
# using AM_GLIB_GNU_GETTEXT
54
 
AC_PREREQ(2.53)
55
 
 
56
 
dnl
57
 
dnl We go to great lengths to make sure that aclocal won't 
58
 
dnl try to pull in the installed version of these macros
59
 
dnl when running aclocal in the glib directory.
60
 
dnl
61
 
m4_copy([AC_DEFUN],[glib_DEFUN])
62
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
63
 
dnl
64
 
dnl At the end, if we're not within glib, we'll define the public
65
 
dnl definitions in terms of our private definitions.
66
 
dnl
67
 
 
68
 
# GLIB_LC_MESSAGES
69
 
#--------------------
70
 
glib_DEFUN([GLIB_LC_MESSAGES],
71
 
  [AC_CHECK_HEADERS([locale.h])
72
 
    if test $ac_cv_header_locale_h = yes; then
73
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
74
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
75
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
76
 
    if test $am_cv_val_LC_MESSAGES = yes; then
77
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
78
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
79
 
    fi
80
 
  fi])
81
 
 
82
 
# GLIB_PATH_PROG_WITH_TEST
83
 
#----------------------------
84
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
85
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
86
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
87
 
[# Extract the first word of "$2", so it can be a program name with args.
88
 
set dummy $2; ac_word=[$]2
89
 
AC_MSG_CHECKING([for $ac_word])
90
 
AC_CACHE_VAL(ac_cv_path_$1,
91
 
[case "[$]$1" in
92
 
  /*)
93
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
94
 
  ;;
95
 
  *)
96
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
97
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
98
 
    test -z "$ac_dir" && ac_dir=.
99
 
    if test -f $ac_dir/$ac_word; then
100
 
      if [$3]; then
101
 
        ac_cv_path_$1="$ac_dir/$ac_word"
102
 
        break
103
 
      fi
104
 
    fi
105
 
  done
106
 
  IFS="$ac_save_ifs"
107
 
dnl If no 4th arg is given, leave the cache variable unset,
108
 
dnl so AC_PATH_PROGS will keep looking.
109
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
110
 
])dnl
111
 
  ;;
112
 
esac])dnl
113
 
$1="$ac_cv_path_$1"
114
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
115
 
  AC_MSG_RESULT([$]$1)
116
 
else
117
 
  AC_MSG_RESULT(no)
118
 
fi
119
 
AC_SUBST($1)dnl
120
 
])
121
 
 
122
 
# GLIB_WITH_NLS
123
 
#-----------------
124
 
glib_DEFUN([GLIB_WITH_NLS],
125
 
  dnl NLS is obligatory
126
 
  [USE_NLS=yes
127
 
    AC_SUBST(USE_NLS)
128
 
 
129
 
    gt_cv_have_gettext=no
130
 
 
131
 
    CATOBJEXT=NONE
132
 
    XGETTEXT=:
133
 
    INTLLIBS=
134
 
 
135
 
    AC_CHECK_HEADER(libintl.h,
136
 
     [gt_cv_func_dgettext_libintl="no"
137
 
      libintl_extra_libs=""
138
 
 
139
 
      #
140
 
      # First check in libc
141
 
      #
142
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
143
 
        [AC_TRY_LINK([
144
 
#include <libintl.h>
145
 
],
146
 
         [return !ngettext ("","", 1)],
147
 
          gt_cv_func_ngettext_libc=yes,
148
 
          gt_cv_func_ngettext_libc=no)
149
 
        ])
150
 
  
151
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
152
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
153
 
                [AC_TRY_LINK([
154
 
#include <libintl.h>
155
 
],
156
 
                  [return !dgettext ("","")],
157
 
                  gt_cv_func_dgettext_libc=yes,
158
 
                  gt_cv_func_dgettext_libc=no)
159
 
                ])
160
 
      fi
161
 
  
162
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
163
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
164
 
      fi
165
 
 
166
 
      #
167
 
      # If we don't have everything we want, check in libintl
168
 
      #
169
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
170
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
171
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
172
 
        
173
 
        AC_CHECK_LIB(intl, bindtextdomain,
174
 
            [AC_CHECK_LIB(intl, ngettext,
175
 
                    [AC_CHECK_LIB(intl, dgettext,
176
 
                                  gt_cv_func_dgettext_libintl=yes)])])
177
 
 
178
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
179
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
180
 
          AC_MSG_RESULT([])
181
 
          AC_CHECK_LIB(intl, ngettext,
182
 
                [AC_CHECK_LIB(intl, dcgettext,
183
 
                       [gt_cv_func_dgettext_libintl=yes
184
 
                        libintl_extra_libs=-liconv],
185
 
                        :,-liconv)],
186
 
                :,-liconv)
187
 
        fi
188
 
 
189
 
        #
190
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
191
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
192
 
        # and both have dgettext and ngettext
193
 
        #
194
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
195
 
          glib_save_LIBS="$LIBS"
196
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
197
 
          unset ac_cv_func_bind_textdomain_codeset
198
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
199
 
          LIBS="$glib_save_LIBS"
200
 
 
201
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
202
 
            gt_cv_func_dgettext_libc=no
203
 
          else
204
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
205
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
206
 
              gt_cv_func_dgettext_libintl=no
207
 
            fi
208
 
          fi
209
 
        fi
210
 
      fi
211
 
 
212
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
213
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
214
 
        gt_cv_have_gettext=yes
215
 
      fi
216
 
  
217
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
218
 
        INTLLIBS="-lintl $libintl_extra_libs"
219
 
      fi
220
 
  
221
 
      if test "$gt_cv_have_gettext" = "yes"; then
222
 
        AC_DEFINE(HAVE_GETTEXT,1,
223
 
          [Define if the GNU gettext() function is already present or preinstalled.])
224
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
225
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
226
 
        if test "$MSGFMT" != "no"; then
227
 
          glib_save_LIBS="$LIBS"
228
 
          LIBS="$LIBS $INTLLIBS"
229
 
          AC_CHECK_FUNCS(dcgettext)
230
 
          MSGFMT_OPTS=
231
 
          AC_MSG_CHECKING([if msgfmt accepts -c])
232
 
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
233
 
msgid ""
234
 
msgstr ""
235
 
"Content-Type: text/plain; charset=UTF-8\n"
236
 
"Project-Id-Version: test 1.0\n"
237
 
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
238
 
"Last-Translator: test <foo@bar.xx>\n"
239
 
"Language-Team: C <LL@li.org>\n"
240
 
"MIME-Version: 1.0\n"
241
 
"Content-Transfer-Encoding: 8bit\n"
242
 
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
243
 
          AC_SUBST(MSGFMT_OPTS)
244
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
245
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
246
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
247
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
248
 
                         return _nl_msg_cat_cntr],
249
 
            [CATOBJEXT=.gmo 
250
 
             DATADIRNAME=share],
251
 
            [case $host in
252
 
            *-*-solaris*)
253
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
254
 
            dnl GNU format message catalog is always supported,
255
 
            dnl since both are added to the libc all together.
256
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
257
 
            dnl and CATOBJEXT=.gmo in this case.
258
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
259
 
              [CATOBJEXT=.gmo 
260
 
               DATADIRNAME=share],
261
 
              [CATOBJEXT=.mo
262
 
               DATADIRNAME=lib])
263
 
            ;;
264
 
            *-*-openbsd*)
265
 
            CATOBJEXT=.mo
266
 
            DATADIRNAME=share
267
 
            ;;
268
 
            *)
269
 
            CATOBJEXT=.mo
270
 
            DATADIRNAME=lib
271
 
            ;;
272
 
            esac])
273
 
          LIBS="$glib_save_LIBS"
274
 
          INSTOBJEXT=.mo
275
 
        else
276
 
          gt_cv_have_gettext=no
277
 
        fi
278
 
      fi
279
 
    ])
280
 
 
281
 
    if test "$gt_cv_have_gettext" = "yes" ; then
282
 
      AC_DEFINE(ENABLE_NLS, 1,
283
 
        [always defined to indicate that i18n is enabled])
284
 
    fi
285
 
 
286
 
    dnl Test whether we really found GNU xgettext.
287
 
    if test "$XGETTEXT" != ":"; then
288
 
      dnl If it is not GNU xgettext we define it as : so that the
289
 
      dnl Makefiles still can work.
290
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
291
 
        : ;
292
 
      else
293
 
        AC_MSG_RESULT(
294
 
          [found xgettext program is not GNU xgettext; ignore it])
295
 
        XGETTEXT=":"
296
 
      fi
297
 
    fi
298
 
 
299
 
    # We need to process the po/ directory.
300
 
    POSUB=po
301
 
 
302
 
    AC_OUTPUT_COMMANDS(
303
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
304
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
305
 
      esac])
306
 
 
307
 
    dnl These rules are solely for the distribution goal.  While doing this
308
 
    dnl we only have to keep exactly one list of the available catalogs
309
 
    dnl in configure.ac.
310
 
    for lang in $ALL_LINGUAS; do
311
 
      GMOFILES="$GMOFILES $lang.gmo"
312
 
      POFILES="$POFILES $lang.po"
313
 
    done
314
 
 
315
 
    dnl Make all variables we use known to autoconf.
316
 
    AC_SUBST(CATALOGS)
317
 
    AC_SUBST(CATOBJEXT)
318
 
    AC_SUBST(DATADIRNAME)
319
 
    AC_SUBST(GMOFILES)
320
 
    AC_SUBST(INSTOBJEXT)
321
 
    AC_SUBST(INTLLIBS)
322
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
323
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
324
 
    AC_SUBST(POFILES)
325
 
    AC_SUBST(POSUB)
326
 
  ])
327
 
 
328
 
# AM_GLIB_GNU_GETTEXT
329
 
# -------------------
330
 
# Do checks necessary for use of gettext. If a suitable implementation 
331
 
# of gettext is found in either in libintl or in the C library,
332
 
# it will set INTLLIBS to the libraries needed for use of gettext
333
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
334
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
335
 
# on various variables needed by the Makefile.in.in installed by 
336
 
# glib-gettextize.
337
 
dnl
338
 
glib_DEFUN([GLIB_GNU_GETTEXT],
339
 
  [AC_REQUIRE([AC_PROG_CC])dnl
340
 
   
341
 
   GLIB_LC_MESSAGES
342
 
   GLIB_WITH_NLS
343
 
 
344
 
   if test "$gt_cv_have_gettext" = "yes"; then
345
 
     if test "x$ALL_LINGUAS" = "x"; then
346
 
       LINGUAS=
347
 
     else
348
 
       AC_MSG_CHECKING(for catalogs to be installed)
349
 
       NEW_LINGUAS=
350
 
       for presentlang in $ALL_LINGUAS; do
351
 
         useit=no
352
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
353
 
           desiredlanguages="$LINGUAS"
354
 
         else
355
 
           desiredlanguages="$ALL_LINGUAS"
356
 
         fi
357
 
         for desiredlang in $desiredlanguages; do
358
 
           # Use the presentlang catalog if desiredlang is
359
 
           #   a. equal to presentlang, or
360
 
           #   b. a variant of presentlang (because in this case,
361
 
           #      presentlang can be used as a fallback for messages
362
 
           #      which are not translated in the desiredlang catalog).
363
 
           case "$desiredlang" in
364
 
             "$presentlang"*) useit=yes;;
365
 
           esac
366
 
         done
367
 
         if test $useit = yes; then
368
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
369
 
         fi
370
 
       done
371
 
       LINGUAS=$NEW_LINGUAS
372
 
       AC_MSG_RESULT($LINGUAS)
373
 
     fi
374
 
 
375
 
     dnl Construct list of names of catalog files to be constructed.
376
 
     if test -n "$LINGUAS"; then
377
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
378
 
     fi
379
 
   fi
380
 
 
381
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
382
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
383
 
   dnl Try to locate is.
384
 
   MKINSTALLDIRS=
385
 
   if test -n "$ac_aux_dir"; then
386
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
387
 
   fi
388
 
   if test -z "$MKINSTALLDIRS"; then
389
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
390
 
   fi
391
 
   AC_SUBST(MKINSTALLDIRS)
392
 
 
393
 
   dnl Generate list of files to be processed by xgettext which will
394
 
   dnl be included in po/Makefile.
395
 
   test -d po || mkdir po
396
 
   if test "x$srcdir" != "x."; then
397
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
398
 
       posrcprefix="$srcdir/"
399
 
     else
400
 
       posrcprefix="../$srcdir/"
401
 
     fi
402
 
   else
403
 
     posrcprefix="../"
404
 
   fi
405
 
   rm -f po/POTFILES
406
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
407
 
        < $srcdir/po/POTFILES.in > po/POTFILES
408
 
  ])
409
 
 
410
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
411
 
# -------------------------------
412
 
# Define VARIABLE to the location where catalog files will
413
 
# be installed by po/Makefile.
414
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
415
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
416
 
glib_save_prefix="$prefix"
417
 
glib_save_exec_prefix="$exec_prefix"
418
 
glib_save_datarootdir="$datarootdir"
419
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
420
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
421
 
datarootdir=`eval echo "${datarootdir}"`
422
 
if test "x$CATOBJEXT" = "x.mo" ; then
423
 
  localedir=`eval echo "${libdir}/locale"`
424
 
else
425
 
  localedir=`eval echo "${datadir}/locale"`
426
 
fi
427
 
prefix="$glib_save_prefix"
428
 
exec_prefix="$glib_save_exec_prefix"
429
 
datarootdir="$glib_save_datarootdir"
430
 
AC_DEFINE_UNQUOTED($1, "$localedir",
431
 
  [Define the location where the catalogs will be installed])
432
 
])
433
 
 
434
 
dnl
435
 
dnl Now the definitions that aclocal will find
436
 
dnl
437
 
ifdef(glib_configure_ac,[],[
438
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
439
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
440
 
])dnl
441
 
 
442
 
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
443
 
444
 
# Create a temporary file with TEST-FILE as its contents and pass the
445
 
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
446
 
# 0 and perform ACTION-IF-FAIL for any other exit status.
447
 
AC_DEFUN([GLIB_RUN_PROG],
448
 
[cat >conftest.foo <<_ACEOF
449
 
$2
450
 
_ACEOF
451
 
if AC_RUN_LOG([$1 conftest.foo]); then
452
 
  m4_ifval([$3], [$3], [:])
453
 
m4_ifvaln([$4], [else $4])dnl
454
 
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
455
 
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
456
 
fi])
457
 
 
458
 
 
459
23
 
460
24
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
461
25
# serial 42 IT_PROG_INTLTOOL
1989
1553
            LD="${LD-ld} -m elf_i386_fbsd"
1990
1554
            ;;
1991
1555
          x86_64-*linux*)
1992
 
            case `/usr/bin/file conftest.o` in
1993
 
              *x86-64*)
1994
 
                LD="${LD-ld} -m elf32_x86_64"
1995
 
                ;;
1996
 
              *)
1997
 
                LD="${LD-ld} -m elf_i386"
1998
 
                ;;
1999
 
            esac
 
1556
            LD="${LD-ld} -m elf_i386"
2000
1557
            ;;
2001
 
          powerpc64le-*)
 
1558
          powerpc64le-*linux*)
2002
1559
            LD="${LD-ld} -m elf32lppclinux"
2003
1560
            ;;
2004
 
          powerpc64-*)
 
1561
          powerpc64-*linux*)
2005
1562
            LD="${LD-ld} -m elf32ppclinux"
2006
1563
            ;;
2007
1564
          s390x-*linux*)
2020
1577
          x86_64-*linux*)
2021
1578
            LD="${LD-ld} -m elf_x86_64"
2022
1579
            ;;
2023
 
          powerpcle-*)
 
1580
          powerpcle-*linux*)
2024
1581
            LD="${LD-ld} -m elf64lppc"
2025
1582
            ;;
2026
 
          powerpc-*)
 
1583
          powerpc-*linux*)
2027
1584
            LD="${LD-ld} -m elf64ppc"
2028
1585
            ;;
2029
1586
          s390*-*linux*|s390*-*tpf*)
2366
1923
    ;;
2367
1924
  *)
2368
1925
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2369
 
    if test -n "$lt_cv_sys_max_cmd_len" && \
2370
 
        test undefined != "$lt_cv_sys_max_cmd_len"; then
 
1926
    if test -n "$lt_cv_sys_max_cmd_len"; then
2371
1927
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2372
1928
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2373
1929
    else
3191
2747
  esac
3192
2748
  ;;
3193
2749
 
 
2750
gnu*)
 
2751
  version_type=linux # correct to gnu/linux during the next big refactor
 
2752
  need_lib_prefix=no
 
2753
  need_version=no
 
2754
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
2755
  soname_spec='${libname}${release}${shared_ext}$major'
 
2756
  shlibpath_var=LD_LIBRARY_PATH
 
2757
  shlibpath_overrides_runpath=no
 
2758
  hardcode_into_libs=yes
 
2759
  ;;
 
2760
 
3194
2761
haiku*)
3195
2762
  version_type=linux # correct to gnu/linux during the next big refactor
3196
2763
  need_lib_prefix=no
3307
2874
  ;;
3308
2875
 
3309
2876
# This must be glibc/ELF.
3310
 
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
 
2877
linux* | k*bsd*-gnu | kopensolaris*-gnu)
3311
2878
  version_type=linux # correct to gnu/linux during the next big refactor
3312
2879
  need_lib_prefix=no
3313
2880
  need_version=no
3337
2904
  # before this can be enabled.
3338
2905
  hardcode_into_libs=yes
3339
2906
 
 
2907
  # Add ABI-specific directories to the system library path.
 
2908
  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
 
2909
 
3340
2910
  # Append ld.so.conf contents to the search path
3341
2911
  if test -f /etc/ld.so.conf; then
3342
2912
    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/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
3343
 
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
 
2913
    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
 
2914
 
3344
2915
  fi
3345
2916
 
3346
2917
  # We used to test for /lib/ld.so.1 and disable shared libraries on
3352
2923
  dynamic_linker='GNU/Linux ld.so'
3353
2924
  ;;
3354
2925
 
3355
 
netbsdelf*-gnu)
3356
 
  version_type=linux
3357
 
  need_lib_prefix=no
3358
 
  need_version=no
3359
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3360
 
  soname_spec='${libname}${release}${shared_ext}$major'
3361
 
  shlibpath_var=LD_LIBRARY_PATH
3362
 
  shlibpath_overrides_runpath=no
3363
 
  hardcode_into_libs=yes
3364
 
  dynamic_linker='NetBSD ld.elf_so'
3365
 
  ;;
3366
 
 
3367
2926
netbsd*)
3368
2927
  version_type=sunos
3369
2928
  need_lib_prefix=no
3923
3482
  fi
3924
3483
  ;;
3925
3484
 
 
3485
gnu*)
 
3486
  lt_cv_deplibs_check_method=pass_all
 
3487
  ;;
 
3488
 
3926
3489
haiku*)
3927
3490
  lt_cv_deplibs_check_method=pass_all
3928
3491
  ;;
3961
3524
  ;;
3962
3525
 
3963
3526
# This must be glibc/ELF.
3964
 
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
 
3527
linux* | k*bsd*-gnu | kopensolaris*-gnu)
3965
3528
  lt_cv_deplibs_check_method=pass_all
3966
3529
  ;;
3967
3530
 
3968
 
netbsd* | netbsdelf*-gnu)
 
3531
netbsd*)
3969
3532
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3970
3533
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3971
3534
  else
4713
4276
            ;;
4714
4277
        esac
4715
4278
        ;;
4716
 
      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
 
4279
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
4717
4280
        case $cc_basename in
4718
4281
          KCC*)
4719
4282
            # KAI C++ Compiler
4777
4340
            ;;
4778
4341
        esac
4779
4342
        ;;
4780
 
      netbsd* | netbsdelf*-gnu)
 
4343
      netbsd*)
4781
4344
        ;;
4782
4345
      *qnx* | *nto*)
4783
4346
        # QNX uses GNU C++, but need to define -shared option too, otherwise
5012
4575
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5013
4576
      ;;
5014
4577
 
5015
 
    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
 
4578
    linux* | k*bsd*-gnu | kopensolaris*-gnu)
5016
4579
      case $cc_basename in
5017
4580
      # old Intel for x86_64 which still supported -KPIC.
5018
4581
      ecc*)
5254
4817
      ;;
5255
4818
    esac
5256
4819
    ;;
5257
 
  linux* | k*bsd*-gnu | gnu*)
5258
 
    _LT_TAGVAR(link_all_deplibs, $1)=no
5259
 
    ;;
5260
4820
  *)
5261
4821
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5262
4822
    ;;
5319
4879
  openbsd*)
5320
4880
    with_gnu_ld=no
5321
4881
    ;;
5322
 
  linux* | k*bsd*-gnu | gnu*)
5323
 
    _LT_TAGVAR(link_all_deplibs, $1)=no
5324
 
    ;;
5325
4882
  esac
5326
4883
 
5327
4884
  _LT_TAGVAR(ld_shlibs, $1)=yes
5543
5100
      fi
5544
5101
      ;;
5545
5102
 
5546
 
    netbsd* | netbsdelf*-gnu)
 
5103
    netbsd*)
5547
5104
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5548
5105
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5549
5106
        wlarc=
5720
5277
        if test "$aix_use_runtimelinking" = yes; then
5721
5278
          shared_flag="$shared_flag "'${wl}-G'
5722
5279
        fi
5723
 
        _LT_TAGVAR(link_all_deplibs, $1)=no
5724
5280
      else
5725
5281
        # not using gcc
5726
5282
        if test "$host_cpu" = ia64; then
6025
5581
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6026
5582
      ;;
6027
5583
 
6028
 
    netbsd* | netbsdelf*-gnu)
 
5584
    netbsd*)
6029
5585
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6030
5586
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6031
5587
      else
6901
6457
        _LT_TAGVAR(ld_shlibs, $1)=yes
6902
6458
        ;;
6903
6459
 
 
6460
      gnu*)
 
6461
        ;;
 
6462
 
6904
6463
      haiku*)
6905
6464
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6906
6465
        _LT_TAGVAR(link_all_deplibs, $1)=yes
7062
6621
        _LT_TAGVAR(inherit_rpath, $1)=yes
7063
6622
        ;;
7064
6623
 
7065
 
      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
 
6624
      linux* | k*bsd*-gnu | kopensolaris*-gnu)
7066
6625
        case $cc_basename in
7067
6626
          KCC*)
7068
6627
            # Kuck and Associates, Inc. (KAI) C++ Compiler
9521
9080
AS_VAR_IF([$1], [""], [$5], [$4])dnl
9522
9081
])# PKG_CHECK_VAR
9523
9082
 
 
9083
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
9084
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
9085
#
 
9086
# This file is free software, distributed under the terms of the GNU
 
9087
# General Public License.  As a special exception to the GNU General
 
9088
# Public License, this file may be distributed as part of a program
 
9089
# that contains a configuration script generated by Autoconf, under
 
9090
# the same distribution terms as the rest of that program.
 
9091
#
 
9092
# This file can be copied and used freely without restrictions.  It can
 
9093
# be used in projects which are not available under the GNU Public License
 
9094
# but which still want to provide support for the GNU gettext functionality.
 
9095
#
 
9096
# Macro to add for using GNU gettext.
 
9097
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
9098
#
 
9099
# Modified to never use included libintl. 
 
9100
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
9101
#
 
9102
# Major rework to remove unused code
 
9103
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
9104
#
 
9105
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
9106
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
9107
#
 
9108
# Modified to require ngettext
 
9109
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
9110
#
 
9111
# We need this here as well, since someone might use autoconf-2.5x
 
9112
# to configure GLib then an older version to configure a package
 
9113
# using AM_GLIB_GNU_GETTEXT
 
9114
AC_PREREQ(2.53)
 
9115
 
 
9116
dnl
 
9117
dnl We go to great lengths to make sure that aclocal won't 
 
9118
dnl try to pull in the installed version of these macros
 
9119
dnl when running aclocal in the glib directory.
 
9120
dnl
 
9121
m4_copy([AC_DEFUN],[glib_DEFUN])
 
9122
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
9123
dnl
 
9124
dnl At the end, if we're not within glib, we'll define the public
 
9125
dnl definitions in terms of our private definitions.
 
9126
dnl
 
9127
 
 
9128
# GLIB_LC_MESSAGES
 
9129
#--------------------
 
9130
glib_DEFUN([GLIB_LC_MESSAGES],
 
9131
  [AC_CHECK_HEADERS([locale.h])
 
9132
    if test $ac_cv_header_locale_h = yes; then
 
9133
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
9134
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
9135
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
9136
    if test $am_cv_val_LC_MESSAGES = yes; then
 
9137
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
9138
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
9139
    fi
 
9140
  fi])
 
9141
 
 
9142
# GLIB_PATH_PROG_WITH_TEST
 
9143
#----------------------------
 
9144
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
9145
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
9146
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
9147
[# Extract the first word of "$2", so it can be a program name with args.
 
9148
set dummy $2; ac_word=[$]2
 
9149
AC_MSG_CHECKING([for $ac_word])
 
9150
AC_CACHE_VAL(ac_cv_path_$1,
 
9151
[case "[$]$1" in
 
9152
  /*)
 
9153
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
9154
  ;;
 
9155
  *)
 
9156
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
9157
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
9158
    test -z "$ac_dir" && ac_dir=.
 
9159
    if test -f $ac_dir/$ac_word; then
 
9160
      if [$3]; then
 
9161
        ac_cv_path_$1="$ac_dir/$ac_word"
 
9162
        break
 
9163
      fi
 
9164
    fi
 
9165
  done
 
9166
  IFS="$ac_save_ifs"
 
9167
dnl If no 4th arg is given, leave the cache variable unset,
 
9168
dnl so AC_PATH_PROGS will keep looking.
 
9169
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
9170
])dnl
 
9171
  ;;
 
9172
esac])dnl
 
9173
$1="$ac_cv_path_$1"
 
9174
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
9175
  AC_MSG_RESULT([$]$1)
 
9176
else
 
9177
  AC_MSG_RESULT(no)
 
9178
fi
 
9179
AC_SUBST($1)dnl
 
9180
])
 
9181
 
 
9182
# GLIB_WITH_NLS
 
9183
#-----------------
 
9184
glib_DEFUN([GLIB_WITH_NLS],
 
9185
  dnl NLS is obligatory
 
9186
  [USE_NLS=yes
 
9187
    AC_SUBST(USE_NLS)
 
9188
 
 
9189
    gt_cv_have_gettext=no
 
9190
 
 
9191
    CATOBJEXT=NONE
 
9192
    XGETTEXT=:
 
9193
    INTLLIBS=
 
9194
 
 
9195
    AC_CHECK_HEADER(libintl.h,
 
9196
     [gt_cv_func_dgettext_libintl="no"
 
9197
      libintl_extra_libs=""
 
9198
 
 
9199
      #
 
9200
      # First check in libc
 
9201
      #
 
9202
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
9203
        [AC_TRY_LINK([
 
9204
#include <libintl.h>
 
9205
],
 
9206
         [return !ngettext ("","", 1)],
 
9207
          gt_cv_func_ngettext_libc=yes,
 
9208
          gt_cv_func_ngettext_libc=no)
 
9209
        ])
 
9210
  
 
9211
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
9212
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
9213
                [AC_TRY_LINK([
 
9214
#include <libintl.h>
 
9215
],
 
9216
                  [return !dgettext ("","")],
 
9217
                  gt_cv_func_dgettext_libc=yes,
 
9218
                  gt_cv_func_dgettext_libc=no)
 
9219
                ])
 
9220
      fi
 
9221
  
 
9222
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
9223
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
9224
      fi
 
9225
 
 
9226
      #
 
9227
      # If we don't have everything we want, check in libintl
 
9228
      #
 
9229
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
9230
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
9231
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
9232
        
 
9233
        AC_CHECK_LIB(intl, bindtextdomain,
 
9234
            [AC_CHECK_LIB(intl, ngettext,
 
9235
                    [AC_CHECK_LIB(intl, dgettext,
 
9236
                                  gt_cv_func_dgettext_libintl=yes)])])
 
9237
 
 
9238
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
9239
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
9240
          AC_MSG_RESULT([])
 
9241
          AC_CHECK_LIB(intl, ngettext,
 
9242
                [AC_CHECK_LIB(intl, dcgettext,
 
9243
                       [gt_cv_func_dgettext_libintl=yes
 
9244
                        libintl_extra_libs=-liconv],
 
9245
                        :,-liconv)],
 
9246
                :,-liconv)
 
9247
        fi
 
9248
 
 
9249
        #
 
9250
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
9251
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
9252
        # and both have dgettext and ngettext
 
9253
        #
 
9254
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
9255
          glib_save_LIBS="$LIBS"
 
9256
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
9257
          unset ac_cv_func_bind_textdomain_codeset
 
9258
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
9259
          LIBS="$glib_save_LIBS"
 
9260
 
 
9261
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
9262
            gt_cv_func_dgettext_libc=no
 
9263
          else
 
9264
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
9265
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
9266
              gt_cv_func_dgettext_libintl=no
 
9267
            fi
 
9268
          fi
 
9269
        fi
 
9270
      fi
 
9271
 
 
9272
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
9273
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
9274
        gt_cv_have_gettext=yes
 
9275
      fi
 
9276
  
 
9277
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
9278
        INTLLIBS="-lintl $libintl_extra_libs"
 
9279
      fi
 
9280
  
 
9281
      if test "$gt_cv_have_gettext" = "yes"; then
 
9282
        AC_DEFINE(HAVE_GETTEXT,1,
 
9283
          [Define if the GNU gettext() function is already present or preinstalled.])
 
9284
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
9285
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
9286
        if test "$MSGFMT" != "no"; then
 
9287
          glib_save_LIBS="$LIBS"
 
9288
          LIBS="$LIBS $INTLLIBS"
 
9289
          AC_CHECK_FUNCS(dcgettext)
 
9290
          MSGFMT_OPTS=
 
9291
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
9292
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
9293
msgid ""
 
9294
msgstr ""
 
9295
"Content-Type: text/plain; charset=UTF-8\n"
 
9296
"Project-Id-Version: test 1.0\n"
 
9297
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
9298
"Last-Translator: test <foo@bar.xx>\n"
 
9299
"Language-Team: C <LL@li.org>\n"
 
9300
"MIME-Version: 1.0\n"
 
9301
"Content-Transfer-Encoding: 8bit\n"
 
9302
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
9303
          AC_SUBST(MSGFMT_OPTS)
 
9304
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
9305
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
9306
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
9307
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
9308
                         return _nl_msg_cat_cntr],
 
9309
            [CATOBJEXT=.gmo 
 
9310
             DATADIRNAME=share],
 
9311
            [case $host in
 
9312
            *-*-solaris*)
 
9313
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
9314
            dnl GNU format message catalog is always supported,
 
9315
            dnl since both are added to the libc all together.
 
9316
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
9317
            dnl and CATOBJEXT=.gmo in this case.
 
9318
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
9319
              [CATOBJEXT=.gmo 
 
9320
               DATADIRNAME=share],
 
9321
              [CATOBJEXT=.mo
 
9322
               DATADIRNAME=lib])
 
9323
            ;;
 
9324
            *-*-openbsd*)
 
9325
            CATOBJEXT=.mo
 
9326
            DATADIRNAME=share
 
9327
            ;;
 
9328
            *)
 
9329
            CATOBJEXT=.mo
 
9330
            DATADIRNAME=lib
 
9331
            ;;
 
9332
            esac])
 
9333
          LIBS="$glib_save_LIBS"
 
9334
          INSTOBJEXT=.mo
 
9335
        else
 
9336
          gt_cv_have_gettext=no
 
9337
        fi
 
9338
      fi
 
9339
    ])
 
9340
 
 
9341
    if test "$gt_cv_have_gettext" = "yes" ; then
 
9342
      AC_DEFINE(ENABLE_NLS, 1,
 
9343
        [always defined to indicate that i18n is enabled])
 
9344
    fi
 
9345
 
 
9346
    dnl Test whether we really found GNU xgettext.
 
9347
    if test "$XGETTEXT" != ":"; then
 
9348
      dnl If it is not GNU xgettext we define it as : so that the
 
9349
      dnl Makefiles still can work.
 
9350
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
9351
        : ;
 
9352
      else
 
9353
        AC_MSG_RESULT(
 
9354
          [found xgettext program is not GNU xgettext; ignore it])
 
9355
        XGETTEXT=":"
 
9356
      fi
 
9357
    fi
 
9358
 
 
9359
    # We need to process the po/ directory.
 
9360
    POSUB=po
 
9361
 
 
9362
    AC_OUTPUT_COMMANDS(
 
9363
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
9364
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
9365
      esac])
 
9366
 
 
9367
    dnl These rules are solely for the distribution goal.  While doing this
 
9368
    dnl we only have to keep exactly one list of the available catalogs
 
9369
    dnl in configure.ac.
 
9370
    for lang in $ALL_LINGUAS; do
 
9371
      GMOFILES="$GMOFILES $lang.gmo"
 
9372
      POFILES="$POFILES $lang.po"
 
9373
    done
 
9374
 
 
9375
    dnl Make all variables we use known to autoconf.
 
9376
    AC_SUBST(CATALOGS)
 
9377
    AC_SUBST(CATOBJEXT)
 
9378
    AC_SUBST(DATADIRNAME)
 
9379
    AC_SUBST(GMOFILES)
 
9380
    AC_SUBST(INSTOBJEXT)
 
9381
    AC_SUBST(INTLLIBS)
 
9382
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
9383
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
9384
    AC_SUBST(POFILES)
 
9385
    AC_SUBST(POSUB)
 
9386
  ])
 
9387
 
 
9388
# AM_GLIB_GNU_GETTEXT
 
9389
# -------------------
 
9390
# Do checks necessary for use of gettext. If a suitable implementation 
 
9391
# of gettext is found in either in libintl or in the C library,
 
9392
# it will set INTLLIBS to the libraries needed for use of gettext
 
9393
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
9394
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
9395
# on various variables needed by the Makefile.in.in installed by 
 
9396
# glib-gettextize.
 
9397
dnl
 
9398
glib_DEFUN([GLIB_GNU_GETTEXT],
 
9399
  [AC_REQUIRE([AC_PROG_CC])dnl
 
9400
   
 
9401
   GLIB_LC_MESSAGES
 
9402
   GLIB_WITH_NLS
 
9403
 
 
9404
   if test "$gt_cv_have_gettext" = "yes"; then
 
9405
     if test "x$ALL_LINGUAS" = "x"; then
 
9406
       LINGUAS=
 
9407
     else
 
9408
       AC_MSG_CHECKING(for catalogs to be installed)
 
9409
       NEW_LINGUAS=
 
9410
       for presentlang in $ALL_LINGUAS; do
 
9411
         useit=no
 
9412
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
9413
           desiredlanguages="$LINGUAS"
 
9414
         else
 
9415
           desiredlanguages="$ALL_LINGUAS"
 
9416
         fi
 
9417
         for desiredlang in $desiredlanguages; do
 
9418
           # Use the presentlang catalog if desiredlang is
 
9419
           #   a. equal to presentlang, or
 
9420
           #   b. a variant of presentlang (because in this case,
 
9421
           #      presentlang can be used as a fallback for messages
 
9422
           #      which are not translated in the desiredlang catalog).
 
9423
           case "$desiredlang" in
 
9424
             "$presentlang"*) useit=yes;;
 
9425
           esac
 
9426
         done
 
9427
         if test $useit = yes; then
 
9428
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
9429
         fi
 
9430
       done
 
9431
       LINGUAS=$NEW_LINGUAS
 
9432
       AC_MSG_RESULT($LINGUAS)
 
9433
     fi
 
9434
 
 
9435
     dnl Construct list of names of catalog files to be constructed.
 
9436
     if test -n "$LINGUAS"; then
 
9437
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
9438
     fi
 
9439
   fi
 
9440
 
 
9441
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
9442
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
9443
   dnl Try to locate is.
 
9444
   MKINSTALLDIRS=
 
9445
   if test -n "$ac_aux_dir"; then
 
9446
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
9447
   fi
 
9448
   if test -z "$MKINSTALLDIRS"; then
 
9449
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
9450
   fi
 
9451
   AC_SUBST(MKINSTALLDIRS)
 
9452
 
 
9453
   dnl Generate list of files to be processed by xgettext which will
 
9454
   dnl be included in po/Makefile.
 
9455
   test -d po || mkdir po
 
9456
   if test "x$srcdir" != "x."; then
 
9457
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
9458
       posrcprefix="$srcdir/"
 
9459
     else
 
9460
       posrcprefix="../$srcdir/"
 
9461
     fi
 
9462
   else
 
9463
     posrcprefix="../"
 
9464
   fi
 
9465
   rm -f po/POTFILES
 
9466
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
9467
        < $srcdir/po/POTFILES.in > po/POTFILES
 
9468
  ])
 
9469
 
 
9470
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
9471
# -------------------------------
 
9472
# Define VARIABLE to the location where catalog files will
 
9473
# be installed by po/Makefile.
 
9474
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
9475
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
9476
glib_save_prefix="$prefix"
 
9477
glib_save_exec_prefix="$exec_prefix"
 
9478
glib_save_datarootdir="$datarootdir"
 
9479
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
9480
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
9481
datarootdir=`eval echo "${datarootdir}"`
 
9482
if test "x$CATOBJEXT" = "x.mo" ; then
 
9483
  localedir=`eval echo "${libdir}/locale"`
 
9484
else
 
9485
  localedir=`eval echo "${datadir}/locale"`
 
9486
fi
 
9487
prefix="$glib_save_prefix"
 
9488
exec_prefix="$glib_save_exec_prefix"
 
9489
datarootdir="$glib_save_datarootdir"
 
9490
AC_DEFINE_UNQUOTED($1, "$localedir",
 
9491
  [Define the location where the catalogs will be installed])
 
9492
])
 
9493
 
 
9494
dnl
 
9495
dnl Now the definitions that aclocal will find
 
9496
dnl
 
9497
ifdef(glib_configure_ac,[],[
 
9498
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
9499
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
9500
])dnl
 
9501
 
 
9502
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
9503
 
9504
# Create a temporary file with TEST-FILE as its contents and pass the
 
9505
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
9506
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
9507
AC_DEFUN([GLIB_RUN_PROG],
 
9508
[cat >conftest.foo <<_ACEOF
 
9509
$2
 
9510
_ACEOF
 
9511
if AC_RUN_LOG([$1 conftest.foo]); then
 
9512
  m4_ifval([$3], [$3], [:])
 
9513
m4_ifvaln([$4], [else $4])dnl
 
9514
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
9515
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
9516
fi])
 
9517
 
 
9518
 
9524
9519
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
9525
9520
#
9526
9521
# This file is free software; the Free Software Foundation
10074
10069
END
10075
10070
    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
10076
10071
  fi
10077
 
fi
10078
 
])
 
10072
fi])
10079
10073
 
10080
10074
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
10081
10075
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10685
10679
AC_SUBST([am__untar])
10686
10680
]) # _AM_PROG_TAR
10687
10681
 
10688
 
dnl Copyright (c) 2002-2015
 
10682
dnl $Id$
 
10683
dnl
 
10684
dnl Copyright (c) 2002-2006
10689
10685
dnl         The Xfce development team. All rights reserved.
10690
10686
dnl
10691
10687
dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
10713
10709
 
10714
10710
 
10715
10711
dnl We need recent a autoconf version
10716
 
AC_PREREQ([2.60])
 
10712
AC_PREREQ([2.53])
10717
10713
 
10718
10714
 
10719
10715
 
11023
11019
])
11024
11020
 
11025
11021
 
 
11022
dnl $Id$
 
11023
dnl
11026
11024
dnl Copyright (c) 2002-2015
11027
11025
dnl         The Xfce development team. All rights reserved.
11028
11026
dnl
11051
11049
 
11052
11050
 
11053
11051
dnl We need recent a autoconf version
11054
 
AC_PREREQ([2.60])
 
11052
AC_PREREQ([2.53])
11055
11053
 
11056
11054
 
11057
11055
dnl XDT_SUPPORTED_FLAGS(VAR, FLAGS)
11102
11100
                              -Wcast-align -Wformat -Wformat-security -Wformat-y2k \
11103
11101
                              -Winit-self -Wmissing-include-dirs -Wundef \
11104
11102
                              -Wnested-externs"
11105
 
    CPPFLAGS="$CPPFLAGS"
11106
11103
 
11107
11104
    if test x`uname` = x"Linux"; then
11108
11105
      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -fstack-protector"
11115
11112
 
11116
11113
    if test x"$enable_debug" = x"full"; then
11117
11114
      AC_DEFINE([DEBUG_TRACE], [1], [Define for tracing support])
11118
 
      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -O0 -g -Werror"
11119
 
      CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG"
 
11115
      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -O -g -Werror"
 
11116
      CPPFLAGS="$CPPFLAGS -O -DG_ENABLE_DEBUG -D_FORTIFY_SOURCE=2 -DG_ENABLE_DEBUG"
11120
11117
      AC_MSG_RESULT([full])
11121
11118
    else
11122
 
      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -g"
 
11119
      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -O -g"
 
11120
      CPPFLAGS="$CPPFLAGS -O -D_FORTIFY_SOURCE=1 -DG_ENABLE_DEBUG"
11123
11121
      AC_MSG_RESULT([yes])
11124
11122
    fi
11125
11123
 
11243
11241
  fi
11244
11242
])
11245
11243
 
11246
 
dnl Copyright (c) 2002-2015
 
11244
dnl $Id$
 
11245
dnl
 
11246
dnl Copyright (c) 2002-2006
11247
11247
dnl         The Xfce development team. All rights reserved.
11248
11248
dnl
11249
11249
dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.