Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/make Check for the location of sh on the path, and use...



details:   https://anonhg.NetBSD.org/src/rev/91ec03a9ae29
branches:  trunk
changeset: 526078:91ec03a9ae29
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Wed Apr 24 21:20:08 2002 +0000

description:
Check for the location of sh on the path, and use that to construct the
value for _PATH_DEFSHELLDIR.  In theory, _PATH_DEFSHELLDIR will also be
used to find csh, but ".SHELL csh" shouldn't be used anywhere in our source
tree, and this make shouldn't be used for other things.

This should cause nbmake to use the right shell for most purposes when
cross-compiling from Solaris.

diffstat:

 tools/make/configure    |  333 +++++++++++++++++++++++++++--------------------
 tools/make/configure.ac |   10 +-
 2 files changed, 200 insertions(+), 143 deletions(-)

diffs (truncated from 1056 to 300 lines):

diff -r 75c5827f1e25 -r 91ec03a9ae29 tools/make/configure
--- a/tools/make/configure      Wed Apr 24 21:17:31 2002 +0000
+++ b/tools/make/configure      Wed Apr 24 21:20:08 2002 +0000
@@ -925,6 +925,54 @@
 
 ac_config_files="$ac_config_files buildmake.sh"
 
+# Extract the first word of "sh", so it can be a program name with args.
+set dummy sh; ac_word=$2
+echo "$as_me:930: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_BSHELL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $BSHELL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_BSHELL="$BSHELL" # Let the user override the test with a path.
+  ;;
+  *)
+  ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+  IFS=$ac_save_IFS
+  test -z "$ac_dir" && ac_dir=.
+  if $as_executable_p "$ac_dir/$ac_word"; then
+   ac_cv_path_BSHELL="$ac_dir/$ac_word"
+   echo "$as_me:947: found $ac_dir/$ac_word" >&5
+   break
+fi
+done
+
+  ;;
+esac
+fi
+BSHELL=$ac_cv_path_BSHELL
+
+if test -n "$BSHELL"; then
+  echo "$as_me:958: result: $BSHELL" >&5
+echo "${ECHO_T}$BSHELL" >&6
+else
+  echo "$as_me:961: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test x"$BSHELL" = x; then
+       { { echo "$as_me:966: error: sh must be somewhere on \$PATH" >&5
+echo "$as_me: error: sh must be somewhere on \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+# Make wants to know what directory to find sh in.
+nb_path_defshelldir=`echo $BSHELL | sed 's,/sh$,,'`
+cat >>confdefs.h <<EOF
+#define _PATH_DEFSHELLDIR "$nb_path_defshelldir"
+EOF
+
 # Make sure we have POSIX regex ability.
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -934,7 +982,7 @@
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:937: checking for $ac_word" >&5
+echo "$as_me:985: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -949,7 +997,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CC="${ac_tool_prefix}gcc"
-echo "$as_me:952: found $ac_dir/$ac_word" >&5
+echo "$as_me:1000: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -957,10 +1005,10 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:960: result: $CC" >&5
+  echo "$as_me:1008: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:963: result: no" >&5
+  echo "$as_me:1011: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -969,7 +1017,7 @@
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-echo "$as_me:972: checking for $ac_word" >&5
+echo "$as_me:1020: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -984,7 +1032,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CC="gcc"
-echo "$as_me:987: found $ac_dir/$ac_word" >&5
+echo "$as_me:1035: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -992,10 +1040,10 @@
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:995: result: $ac_ct_CC" >&5
+  echo "$as_me:1043: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:998: result: no" >&5
+  echo "$as_me:1046: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1008,7 +1056,7 @@
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:1011: checking for $ac_word" >&5
+echo "$as_me:1059: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1023,7 +1071,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CC="${ac_tool_prefix}cc"
-echo "$as_me:1026: found $ac_dir/$ac_word" >&5
+echo "$as_me:1074: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1031,10 +1079,10 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1034: result: $CC" >&5
+  echo "$as_me:1082: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1037: result: no" >&5
+  echo "$as_me:1085: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1043,7 +1091,7 @@
   ac_ct_CC=$CC
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-echo "$as_me:1046: checking for $ac_word" >&5
+echo "$as_me:1094: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1058,7 +1106,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CC="cc"
-echo "$as_me:1061: found $ac_dir/$ac_word" >&5
+echo "$as_me:1109: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1066,10 +1114,10 @@
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1069: result: $ac_ct_CC" >&5
+  echo "$as_me:1117: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1072: result: no" >&5
+  echo "$as_me:1120: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1082,7 +1130,7 @@
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-echo "$as_me:1085: checking for $ac_word" >&5
+echo "$as_me:1133: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1102,7 +1150,7 @@
   continue
 fi
 ac_cv_prog_CC="cc"
-echo "$as_me:1105: found $ac_dir/$ac_word" >&5
+echo "$as_me:1153: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1124,10 +1172,10 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1127: result: $CC" >&5
+  echo "$as_me:1175: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1130: result: no" >&5
+  echo "$as_me:1178: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1138,7 +1186,7 @@
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:1141: checking for $ac_word" >&5
+echo "$as_me:1189: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1153,7 +1201,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-echo "$as_me:1156: found $ac_dir/$ac_word" >&5
+echo "$as_me:1204: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1161,10 +1209,10 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:1164: result: $CC" >&5
+  echo "$as_me:1212: result: $CC" >&5
 echo "${ECHO_T}$CC" >&6
 else
-  echo "$as_me:1167: result: no" >&5
+  echo "$as_me:1215: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1177,7 +1225,7 @@
 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 "$as_me:1180: checking for $ac_word" >&5
+echo "$as_me:1228: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1192,7 +1240,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_ac_ct_CC="$ac_prog"
-echo "$as_me:1195: found $ac_dir/$ac_word" >&5
+echo "$as_me:1243: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -1200,10 +1248,10 @@
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:1203: result: $ac_ct_CC" >&5
+  echo "$as_me:1251: result: $ac_ct_CC" >&5
 echo "${ECHO_T}$ac_ct_CC" >&6
 else
-  echo "$as_me:1206: result: no" >&5
+  echo "$as_me:1254: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -1215,32 +1263,32 @@
 
 fi
 
-test -z "$CC" && { { echo "$as_me:1218: error: no acceptable cc found in \$PATH" >&5
+test -z "$CC" && { { echo "$as_me:1266: error: no acceptable cc found in \$PATH" >&5
 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
    { (exit 1); exit 1; }; }
 
 # Provide some information about the compiler.
-echo "$as_me:1223:" \
+echo "$as_me:1271:" \
      "checking for C compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:1226: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1274: \"$ac_compiler --version </dev/null >&5\"") >&5
   (eval $ac_compiler --version </dev/null >&5) 2>&5
   ac_status=$?
-  echo "$as_me:1229: \$? = $ac_status" >&5
+  echo "$as_me:1277: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:1231: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1279: \"$ac_compiler -v </dev/null >&5\"") >&5
   (eval $ac_compiler -v </dev/null >&5) 2>&5
   ac_status=$?



Home | Main Index | Thread Index | Old Index