Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2994 in orxonox.OLD for orxonox/branches/osX/aclocal.m4


Ignore:
Timestamp:
Nov 26, 2004, 2:02:16 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/osX: switched back to automake-1.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/osX/aclocal.m4

    r2993 r2994  
    1 # generated automatically by aclocal 1.8.5 -*- Autoconf -*-
    2 
    3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
     1# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
     2
     3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
    44# Free Software Foundation, Inc.
    55# This file is free software; the Free Software Foundation
     
    1212# PARTICULAR PURPOSE.
    1313
    14 
    15 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
    16 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
    17 dnl also defines GSTUFF_PKG_ERRORS on error
    18 AC_DEFUN(PKG_CHECK_MODULES, [
    19   succeeded=no
    20 
    21   if test -z "$PKG_CONFIG"; then
    22     AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
     14# Do all the work for Automake.                            -*- Autoconf -*-
     15
     16# This macro actually does too much some checks are only needed if
     17# your package does certain things.  But this isn't really a big deal.
     18
     19# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
     20# Free Software Foundation, Inc.
     21
     22# This program is free software; you can redistribute it and/or modify
     23# it under the terms of the GNU General Public License as published by
     24# the Free Software Foundation; either version 2, or (at your option)
     25# any later version.
     26
     27# This program is distributed in the hope that it will be useful,
     28# but WITHOUT ANY WARRANTY; without even the implied warranty of
     29# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     30# GNU General Public License for more details.
     31
     32# You should have received a copy of the GNU General Public License
     33# along with this program; if not, write to the Free Software
     34# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     35# 02111-1307, USA.
     36
     37# serial 10
     38
     39AC_PREREQ([2.54])
     40
     41# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
     42# the ones we care about.
     43m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
     44
     45# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
     46# AM_INIT_AUTOMAKE([OPTIONS])
     47# -----------------------------------------------
     48# The call with PACKAGE and VERSION arguments is the old style
     49# call (pre autoconf-2.50), which is being phased out.  PACKAGE
     50# and VERSION should now be passed to AC_INIT and removed from
     51# the call to AM_INIT_AUTOMAKE.
     52# We support both call styles for the transition.  After
     53# the next Automake release, Autoconf can make the AC_INIT
     54# arguments mandatory, and then we can depend on a new Autoconf
     55# release and drop the old call support.
     56AC_DEFUN([AM_INIT_AUTOMAKE],
     57[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
     58 AC_REQUIRE([AC_PROG_INSTALL])dnl
     59# test to see if srcdir already configured
     60if test "`cd $srcdir && pwd`" != "`pwd`" &&
     61   test -f $srcdir/config.status; then
     62  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
     63fi
     64
     65# test whether we have cygpath
     66if test -z "$CYGPATH_W"; then
     67  if (cygpath --version) >/dev/null 2>/dev/null; then
     68    CYGPATH_W='cygpath -w'
     69  else
     70    CYGPATH_W=echo
    2371  fi
    24 
    25   if test "$PKG_CONFIG" = "no" ; then
    26      echo "*** The pkg-config script could not be found. Make sure it is"
    27      echo "*** in your path, or set the PKG_CONFIG environment variable"
    28      echo "*** to the full path to pkg-config."
    29      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
    30   else
    31      PKG_CONFIG_MIN_VERSION=0.9.0
    32      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
    33         AC_MSG_CHECKING(for $2)
    34 
    35         if $PKG_CONFIG --exists "$2" ; then
    36             AC_MSG_RESULT(yes)
    37             succeeded=yes
    38 
    39             AC_MSG_CHECKING($1_CFLAGS)
    40             $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
    41             AC_MSG_RESULT($$1_CFLAGS)
    42 
    43             AC_MSG_CHECKING($1_LIBS)
    44             $1_LIBS=`$PKG_CONFIG --libs "$2"`
    45             AC_MSG_RESULT($$1_LIBS)
    46         else
    47             $1_CFLAGS=""
    48             $1_LIBS=""
    49             ## If we have a custom action on failure, don't print errors, but
    50             ## do set a variable so people can do so.
    51             $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
    52             ifelse([$4], ,echo $$1_PKG_ERRORS,)
    53         fi
    54 
    55         AC_SUBST($1_CFLAGS)
    56         AC_SUBST($1_LIBS)
    57      else
    58         echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
    59         echo "*** See http://www.freedesktop.org/software/pkgconfig"
    60      fi
    61   fi
    62 
    63   if test $succeeded = yes; then
    64      ifelse([$3], , :, [$3])
    65   else
    66      ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
    67   fi
    68 ])
    69 
    70 
    71 
    72 # Configure paths for SDL
    73 # Sam Lantinga 9/21/99
    74 # stolen from Manish Singh
    75 # stolen back from Frank Belew
    76 # stolen from Manish Singh
    77 # Shamelessly stolen from Owen Taylor
    78 
    79 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
    80 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
    81 dnl
    82 AC_DEFUN([AM_PATH_SDL],
    83 [dnl
    84 dnl Get the cflags and libraries from the sdl-config script
    85 dnl
    86 AC_ARG_WITH(sdl-prefix,[  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)],
    87             sdl_prefix="$withval", sdl_prefix="")
    88 AC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
    89             sdl_exec_prefix="$withval", sdl_exec_prefix="")
    90 AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],
    91                     , enable_sdltest=yes)
    92 
    93   if test x$sdl_exec_prefix != x ; then
    94      sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
    95      if test x${SDL_CONFIG+set} != xset ; then
    96         SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
    97      fi
    98   fi
    99   if test x$sdl_prefix != x ; then
    100      sdl_args="$sdl_args --prefix=$sdl_prefix"
    101      if test x${SDL_CONFIG+set} != xset ; then
    102         SDL_CONFIG=$sdl_prefix/bin/sdl-config
    103      fi
    104   fi
    105 
    106   AC_REQUIRE([AC_CANONICAL_TARGET])
    107   PATH="$prefix/bin:$prefix/usr/bin:$PATH"
    108   AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
    109   min_sdl_version=ifelse([$1], ,0.11.0,$1)
    110   AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
    111   no_sdl=""
    112   if test "$SDL_CONFIG" = "no" ; then
    113     no_sdl=yes
    114   else
    115     SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
    116     SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
    117 
    118     sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
    119            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
    120     sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
    121            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
    122     sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
    123            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
    124     if test "x$enable_sdltest" = "xyes" ; then
    125       ac_save_CFLAGS="$CFLAGS"
    126       ac_save_LIBS="$LIBS"
    127       CFLAGS="$CFLAGS $SDL_CFLAGS"
    128       LIBS="$LIBS $SDL_LIBS"
    129 dnl
    130 dnl Now check if the installed SDL is sufficiently new. (Also sanity
    131 dnl checks the results of sdl-config to some extent
    132 dnl
    133       rm -f conf.sdltest
    134       AC_TRY_RUN([
    135 #include <stdio.h>
    136 #include <stdlib.h>
    137 #include <string.h>
    138 #include "SDL.h"
    139 
    140 char*
    141 my_strdup (char *str)
    142 {
    143   char *new_str;
    144  
    145   if (str)
    146     {
    147       new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
    148       strcpy (new_str, str);
    149     }
    150   else
    151     new_str = NULL;
    152  
    153   return new_str;
    154 }
    155 
    156 int main (int argc, char *argv[])
    157 {
    158   int major, minor, micro;
    159   char *tmp_version;
    160 
    161   /* This hangs on some systems (?)
    162   system ("touch conf.sdltest");
    163   */
    164   { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
    165 
    166   /* HP/UX 9 (%@#!) writes to sscanf strings */
    167   tmp_version = my_strdup("$min_sdl_version");
    168   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
    169      printf("%s, bad version string\n", "$min_sdl_version");
    170      exit(1);
    171    }
    172 
    173    if (($sdl_major_version > major) ||
    174       (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
    175       (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
    176     {
    177       return 0;
    178     }
    179   else
    180     {
    181       printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
    182       printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
    183       printf("*** best to upgrade to the required version.\n");
    184       printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
    185       printf("*** to point to the correct copy of sdl-config, and remove the file\n");
    186       printf("*** config.cache before re-running configure\n");
    187       return 1;
    188     }
    189 }
    190 
    191 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
    192        CFLAGS="$ac_save_CFLAGS"
    193        LIBS="$ac_save_LIBS"
    194      fi
    195   fi
    196   if test "x$no_sdl" = x ; then
    197      AC_MSG_RESULT(yes)
    198      ifelse([$2], , :, [$2])     
    199   else
    200      AC_MSG_RESULT(no)
    201      if test "$SDL_CONFIG" = "no" ; then
    202        echo "*** The sdl-config script installed by SDL could not be found"
    203        echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
    204        echo "*** your path, or set the SDL_CONFIG environment variable to the"
    205        echo "*** full path to sdl-config."
    206      else
    207        if test -f conf.sdltest ; then
    208         :
    209        else
    210           echo "*** Could not run SDL test program, checking why..."
    211           CFLAGS="$CFLAGS $SDL_CFLAGS"
    212           LIBS="$LIBS $SDL_LIBS"
    213           AC_TRY_LINK([
    214 #include <stdio.h>
    215 #include "SDL.h"
    216 
    217 int main(int argc, char *argv[])
    218 { return 0; }
    219 #undef  main
    220 #define main K_and_R_C_main
    221 ],      [ return 0; ],
    222         [ echo "*** The test program compiled, but did not run. This usually means"
    223           echo "*** that the run-time linker is not finding SDL or finding the wrong"
    224           echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
    225           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
    226           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
    227           echo "*** is required on your system"
    228           echo "***"
    229           echo "*** If you have an old version installed, it is best to remove it, although"
    230           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
    231         [ echo "*** The test program failed to compile or link. See the file config.log for the"
    232           echo "*** exact error that occured. This usually means SDL was incorrectly installed"
    233           echo "*** or that you have moved SDL since it was installed. In the latter case, you"
    234           echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
    235           CFLAGS="$ac_save_CFLAGS"
    236           LIBS="$ac_save_LIBS"
    237        fi
    238      fi
    239      SDL_CFLAGS=""
    240      SDL_LIBS=""
    241      ifelse([$3], , :, [$3])
    242   fi
    243   AC_SUBST(SDL_CFLAGS)
    244   AC_SUBST(SDL_LIBS)
    245   rm -f conf.sdltest
    246 ])
    247 
    248 #                                                        -*- Autoconf -*-
    249 # Copyright (C) 2002, 2003  Free Software Foundation, Inc.
    250 # Generated from amversion.in; do not edit by hand.
     72fi
     73AC_SUBST([CYGPATH_W])
     74
     75# Define the identity of the package.
     76dnl Distinguish between old-style and new-style calls.
     77m4_ifval([$2],
     78[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
     79 AC_SUBST([PACKAGE], [$1])dnl
     80 AC_SUBST([VERSION], [$2])],
     81[_AM_SET_OPTIONS([$1])dnl
     82 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
     83 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
     84
     85_AM_IF_OPTION([no-define],,
     86[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
     87 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
     88
     89# Some tools Automake needs.
     90AC_REQUIRE([AM_SANITY_CHECK])dnl
     91AC_REQUIRE([AC_ARG_PROGRAM])dnl
     92AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
     93AM_MISSING_PROG(AUTOCONF, autoconf)
     94AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
     95AM_MISSING_PROG(AUTOHEADER, autoheader)
     96AM_MISSING_PROG(MAKEINFO, makeinfo)
     97AM_MISSING_PROG(AMTAR, tar)
     98AM_PROG_INSTALL_SH
     99AM_PROG_INSTALL_STRIP
     100# We need awk for the "check" target.  The system "awk" is bad on
     101# some platforms.
     102AC_REQUIRE([AC_PROG_AWK])dnl
     103AC_REQUIRE([AC_PROG_MAKE_SET])dnl
     104AC_REQUIRE([AM_SET_LEADING_DOT])dnl
     105
     106_AM_IF_OPTION([no-dependencies],,
     107[AC_PROVIDE_IFELSE([AC_PROG_CC],
     108                  [_AM_DEPENDENCIES(CC)],
     109                  [define([AC_PROG_CC],
     110                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
     111AC_PROVIDE_IFELSE([AC_PROG_CXX],
     112                  [_AM_DEPENDENCIES(CXX)],
     113                  [define([AC_PROG_CXX],
     114                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
     115])
     116])
     117
     118
     119# When config.status generates a header, we must update the stamp-h file.
     120# This file resides in the same directory as the config header
     121# that is generated.  The stamp files are numbered to have different names.
     122
     123# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
     124# loop where config.status creates the headers, so we can generate
     125# our stamp files there.
     126AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
     127[# Compute $1's index in $config_headers.
     128_am_stamp_count=1
     129for _am_header in $config_headers :; do
     130  case $_am_header in
     131    $1 | $1:* )
     132      break ;;
     133    * )
     134      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
     135  esac
     136done
     137echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
     138
     139# Copyright 2002  Free Software Foundation, Inc.
    251140
    252141# This program is free software; you can redistribute it and/or modify
     
    268157# Automake X.Y traces this macro to ensure aclocal.m4 has been
    269158# generated from the m4 files accompanying Automake X.Y.
    270 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
     159AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
    271160
    272161# AM_SET_CURRENT_AUTOMAKE_VERSION
     
    275164# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
    276165AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
    277          [AM_AUTOMAKE_VERSION([1.8.5])])
     166         [AM_AUTOMAKE_VERSION([1.7.9])])
     167
     168# Helper functions for option handling.                    -*- Autoconf -*-
     169
     170# Copyright 2001, 2002  Free Software Foundation, Inc.
     171
     172# This program is free software; you can redistribute it and/or modify
     173# it under the terms of the GNU General Public License as published by
     174# the Free Software Foundation; either version 2, or (at your option)
     175# any later version.
     176
     177# This program is distributed in the hope that it will be useful,
     178# but WITHOUT ANY WARRANTY; without even the implied warranty of
     179# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     180# GNU General Public License for more details.
     181
     182# You should have received a copy of the GNU General Public License
     183# along with this program; if not, write to the Free Software
     184# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     185# 02111-1307, USA.
     186
     187# serial 2
     188
     189# _AM_MANGLE_OPTION(NAME)
     190# -----------------------
     191AC_DEFUN([_AM_MANGLE_OPTION],
     192[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
     193
     194# _AM_SET_OPTION(NAME)
     195# ------------------------------
     196# Set option NAME.  Presently that only means defining a flag for this option.
     197AC_DEFUN([_AM_SET_OPTION],
     198[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
     199
     200# _AM_SET_OPTIONS(OPTIONS)
     201# ----------------------------------
     202# OPTIONS is a space-separated list of Automake options.
     203AC_DEFUN([_AM_SET_OPTIONS],
     204[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
     205
     206# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
     207# -------------------------------------------
     208# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
     209AC_DEFUN([_AM_IF_OPTION],
     210[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
     211
     212#
     213# Check to make sure that the build environment is sane.
     214#
     215
     216# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
     217
     218# This program is free software; you can redistribute it and/or modify
     219# it under the terms of the GNU General Public License as published by
     220# the Free Software Foundation; either version 2, or (at your option)
     221# any later version.
     222
     223# This program is distributed in the hope that it will be useful,
     224# but WITHOUT ANY WARRANTY; without even the implied warranty of
     225# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     226# GNU General Public License for more details.
     227
     228# You should have received a copy of the GNU General Public License
     229# along with this program; if not, write to the Free Software
     230# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     231# 02111-1307, USA.
     232
     233# serial 3
     234
     235# AM_SANITY_CHECK
     236# ---------------
     237AC_DEFUN([AM_SANITY_CHECK],
     238[AC_MSG_CHECKING([whether build environment is sane])
     239# Just in case
     240sleep 1
     241echo timestamp > conftest.file
     242# Do `set' in a subshell so we don't clobber the current shell's
     243# arguments.  Must try -L first in case configure is actually a
     244# symlink; some systems play weird games with the mod time of symlinks
     245# (eg FreeBSD returns the mod time of the symlink's containing
     246# directory).
     247if (
     248   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
     249   if test "$[*]" = "X"; then
     250      # -L didn't work.
     251      set X `ls -t $srcdir/configure conftest.file`
     252   fi
     253   rm -f conftest.file
     254   if test "$[*]" != "X $srcdir/configure conftest.file" \
     255      && test "$[*]" != "X conftest.file $srcdir/configure"; then
     256
     257      # If neither matched, then we have a broken ls.  This can happen
     258      # if, for instance, CONFIG_SHELL is bash and it inherits a
     259      # broken ls alias from the environment.  This has actually
     260      # happened.  Such a system could not be considered "sane".
     261      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
     262alias in your environment])
     263   fi
     264
     265   test "$[2]" = conftest.file
     266   )
     267then
     268   # Ok.
     269   :
     270else
     271   AC_MSG_ERROR([newly created file is older than distributed files!
     272Check your system clock])
     273fi
     274AC_MSG_RESULT(yes)])
     275
     276#  -*- Autoconf -*-
     277
     278
     279# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
     280
     281# This program is free software; you can redistribute it and/or modify
     282# it under the terms of the GNU General Public License as published by
     283# the Free Software Foundation; either version 2, or (at your option)
     284# any later version.
     285
     286# This program is distributed in the hope that it will be useful,
     287# but WITHOUT ANY WARRANTY; without even the implied warranty of
     288# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     289# GNU General Public License for more details.
     290
     291# You should have received a copy of the GNU General Public License
     292# along with this program; if not, write to the Free Software
     293# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     294# 02111-1307, USA.
     295
     296# serial 3
     297
     298# AM_MISSING_PROG(NAME, PROGRAM)
     299# ------------------------------
     300AC_DEFUN([AM_MISSING_PROG],
     301[AC_REQUIRE([AM_MISSING_HAS_RUN])
     302$1=${$1-"${am_missing_run}$2"}
     303AC_SUBST($1)])
     304
     305
     306# AM_MISSING_HAS_RUN
     307# ------------------
     308# Define MISSING if not defined so far and test if it supports --run.
     309# If it does, set am_missing_run to use it, otherwise, to nothing.
     310AC_DEFUN([AM_MISSING_HAS_RUN],
     311[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
     312test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
     313# Use eval to expand $SHELL
     314if eval "$MISSING --run true"; then
     315  am_missing_run="$MISSING --run "
     316else
     317  am_missing_run=
     318  AC_MSG_WARN([`missing' script is too old or missing])
     319fi
     320])
    278321
    279322# AM_AUX_DIR_EXPAND
    280323
    281 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
     324# Copyright 2001 Free Software Foundation, Inc.
    282325
    283326# This program is free software; you can redistribute it and/or modify
     
    334377# configured tree to be moved without reconfiguration.
    335378
    336 AC_DEFUN([AM_AUX_DIR_EXPAND],
    337 [dnl Rely on autoconf to set up CDPATH properly.
    338 AC_PREREQ([2.50])dnl
     379# Rely on autoconf to set up CDPATH properly.
     380AC_PREREQ([2.50])
     381
     382AC_DEFUN([AM_AUX_DIR_EXPAND], [
    339383# expand $ac_aux_dir to an absolute path
    340384am_aux_dir=`cd $ac_aux_dir && pwd`
    341385])
    342386
    343 # AM_CONDITIONAL                                              -*- Autoconf -*-
    344 
    345 # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
    346 
    347 # This program is free software; you can redistribute it and/or modify
    348 # it under the terms of the GNU General Public License as published by
    349 # the Free Software Foundation; either version 2, or (at your option)
    350 # any later version.
    351 
    352 # This program is distributed in the hope that it will be useful,
    353 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    354 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    355 # GNU General Public License for more details.
    356 
    357 # You should have received a copy of the GNU General Public License
    358 # along with this program; if not, write to the Free Software
    359 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    360 # 02111-1307, USA.
    361 
    362 # serial 6
    363 
    364 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
    365 # -------------------------------------
    366 # Define a conditional.
    367 AC_DEFUN([AM_CONDITIONAL],
    368 [AC_PREREQ(2.52)dnl
    369  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
    370         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
    371 AC_SUBST([$1_TRUE])
    372 AC_SUBST([$1_FALSE])
    373 if $2; then
    374   $1_TRUE=
    375   $1_FALSE='#'
     387# AM_PROG_INSTALL_SH
     388# ------------------
     389# Define $install_sh.
     390
     391# Copyright 2001 Free Software Foundation, Inc.
     392
     393# This program is free software; you can redistribute it and/or modify
     394# it under the terms of the GNU General Public License as published by
     395# the Free Software Foundation; either version 2, or (at your option)
     396# any later version.
     397
     398# This program is distributed in the hope that it will be useful,
     399# but WITHOUT ANY WARRANTY; without even the implied warranty of
     400# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     401# GNU General Public License for more details.
     402
     403# You should have received a copy of the GNU General Public License
     404# along with this program; if not, write to the Free Software
     405# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     406# 02111-1307, USA.
     407
     408AC_DEFUN([AM_PROG_INSTALL_SH],
     409[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
     410install_sh=${install_sh-"$am_aux_dir/install-sh"}
     411AC_SUBST(install_sh)])
     412
     413# AM_PROG_INSTALL_STRIP
     414
     415# Copyright 2001 Free Software Foundation, Inc.
     416
     417# This program is free software; you can redistribute it and/or modify
     418# it under the terms of the GNU General Public License as published by
     419# the Free Software Foundation; either version 2, or (at your option)
     420# any later version.
     421
     422# This program is distributed in the hope that it will be useful,
     423# but WITHOUT ANY WARRANTY; without even the implied warranty of
     424# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     425# GNU General Public License for more details.
     426
     427# You should have received a copy of the GNU General Public License
     428# along with this program; if not, write to the Free Software
     429# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     430# 02111-1307, USA.
     431
     432# One issue with vendor `install' (even GNU) is that you can't
     433# specify the program used to strip binaries.  This is especially
     434# annoying in cross-compiling environments, where the build's strip
     435# is unlikely to handle the host's binaries.
     436# Fortunately install-sh will honor a STRIPPROG variable, so we
     437# always use install-sh in `make install-strip', and initialize
     438# STRIPPROG with the value of the STRIP variable (set by the user).
     439AC_DEFUN([AM_PROG_INSTALL_STRIP],
     440[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
     441# Installed binaries are usually stripped using `strip' when the user
     442# run `make install-strip'.  However `strip' might not be the right
     443# tool to use in cross-compilation environments, therefore Automake
     444# will honor the `STRIP' environment variable to overrule this program.
     445dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
     446if test "$cross_compiling" != no; then
     447  AC_CHECK_TOOL([STRIP], [strip], :)
     448fi
     449INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
     450AC_SUBST([INSTALL_STRIP_PROGRAM])])
     451
     452#                                                          -*- Autoconf -*-
     453# Copyright (C) 2003  Free Software Foundation, Inc.
     454
     455# This program is free software; you can redistribute it and/or modify
     456# it under the terms of the GNU General Public License as published by
     457# the Free Software Foundation; either version 2, or (at your option)
     458# any later version.
     459
     460# This program is distributed in the hope that it will be useful,
     461# but WITHOUT ANY WARRANTY; without even the implied warranty of
     462# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     463# GNU General Public License for more details.
     464
     465# You should have received a copy of the GNU General Public License
     466# along with this program; if not, write to the Free Software
     467# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     468# 02111-1307, USA.
     469
     470# serial 1
     471
     472# Check whether the underlying file-system supports filenames
     473# with a leading dot.  For instance MS-DOS doesn't.
     474AC_DEFUN([AM_SET_LEADING_DOT],
     475[rm -rf .tst 2>/dev/null
     476mkdir .tst 2>/dev/null
     477if test -d .tst; then
     478  am__leading_dot=.
    376479else
    377   $1_TRUE='#'
    378   $1_FALSE=
     480  am__leading_dot=_
    379481fi
    380 AC_CONFIG_COMMANDS_PRE(
    381 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
    382   AC_MSG_ERROR([conditional "$1" was never defined.
    383 Usually this means the macro was only invoked conditionally.])
    384 fi])])
    385 
    386 # serial 7                                              -*- Autoconf -*-
    387 
    388 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
    389 # Free Software Foundation, Inc.
     482rmdir .tst 2>/dev/null
     483AC_SUBST([am__leading_dot])])
     484
     485# serial 5                                              -*- Autoconf -*-
     486
     487# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
    390488
    391489# This program is free software; you can redistribute it and/or modify
     
    471569    for i in 1 2 3 4 5 6; do
    472570      echo '#include "conftst'$i'.h"' >> sub/conftest.c
    473       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
    474       # Solaris 8's {/usr,}/bin/sh.
    475       touch sub/conftst$i.h
     571      : > sub/conftst$i.h
    476572    done
    477573    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
     
    501597       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
    502598      # icc doesn't choke on unknown options, it will just issue warnings
    503       # or remarks (even with -Werror).  So we grep stderr for any message
    504       # that says an option was ignored or not supported.
    505       # When given -MP, icc 7.0 and 7.1 complain thusly:
    506       #   icc: Command line warning: ignoring option '-M'; no argument required
    507       # The diagnosis changed in icc 8.0:
    508       #   icc: Command line remark: option '-MP' not supported
    509       if (grep 'ignoring option' conftest.err ||
    510           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
     599      # (even with -Werror).  So we grep stderr for any message
     600      # that says an option was ignored.
     601      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
    511602        am_cv_$1_dependencies_compiler_type=$depmode
    512603        break
     
    542633AC_DEFUN([AM_DEP_TRACK],
    543634[AC_ARG_ENABLE(dependency-tracking,
    544 [  --disable-dependency-tracking  speeds up one-time build
    545   --enable-dependency-tracking   do not reject slow dependency extractors])
     635[  --disable-dependency-tracking Speeds up one-time builds
     636  --enable-dependency-tracking  Do not reject slow dependency extractors])
    546637if test "x$enable_dependency_tracking" != xno; then
    547638  am_depcomp="$ac_aux_dir/depcomp"
     
    554645# Generate code to set up dependency tracking.   -*- Autoconf -*-
    555646
    556 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
     647# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    557648
    558649# This program is free software; you can redistribute it and/or modify
     
    593684  # Extract the definition of DEP_FILES from the Makefile without
    594685  # running `make'.
    595   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     686  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
    596687  test -z "$DEPDIR" && continue
    597688  # When using ansi2knr, U may be empty or an underscore; expand it
    598   U=`sed -n 's/^U = //p' < "$mf"`
     689  U=`sed -n -e '/^U = / s///p' < "$mf"`
    599690  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
    600691  # We invoke sed twice because it is the simplest approach to
    601692  # changing $(DEPDIR) to its actual value in the expansion.
    602   for file in `sed -n '
     693  for file in `sed -n -e '
    603694    /^DEP_FILES = .*\\\\$/ {
    604695      s/^DEP_FILES = //
     
    635726     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
    636727])
    637 
    638 # Do all the work for Automake.                            -*- Autoconf -*-
    639 
    640 # This macro actually does too much some checks are only needed if
    641 # your package does certain things.  But this isn't really a big deal.
    642 
    643 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    644 # Free Software Foundation, Inc.
    645 
    646 # This program is free software; you can redistribute it and/or modify
    647 # it under the terms of the GNU General Public License as published by
    648 # the Free Software Foundation; either version 2, or (at your option)
    649 # any later version.
    650 
    651 # This program is distributed in the hope that it will be useful,
    652 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    653 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    654 # GNU General Public License for more details.
    655 
    656 # You should have received a copy of the GNU General Public License
    657 # along with this program; if not, write to the Free Software
    658 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    659 # 02111-1307, USA.
    660 
    661 # serial 11
    662 
    663 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
    664 # AM_INIT_AUTOMAKE([OPTIONS])
    665 # -----------------------------------------------
    666 # The call with PACKAGE and VERSION arguments is the old style
    667 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
    668 # and VERSION should now be passed to AC_INIT and removed from
    669 # the call to AM_INIT_AUTOMAKE.
    670 # We support both call styles for the transition.  After
    671 # the next Automake release, Autoconf can make the AC_INIT
    672 # arguments mandatory, and then we can depend on a new Autoconf
    673 # release and drop the old call support.
    674 AC_DEFUN([AM_INIT_AUTOMAKE],
    675 [AC_PREREQ([2.58])dnl
    676 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
    677 dnl the ones we care about.
    678 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
    679 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
    680 AC_REQUIRE([AC_PROG_INSTALL])dnl
    681 # test to see if srcdir already configured
    682 if test "`cd $srcdir && pwd`" != "`pwd`" &&
    683    test -f $srcdir/config.status; then
    684   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
    685 fi
    686 
    687 # test whether we have cygpath
    688 if test -z "$CYGPATH_W"; then
    689   if (cygpath --version) >/dev/null 2>/dev/null; then
    690     CYGPATH_W='cygpath -w'
    691   else
    692     CYGPATH_W=echo
    693   fi
    694 fi
    695 AC_SUBST([CYGPATH_W])
    696 
    697 # Define the identity of the package.
    698 dnl Distinguish between old-style and new-style calls.
    699 m4_ifval([$2],
    700 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
    701  AC_SUBST([PACKAGE], [$1])dnl
    702  AC_SUBST([VERSION], [$2])],
    703 [_AM_SET_OPTIONS([$1])dnl
    704  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
    705  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
    706 
    707 _AM_IF_OPTION([no-define],,
    708 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
    709  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
    710 
    711 # Some tools Automake needs.
    712 AC_REQUIRE([AM_SANITY_CHECK])dnl
    713 AC_REQUIRE([AC_ARG_PROGRAM])dnl
    714 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
    715 AM_MISSING_PROG(AUTOCONF, autoconf)
    716 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
    717 AM_MISSING_PROG(AUTOHEADER, autoheader)
    718 AM_MISSING_PROG(MAKEINFO, makeinfo)
    719 AM_MISSING_PROG(AMTAR, tar)
    720 AM_PROG_INSTALL_SH
    721 AM_PROG_INSTALL_STRIP
    722 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
    723 # We need awk for the "check" target.  The system "awk" is bad on
    724 # some platforms.
    725 AC_REQUIRE([AC_PROG_AWK])dnl
    726 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
    727 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
    728 
    729 _AM_IF_OPTION([no-dependencies],,
    730 [AC_PROVIDE_IFELSE([AC_PROG_CC],
    731                   [_AM_DEPENDENCIES(CC)],
    732                   [define([AC_PROG_CC],
    733                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
    734 AC_PROVIDE_IFELSE([AC_PROG_CXX],
    735                   [_AM_DEPENDENCIES(CXX)],
    736                   [define([AC_PROG_CXX],
    737                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
    738 ])
    739 ])
    740 
    741 
    742 # When config.status generates a header, we must update the stamp-h file.
    743 # This file resides in the same directory as the config header
    744 # that is generated.  The stamp files are numbered to have different names.
    745 
    746 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
    747 # loop where config.status creates the headers, so we can generate
    748 # our stamp files there.
    749 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
    750 [# Compute $1's index in $config_headers.
    751 _am_stamp_count=1
    752 for _am_header in $config_headers :; do
    753   case $_am_header in
    754     $1 | $1:* )
    755       break ;;
    756     * )
    757       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
    758   esac
    759 done
    760 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
    761 
    762 # AM_PROG_INSTALL_SH
    763 # ------------------
    764 # Define $install_sh.
    765 
    766 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
    767 
    768 # This program is free software; you can redistribute it and/or modify
    769 # it under the terms of the GNU General Public License as published by
    770 # the Free Software Foundation; either version 2, or (at your option)
    771 # any later version.
    772 
    773 # This program is distributed in the hope that it will be useful,
    774 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    775 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    776 # GNU General Public License for more details.
    777 
    778 # You should have received a copy of the GNU General Public License
    779 # along with this program; if not, write to the Free Software
    780 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    781 # 02111-1307, USA.
    782 
    783 AC_DEFUN([AM_PROG_INSTALL_SH],
    784 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
    785 install_sh=${install_sh-"$am_aux_dir/install-sh"}
    786 AC_SUBST(install_sh)])
    787 
    788 #                                                          -*- Autoconf -*-
    789 # Copyright (C) 2003  Free Software Foundation, Inc.
    790 
    791 # This program is free software; you can redistribute it and/or modify
    792 # it under the terms of the GNU General Public License as published by
    793 # the Free Software Foundation; either version 2, or (at your option)
    794 # any later version.
    795 
    796 # This program is distributed in the hope that it will be useful,
    797 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    798 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    799 # GNU General Public License for more details.
    800 
    801 # You should have received a copy of the GNU General Public License
    802 # along with this program; if not, write to the Free Software
    803 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    804 # 02111-1307, USA.
    805 
    806 # serial 1
    807 
    808 # Check whether the underlying file-system supports filenames
    809 # with a leading dot.  For instance MS-DOS doesn't.
    810 AC_DEFUN([AM_SET_LEADING_DOT],
    811 [rm -rf .tst 2>/dev/null
    812 mkdir .tst 2>/dev/null
    813 if test -d .tst; then
    814   am__leading_dot=.
    815 else
    816   am__leading_dot=_
    817 fi
    818 rmdir .tst 2>/dev/null
    819 AC_SUBST([am__leading_dot])])
    820728
    821729# Check to see how 'make' treats includes.      -*- Autoconf -*-
     
    882790])
    883791
    884 #  -*- Autoconf -*-
    885 
    886 
    887 # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
    888 
    889 # This program is free software; you can redistribute it and/or modify
    890 # it under the terms of the GNU General Public License as published by
    891 # the Free Software Foundation; either version 2, or (at your option)
    892 # any later version.
    893 
    894 # This program is distributed in the hope that it will be useful,
    895 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    896 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    897 # GNU General Public License for more details.
    898 
    899 # You should have received a copy of the GNU General Public License
    900 # along with this program; if not, write to the Free Software
    901 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    902 # 02111-1307, USA.
    903 
    904 # serial 3
    905 
    906 # AM_MISSING_PROG(NAME, PROGRAM)
    907 # ------------------------------
    908 AC_DEFUN([AM_MISSING_PROG],
    909 [AC_REQUIRE([AM_MISSING_HAS_RUN])
    910 $1=${$1-"${am_missing_run}$2"}
    911 AC_SUBST($1)])
    912 
    913 
    914 # AM_MISSING_HAS_RUN
    915 # ------------------
    916 # Define MISSING if not defined so far and test if it supports --run.
    917 # If it does, set am_missing_run to use it, otherwise, to nothing.
    918 AC_DEFUN([AM_MISSING_HAS_RUN],
    919 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
    920 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
    921 # Use eval to expand $SHELL
    922 if eval "$MISSING --run true"; then
    923   am_missing_run="$MISSING --run "
     792# AM_CONDITIONAL                                              -*- Autoconf -*-
     793
     794# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
     795
     796# This program is free software; you can redistribute it and/or modify
     797# it under the terms of the GNU General Public License as published by
     798# the Free Software Foundation; either version 2, or (at your option)
     799# any later version.
     800
     801# This program is distributed in the hope that it will be useful,
     802# but WITHOUT ANY WARRANTY; without even the implied warranty of
     803# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     804# GNU General Public License for more details.
     805
     806# You should have received a copy of the GNU General Public License
     807# along with this program; if not, write to the Free Software
     808# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     809# 02111-1307, USA.
     810
     811# serial 5
     812
     813AC_PREREQ(2.52)
     814
     815# AM_CONDITIONAL(NAME, SHELL-CONDITION)
     816# -------------------------------------
     817# Define a conditional.
     818AC_DEFUN([AM_CONDITIONAL],
     819[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
     820        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
     821AC_SUBST([$1_TRUE])
     822AC_SUBST([$1_FALSE])
     823if $2; then
     824  $1_TRUE=
     825  $1_FALSE='#'
    924826else
    925   am_missing_run=
    926   AC_MSG_WARN([`missing' script is too old or missing])
     827  $1_TRUE='#'
     828  $1_FALSE=
    927829fi
    928 ])
    929 
    930 # AM_PROG_MKDIR_P
    931 # ---------------
    932 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
    933 
    934 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    935 
    936 # This program is free software; you can redistribute it and/or modify
    937 # it under the terms of the GNU General Public License as published by
    938 # the Free Software Foundation; either version 2, or (at your option)
    939 # any later version.
    940 
    941 # This program is distributed in the hope that it will be useful,
    942 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    943 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    944 # GNU General Public License for more details.
    945 
    946 # You should have received a copy of the GNU General Public License
    947 # along with this program; if not, write to the Free Software
    948 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    949 # 02111-1307, USA.
    950 
    951 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
    952 # created by `make install' are always world readable, even if the
    953 # installer happens to have an overly restrictive umask (e.g. 077).
    954 # This was a mistake.  There are at least two reasons why we must not
    955 # use `-m 0755':
    956 #   - it causes special bits like SGID to be ignored,
    957 #   - it may be too restrictive (some setups expect 775 directories).
    958 #
    959 # Do not use -m 0755 and let people choose whatever they expect by
    960 # setting umask.
    961 #
    962 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
    963 # Some implementations (such as Solaris 8's) are not thread-safe: if a
    964 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
    965 # concurrently, both version can detect that a/ is missing, but only
    966 # one can create it and the other will error out.  Consequently we
    967 # restrict ourselves to GNU make (using the --version option ensures
    968 # this.)
    969 AC_DEFUN([AM_PROG_MKDIR_P],
    970 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
    971   # Keeping the `.' argument allows $(mkdir_p) to be used without
    972   # argument.  Indeed, we sometimes output rules like
    973   #   $(mkdir_p) $(somedir)
    974   # where $(somedir) is conditionally defined.
    975   # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
    976   # expensive solution, as it forces Make to start a sub-shell.)
    977   mkdir_p='mkdir -p -- .'
    978 else
    979   # On NextStep and OpenStep, the `mkdir' command does not
    980   # recognize any option.  It will interpret all options as
    981   # directories to create, and then abort because `.' already
    982   # exists.
    983   for d in ./-p ./--version;
    984   do
    985     test -d $d && rmdir $d
    986   done
    987   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
    988   if test -f "$ac_aux_dir/mkinstalldirs"; then
    989     mkdir_p='$(mkinstalldirs)'
     830AC_CONFIG_COMMANDS_PRE(
     831[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
     832  AC_MSG_ERROR([conditional "$1" was never defined.
     833Usually this means the macro was only invoked conditionally.])
     834fi])])
     835
     836# Configure paths for SDL
     837# Sam Lantinga 9/21/99
     838# stolen from Manish Singh
     839# stolen back from Frank Belew
     840# stolen from Manish Singh
     841# Shamelessly stolen from Owen Taylor
     842
     843dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
     844dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
     845dnl
     846AC_DEFUN([AM_PATH_SDL],
     847[dnl
     848dnl Get the cflags and libraries from the sdl-config script
     849dnl
     850AC_ARG_WITH(sdl-prefix,[  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)],
     851            sdl_prefix="$withval", sdl_prefix="")
     852AC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
     853            sdl_exec_prefix="$withval", sdl_exec_prefix="")
     854AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],
     855                    , enable_sdltest=yes)
     856
     857  if test x$sdl_exec_prefix != x ; then
     858     sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
     859     if test x${SDL_CONFIG+set} != xset ; then
     860        SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
     861     fi
     862  fi
     863  if test x$sdl_prefix != x ; then
     864     sdl_args="$sdl_args --prefix=$sdl_prefix"
     865     if test x${SDL_CONFIG+set} != xset ; then
     866        SDL_CONFIG=$sdl_prefix/bin/sdl-config
     867     fi
     868  fi
     869
     870  AC_REQUIRE([AC_CANONICAL_TARGET])
     871  PATH="$prefix/bin:$prefix/usr/bin:$PATH"
     872  AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
     873  min_sdl_version=ifelse([$1], ,0.11.0,$1)
     874  AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
     875  no_sdl=""
     876  if test "$SDL_CONFIG" = "no" ; then
     877    no_sdl=yes
    990878  else
    991     mkdir_p='$(install_sh) -d'
     879    SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
     880    SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
     881
     882    sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
     883           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
     884    sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
     885           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
     886    sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
     887           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
     888    if test "x$enable_sdltest" = "xyes" ; then
     889      ac_save_CFLAGS="$CFLAGS"
     890      ac_save_LIBS="$LIBS"
     891      CFLAGS="$CFLAGS $SDL_CFLAGS"
     892      LIBS="$LIBS $SDL_LIBS"
     893dnl
     894dnl Now check if the installed SDL is sufficiently new. (Also sanity
     895dnl checks the results of sdl-config to some extent
     896dnl
     897      rm -f conf.sdltest
     898      AC_TRY_RUN([
     899#include <stdio.h>
     900#include <stdlib.h>
     901#include <string.h>
     902#include "SDL.h"
     903
     904char*
     905my_strdup (char *str)
     906{
     907  char *new_str;
     908 
     909  if (str)
     910    {
     911      new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
     912      strcpy (new_str, str);
     913    }
     914  else
     915    new_str = NULL;
     916 
     917  return new_str;
     918}
     919
     920int main (int argc, char *argv[])
     921{
     922  int major, minor, micro;
     923  char *tmp_version;
     924
     925  /* This hangs on some systems (?)
     926  system ("touch conf.sdltest");
     927  */
     928  { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
     929
     930  /* HP/UX 9 (%@#!) writes to sscanf strings */
     931  tmp_version = my_strdup("$min_sdl_version");
     932  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
     933     printf("%s, bad version string\n", "$min_sdl_version");
     934     exit(1);
     935   }
     936
     937   if (($sdl_major_version > major) ||
     938      (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
     939      (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
     940    {
     941      return 0;
     942    }
     943  else
     944    {
     945      printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
     946      printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
     947      printf("*** best to upgrade to the required version.\n");
     948      printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
     949      printf("*** to point to the correct copy of sdl-config, and remove the file\n");
     950      printf("*** config.cache before re-running configure\n");
     951      return 1;
     952    }
     953}
     954
     955],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
     956       CFLAGS="$ac_save_CFLAGS"
     957       LIBS="$ac_save_LIBS"
     958     fi
    992959  fi
    993 fi
    994 AC_SUBST([mkdir_p])])
    995 
    996 # Helper functions for option handling.                    -*- Autoconf -*-
    997 
    998 # Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
    999 
    1000 # This program is free software; you can redistribute it and/or modify
    1001 # it under the terms of the GNU General Public License as published by
    1002 # the Free Software Foundation; either version 2, or (at your option)
    1003 # any later version.
    1004 
    1005 # This program is distributed in the hope that it will be useful,
    1006 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    1007 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1008 # GNU General Public License for more details.
    1009 
    1010 # You should have received a copy of the GNU General Public License
    1011 # along with this program; if not, write to the Free Software
    1012 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    1013 # 02111-1307, USA.
    1014 
    1015 # serial 2
    1016 
    1017 # _AM_MANGLE_OPTION(NAME)
    1018 # -----------------------
    1019 AC_DEFUN([_AM_MANGLE_OPTION],
    1020 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
    1021 
    1022 # _AM_SET_OPTION(NAME)
    1023 # ------------------------------
    1024 # Set option NAME.  Presently that only means defining a flag for this option.
    1025 AC_DEFUN([_AM_SET_OPTION],
    1026 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
    1027 
    1028 # _AM_SET_OPTIONS(OPTIONS)
    1029 # ----------------------------------
    1030 # OPTIONS is a space-separated list of Automake options.
    1031 AC_DEFUN([_AM_SET_OPTIONS],
    1032 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
    1033 
    1034 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
    1035 # -------------------------------------------
    1036 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
    1037 AC_DEFUN([_AM_IF_OPTION],
    1038 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
    1039 
    1040 #
    1041 # Check to make sure that the build environment is sane.
    1042 #
    1043 
    1044 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
    1045 
    1046 # This program is free software; you can redistribute it and/or modify
    1047 # it under the terms of the GNU General Public License as published by
    1048 # the Free Software Foundation; either version 2, or (at your option)
    1049 # any later version.
    1050 
    1051 # This program is distributed in the hope that it will be useful,
    1052 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    1053 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1054 # GNU General Public License for more details.
    1055 
    1056 # You should have received a copy of the GNU General Public License
    1057 # along with this program; if not, write to the Free Software
    1058 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    1059 # 02111-1307, USA.
    1060 
    1061 # serial 3
    1062 
    1063 # AM_SANITY_CHECK
    1064 # ---------------
    1065 AC_DEFUN([AM_SANITY_CHECK],
    1066 [AC_MSG_CHECKING([whether build environment is sane])
    1067 # Just in case
    1068 sleep 1
    1069 echo timestamp > conftest.file
    1070 # Do `set' in a subshell so we don't clobber the current shell's
    1071 # arguments.  Must try -L first in case configure is actually a
    1072 # symlink; some systems play weird games with the mod time of symlinks
    1073 # (eg FreeBSD returns the mod time of the symlink's containing
    1074 # directory).
    1075 if (
    1076    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
    1077    if test "$[*]" = "X"; then
    1078       # -L didn't work.
    1079       set X `ls -t $srcdir/configure conftest.file`
    1080    fi
    1081    rm -f conftest.file
    1082    if test "$[*]" != "X $srcdir/configure conftest.file" \
    1083       && test "$[*]" != "X conftest.file $srcdir/configure"; then
    1084 
    1085       # If neither matched, then we have a broken ls.  This can happen
    1086       # if, for instance, CONFIG_SHELL is bash and it inherits a
    1087       # broken ls alias from the environment.  This has actually
    1088       # happened.  Such a system could not be considered "sane".
    1089       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
    1090 alias in your environment])
    1091    fi
    1092 
    1093    test "$[2]" = conftest.file
    1094    )
    1095 then
    1096    # Ok.
    1097    :
    1098 else
    1099    AC_MSG_ERROR([newly created file is older than distributed files!
    1100 Check your system clock])
    1101 fi
    1102 AC_MSG_RESULT(yes)])
    1103 
    1104 # AM_PROG_INSTALL_STRIP
    1105 
    1106 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
    1107 
    1108 # This program is free software; you can redistribute it and/or modify
    1109 # it under the terms of the GNU General Public License as published by
    1110 # the Free Software Foundation; either version 2, or (at your option)
    1111 # any later version.
    1112 
    1113 # This program is distributed in the hope that it will be useful,
    1114 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    1115 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1116 # GNU General Public License for more details.
    1117 
    1118 # You should have received a copy of the GNU General Public License
    1119 # along with this program; if not, write to the Free Software
    1120 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    1121 # 02111-1307, USA.
    1122 
    1123 # One issue with vendor `install' (even GNU) is that you can't
    1124 # specify the program used to strip binaries.  This is especially
    1125 # annoying in cross-compiling environments, where the build's strip
    1126 # is unlikely to handle the host's binaries.
    1127 # Fortunately install-sh will honor a STRIPPROG variable, so we
    1128 # always use install-sh in `make install-strip', and initialize
    1129 # STRIPPROG with the value of the STRIP variable (set by the user).
    1130 AC_DEFUN([AM_PROG_INSTALL_STRIP],
    1131 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
    1132 # Installed binaries are usually stripped using `strip' when the user
    1133 # run `make install-strip'.  However `strip' might not be the right
    1134 # tool to use in cross-compilation environments, therefore Automake
    1135 # will honor the `STRIP' environment variable to overrule this program.
    1136 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
    1137 if test "$cross_compiling" != no; then
    1138   AC_CHECK_TOOL([STRIP], [strip], :)
    1139 fi
    1140 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
    1141 AC_SUBST([INSTALL_STRIP_PROGRAM])])
    1142 
     960  if test "x$no_sdl" = x ; then
     961     AC_MSG_RESULT(yes)
     962     ifelse([$2], , :, [$2])     
     963  else
     964     AC_MSG_RESULT(no)
     965     if test "$SDL_CONFIG" = "no" ; then
     966       echo "*** The sdl-config script installed by SDL could not be found"
     967       echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
     968       echo "*** your path, or set the SDL_CONFIG environment variable to the"
     969       echo "*** full path to sdl-config."
     970     else
     971       if test -f conf.sdltest ; then
     972        :
     973       else
     974          echo "*** Could not run SDL test program, checking why..."
     975          CFLAGS="$CFLAGS $SDL_CFLAGS"
     976          LIBS="$LIBS $SDL_LIBS"
     977          AC_TRY_LINK([
     978#include <stdio.h>
     979#include "SDL.h"
     980
     981int main(int argc, char *argv[])
     982{ return 0; }
     983#undef  main
     984#define main K_and_R_C_main
     985],      [ return 0; ],
     986        [ echo "*** The test program compiled, but did not run. This usually means"
     987          echo "*** that the run-time linker is not finding SDL or finding the wrong"
     988          echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
     989          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
     990          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
     991          echo "*** is required on your system"
     992          echo "***"
     993          echo "*** If you have an old version installed, it is best to remove it, although"
     994          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
     995        [ echo "*** The test program failed to compile or link. See the file config.log for the"
     996          echo "*** exact error that occured. This usually means SDL was incorrectly installed"
     997          echo "*** or that you have moved SDL since it was installed. In the latter case, you"
     998          echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
     999          CFLAGS="$ac_save_CFLAGS"
     1000          LIBS="$ac_save_LIBS"
     1001       fi
     1002     fi
     1003     SDL_CFLAGS=""
     1004     SDL_LIBS=""
     1005     ifelse([$3], , :, [$3])
     1006  fi
     1007  AC_SUBST(SDL_CFLAGS)
     1008  AC_SUBST(SDL_LIBS)
     1009  rm -f conf.sdltest
     1010])
     1011
     1012
     1013dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
     1014dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
     1015dnl also defines GSTUFF_PKG_ERRORS on error
     1016AC_DEFUN(PKG_CHECK_MODULES, [
     1017  succeeded=no
     1018
     1019  if test -z "$PKG_CONFIG"; then
     1020    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
     1021  fi
     1022
     1023  if test "$PKG_CONFIG" = "no" ; then
     1024     echo "*** The pkg-config script could not be found. Make sure it is"
     1025     echo "*** in your path, or set the PKG_CONFIG environment variable"
     1026     echo "*** to the full path to pkg-config."
     1027     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
     1028  else
     1029     PKG_CONFIG_MIN_VERSION=0.9.0
     1030     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
     1031        AC_MSG_CHECKING(for $2)
     1032
     1033        if $PKG_CONFIG --exists "$2" ; then
     1034            AC_MSG_RESULT(yes)
     1035            succeeded=yes
     1036
     1037            AC_MSG_CHECKING($1_CFLAGS)
     1038            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
     1039            AC_MSG_RESULT($$1_CFLAGS)
     1040
     1041            AC_MSG_CHECKING($1_LIBS)
     1042            $1_LIBS=`$PKG_CONFIG --libs "$2"`
     1043            AC_MSG_RESULT($$1_LIBS)
     1044        else
     1045            $1_CFLAGS=""
     1046            $1_LIBS=""
     1047            ## If we have a custom action on failure, don't print errors, but
     1048            ## do set a variable so people can do so.
     1049            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
     1050            ifelse([$4], ,echo $$1_PKG_ERRORS,)
     1051        fi
     1052
     1053        AC_SUBST($1_CFLAGS)
     1054        AC_SUBST($1_LIBS)
     1055     else
     1056        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
     1057        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     1058     fi
     1059  fi
     1060
     1061  if test $succeeded = yes; then
     1062     ifelse([$3], , :, [$3])
     1063  else
     1064     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
     1065  fi
     1066])
     1067
     1068
     1069
Note: See TracChangeset for help on using the changeset viewer.