    *-pc-windows* | *-pc-winnt* | *-cygwin* | *-mingw*)
      if test "$bx_plugins" = 1; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opendir in -lmingwex" >&5
+diff --git a/configure.in b/configure.in
+index e8a576b..578103d 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1867,7 +1867,7 @@ SLASH="/"
+ CXXFP=""
+ CFP=""
+ OFP="-o "
+-MAKELIB="ar rv \$@"
++MAKELIB="\$(AR) rv \$@"
+ RMCOMMAND="rm -f "
+ # first define link variables without libtool
+ LINK="\$(CXX) -o \$@ \$(CXXFLAGS) \$(LDFLAGS)"
 diff --git a/cpu/Makefile.in b/cpu/Makefile.in
 index a6541fd..4d657e9 100644
 --- a/cpu/Makefile.in

 
 misc/niclist.o: $(srcdir)/misc/niclist.c
 	$(CC) @DASH@c $(BX_INCDIRS) $(CFLAGS_CONSOLE) $(srcdir)/misc/niclist.c @OFP@$@
diff --git a/config.cc b/config.cc
index 5b752d7..fd35bdc 100755
--- a/config.cc

 fi
 rm -f conftest conftest$ac_cv_exeext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -23746,7 +23747,7 @@ SLASH="/"
 CXXFP=""
 CFP=""
 OFP="-o "
-MAKELIB="ar rv \$@"
+MAKELIB="\$(AR) rv \$@"
 RMCOMMAND="rm -f "
 # first define link variables without libtool
 LINK="\$(CXX) -o \$@ \$(CXXFLAGS) \$(LDFLAGS)"
@@ -24340,6 +24341,10 @@ fi
 DIALOG_OBJS=""
 EXPORT_DYNAMIC="-export-dynamic"
