Search
lxdream.org :: lxdream/aclocal.m4
lxdream 0.9.1
released Jun 29
Download Now
filename aclocal.m4
changeset 571:9bc09948d0f2
prev360:dff4a3bbac0c
next658:f5926310bfbe
author nkeynes
date Thu Jan 31 09:35:01 2008 +0000 (16 years ago)
permissions -rw-r--r--
last change Update release notes for 0.8.3
file annotate diff log raw
nkeynes@1
     1
# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
nkeynes@1
     2
nkeynes@1
     3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
nkeynes@1
     4
# Free Software Foundation, Inc.
nkeynes@1
     5
# This file is free software; the Free Software Foundation
nkeynes@1
     6
# gives unlimited permission to copy and/or distribute it,
nkeynes@1
     7
# with or without modifications, as long as this notice is preserved.
nkeynes@1
     8
nkeynes@1
     9
# This program is distributed in the hope that it will be useful,
nkeynes@1
    10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
nkeynes@1
    11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
nkeynes@1
    12
# PARTICULAR PURPOSE.
nkeynes@1
    13
nkeynes@1
    14
# Do all the work for Automake.                            -*- Autoconf -*-
nkeynes@1
    15
nkeynes@1
    16
# This macro actually does too much some checks are only needed if
nkeynes@1
    17
# your package does certain things.  But this isn't really a big deal.
nkeynes@1
    18
nkeynes@1
    19
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
nkeynes@1
    20
# Free Software Foundation, Inc.
nkeynes@1
    21
nkeynes@1
    22
# This program is free software; you can redistribute it and/or modify
nkeynes@1
    23
# it under the terms of the GNU General Public License as published by
nkeynes@1
    24
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
    25
# any later version.
nkeynes@1
    26
nkeynes@1
    27
# This program is distributed in the hope that it will be useful,
nkeynes@1
    28
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
    29
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
    30
# GNU General Public License for more details.
nkeynes@1
    31
nkeynes@1
    32
# You should have received a copy of the GNU General Public License
nkeynes@1
    33
# along with this program; if not, write to the Free Software
nkeynes@1
    34
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
    35
# 02111-1307, USA.
nkeynes@1
    36
nkeynes@1
    37
# serial 10
nkeynes@1
    38
nkeynes@1
    39
AC_PREREQ([2.54])
nkeynes@1
    40
nkeynes@1
    41
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
nkeynes@1
    42
# the ones we care about.
nkeynes@1
    43
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
nkeynes@1
    44
nkeynes@1
    45
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
nkeynes@1
    46
# AM_INIT_AUTOMAKE([OPTIONS])
nkeynes@1
    47
# -----------------------------------------------
nkeynes@1
    48
# The call with PACKAGE and VERSION arguments is the old style
nkeynes@1
    49
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
nkeynes@1
    50
# and VERSION should now be passed to AC_INIT and removed from
nkeynes@1
    51
# the call to AM_INIT_AUTOMAKE.
nkeynes@1
    52
# We support both call styles for the transition.  After
nkeynes@1
    53
# the next Automake release, Autoconf can make the AC_INIT
nkeynes@1
    54
# arguments mandatory, and then we can depend on a new Autoconf
nkeynes@1
    55
# release and drop the old call support.
nkeynes@1
    56
AC_DEFUN([AM_INIT_AUTOMAKE],
nkeynes@1
    57
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
nkeynes@1
    58
 AC_REQUIRE([AC_PROG_INSTALL])dnl
nkeynes@1
    59
# test to see if srcdir already configured
nkeynes@1
    60
if test "`cd $srcdir && pwd`" != "`pwd`" &&
nkeynes@1
    61
   test -f $srcdir/config.status; then
nkeynes@1
    62
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
nkeynes@1
    63
fi
nkeynes@1
    64
nkeynes@1
    65
# test whether we have cygpath
nkeynes@1
    66
if test -z "$CYGPATH_W"; then
nkeynes@1
    67
  if (cygpath --version) >/dev/null 2>/dev/null; then
nkeynes@1
    68
    CYGPATH_W='cygpath -w'
nkeynes@1
    69
  else
nkeynes@1
    70
    CYGPATH_W=echo
nkeynes@1
    71
  fi
nkeynes@1
    72
fi
nkeynes@1
    73
AC_SUBST([CYGPATH_W])
nkeynes@1
    74
nkeynes@1
    75
# Define the identity of the package.
nkeynes@1
    76
dnl Distinguish between old-style and new-style calls.
nkeynes@1
    77
m4_ifval([$2],
nkeynes@1
    78
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
nkeynes@1
    79
 AC_SUBST([PACKAGE], [$1])dnl
nkeynes@1
    80
 AC_SUBST([VERSION], [$2])],
nkeynes@1
    81
[_AM_SET_OPTIONS([$1])dnl
nkeynes@1
    82
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
nkeynes@1
    83
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
nkeynes@1
    84
nkeynes@1
    85
_AM_IF_OPTION([no-define],,
nkeynes@1
    86
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
nkeynes@1
    87
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
nkeynes@1
    88
nkeynes@1
    89
# Some tools Automake needs.
nkeynes@1
    90
AC_REQUIRE([AM_SANITY_CHECK])dnl
nkeynes@1
    91
AC_REQUIRE([AC_ARG_PROGRAM])dnl
nkeynes@1
    92
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
nkeynes@1
    93
AM_MISSING_PROG(AUTOCONF, autoconf)
nkeynes@1
    94
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
nkeynes@1
    95
AM_MISSING_PROG(AUTOHEADER, autoheader)
nkeynes@1
    96
AM_MISSING_PROG(MAKEINFO, makeinfo)
nkeynes@1
    97
AM_MISSING_PROG(AMTAR, tar)
nkeynes@1
    98
AM_PROG_INSTALL_SH
nkeynes@1
    99
AM_PROG_INSTALL_STRIP
nkeynes@1
   100
# We need awk for the "check" target.  The system "awk" is bad on
nkeynes@1
   101
# some platforms.
nkeynes@1
   102
AC_REQUIRE([AC_PROG_AWK])dnl
nkeynes@1
   103
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
nkeynes@1
   104
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
nkeynes@1
   105
nkeynes@1
   106
_AM_IF_OPTION([no-dependencies],,
nkeynes@1
   107
[AC_PROVIDE_IFELSE([AC_PROG_CC],
nkeynes@1
   108
                  [_AM_DEPENDENCIES(CC)],
nkeynes@1
   109
                  [define([AC_PROG_CC],
nkeynes@1
   110
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
nkeynes@1
   111
AC_PROVIDE_IFELSE([AC_PROG_CXX],
nkeynes@1
   112
                  [_AM_DEPENDENCIES(CXX)],
nkeynes@1
   113
                  [define([AC_PROG_CXX],
nkeynes@1
   114
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
nkeynes@1
   115
])
nkeynes@1
   116
])
nkeynes@1
   117
nkeynes@1
   118
nkeynes@1
   119
# When config.status generates a header, we must update the stamp-h file.
nkeynes@1
   120
# This file resides in the same directory as the config header
nkeynes@1
   121
# that is generated.  The stamp files are numbered to have different names.
nkeynes@1
   122
nkeynes@1
   123
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
nkeynes@1
   124
# loop where config.status creates the headers, so we can generate
nkeynes@1
   125
# our stamp files there.
nkeynes@1
   126
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
nkeynes@1
   127
[# Compute $1's index in $config_headers.
nkeynes@1
   128
_am_stamp_count=1
nkeynes@1
   129
for _am_header in $config_headers :; do
nkeynes@1
   130
  case $_am_header in
nkeynes@1
   131
    $1 | $1:* )
nkeynes@1
   132
      break ;;
nkeynes@1
   133
    * )
nkeynes@1
   134
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
nkeynes@1
   135
  esac
nkeynes@1
   136
done
nkeynes@1
   137
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
nkeynes@1
   138
nkeynes@1
   139
# Copyright 2002  Free Software Foundation, Inc.
nkeynes@1
   140
nkeynes@1
   141
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   142
# it under the terms of the GNU General Public License as published by
nkeynes@1
   143
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   144
# any later version.
nkeynes@1
   145
nkeynes@1
   146
# This program is distributed in the hope that it will be useful,
nkeynes@1
   147
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   148
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   149
# GNU General Public License for more details.
nkeynes@1
   150
nkeynes@1
   151
# You should have received a copy of the GNU General Public License
nkeynes@1
   152
# along with this program; if not, write to the Free Software
nkeynes@1
   153
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   154
nkeynes@1
   155
# AM_AUTOMAKE_VERSION(VERSION)
nkeynes@1
   156
# ----------------------------
nkeynes@1
   157
# Automake X.Y traces this macro to ensure aclocal.m4 has been
nkeynes@1
   158
# generated from the m4 files accompanying Automake X.Y.
nkeynes@1
   159
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
nkeynes@1
   160
nkeynes@1
   161
# AM_SET_CURRENT_AUTOMAKE_VERSION
nkeynes@1
   162
# -------------------------------
nkeynes@1
   163
# Call AM_AUTOMAKE_VERSION so it can be traced.
nkeynes@1
   164
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
nkeynes@1
   165
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
nkeynes@1
   166
	 [AM_AUTOMAKE_VERSION([1.7.9])])
nkeynes@1
   167
nkeynes@1
   168
# Helper functions for option handling.                    -*- Autoconf -*-
nkeynes@1
   169
nkeynes@1
   170
# Copyright 2001, 2002  Free Software Foundation, Inc.
nkeynes@1
   171
nkeynes@1
   172
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   173
# it under the terms of the GNU General Public License as published by
nkeynes@1
   174
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   175
# any later version.
nkeynes@1
   176
nkeynes@1
   177
# This program is distributed in the hope that it will be useful,
nkeynes@1
   178
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   179
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   180
# GNU General Public License for more details.
nkeynes@1
   181
nkeynes@1
   182
# You should have received a copy of the GNU General Public License
nkeynes@1
   183
# along with this program; if not, write to the Free Software
nkeynes@1
   184
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   185
# 02111-1307, USA.
nkeynes@1
   186
nkeynes@1
   187
# serial 2
nkeynes@1
   188
nkeynes@1
   189
# _AM_MANGLE_OPTION(NAME)
nkeynes@1
   190
# -----------------------
nkeynes@1
   191
AC_DEFUN([_AM_MANGLE_OPTION],
nkeynes@1
   192
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
nkeynes@1
   193
nkeynes@1
   194
# _AM_SET_OPTION(NAME)
nkeynes@1
   195
# ------------------------------
nkeynes@1
   196
# Set option NAME.  Presently that only means defining a flag for this option.
nkeynes@1
   197
AC_DEFUN([_AM_SET_OPTION],
nkeynes@1
   198
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
nkeynes@1
   199
nkeynes@1
   200
# _AM_SET_OPTIONS(OPTIONS)
nkeynes@1
   201
# ----------------------------------
nkeynes@1
   202
# OPTIONS is a space-separated list of Automake options.
nkeynes@1
   203
AC_DEFUN([_AM_SET_OPTIONS],
nkeynes@1
   204
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
nkeynes@1
   205
nkeynes@1
   206
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
nkeynes@1
   207
# -------------------------------------------
nkeynes@1
   208
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
nkeynes@1
   209
AC_DEFUN([_AM_IF_OPTION],
nkeynes@1
   210
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
nkeynes@1
   211
nkeynes@1
   212
#
nkeynes@1
   213
# Check to make sure that the build environment is sane.
nkeynes@1
   214
#
nkeynes@1
   215
nkeynes@1
   216
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
nkeynes@1
   217
nkeynes@1
   218
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   219
# it under the terms of the GNU General Public License as published by
nkeynes@1
   220
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   221
# any later version.
nkeynes@1
   222
nkeynes@1
   223
# This program is distributed in the hope that it will be useful,
nkeynes@1
   224
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   225
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   226
# GNU General Public License for more details.
nkeynes@1
   227
nkeynes@1
   228
# You should have received a copy of the GNU General Public License
nkeynes@1
   229
# along with this program; if not, write to the Free Software
nkeynes@1
   230
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   231
# 02111-1307, USA.
nkeynes@1
   232
nkeynes@1
   233
# serial 3
nkeynes@1
   234
nkeynes@1
   235
# AM_SANITY_CHECK
nkeynes@1
   236
# ---------------
nkeynes@1
   237
AC_DEFUN([AM_SANITY_CHECK],
nkeynes@1
   238
[AC_MSG_CHECKING([whether build environment is sane])
nkeynes@1
   239
# Just in case
nkeynes@1
   240
sleep 1
nkeynes@1
   241
echo timestamp > conftest.file
nkeynes@1
   242
# Do `set' in a subshell so we don't clobber the current shell's
nkeynes@1
   243
# arguments.  Must try -L first in case configure is actually a
nkeynes@1
   244
# symlink; some systems play weird games with the mod time of symlinks
nkeynes@1
   245
# (eg FreeBSD returns the mod time of the symlink's containing
nkeynes@1
   246
# directory).
nkeynes@1
   247
if (
nkeynes@1
   248
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
nkeynes@1
   249
   if test "$[*]" = "X"; then
nkeynes@1
   250
      # -L didn't work.
nkeynes@1
   251
      set X `ls -t $srcdir/configure conftest.file`
nkeynes@1
   252
   fi
nkeynes@1
   253
   rm -f conftest.file
nkeynes@1
   254
   if test "$[*]" != "X $srcdir/configure conftest.file" \
nkeynes@1
   255
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
nkeynes@1
   256
nkeynes@1
   257
      # If neither matched, then we have a broken ls.  This can happen
nkeynes@1
   258
      # if, for instance, CONFIG_SHELL is bash and it inherits a
nkeynes@1
   259
      # broken ls alias from the environment.  This has actually
nkeynes@1
   260
      # happened.  Such a system could not be considered "sane".
nkeynes@1
   261
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
nkeynes@1
   262
alias in your environment])
nkeynes@1
   263
   fi
nkeynes@1
   264
nkeynes@1
   265
   test "$[2]" = conftest.file
nkeynes@1
   266
   )
nkeynes@1
   267
then
nkeynes@1
   268
   # Ok.
nkeynes@1
   269
   :
nkeynes@1
   270
else
nkeynes@1
   271
   AC_MSG_ERROR([newly created file is older than distributed files!
nkeynes@1
   272
Check your system clock])
nkeynes@1
   273
fi
nkeynes@1
   274
AC_MSG_RESULT(yes)])
nkeynes@1
   275
nkeynes@1
   276
#  -*- Autoconf -*-
nkeynes@1
   277
nkeynes@1
   278
nkeynes@1
   279
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
nkeynes@1
   280
nkeynes@1
   281
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   282
# it under the terms of the GNU General Public License as published by
nkeynes@1
   283
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   284
# any later version.
nkeynes@1
   285
nkeynes@1
   286
# This program is distributed in the hope that it will be useful,
nkeynes@1
   287
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   288
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   289
# GNU General Public License for more details.
nkeynes@1
   290
nkeynes@1
   291
# You should have received a copy of the GNU General Public License
nkeynes@1
   292
# along with this program; if not, write to the Free Software
nkeynes@1
   293
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   294
# 02111-1307, USA.
nkeynes@1
   295
nkeynes@1
   296
# serial 3
nkeynes@1
   297
nkeynes@1
   298
# AM_MISSING_PROG(NAME, PROGRAM)
nkeynes@1
   299
# ------------------------------
nkeynes@1
   300
AC_DEFUN([AM_MISSING_PROG],
nkeynes@1
   301
[AC_REQUIRE([AM_MISSING_HAS_RUN])
nkeynes@1
   302
$1=${$1-"${am_missing_run}$2"}
nkeynes@1
   303
AC_SUBST($1)])
nkeynes@1
   304
nkeynes@1
   305
nkeynes@1
   306
# AM_MISSING_HAS_RUN
nkeynes@1
   307
# ------------------
nkeynes@1
   308
# Define MISSING if not defined so far and test if it supports --run.
nkeynes@1
   309
# If it does, set am_missing_run to use it, otherwise, to nothing.
nkeynes@1
   310
AC_DEFUN([AM_MISSING_HAS_RUN],
nkeynes@1
   311
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
nkeynes@1
   312
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
nkeynes@1
   313
# Use eval to expand $SHELL
nkeynes@1
   314
if eval "$MISSING --run true"; then
nkeynes@1
   315
  am_missing_run="$MISSING --run "
nkeynes@1
   316
else
nkeynes@1
   317
  am_missing_run=
nkeynes@1
   318
  AC_MSG_WARN([`missing' script is too old or missing])
nkeynes@1
   319
fi
nkeynes@1
   320
])
nkeynes@1
   321
nkeynes@1
   322
# AM_AUX_DIR_EXPAND
nkeynes@1
   323
nkeynes@1
   324
# Copyright 2001 Free Software Foundation, Inc.
nkeynes@1
   325
nkeynes@1
   326
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   327
# it under the terms of the GNU General Public License as published by
nkeynes@1
   328
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   329
# any later version.
nkeynes@1
   330
nkeynes@1
   331
# This program is distributed in the hope that it will be useful,
nkeynes@1
   332
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   333
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   334
# GNU General Public License for more details.
nkeynes@1
   335
nkeynes@1
   336
# You should have received a copy of the GNU General Public License
nkeynes@1
   337
# along with this program; if not, write to the Free Software
nkeynes@1
   338
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   339
# 02111-1307, USA.
nkeynes@1
   340
nkeynes@1
   341
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
nkeynes@1
   342
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
nkeynes@1
   343
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
nkeynes@1
   344
#
nkeynes@1
   345
# Of course, Automake must honor this variable whenever it calls a
nkeynes@1
   346
# tool from the auxiliary directory.  The problem is that $srcdir (and
nkeynes@1
   347
# therefore $ac_aux_dir as well) can be either absolute or relative,
nkeynes@1
   348
# depending on how configure is run.  This is pretty annoying, since
nkeynes@1
   349
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
nkeynes@1
   350
# source directory, any form will work fine, but in subdirectories a
nkeynes@1
   351
# relative path needs to be adjusted first.
nkeynes@1
   352
#
nkeynes@1
   353
# $ac_aux_dir/missing
nkeynes@1
   354
#    fails when called from a subdirectory if $ac_aux_dir is relative
nkeynes@1
   355
# $top_srcdir/$ac_aux_dir/missing
nkeynes@1
   356
#    fails if $ac_aux_dir is absolute,
nkeynes@1
   357
#    fails when called from a subdirectory in a VPATH build with
nkeynes@1
   358
#          a relative $ac_aux_dir
nkeynes@1
   359
#
nkeynes@1
   360
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
nkeynes@1
   361
# are both prefixed by $srcdir.  In an in-source build this is usually
nkeynes@1
   362
# harmless because $srcdir is `.', but things will broke when you
nkeynes@1
   363
# start a VPATH build or use an absolute $srcdir.
nkeynes@1
   364
#
nkeynes@1
   365
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
nkeynes@1
   366
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
nkeynes@1
   367
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
nkeynes@1
   368
# and then we would define $MISSING as
nkeynes@1
   369
#   MISSING="\${SHELL} $am_aux_dir/missing"
nkeynes@1
   370
# This will work as long as MISSING is not called from configure, because
nkeynes@1
   371
# unfortunately $(top_srcdir) has no meaning in configure.
nkeynes@1
   372
# However there are other variables, like CC, which are often used in
nkeynes@1
   373
# configure, and could therefore not use this "fixed" $ac_aux_dir.
nkeynes@1
   374
#
nkeynes@1
   375
# Another solution, used here, is to always expand $ac_aux_dir to an
nkeynes@1
   376
# absolute PATH.  The drawback is that using absolute paths prevent a
nkeynes@1
   377
# configured tree to be moved without reconfiguration.
nkeynes@1
   378
nkeynes@1
   379
# Rely on autoconf to set up CDPATH properly.
nkeynes@1
   380
AC_PREREQ([2.50])
nkeynes@1
   381
nkeynes@1
   382
AC_DEFUN([AM_AUX_DIR_EXPAND], [
nkeynes@1
   383
# expand $ac_aux_dir to an absolute path
nkeynes@1
   384
am_aux_dir=`cd $ac_aux_dir && pwd`
nkeynes@1
   385
])
nkeynes@1
   386
nkeynes@1
   387
# AM_PROG_INSTALL_SH
nkeynes@1
   388
# ------------------
nkeynes@1
   389
# Define $install_sh.
nkeynes@1
   390
nkeynes@1
   391
# Copyright 2001 Free Software Foundation, Inc.
nkeynes@1
   392
nkeynes@1
   393
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   394
# it under the terms of the GNU General Public License as published by
nkeynes@1
   395
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   396
# any later version.
nkeynes@1
   397
nkeynes@1
   398
# This program is distributed in the hope that it will be useful,
nkeynes@1
   399
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   400
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   401
# GNU General Public License for more details.
nkeynes@1
   402
nkeynes@1
   403
# You should have received a copy of the GNU General Public License
nkeynes@1
   404
# along with this program; if not, write to the Free Software
nkeynes@1
   405
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   406
# 02111-1307, USA.
nkeynes@1
   407
nkeynes@1
   408
AC_DEFUN([AM_PROG_INSTALL_SH],
nkeynes@1
   409
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
nkeynes@1
   410
install_sh=${install_sh-"$am_aux_dir/install-sh"}
nkeynes@1
   411
AC_SUBST(install_sh)])
nkeynes@1
   412
nkeynes@1
   413
# AM_PROG_INSTALL_STRIP
nkeynes@1
   414
nkeynes@1
   415
# Copyright 2001 Free Software Foundation, Inc.
nkeynes@1
   416
nkeynes@1
   417
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   418
# it under the terms of the GNU General Public License as published by
nkeynes@1
   419
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   420
# any later version.
nkeynes@1
   421
nkeynes@1
   422
# This program is distributed in the hope that it will be useful,
nkeynes@1
   423
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   424
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   425
# GNU General Public License for more details.
nkeynes@1
   426
nkeynes@1
   427
# You should have received a copy of the GNU General Public License
nkeynes@1
   428
# along with this program; if not, write to the Free Software
nkeynes@1
   429
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   430
# 02111-1307, USA.
nkeynes@1
   431
nkeynes@1
   432
# One issue with vendor `install' (even GNU) is that you can't
nkeynes@1
   433
# specify the program used to strip binaries.  This is especially
nkeynes@1
   434
# annoying in cross-compiling environments, where the build's strip
nkeynes@1
   435
# is unlikely to handle the host's binaries.
nkeynes@1
   436
# Fortunately install-sh will honor a STRIPPROG variable, so we
nkeynes@1
   437
# always use install-sh in `make install-strip', and initialize
nkeynes@1
   438
# STRIPPROG with the value of the STRIP variable (set by the user).
nkeynes@1
   439
AC_DEFUN([AM_PROG_INSTALL_STRIP],
nkeynes@1
   440
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
nkeynes@1
   441
# Installed binaries are usually stripped using `strip' when the user
nkeynes@1
   442
# run `make install-strip'.  However `strip' might not be the right
nkeynes@1
   443
# tool to use in cross-compilation environments, therefore Automake
nkeynes@1
   444
# will honor the `STRIP' environment variable to overrule this program.
nkeynes@1
   445
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
nkeynes@1
   446
if test "$cross_compiling" != no; then
nkeynes@1
   447
  AC_CHECK_TOOL([STRIP], [strip], :)
nkeynes@1
   448
fi
nkeynes@1
   449
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
nkeynes@1
   450
AC_SUBST([INSTALL_STRIP_PROGRAM])])
nkeynes@1
   451
nkeynes@1
   452
#                                                          -*- Autoconf -*-
nkeynes@1
   453
# Copyright (C) 2003  Free Software Foundation, Inc.
nkeynes@1
   454
nkeynes@1
   455
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   456
# it under the terms of the GNU General Public License as published by
nkeynes@1
   457
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   458
# any later version.
nkeynes@1
   459
nkeynes@1
   460
# This program is distributed in the hope that it will be useful,
nkeynes@1
   461
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   462
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   463
# GNU General Public License for more details.
nkeynes@1
   464
nkeynes@1
   465
# You should have received a copy of the GNU General Public License
nkeynes@1
   466
# along with this program; if not, write to the Free Software
nkeynes@1
   467
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   468
# 02111-1307, USA.
nkeynes@1
   469
nkeynes@1
   470
# serial 1
nkeynes@1
   471
nkeynes@1
   472
# Check whether the underlying file-system supports filenames
nkeynes@1
   473
# with a leading dot.  For instance MS-DOS doesn't.
nkeynes@1
   474
AC_DEFUN([AM_SET_LEADING_DOT],
nkeynes@1
   475
[rm -rf .tst 2>/dev/null
nkeynes@1
   476
mkdir .tst 2>/dev/null
nkeynes@1
   477
if test -d .tst; then
nkeynes@1
   478
  am__leading_dot=.
nkeynes@1
   479
else
nkeynes@1
   480
  am__leading_dot=_
nkeynes@1
   481
fi
nkeynes@1
   482
rmdir .tst 2>/dev/null
nkeynes@1
   483
AC_SUBST([am__leading_dot])])
nkeynes@1
   484
nkeynes@1
   485
# serial 5						-*- Autoconf -*-
nkeynes@1
   486
nkeynes@1
   487
# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
nkeynes@1
   488
nkeynes@1
   489
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   490
# it under the terms of the GNU General Public License as published by
nkeynes@1
   491
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   492
# any later version.
nkeynes@1
   493
nkeynes@1
   494
# This program is distributed in the hope that it will be useful,
nkeynes@1
   495
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   496
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   497
# GNU General Public License for more details.
nkeynes@1
   498
nkeynes@1
   499
# You should have received a copy of the GNU General Public License
nkeynes@1
   500
# along with this program; if not, write to the Free Software
nkeynes@1
   501
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   502
# 02111-1307, USA.
nkeynes@1
   503
nkeynes@1
   504
nkeynes@1
   505
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
nkeynes@1
   506
# written in clear, in which case automake, when reading aclocal.m4,
nkeynes@1
   507
# will think it sees a *use*, and therefore will trigger all it's
nkeynes@1
   508
# C support machinery.  Also note that it means that autoscan, seeing
nkeynes@1
   509
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
nkeynes@1
   510
nkeynes@1
   511
nkeynes@1
   512
nkeynes@1
   513
# _AM_DEPENDENCIES(NAME)
nkeynes@1
   514
# ----------------------
nkeynes@1
   515
# See how the compiler implements dependency checking.
nkeynes@1
   516
# NAME is "CC", "CXX", "GCJ", or "OBJC".
nkeynes@1
   517
# We try a few techniques and use that to set a single cache variable.
nkeynes@1
   518
#
nkeynes@1
   519
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
nkeynes@1
   520
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
nkeynes@1
   521
# dependency, and given that the user is not expected to run this macro,
nkeynes@1
   522
# just rely on AC_PROG_CC.
nkeynes@1
   523
AC_DEFUN([_AM_DEPENDENCIES],
nkeynes@1
   524
[AC_REQUIRE([AM_SET_DEPDIR])dnl
nkeynes@1
   525
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
nkeynes@1
   526
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
nkeynes@1
   527
AC_REQUIRE([AM_DEP_TRACK])dnl
nkeynes@1
   528
nkeynes@1
   529
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
nkeynes@1
   530
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
nkeynes@1
   531
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
nkeynes@1
   532
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
nkeynes@1
   533
                   [depcc="$$1"   am_compiler_list=])
nkeynes@1
   534
nkeynes@1
   535
AC_CACHE_CHECK([dependency style of $depcc],
nkeynes@1
   536
               [am_cv_$1_dependencies_compiler_type],
nkeynes@1
   537
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
nkeynes@1
   538
  # We make a subdir and do the tests there.  Otherwise we can end up
nkeynes@1
   539
  # making bogus files that we don't know about and never remove.  For
nkeynes@1
   540
  # instance it was reported that on HP-UX the gcc test will end up
nkeynes@1
   541
  # making a dummy file named `D' -- because `-MD' means `put the output
nkeynes@1
   542
  # in D'.
nkeynes@1
   543
  mkdir conftest.dir
nkeynes@1
   544
  # Copy depcomp to subdir because otherwise we won't find it if we're
nkeynes@1
   545
  # using a relative directory.
nkeynes@1
   546
  cp "$am_depcomp" conftest.dir
nkeynes@1
   547
  cd conftest.dir
nkeynes@1
   548
  # We will build objects and dependencies in a subdirectory because
nkeynes@1
   549
  # it helps to detect inapplicable dependency modes.  For instance
nkeynes@1
   550
  # both Tru64's cc and ICC support -MD to output dependencies as a
nkeynes@1
   551
  # side effect of compilation, but ICC will put the dependencies in
nkeynes@1
   552
  # the current directory while Tru64 will put them in the object
nkeynes@1
   553
  # directory.
nkeynes@1
   554
  mkdir sub
nkeynes@1
   555
nkeynes@1
   556
  am_cv_$1_dependencies_compiler_type=none
nkeynes@1
   557
  if test "$am_compiler_list" = ""; then
nkeynes@1
   558
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
nkeynes@1
   559
  fi
nkeynes@1
   560
  for depmode in $am_compiler_list; do
nkeynes@1
   561
    # Setup a source with many dependencies, because some compilers
nkeynes@1
   562
    # like to wrap large dependency lists on column 80 (with \), and
nkeynes@1
   563
    # we should not choose a depcomp mode which is confused by this.
nkeynes@1
   564
    #
nkeynes@1
   565
    # We need to recreate these files for each test, as the compiler may
nkeynes@1
   566
    # overwrite some of them when testing with obscure command lines.
nkeynes@1
   567
    # This happens at least with the AIX C compiler.
nkeynes@1
   568
    : > sub/conftest.c
nkeynes@1
   569
    for i in 1 2 3 4 5 6; do
nkeynes@1
   570
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
nkeynes@1
   571
      : > sub/conftst$i.h
nkeynes@1
   572
    done
nkeynes@1
   573
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
nkeynes@1
   574
nkeynes@1
   575
    case $depmode in
nkeynes@1
   576
    nosideeffect)
nkeynes@1
   577
      # after this tag, mechanisms are not by side-effect, so they'll
nkeynes@1
   578
      # only be used when explicitly requested
nkeynes@1
   579
      if test "x$enable_dependency_tracking" = xyes; then
nkeynes@1
   580
	continue
nkeynes@1
   581
      else
nkeynes@1
   582
	break
nkeynes@1
   583
      fi
nkeynes@1
   584
      ;;
nkeynes@1
   585
    none) break ;;
nkeynes@1
   586
    esac
nkeynes@1
   587
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
nkeynes@1
   588
    # mode.  It turns out that the SunPro C++ compiler does not properly
nkeynes@1
   589
    # handle `-M -o', and we need to detect this.
nkeynes@1
   590
    if depmode=$depmode \
nkeynes@1
   591
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
nkeynes@1
   592
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
nkeynes@1
   593
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
nkeynes@1
   594
         >/dev/null 2>conftest.err &&
nkeynes@1
   595
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
nkeynes@1
   596
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
nkeynes@1
   597
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
nkeynes@1
   598
      # icc doesn't choke on unknown options, it will just issue warnings
nkeynes@1
   599
      # (even with -Werror).  So we grep stderr for any message
nkeynes@1
   600
      # that says an option was ignored.
nkeynes@1
   601
      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
nkeynes@1
   602
        am_cv_$1_dependencies_compiler_type=$depmode
nkeynes@1
   603
        break
nkeynes@1
   604
      fi
nkeynes@1
   605
    fi
nkeynes@1
   606
  done
nkeynes@1
   607
nkeynes@1
   608
  cd ..
nkeynes@1
   609
  rm -rf conftest.dir
nkeynes@1
   610
else
nkeynes@1
   611
  am_cv_$1_dependencies_compiler_type=none
nkeynes@1
   612
fi
nkeynes@1
   613
])
nkeynes@1
   614
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
nkeynes@1
   615
AM_CONDITIONAL([am__fastdep$1], [
nkeynes@1
   616
  test "x$enable_dependency_tracking" != xno \
nkeynes@1
   617
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
nkeynes@1
   618
])
nkeynes@1
   619
nkeynes@1
   620
nkeynes@1
   621
# AM_SET_DEPDIR
nkeynes@1
   622
# -------------
nkeynes@1
   623
# Choose a directory name for dependency files.
nkeynes@1
   624
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
nkeynes@1
   625
AC_DEFUN([AM_SET_DEPDIR],
nkeynes@1
   626
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
nkeynes@1
   627
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
nkeynes@1
   628
])
nkeynes@1
   629
nkeynes@1
   630
nkeynes@1
   631
# AM_DEP_TRACK
nkeynes@1
   632
# ------------
nkeynes@1
   633
AC_DEFUN([AM_DEP_TRACK],
nkeynes@1
   634
[AC_ARG_ENABLE(dependency-tracking,
nkeynes@1
   635
[  --disable-dependency-tracking Speeds up one-time builds
nkeynes@1
   636
  --enable-dependency-tracking  Do not reject slow dependency extractors])
nkeynes@1
   637
if test "x$enable_dependency_tracking" != xno; then
nkeynes@1
   638
  am_depcomp="$ac_aux_dir/depcomp"
nkeynes@1
   639
  AMDEPBACKSLASH='\'
nkeynes@1
   640
fi
nkeynes@1
   641
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
nkeynes@1
   642
AC_SUBST([AMDEPBACKSLASH])
nkeynes@1
   643
])
nkeynes@1
   644
nkeynes@1
   645
# Generate code to set up dependency tracking.   -*- Autoconf -*-
nkeynes@1
   646
nkeynes@1
   647
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
nkeynes@1
   648
nkeynes@1
   649
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   650
# it under the terms of the GNU General Public License as published by
nkeynes@1
   651
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   652
# any later version.
nkeynes@1
   653
nkeynes@1
   654
# This program is distributed in the hope that it will be useful,
nkeynes@1
   655
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   656
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   657
# GNU General Public License for more details.
nkeynes@1
   658
nkeynes@1
   659
# You should have received a copy of the GNU General Public License
nkeynes@1
   660
# along with this program; if not, write to the Free Software
nkeynes@1
   661
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   662
# 02111-1307, USA.
nkeynes@1
   663
nkeynes@1
   664
#serial 2
nkeynes@1
   665
nkeynes@1
   666
# _AM_OUTPUT_DEPENDENCY_COMMANDS
nkeynes@1
   667
# ------------------------------
nkeynes@1
   668
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
nkeynes@1
   669
[for mf in $CONFIG_FILES; do
nkeynes@1
   670
  # Strip MF so we end up with the name of the file.
nkeynes@1
   671
  mf=`echo "$mf" | sed -e 's/:.*$//'`
nkeynes@1
   672
  # Check whether this is an Automake generated Makefile or not.
nkeynes@1
   673
  # We used to match only the files named `Makefile.in', but
nkeynes@1
   674
  # some people rename them; so instead we look at the file content.
nkeynes@1
   675
  # Grep'ing the first line is not enough: some people post-process
nkeynes@1
   676
  # each Makefile.in and add a new line on top of each file to say so.
nkeynes@1
   677
  # So let's grep whole file.
nkeynes@1
   678
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
nkeynes@1
   679
    dirpart=`AS_DIRNAME("$mf")`
nkeynes@1
   680
  else
nkeynes@1
   681
    continue
nkeynes@1
   682
  fi
nkeynes@1
   683
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
nkeynes@1
   684
  # Extract the definition of DEP_FILES from the Makefile without
nkeynes@1
   685
  # running `make'.
nkeynes@1
   686
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
nkeynes@1
   687
  test -z "$DEPDIR" && continue
nkeynes@1
   688
  # When using ansi2knr, U may be empty or an underscore; expand it
nkeynes@1
   689
  U=`sed -n -e '/^U = / s///p' < "$mf"`
nkeynes@1
   690
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
nkeynes@1
   691
  # We invoke sed twice because it is the simplest approach to
nkeynes@1
   692
  # changing $(DEPDIR) to its actual value in the expansion.
nkeynes@1
   693
  for file in `sed -n -e '
nkeynes@1
   694
    /^DEP_FILES = .*\\\\$/ {
nkeynes@1
   695
      s/^DEP_FILES = //
nkeynes@1
   696
      :loop
nkeynes@1
   697
	s/\\\\$//
nkeynes@1
   698
	p
nkeynes@1
   699
	n
nkeynes@1
   700
	/\\\\$/ b loop
nkeynes@1
   701
      p
nkeynes@1
   702
    }
nkeynes@1
   703
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
nkeynes@1
   704
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
nkeynes@1
   705
    # Make sure the directory exists.
nkeynes@1
   706
    test -f "$dirpart/$file" && continue
nkeynes@1
   707
    fdir=`AS_DIRNAME(["$file"])`
nkeynes@1
   708
    AS_MKDIR_P([$dirpart/$fdir])
nkeynes@1
   709
    # echo "creating $dirpart/$file"
nkeynes@1
   710
    echo '# dummy' > "$dirpart/$file"
nkeynes@1
   711
  done
nkeynes@1
   712
done
nkeynes@1
   713
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
nkeynes@1
   714
nkeynes@1
   715
nkeynes@1
   716
# AM_OUTPUT_DEPENDENCY_COMMANDS
nkeynes@1
   717
# -----------------------------
nkeynes@1
   718
# This macro should only be invoked once -- use via AC_REQUIRE.
nkeynes@1
   719
#
nkeynes@1
   720
# This code is only required when automatic dependency tracking
nkeynes@1
   721
# is enabled.  FIXME.  This creates each `.P' file that we will
nkeynes@1
   722
# need in order to bootstrap the dependency handling code.
nkeynes@1
   723
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
nkeynes@1
   724
[AC_CONFIG_COMMANDS([depfiles],
nkeynes@1
   725
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
nkeynes@1
   726
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
nkeynes@1
   727
])
nkeynes@1
   728
nkeynes@1
   729
# Check to see how 'make' treats includes.	-*- Autoconf -*-
nkeynes@1
   730
nkeynes@1
   731
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
nkeynes@1
   732
nkeynes@1
   733
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   734
# it under the terms of the GNU General Public License as published by
nkeynes@1
   735
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   736
# any later version.
nkeynes@1
   737
nkeynes@1
   738
# This program is distributed in the hope that it will be useful,
nkeynes@1
   739
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   740
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   741
# GNU General Public License for more details.
nkeynes@1
   742
nkeynes@1
   743
# You should have received a copy of the GNU General Public License
nkeynes@1
   744
# along with this program; if not, write to the Free Software
nkeynes@1
   745
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   746
# 02111-1307, USA.
nkeynes@1
   747
nkeynes@1
   748
# serial 2
nkeynes@1
   749
nkeynes@1
   750
# AM_MAKE_INCLUDE()
nkeynes@1
   751
# -----------------
nkeynes@1
   752
# Check to see how make treats includes.
nkeynes@1
   753
AC_DEFUN([AM_MAKE_INCLUDE],
nkeynes@1
   754
[am_make=${MAKE-make}
nkeynes@1
   755
cat > confinc << 'END'
nkeynes@1
   756
am__doit:
nkeynes@1
   757
	@echo done
nkeynes@1
   758
.PHONY: am__doit
nkeynes@1
   759
END
nkeynes@1
   760
# If we don't find an include directive, just comment out the code.
nkeynes@1
   761
AC_MSG_CHECKING([for style of include used by $am_make])
nkeynes@1
   762
am__include="#"
nkeynes@1
   763
am__quote=
nkeynes@1
   764
_am_result=none
nkeynes@1
   765
# First try GNU make style include.
nkeynes@1
   766
echo "include confinc" > confmf
nkeynes@1
   767
# We grep out `Entering directory' and `Leaving directory'
nkeynes@1
   768
# messages which can occur if `w' ends up in MAKEFLAGS.
nkeynes@1
   769
# In particular we don't look at `^make:' because GNU make might
nkeynes@1
   770
# be invoked under some other name (usually "gmake"), in which
nkeynes@1
   771
# case it prints its new name instead of `make'.
nkeynes@1
   772
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
nkeynes@1
   773
   am__include=include
nkeynes@1
   774
   am__quote=
nkeynes@1
   775
   _am_result=GNU
nkeynes@1
   776
fi
nkeynes@1
   777
# Now try BSD make style include.
nkeynes@1
   778
if test "$am__include" = "#"; then
nkeynes@1
   779
   echo '.include "confinc"' > confmf
nkeynes@1
   780
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
nkeynes@1
   781
      am__include=.include
nkeynes@1
   782
      am__quote="\""
nkeynes@1
   783
      _am_result=BSD
nkeynes@1
   784
   fi
nkeynes@1
   785
fi
nkeynes@1
   786
AC_SUBST([am__include])
nkeynes@1
   787
AC_SUBST([am__quote])
nkeynes@1
   788
AC_MSG_RESULT([$_am_result])
nkeynes@1
   789
rm -f confinc confmf
nkeynes@1
   790
])
nkeynes@1
   791
nkeynes@1
   792
# AM_CONDITIONAL                                              -*- Autoconf -*-
nkeynes@1
   793
nkeynes@1
   794
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
nkeynes@1
   795
nkeynes@1
   796
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   797
# it under the terms of the GNU General Public License as published by
nkeynes@1
   798
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   799
# any later version.
nkeynes@1
   800
nkeynes@1
   801
# This program is distributed in the hope that it will be useful,
nkeynes@1
   802
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   803
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   804
# GNU General Public License for more details.
nkeynes@1
   805
nkeynes@1
   806
# You should have received a copy of the GNU General Public License
nkeynes@1
   807
# along with this program; if not, write to the Free Software
nkeynes@1
   808
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   809
# 02111-1307, USA.
nkeynes@1
   810
nkeynes@1
   811
# serial 5
nkeynes@1
   812
nkeynes@1
   813
AC_PREREQ(2.52)
nkeynes@1
   814
nkeynes@1
   815
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
nkeynes@1
   816
# -------------------------------------
nkeynes@1
   817
# Define a conditional.
nkeynes@1
   818
AC_DEFUN([AM_CONDITIONAL],
nkeynes@1
   819
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
nkeynes@1
   820
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
nkeynes@1
   821
AC_SUBST([$1_TRUE])
nkeynes@1
   822
AC_SUBST([$1_FALSE])
nkeynes@1
   823
if $2; then
nkeynes@1
   824
  $1_TRUE=
nkeynes@1
   825
  $1_FALSE='#'
nkeynes@1
   826
else
nkeynes@1
   827
  $1_TRUE='#'
nkeynes@1
   828
  $1_FALSE=
nkeynes@1
   829
fi
nkeynes@1
   830
AC_CONFIG_COMMANDS_PRE(
nkeynes@1
   831
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
nkeynes@1
   832
  AC_MSG_ERROR([conditional "$1" was never defined.
nkeynes@1
   833
Usually this means the macro was only invoked conditionally.])
nkeynes@1
   834
fi])])
nkeynes@1
   835
nkeynes@1
   836
# Add --enable-maintainer-mode option to configure.
nkeynes@1
   837
# From Jim Meyering
nkeynes@1
   838
nkeynes@1
   839
# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
nkeynes@1
   840
nkeynes@1
   841
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   842
# it under the terms of the GNU General Public License as published by
nkeynes@1
   843
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   844
# any later version.
nkeynes@1
   845
nkeynes@1
   846
# This program is distributed in the hope that it will be useful,
nkeynes@1
   847
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   848
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   849
# GNU General Public License for more details.
nkeynes@1
   850
nkeynes@1
   851
# You should have received a copy of the GNU General Public License
nkeynes@1
   852
# along with this program; if not, write to the Free Software
nkeynes@1
   853
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   854
# 02111-1307, USA.
nkeynes@1
   855
nkeynes@1
   856
# serial 2
nkeynes@1
   857
nkeynes@1
   858
AC_DEFUN([AM_MAINTAINER_MODE],
nkeynes@1
   859
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
nkeynes@1
   860
  dnl maintainer-mode is disabled by default
nkeynes@1
   861
  AC_ARG_ENABLE(maintainer-mode,
nkeynes@1
   862
[  --enable-maintainer-mode enable make rules and dependencies not useful
nkeynes@1
   863
                          (and sometimes confusing) to the casual installer],
nkeynes@1
   864
      USE_MAINTAINER_MODE=$enableval,
nkeynes@1
   865
      USE_MAINTAINER_MODE=no)
nkeynes@1
   866
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
nkeynes@1
   867
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
nkeynes@1
   868
  MAINT=$MAINTAINER_MODE_TRUE
nkeynes@1
   869
  AC_SUBST(MAINT)dnl
nkeynes@1
   870
]
nkeynes@1
   871
)
nkeynes@1
   872
nkeynes@1
   873
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
nkeynes@1
   874
nkeynes@1
   875
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
nkeynes@1
   876
nkeynes@1
   877
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
nkeynes@1
   878
nkeynes@1
   879
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   880
# it under the terms of the GNU General Public License as published by
nkeynes@1
   881
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   882
# any later version.
nkeynes@1
   883
nkeynes@1
   884
# This program is distributed in the hope that it will be useful,
nkeynes@1
   885
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   886
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   887
# GNU General Public License for more details.
nkeynes@1
   888
nkeynes@1
   889
# You should have received a copy of the GNU General Public License
nkeynes@1
   890
# along with this program; if not, write to the Free Software
nkeynes@1
   891
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   892
# 02111-1307, USA.
nkeynes@1
   893
nkeynes@1
   894
AC_PREREQ([2.52])
nkeynes@1
   895
nkeynes@1
   896
# serial 6
nkeynes@1
   897
nkeynes@1
   898
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
nkeynes@1
   899
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
nkeynes@1
   900
nkeynes@1
   901
nkeynes@1
   902
# Copyright 1996, 1997, 1999, 2000, 2001, 2002  Free Software Foundation, Inc.
nkeynes@1
   903
nkeynes@1
   904
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   905
# it under the terms of the GNU General Public License as published by
nkeynes@1
   906
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   907
# any later version.
nkeynes@1
   908
nkeynes@1
   909
# This program is distributed in the hope that it will be useful,
nkeynes@1
   910
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   911
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   912
# GNU General Public License for more details.
nkeynes@1
   913
nkeynes@1
   914
# You should have received a copy of the GNU General Public License
nkeynes@1
   915
# along with this program; if not, write to the Free Software
nkeynes@1
   916
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   917
# 02111-1307, USA.
nkeynes@1
   918
nkeynes@1
   919
# serial 2
nkeynes@1
   920
nkeynes@1
   921
# @defmac AC_PROG_CC_STDC
nkeynes@1
   922
# @maindex PROG_CC_STDC
nkeynes@1
   923
# @ovindex CC
nkeynes@1
   924
# If the C compiler in not in ANSI C mode by default, try to add an option
nkeynes@1
   925
# to output variable @code{CC} to make it so.  This macro tries various
nkeynes@1
   926
# options that select ANSI C on some system or another.  It considers the
nkeynes@1
   927
# compiler to be in ANSI C mode if it handles function prototypes correctly.
nkeynes@1
   928
#
nkeynes@1
   929
# If you use this macro, you should check after calling it whether the C
nkeynes@1
   930
# compiler has been set to accept ANSI C; if not, the shell variable
nkeynes@1
   931
# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
nkeynes@1
   932
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
nkeynes@1
   933
# program @code{ansi2knr}, which comes with Ghostscript.
nkeynes@1
   934
# @end defmac
nkeynes@1
   935
nkeynes@1
   936
AC_DEFUN([AM_PROG_CC_STDC],
nkeynes@1
   937
[AC_REQUIRE([AC_PROG_CC])
nkeynes@1
   938
AC_BEFORE([$0], [AC_C_INLINE])
nkeynes@1
   939
AC_BEFORE([$0], [AC_C_CONST])
nkeynes@1
   940
dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
nkeynes@1
   941
dnl a magic option to avoid problems with ANSI preprocessor commands
nkeynes@1
   942
dnl like #elif.
nkeynes@1
   943
dnl FIXME: can't do this because then AC_AIX won't work due to a
nkeynes@1
   944
dnl circular dependency.
nkeynes@1
   945
dnl AC_BEFORE([$0], [AC_PROG_CPP])
nkeynes@1
   946
AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
nkeynes@1
   947
AC_CACHE_VAL(am_cv_prog_cc_stdc,
nkeynes@1
   948
[am_cv_prog_cc_stdc=no
nkeynes@1
   949
ac_save_CC="$CC"
nkeynes@1
   950
# Don't try gcc -ansi; that turns off useful extensions and
nkeynes@1
   951
# breaks some systems' header files.
nkeynes@1
   952
# AIX			-qlanglvl=ansi
nkeynes@1
   953
# Ultrix and OSF/1	-std1
nkeynes@1
   954
# HP-UX 10.20 and later	-Ae
nkeynes@1
   955
# HP-UX older versions	-Aa -D_HPUX_SOURCE
nkeynes@1
   956
# SVR4			-Xc -D__EXTENSIONS__
nkeynes@1
   957
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
nkeynes@1
   958
do
nkeynes@1
   959
  CC="$ac_save_CC $ac_arg"
nkeynes@1
   960
  AC_TRY_COMPILE(
nkeynes@1
   961
[#include <stdarg.h>
nkeynes@1
   962
#include <stdio.h>
nkeynes@1
   963
#include <sys/types.h>
nkeynes@1
   964
#include <sys/stat.h>
nkeynes@1
   965
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
nkeynes@1
   966
struct buf { int x; };
nkeynes@1
   967
FILE * (*rcsopen) (struct buf *, struct stat *, int);
nkeynes@1
   968
static char *e (p, i)
nkeynes@1
   969
     char **p;
nkeynes@1
   970
     int i;
nkeynes@1
   971
{
nkeynes@1
   972
  return p[i];
nkeynes@1
   973
}
nkeynes@1
   974
static char *f (char * (*g) (char **, int), char **p, ...)
nkeynes@1
   975
{
nkeynes@1
   976
  char *s;
nkeynes@1
   977
  va_list v;
nkeynes@1
   978
  va_start (v,p);
nkeynes@1
   979
  s = g (p, va_arg (v,int));
nkeynes@1
   980
  va_end (v);
nkeynes@1
   981
  return s;
nkeynes@1
   982
}
nkeynes@1
   983
int test (int i, double x);
nkeynes@1
   984
struct s1 {int (*f) (int a);};
nkeynes@1
   985
struct s2 {int (*f) (double a);};
nkeynes@1
   986
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
nkeynes@1
   987
int argc;
nkeynes@1
   988
char **argv;
nkeynes@1
   989
], [
nkeynes@1
   990
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
nkeynes@1
   991
],
nkeynes@1
   992
[am_cv_prog_cc_stdc="$ac_arg"; break])
nkeynes@1
   993
done
nkeynes@1
   994
CC="$ac_save_CC"
nkeynes@1
   995
])
nkeynes@1
   996
if test -z "$am_cv_prog_cc_stdc"; then
nkeynes@1
   997
  AC_MSG_RESULT([none needed])
nkeynes@1
   998
else
nkeynes@1
   999
  AC_MSG_RESULT([$am_cv_prog_cc_stdc])
nkeynes@1
  1000
fi
nkeynes@1
  1001
case "x$am_cv_prog_cc_stdc" in
nkeynes@1
  1002
  x|xno) ;;
nkeynes@1
  1003
  *) CC="$CC $am_cv_prog_cc_stdc" ;;
nkeynes@1
  1004
esac
nkeynes@1
  1005
])
nkeynes@1
  1006
nkeynes@1
  1007
AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])
nkeynes@1
  1008
nkeynes@571
  1009
# Figure out how to run the assembler.             -*- Autoconf -*-
nkeynes@571
  1010
nkeynes@571
  1011
# serial 2
nkeynes@571
  1012
nkeynes@571
  1013
# Copyright 2001 Free Software Foundation, Inc.
nkeynes@571
  1014
nkeynes@571
  1015
# This program is free software; you can redistribute it and/or modify
nkeynes@571
  1016
# it under the terms of the GNU General Public License as published by
nkeynes@571
  1017
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@571
  1018
# any later version.
nkeynes@571
  1019
nkeynes@571
  1020
# This program is distributed in the hope that it will be useful,
nkeynes@571
  1021
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@571
  1022
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@571
  1023
# GNU General Public License for more details.
nkeynes@571
  1024
nkeynes@571
  1025
# You should have received a copy of the GNU General Public License
nkeynes@571
  1026
# along with this program; if not, write to the Free Software
nkeynes@571
  1027
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@571
  1028
# 02111-1307, USA.
nkeynes@571
  1029
nkeynes@571
  1030
# AM_PROG_AS
nkeynes@571
  1031
# ----------
nkeynes@571
  1032
AC_DEFUN([AM_PROG_AS],
nkeynes@571
  1033
[# By default we simply use the C compiler to build assembly code.
nkeynes@571
  1034
AC_REQUIRE([AC_PROG_CC])
nkeynes@571
  1035
: ${CCAS='$(CC)'}
nkeynes@571
  1036
# Set ASFLAGS if not already set.
nkeynes@571
  1037
: ${CCASFLAGS='$(CFLAGS)'}
nkeynes@571
  1038
AC_SUBST(CCAS)
nkeynes@571
  1039
AC_SUBST(CCASFLAGS)])
nkeynes@571
  1040
nkeynes@180
  1041
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
nkeynes@180
  1042
# 
nkeynes@180
  1043
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
nkeynes@180
  1044
#
nkeynes@180
  1045
# This program is free software; you can redistribute it and/or modify
nkeynes@180
  1046
# it under the terms of the GNU General Public License as published by
nkeynes@180
  1047
# the Free Software Foundation; either version 2 of the License, or
nkeynes@180
  1048
# (at your option) any later version.
nkeynes@180
  1049
#
nkeynes@180
  1050
# This program is distributed in the hope that it will be useful, but
nkeynes@180
  1051
# WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@180
  1052
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
nkeynes@180
  1053
# General Public License for more details.
nkeynes@180
  1054
#
nkeynes@180
  1055
# You should have received a copy of the GNU General Public License
nkeynes@180
  1056
# along with this program; if not, write to the Free Software
nkeynes@180
  1057
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
nkeynes@180
  1058
#
nkeynes@180
  1059
# As a special exception to the GNU General Public License, if you
nkeynes@180
  1060
# distribute this file as part of a program that contains a
nkeynes@180
  1061
# configuration script generated by Autoconf, you may include it under
nkeynes@180
  1062
# the same distribution terms that you use for the rest of that program.
nkeynes@1
  1063
nkeynes@180
  1064
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
nkeynes@180
  1065
# ----------------------------------
nkeynes@180
  1066
AC_DEFUN([PKG_PROG_PKG_CONFIG],
nkeynes@180
  1067
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
nkeynes@180
  1068
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
nkeynes@180
  1069
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
nkeynes@180
  1070
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
nkeynes@180
  1071
	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
nkeynes@180
  1072
fi
nkeynes@180
  1073
if test -n "$PKG_CONFIG"; then
nkeynes@180
  1074
	_pkg_min_version=m4_default([$1], [0.9.0])
nkeynes@180
  1075
	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
nkeynes@180
  1076
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
nkeynes@180
  1077
		AC_MSG_RESULT([yes])
nkeynes@180
  1078
	else
nkeynes@180
  1079
		AC_MSG_RESULT([no])
nkeynes@180
  1080
		PKG_CONFIG=""
nkeynes@180
  1081
	fi
nkeynes@180
  1082
		
nkeynes@180
  1083
fi[]dnl
nkeynes@180
  1084
])# PKG_PROG_PKG_CONFIG
nkeynes@1
  1085
nkeynes@180
  1086
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
nkeynes@180
  1087
#
nkeynes@180
  1088
# Check to see whether a particular set of modules exists.  Similar
nkeynes@180
  1089
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
nkeynes@180
  1090
#
nkeynes@180
  1091
#
nkeynes@180
  1092
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
nkeynes@180
  1093
# this or PKG_CHECK_MODULES is called, or make sure to call
nkeynes@180
  1094
# PKG_CHECK_EXISTS manually
nkeynes@180
  1095
# --------------------------------------------------------------
nkeynes@180
  1096
AC_DEFUN([PKG_CHECK_EXISTS],
nkeynes@180
  1097
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
nkeynes@180
  1098
if test -n "$PKG_CONFIG" && \
nkeynes@180
  1099
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
nkeynes@180
  1100
  m4_ifval([$2], [$2], [:])
nkeynes@180
  1101
m4_ifvaln([$3], [else
nkeynes@180
  1102
  $3])dnl
nkeynes@180
  1103
fi])
nkeynes@1
  1104
nkeynes@1
  1105
nkeynes@180
  1106
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
nkeynes@180
  1107
# ---------------------------------------------
nkeynes@180
  1108
m4_define([_PKG_CONFIG],
nkeynes@180
  1109
[if test -n "$PKG_CONFIG"; then
nkeynes@180
  1110
    if test -n "$$1"; then
nkeynes@180
  1111
        pkg_cv_[]$1="$$1"
nkeynes@180
  1112
    else
nkeynes@180
  1113
        PKG_CHECK_EXISTS([$3],
nkeynes@180
  1114
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
nkeynes@180
  1115
			 [pkg_failed=yes])
nkeynes@180
  1116
    fi
nkeynes@180
  1117
else
nkeynes@180
  1118
	pkg_failed=untried
nkeynes@180
  1119
fi[]dnl
nkeynes@180
  1120
])# _PKG_CONFIG
nkeynes@1
  1121
nkeynes@180
  1122
# _PKG_SHORT_ERRORS_SUPPORTED
nkeynes@180
  1123
# -----------------------------
nkeynes@180
  1124
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
nkeynes@180
  1125
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
nkeynes@180
  1126
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
nkeynes@180
  1127
        _pkg_short_errors_supported=yes
nkeynes@180
  1128
else
nkeynes@180
  1129
        _pkg_short_errors_supported=no
nkeynes@180
  1130
fi[]dnl
nkeynes@180
  1131
])# _PKG_SHORT_ERRORS_SUPPORTED
nkeynes@1
  1132
nkeynes@180
  1133
nkeynes@180
  1134
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
nkeynes@180
  1135
# [ACTION-IF-NOT-FOUND])
nkeynes@180
  1136
#
nkeynes@180
  1137
#
nkeynes@180
  1138
# Note that if there is a possibility the first call to
nkeynes@180
  1139
# PKG_CHECK_MODULES might not happen, you should be sure to include an
nkeynes@180
  1140
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
nkeynes@180
  1141
#
nkeynes@180
  1142
#
nkeynes@180
  1143
# --------------------------------------------------------------
nkeynes@180
  1144
AC_DEFUN([PKG_CHECK_MODULES],
nkeynes@180
  1145
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
nkeynes@180
  1146
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
nkeynes@180
  1147
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
nkeynes@180
  1148
nkeynes@180
  1149
pkg_failed=no
nkeynes@180
  1150
AC_MSG_CHECKING([for $1])
nkeynes@180
  1151
nkeynes@180
  1152
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
nkeynes@180
  1153
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
nkeynes@180
  1154
nkeynes@180
  1155
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
nkeynes@180
  1156
and $1[]_LIBS to avoid the need to call pkg-config.
nkeynes@180
  1157
See the pkg-config man page for more details.])
nkeynes@180
  1158
nkeynes@180
  1159
if test $pkg_failed = yes; then
nkeynes@180
  1160
        _PKG_SHORT_ERRORS_SUPPORTED
nkeynes@180
  1161
        if test $_pkg_short_errors_supported = yes; then
nkeynes@180
  1162
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
nkeynes@180
  1163
        else 
nkeynes@180
  1164
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
nkeynes@1
  1165
        fi
nkeynes@180
  1166
	# Put the nasty error message in config.log where it belongs
nkeynes@180
  1167
	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
nkeynes@1
  1168
nkeynes@180
  1169
	ifelse([$4], , [AC_MSG_ERROR(dnl
nkeynes@180
  1170
[Package requirements ($2) were not met:
nkeynes@1
  1171
nkeynes@180
  1172
$$1_PKG_ERRORS
nkeynes@1
  1173
nkeynes@180
  1174
Consider adjusting the PKG_CONFIG_PATH environment variable if you
nkeynes@180
  1175
installed software in a non-standard prefix.
nkeynes@1
  1176
nkeynes@180
  1177
_PKG_TEXT
nkeynes@180
  1178
])],
nkeynes@571
  1179
		[AC_MSG_RESULT([no])
nkeynes@571
  1180
                $4])
nkeynes@180
  1181
elif test $pkg_failed = untried; then
nkeynes@180
  1182
	ifelse([$4], , [AC_MSG_FAILURE(dnl
nkeynes@180
  1183
[The pkg-config script could not be found or is too old.  Make sure it
nkeynes@180
  1184
is in your PATH or set the PKG_CONFIG environment variable to the full
nkeynes@180
  1185
path to pkg-config.
nkeynes@180
  1186
nkeynes@180
  1187
_PKG_TEXT
nkeynes@180
  1188
nkeynes@180
  1189
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
nkeynes@180
  1190
		[$4])
nkeynes@180
  1191
else
nkeynes@180
  1192
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
nkeynes@180
  1193
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
nkeynes@180
  1194
        AC_MSG_RESULT([yes])
nkeynes@180
  1195
	ifelse([$3], , :, [$3])
nkeynes@180
  1196
fi[]dnl
nkeynes@180
  1197
])# PKG_CHECK_MODULES
nkeynes@1
  1198
nkeynes@1
  1199
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
nkeynes@10
  1200
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
nkeynes@1
  1201
#
nkeynes@1
  1202
# This file is free software, distributed under the terms of the GNU
nkeynes@1
  1203
# General Public License.  As a special exception to the GNU General
nkeynes@1
  1204
# Public License, this file may be distributed as part of a program
nkeynes@1
  1205
# that contains a configuration script generated by Autoconf, under
nkeynes@1
  1206
# the same distribution terms as the rest of that program.
nkeynes@1
  1207
#
nkeynes@1
  1208
# This file can be copied and used freely without restrictions.  It can
nkeynes@1
  1209
# be used in projects which are not available under the GNU Public License
nkeynes@1
  1210
# but which still want to provide support for the GNU gettext functionality.
nkeynes@1
  1211
#
nkeynes@1
  1212
# Macro to add for using GNU gettext.
nkeynes@1
  1213
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
nkeynes@1
  1214
#
nkeynes@1
  1215
# Modified to never use included libintl. 
nkeynes@1
  1216
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
nkeynes@1
  1217
#
nkeynes@1
  1218
# Major rework to remove unused code
nkeynes@1
  1219
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
nkeynes@1
  1220
#
nkeynes@1
  1221
# Added better handling of ALL_LINGUAS from GNU gettext version 
nkeynes@1
  1222
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
nkeynes@10
  1223
#
nkeynes@10
  1224
# Modified to require ngettext
nkeynes@10
  1225
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
nkeynes@1
  1226
#
nkeynes@1
  1227
# We need this here as well, since someone might use autoconf-2.5x
nkeynes@1
  1228
# to configure GLib then an older version to configure a package
nkeynes@1
  1229
# using AM_GLIB_GNU_GETTEXT
nkeynes@1
  1230
AC_PREREQ(2.53)
nkeynes@1
  1231
nkeynes@1
  1232
dnl
nkeynes@1
  1233
dnl We go to great lengths to make sure that aclocal won't 
nkeynes@1
  1234
dnl try to pull in the installed version of these macros
nkeynes@1
  1235
dnl when running aclocal in the glib directory.
nkeynes@1
  1236
dnl
nkeynes@1
  1237
m4_copy([AC_DEFUN],[glib_DEFUN])
nkeynes@1
  1238
m4_copy([AC_REQUIRE],[glib_REQUIRE])
nkeynes@1
  1239
dnl
nkeynes@1
  1240
dnl At the end, if we're not within glib, we'll define the public
nkeynes@1
  1241
dnl definitions in terms of our private definitions.
nkeynes@1
  1242
dnl
nkeynes@1
  1243
nkeynes@1
  1244
# GLIB_LC_MESSAGES
nkeynes@1
  1245
#--------------------
nkeynes@1
  1246
glib_DEFUN([GLIB_LC_MESSAGES],
nkeynes@1
  1247
  [AC_CHECK_HEADERS([locale.h])
nkeynes@1
  1248
    if test $ac_cv_header_locale_h = yes; then
nkeynes@1
  1249
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
nkeynes@1
  1250
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
nkeynes@1
  1251
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
nkeynes@1
  1252
    if test $am_cv_val_LC_MESSAGES = yes; then
nkeynes@1
  1253
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
nkeynes@1
  1254
        [Define if your <locale.h> file defines LC_MESSAGES.])
nkeynes@1
  1255
    fi
nkeynes@1
  1256
  fi])
nkeynes@1
  1257
nkeynes@1
  1258
# GLIB_PATH_PROG_WITH_TEST
nkeynes@1
  1259
#----------------------------
nkeynes@1
  1260
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
nkeynes@1
  1261
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
nkeynes@1
  1262
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
nkeynes@1
  1263
[# Extract the first word of "$2", so it can be a program name with args.
nkeynes@1
  1264
set dummy $2; ac_word=[$]2
nkeynes@1
  1265
AC_MSG_CHECKING([for $ac_word])
nkeynes@1
  1266
AC_CACHE_VAL(ac_cv_path_$1,
nkeynes@1
  1267
[case "[$]$1" in
nkeynes@1
  1268
  /*)
nkeynes@1
  1269
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
nkeynes@1
  1270
  ;;
nkeynes@1
  1271
  *)
nkeynes@1
  1272
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
nkeynes@1
  1273
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
nkeynes@1
  1274
    test -z "$ac_dir" && ac_dir=.
nkeynes@1
  1275
    if test -f $ac_dir/$ac_word; then
nkeynes@1
  1276
      if [$3]; then
nkeynes@1
  1277
	ac_cv_path_$1="$ac_dir/$ac_word"
nkeynes@1
  1278
	break
nkeynes@1
  1279
      fi
nkeynes@1
  1280
    fi
nkeynes@1
  1281
  done
nkeynes@1
  1282
  IFS="$ac_save_ifs"
nkeynes@1
  1283
dnl If no 4th arg is given, leave the cache variable unset,
nkeynes@1
  1284
dnl so AC_PATH_PROGS will keep looking.
nkeynes@1
  1285
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
nkeynes@1
  1286
])dnl
nkeynes@1
  1287
  ;;
nkeynes@1
  1288
esac])dnl
nkeynes@1
  1289
$1="$ac_cv_path_$1"
nkeynes@1
  1290
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
nkeynes@1
  1291
  AC_MSG_RESULT([$]$1)
nkeynes@1
  1292
else
nkeynes@1
  1293
  AC_MSG_RESULT(no)
nkeynes@1
  1294
fi
nkeynes@1
  1295
AC_SUBST($1)dnl
nkeynes@1
  1296
])
nkeynes@1
  1297
nkeynes@1
  1298
# GLIB_WITH_NLS
nkeynes@1
  1299
#-----------------
nkeynes@1
  1300
glib_DEFUN([GLIB_WITH_NLS],
nkeynes@1
  1301
  dnl NLS is obligatory
nkeynes@571
  1302
  [AC_REQUIRE([AC_CANONICAL_HOST])dnl
nkeynes@571
  1303
    USE_NLS=yes
nkeynes@1
  1304
    AC_SUBST(USE_NLS)
nkeynes@1
  1305
nkeynes@1
  1306
    gt_cv_have_gettext=no
nkeynes@1
  1307
nkeynes@1
  1308
    CATOBJEXT=NONE
nkeynes@1
  1309
    XGETTEXT=:
nkeynes@1
  1310
    INTLLIBS=
nkeynes@1
  1311
nkeynes@1
  1312
    AC_CHECK_HEADER(libintl.h,
nkeynes@1
  1313
     [gt_cv_func_dgettext_libintl="no"
nkeynes@1
  1314
      libintl_extra_libs=""
nkeynes@1
  1315
nkeynes@1
  1316
      #
nkeynes@1
  1317
      # First check in libc
nkeynes@1
  1318
      #
nkeynes@10
  1319
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
nkeynes@1
  1320
        [AC_TRY_LINK([
nkeynes@1
  1321
#include <libintl.h>
nkeynes@1
  1322
],
nkeynes@10
  1323
         [return !ngettext ("","", 1)],
nkeynes@10
  1324
	  gt_cv_func_ngettext_libc=yes,
nkeynes@10
  1325
          gt_cv_func_ngettext_libc=no)
nkeynes@1
  1326
        ])
nkeynes@1
  1327
  
nkeynes@10
  1328
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
nkeynes@10
  1329
	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
nkeynes@10
  1330
        	[AC_TRY_LINK([
nkeynes@10
  1331
#include <libintl.h>
nkeynes@10
  1332
],
nkeynes@10
  1333
	          [return !dgettext ("","")],
nkeynes@10
  1334
		  gt_cv_func_dgettext_libc=yes,
nkeynes@10
  1335
	          gt_cv_func_dgettext_libc=no)
nkeynes@10
  1336
        	])
nkeynes@10
  1337
      fi
nkeynes@10
  1338
  
nkeynes@10
  1339
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
nkeynes@1
  1340
        AC_CHECK_FUNCS(bind_textdomain_codeset)
nkeynes@1
  1341
      fi
nkeynes@1
  1342
nkeynes@1
  1343
      #
nkeynes@1
  1344
      # If we don't have everything we want, check in libintl
nkeynes@1
  1345
      #
nkeynes@1
  1346
      if test "$gt_cv_func_dgettext_libc" != "yes" \
nkeynes@10
  1347
	 || test "$gt_cv_func_ngettext_libc" != "yes" \
nkeynes@1
  1348
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
nkeynes@1
  1349
        
nkeynes@1
  1350
        AC_CHECK_LIB(intl, bindtextdomain,
nkeynes@10
  1351
	    [AC_CHECK_LIB(intl, ngettext,
nkeynes@10
  1352
		    [AC_CHECK_LIB(intl, dgettext,
nkeynes@10
  1353
			          gt_cv_func_dgettext_libintl=yes)])])
nkeynes@1
  1354
nkeynes@1
  1355
	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
nkeynes@1
  1356
	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
nkeynes@1
  1357
	  AC_MSG_RESULT([])
nkeynes@10
  1358
  	  AC_CHECK_LIB(intl, ngettext,
nkeynes@10
  1359
          	[AC_CHECK_LIB(intl, dcgettext,
nkeynes@1
  1360
		       [gt_cv_func_dgettext_libintl=yes
nkeynes@1
  1361
			libintl_extra_libs=-liconv],
nkeynes@10
  1362
			:,-liconv)],
nkeynes@10
  1363
		:,-liconv)
nkeynes@1
  1364
        fi
nkeynes@1
  1365
nkeynes@1
  1366
        #
nkeynes@1
  1367
        # If we found libintl, then check in it for bind_textdomain_codeset();
nkeynes@1
  1368
        # we'll prefer libc if neither have bind_textdomain_codeset(),
nkeynes@10
  1369
        # and both have dgettext and ngettext
nkeynes@1
  1370
        #
nkeynes@1
  1371
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
nkeynes@1
  1372
          glib_save_LIBS="$LIBS"
nkeynes@1
  1373
          LIBS="$LIBS -lintl $libintl_extra_libs"
nkeynes@1
  1374
          unset ac_cv_func_bind_textdomain_codeset
nkeynes@1
  1375
          AC_CHECK_FUNCS(bind_textdomain_codeset)
nkeynes@1
  1376
          LIBS="$glib_save_LIBS"
nkeynes@1
  1377
nkeynes@1
  1378
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
nkeynes@1
  1379
            gt_cv_func_dgettext_libc=no
nkeynes@1
  1380
          else
nkeynes@10
  1381
            if test "$gt_cv_func_dgettext_libc" = "yes" \
nkeynes@10
  1382
		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
nkeynes@1
  1383
              gt_cv_func_dgettext_libintl=no
nkeynes@1
  1384
            fi
nkeynes@1
  1385
          fi
nkeynes@1
  1386
        fi
nkeynes@1
  1387
      fi
nkeynes@1
  1388
nkeynes@1
  1389
      if test "$gt_cv_func_dgettext_libc" = "yes" \
nkeynes@1
  1390
	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
nkeynes@1
  1391
        gt_cv_have_gettext=yes
nkeynes@1
  1392
      fi
nkeynes@1
  1393
  
nkeynes@1
  1394
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
nkeynes@1
  1395
        INTLLIBS="-lintl $libintl_extra_libs"
nkeynes@1
  1396
      fi
nkeynes@1
  1397
  
nkeynes@1
  1398
      if test "$gt_cv_have_gettext" = "yes"; then
nkeynes@1
  1399
	AC_DEFINE(HAVE_GETTEXT,1,
nkeynes@1
  1400
	  [Define if the GNU gettext() function is already present or preinstalled.])
nkeynes@1
  1401
	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
nkeynes@1
  1402
	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
nkeynes@1
  1403
	if test "$MSGFMT" != "no"; then
nkeynes@1
  1404
          glib_save_LIBS="$LIBS"
nkeynes@1
  1405
          LIBS="$LIBS $INTLLIBS"
nkeynes@1
  1406
	  AC_CHECK_FUNCS(dcgettext)
nkeynes@571
  1407
	  MSGFMT_OPTS=
nkeynes@571
  1408
	  AC_MSG_CHECKING([if msgfmt accepts -c])
nkeynes@571
  1409
	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
nkeynes@571
  1410
msgid ""
nkeynes@571
  1411
msgstr ""
nkeynes@571
  1412
"Content-Type: text/plain; charset=UTF-8\n"
nkeynes@571
  1413
"Project-Id-Version: test 1.0\n"
nkeynes@571
  1414
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
nkeynes@571
  1415
"Last-Translator: test <foo@bar.xx>\n"
nkeynes@571
  1416
"Language-Team: C <LL@li.org>\n"
nkeynes@571
  1417
"MIME-Version: 1.0\n"
nkeynes@571
  1418
"Content-Transfer-Encoding: 8bit\n"
nkeynes@571
  1419
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
nkeynes@571
  1420
	  AC_SUBST(MSGFMT_OPTS)
nkeynes@1
  1421
	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
nkeynes@1
  1422
	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
nkeynes@1
  1423
	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
nkeynes@1
  1424
	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
nkeynes@1
  1425
			 return _nl_msg_cat_cntr],
nkeynes@1
  1426
	    [CATOBJEXT=.gmo 
nkeynes@1
  1427
             DATADIRNAME=share],
nkeynes@1
  1428
	    [case $host in
nkeynes@1
  1429
	    *-*-solaris*)
nkeynes@1
  1430
	    dnl On Solaris, if bind_textdomain_codeset is in libc,
nkeynes@1
  1431
	    dnl GNU format message catalog is always supported,
nkeynes@1
  1432
            dnl since both are added to the libc all together.
nkeynes@1
  1433
	    dnl Hence, we'd like to go with DATADIRNAME=share and
nkeynes@1
  1434
	    dnl and CATOBJEXT=.gmo in this case.
nkeynes@1
  1435
            AC_CHECK_FUNC(bind_textdomain_codeset,
nkeynes@1
  1436
	      [CATOBJEXT=.gmo 
nkeynes@1
  1437
               DATADIRNAME=share],
nkeynes@1
  1438
	      [CATOBJEXT=.mo
nkeynes@1
  1439
               DATADIRNAME=lib])
nkeynes@1
  1440
	    ;;
nkeynes@1
  1441
	    *)
nkeynes@1
  1442
	    CATOBJEXT=.mo
nkeynes@1
  1443
            DATADIRNAME=lib
nkeynes@1
  1444
	    ;;
nkeynes@1
  1445
	    esac])
nkeynes@1
  1446
          LIBS="$glib_save_LIBS"
nkeynes@1
  1447
	  INSTOBJEXT=.mo
nkeynes@1
  1448
	else
nkeynes@1
  1449
	  gt_cv_have_gettext=no
nkeynes@1
  1450
	fi
nkeynes@1
  1451
      fi
nkeynes@1
  1452
    ])
nkeynes@1
  1453
nkeynes@1
  1454
    if test "$gt_cv_have_gettext" = "yes" ; then
nkeynes@1
  1455
      AC_DEFINE(ENABLE_NLS, 1,
nkeynes@1
  1456
        [always defined to indicate that i18n is enabled])
nkeynes@1
  1457
    fi
nkeynes@1
  1458
nkeynes@1
  1459
    dnl Test whether we really found GNU xgettext.
nkeynes@1
  1460
    if test "$XGETTEXT" != ":"; then
nkeynes@1
  1461
      dnl If it is not GNU xgettext we define it as : so that the
nkeynes@1
  1462
      dnl Makefiles still can work.
nkeynes@1
  1463
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
nkeynes@1
  1464
        : ;
nkeynes@1
  1465
      else
nkeynes@1
  1466
        AC_MSG_RESULT(
nkeynes@1
  1467
	  [found xgettext program is not GNU xgettext; ignore it])
nkeynes@1
  1468
        XGETTEXT=":"
nkeynes@1
  1469
      fi
nkeynes@1
  1470
    fi
nkeynes@1
  1471
nkeynes@1
  1472
    # We need to process the po/ directory.
nkeynes@1
  1473
    POSUB=po
nkeynes@1
  1474
nkeynes@1
  1475
    AC_OUTPUT_COMMANDS(
nkeynes@1
  1476
      [case "$CONFIG_FILES" in *po/Makefile.in*)
nkeynes@1
  1477
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
nkeynes@1
  1478
      esac])
nkeynes@1
  1479
nkeynes@1
  1480
    dnl These rules are solely for the distribution goal.  While doing this
nkeynes@1
  1481
    dnl we only have to keep exactly one list of the available catalogs
nkeynes@1
  1482
    dnl in configure.in.
nkeynes@1
  1483
    for lang in $ALL_LINGUAS; do
nkeynes@1
  1484
      GMOFILES="$GMOFILES $lang.gmo"
nkeynes@1
  1485
      POFILES="$POFILES $lang.po"
nkeynes@1
  1486
    done
nkeynes@1
  1487
nkeynes@1
  1488
    dnl Make all variables we use known to autoconf.
nkeynes@1
  1489
    AC_SUBST(CATALOGS)
nkeynes@1
  1490
    AC_SUBST(CATOBJEXT)
nkeynes@1
  1491
    AC_SUBST(DATADIRNAME)
nkeynes@1
  1492
    AC_SUBST(GMOFILES)
nkeynes@1
  1493
    AC_SUBST(INSTOBJEXT)
nkeynes@1
  1494
    AC_SUBST(INTLLIBS)
nkeynes@1
  1495
    AC_SUBST(PO_IN_DATADIR_TRUE)
nkeynes@1
  1496
    AC_SUBST(PO_IN_DATADIR_FALSE)
nkeynes@1
  1497
    AC_SUBST(POFILES)
nkeynes@1
  1498
    AC_SUBST(POSUB)
nkeynes@1
  1499
  ])
nkeynes@1
  1500
nkeynes@1
  1501
# AM_GLIB_GNU_GETTEXT
nkeynes@1
  1502
# -------------------
nkeynes@1
  1503
# Do checks necessary for use of gettext. If a suitable implementation 
nkeynes@1
  1504
# of gettext is found in either in libintl or in the C library,
nkeynes@1
  1505
# it will set INTLLIBS to the libraries needed for use of gettext
nkeynes@1
  1506
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
nkeynes@1
  1507
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
nkeynes@1
  1508
# on various variables needed by the Makefile.in.in installed by 
nkeynes@1
  1509
# glib-gettextize.
nkeynes@1
  1510
dnl
nkeynes@10
  1511
glib_DEFUN([GLIB_GNU_GETTEXT],
nkeynes@1
  1512
  [AC_REQUIRE([AC_PROG_CC])dnl
nkeynes@1
  1513
   AC_REQUIRE([AC_HEADER_STDC])dnl
nkeynes@1
  1514
   
nkeynes@1
  1515
   GLIB_LC_MESSAGES
nkeynes@1
  1516
   GLIB_WITH_NLS
nkeynes@1
  1517
nkeynes@1
  1518
   if test "$gt_cv_have_gettext" = "yes"; then
nkeynes@1
  1519
     if test "x$ALL_LINGUAS" = "x"; then
nkeynes@1
  1520
       LINGUAS=
nkeynes@1
  1521
     else
nkeynes@1
  1522
       AC_MSG_CHECKING(for catalogs to be installed)
nkeynes@1
  1523
       NEW_LINGUAS=
nkeynes@1
  1524
       for presentlang in $ALL_LINGUAS; do
nkeynes@1
  1525
         useit=no
nkeynes@1
  1526
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
nkeynes@1
  1527
           desiredlanguages="$LINGUAS"
nkeynes@1
  1528
         else
nkeynes@1
  1529
           desiredlanguages="$ALL_LINGUAS"
nkeynes@1
  1530
         fi
nkeynes@1
  1531
         for desiredlang in $desiredlanguages; do
nkeynes@1
  1532
 	   # Use the presentlang catalog if desiredlang is
nkeynes@1
  1533
           #   a. equal to presentlang, or
nkeynes@1
  1534
           #   b. a variant of presentlang (because in this case,
nkeynes@1
  1535
           #      presentlang can be used as a fallback for messages
nkeynes@1
  1536
           #      which are not translated in the desiredlang catalog).
nkeynes@1
  1537
           case "$desiredlang" in
nkeynes@1
  1538
             "$presentlang"*) useit=yes;;
nkeynes@1
  1539
           esac
nkeynes@1
  1540
         done
nkeynes@1
  1541
         if test $useit = yes; then
nkeynes@1
  1542
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
nkeynes@1
  1543
         fi
nkeynes@1
  1544
       done
nkeynes@1
  1545
       LINGUAS=$NEW_LINGUAS
nkeynes@1
  1546
       AC_MSG_RESULT($LINGUAS)
nkeynes@1
  1547
     fi
nkeynes@1
  1548
nkeynes@1
  1549
     dnl Construct list of names of catalog files to be constructed.
nkeynes@1
  1550
     if test -n "$LINGUAS"; then
nkeynes@1
  1551
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
nkeynes@1
  1552
     fi
nkeynes@1
  1553
   fi
nkeynes@1
  1554
nkeynes@1
  1555
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
nkeynes@1
  1556
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
nkeynes@1
  1557
   dnl Try to locate is.
nkeynes@1
  1558
   MKINSTALLDIRS=
nkeynes@1
  1559
   if test -n "$ac_aux_dir"; then
nkeynes@1
  1560
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
nkeynes@1
  1561
   fi
nkeynes@1
  1562
   if test -z "$MKINSTALLDIRS"; then
nkeynes@1
  1563
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
nkeynes@1
  1564
   fi
nkeynes@1
  1565
   AC_SUBST(MKINSTALLDIRS)
nkeynes@1
  1566
nkeynes@1
  1567
   dnl Generate list of files to be processed by xgettext which will
nkeynes@1
  1568
   dnl be included in po/Makefile.
nkeynes@1
  1569
   test -d po || mkdir po
nkeynes@1
  1570
   if test "x$srcdir" != "x."; then
nkeynes@1
  1571
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
nkeynes@1
  1572
       posrcprefix="$srcdir/"
nkeynes@1
  1573
     else
nkeynes@1
  1574
       posrcprefix="../$srcdir/"
nkeynes@1
  1575
     fi
nkeynes@1
  1576
   else
nkeynes@1
  1577
     posrcprefix="../"
nkeynes@1
  1578
   fi
nkeynes@1
  1579
   rm -f po/POTFILES
nkeynes@1
  1580
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
nkeynes@1
  1581
	< $srcdir/po/POTFILES.in > po/POTFILES
nkeynes@1
  1582
  ])
nkeynes@1
  1583
nkeynes@1
  1584
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
nkeynes@1
  1585
# -------------------------------
nkeynes@1
  1586
# Define VARIABLE to the location where catalog files will
nkeynes@1
  1587
# be installed by po/Makefile.
nkeynes@10
  1588
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
nkeynes@1
  1589
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
nkeynes@1
  1590
glib_save_prefix="$prefix"
nkeynes@1
  1591
glib_save_exec_prefix="$exec_prefix"
nkeynes@571
  1592
glib_save_datarootdir="$datarootdir"
nkeynes@1
  1593
test "x$prefix" = xNONE && prefix=$ac_default_prefix
nkeynes@1
  1594
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
nkeynes@571
  1595
datarootdir=`eval echo "${datarootdir}"`
nkeynes@1
  1596
if test "x$CATOBJEXT" = "x.mo" ; then
nkeynes@1
  1597
  localedir=`eval echo "${libdir}/locale"`
nkeynes@1
  1598
else
nkeynes@1
  1599
  localedir=`eval echo "${datadir}/locale"`
nkeynes@1
  1600
fi
nkeynes@1
  1601
prefix="$glib_save_prefix"
nkeynes@1
  1602
exec_prefix="$glib_save_exec_prefix"
nkeynes@571
  1603
datarootdir="$glib_save_datarootdir"
nkeynes@1
  1604
AC_DEFINE_UNQUOTED($1, "$localedir",
nkeynes@1
  1605
  [Define the location where the catalogs will be installed])
nkeynes@1
  1606
])
nkeynes@1
  1607
nkeynes@1
  1608
dnl
nkeynes@1
  1609
dnl Now the definitions that aclocal will find
nkeynes@1
  1610
dnl
nkeynes@1
  1611
ifdef(glib_configure_in,[],[
nkeynes@10
  1612
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
nkeynes@10
  1613
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
nkeynes@1
  1614
])dnl
nkeynes@1
  1615
nkeynes@571
  1616
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
nkeynes@571
  1617
# 
nkeynes@571
  1618
# Create a temporary file with TEST-FILE as its contents and pass the
nkeynes@571
  1619
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
nkeynes@571
  1620
# 0 and perform ACTION-IF-FAIL for any other exit status.
nkeynes@571
  1621
AC_DEFUN([GLIB_RUN_PROG],
nkeynes@571
  1622
[cat >conftest.foo <<_ACEOF
nkeynes@571
  1623
$2
nkeynes@571
  1624
_ACEOF
nkeynes@571
  1625
if AC_RUN_LOG([$1 conftest.foo]); then
nkeynes@571
  1626
  m4_ifval([$3], [$3], [:])
nkeynes@571
  1627
m4_ifvaln([$4], [else $4])dnl
nkeynes@571
  1628
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
nkeynes@571
  1629
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
nkeynes@571
  1630
fi])
nkeynes@571
  1631
nkeynes@571
  1632
.