Skip to content

Commit

Permalink
Link with win32 API library on windows
Browse files Browse the repository at this point in the history
ChangeLog:

	* configure: Regenerate.
	* configure.ac: Link with kernel32 on windows

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
  • Loading branch information
P-E-P committed Sep 30, 2024
1 parent 1398a31 commit e5248a7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
19 changes: 13 additions & 6 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -8833,9 +8833,14 @@ fi
# build of the Rust frontend in case a dep is missing.
missing_rust_dynlibs=none

save_LIBS="$LIBS"
LIBS=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
case "${target}" in
*-*-mingw*)
CRAB1_LIBS="-lkernel32"
;;
*)
save_LIBS="$LIBS"
LIBS=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
$as_echo_n "checking for library containing dlopen... " >&6; }
if ${ac_cv_search_dlopen+:} false; then :
$as_echo_n "(cached) " >&6
Expand Down Expand Up @@ -8891,7 +8896,7 @@ if test "$ac_res" != no; then :

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5
$as_echo_n "checking for library containing pthread_create... " >&6; }
if ${ac_cv_search_pthread_create+:} false; then :
$as_echo_n "(cached) " >&6
Expand Down Expand Up @@ -8947,8 +8952,10 @@ if test "$ac_res" != no; then :

fi

CRAB1_LIBS="$LIBS"
LIBS="$save_LIBS"
CRAB1_LIBS="$LIBS"
LIBS="$save_LIBS"
;;
esac

if test "$ac_cv_search_dlopen" = no; then
missing_rust_dynlibs="libdl"
Expand Down
19 changes: 13 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2042,12 +2042,19 @@ AC_SUBST(PICFLAG)
# build of the Rust frontend in case a dep is missing.
missing_rust_dynlibs=none

save_LIBS="$LIBS"
LIBS=
AC_SEARCH_LIBS([dlopen], [dl])
AC_SEARCH_LIBS([pthread_create], [pthread])
CRAB1_LIBS="$LIBS"
LIBS="$save_LIBS"
case "${target}" in
*-*-mingw*)
CRAB1_LIBS="-lkernel32"
;;
*)
save_LIBS="$LIBS"
LIBS=
AC_SEARCH_LIBS([dlopen], [dl])
AC_SEARCH_LIBS([pthread_create], [pthread])
CRAB1_LIBS="$LIBS"
LIBS="$save_LIBS"
;;
esac

if test "$ac_cv_search_dlopen" = no; then
missing_rust_dynlibs="libdl"
Expand Down

0 comments on commit e5248a7

Please sign in to comment.