Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for cargo during libgrust configuration #2938

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libgrust/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CARGO = @CARGO@
CC = @CC@
CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
Expand Down
46 changes: 44 additions & 2 deletions libgrust/configure
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ LD
FGREP
SED
LIBTOOL
CARGO
am__fastdepCCAS_FALSE
am__fastdepCCAS_TRUE
CCASDEPMODE
Expand Down Expand Up @@ -6439,6 +6440,47 @@ $as_echo "no" >&6; }
fi


# Extract the first word of "cargo", so it can be a program name with args.
set dummy cargo; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CARGO+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CARGO"; then
ac_cv_prog_CARGO="$CARGO" # Let the user override the test.
else
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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CARGO="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

test -z "$ac_cv_prog_CARGO" && ac_cv_prog_CARGO="no"
fi
fi
CARGO=$ac_cv_prog_CARGO
if test -n "$CARGO"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CARGO" >&5
$as_echo "$CARGO" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


if test x$CARGO = xno; then :
as_fn_error $? "cargo is required to build some parts of the compiler." "$LINENO" 5
fi

# Enable libtool
case `pwd` in
Expand Down Expand Up @@ -12655,7 +12697,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 12658 "configure"
#line 12700 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
Expand Down Expand Up @@ -12761,7 +12803,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 12764 "configure"
#line 12806 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
Expand Down
2 changes: 2 additions & 0 deletions libgrust/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ AC_PROG_CXX
AM_PROG_AS
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_CHECK_PROG(CARGO, [cargo], [yes], [no])
AS_IF(test x$CARGO = xno,AC_MSG_ERROR([cargo is required to build some parts of the compiler.]))

# Enable libtool
LT_INIT
Expand Down
1 change: 1 addition & 0 deletions libgrust/libproc_macro_internal/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CARGO = @CARGO@
CC = @CC@
CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
Expand Down
Loading