autogen.sh: Support out-of-tree builds

This allows to do the following:

~/src/shadow/shadow/master$ mkdir .tmp/ && cd .tmp/
~/src/shadow/shadow/master/.tmp$ ../autogen.sh

Link: <https://github.com/shadow-maint/shadow/issues/795>
Reviewed-by: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar 2023-09-02 14:01:58 +02:00 committed by Iker Pedrosa
parent 9514a841bc
commit 8893c51480

View File

@ -1,8 +1,8 @@
#! /bin/sh #! /bin/sh
autoreconf -v -f --install || exit 1 autoreconf -v -f --install "$(dirname "$0")" || exit 1
./configure \ "$(dirname "$0")"/configure \
CFLAGS="-O2 -Wall" \ CFLAGS="-O2 -Wall" \
--enable-lastlog \ --enable-lastlog \
--enable-man \ --enable-man \