diff --git a/configure b/configure
index 94173ac..1db1340 100755
--- a/configure
+++ b/configure
@@ -32,7 +32,7 @@ echo "c3-${C3_VERSION}.tar.gz: $(tr '\n' ' ' < c3.index)" >> ${CONFIG_MK}
update_config_mk
-( cd libffi && MAKE=gmake ./configure; )
+( cd libffi && sh autogen.sh; MAKE=gmake ./configure; )
( cd libtommath && ./configure; )
( cd ucd2c && ./configure; )
( cd libc3 && ./configure; )