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