From: Todd C. Miller Date: Tue, 16 Nov 2010 15:02:26 +0000 (-0500) Subject: Fail with a more useful error if "ar" is not found. X-Git-Tag: SUDO_1_7_5~105 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b542b394c74692fdb1a91434eb0d0f7556e1022;p=sudo Fail with a more useful error if "ar" is not found. --HG-- branch : 1.7 --- diff --git a/configure b/configure index 0f5c6d6c0..821461027 100755 --- a/configure +++ b/configure @@ -6083,6 +6083,9 @@ else RANLIB="$ac_cv_prog_RANLIB" fi +if test X"$AR" = X"false"; then + as_fn_error "the \"ar\" utility is required to build sudo" "$LINENO" 5 +fi ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -6789,13 +6792,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6792: $ac_compile\"" >&5) + (eval echo "\"\$as_me:6795: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:6795: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:6798: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:6798: output\"" >&5) + (eval echo "\"\$as_me:6801: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -8000,7 +8003,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 8003 "configure"' > conftest.$ac_ext + echo '#line 8006 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9393,11 +9396,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9396: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9399: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9400: \$? = $ac_status" >&5 + echo "$as_me:9403: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9732,11 +9735,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9735: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9738: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9739: \$? = $ac_status" >&5 + echo "$as_me:9742: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9837,11 +9840,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9840: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9843: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9844: \$? = $ac_status" >&5 + echo "$as_me:9847: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9892,11 +9895,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9895: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9898: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9899: \$? = $ac_status" >&5 + echo "$as_me:9902: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12259,7 +12262,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12262 "configure" +#line 12265 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12355,7 +12358,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12358 "configure" +#line 12361 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/configure.in b/configure.in index 9ed1cfc1f..c00cbe4a8 100644 --- a/configure.in +++ b/configure.in @@ -1325,6 +1325,9 @@ AC_SEARCH_LIBS([strerror], [cposix]) AC_PROG_CPP AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) +if test X"$AR" = X"false"; then + AC_MSG_ERROR([the "ar" utility is required to build sudo]) +fi dnl dnl Libtool setup, we require libtool 2.2.6b or higher