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