File tree 2 files changed +16
-14
lines changed 2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -8829,9 +8829,12 @@ fi
8829
8829
8830
8830
# Rust requires -ldl and -lpthread if you are using an old glibc that does not include them by
8831
8831
# default, so we check for them here
8832
-
8832
+ # We are doing the test here and not in the gcc/configure to be able to nicely disable the
8833
+ # build of the Rust frontend in case a dep is missing.
8833
8834
missing_rust_dynlibs=none
8834
8835
8836
+ save_LIBS="$LIBS"
8837
+ LIBS=
8835
8838
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8836
8839
$as_echo_n "checking for library containing dlopen... " >&6; }
8837
8840
if ${ac_cv_search_dlopen+:} false; then :
@@ -8944,16 +8947,14 @@ if test "$ac_res" != no; then :
8944
8947
8945
8948
fi
8946
8949
8950
+ CRAB1_LIBS="$LIBS"
8951
+ LIBS="$save_LIBS"
8947
8952
8948
- if test $ac_cv_search_dlopen = -ldl; then
8949
- CRAB1_LIBS="$CRAB1_LIBS -ldl"
8950
- elif test $ac_cv_search_dlopen = no; then
8953
+ if test "$ac_cv_search_dlopen" = no; then
8951
8954
missing_rust_dynlibs="libdl"
8952
8955
fi
8953
8956
8954
- if test $ac_cv_search_pthread_create = -lpthread; then
8955
- CRAB1_LIBS="$CRAB1_LIBS -lpthread"
8956
- elif test $ac_cv_search_pthread_crate = no; then
8957
+ if test "$ac_cv_search_pthread_create" = no; then
8957
8958
missing_rust_dynlibs="$missing_rust_dynlibs, libpthread"
8958
8959
fi
8959
8960
Original file line number Diff line number Diff line change @@ -2038,21 +2038,22 @@ AC_SUBST(PICFLAG)
2038
2038
2039
2039
# Rust requires -ldl and -lpthread if you are using an old glibc that does not include them by
2040
2040
# default, so we check for them here
2041
-
2041
+ # We are doing the test here and not in the gcc/configure to be able to nicely disable the
2042
+ # build of the Rust frontend in case a dep is missing.
2042
2043
missing_rust_dynlibs=none
2043
2044
2045
+ save_LIBS="$LIBS"
2046
+ LIBS=
2044
2047
AC_SEARCH_LIBS ( [ dlopen] , [ dl] )
2045
2048
AC_SEARCH_LIBS ( [ pthread_create] , [ pthread] )
2049
+ CRAB1_LIBS="$LIBS"
2050
+ LIBS="$save_LIBS"
2046
2051
2047
- if test $ac_cv_search_dlopen = -ldl; then
2048
- CRAB1_LIBS="$CRAB1_LIBS -ldl"
2049
- elif test $ac_cv_search_dlopen = no; then
2052
+ if test "$ac_cv_search_dlopen" = no; then
2050
2053
missing_rust_dynlibs="libdl"
2051
2054
fi
2052
2055
2053
- if test $ac_cv_search_pthread_create = -lpthread; then
2054
- CRAB1_LIBS="$CRAB1_LIBS -lpthread"
2055
- elif test $ac_cv_search_pthread_crate = no; then
2056
+ if test "$ac_cv_search_pthread_create" = no; then
2056
2057
missing_rust_dynlibs="$missing_rust_dynlibs, libpthread"
2057
2058
fi
2058
2059
You can’t perform that action at this time.
0 commit comments