-if [ -r ./configure ]; then
- echo "$NAME: Running \"./configure\" script ..."
- [ -n "$VERBOSE" ] && ./configure || ./configure >/dev/null
- if [ $? -eq 0 -a -r ./Makefile ]; then
+echo "$NAME: Checking for \"$SRC_D/configure\" script ..."
+if [ ! -r "$SRC_D/configure" ]; then
+ echo "$NAME: Running \"$SRC_D/autogen.sh\" ..."
+ cd "$SRC_D" || exit 1
+ if [ -n "$VERBOSE" ]; then
+ ./autogen.sh
+ else
+ ./autogen.sh >/dev/null
+ fi
+ if [ $? -ne 0 ]; then
+ echo "$NAME: \"$SRC_D/autogen.sh\" script failed, aborting!"
+ exit 1
+ fi
+ cd "$MY_D" || exit 1
+fi
+
+if [ -r "$SRC_D/configure" ]; then
+ echo "$NAME: Running \"$SRC_D/configure\" script ..."
+ if [ -n "$VERBOSE" ]; then
+ "$SRC_D/configure" -C
+ else
+ "$SRC_D/configure" -C >/dev/null
+ fi
+ if [ $? -eq 0 ] && [ -r ./Makefile ]; then