diff --git a/chocpkg/modules/build_autotools.sh b/chocpkg/modules/build_autotools.sh index f9422fe..3805d76 100644 --- a/chocpkg/modules/build_autotools.sh +++ b/chocpkg/modules/build_autotools.sh @@ -12,6 +12,12 @@ do_build() { host_opt="--host=$BUILD_HOST" fi + # If we're checking out from a version control repository, we may need + # to run the autotools commands first to generate the configure script. + if [ ! -e configure ] && ([ -e configure.ac ] || [ -e configure.in ]); then + autoreconf -fi + fi + ./configure --prefix="$PACKAGE_INSTALL_DIR" $host_opt \ $PACKAGE_CONFIGURE_OPTS || ( error_exit "Failed to configure package $PACKAGE_NAME for build." diff --git a/pkgdef/chocolate-doom-git.sh b/pkgdef/chocolate-doom-git.sh index 535b440..9e7e33f 100644 --- a/pkgdef/chocolate-doom-git.sh +++ b/pkgdef/chocolate-doom-git.sh @@ -2,7 +2,3 @@ dependencies SDL2 SDL2_mixer SDL2_net fetch_git https://github.com/fragglet/chocolate-doom.git sdl2-branch build_autotools -prebuild_setup() { - autoreconf -fi -} -