diff --git a/Makefile.in b/Makefile.in
index 5f27eef6e6b1298e7a81dfc44536766a30bf5313..21dda19cde08dd067fdb3f0f4470549bf99942fa 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -87,7 +87,7 @@ bn_mp_to_signed_bin_n.o bn_mp_to_unsigned_bin_n.o
 
 $(LIBNAME):  $(OBJECTS)
 	$(AR) $(ARFLAGS) $@ $(OBJECTS)
-	ranlib $@
+	$(RANLIB) $@
 
 #make a profiled library (takes a while!!!)
 #
@@ -110,7 +110,7 @@ profiled_single:
 	rm -f *.o ltmtest
 	$(CC) $(CFLAGS) -fbranch-probabilities -DTESTING -c mpi.c -o mpi.o
 	$(AR) $(ARFLAGS) $(LIBNAME) mpi.o
-	ranlib $(LIBNAME)	
+	$(RANLIB) $(LIBNAME)	
 
 install: $(LIBNAME)
 	install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)