source: trunk/third/gpdf/aclocal.m4 @ 21437

Revision 21437, 75.7 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21436, which included commits to RCS files with non-trunk default branches.
Line 
1# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4# Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14# <<< smr.m4 from smr_macros 0.2.4 >>>
15
16dnl ####################### -*- Mode: M4 -*- ###########################
17dnl smr.m4 --
18dnl
19dnl Copyright (C) 1999 Matthew D. Langston <langston@SLAC.Stanford.EDU>
20dnl Copyright (C) 1998 Steve Robbins <stever@cs.mcgill.ca>
21dnl
22dnl This file is free software; you can redistribute it and/or modify it
23dnl under the terms of the GNU General Public License as published by
24dnl the Free Software Foundation; either version 2 of the License, or
25dnl (at your option) any later version.
26dnl
27dnl This file is distributed in the hope that it will be useful, but
28dnl WITHOUT ANY WARRANTY; without even the implied warranty of
29dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30dnl General Public License for more details.
31dnl
32dnl You should have received a copy of the GNU General Public License
33dnl along with this file; if not, write to:
34dnl
35dnl   Free Software Foundation, Inc.
36dnl   Suite 330
37dnl   59 Temple Place
38dnl   Boston, MA 02111-1307, USA.
39dnl ####################################################################
40
41
42dnl NOTE: The macros in this file are extensively documented in the
43dnl       accompanying `smr_macros.texi' Texinfo file.  Please see the
44dnl       Texinfo documentation for the definitive specification of how
45dnl       these macros are supposed to work.  If the macros work
46dnl       differently than the Texinfo documentation says they should,
47dnl       then the macros (and not the Texinfo documentation) has the
48dnl       bug(s).
49
50dnl This is a convenient macro which translates illegal characters for
51dnl bourne shell variables into legal characters.  It has the same
52dnl functionality as sed 'y%./+-:%__p__%'.
53AC_DEFUN([smr_safe_translation], [patsubst(patsubst([$1], [+], [p]), [./-:], [_])])
54
55AC_DEFUN([smr_SWITCH],
56[
57  dnl Define convenient aliases for the arguments since there are so
58  dnl many of them and I keep confusing myself whenever I have to edit
59  dnl this macro.
60  pushdef([smr_name],        $1)
61  pushdef([smr_help_string], $2)
62  pushdef([smr_default],     $3)
63  pushdef([smr_yes_define],  $4)
64  pushdef([smr_no_define],   $5)
65
66  dnl Do some sanity checking of the arguments.
67  ifelse([regexp(smr_default, [^\(yes\|no\)$])], -1, [AC_MSG_ERROR($0: third arg must be either yes or no)])
68
69  dnl Create the help string
70  pushdef([smr_lhs], [--ifelse(smr_default, yes, disable, enable)-smr_name])dnl
71  pushdef([smr_rhs], [ifelse(smr_default, yes, disable, enable) smr_help_string (default is smr_default)])dnl
72
73  dnl Add the option to `configure --help'.  We don't need to supply the
74  dnl 4th argument to AC_ARG_ENABLE (i.e. the code to set the default
75  dnl value) because that is done below by AC_CACHE_CHECK.
76  AC_ARG_ENABLE([smr_name],
77                AC_HELP_STRING([smr_lhs], [smr_rhs]),
78                smr_cv_enable_[]smr_name=$enableval)
79
80  dnl We cache the result so that the user doesn't have to remember
81  dnl which flags they passed to `configure'.
82  AC_CACHE_CHECK([whether to enable smr_help_string],
83                 smr_cv_enable_[]smr_name,
84                 smr_cv_enable_[]smr_name=smr_default)
85
86    ifelse(smr_yes_define, , , test x"[$]smr_cv_enable_[]smr_name" = xyes && AC_DEFINE(smr_yes_define))
87    ifelse(smr_no_define, , ,  test x"[$]smr_cv_enable_[]smr_name" = xno  && AC_DEFINE(smr_no_define))
88
89  dnl Sanity check the value assigned to smr_cv_enable_$1 to force it to
90  dnl be either `yes' or `no'.
91  if test ! x"[$]smr_cv_enable_[]smr_name" = xyes; then
92    if test ! x"[$]smr_cv_enable_[]smr_name" = xno; then
93      AC_MSG_ERROR([smr_lhs must be either yes or no])
94    fi
95  fi
96
97  popdef([smr_name])
98  popdef([smr_help_string])
99  popdef([smr_default])
100  popdef([smr_yes_define])
101  popdef([smr_no_define])
102  popdef([smr_lhs])
103  popdef([smr_rhs])
104])
105
106
107AC_DEFUN([smr_ARG_WITHLIB],
108[
109  dnl Define convenient aliases for the arguments since there are so
110  dnl many of them and I keep confusing myself whenever I have to edit
111  dnl this macro.
112  pushdef([smr_name],        $1)
113  pushdef([smr_libname],     ifelse($2, , smr_name, $2))
114  pushdef([smr_help_string], $3)
115  pushdef([smr_safe_name],   smr_safe_translation(smr_name))
116
117  dnl Add the option to `configure --help'.  We don't need to supply the
118  dnl 4th argument to AC_ARG_WITH (i.e. the code to set the default
119  dnl value) because that is done below by AC_CACHE_CHECK.
120  AC_ARG_WITH(smr_safe_name-library,
121              AC_HELP_STRING([--with-smr_safe_name-library[[=PATH]]],
122                             [use smr_name library ifelse(smr_help_string, , , (smr_help_string))]),
123              smr_cv_with_[]smr_safe_name[]_library=$withval)
124
125  dnl We cache the result so that the user doesn't have to remember
126  dnl which flags they passed to `configure'.
127  AC_CACHE_CHECK([whether to use smr_name library],
128                 smr_cv_with_[]smr_safe_name[]_library,
129                 smr_cv_with_[]smr_safe_name[]_library=maybe)
130
131
132  case x"[$]smr_cv_with_[]smr_safe_name[]_library" in
133      xyes | xmaybe)
134          smr_safe_name[]_LIBS="-l[]smr_libname"
135          with_[]smr_safe_name=[$]smr_cv_with_[]smr_safe_name[]_library
136          ;;
137      xno)
138          smr_safe_name[]_LIBS=
139          with_[]smr_safe_name=no
140          ;;
141      *)
142          if test -f "[$]smr_cv_with_[]smr_safe_name[]_library"; then
143            smr_safe_name[]_LIBS=[$]smr_cv_with_[]smr_safe_name[]_library
144          elif test -d "[$]smr_cv_with_[]smr_safe_name[]_library"; then
145            smr_safe_name[]_LIBS="-L[$]smr_cv_with_[]smr_safe_name[]_library -l[]smr_libname"
146          else
147            AC_MSG_ERROR([argument must be boolean, file, or directory])
148          fi
149          with_[]smr_safe_name=yes
150          ;;
151  esac
152
153  popdef([smr_name])
154  popdef([smr_libname])
155  popdef([smr_help_string])
156  popdef([smr_safe_name])
157])
158
159
160AC_DEFUN([smr_ARG_WITHINCLUDES],
161[
162  dnl Define convenient aliases for the arguments since there are so
163  dnl many of them and I keep confusing myself whenever I have to edit
164  dnl this macro.
165  pushdef([smr_name],        $1)
166  pushdef([smr_header],      $2)
167  pushdef([smr_extra_flags], $3)
168  pushdef([smr_safe_name],   smr_safe_translation(smr_name))
169
170  dnl Add the option to `configure --help'.  We don't need to supply the
171  dnl 4th argument to AC_ARG_WITH (i.e. the code to set the default
172  dnl value) because that is done below by AC_CACHE_CHECK.
173  AC_ARG_WITH(smr_safe_name-includes,
174              AC_HELP_STRING([--with-smr_safe_name-includes[[=DIR]]],
175                             [set directory for smr_name headers]),
176              smr_cv_with_[]smr_safe_name[]_includes=$withval)
177
178  dnl We cache the result so that the user doesn't have to remember
179  dnl which flags they passed to `configure'.
180  AC_CACHE_CHECK([where to find the smr_name header files],
181                 smr_cv_with_[]smr_safe_name[]_includes,
182                 smr_cv_with_[]smr_safe_name[]_includes=)
183
184  if test ! x"[$]smr_cv_with_[]smr_safe_name[]_includes" = x; then
185    if test -d "[$]smr_cv_with_[]smr_safe_name[]_includes"; then
186      smr_safe_name[]_CFLAGS="-I[$]smr_cv_with_[]smr_safe_name[]_includes"
187    else
188      AC_MSG_ERROR([argument must be a directory])
189    fi
190  else
191    smr_safe_name[]_CFLAGS=
192  fi
193
194  dnl This bit of logic comes from the autoconf AC_PROG_CC macro.  We
195  dnl need to put the given include directory into CPPFLAGS temporarily,
196  dnl but then restore CPPFLAGS to its old value.
197  smr_test_CPPFLAGS="${CPPFLAGS+set}"
198  smr_save_CPPFLAGS="$CPPFLAGS"
199  CPPFLAGS="$CPPFLAGS [$]smr_safe_name[]_CFLAGS smr_extra_flags"
200
201  dnl If the header file smr_header exists, then define
202  dnl HAVE_[]smr_header (in all capitals).
203  AC_CHECK_HEADERS([smr_header],
204                   smr_have_[]smr_safe_name[]_header=yes,
205                   smr_have_[]smr_safe_name[]_header=no)
206
207  if test x"$smr_test_CPPFLAGS" = xset; then
208    CPPFLAGS=$smr_save_CPPFLAGS
209  else
210    unset CPPFLAGS
211  fi
212
213  popdef([smr_name])
214  popdef([smr_header])
215  popdef([smr_extra_flags])
216  popdef([smr_safe_name])
217])
218
219
220AC_DEFUN([smr_CHECK_LIB],
221[
222  dnl Define convenient aliases for the arguments since there are so
223  dnl many of them and I keep confusing myself whenever I have to edit
224  dnl this macro.
225  pushdef([smr_name],        $1)
226  pushdef([smr_libname],     ifelse($2, , smr_name, $2))
227  pushdef([smr_help_string], $3)
228  pushdef([smr_function],    $4)
229  pushdef([smr_header],      $5)
230  pushdef([smr_extra_libs],  $6)
231  pushdef([smr_extra_flags], $7)
232  pushdef([smr_prototype],   $8)
233  pushdef([smr_safe_name],   smr_safe_translation(smr_name))
234
235  dnl Give the user (via "configure --help") an interface to specify
236  dnl whether we should use the library or not, and possibly where we
237  dnl should find it.
238  smr_ARG_WITHLIB([smr_name], [smr_libname], [smr_help_string])
239
240  if test ! x"$with_[]smr_safe_name" = xno; then
241
242    # If we got this far, then the user didn't explicitly ask not to use
243    # the library.
244
245    dnl If the caller of smr_CHECK_LIB specified a header file for this
246    dnl library, then give the user (via "configure --help") an
247    dnl interface to specify where this header file can be found (if it
248    dnl isn't found by the compiler by default).
249    ifelse(smr_header, , , [smr_ARG_WITHINCLUDES(smr_name, smr_header, smr_extra_flags)])
250
251    # We need only look for the library if the header has been found
252    # (or no header is needed).
253    if test [$]smr_have_[]smr_safe_name[]_header != no; then
254
255       AC_CHECK_LIB(smr_libname,
256                    smr_function,
257                    smr_have_[]smr_safe_name[]_library=yes,
258                    smr_have_[]smr_safe_name[]_library=no,
259                    [$]smr_safe_name[]_CFLAGS [smr_extra_flags] [$]smr_safe_name[]_LIBS [smr_extra_libs],
260                    [ifelse(smr_prototype, , , [[#]include <smr_header>])],
261                    smr_prototype)
262    fi
263
264    if test x"[$]smr_have_[]smr_safe_name[]_library" = xyes; then
265      AC_MSG_RESULT([using smr_name library])
266    else
267      smr_safe_name[]_LIBS=
268      smr_safe_name[]_CFLAGS=
269
270      if test x"$with_[]smr_safe_name" = xmaybe; then
271        AC_MSG_RESULT([not using smr_name library])
272      else
273        AC_MSG_WARN([requested smr_name library not found!])
274      fi
275    fi
276  fi
277
278  popdef([smr_name])
279  popdef([smr_libname])
280  popdef([smr_help_string])
281  popdef([smr_function])
282  popdef([smr_header])
283  popdef([smr_extra_libs])
284  popdef([smr_extra_flags])
285  popdef([smr_prototype])
286  popdef([smr_safe_name])
287])
288
289# Add --enable-maintainer-mode option to configure.
290# From Jim Meyering
291
292# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
293
294# This program is free software; you can redistribute it and/or modify
295# it under the terms of the GNU General Public License as published by
296# the Free Software Foundation; either version 2, or (at your option)
297# any later version.
298
299# This program is distributed in the hope that it will be useful,
300# but WITHOUT ANY WARRANTY; without even the implied warranty of
301# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
302# GNU General Public License for more details.
303
304# You should have received a copy of the GNU General Public License
305# along with this program; if not, write to the Free Software
306# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
307# 02111-1307, USA.
308
309# serial 2
310
311AC_DEFUN([AM_MAINTAINER_MODE],
312[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
313  dnl maintainer-mode is disabled by default
314  AC_ARG_ENABLE(maintainer-mode,
315[  --enable-maintainer-mode enable make rules and dependencies not useful
316                          (and sometimes confusing) to the casual installer],
317      USE_MAINTAINER_MODE=$enableval,
318      USE_MAINTAINER_MODE=no)
319  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
320  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
321  MAINT=$MAINTAINER_MODE_TRUE
322  AC_SUBST(MAINT)dnl
323]
324)
325
326AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
327
328# AM_CONDITIONAL                                              -*- Autoconf -*-
329
330# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
331
332# This program is free software; you can redistribute it and/or modify
333# it under the terms of the GNU General Public License as published by
334# the Free Software Foundation; either version 2, or (at your option)
335# any later version.
336
337# This program is distributed in the hope that it will be useful,
338# but WITHOUT ANY WARRANTY; without even the implied warranty of
339# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
340# GNU General Public License for more details.
341
342# You should have received a copy of the GNU General Public License
343# along with this program; if not, write to the Free Software
344# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
345# 02111-1307, USA.
346
347# serial 5
348
349AC_PREREQ(2.52)
350
351# AM_CONDITIONAL(NAME, SHELL-CONDITION)
352# -------------------------------------
353# Define a conditional.
354AC_DEFUN([AM_CONDITIONAL],
355[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
356        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
357AC_SUBST([$1_TRUE])
358AC_SUBST([$1_FALSE])
359if $2; then
360  $1_TRUE=
361  $1_FALSE='#'
362else
363  $1_TRUE='#'
364  $1_FALSE=
365fi
366AC_CONFIG_COMMANDS_PRE(
367[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
368  AC_MSG_ERROR([conditional "$1" was never defined.
369Usually this means the macro was only invoked conditionally.])
370fi])])
371
372# Do all the work for Automake.                            -*- Autoconf -*-
373
374# This macro actually does too much some checks are only needed if
375# your package does certain things.  But this isn't really a big deal.
376
377# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
378# Free Software Foundation, Inc.
379
380# This program is free software; you can redistribute it and/or modify
381# it under the terms of the GNU General Public License as published by
382# the Free Software Foundation; either version 2, or (at your option)
383# any later version.
384
385# This program is distributed in the hope that it will be useful,
386# but WITHOUT ANY WARRANTY; without even the implied warranty of
387# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
388# GNU General Public License for more details.
389
390# You should have received a copy of the GNU General Public License
391# along with this program; if not, write to the Free Software
392# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
393# 02111-1307, USA.
394
395# serial 10
396
397AC_PREREQ([2.54])
398
399# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
400# the ones we care about.
401m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
402
403# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
404# AM_INIT_AUTOMAKE([OPTIONS])
405# -----------------------------------------------
406# The call with PACKAGE and VERSION arguments is the old style
407# call (pre autoconf-2.50), which is being phased out.  PACKAGE
408# and VERSION should now be passed to AC_INIT and removed from
409# the call to AM_INIT_AUTOMAKE.
410# We support both call styles for the transition.  After
411# the next Automake release, Autoconf can make the AC_INIT
412# arguments mandatory, and then we can depend on a new Autoconf
413# release and drop the old call support.
414AC_DEFUN([AM_INIT_AUTOMAKE],
415[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
416 AC_REQUIRE([AC_PROG_INSTALL])dnl
417# test to see if srcdir already configured
418if test "`cd $srcdir && pwd`" != "`pwd`" &&
419   test -f $srcdir/config.status; then
420  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
421fi
422
423# test whether we have cygpath
424if test -z "$CYGPATH_W"; then
425  if (cygpath --version) >/dev/null 2>/dev/null; then
426    CYGPATH_W='cygpath -w'
427  else
428    CYGPATH_W=echo
429  fi
430fi
431AC_SUBST([CYGPATH_W])
432
433# Define the identity of the package.
434dnl Distinguish between old-style and new-style calls.
435m4_ifval([$2],
436[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
437 AC_SUBST([PACKAGE], [$1])dnl
438 AC_SUBST([VERSION], [$2])],
439[_AM_SET_OPTIONS([$1])dnl
440 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
441 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
442
443_AM_IF_OPTION([no-define],,
444[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
445 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
446
447# Some tools Automake needs.
448AC_REQUIRE([AM_SANITY_CHECK])dnl
449AC_REQUIRE([AC_ARG_PROGRAM])dnl
450AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
451AM_MISSING_PROG(AUTOCONF, autoconf)
452AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
453AM_MISSING_PROG(AUTOHEADER, autoheader)
454AM_MISSING_PROG(MAKEINFO, makeinfo)
455AM_MISSING_PROG(AMTAR, tar)
456AM_PROG_INSTALL_SH
457AM_PROG_INSTALL_STRIP
458# We need awk for the "check" target.  The system "awk" is bad on
459# some platforms.
460AC_REQUIRE([AC_PROG_AWK])dnl
461AC_REQUIRE([AC_PROG_MAKE_SET])dnl
462AC_REQUIRE([AM_SET_LEADING_DOT])dnl
463
464_AM_IF_OPTION([no-dependencies],,
465[AC_PROVIDE_IFELSE([AC_PROG_CC],
466                  [_AM_DEPENDENCIES(CC)],
467                  [define([AC_PROG_CC],
468                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
469AC_PROVIDE_IFELSE([AC_PROG_CXX],
470                  [_AM_DEPENDENCIES(CXX)],
471                  [define([AC_PROG_CXX],
472                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
473])
474])
475
476
477# When config.status generates a header, we must update the stamp-h file.
478# This file resides in the same directory as the config header
479# that is generated.  The stamp files are numbered to have different names.
480
481# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
482# loop where config.status creates the headers, so we can generate
483# our stamp files there.
484AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
485[# Compute $1's index in $config_headers.
486_am_stamp_count=1
487for _am_header in $config_headers :; do
488  case $_am_header in
489    $1 | $1:* )
490      break ;;
491    * )
492      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
493  esac
494done
495echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
496
497# Copyright 2002  Free Software Foundation, Inc.
498
499# This program is free software; you can redistribute it and/or modify
500# it under the terms of the GNU General Public License as published by
501# the Free Software Foundation; either version 2, or (at your option)
502# any later version.
503
504# This program is distributed in the hope that it will be useful,
505# but WITHOUT ANY WARRANTY; without even the implied warranty of
506# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
507# GNU General Public License for more details.
508
509# You should have received a copy of the GNU General Public License
510# along with this program; if not, write to the Free Software
511# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
512
513# AM_AUTOMAKE_VERSION(VERSION)
514# ----------------------------
515# Automake X.Y traces this macro to ensure aclocal.m4 has been
516# generated from the m4 files accompanying Automake X.Y.
517AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
518
519# AM_SET_CURRENT_AUTOMAKE_VERSION
520# -------------------------------
521# Call AM_AUTOMAKE_VERSION so it can be traced.
522# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
523AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
524         [AM_AUTOMAKE_VERSION([1.7.9])])
525
526# Helper functions for option handling.                    -*- Autoconf -*-
527
528# Copyright 2001, 2002  Free Software Foundation, Inc.
529
530# This program is free software; you can redistribute it and/or modify
531# it under the terms of the GNU General Public License as published by
532# the Free Software Foundation; either version 2, or (at your option)
533# any later version.
534
535# This program is distributed in the hope that it will be useful,
536# but WITHOUT ANY WARRANTY; without even the implied warranty of
537# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
538# GNU General Public License for more details.
539
540# You should have received a copy of the GNU General Public License
541# along with this program; if not, write to the Free Software
542# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
543# 02111-1307, USA.
544
545# serial 2
546
547# _AM_MANGLE_OPTION(NAME)
548# -----------------------
549AC_DEFUN([_AM_MANGLE_OPTION],
550[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
551
552# _AM_SET_OPTION(NAME)
553# ------------------------------
554# Set option NAME.  Presently that only means defining a flag for this option.
555AC_DEFUN([_AM_SET_OPTION],
556[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
557
558# _AM_SET_OPTIONS(OPTIONS)
559# ----------------------------------
560# OPTIONS is a space-separated list of Automake options.
561AC_DEFUN([_AM_SET_OPTIONS],
562[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
563
564# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
565# -------------------------------------------
566# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
567AC_DEFUN([_AM_IF_OPTION],
568[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
569
570#
571# Check to make sure that the build environment is sane.
572#
573
574# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
575
576# This program is free software; you can redistribute it and/or modify
577# it under the terms of the GNU General Public License as published by
578# the Free Software Foundation; either version 2, or (at your option)
579# any later version.
580
581# This program is distributed in the hope that it will be useful,
582# but WITHOUT ANY WARRANTY; without even the implied warranty of
583# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
584# GNU General Public License for more details.
585
586# You should have received a copy of the GNU General Public License
587# along with this program; if not, write to the Free Software
588# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
589# 02111-1307, USA.
590
591# serial 3
592
593# AM_SANITY_CHECK
594# ---------------
595AC_DEFUN([AM_SANITY_CHECK],
596[AC_MSG_CHECKING([whether build environment is sane])
597# Just in case
598sleep 1
599echo timestamp > conftest.file
600# Do `set' in a subshell so we don't clobber the current shell's
601# arguments.  Must try -L first in case configure is actually a
602# symlink; some systems play weird games with the mod time of symlinks
603# (eg FreeBSD returns the mod time of the symlink's containing
604# directory).
605if (
606   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
607   if test "$[*]" = "X"; then
608      # -L didn't work.
609      set X `ls -t $srcdir/configure conftest.file`
610   fi
611   rm -f conftest.file
612   if test "$[*]" != "X $srcdir/configure conftest.file" \
613      && test "$[*]" != "X conftest.file $srcdir/configure"; then
614
615      # If neither matched, then we have a broken ls.  This can happen
616      # if, for instance, CONFIG_SHELL is bash and it inherits a
617      # broken ls alias from the environment.  This has actually
618      # happened.  Such a system could not be considered "sane".
619      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
620alias in your environment])
621   fi
622
623   test "$[2]" = conftest.file
624   )
625then
626   # Ok.
627   :
628else
629   AC_MSG_ERROR([newly created file is older than distributed files!
630Check your system clock])
631fi
632AC_MSG_RESULT(yes)])
633
634#  -*- Autoconf -*-
635
636
637# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
638
639# This program is free software; you can redistribute it and/or modify
640# it under the terms of the GNU General Public License as published by
641# the Free Software Foundation; either version 2, or (at your option)
642# any later version.
643
644# This program is distributed in the hope that it will be useful,
645# but WITHOUT ANY WARRANTY; without even the implied warranty of
646# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
647# GNU General Public License for more details.
648
649# You should have received a copy of the GNU General Public License
650# along with this program; if not, write to the Free Software
651# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
652# 02111-1307, USA.
653
654# serial 3
655
656# AM_MISSING_PROG(NAME, PROGRAM)
657# ------------------------------
658AC_DEFUN([AM_MISSING_PROG],
659[AC_REQUIRE([AM_MISSING_HAS_RUN])
660$1=${$1-"${am_missing_run}$2"}
661AC_SUBST($1)])
662
663
664# AM_MISSING_HAS_RUN
665# ------------------
666# Define MISSING if not defined so far and test if it supports --run.
667# If it does, set am_missing_run to use it, otherwise, to nothing.
668AC_DEFUN([AM_MISSING_HAS_RUN],
669[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
670test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
671# Use eval to expand $SHELL
672if eval "$MISSING --run true"; then
673  am_missing_run="$MISSING --run "
674else
675  am_missing_run=
676  AC_MSG_WARN([`missing' script is too old or missing])
677fi
678])
679
680# AM_AUX_DIR_EXPAND
681
682# Copyright 2001 Free Software Foundation, Inc.
683
684# This program is free software; you can redistribute it and/or modify
685# it under the terms of the GNU General Public License as published by
686# the Free Software Foundation; either version 2, or (at your option)
687# any later version.
688
689# This program is distributed in the hope that it will be useful,
690# but WITHOUT ANY WARRANTY; without even the implied warranty of
691# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
692# GNU General Public License for more details.
693
694# You should have received a copy of the GNU General Public License
695# along with this program; if not, write to the Free Software
696# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
697# 02111-1307, USA.
698
699# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
700# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
701# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
702#
703# Of course, Automake must honor this variable whenever it calls a
704# tool from the auxiliary directory.  The problem is that $srcdir (and
705# therefore $ac_aux_dir as well) can be either absolute or relative,
706# depending on how configure is run.  This is pretty annoying, since
707# it makes $ac_aux_dir quite unusable in subdirectories: in the top
708# source directory, any form will work fine, but in subdirectories a
709# relative path needs to be adjusted first.
710#
711# $ac_aux_dir/missing
712#    fails when called from a subdirectory if $ac_aux_dir is relative
713# $top_srcdir/$ac_aux_dir/missing
714#    fails if $ac_aux_dir is absolute,
715#    fails when called from a subdirectory in a VPATH build with
716#          a relative $ac_aux_dir
717#
718# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
719# are both prefixed by $srcdir.  In an in-source build this is usually
720# harmless because $srcdir is `.', but things will broke when you
721# start a VPATH build or use an absolute $srcdir.
722#
723# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
724# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
725#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
726# and then we would define $MISSING as
727#   MISSING="\${SHELL} $am_aux_dir/missing"
728# This will work as long as MISSING is not called from configure, because
729# unfortunately $(top_srcdir) has no meaning in configure.
730# However there are other variables, like CC, which are often used in
731# configure, and could therefore not use this "fixed" $ac_aux_dir.
732#
733# Another solution, used here, is to always expand $ac_aux_dir to an
734# absolute PATH.  The drawback is that using absolute paths prevent a
735# configured tree to be moved without reconfiguration.
736
737# Rely on autoconf to set up CDPATH properly.
738AC_PREREQ([2.50])
739
740AC_DEFUN([AM_AUX_DIR_EXPAND], [
741# expand $ac_aux_dir to an absolute path
742am_aux_dir=`cd $ac_aux_dir && pwd`
743])
744
745# AM_PROG_INSTALL_SH
746# ------------------
747# Define $install_sh.
748
749# Copyright 2001 Free Software Foundation, Inc.
750
751# This program is free software; you can redistribute it and/or modify
752# it under the terms of the GNU General Public License as published by
753# the Free Software Foundation; either version 2, or (at your option)
754# any later version.
755
756# This program is distributed in the hope that it will be useful,
757# but WITHOUT ANY WARRANTY; without even the implied warranty of
758# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
759# GNU General Public License for more details.
760
761# You should have received a copy of the GNU General Public License
762# along with this program; if not, write to the Free Software
763# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
764# 02111-1307, USA.
765
766AC_DEFUN([AM_PROG_INSTALL_SH],
767[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
768install_sh=${install_sh-"$am_aux_dir/install-sh"}
769AC_SUBST(install_sh)])
770
771# AM_PROG_INSTALL_STRIP
772
773# Copyright 2001 Free Software Foundation, Inc.
774
775# This program is free software; you can redistribute it and/or modify
776# it under the terms of the GNU General Public License as published by
777# the Free Software Foundation; either version 2, or (at your option)
778# any later version.
779
780# This program is distributed in the hope that it will be useful,
781# but WITHOUT ANY WARRANTY; without even the implied warranty of
782# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
783# GNU General Public License for more details.
784
785# You should have received a copy of the GNU General Public License
786# along with this program; if not, write to the Free Software
787# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
788# 02111-1307, USA.
789
790# One issue with vendor `install' (even GNU) is that you can't
791# specify the program used to strip binaries.  This is especially
792# annoying in cross-compiling environments, where the build's strip
793# is unlikely to handle the host's binaries.
794# Fortunately install-sh will honor a STRIPPROG variable, so we
795# always use install-sh in `make install-strip', and initialize
796# STRIPPROG with the value of the STRIP variable (set by the user).
797AC_DEFUN([AM_PROG_INSTALL_STRIP],
798[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
799# Installed binaries are usually stripped using `strip' when the user
800# run `make install-strip'.  However `strip' might not be the right
801# tool to use in cross-compilation environments, therefore Automake
802# will honor the `STRIP' environment variable to overrule this program.
803dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
804if test "$cross_compiling" != no; then
805  AC_CHECK_TOOL([STRIP], [strip], :)
806fi
807INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
808AC_SUBST([INSTALL_STRIP_PROGRAM])])
809
810#                                                          -*- Autoconf -*-
811# Copyright (C) 2003  Free Software Foundation, Inc.
812
813# This program is free software; you can redistribute it and/or modify
814# it under the terms of the GNU General Public License as published by
815# the Free Software Foundation; either version 2, or (at your option)
816# any later version.
817
818# This program is distributed in the hope that it will be useful,
819# but WITHOUT ANY WARRANTY; without even the implied warranty of
820# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
821# GNU General Public License for more details.
822
823# You should have received a copy of the GNU General Public License
824# along with this program; if not, write to the Free Software
825# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
826# 02111-1307, USA.
827
828# serial 1
829
830# Check whether the underlying file-system supports filenames
831# with a leading dot.  For instance MS-DOS doesn't.
832AC_DEFUN([AM_SET_LEADING_DOT],
833[rm -rf .tst 2>/dev/null
834mkdir .tst 2>/dev/null
835if test -d .tst; then
836  am__leading_dot=.
837else
838  am__leading_dot=_
839fi
840rmdir .tst 2>/dev/null
841AC_SUBST([am__leading_dot])])
842
843# serial 5                                              -*- Autoconf -*-
844
845# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
846
847# This program is free software; you can redistribute it and/or modify
848# it under the terms of the GNU General Public License as published by
849# the Free Software Foundation; either version 2, or (at your option)
850# any later version.
851
852# This program is distributed in the hope that it will be useful,
853# but WITHOUT ANY WARRANTY; without even the implied warranty of
854# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
855# GNU General Public License for more details.
856
857# You should have received a copy of the GNU General Public License
858# along with this program; if not, write to the Free Software
859# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
860# 02111-1307, USA.
861
862
863# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
864# written in clear, in which case automake, when reading aclocal.m4,
865# will think it sees a *use*, and therefore will trigger all it's
866# C support machinery.  Also note that it means that autoscan, seeing
867# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
868
869
870
871# _AM_DEPENDENCIES(NAME)
872# ----------------------
873# See how the compiler implements dependency checking.
874# NAME is "CC", "CXX", "GCJ", or "OBJC".
875# We try a few techniques and use that to set a single cache variable.
876#
877# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
878# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
879# dependency, and given that the user is not expected to run this macro,
880# just rely on AC_PROG_CC.
881AC_DEFUN([_AM_DEPENDENCIES],
882[AC_REQUIRE([AM_SET_DEPDIR])dnl
883AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
884AC_REQUIRE([AM_MAKE_INCLUDE])dnl
885AC_REQUIRE([AM_DEP_TRACK])dnl
886
887ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
888       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
889       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
890       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
891                   [depcc="$$1"   am_compiler_list=])
892
893AC_CACHE_CHECK([dependency style of $depcc],
894               [am_cv_$1_dependencies_compiler_type],
895[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
896  # We make a subdir and do the tests there.  Otherwise we can end up
897  # making bogus files that we don't know about and never remove.  For
898  # instance it was reported that on HP-UX the gcc test will end up
899  # making a dummy file named `D' -- because `-MD' means `put the output
900  # in D'.
901  mkdir conftest.dir
902  # Copy depcomp to subdir because otherwise we won't find it if we're
903  # using a relative directory.
904  cp "$am_depcomp" conftest.dir
905  cd conftest.dir
906  # We will build objects and dependencies in a subdirectory because
907  # it helps to detect inapplicable dependency modes.  For instance
908  # both Tru64's cc and ICC support -MD to output dependencies as a
909  # side effect of compilation, but ICC will put the dependencies in
910  # the current directory while Tru64 will put them in the object
911  # directory.
912  mkdir sub
913
914  am_cv_$1_dependencies_compiler_type=none
915  if test "$am_compiler_list" = ""; then
916     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
917  fi
918  for depmode in $am_compiler_list; do
919    # Setup a source with many dependencies, because some compilers
920    # like to wrap large dependency lists on column 80 (with \), and
921    # we should not choose a depcomp mode which is confused by this.
922    #
923    # We need to recreate these files for each test, as the compiler may
924    # overwrite some of them when testing with obscure command lines.
925    # This happens at least with the AIX C compiler.
926    : > sub/conftest.c
927    for i in 1 2 3 4 5 6; do
928      echo '#include "conftst'$i'.h"' >> sub/conftest.c
929      : > sub/conftst$i.h
930    done
931    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
932
933    case $depmode in
934    nosideeffect)
935      # after this tag, mechanisms are not by side-effect, so they'll
936      # only be used when explicitly requested
937      if test "x$enable_dependency_tracking" = xyes; then
938        continue
939      else
940        break
941      fi
942      ;;
943    none) break ;;
944    esac
945    # We check with `-c' and `-o' for the sake of the "dashmstdout"
946    # mode.  It turns out that the SunPro C++ compiler does not properly
947    # handle `-M -o', and we need to detect this.
948    if depmode=$depmode \
949       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
950       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
951       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
952         >/dev/null 2>conftest.err &&
953       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
954       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
955       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
956      # icc doesn't choke on unknown options, it will just issue warnings
957      # (even with -Werror).  So we grep stderr for any message
958      # that says an option was ignored.
959      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
960        am_cv_$1_dependencies_compiler_type=$depmode
961        break
962      fi
963    fi
964  done
965
966  cd ..
967  rm -rf conftest.dir
968else
969  am_cv_$1_dependencies_compiler_type=none
970fi
971])
972AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
973AM_CONDITIONAL([am__fastdep$1], [
974  test "x$enable_dependency_tracking" != xno \
975  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
976])
977
978
979# AM_SET_DEPDIR
980# -------------
981# Choose a directory name for dependency files.
982# This macro is AC_REQUIREd in _AM_DEPENDENCIES
983AC_DEFUN([AM_SET_DEPDIR],
984[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
985AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
986])
987
988
989# AM_DEP_TRACK
990# ------------
991AC_DEFUN([AM_DEP_TRACK],
992[AC_ARG_ENABLE(dependency-tracking,
993[  --disable-dependency-tracking Speeds up one-time builds
994  --enable-dependency-tracking  Do not reject slow dependency extractors])
995if test "x$enable_dependency_tracking" != xno; then
996  am_depcomp="$ac_aux_dir/depcomp"
997  AMDEPBACKSLASH='\'
998fi
999AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1000AC_SUBST([AMDEPBACKSLASH])
1001])
1002
1003# Generate code to set up dependency tracking.   -*- Autoconf -*-
1004
1005# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
1006
1007# This program is free software; you can redistribute it and/or modify
1008# it under the terms of the GNU General Public License as published by
1009# the Free Software Foundation; either version 2, or (at your option)
1010# any later version.
1011
1012# This program is distributed in the hope that it will be useful,
1013# but WITHOUT ANY WARRANTY; without even the implied warranty of
1014# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1015# GNU General Public License for more details.
1016
1017# You should have received a copy of the GNU General Public License
1018# along with this program; if not, write to the Free Software
1019# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1020# 02111-1307, USA.
1021
1022#serial 2
1023
1024# _AM_OUTPUT_DEPENDENCY_COMMANDS
1025# ------------------------------
1026AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1027[for mf in $CONFIG_FILES; do
1028  # Strip MF so we end up with the name of the file.
1029  mf=`echo "$mf" | sed -e 's/:.*$//'`
1030  # Check whether this is an Automake generated Makefile or not.
1031  # We used to match only the files named `Makefile.in', but
1032  # some people rename them; so instead we look at the file content.
1033  # Grep'ing the first line is not enough: some people post-process
1034  # each Makefile.in and add a new line on top of each file to say so.
1035  # So let's grep whole file.
1036  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
1037    dirpart=`AS_DIRNAME("$mf")`
1038  else
1039    continue
1040  fi
1041  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
1042  # Extract the definition of DEP_FILES from the Makefile without
1043  # running `make'.
1044  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
1045  test -z "$DEPDIR" && continue
1046  # When using ansi2knr, U may be empty or an underscore; expand it
1047  U=`sed -n -e '/^U = / s///p' < "$mf"`
1048  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
1049  # We invoke sed twice because it is the simplest approach to
1050  # changing $(DEPDIR) to its actual value in the expansion.
1051  for file in `sed -n -e '
1052    /^DEP_FILES = .*\\\\$/ {
1053      s/^DEP_FILES = //
1054      :loop
1055        s/\\\\$//
1056        p
1057        n
1058        /\\\\$/ b loop
1059      p
1060    }
1061    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
1062       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1063    # Make sure the directory exists.
1064    test -f "$dirpart/$file" && continue
1065    fdir=`AS_DIRNAME(["$file"])`
1066    AS_MKDIR_P([$dirpart/$fdir])
1067    # echo "creating $dirpart/$file"
1068    echo '# dummy' > "$dirpart/$file"
1069  done
1070done
1071])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1072
1073
1074# AM_OUTPUT_DEPENDENCY_COMMANDS
1075# -----------------------------
1076# This macro should only be invoked once -- use via AC_REQUIRE.
1077#
1078# This code is only required when automatic dependency tracking
1079# is enabled.  FIXME.  This creates each `.P' file that we will
1080# need in order to bootstrap the dependency handling code.
1081AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1082[AC_CONFIG_COMMANDS([depfiles],
1083     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1084     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1085])
1086
1087# Check to see how 'make' treats includes.      -*- Autoconf -*-
1088
1089# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
1090
1091# This program is free software; you can redistribute it and/or modify
1092# it under the terms of the GNU General Public License as published by
1093# the Free Software Foundation; either version 2, or (at your option)
1094# any later version.
1095
1096# This program is distributed in the hope that it will be useful,
1097# but WITHOUT ANY WARRANTY; without even the implied warranty of
1098# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1099# GNU General Public License for more details.
1100
1101# You should have received a copy of the GNU General Public License
1102# along with this program; if not, write to the Free Software
1103# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1104# 02111-1307, USA.
1105
1106# serial 2
1107
1108# AM_MAKE_INCLUDE()
1109# -----------------
1110# Check to see how make treats includes.
1111AC_DEFUN([AM_MAKE_INCLUDE],
1112[am_make=${MAKE-make}
1113cat > confinc << 'END'
1114am__doit:
1115        @echo done
1116.PHONY: am__doit
1117END
1118# If we don't find an include directive, just comment out the code.
1119AC_MSG_CHECKING([for style of include used by $am_make])
1120am__include="#"
1121am__quote=
1122_am_result=none
1123# First try GNU make style include.
1124echo "include confinc" > confmf
1125# We grep out `Entering directory' and `Leaving directory'
1126# messages which can occur if `w' ends up in MAKEFLAGS.
1127# In particular we don't look at `^make:' because GNU make might
1128# be invoked under some other name (usually "gmake"), in which
1129# case it prints its new name instead of `make'.
1130if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1131   am__include=include
1132   am__quote=
1133   _am_result=GNU
1134fi
1135# Now try BSD make style include.
1136if test "$am__include" = "#"; then
1137   echo '.include "confinc"' > confmf
1138   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1139      am__include=.include
1140      am__quote="\""
1141      _am_result=BSD
1142   fi
1143fi
1144AC_SUBST([am__include])
1145AC_SUBST([am__quote])
1146AC_MSG_RESULT([$_am_result])
1147rm -f confinc confmf
1148])
1149
1150# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
1151
1152# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1153
1154# This program is free software; you can redistribute it and/or modify
1155# it under the terms of the GNU General Public License as published by
1156# the Free Software Foundation; either version 2, or (at your option)
1157# any later version.
1158
1159# This program is distributed in the hope that it will be useful,
1160# but WITHOUT ANY WARRANTY; without even the implied warranty of
1161# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1162# GNU General Public License for more details.
1163
1164# You should have received a copy of the GNU General Public License
1165# along with this program; if not, write to the Free Software
1166# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1167# 02111-1307, USA.
1168
1169AC_PREREQ([2.52])
1170
1171# serial 6
1172
1173# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
1174AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1175
1176# isc-posix.m4 serial 2 (gettext-0.11.2)
1177dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1178dnl This file is free software, distributed under the terms of the GNU
1179dnl General Public License.  As a special exception to the GNU General
1180dnl Public License, this file may be distributed as part of a program
1181dnl that contains a configuration script generated by Autoconf, under
1182dnl the same distribution terms as the rest of that program.
1183
1184# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
1185
1186# This test replaces the one in autoconf.
1187# Currently this macro should have the same name as the autoconf macro
1188# because gettext's gettext.m4 (distributed in the automake package)
1189# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
1190# give these diagnostics:
1191#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1192#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1193
1194undefine([AC_ISC_POSIX])
1195
1196AC_DEFUN([AC_ISC_POSIX],
1197  [
1198    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1199    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1200  ]
1201)
1202
1203
1204# Copyright 1996, 1997, 1999, 2000, 2001, 2002  Free Software Foundation, Inc.
1205
1206# This program is free software; you can redistribute it and/or modify
1207# it under the terms of the GNU General Public License as published by
1208# the Free Software Foundation; either version 2, or (at your option)
1209# any later version.
1210
1211# This program is distributed in the hope that it will be useful,
1212# but WITHOUT ANY WARRANTY; without even the implied warranty of
1213# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1214# GNU General Public License for more details.
1215
1216# You should have received a copy of the GNU General Public License
1217# along with this program; if not, write to the Free Software
1218# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1219# 02111-1307, USA.
1220
1221# serial 2
1222
1223# @defmac AC_PROG_CC_STDC
1224# @maindex PROG_CC_STDC
1225# @ovindex CC
1226# If the C compiler in not in ANSI C mode by default, try to add an option
1227# to output variable @code{CC} to make it so.  This macro tries various
1228# options that select ANSI C on some system or another.  It considers the
1229# compiler to be in ANSI C mode if it handles function prototypes correctly.
1230#
1231# If you use this macro, you should check after calling it whether the C
1232# compiler has been set to accept ANSI C; if not, the shell variable
1233# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
1234# code in ANSI C, you can make an un-ANSIfied copy of it by using the
1235# program @code{ansi2knr}, which comes with Ghostscript.
1236# @end defmac
1237
1238AC_DEFUN([AM_PROG_CC_STDC],
1239[AC_REQUIRE([AC_PROG_CC])
1240AC_BEFORE([$0], [AC_C_INLINE])
1241AC_BEFORE([$0], [AC_C_CONST])
1242dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
1243dnl a magic option to avoid problems with ANSI preprocessor commands
1244dnl like #elif.
1245dnl FIXME: can't do this because then AC_AIX won't work due to a
1246dnl circular dependency.
1247dnl AC_BEFORE([$0], [AC_PROG_CPP])
1248AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
1249AC_CACHE_VAL(am_cv_prog_cc_stdc,
1250[am_cv_prog_cc_stdc=no
1251ac_save_CC="$CC"
1252# Don't try gcc -ansi; that turns off useful extensions and
1253# breaks some systems' header files.
1254# AIX                   -qlanglvl=ansi
1255# Ultrix and OSF/1      -std1
1256# HP-UX 10.20 and later -Ae
1257# HP-UX older versions  -Aa -D_HPUX_SOURCE
1258# SVR4                  -Xc -D__EXTENSIONS__
1259for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1260do
1261  CC="$ac_save_CC $ac_arg"
1262  AC_TRY_COMPILE(
1263[#include <stdarg.h>
1264#include <stdio.h>
1265#include <sys/types.h>
1266#include <sys/stat.h>
1267/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1268struct buf { int x; };
1269FILE * (*rcsopen) (struct buf *, struct stat *, int);
1270static char *e (p, i)
1271     char **p;
1272     int i;
1273{
1274  return p[i];
1275}
1276static char *f (char * (*g) (char **, int), char **p, ...)
1277{
1278  char *s;
1279  va_list v;
1280  va_start (v,p);
1281  s = g (p, va_arg (v,int));
1282  va_end (v);
1283  return s;
1284}
1285int test (int i, double x);
1286struct s1 {int (*f) (int a);};
1287struct s2 {int (*f) (double a);};
1288int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1289int argc;
1290char **argv;
1291], [
1292return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1293],
1294[am_cv_prog_cc_stdc="$ac_arg"; break])
1295done
1296CC="$ac_save_CC"
1297])
1298if test -z "$am_cv_prog_cc_stdc"; then
1299  AC_MSG_RESULT([none needed])
1300else
1301  AC_MSG_RESULT([$am_cv_prog_cc_stdc])
1302fi
1303case "x$am_cv_prog_cc_stdc" in
1304  x|xno) ;;
1305  *) CC="$CC $am_cv_prog_cc_stdc" ;;
1306esac
1307])
1308
1309AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])
1310
1311dnl GNOME_COMPILE_WARNINGS
1312dnl Turn on many useful compiler warnings
1313dnl For now, only works on GCC
1314AC_DEFUN([GNOME_COMPILE_WARNINGS],[
1315    dnl ******************************
1316    dnl More compiler warnings
1317    dnl ******************************
1318
1319    AC_ARG_ENABLE(compile-warnings,
1320                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
1321                                 [Turn on compiler warnings]),,
1322                  [enable_compile_warnings="m4_default([$1],[yes])"])
1323
1324    warnCFLAGS=
1325    if test "x$GCC" != xyes; then
1326        enable_compile_warnings=no
1327    fi
1328
1329    warning_flags=
1330    realsave_CFLAGS="$CFLAGS"
1331
1332    case "$enable_compile_warnings" in
1333    no)
1334        warning_flags=
1335        ;;
1336    minimum)
1337        warning_flags="-Wall"
1338        ;;
1339    yes)
1340        warning_flags="-Wall -Wmissing-prototypes"
1341        ;;
1342    maximum|error)
1343        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
1344        CFLAGS="$warning_flags $CFLAGS"
1345        for option in -Wno-sign-compare; do
1346                SAVE_CFLAGS="$CFLAGS"
1347                CFLAGS="$CFLAGS $option"
1348                AC_MSG_CHECKING([whether gcc understands $option])
1349                AC_TRY_COMPILE([], [],
1350                        has_option=yes,
1351                        has_option=no,)
1352                CFLAGS="$SAVE_CFLAGS"
1353                AC_MSG_RESULT($has_option)
1354                if test $has_option = yes; then
1355                  warning_flags="$warning_flags $option"
1356                fi
1357                unset has_option
1358                unset SAVE_CFLAGS
1359        done
1360        unset option
1361        if test "$enable_compile_warnings" = "error" ; then
1362            warning_flags="$warning_flags -Werror"
1363        fi
1364        ;;
1365    *)
1366        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
1367        ;;
1368    esac
1369    CFLAGS="$realsave_CFLAGS"
1370    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
1371    AC_MSG_RESULT($warning_flags)
1372
1373    AC_ARG_ENABLE(iso-c,
1374                  AC_HELP_STRING([--enable-iso-c],
1375                                 [Try to warn if code is not ISO C ]),,
1376                  [enable_iso_c=no])
1377
1378    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
1379    complCFLAGS=
1380    if test "x$enable_iso_c" != "xno"; then
1381        if test "x$GCC" = "xyes"; then
1382        case " $CFLAGS " in
1383            *[\ \       ]-ansi[\ \      ]*) ;;
1384            *) complCFLAGS="$complCFLAGS -ansi" ;;
1385        esac
1386        case " $CFLAGS " in
1387            *[\ \       ]-pedantic[\ \  ]*) ;;
1388            *) complCFLAGS="$complCFLAGS -pedantic" ;;
1389        esac
1390        fi
1391    fi
1392    AC_MSG_RESULT($complCFLAGS)
1393
1394    WARN_CFLAGS="$warning_flags $complCFLAGS"
1395    AC_SUBST(WARN_CFLAGS)
1396])
1397
1398dnl For C++, do basically the same thing.
1399
1400AC_DEFUN([GNOME_CXX_WARNINGS],[
1401  AC_ARG_ENABLE(cxx-warnings,
1402                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
1403                               [Turn on compiler warnings.]),,
1404                [enable_cxx_warnings="m4_default([$1],[minimum])"])
1405
1406  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
1407  warnCXXFLAGS=
1408  if test "x$GCC" != xyes; then
1409    enable_compile_warnings=no
1410  fi
1411  if test "x$enable_cxx_warnings" != "xno"; then
1412    if test "x$GCC" = "xyes"; then
1413      case " $CXXFLAGS " in
1414      *[\ \     ]-Wall[\ \      ]*) ;;
1415      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
1416      esac
1417
1418      ## -W is not all that useful.  And it cannot be controlled
1419      ## with individual -Wno-xxx flags, unlike -Wall
1420      if test "x$enable_cxx_warnings" = "xyes"; then
1421        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
1422      fi
1423    fi
1424  fi
1425  AC_MSG_RESULT($warnCXXFLAGS)
1426
1427   AC_ARG_ENABLE(iso-cxx,
1428                 AC_HELP_STRING([--enable-iso-cxx],
1429                                [Try to warn if code is not ISO C++ ]),,
1430                 [enable_iso_cxx=no])
1431
1432   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
1433   complCXXFLAGS=
1434   if test "x$enable_iso_cxx" != "xno"; then
1435     if test "x$GCC" = "xyes"; then
1436      case " $CXXFLAGS " in
1437      *[\ \     ]-ansi[\ \      ]*) ;;
1438      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
1439      esac
1440
1441      case " $CXXFLAGS " in
1442      *[\ \     ]-pedantic[\ \  ]*) ;;
1443      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
1444      esac
1445     fi
1446   fi
1447  AC_MSG_RESULT($complCXXFLAGS)
1448
1449  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
1450  AC_SUBST(WARN_CXXFLAGS)
1451])
1452
1453# Copyright (C) 1995-2002 Free Software Foundation, Inc.
1454# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1455#
1456# This file is free software, distributed under the terms of the GNU
1457# General Public License.  As a special exception to the GNU General
1458# Public License, this file may be distributed as part of a program
1459# that contains a configuration script generated by Autoconf, under
1460# the same distribution terms as the rest of that program.
1461#
1462# This file can be copied and used freely without restrictions.  It can
1463# be used in projects which are not available under the GNU Public License
1464# but which still want to provide support for the GNU gettext functionality.
1465#
1466# Macro to add for using GNU gettext.
1467# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
1468#
1469# Modified to never use included libintl.
1470# Owen Taylor <otaylor@redhat.com>, 12/15/1998
1471#
1472# Major rework to remove unused code
1473# Owen Taylor <otaylor@redhat.com>, 12/11/2002
1474#
1475# Added better handling of ALL_LINGUAS from GNU gettext version
1476# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
1477#
1478# Modified to require ngettext
1479# Matthias Clasen <mclasen@redhat.com> 08/06/2004
1480#
1481# We need this here as well, since someone might use autoconf-2.5x
1482# to configure GLib then an older version to configure a package
1483# using AM_GLIB_GNU_GETTEXT
1484AC_PREREQ(2.53)
1485
1486dnl
1487dnl We go to great lengths to make sure that aclocal won't
1488dnl try to pull in the installed version of these macros
1489dnl when running aclocal in the glib directory.
1490dnl
1491m4_copy([AC_DEFUN],[glib_DEFUN])
1492m4_copy([AC_REQUIRE],[glib_REQUIRE])
1493dnl
1494dnl At the end, if we're not within glib, we'll define the public
1495dnl definitions in terms of our private definitions.
1496dnl
1497
1498# GLIB_LC_MESSAGES
1499#--------------------
1500glib_DEFUN([GLIB_LC_MESSAGES],
1501  [AC_CHECK_HEADERS([locale.h])
1502    if test $ac_cv_header_locale_h = yes; then
1503    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1504      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1505       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1506    if test $am_cv_val_LC_MESSAGES = yes; then
1507      AC_DEFINE(HAVE_LC_MESSAGES, 1,
1508        [Define if your <locale.h> file defines LC_MESSAGES.])
1509    fi
1510  fi])
1511
1512# GLIB_PATH_PROG_WITH_TEST
1513#----------------------------
1514dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1515dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1516glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
1517[# Extract the first word of "$2", so it can be a program name with args.
1518set dummy $2; ac_word=[$]2
1519AC_MSG_CHECKING([for $ac_word])
1520AC_CACHE_VAL(ac_cv_path_$1,
1521[case "[$]$1" in
1522  /*)
1523  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1524  ;;
1525  *)
1526  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1527  for ac_dir in ifelse([$5], , $PATH, [$5]); do
1528    test -z "$ac_dir" && ac_dir=.
1529    if test -f $ac_dir/$ac_word; then
1530      if [$3]; then
1531        ac_cv_path_$1="$ac_dir/$ac_word"
1532        break
1533      fi
1534    fi
1535  done
1536  IFS="$ac_save_ifs"
1537dnl If no 4th arg is given, leave the cache variable unset,
1538dnl so AC_PATH_PROGS will keep looking.
1539ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1540])dnl
1541  ;;
1542esac])dnl
1543$1="$ac_cv_path_$1"
1544if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1545  AC_MSG_RESULT([$]$1)
1546else
1547  AC_MSG_RESULT(no)
1548fi
1549AC_SUBST($1)dnl
1550])
1551
1552# GLIB_WITH_NLS
1553#-----------------
1554glib_DEFUN([GLIB_WITH_NLS],
1555  dnl NLS is obligatory
1556  [USE_NLS=yes
1557    AC_SUBST(USE_NLS)
1558
1559    gt_cv_have_gettext=no
1560
1561    CATOBJEXT=NONE
1562    XGETTEXT=:
1563    INTLLIBS=
1564
1565    AC_CHECK_HEADER(libintl.h,
1566     [gt_cv_func_dgettext_libintl="no"
1567      libintl_extra_libs=""
1568
1569      #
1570      # First check in libc
1571      #
1572      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1573        [AC_TRY_LINK([
1574#include <libintl.h>
1575],
1576         [return (int) ngettext ("","", 1)],
1577          gt_cv_func_ngettext_libc=yes,
1578          gt_cv_func_ngettext_libc=no)
1579        ])
1580 
1581      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1582              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1583                [AC_TRY_LINK([
1584#include <libintl.h>
1585],
1586                  [return (int) dgettext ("","")],
1587                  gt_cv_func_dgettext_libc=yes,
1588                  gt_cv_func_dgettext_libc=no)
1589                ])
1590      fi
1591 
1592      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1593        AC_CHECK_FUNCS(bind_textdomain_codeset)
1594      fi
1595
1596      #
1597      # If we don't have everything we want, check in libintl
1598      #
1599      if test "$gt_cv_func_dgettext_libc" != "yes" \
1600         || test "$gt_cv_func_ngettext_libc" != "yes" \
1601         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1602       
1603        AC_CHECK_LIB(intl, bindtextdomain,
1604            [AC_CHECK_LIB(intl, ngettext,
1605                    [AC_CHECK_LIB(intl, dgettext,
1606                                  gt_cv_func_dgettext_libintl=yes)])])
1607
1608        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1609          AC_MSG_CHECKING([if -liconv is needed to use gettext])
1610          AC_MSG_RESULT([])
1611          AC_CHECK_LIB(intl, ngettext,
1612                [AC_CHECK_LIB(intl, dcgettext,
1613                       [gt_cv_func_dgettext_libintl=yes
1614                        libintl_extra_libs=-liconv],
1615                        :,-liconv)],
1616                :,-liconv)
1617        fi
1618
1619        #
1620        # If we found libintl, then check in it for bind_textdomain_codeset();
1621        # we'll prefer libc if neither have bind_textdomain_codeset(),
1622        # and both have dgettext and ngettext
1623        #
1624        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1625          glib_save_LIBS="$LIBS"
1626          LIBS="$LIBS -lintl $libintl_extra_libs"
1627          unset ac_cv_func_bind_textdomain_codeset
1628          AC_CHECK_FUNCS(bind_textdomain_codeset)
1629          LIBS="$glib_save_LIBS"
1630
1631          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1632            gt_cv_func_dgettext_libc=no
1633          else
1634            if test "$gt_cv_func_dgettext_libc" = "yes" \
1635                && test "$gt_cv_func_ngettext_libc" = "yes"; then
1636              gt_cv_func_dgettext_libintl=no
1637            fi
1638          fi
1639        fi
1640      fi
1641
1642      if test "$gt_cv_func_dgettext_libc" = "yes" \
1643        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
1644        gt_cv_have_gettext=yes
1645      fi
1646 
1647      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1648        INTLLIBS="-lintl $libintl_extra_libs"
1649      fi
1650 
1651      if test "$gt_cv_have_gettext" = "yes"; then
1652        AC_DEFINE(HAVE_GETTEXT,1,
1653          [Define if the GNU gettext() function is already present or preinstalled.])
1654        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1655          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1656        if test "$MSGFMT" != "no"; then
1657          glib_save_LIBS="$LIBS"
1658          LIBS="$LIBS $INTLLIBS"
1659          AC_CHECK_FUNCS(dcgettext)
1660          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1661          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1662            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1663          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1664                         return _nl_msg_cat_cntr],
1665            [CATOBJEXT=.gmo
1666             DATADIRNAME=share],
1667            [case $host in
1668            *-*-solaris*)
1669            dnl On Solaris, if bind_textdomain_codeset is in libc,
1670            dnl GNU format message catalog is always supported,
1671            dnl since both are added to the libc all together.
1672            dnl Hence, we'd like to go with DATADIRNAME=share and
1673            dnl and CATOBJEXT=.gmo in this case.
1674            AC_CHECK_FUNC(bind_textdomain_codeset,
1675              [CATOBJEXT=.gmo
1676               DATADIRNAME=share],
1677              [CATOBJEXT=.mo
1678               DATADIRNAME=lib])
1679            ;;
1680            *)
1681            CATOBJEXT=.mo
1682            DATADIRNAME=lib
1683            ;;
1684            esac])
1685          LIBS="$glib_save_LIBS"
1686          INSTOBJEXT=.mo
1687        else
1688          gt_cv_have_gettext=no
1689        fi
1690      fi
1691    ])
1692
1693    if test "$gt_cv_have_gettext" = "yes" ; then
1694      AC_DEFINE(ENABLE_NLS, 1,
1695        [always defined to indicate that i18n is enabled])
1696    fi
1697
1698    dnl Test whether we really found GNU xgettext.
1699    if test "$XGETTEXT" != ":"; then
1700      dnl If it is not GNU xgettext we define it as : so that the
1701      dnl Makefiles still can work.
1702      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1703        : ;
1704      else
1705        AC_MSG_RESULT(
1706          [found xgettext program is not GNU xgettext; ignore it])
1707        XGETTEXT=":"
1708      fi
1709    fi
1710
1711    # We need to process the po/ directory.
1712    POSUB=po
1713
1714    AC_OUTPUT_COMMANDS(
1715      [case "$CONFIG_FILES" in *po/Makefile.in*)
1716        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1717      esac])
1718
1719    dnl These rules are solely for the distribution goal.  While doing this
1720    dnl we only have to keep exactly one list of the available catalogs
1721    dnl in configure.in.
1722    for lang in $ALL_LINGUAS; do
1723      GMOFILES="$GMOFILES $lang.gmo"
1724      POFILES="$POFILES $lang.po"
1725    done
1726
1727    dnl Make all variables we use known to autoconf.
1728    AC_SUBST(CATALOGS)
1729    AC_SUBST(CATOBJEXT)
1730    AC_SUBST(DATADIRNAME)
1731    AC_SUBST(GMOFILES)
1732    AC_SUBST(INSTOBJEXT)
1733    AC_SUBST(INTLLIBS)
1734    AC_SUBST(PO_IN_DATADIR_TRUE)
1735    AC_SUBST(PO_IN_DATADIR_FALSE)
1736    AC_SUBST(POFILES)
1737    AC_SUBST(POSUB)
1738  ])
1739
1740# AM_GLIB_GNU_GETTEXT
1741# -------------------
1742# Do checks necessary for use of gettext. If a suitable implementation
1743# of gettext is found in either in libintl or in the C library,
1744# it will set INTLLIBS to the libraries needed for use of gettext
1745# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1746# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1747# on various variables needed by the Makefile.in.in installed by
1748# glib-gettextize.
1749dnl
1750glib_DEFUN([GLIB_GNU_GETTEXT],
1751  [AC_REQUIRE([AC_PROG_CC])dnl
1752   AC_REQUIRE([AC_HEADER_STDC])dnl
1753   
1754   GLIB_LC_MESSAGES
1755   GLIB_WITH_NLS
1756
1757   if test "$gt_cv_have_gettext" = "yes"; then
1758     if test "x$ALL_LINGUAS" = "x"; then
1759       LINGUAS=
1760     else
1761       AC_MSG_CHECKING(for catalogs to be installed)
1762       NEW_LINGUAS=
1763       for presentlang in $ALL_LINGUAS; do
1764         useit=no
1765         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1766           desiredlanguages="$LINGUAS"
1767         else
1768           desiredlanguages="$ALL_LINGUAS"
1769         fi
1770         for desiredlang in $desiredlanguages; do
1771           # Use the presentlang catalog if desiredlang is
1772           #   a. equal to presentlang, or
1773           #   b. a variant of presentlang (because in this case,
1774           #      presentlang can be used as a fallback for messages
1775           #      which are not translated in the desiredlang catalog).
1776           case "$desiredlang" in
1777             "$presentlang"*) useit=yes;;
1778           esac
1779         done
1780         if test $useit = yes; then
1781           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1782         fi
1783       done
1784       LINGUAS=$NEW_LINGUAS
1785       AC_MSG_RESULT($LINGUAS)
1786     fi
1787
1788     dnl Construct list of names of catalog files to be constructed.
1789     if test -n "$LINGUAS"; then
1790       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1791     fi
1792   fi
1793
1794   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1795   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1796   dnl Try to locate is.
1797   MKINSTALLDIRS=
1798   if test -n "$ac_aux_dir"; then
1799     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1800   fi
1801   if test -z "$MKINSTALLDIRS"; then
1802     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1803   fi
1804   AC_SUBST(MKINSTALLDIRS)
1805
1806   dnl Generate list of files to be processed by xgettext which will
1807   dnl be included in po/Makefile.
1808   test -d po || mkdir po
1809   if test "x$srcdir" != "x."; then
1810     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1811       posrcprefix="$srcdir/"
1812     else
1813       posrcprefix="../$srcdir/"
1814     fi
1815   else
1816     posrcprefix="../"
1817   fi
1818   rm -f po/POTFILES
1819   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1820        < $srcdir/po/POTFILES.in > po/POTFILES
1821  ])
1822
1823# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1824# -------------------------------
1825# Define VARIABLE to the location where catalog files will
1826# be installed by po/Makefile.
1827glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1828[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1829glib_save_prefix="$prefix"
1830glib_save_exec_prefix="$exec_prefix"
1831test "x$prefix" = xNONE && prefix=$ac_default_prefix
1832test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1833if test "x$CATOBJEXT" = "x.mo" ; then
1834  localedir=`eval echo "${libdir}/locale"`
1835else
1836  localedir=`eval echo "${datadir}/locale"`
1837fi
1838prefix="$glib_save_prefix"
1839exec_prefix="$glib_save_exec_prefix"
1840AC_DEFINE_UNQUOTED($1, "$localedir",
1841  [Define the location where the catalogs will be installed])
1842])
1843
1844dnl
1845dnl Now the definitions that aclocal will find
1846dnl
1847ifdef(glib_configure_in,[],[
1848AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1849AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1850])dnl
1851
1852
1853dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1854# serial 1 IT_PROG_INTLTOOL
1855AC_DEFUN([IT_PROG_INTLTOOL],
1856[
1857
1858if test -n "$1"; then
1859    AC_MSG_CHECKING(for intltool >= $1)
1860
1861    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'`
1862    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }'  < ${ac_aux_dir}/intltool-update.in`
1863    changequote({{,}})
1864    INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${ac_aux_dir}/intltool-update.in`
1865    changequote([,])
1866
1867    if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
1868        AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1869    else
1870        AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool $1 or later.])
1871        exit 1
1872    fi
1873fi
1874
1875  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1876INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1877     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1878     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1879      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
1880     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1881   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1882    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1883INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1884       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1885      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1886      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
1887      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1888      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1889    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1890  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1891    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1892
1893AC_SUBST(INTLTOOL_DESKTOP_RULE)
1894AC_SUBST(INTLTOOL_DIRECTORY_RULE)
1895AC_SUBST(INTLTOOL_KEYS_RULE)
1896AC_SUBST(INTLTOOL_PROP_RULE)
1897AC_SUBST(INTLTOOL_OAF_RULE)
1898AC_SUBST(INTLTOOL_PONG_RULE)
1899AC_SUBST(INTLTOOL_SERVER_RULE)
1900AC_SUBST(INTLTOOL_SHEET_RULE)
1901AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
1902AC_SUBST(INTLTOOL_UI_RULE)
1903AC_SUBST(INTLTOOL_XAM_RULE)
1904AC_SUBST(INTLTOOL_KBD_RULE)
1905AC_SUBST(INTLTOOL_XML_RULE)
1906AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1907AC_SUBST(INTLTOOL_CAVES_RULE)
1908AC_SUBST(INTLTOOL_SCHEMAS_RULE)
1909AC_SUBST(INTLTOOL_THEME_RULE)
1910
1911# Use the tools built into the package, not the ones that are installed.
1912
1913INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
1914INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
1915INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
1916
1917AC_SUBST(INTLTOOL_EXTRACT)
1918AC_SUBST(INTLTOOL_MERGE)
1919AC_SUBST(INTLTOOL_UPDATE)
1920
1921AC_PATH_PROG(INTLTOOL_PERL, perl)
1922if test -z "$INTLTOOL_PERL"; then
1923   AC_MSG_ERROR([perl not found; required for intltool])
1924fi
1925if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
1926   AC_MSG_ERROR([perl 5.x required for intltool])
1927fi
1928if test "x$2" != "xno-xml"; then
1929   AC_MSG_CHECKING([for XML::Parser])
1930   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1931       AC_MSG_RESULT([ok])
1932   else
1933       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1934   fi
1935fi
1936
1937AC_PATH_PROG(ICONV, iconv, iconv)
1938AC_PATH_PROG(MSGFMT, msgfmt, msgfmt)
1939AC_PATH_PROG(MSGMERGE, msgmerge, msgmerge)
1940AC_PATH_PROG(XGETTEXT, xgettext, xgettext)
1941
1942# Remove file type tags (using []) from po/POTFILES.
1943
1944ifdef([AC_DIVERSION_ICMDS],[
1945  AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
1946      changequote(,)
1947      mv -f po/POTFILES po/POTFILES.tmp
1948      sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
1949      rm -f po/POTFILES.tmp
1950      changequote([,])
1951  AC_DIVERT_POP()
1952],[
1953  ifdef([AC_CONFIG_COMMANDS_PRE],[
1954    AC_CONFIG_COMMANDS_PRE([
1955        changequote(,)
1956        mv -f po/POTFILES po/POTFILES.tmp
1957        sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
1958        rm -f po/POTFILES.tmp
1959        changequote([,])
1960    ])
1961  ])
1962
1963if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
1964  # Keeping the `.' argument allows $(mkdir_p) to be used without
1965  # argument.  Indeed, we sometimes output rules like
1966  #   $(mkdir_p) $(somedir)
1967  # where $(somedir) is conditionally defined.
1968  # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
1969  # expensive solution, as it forces Make to start a sub-shell.)
1970  mkdir_p='mkdir -p -- .'
1971else
1972  # On NextStep and OpenStep, the `mkdir' command does not
1973  # recognize any option.  It will interpret all options as
1974  # directories to create, and then abort because `.' already
1975  # exists.
1976  for d in ./-p ./--version;
1977  do
1978    test -d $d && rmdir $d
1979  done
1980  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
1981  if test -f "$ac_aux_dir/mkinstalldirs"; then
1982    mkdir_p='$(mkinstalldirs)'
1983  else
1984    mkdir_p='$(install_sh) -d'
1985  fi
1986fi
1987AC_SUBST([mkdir_p])
1988])
1989
1990# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
1991
1992AC_CONFIG_COMMANDS([intltool], [
1993
1994intltool_edit="-e 's:@INTLTOOL_EXTRACT@:`pwd`/intltool-extract:g' \
1995               -e 's:@INTLTOOL_ICONV@:${ICONV}:g' \
1996               -e 's:@INTLTOOL_MSGFMT@:${MSGFMT}:g' \
1997               -e 's:@INTLTOOL_MSGMERGE@:${MSGMERGE}:g' \
1998               -e 's:@INTLTOOL_XGETTEXT@:${XGETTEXT}:g' \
1999               -e 's:@INTLTOOL_PERL@:${INTLTOOL_PERL}:g'"
2000
2001eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \
2002  > intltool-extract.out
2003if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
2004  rm -f intltool-extract.out
2005else
2006  mv -f intltool-extract.out intltool-extract
2007fi
2008chmod ugo+x intltool-extract
2009chmod u+w intltool-extract
2010
2011eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \
2012  > intltool-merge.out
2013if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
2014  rm -f intltool-merge.out
2015else
2016  mv -f intltool-merge.out intltool-merge
2017fi
2018chmod ugo+x intltool-merge
2019chmod u+w intltool-merge
2020
2021eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \
2022  > intltool-update.out
2023if cmp -s intltool-update intltool-update.out 2>/dev/null; then
2024  rm -f intltool-update.out
2025else
2026  mv -f intltool-update.out intltool-update
2027fi
2028chmod ugo+x intltool-update
2029chmod u+w intltool-update
2030
2031], INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir}
2032INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${ICONV}'
2033MSGFMT='${MSGFMT}' MSGMERGE='${MSGMERGE}' XGETTEXT='${XGETTEXT}')
2034
2035])
2036
2037# deprecated macros
2038AC_DEFUN([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL($@)])
2039
2040
2041
2042dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
2043dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
2044dnl also defines GSTUFF_PKG_ERRORS on error
2045AC_DEFUN(PKG_CHECK_MODULES, [
2046  succeeded=no
2047
2048  if test -z "$PKG_CONFIG"; then
2049    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
2050  fi
2051
2052  if test "$PKG_CONFIG" = "no" ; then
2053     echo "*** The pkg-config script could not be found. Make sure it is"
2054     echo "*** in your path, or set the PKG_CONFIG environment variable"
2055     echo "*** to the full path to pkg-config."
2056     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
2057  else
2058     PKG_CONFIG_MIN_VERSION=0.9.0
2059     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
2060        AC_MSG_CHECKING(for $2)
2061
2062        if $PKG_CONFIG --exists "$2" ; then
2063            AC_MSG_RESULT(yes)
2064            succeeded=yes
2065
2066            AC_MSG_CHECKING($1_CFLAGS)
2067            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
2068            AC_MSG_RESULT($$1_CFLAGS)
2069
2070            AC_MSG_CHECKING($1_LIBS)
2071            $1_LIBS=`$PKG_CONFIG --libs "$2"`
2072            AC_MSG_RESULT($$1_LIBS)
2073        else
2074            $1_CFLAGS=""
2075            $1_LIBS=""
2076            ## If we have a custom action on failure, don't print errors, but
2077            ## do set a variable so people can do so.
2078            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
2079            ifelse([$4], ,echo $$1_PKG_ERRORS,)
2080        fi
2081
2082        AC_SUBST($1_CFLAGS)
2083        AC_SUBST($1_LIBS)
2084     else
2085        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
2086        echo "*** See http://www.freedesktop.org/software/pkgconfig"
2087     fi
2088  fi
2089
2090  if test $succeeded = yes; then
2091     ifelse([$3], , :, [$3])
2092  else
2093     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
2094  fi
2095])
2096
2097
2098
2099dnl AM_GCONF_SOURCE_2
2100dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
2101dnl  (i.e. pass to gconftool-2
2102dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
2103dnl  you should install foo.schemas files
2104dnl
2105
2106AC_DEFUN([AM_GCONF_SOURCE_2],
2107[
2108  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
2109    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
2110  else
2111    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
2112  fi
2113
2114  AC_ARG_WITH(gconf-source,
2115  [  --with-gconf-source=sourceaddress      Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
2116
2117  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
2118  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
2119
2120  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
2121    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
2122  fi
2123
2124  AC_ARG_WITH(gconf-schema-file-dir,
2125  [  --with-gconf-schema-file-dir=dir        Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
2126
2127  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
2128  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
2129
2130  AC_ARG_ENABLE(schemas-install,
2131     [  --disable-schemas-install       Disable the schemas installation],
2132     [case "${enableval}" in
2133       yes) schemas_install=true ;;
2134       no)  schemas_install=false ;;
2135       *) AC_MSG_ERROR(bad value ${enableval} for --disable-schemas-install) ;;
2136     esac],[schemas_install=true])
2137     AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$schemas_install = xtrue)
2138])
2139
Note: See TracBrowser for help on using the repository browser.