Search
lxdream.org :: lxdream/aclocal.m4
lxdream 0.9.1
released Jun 29
Download Now
filename aclocal.m4
changeset 1:eea311cfd33e
next10:c898b37506e0
author nkeynes
date Sat Mar 13 00:03:32 2004 +0000 (15 years ago)
permissions -rw-r--r--
last change This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.
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
# isc-posix.m4 serial 2 (gettext-0.11.2)
nkeynes@1
   902
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
nkeynes@1
   903
dnl This file is free software, distributed under the terms of the GNU
nkeynes@1
   904
dnl General Public License.  As a special exception to the GNU General
nkeynes@1
   905
dnl Public License, this file may be distributed as part of a program
nkeynes@1
   906
dnl that contains a configuration script generated by Autoconf, under
nkeynes@1
   907
dnl the same distribution terms as the rest of that program.
nkeynes@1
   908
nkeynes@1
   909
# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
nkeynes@1
   910
nkeynes@1
   911
# This test replaces the one in autoconf.
nkeynes@1
   912
# Currently this macro should have the same name as the autoconf macro
nkeynes@1
   913
# because gettext's gettext.m4 (distributed in the automake package)
nkeynes@1
   914
# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
nkeynes@1
   915
# give these diagnostics:
nkeynes@1
   916
#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
nkeynes@1
   917
#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
nkeynes@1
   918
nkeynes@1
   919
undefine([AC_ISC_POSIX])
nkeynes@1
   920
nkeynes@1
   921
AC_DEFUN([AC_ISC_POSIX],
nkeynes@1
   922
  [
nkeynes@1
   923
    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
nkeynes@1
   924
    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
nkeynes@1
   925
  ]
nkeynes@1
   926
)
nkeynes@1
   927
nkeynes@1
   928
nkeynes@1
   929
# Copyright 1996, 1997, 1999, 2000, 2001, 2002  Free Software Foundation, Inc.
nkeynes@1
   930
nkeynes@1
   931
# This program is free software; you can redistribute it and/or modify
nkeynes@1
   932
# it under the terms of the GNU General Public License as published by
nkeynes@1
   933
# the Free Software Foundation; either version 2, or (at your option)
nkeynes@1
   934
# any later version.
nkeynes@1
   935
nkeynes@1
   936
# This program is distributed in the hope that it will be useful,
nkeynes@1
   937
# but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@1
   938
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@1
   939
# GNU General Public License for more details.
nkeynes@1
   940
nkeynes@1
   941
# You should have received a copy of the GNU General Public License
nkeynes@1
   942
# along with this program; if not, write to the Free Software
nkeynes@1
   943
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
nkeynes@1
   944
# 02111-1307, USA.
nkeynes@1
   945
nkeynes@1
   946
# serial 2
nkeynes@1
   947
nkeynes@1
   948
# @defmac AC_PROG_CC_STDC
nkeynes@1
   949
# @maindex PROG_CC_STDC
nkeynes@1
   950
# @ovindex CC
nkeynes@1
   951
# If the C compiler in not in ANSI C mode by default, try to add an option
nkeynes@1
   952
# to output variable @code{CC} to make it so.  This macro tries various
nkeynes@1
   953
# options that select ANSI C on some system or another.  It considers the
nkeynes@1
   954
# compiler to be in ANSI C mode if it handles function prototypes correctly.
nkeynes@1
   955
#
nkeynes@1
   956
# If you use this macro, you should check after calling it whether the C
nkeynes@1
   957
# compiler has been set to accept ANSI C; if not, the shell variable
nkeynes@1
   958
# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
nkeynes@1
   959
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
nkeynes@1
   960
# program @code{ansi2knr}, which comes with Ghostscript.
nkeynes@1
   961
# @end defmac
nkeynes@1
   962
nkeynes@1
   963
AC_DEFUN([AM_PROG_CC_STDC],
nkeynes@1
   964
[AC_REQUIRE([AC_PROG_CC])
nkeynes@1
   965
AC_BEFORE([$0], [AC_C_INLINE])
nkeynes@1
   966
AC_BEFORE([$0], [AC_C_CONST])
nkeynes@1
   967
dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
nkeynes@1
   968
dnl a magic option to avoid problems with ANSI preprocessor commands
nkeynes@1
   969
dnl like #elif.
nkeynes@1
   970
dnl FIXME: can't do this because then AC_AIX won't work due to a
nkeynes@1
   971
dnl circular dependency.
nkeynes@1
   972
dnl AC_BEFORE([$0], [AC_PROG_CPP])
nkeynes@1
   973
AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
nkeynes@1
   974
AC_CACHE_VAL(am_cv_prog_cc_stdc,
nkeynes@1
   975
[am_cv_prog_cc_stdc=no
nkeynes@1
   976
ac_save_CC="$CC"
nkeynes@1
   977
# Don't try gcc -ansi; that turns off useful extensions and
nkeynes@1
   978
# breaks some systems' header files.
nkeynes@1
   979
# AIX			-qlanglvl=ansi
nkeynes@1
   980
# Ultrix and OSF/1	-std1
nkeynes@1
   981
# HP-UX 10.20 and later	-Ae
nkeynes@1
   982
# HP-UX older versions	-Aa -D_HPUX_SOURCE
nkeynes@1
   983
# SVR4			-Xc -D__EXTENSIONS__
nkeynes@1
   984
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
nkeynes@1
   985
do
nkeynes@1
   986
  CC="$ac_save_CC $ac_arg"
nkeynes@1
   987
  AC_TRY_COMPILE(
nkeynes@1
   988
[#include <stdarg.h>
nkeynes@1
   989
#include <stdio.h>
nkeynes@1
   990
#include <sys/types.h>
nkeynes@1
   991
#include <sys/stat.h>
nkeynes@1
   992
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
nkeynes@1
   993
struct buf { int x; };
nkeynes@1
   994
FILE * (*rcsopen) (struct buf *, struct stat *, int);
nkeynes@1
   995
static char *e (p, i)
nkeynes@1
   996
     char **p;
nkeynes@1
   997
     int i;
nkeynes@1
   998
{
nkeynes@1
   999
  return p[i];
nkeynes@1
  1000
}
nkeynes@1
  1001
static char *f (char * (*g) (char **, int), char **p, ...)
nkeynes@1
  1002
{
nkeynes@1
  1003
  char *s;
nkeynes@1
  1004
  va_list v;
nkeynes@1
  1005
  va_start (v,p);
nkeynes@1
  1006
  s = g (p, va_arg (v,int));
nkeynes@1
  1007
  va_end (v);
nkeynes@1
  1008
  return s;
nkeynes@1
  1009
}
nkeynes@1
  1010
int test (int i, double x);
nkeynes@1
  1011
struct s1 {int (*f) (int a);};
nkeynes@1
  1012
struct s2 {int (*f) (double a);};
nkeynes@1
  1013
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
nkeynes@1
  1014
int argc;
nkeynes@1
  1015
char **argv;
nkeynes@1
  1016
], [
nkeynes@1
  1017
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
nkeynes@1
  1018
],
nkeynes@1
  1019
[am_cv_prog_cc_stdc="$ac_arg"; break])
nkeynes@1
  1020
done
nkeynes@1
  1021
CC="$ac_save_CC"
nkeynes@1
  1022
])
nkeynes@1
  1023
if test -z "$am_cv_prog_cc_stdc"; then
nkeynes@1
  1024
  AC_MSG_RESULT([none needed])
nkeynes@1
  1025
else
nkeynes@1
  1026
  AC_MSG_RESULT([$am_cv_prog_cc_stdc])
nkeynes@1
  1027
fi
nkeynes@1
  1028
case "x$am_cv_prog_cc_stdc" in
nkeynes@1
  1029
  x|xno) ;;
nkeynes@1
  1030
  *) CC="$CC $am_cv_prog_cc_stdc" ;;
nkeynes@1
  1031
esac
nkeynes@1
  1032
])
nkeynes@1
  1033
nkeynes@1
  1034
AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])
nkeynes@1
  1035
nkeynes@1
  1036
nkeynes@1
  1037
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
nkeynes@1
  1038
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
nkeynes@1
  1039
dnl also defines GSTUFF_PKG_ERRORS on error
nkeynes@1
  1040
AC_DEFUN(PKG_CHECK_MODULES, [
nkeynes@1
  1041
  succeeded=no
nkeynes@1
  1042
nkeynes@1
  1043
  if test -z "$PKG_CONFIG"; then
nkeynes@1
  1044
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
nkeynes@1
  1045
  fi
nkeynes@1
  1046
nkeynes@1
  1047
  if test "$PKG_CONFIG" = "no" ; then
nkeynes@1
  1048
     echo "*** The pkg-config script could not be found. Make sure it is"
nkeynes@1
  1049
     echo "*** in your path, or set the PKG_CONFIG environment variable"
nkeynes@1
  1050
     echo "*** to the full path to pkg-config."
nkeynes@1
  1051
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
nkeynes@1
  1052
  else
nkeynes@1
  1053
     PKG_CONFIG_MIN_VERSION=0.9.0
nkeynes@1
  1054
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
nkeynes@1
  1055
        AC_MSG_CHECKING(for $2)
nkeynes@1
  1056
nkeynes@1
  1057
        if $PKG_CONFIG --exists "$2" ; then
nkeynes@1
  1058
            AC_MSG_RESULT(yes)
nkeynes@1
  1059
            succeeded=yes
nkeynes@1
  1060
nkeynes@1
  1061
            AC_MSG_CHECKING($1_CFLAGS)
nkeynes@1
  1062
            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
nkeynes@1
  1063
            AC_MSG_RESULT($$1_CFLAGS)
nkeynes@1
  1064
nkeynes@1
  1065
            AC_MSG_CHECKING($1_LIBS)
nkeynes@1
  1066
            $1_LIBS=`$PKG_CONFIG --libs "$2"`
nkeynes@1
  1067
            AC_MSG_RESULT($$1_LIBS)
nkeynes@1
  1068
        else
nkeynes@1
  1069
            $1_CFLAGS=""
nkeynes@1
  1070
            $1_LIBS=""
nkeynes@1
  1071
            ## If we have a custom action on failure, don't print errors, but 
nkeynes@1
  1072
            ## do set a variable so people can do so.
nkeynes@1
  1073
            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
nkeynes@1
  1074
            ifelse([$4], ,echo $$1_PKG_ERRORS,)
nkeynes@1
  1075
        fi
nkeynes@1
  1076
nkeynes@1
  1077
        AC_SUBST($1_CFLAGS)
nkeynes@1
  1078
        AC_SUBST($1_LIBS)
nkeynes@1
  1079
     else
nkeynes@1
  1080
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
nkeynes@1
  1081
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
nkeynes@1
  1082
     fi
nkeynes@1
  1083
  fi
nkeynes@1
  1084
nkeynes@1
  1085
  if test $succeeded = yes; then
nkeynes@1
  1086
     ifelse([$3], , :, [$3])
nkeynes@1
  1087
  else
nkeynes@1
  1088
     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])
nkeynes@1
  1089
  fi
nkeynes@1
  1090
])
nkeynes@1
  1091
nkeynes@1
  1092
nkeynes@1
  1093
nkeynes@1
  1094
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
nkeynes@1
  1095
# Copyright (C) 2001-2003 Red Hat, Inc.
nkeynes@1
  1096
#
nkeynes@1
  1097
# This file is free software, distributed under the terms of the GNU
nkeynes@1
  1098
# General Public License.  As a special exception to the GNU General
nkeynes@1
  1099
# Public License, this file may be distributed as part of a program
nkeynes@1
  1100
# that contains a configuration script generated by Autoconf, under
nkeynes@1
  1101
# the same distribution terms as the rest of that program.
nkeynes@1
  1102
#
nkeynes@1
  1103
# This file can be copied and used freely without restrictions.  It can
nkeynes@1
  1104
# be used in projects which are not available under the GNU Public License
nkeynes@1
  1105
# but which still want to provide support for the GNU gettext functionality.
nkeynes@1
  1106
#
nkeynes@1
  1107
# Macro to add for using GNU gettext.
nkeynes@1
  1108
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
nkeynes@1
  1109
#
nkeynes@1
  1110
# Modified to never use included libintl. 
nkeynes@1
  1111
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
nkeynes@1
  1112
#
nkeynes@1
  1113
# Major rework to remove unused code
nkeynes@1
  1114
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
nkeynes@1
  1115
#
nkeynes@1
  1116
# Added better handling of ALL_LINGUAS from GNU gettext version 
nkeynes@1
  1117
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
nkeynes@1
  1118
nkeynes@1
  1119
#
nkeynes@1
  1120
# We need this here as well, since someone might use autoconf-2.5x
nkeynes@1
  1121
# to configure GLib then an older version to configure a package
nkeynes@1
  1122
# using AM_GLIB_GNU_GETTEXT
nkeynes@1
  1123
AC_PREREQ(2.53)
nkeynes@1
  1124
nkeynes@1
  1125
dnl
nkeynes@1
  1126
dnl We go to great lengths to make sure that aclocal won't 
nkeynes@1
  1127
dnl try to pull in the installed version of these macros
nkeynes@1
  1128
dnl when running aclocal in the glib directory.
nkeynes@1
  1129
dnl
nkeynes@1
  1130
m4_copy([AC_DEFUN],[glib_DEFUN])
nkeynes@1
  1131
m4_copy([AC_REQUIRE],[glib_REQUIRE])
nkeynes@1
  1132
dnl
nkeynes@1
  1133
dnl At the end, if we're not within glib, we'll define the public
nkeynes@1
  1134
dnl definitions in terms of our private definitions.
nkeynes@1
  1135
dnl
nkeynes@1
  1136
nkeynes@1
  1137
# GLIB_LC_MESSAGES
nkeynes@1
  1138
#--------------------
nkeynes@1
  1139
glib_DEFUN([GLIB_LC_MESSAGES],
nkeynes@1
  1140
  [AC_CHECK_HEADERS([locale.h])
nkeynes@1
  1141
    if test $ac_cv_header_locale_h = yes; then
nkeynes@1
  1142
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
nkeynes@1
  1143
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
nkeynes@1
  1144
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
nkeynes@1
  1145
    if test $am_cv_val_LC_MESSAGES = yes; then
nkeynes@1
  1146
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
nkeynes@1
  1147
        [Define if your <locale.h> file defines LC_MESSAGES.])
nkeynes@1
  1148
    fi
nkeynes@1
  1149
  fi])
nkeynes@1
  1150
nkeynes@1
  1151
# GLIB_PATH_PROG_WITH_TEST
nkeynes@1
  1152
#----------------------------
nkeynes@1
  1153
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
nkeynes@1
  1154
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
nkeynes@1
  1155
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
nkeynes@1
  1156
[# Extract the first word of "$2", so it can be a program name with args.
nkeynes@1
  1157
set dummy $2; ac_word=[$]2
nkeynes@1
  1158
AC_MSG_CHECKING([for $ac_word])
nkeynes@1
  1159
AC_CACHE_VAL(ac_cv_path_$1,
nkeynes@1
  1160
[case "[$]$1" in
nkeynes@1
  1161
  /*)
nkeynes@1
  1162
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
nkeynes@1
  1163
  ;;
nkeynes@1
  1164
  *)
nkeynes@1
  1165
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
nkeynes@1
  1166
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
nkeynes@1
  1167
    test -z "$ac_dir" && ac_dir=.
nkeynes@1
  1168
    if test -f $ac_dir/$ac_word; then
nkeynes@1
  1169
      if [$3]; then
nkeynes@1
  1170
	ac_cv_path_$1="$ac_dir/$ac_word"
nkeynes@1
  1171
	break
nkeynes@1
  1172
      fi
nkeynes@1
  1173
    fi
nkeynes@1
  1174
  done
nkeynes@1
  1175
  IFS="$ac_save_ifs"
nkeynes@1
  1176
dnl If no 4th arg is given, leave the cache variable unset,
nkeynes@1
  1177
dnl so AC_PATH_PROGS will keep looking.
nkeynes@1
  1178
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
nkeynes@1
  1179
])dnl
nkeynes@1
  1180
  ;;
nkeynes@1
  1181
esac])dnl
nkeynes@1
  1182
$1="$ac_cv_path_$1"
nkeynes@1
  1183
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
nkeynes@1
  1184
  AC_MSG_RESULT([$]$1)
nkeynes@1
  1185
else
nkeynes@1
  1186
  AC_MSG_RESULT(no)
nkeynes@1
  1187
fi
nkeynes@1
  1188
AC_SUBST($1)dnl
nkeynes@1
  1189
])
nkeynes@1
  1190
nkeynes@1
  1191
# GLIB_WITH_NLS
nkeynes@1
  1192
#-----------------
nkeynes@1
  1193
glib_DEFUN([GLIB_WITH_NLS],
nkeynes@1
  1194
  dnl NLS is obligatory
nkeynes@1
  1195
  [USE_NLS=yes
nkeynes@1
  1196
    AC_SUBST(USE_NLS)
nkeynes@1
  1197
nkeynes@1
  1198
    gt_cv_have_gettext=no
nkeynes@1
  1199
nkeynes@1
  1200
    CATOBJEXT=NONE
nkeynes@1
  1201
    XGETTEXT=:
nkeynes@1
  1202
    INTLLIBS=
nkeynes@1
  1203
nkeynes@1
  1204
    AC_CHECK_HEADER(libintl.h,
nkeynes@1
  1205
     [gt_cv_func_dgettext_libintl="no"
nkeynes@1
  1206
      libintl_extra_libs=""
nkeynes@1
  1207
nkeynes@1
  1208
      #
nkeynes@1
  1209
      # First check in libc
nkeynes@1
  1210
      #
nkeynes@1
  1211
      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
nkeynes@1
  1212
        [AC_TRY_LINK([
nkeynes@1
  1213
#include <libintl.h>
nkeynes@1
  1214
],
nkeynes@1
  1215
          [return (int) dgettext ("","")],
nkeynes@1
  1216
	  gt_cv_func_dgettext_libc=yes,
nkeynes@1
  1217
          gt_cv_func_dgettext_libc=no)
nkeynes@1
  1218
        ])
nkeynes@1
  1219
  
nkeynes@1
  1220
      if test "$gt_cv_func_dgettext_libc" = "yes" ; then
nkeynes@1
  1221
        AC_CHECK_FUNCS(bind_textdomain_codeset)
nkeynes@1
  1222
      fi
nkeynes@1
  1223
nkeynes@1
  1224
      #
nkeynes@1
  1225
      # If we don't have everything we want, check in libintl
nkeynes@1
  1226
      #
nkeynes@1
  1227
      if test "$gt_cv_func_dgettext_libc" != "yes" \
nkeynes@1
  1228
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
nkeynes@1
  1229
        
nkeynes@1
  1230
        AC_CHECK_LIB(intl, bindtextdomain,
nkeynes@1
  1231
	    [AC_CHECK_LIB(intl, dgettext,
nkeynes@1
  1232
		          gt_cv_func_dgettext_libintl=yes)])
nkeynes@1
  1233
nkeynes@1
  1234
	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
nkeynes@1
  1235
	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
nkeynes@1
  1236
	  AC_MSG_RESULT([])
nkeynes@1
  1237
          AC_CHECK_LIB(intl, dcgettext,
nkeynes@1
  1238
		       [gt_cv_func_dgettext_libintl=yes
nkeynes@1
  1239
			libintl_extra_libs=-liconv],
nkeynes@1
  1240
			:,-liconv)
nkeynes@1
  1241
        fi
nkeynes@1
  1242
nkeynes@1
  1243
        #
nkeynes@1
  1244
        # If we found libintl, then check in it for bind_textdomain_codeset();
nkeynes@1
  1245
        # we'll prefer libc if neither have bind_textdomain_codeset(),
nkeynes@1
  1246
        # and both have dgettext
nkeynes@1
  1247
        #
nkeynes@1
  1248
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
nkeynes@1
  1249
          glib_save_LIBS="$LIBS"
nkeynes@1
  1250
          LIBS="$LIBS -lintl $libintl_extra_libs"
nkeynes@1
  1251
          unset ac_cv_func_bind_textdomain_codeset
nkeynes@1
  1252
          AC_CHECK_FUNCS(bind_textdomain_codeset)
nkeynes@1
  1253
          LIBS="$glib_save_LIBS"
nkeynes@1
  1254
nkeynes@1
  1255
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
nkeynes@1
  1256
            gt_cv_func_dgettext_libc=no
nkeynes@1
  1257
          else
nkeynes@1
  1258
            if test "$gt_cv_func_dgettext_libc" = "yes"; then
nkeynes@1
  1259
              gt_cv_func_dgettext_libintl=no
nkeynes@1
  1260
            fi
nkeynes@1
  1261
          fi
nkeynes@1
  1262
        fi
nkeynes@1
  1263
      fi
nkeynes@1
  1264
nkeynes@1
  1265
      if test "$gt_cv_func_dgettext_libc" = "yes" \
nkeynes@1
  1266
	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
nkeynes@1
  1267
        gt_cv_have_gettext=yes
nkeynes@1
  1268
      fi
nkeynes@1
  1269
  
nkeynes@1
  1270
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
nkeynes@1
  1271
        INTLLIBS="-lintl $libintl_extra_libs"
nkeynes@1
  1272
      fi
nkeynes@1
  1273
  
nkeynes@1
  1274
      if test "$gt_cv_have_gettext" = "yes"; then
nkeynes@1
  1275
	AC_DEFINE(HAVE_GETTEXT,1,
nkeynes@1
  1276
	  [Define if the GNU gettext() function is already present or preinstalled.])
nkeynes@1
  1277
	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
nkeynes@1
  1278
	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
nkeynes@1
  1279
	if test "$MSGFMT" != "no"; then
nkeynes@1
  1280
          glib_save_LIBS="$LIBS"
nkeynes@1
  1281
          LIBS="$LIBS $INTLLIBS"
nkeynes@1
  1282
	  AC_CHECK_FUNCS(dcgettext)
nkeynes@1
  1283
	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
nkeynes@1
  1284
	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
nkeynes@1
  1285
	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
nkeynes@1
  1286
	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
nkeynes@1
  1287
			 return _nl_msg_cat_cntr],
nkeynes@1
  1288
	    [CATOBJEXT=.gmo 
nkeynes@1
  1289
             DATADIRNAME=share],
nkeynes@1
  1290
	    [case $host in
nkeynes@1
  1291
	    *-*-solaris*)
nkeynes@1
  1292
	    dnl On Solaris, if bind_textdomain_codeset is in libc,
nkeynes@1
  1293
	    dnl GNU format message catalog is always supported,
nkeynes@1
  1294
            dnl since both are added to the libc all together.
nkeynes@1
  1295
	    dnl Hence, we'd like to go with DATADIRNAME=share and
nkeynes@1
  1296
	    dnl and CATOBJEXT=.gmo in this case.
nkeynes@1
  1297
            AC_CHECK_FUNC(bind_textdomain_codeset,
nkeynes@1
  1298
	      [CATOBJEXT=.gmo 
nkeynes@1
  1299
               DATADIRNAME=share],
nkeynes@1
  1300
	      [CATOBJEXT=.mo
nkeynes@1
  1301
               DATADIRNAME=lib])
nkeynes@1
  1302
	    ;;
nkeynes@1
  1303
	    *)
nkeynes@1
  1304
	    CATOBJEXT=.mo
nkeynes@1
  1305
            DATADIRNAME=lib
nkeynes@1
  1306
	    ;;
nkeynes@1
  1307
	    esac])
nkeynes@1
  1308
          LIBS="$glib_save_LIBS"
nkeynes@1
  1309
	  INSTOBJEXT=.mo
nkeynes@1
  1310
	else
nkeynes@1
  1311
	  gt_cv_have_gettext=no
nkeynes@1
  1312
	fi
nkeynes@1
  1313
      fi
nkeynes@1
  1314
    ])
nkeynes@1
  1315
nkeynes@1
  1316
    if test "$gt_cv_have_gettext" = "yes" ; then
nkeynes@1
  1317
      AC_DEFINE(ENABLE_NLS, 1,
nkeynes@1
  1318
        [always defined to indicate that i18n is enabled])
nkeynes@1
  1319
    fi
nkeynes@1
  1320
nkeynes@1
  1321
    dnl Test whether we really found GNU xgettext.
nkeynes@1
  1322
    if test "$XGETTEXT" != ":"; then
nkeynes@1
  1323
      dnl If it is not GNU xgettext we define it as : so that the
nkeynes@1
  1324
      dnl Makefiles still can work.
nkeynes@1
  1325
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
nkeynes@1
  1326
        : ;
nkeynes@1
  1327
      else
nkeynes@1
  1328
        AC_MSG_RESULT(
nkeynes@1
  1329
	  [found xgettext program is not GNU xgettext; ignore it])
nkeynes@1
  1330
        XGETTEXT=":"
nkeynes@1
  1331
      fi
nkeynes@1
  1332
    fi
nkeynes@1
  1333
nkeynes@1
  1334
    # We need to process the po/ directory.
nkeynes@1
  1335
    POSUB=po
nkeynes@1
  1336
nkeynes@1
  1337
    AC_OUTPUT_COMMANDS(
nkeynes@1
  1338
      [case "$CONFIG_FILES" in *po/Makefile.in*)
nkeynes@1
  1339
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
nkeynes@1
  1340
      esac])
nkeynes@1
  1341
nkeynes@1
  1342
    dnl These rules are solely for the distribution goal.  While doing this
nkeynes@1
  1343
    dnl we only have to keep exactly one list of the available catalogs
nkeynes@1
  1344
    dnl in configure.in.
nkeynes@1
  1345
    for lang in $ALL_LINGUAS; do
nkeynes@1
  1346
      GMOFILES="$GMOFILES $lang.gmo"
nkeynes@1
  1347
      POFILES="$POFILES $lang.po"
nkeynes@1
  1348
    done
nkeynes@1
  1349
nkeynes@1
  1350
    dnl Make all variables we use known to autoconf.
nkeynes@1
  1351
    AC_SUBST(CATALOGS)
nkeynes@1
  1352
    AC_SUBST(CATOBJEXT)
nkeynes@1
  1353
    AC_SUBST(DATADIRNAME)
nkeynes@1
  1354
    AC_SUBST(GMOFILES)
nkeynes@1
  1355
    AC_SUBST(INSTOBJEXT)
nkeynes@1
  1356
    AC_SUBST(INTLLIBS)
nkeynes@1
  1357
    AC_SUBST(PO_IN_DATADIR_TRUE)
nkeynes@1
  1358
    AC_SUBST(PO_IN_DATADIR_FALSE)
nkeynes@1
  1359
    AC_SUBST(POFILES)
nkeynes@1
  1360
    AC_SUBST(POSUB)
nkeynes@1
  1361
  ])
nkeynes@1
  1362
nkeynes@1
  1363
# AM_GLIB_GNU_GETTEXT
nkeynes@1
  1364
# -------------------
nkeynes@1
  1365
# Do checks necessary for use of gettext. If a suitable implementation 
nkeynes@1
  1366
# of gettext is found in either in libintl or in the C library,
nkeynes@1
  1367
# it will set INTLLIBS to the libraries needed for use of gettext
nkeynes@1
  1368
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
nkeynes@1
  1369
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
nkeynes@1
  1370
# on various variables needed by the Makefile.in.in installed by 
nkeynes@1
  1371
# glib-gettextize.
nkeynes@1
  1372
dnl
nkeynes@1
  1373
glib_DEFUN(GLIB_GNU_GETTEXT,
nkeynes@1
  1374
  [AC_REQUIRE([AC_PROG_CC])dnl
nkeynes@1
  1375
   AC_REQUIRE([AC_HEADER_STDC])dnl
nkeynes@1
  1376
   
nkeynes@1
  1377
   GLIB_LC_MESSAGES
nkeynes@1
  1378
   GLIB_WITH_NLS
nkeynes@1
  1379
nkeynes@1
  1380
   if test "$gt_cv_have_gettext" = "yes"; then
nkeynes@1
  1381
     if test "x$ALL_LINGUAS" = "x"; then
nkeynes@1
  1382
       LINGUAS=
nkeynes@1
  1383
     else
nkeynes@1
  1384
       AC_MSG_CHECKING(for catalogs to be installed)
nkeynes@1
  1385
       NEW_LINGUAS=
nkeynes@1
  1386
       for presentlang in $ALL_LINGUAS; do
nkeynes@1
  1387
         useit=no
nkeynes@1
  1388
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
nkeynes@1
  1389
           desiredlanguages="$LINGUAS"
nkeynes@1
  1390
         else
nkeynes@1
  1391
           desiredlanguages="$ALL_LINGUAS"
nkeynes@1
  1392
         fi
nkeynes@1
  1393
         for desiredlang in $desiredlanguages; do
nkeynes@1
  1394
 	   # Use the presentlang catalog if desiredlang is
nkeynes@1
  1395
           #   a. equal to presentlang, or
nkeynes@1
  1396
           #   b. a variant of presentlang (because in this case,
nkeynes@1
  1397
           #      presentlang can be used as a fallback for messages
nkeynes@1
  1398
           #      which are not translated in the desiredlang catalog).
nkeynes@1
  1399
           case "$desiredlang" in
nkeynes@1
  1400
             "$presentlang"*) useit=yes;;
nkeynes@1
  1401
           esac
nkeynes@1
  1402
         done
nkeynes@1
  1403
         if test $useit = yes; then
nkeynes@1
  1404
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
nkeynes@1
  1405
         fi
nkeynes@1
  1406
       done
nkeynes@1
  1407
       LINGUAS=$NEW_LINGUAS
nkeynes@1
  1408
       AC_MSG_RESULT($LINGUAS)
nkeynes@1
  1409
     fi
nkeynes@1
  1410
nkeynes@1
  1411
     dnl Construct list of names of catalog files to be constructed.
nkeynes@1
  1412
     if test -n "$LINGUAS"; then
nkeynes@1
  1413
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
nkeynes@1
  1414
     fi
nkeynes@1
  1415
   fi
nkeynes@1
  1416
nkeynes@1
  1417
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
nkeynes@1
  1418
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
nkeynes@1
  1419
   dnl Try to locate is.
nkeynes@1
  1420
   MKINSTALLDIRS=
nkeynes@1
  1421
   if test -n "$ac_aux_dir"; then
nkeynes@1
  1422
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
nkeynes@1
  1423
   fi
nkeynes@1
  1424
   if test -z "$MKINSTALLDIRS"; then
nkeynes@1
  1425
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
nkeynes@1
  1426
   fi
nkeynes@1
  1427
   AC_SUBST(MKINSTALLDIRS)
nkeynes@1
  1428
nkeynes@1
  1429
   dnl Generate list of files to be processed by xgettext which will
nkeynes@1
  1430
   dnl be included in po/Makefile.
nkeynes@1
  1431
   test -d po || mkdir po
nkeynes@1
  1432
   if test "x$srcdir" != "x."; then
nkeynes@1
  1433
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
nkeynes@1
  1434
       posrcprefix="$srcdir/"
nkeynes@1
  1435
     else
nkeynes@1
  1436
       posrcprefix="../$srcdir/"
nkeynes@1
  1437
     fi
nkeynes@1
  1438
   else
nkeynes@1
  1439
     posrcprefix="../"
nkeynes@1
  1440
   fi
nkeynes@1
  1441
   rm -f po/POTFILES
nkeynes@1
  1442
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
nkeynes@1
  1443
	< $srcdir/po/POTFILES.in > po/POTFILES
nkeynes@1
  1444
  ])
nkeynes@1
  1445
nkeynes@1
  1446
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
nkeynes@1
  1447
# -------------------------------
nkeynes@1
  1448
# Define VARIABLE to the location where catalog files will
nkeynes@1
  1449
# be installed by po/Makefile.
nkeynes@1
  1450
glib_DEFUN(GLIB_DEFINE_LOCALEDIR,
nkeynes@1
  1451
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
nkeynes@1
  1452
glib_save_prefix="$prefix"
nkeynes@1
  1453
glib_save_exec_prefix="$exec_prefix"
nkeynes@1
  1454
test "x$prefix" = xNONE && prefix=$ac_default_prefix
nkeynes@1
  1455
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
nkeynes@1
  1456
if test "x$CATOBJEXT" = "x.mo" ; then
nkeynes@1
  1457
  localedir=`eval echo "${libdir}/locale"`
nkeynes@1
  1458
else
nkeynes@1
  1459
  localedir=`eval echo "${datadir}/locale"`
nkeynes@1
  1460
fi
nkeynes@1
  1461
prefix="$glib_save_prefix"
nkeynes@1
  1462
exec_prefix="$glib_save_exec_prefix"
nkeynes@1
  1463
AC_DEFINE_UNQUOTED($1, "$localedir",
nkeynes@1
  1464
  [Define the location where the catalogs will be installed])
nkeynes@1
  1465
])
nkeynes@1
  1466
nkeynes@1
  1467
dnl
nkeynes@1
  1468
dnl Now the definitions that aclocal will find
nkeynes@1
  1469
dnl
nkeynes@1
  1470
ifdef(glib_configure_in,[],[
nkeynes@1
  1471
AC_DEFUN(AM_GLIB_GNU_GETTEXT,[GLIB_GNU_GETTEXT($@)])
nkeynes@1
  1472
AC_DEFUN(AM_GLIB_DEFINE_LOCALEDIR,[GLIB_DEFINE_LOCALEDIR($@)])
nkeynes@1
  1473
])dnl
nkeynes@1
  1474
.