Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/aclocal.m4 @ 2990

Last change on this file since 2990 was 2980, checked in by bensch, 20 years ago

orxonox/truk: configure.ac/makefile.am's better now. more dynamic

File size: 41.6 KB
Line 
1# generated automatically by aclocal 1.8.5 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4# Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14
15dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
16dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
17dnl also defines GSTUFF_PKG_ERRORS on error
18AC_DEFUN(PKG_CHECK_MODULES, [
19  succeeded=no
20
21  if test -z "$PKG_CONFIG"; then
22    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
23  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
79dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
80dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
81dnl
82AC_DEFUN([AM_PATH_SDL],
83[dnl
84dnl Get the cflags and libraries from the sdl-config script
85dnl
86AC_ARG_WITH(sdl-prefix,[  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)],
87            sdl_prefix="$withval", sdl_prefix="")
88AC_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="")
90AC_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"
129dnl
130dnl Now check if the installed SDL is sufficiently new. (Also sanity
131dnl checks the results of sdl-config to some extent
132dnl
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
140char*
141my_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
156int 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
217int 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.
251
252# This program is free software; you can redistribute it and/or modify
253# it under the terms of the GNU General Public License as published by
254# the Free Software Foundation; either version 2, or (at your option)
255# any later version.
256
257# This program is distributed in the hope that it will be useful,
258# but WITHOUT ANY WARRANTY; without even the implied warranty of
259# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
260# GNU General Public License for more details.
261
262# You should have received a copy of the GNU General Public License
263# along with this program; if not, write to the Free Software
264# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
265
266# AM_AUTOMAKE_VERSION(VERSION)
267# ----------------------------
268# Automake X.Y traces this macro to ensure aclocal.m4 has been
269# generated from the m4 files accompanying Automake X.Y.
270AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
271
272# AM_SET_CURRENT_AUTOMAKE_VERSION
273# -------------------------------
274# Call AM_AUTOMAKE_VERSION so it can be traced.
275# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
276AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
277         [AM_AUTOMAKE_VERSION([1.8.5])])
278
279# AM_AUX_DIR_EXPAND
280
281# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
282
283# This program is free software; you can redistribute it and/or modify
284# it under the terms of the GNU General Public License as published by
285# the Free Software Foundation; either version 2, or (at your option)
286# any later version.
287
288# This program is distributed in the hope that it will be useful,
289# but WITHOUT ANY WARRANTY; without even the implied warranty of
290# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
291# GNU General Public License for more details.
292
293# You should have received a copy of the GNU General Public License
294# along with this program; if not, write to the Free Software
295# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
296# 02111-1307, USA.
297
298# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
299# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
300# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
301#
302# Of course, Automake must honor this variable whenever it calls a
303# tool from the auxiliary directory.  The problem is that $srcdir (and
304# therefore $ac_aux_dir as well) can be either absolute or relative,
305# depending on how configure is run.  This is pretty annoying, since
306# it makes $ac_aux_dir quite unusable in subdirectories: in the top
307# source directory, any form will work fine, but in subdirectories a
308# relative path needs to be adjusted first.
309#
310# $ac_aux_dir/missing
311#    fails when called from a subdirectory if $ac_aux_dir is relative
312# $top_srcdir/$ac_aux_dir/missing
313#    fails if $ac_aux_dir is absolute,
314#    fails when called from a subdirectory in a VPATH build with
315#          a relative $ac_aux_dir
316#
317# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
318# are both prefixed by $srcdir.  In an in-source build this is usually
319# harmless because $srcdir is `.', but things will broke when you
320# start a VPATH build or use an absolute $srcdir.
321#
322# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
323# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
324#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
325# and then we would define $MISSING as
326#   MISSING="\${SHELL} $am_aux_dir/missing"
327# This will work as long as MISSING is not called from configure, because
328# unfortunately $(top_srcdir) has no meaning in configure.
329# However there are other variables, like CC, which are often used in
330# configure, and could therefore not use this "fixed" $ac_aux_dir.
331#
332# Another solution, used here, is to always expand $ac_aux_dir to an
333# absolute PATH.  The drawback is that using absolute paths prevent a
334# configured tree to be moved without reconfiguration.
335
336AC_DEFUN([AM_AUX_DIR_EXPAND],
337[dnl Rely on autoconf to set up CDPATH properly.
338AC_PREREQ([2.50])dnl
339# expand $ac_aux_dir to an absolute path
340am_aux_dir=`cd $ac_aux_dir && pwd`
341])
342
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.
367AC_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
371AC_SUBST([$1_TRUE])
372AC_SUBST([$1_FALSE])
373if $2; then
374  $1_TRUE=
375  $1_FALSE='#'
376else
377  $1_TRUE='#'
378  $1_FALSE=
379fi
380AC_CONFIG_COMMANDS_PRE(
381[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
382  AC_MSG_ERROR([conditional "$1" was never defined.
383Usually this means the macro was only invoked conditionally.])
384fi])])
385
386# serial 7                                              -*- Autoconf -*-
387
388# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
389# Free Software Foundation, Inc.
390
391# This program is free software; you can redistribute it and/or modify
392# it under the terms of the GNU General Public License as published by
393# the Free Software Foundation; either version 2, or (at your option)
394# any later version.
395
396# This program is distributed in the hope that it will be useful,
397# but WITHOUT ANY WARRANTY; without even the implied warranty of
398# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
399# GNU General Public License for more details.
400
401# You should have received a copy of the GNU General Public License
402# along with this program; if not, write to the Free Software
403# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
404# 02111-1307, USA.
405
406
407# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
408# written in clear, in which case automake, when reading aclocal.m4,
409# will think it sees a *use*, and therefore will trigger all it's
410# C support machinery.  Also note that it means that autoscan, seeing
411# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
412
413
414
415# _AM_DEPENDENCIES(NAME)
416# ----------------------
417# See how the compiler implements dependency checking.
418# NAME is "CC", "CXX", "GCJ", or "OBJC".
419# We try a few techniques and use that to set a single cache variable.
420#
421# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
422# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
423# dependency, and given that the user is not expected to run this macro,
424# just rely on AC_PROG_CC.
425AC_DEFUN([_AM_DEPENDENCIES],
426[AC_REQUIRE([AM_SET_DEPDIR])dnl
427AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
428AC_REQUIRE([AM_MAKE_INCLUDE])dnl
429AC_REQUIRE([AM_DEP_TRACK])dnl
430
431ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
432       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
433       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
434       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
435                   [depcc="$$1"   am_compiler_list=])
436
437AC_CACHE_CHECK([dependency style of $depcc],
438               [am_cv_$1_dependencies_compiler_type],
439[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
440  # We make a subdir and do the tests there.  Otherwise we can end up
441  # making bogus files that we don't know about and never remove.  For
442  # instance it was reported that on HP-UX the gcc test will end up
443  # making a dummy file named `D' -- because `-MD' means `put the output
444  # in D'.
445  mkdir conftest.dir
446  # Copy depcomp to subdir because otherwise we won't find it if we're
447  # using a relative directory.
448  cp "$am_depcomp" conftest.dir
449  cd conftest.dir
450  # We will build objects and dependencies in a subdirectory because
451  # it helps to detect inapplicable dependency modes.  For instance
452  # both Tru64's cc and ICC support -MD to output dependencies as a
453  # side effect of compilation, but ICC will put the dependencies in
454  # the current directory while Tru64 will put them in the object
455  # directory.
456  mkdir sub
457
458  am_cv_$1_dependencies_compiler_type=none
459  if test "$am_compiler_list" = ""; then
460     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
461  fi
462  for depmode in $am_compiler_list; do
463    # Setup a source with many dependencies, because some compilers
464    # like to wrap large dependency lists on column 80 (with \), and
465    # we should not choose a depcomp mode which is confused by this.
466    #
467    # We need to recreate these files for each test, as the compiler may
468    # overwrite some of them when testing with obscure command lines.
469    # This happens at least with the AIX C compiler.
470    : > sub/conftest.c
471    for i in 1 2 3 4 5 6; do
472      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
476    done
477    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
478
479    case $depmode in
480    nosideeffect)
481      # after this tag, mechanisms are not by side-effect, so they'll
482      # only be used when explicitly requested
483      if test "x$enable_dependency_tracking" = xyes; then
484        continue
485      else
486        break
487      fi
488      ;;
489    none) break ;;
490    esac
491    # We check with `-c' and `-o' for the sake of the "dashmstdout"
492    # mode.  It turns out that the SunPro C++ compiler does not properly
493    # handle `-M -o', and we need to detect this.
494    if depmode=$depmode \
495       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
496       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
497       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
498         >/dev/null 2>conftest.err &&
499       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
500       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
501       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
502      # 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
511        am_cv_$1_dependencies_compiler_type=$depmode
512        break
513      fi
514    fi
515  done
516
517  cd ..
518  rm -rf conftest.dir
519else
520  am_cv_$1_dependencies_compiler_type=none
521fi
522])
523AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
524AM_CONDITIONAL([am__fastdep$1], [
525  test "x$enable_dependency_tracking" != xno \
526  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
527])
528
529
530# AM_SET_DEPDIR
531# -------------
532# Choose a directory name for dependency files.
533# This macro is AC_REQUIREd in _AM_DEPENDENCIES
534AC_DEFUN([AM_SET_DEPDIR],
535[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
536AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
537])
538
539
540# AM_DEP_TRACK
541# ------------
542AC_DEFUN([AM_DEP_TRACK],
543[AC_ARG_ENABLE(dependency-tracking,
544[  --disable-dependency-tracking  speeds up one-time build
545  --enable-dependency-tracking   do not reject slow dependency extractors])
546if test "x$enable_dependency_tracking" != xno; then
547  am_depcomp="$ac_aux_dir/depcomp"
548  AMDEPBACKSLASH='\'
549fi
550AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
551AC_SUBST([AMDEPBACKSLASH])
552])
553
554# Generate code to set up dependency tracking.   -*- Autoconf -*-
555
556# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
557
558# This program is free software; you can redistribute it and/or modify
559# it under the terms of the GNU General Public License as published by
560# the Free Software Foundation; either version 2, or (at your option)
561# any later version.
562
563# This program is distributed in the hope that it will be useful,
564# but WITHOUT ANY WARRANTY; without even the implied warranty of
565# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
566# GNU General Public License for more details.
567
568# You should have received a copy of the GNU General Public License
569# along with this program; if not, write to the Free Software
570# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
571# 02111-1307, USA.
572
573#serial 2
574
575# _AM_OUTPUT_DEPENDENCY_COMMANDS
576# ------------------------------
577AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
578[for mf in $CONFIG_FILES; do
579  # Strip MF so we end up with the name of the file.
580  mf=`echo "$mf" | sed -e 's/:.*$//'`
581  # Check whether this is an Automake generated Makefile or not.
582  # We used to match only the files named `Makefile.in', but
583  # some people rename them; so instead we look at the file content.
584  # Grep'ing the first line is not enough: some people post-process
585  # each Makefile.in and add a new line on top of each file to say so.
586  # So let's grep whole file.
587  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
588    dirpart=`AS_DIRNAME("$mf")`
589  else
590    continue
591  fi
592  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
593  # Extract the definition of DEP_FILES from the Makefile without
594  # running `make'.
595  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
596  test -z "$DEPDIR" && continue
597  # When using ansi2knr, U may be empty or an underscore; expand it
598  U=`sed -n 's/^U = //p' < "$mf"`
599  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
600  # We invoke sed twice because it is the simplest approach to
601  # changing $(DEPDIR) to its actual value in the expansion.
602  for file in `sed -n '
603    /^DEP_FILES = .*\\\\$/ {
604      s/^DEP_FILES = //
605      :loop
606        s/\\\\$//
607        p
608        n
609        /\\\\$/ b loop
610      p
611    }
612    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
613       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
614    # Make sure the directory exists.
615    test -f "$dirpart/$file" && continue
616    fdir=`AS_DIRNAME(["$file"])`
617    AS_MKDIR_P([$dirpart/$fdir])
618    # echo "creating $dirpart/$file"
619    echo '# dummy' > "$dirpart/$file"
620  done
621done
622])# _AM_OUTPUT_DEPENDENCY_COMMANDS
623
624
625# AM_OUTPUT_DEPENDENCY_COMMANDS
626# -----------------------------
627# This macro should only be invoked once -- use via AC_REQUIRE.
628#
629# This code is only required when automatic dependency tracking
630# is enabled.  FIXME.  This creates each `.P' file that we will
631# need in order to bootstrap the dependency handling code.
632AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
633[AC_CONFIG_COMMANDS([depfiles],
634     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
635     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
636])
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.
674AC_DEFUN([AM_INIT_AUTOMAKE],
675[AC_PREREQ([2.58])dnl
676dnl Autoconf wants to disallow AM_ names.  We explicitly allow
677dnl the ones we care about.
678m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
679AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
680AC_REQUIRE([AC_PROG_INSTALL])dnl
681# test to see if srcdir already configured
682if 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])
685fi
686
687# test whether we have cygpath
688if 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
694fi
695AC_SUBST([CYGPATH_W])
696
697# Define the identity of the package.
698dnl Distinguish between old-style and new-style calls.
699m4_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.
712AC_REQUIRE([AM_SANITY_CHECK])dnl
713AC_REQUIRE([AC_ARG_PROGRAM])dnl
714AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
715AM_MISSING_PROG(AUTOCONF, autoconf)
716AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
717AM_MISSING_PROG(AUTOHEADER, autoheader)
718AM_MISSING_PROG(MAKEINFO, makeinfo)
719AM_MISSING_PROG(AMTAR, tar)
720AM_PROG_INSTALL_SH
721AM_PROG_INSTALL_STRIP
722AC_REQUIRE([AM_PROG_MKDIR_P])dnl
723# We need awk for the "check" target.  The system "awk" is bad on
724# some platforms.
725AC_REQUIRE([AC_PROG_AWK])dnl
726AC_REQUIRE([AC_PROG_MAKE_SET])dnl
727AC_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
734AC_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.
749AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
750[# Compute $1's index in $config_headers.
751_am_stamp_count=1
752for _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
759done
760echo "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
783AC_DEFUN([AM_PROG_INSTALL_SH],
784[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
785install_sh=${install_sh-"$am_aux_dir/install-sh"}
786AC_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.
810AC_DEFUN([AM_SET_LEADING_DOT],
811[rm -rf .tst 2>/dev/null
812mkdir .tst 2>/dev/null
813if test -d .tst; then
814  am__leading_dot=.
815else
816  am__leading_dot=_
817fi
818rmdir .tst 2>/dev/null
819AC_SUBST([am__leading_dot])])
820
821# Check to see how 'make' treats includes.      -*- Autoconf -*-
822
823# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
824
825# This program is free software; you can redistribute it and/or modify
826# it under the terms of the GNU General Public License as published by
827# the Free Software Foundation; either version 2, or (at your option)
828# any later version.
829
830# This program is distributed in the hope that it will be useful,
831# but WITHOUT ANY WARRANTY; without even the implied warranty of
832# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
833# GNU General Public License for more details.
834
835# You should have received a copy of the GNU General Public License
836# along with this program; if not, write to the Free Software
837# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
838# 02111-1307, USA.
839
840# serial 2
841
842# AM_MAKE_INCLUDE()
843# -----------------
844# Check to see how make treats includes.
845AC_DEFUN([AM_MAKE_INCLUDE],
846[am_make=${MAKE-make}
847cat > confinc << 'END'
848am__doit:
849        @echo done
850.PHONY: am__doit
851END
852# If we don't find an include directive, just comment out the code.
853AC_MSG_CHECKING([for style of include used by $am_make])
854am__include="#"
855am__quote=
856_am_result=none
857# First try GNU make style include.
858echo "include confinc" > confmf
859# We grep out `Entering directory' and `Leaving directory'
860# messages which can occur if `w' ends up in MAKEFLAGS.
861# In particular we don't look at `^make:' because GNU make might
862# be invoked under some other name (usually "gmake"), in which
863# case it prints its new name instead of `make'.
864if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
865   am__include=include
866   am__quote=
867   _am_result=GNU
868fi
869# Now try BSD make style include.
870if test "$am__include" = "#"; then
871   echo '.include "confinc"' > confmf
872   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
873      am__include=.include
874      am__quote="\""
875      _am_result=BSD
876   fi
877fi
878AC_SUBST([am__include])
879AC_SUBST([am__quote])
880AC_MSG_RESULT([$_am_result])
881rm -f confinc confmf
882])
883
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# ------------------------------
908AC_DEFUN([AM_MISSING_PROG],
909[AC_REQUIRE([AM_MISSING_HAS_RUN])
910$1=${$1-"${am_missing_run}$2"}
911AC_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.
918AC_DEFUN([AM_MISSING_HAS_RUN],
919[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
920test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
921# Use eval to expand $SHELL
922if eval "$MISSING --run true"; then
923  am_missing_run="$MISSING --run "
924else
925  am_missing_run=
926  AC_MSG_WARN([`missing' script is too old or missing])
927fi
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.)
969AC_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 -- .'
978else
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)'
990  else
991    mkdir_p='$(install_sh) -d'
992  fi
993fi
994AC_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# -----------------------
1019AC_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.
1025AC_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.
1031AC_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.
1037AC_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# ---------------
1065AC_DEFUN([AM_SANITY_CHECK],
1066[AC_MSG_CHECKING([whether build environment is sane])
1067# Just in case
1068sleep 1
1069echo 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).
1075if (
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
1090alias in your environment])
1091   fi
1092
1093   test "$[2]" = conftest.file
1094   )
1095then
1096   # Ok.
1097   :
1098else
1099   AC_MSG_ERROR([newly created file is older than distributed files!
1100Check your system clock])
1101fi
1102AC_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).
1130AC_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.
1136dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1137if test "$cross_compiling" != no; then
1138  AC_CHECK_TOOL([STRIP], [strip], :)
1139fi
1140INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1141AC_SUBST([INSTALL_STRIP_PROGRAM])])
1142
Note: See TracBrowser for help on using the repository browser.