]> sourceware.org Git - automake.git/commitdiff
2001-02-17 Tom Tromey <tromey@redhat.com>
authorTom Tromey <tromey@redhat.com>
Sun, 18 Feb 2001 00:35:18 +0000 (00:35 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 18 Feb 2001 00:35:18 +0000 (00:35 +0000)
* automake.in (handle_merge_targets): Use double quotes around
setting of INSTALL_STRIP_PROGRAM.
* m4/strip.m4 (AM_PROG_INSTALL_STRIP): Set INSTALL_STRIP_PROGRAM
to absolute path at runtime.
(AM_PROG_STRIP): Don't explicitly test $STRIP.

2001-01-28  Alexandre Duret-Lutz  <duret_g@epita.fr>

* m4/strip.m4: New file.
* m4/Makefile.am (m4data_DATA): Add strip.m4.
* m4/init.m4: Call AM_PROG_INSTALL_STRIP.
* m4/missing.m4 (AM_AUX_DIR_EXPAND): New function.
(AM_MISSING_INSTALL_SH, AM_MISSING_HAS_RUN): Use $am_aux_dir instead
of $ac_aux_dir, and require AM_AUX_DIR_EXPAND.
* m4/depend.m4 (AM_DEP_TRACK): Likewise.
* automake.in (handle_merge_targets): In the install-strip rule,
set INSTALL_PROGRAM to INSTALL_STRIP_PROGRAM, and INSTALL_PROGRAM_ENV
to INSTALL_STRIP_PROGRAM_ENV; don't use INSTALL_STRIP_FLAG.
* progs.am (install-@DIR@PROGRAMS): Adapt to use INSTALL_PROGRAM_ENV,
don't use INSTALL_STRIP_FLAG any longer.
* header-vars.am (INSTALL_STRIP_FLAG): Remove.
(INSTALL_PROGRAM_ENV): New variable.

13 files changed:
ChangeLog
Makefile.in
aclocal.m4
automake.in
configure
lib/am/progs.am
m4/Makefile.am
m4/Makefile.in
m4/init.m4
m4/missing.m4
m4/strip.m4 [new file with mode: 0644]
progs.am
tests/Makefile.in

index 6be6a38f0c25e045c7c92012abe7199d04a7fb56..800770308fc4ea5db038a92fb620472dcb71ba79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2001-02-17  Tom Tromey  <tromey@redhat.com>
+
+       * automake.in (handle_merge_targets): Use double quotes around
+       setting of INSTALL_STRIP_PROGRAM.
+       * m4/strip.m4 (AM_PROG_INSTALL_STRIP): Set INSTALL_STRIP_PROGRAM
+       to absolute path at runtime.
+       (AM_PROG_STRIP): Don't explicitly test $STRIP.
+
+2001-01-28  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * m4/strip.m4: New file.
+       * m4/Makefile.am (m4data_DATA): Add strip.m4.
+       * m4/init.m4: Call AM_PROG_INSTALL_STRIP.
+       * m4/missing.m4 (AM_AUX_DIR_EXPAND): New function.
+       (AM_MISSING_INSTALL_SH, AM_MISSING_HAS_RUN): Use $am_aux_dir instead
+       of $ac_aux_dir, and require AM_AUX_DIR_EXPAND.
+       * m4/depend.m4 (AM_DEP_TRACK): Likewise.
+       * automake.in (handle_merge_targets): In the install-strip rule,
+       set INSTALL_PROGRAM to INSTALL_STRIP_PROGRAM, and INSTALL_PROGRAM_ENV
+       to INSTALL_STRIP_PROGRAM_ENV; don't use INSTALL_STRIP_FLAG.
+       * progs.am (install-@DIR@PROGRAMS): Adapt to use INSTALL_PROGRAM_ENV,
+       don't use INSTALL_STRIP_FLAG any longer.
+       * header-vars.am (INSTALL_STRIP_FLAG): Remove.
+       (INSTALL_PROGRAM_ENV): New variable.
+
 2001-02-16  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * automake.in (scan_one_configure_file): Unquote AC_CONFIG_AUX_DIR's
index 17f4deca8d239f44e2e633a8c0e459690c6a5506..f0f3bc8da993edd47a07fcb689f4c7848b7a1108 100644 (file)
@@ -59,13 +59,18 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 
 @SET_MAKE@
+host_alias = @host_alias@
+host_triplet = @host@
 AMDEP = @AMDEP@
 AMTAR = @AMTAR@
 AWK = @AWK@
 DEPDIR = @DEPDIR@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PERL = @PERL@
+STRIP = @STRIP@
 VERSION = @VERSION@
 _am_include = @_am_include@
 install_sh = @install_sh@
@@ -553,7 +558,8 @@ uninstall-am: uninstall-binSCRIPTS uninstall-info \
 uninstall: uninstall-recursive
 all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(DATA)
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_STRIP_PROGRAM)' \
+         INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
 installdirs: installdirs-recursive
 installdirs-am:
        $(mkinstalldirs)  $(DESTDIR)$(bindir) $(DESTDIR)$(infodir) \
index aa3055efabe686f670d6f87a01aac62eda265f3c..10a1adbe1266645d1878bbc5855a4d92400df4ad 100644 (file)
@@ -80,6 +80,7 @@ AM_MISSING_PROG(AUTOHEADER, autoheader)
 AM_MISSING_PROG(MAKEINFO, makeinfo)
 AM_MISSING_PROG(AMTAR, tar)
 AM_MISSING_INSTALL_SH
+AM_PROG_INSTALL_STRIP
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
@@ -190,6 +191,77 @@ else
 fi
 ])
 
+# AM_AUX_DIR_EXPAND
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to ${srcdir}/foo.  In other projects, it is set to `.'.
+# Of course, Automake must honor this variable whenever it call a tool
+# from the auxiliary directory.  The problem is that $srcdir (hence
+# $ac_aux_dir) can be either an absolute path or a path relative to
+# $top_srcdir or absolute, this depends on how configure is run.  This
+# is pretty anoying since it makes $ac_aux_dir quite unusable in
+# subdirectories: on the top source directory, any form will work
+# fine, but in subdirectories relative pat needs to be adapted.
+# - calling $top_srcidr/$ac_aux_dir/missing would success if $srcdir is
+#   relative, but fail if $srcdir is absolute
+# - conversly, calling $ax_aux_dir/missing would fail if $srcdir is
+#   absolute, and success on relative paths.
+#
+# Consequently, we define and use $am_aux_dir, the "always absolute"
+# version of $ac_aux_dir.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
+])
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross=compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so if we ever
+# need to use a non standard strip, we just have to make sure we use
+# install-sh with the STRIPPROG variable set.
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_MISSING_INSTALL_SH])
+dnl Don't test for $cross_compiling = yes, it might be `maybe'...
+if test "$cross_compiling" != no; then
+  # since we are cross-compiling, we need to check for a suitable `strip'
+  AM_PROG_STRIP
+  if test -z "$STRIP"; then
+    AC_MSG_WARN([strip missing, install-strip will not strip binaries])
+  fi
+fi
+
+# If $STRIP is defined (either by the user, or by AM_PROG_STRIP),
+# instruct install-strip to use install-sh and the given $STRIP program.
+# Otherwise, just use ${INSTALL}: the idea is to use the vendor install
+# as much as possible, because it's faster.
+if test -z "$STRIP"; then
+  # The top level make will set INSTALL_PROGRAM=$(INSTALL_STRIP_PROGRAM)
+  # and the double dolard below is there to make sure that ${INSTALL}
+  # is substitued in the sub-makes, not at the top-level; this is
+  # needed if ${INSTALL} is a relative path (ajusted in each subdirectory
+  # by config.status).
+  INSTALL_STRIP_PROGRAM='$${INSTALL} -s'
+  INSTALL_STRIP_PROGRAM_ENV=''
+else
+  _am_dirpart="`echo $install_sh | sed -e 's,//*[[^/]]*$,,'`"
+  INSTALL_STRIP_PROGRAM="\${SHELL} \`cd $_am_dirpart && pwd\`/install-sh -c -s"
+  INSTALL_STRIP_PROGRAM_ENV="STRIPPROG='$STRIP'"
+fi
+AC_SUBST([INSTALL_STRIP_PROGRAM])
+AC_SUBST([INSTALL_STRIP_PROGRAM_ENV])])
+
+AC_DEFUN([AM_PROG_STRIP],
+[# Check for `strip', unless the installer
+# has set the STRIP environment variable.
+# Note: don't explicitly check for -z "$STRIP" here because
+# that will cause problems if AC_CANONICAL_* is AC_REQUIREd after
+# this macro, and anyway it doesn't have an effect anyway.
+AC_CHECK_TOOL([STRIP],[strip])
+])
+
 # serial 3
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
index 51187fae88e39d4be1d50853698ee53e0c145a28..81a339a56f0f90b72e2625fd7ca2e057093cb4b9 100755 (executable)
@@ -3719,10 +3719,18 @@ sub handle_merge_targets
 
     &do_one_merge_target ('all', @all);
 
-    # Generate the new 'install-strip' target.  We can't just set
-    # INSTALL_PROGRAM because that might be a relative path.
+    # Generate the new 'install-strip' target.  (If you ever modify
+    # this, keep in mind that INSTALL_PROGRAM is used in
+    # subdirectories, so never set it to a value relative to
+    # the top directory.)
     $output_rules .= ("install-strip:\n\t"
-                     . '$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install'
+                     . '$(MAKE) $(AM_MAKEFLAGS) '
+                     # Use double quotes here because we might need
+                     # to interpolate some backquotes at runtime.
+                     . "INSTALL_PROGRAM=\"\$(INSTALL_STRIP_PROGRAM)\" "
+                     . "\\\n\t  "
+                     . "INSTALL_PROGRAM_ENV='\$(INSTALL_STRIP_PROGRAM_ENV)' "
+                     . 'install'
                      . "\n");
     &depend ('.PHONY', 'install-strip');
 }
index 6fb1dd9e9facd6870878392b94e422d2249d797f..296f3ed0ae6af8f2fa0d1053c654327aa12d0822 100755 (executable)
--- a/configure
+++ b/configure
@@ -544,6 +544,51 @@ ac_config_guess=$ac_aux_dir/config.guess
 ac_config_sub=$ac_aux_dir/config.sub
 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:555: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:576: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE) build_alias=$host_alias ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
@@ -556,7 +601,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:560: checking for a BSD compatible install" >&5
+echo "configure:605: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -609,7 +654,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:613: checking whether build environment is sane" >&5
+echo "configure:658: checking whether build environment is sane" >&5
 # Just in case
 sleep 1
 echo timestamp > conftest.file
@@ -676,12 +721,18 @@ else
   echo "configure: warning: ${am_backtick}missing' script is too old or missing" 1>&2
 fi
 
+if test $host != $build; then
+  ac_tool_prefix=${host_alias}-
+else
+  ac_tool_prefix=
+fi
+
 for ac_prog in gawk mawk nawk awk
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:685: checking for $ac_word" >&5
+echo "configure:736: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -711,7 +762,7 @@ test -n "$AWK" && break
 done
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:715: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:766: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -833,6 +884,71 @@ if test -z "$install_sh"; then
    install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
 fi
 
+
+if test "$cross_compiling" != no; then
+  # since we are cross-compiling, we need to check for a suitable `strip'
+  # Check for `strip', unless the installer
+# has set the STRIP environment variable.
+# Note: don't explicitly check for -z "$STRIP" here because
+# that will cause problems if AC_CANONICAL_* is AC_REQUIREd after
+# this macro, and anyway it doesn't have an effect anyway.
+# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:899: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP="strip"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+  echo "$ac_t""$STRIP" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+
+  if test -z "$STRIP"; then
+    echo "configure: warning: strip missing, install-strip will not strip binaries" 1>&2
+  fi
+fi
+
+# If $STRIP is defined (either by the user, or by AM_PROG_STRIP),
+# instruct install-strip to use install-sh and the given $STRIP program.
+# Otherwise, just use ${INSTALL}: the idea is to use the vendor install
+# as much as possible, because it's faster.
+if test -z "$STRIP"; then
+  # The top level make will set INSTALL_PROGRAM=$(INSTALL_STRIP_PROGRAM)
+  # and the double dolard below is there to make sure that ${INSTALL}
+  # is substitued in the sub-makes, not at the top-level; this is
+  # needed if ${INSTALL} is a relative path (ajusted in each subdirectory
+  # by config.status).
+  INSTALL_STRIP_PROGRAM='$${INSTALL} -s'
+  INSTALL_STRIP_PROGRAM_ENV=''
+else
+  _am_dirpart="`echo $install_sh | sed -e 's,//*[^/]*$,,'`"
+  INSTALL_STRIP_PROGRAM="\${SHELL} \`cd $_am_dirpart && pwd\`/install-sh -c -s"
+  INSTALL_STRIP_PROGRAM_ENV="STRIPPROG='$STRIP'"
+fi
+
+
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 
@@ -843,7 +959,7 @@ AUTOMAKE="`pwd`/automake --amdir=."
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:847: checking for $ac_word" >&5
+echo "configure:963: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1039,6 +1155,19 @@ s%@AUTOHEADER@%$AUTOHEADER%g
 s%@MAKEINFO@%$MAKEINFO%g
 s%@AMTAR@%$AMTAR%g
 s%@install_sh@%$install_sh%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@STRIP@%$STRIP%g
+s%@INSTALL_STRIP_PROGRAM@%$INSTALL_STRIP_PROGRAM%g
+s%@INSTALL_STRIP_PROGRAM_ENV@%$INSTALL_STRIP_PROGRAM_ENV%g
 s%@AWK@%$AWK%g
 s%@SET_MAKE@%$SET_MAKE%g
 s%@AMDEP@%$AMDEP%g
index cbaa75514100bbb1cf688384388e54c7fd51f574..6ea889823b49c73b4dceb2cbce9fa20641208d3b 100644 (file)
@@ -26,8 +26,8 @@ install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS)
 ## lossage if the install program doesn't have a name that libtool
 ## expects.
            f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
-           echo " @LIBTOOL --mode=install@ $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(@NDIR@dir)/$$f"; \
-           @LIBTOOL --mode=install@ $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(@NDIR@dir)/$$f; \
+           echo " $(INSTALL_PROGRAM_ENV) @LIBTOOL --mode=install@ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(@NDIR@dir)/$$f"; \
+           $(INSTALL_PROGRAM_ENV) @LIBTOOL --mode=install@ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(@NDIR@dir)/$$f; \
          else :; fi; \
        done
 
index 88d06f38d3d5f06925e31ca68723ba6750d4f10d..c7421c50c171e5cf5e660d48166e15be9a12657a 100644 (file)
@@ -7,6 +7,7 @@ m4datadir = $(datadir)/aclocal
 m4data_DATA = ccstdc.m4 cond.m4 depend.m4 depout.m4 dmalloc.m4 \
 error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 make.m4 \
 maintainer.m4 minuso.m4 missing.m4 multi.m4 obstack.m4 protos.m4 \
-ptrdiff.m4 python.m4 regex.m4 sanity.m4 strtod.m4 termios.m4 winsz.m4
+ptrdiff.m4 python.m4 regex.m4 sanity.m4 strip.m4 strtod.m4 termios.m4 \
+winsz.m4
 
 EXTRA_DIST = $(m4data_DATA)
index edafec349e964d6dc2f57db7f4436c051380e166..e12ae467ffd82aecd989f7eb055e886a29fd0035 100644 (file)
@@ -59,13 +59,18 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 
 @SET_MAKE@
+host_alias = @host_alias@
+host_triplet = @host@
 AMDEP = @AMDEP@
 AMTAR = @AMTAR@
 AWK = @AWK@
 DEPDIR = @DEPDIR@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PERL = @PERL@
+STRIP = @STRIP@
 VERSION = @VERSION@
 _am_include = @_am_include@
 install_sh = @install_sh@
@@ -78,7 +83,8 @@ m4datadir = $(datadir)/aclocal
 m4data_DATA = ccstdc.m4 cond.m4 depend.m4 depout.m4 dmalloc.m4 \
 error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 make.m4 \
 maintainer.m4 minuso.m4 missing.m4 multi.m4 obstack.m4 protos.m4 \
-ptrdiff.m4 python.m4 regex.m4 sanity.m4 strtod.m4 termios.m4 winsz.m4
+ptrdiff.m4 python.m4 regex.m4 sanity.m4 strip.m4 strtod.m4 termios.m4 \
+winsz.m4
 
 
 EXTRA_DIST = $(m4data_DATA)
@@ -161,7 +167,8 @@ uninstall-am: uninstall-m4dataDATA
 uninstall: uninstall-am
 all-am: Makefile $(DATA)
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_STRIP_PROGRAM)' \
+         INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
 installdirs:
        $(mkinstalldirs)  $(DESTDIR)$(m4datadir)
 
index 1afd69d2f5bd74690528473df83b2f324844064d..43850873c8dfd1a8f0a0f2b34981d34465ff3124 100644 (file)
@@ -67,6 +67,7 @@ AM_MISSING_PROG(AUTOHEADER, autoheader)
 AM_MISSING_PROG(MAKEINFO, makeinfo)
 AM_MISSING_PROG(AMTAR, tar)
 AM_MISSING_INSTALL_SH
+AM_PROG_INSTALL_STRIP
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
index 1831f4ee4ed7463a4a215d02cf109338e92c362b..9a75451514eb2bf71f0330aded78d55543d44ac6 100644 (file)
@@ -47,3 +47,27 @@ else
   AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
 fi
 ])
+
+# AM_AUX_DIR_EXPAND
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to ${srcdir}/foo.  In other projects, it is set to `.'.
+# Of course, Automake must honor this variable whenever it call a tool
+# from the auxiliary directory.  The problem is that $srcdir (hence
+# $ac_aux_dir) can be either an absolute path or a path relative to
+# $top_srcdir or absolute, this depends on how configure is run.  This
+# is pretty anoying since it makes $ac_aux_dir quite unusable in
+# subdirectories: on the top source directory, any form will work
+# fine, but in subdirectories relative pat needs to be adapted.
+# - calling $top_srcidr/$ac_aux_dir/missing would success if $srcdir is
+#   relative, but fail if $srcdir is absolute
+# - conversly, calling $ax_aux_dir/missing would fail if $srcdir is
+#   absolute, and success on relative paths.
+#
+# Consequently, we define and use $am_aux_dir, the "always absolute"
+# version of $ac_aux_dir.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
+])
diff --git a/m4/strip.m4 b/m4/strip.m4
new file mode 100644 (file)
index 0000000..2948166
--- /dev/null
@@ -0,0 +1,46 @@
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross=compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so if we ever
+# need to use a non standard strip, we just have to make sure we use
+# install-sh with the STRIPPROG variable set.
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_MISSING_INSTALL_SH])
+dnl Don't test for $cross_compiling = yes, it might be `maybe'...
+if test "$cross_compiling" != no; then
+  # since we are cross-compiling, we need to check for a suitable `strip'
+  AM_PROG_STRIP
+  if test -z "$STRIP"; then
+    AC_MSG_WARN([strip missing, install-strip will not strip binaries])
+  fi
+fi
+
+# If $STRIP is defined (either by the user, or by AM_PROG_STRIP),
+# instruct install-strip to use install-sh and the given $STRIP program.
+# Otherwise, just use ${INSTALL}: the idea is to use the vendor install
+# as much as possible, because it's faster.
+if test -z "$STRIP"; then
+  # The top level make will set INSTALL_PROGRAM=$(INSTALL_STRIP_PROGRAM)
+  # and the double dolard below is there to make sure that ${INSTALL}
+  # is substitued in the sub-makes, not at the top-level; this is
+  # needed if ${INSTALL} is a relative path (ajusted in each subdirectory
+  # by config.status).
+  INSTALL_STRIP_PROGRAM='$${INSTALL} -s'
+  INSTALL_STRIP_PROGRAM_ENV=''
+else
+  _am_dirpart="`echo $install_sh | sed -e 's,//*[[^/]]*$,,'`"
+  INSTALL_STRIP_PROGRAM="\${SHELL} \`CDPATH=: && cd $_am_dirpart && pwd\`/install-sh -c -s"
+  INSTALL_STRIP_PROGRAM_ENV="STRIPPROG='$STRIP'"
+fi
+AC_SUBST([INSTALL_STRIP_PROGRAM])
+AC_SUBST([INSTALL_STRIP_PROGRAM_ENV])])
+
+AC_DEFUN([AM_PROG_STRIP],
+[# Check for `strip', unless the installer
+# has set the STRIP environment variable.
+# Note: don't explicitly check for -z "$STRIP" here because
+# that will cause problems if AC_CANONICAL_* is AC_REQUIREd after
+# this macro, and anyway it doesn't have an effect anyway.
+AC_CHECK_TOOL([STRIP],[strip])
+])
index cbaa75514100bbb1cf688384388e54c7fd51f574..6ea889823b49c73b4dceb2cbce9fa20641208d3b 100644 (file)
--- a/progs.am
+++ b/progs.am
@@ -26,8 +26,8 @@ install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS)
 ## lossage if the install program doesn't have a name that libtool
 ## expects.
            f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
-           echo " @LIBTOOL --mode=install@ $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(@NDIR@dir)/$$f"; \
-           @LIBTOOL --mode=install@ $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(@NDIR@dir)/$$f; \
+           echo " $(INSTALL_PROGRAM_ENV) @LIBTOOL --mode=install@ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(@NDIR@dir)/$$f"; \
+           $(INSTALL_PROGRAM_ENV) @LIBTOOL --mode=install@ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(@NDIR@dir)/$$f; \
          else :; fi; \
        done
 
index 361dce757042ce014d76cf79cb58f99acfe6b9c6..9868f9d702d91a65261877a2d818391bf3395119 100644 (file)
@@ -59,13 +59,18 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 
 @SET_MAKE@
+host_alias = @host_alias@
+host_triplet = @host@
 AMDEP = @AMDEP@
 AMTAR = @AMTAR@
 AWK = @AWK@
 DEPDIR = @DEPDIR@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PERL = @PERL@
+STRIP = @STRIP@
 VERSION = @VERSION@
 _am_include = @_am_include@
 install_sh = @install_sh@
@@ -461,7 +466,8 @@ uninstall-am:
 uninstall: uninstall-am
 all-am: Makefile
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_STRIP_PROGRAM)' \
+         INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
 installdirs:
 
 
This page took 0.051345 seconds and 5 git commands to generate.