parse_options "$@"
-cd $TOP_DIR
+echo "Building librb autotools files."
+
+cd "$TOP_DIR"/librb
+bash autogen.sh
+
+echo "Building main autotools files."
+
+cd "$LAST_DIR"
run_or_die $ACLOCAL -I m4
run_or_die $LIBTOOLIZE --force --copy
run_or_die $AUTOHEADER
run_or_die $AUTOCONF
-run_or_die $AUTOMAKE
+run_or_die $AUTOMAKE --add-missing --copy