From b66c646519bb17eb926df1849c4aefad1f4e1e16 Mon Sep 17 00:00:00 2001 From: Russell Bryant <russell@russellbryant.com> Date: Thu, 24 May 2007 20:44:46 +0000 Subject: [PATCH] Merged revisions 66026 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r66026 | russell | 2007-05-24 15:42:53 -0500 (Thu, 24 May 2007) | 3 lines Checking for the strip application needs to be done with AC_PATH_TOOL instead of AC_PATH_PROG to properly handle cross compilation environments. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66027 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- configure | 148 ++++++++++++++++++++++++++++++++++++--------------- configure.ac | 3 +- 2 files changed, 107 insertions(+), 44 deletions(-) diff --git a/configure b/configure index 081eafd282..11bc145e69 100755 --- a/configure +++ b/configure @@ -699,6 +699,7 @@ INSTALL_SCRIPT INSTALL_DATA LN_S GNU_MAKE +STRIP GNU_LD FIND COMPRESS @@ -707,7 +708,6 @@ ID DIRNAME LN DOT -STRIP WGET RUBBER FETCH @@ -6573,6 +6573,109 @@ fi +if test -n "$ac_tool_prefix"; then + # 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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $STRIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +STRIP=$ac_cv_path_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_STRIP"; then + ac_pt_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ac_pt_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_STRIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_STRIP="$ac_pt_STRIP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_STRIP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_STRIP=$ac_cv_path_ac_pt_STRIP +if test -n "$ac_pt_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_pt_STRIP" >&5 +echo "${ECHO_T}$ac_pt_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_pt_STRIP + fi +else + STRIP="$ac_cv_path_STRIP" +fi + + GNU_LD=0 if test "x$with_gnu_ld" = "xyes" ; then GNU_LD=1 @@ -6989,47 +7092,6 @@ echo "${ECHO_T}no" >&6; } fi -# Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $STRIP in - [\\/]* | ?:[\\/]*) - ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_STRIP" && ac_cv_path_STRIP=":" - ;; -esac -fi -STRIP=$ac_cv_path_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - # Extract the first word of "wget", so it can be a program name with args. set dummy wget; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -35588,6 +35650,7 @@ INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim LN_S!$LN_S$ac_delim GNU_MAKE!$GNU_MAKE$ac_delim +STRIP!$STRIP$ac_delim GNU_LD!$GNU_LD$ac_delim FIND!$FIND$ac_delim COMPRESS!$COMPRESS$ac_delim @@ -35596,7 +35659,6 @@ ID!$ID$ac_delim DIRNAME!$DIRNAME$ac_delim LN!$LN$ac_delim DOT!$DOT$ac_delim -STRIP!$STRIP$ac_delim WGET!$WGET$ac_delim RUBBER!$RUBBER$ac_delim FETCH!$FETCH$ac_delim diff --git a/configure.ac b/configure.ac index fd898c11b9..1600b35d4b 100644 --- a/configure.ac +++ b/configure.ac @@ -135,6 +135,8 @@ AC_PROG_LN_S AC_PROG_RANLIB AST_CHECK_GNU_MAKE +AC_PATH_TOOL([STRIP], [strip], :) + GNU_LD=0 if test "x$with_gnu_ld" = "xyes" ; then GNU_LD=1 @@ -151,7 +153,6 @@ AC_PATH_PROG([DIRNAME], [dirname], :) AC_PATH_PROG([SHELL], [sh], :) AC_PATH_PROG([LN], [ln], :) AC_PATH_PROG([DOT], [dot], :) -AC_PATH_PROG([STRIP], [strip], :) AC_PATH_PROG([WGET], [wget], :) AC_PATH_PROG([RUBBER], [rubber], :) if test "${WGET}" != ":" ; then -- GitLab