./configure: error: working directory cannot be determined

I am extremely frustrated with this error. now it is worth noting that running cd "$(pwd)" and echoing all environment variables, everything seems in order.

I am currently trying to install unrealircd 5.2.0.1 (BUT I get this error when running ANYTHING involving ./configure script)

Here is my output for pretense on my error:

 _   _                      _ ___________  _____     _
| | | |                    | |_   _| ___ \/  __ \   | |
| | | |_ __  _ __ ___  __ _| | | | | |_/ /| /  \/ __| |
| | | | '_ \| '__/ _ \/  _ | | | | |    / | |    /  _ |
| |_| | | | | | |  __/ (_| | |_| |_| |\ \ | \__/\ (_| |
 \___/|_| |_|_|  \___|\__,_|_|\___/\_| \_| \____/\__,_|

                               Configuration Program
                                for UnrealIRCd 5.2.0.1
[SNIP]
Would you like to pass any custom parameters to configure?
Most people don't need this and can just press ENTER.
Otherwise, see `./configure --help' and write them here:
[] ->
Running with 4 concurrent build processes by default (make -j4).
./configure --with-showlistmodes --enable-ssl --with-maxconnections=9999999 --with-bindir=/root/unrealircd/bin --with-datadir=/root/unrealircd/data --with-pidfile=/root/unrealircd/data/unrealircd.pid --with-confdir=/root/unrealircd/conf --with-modulesdir=/root/unrealircd/modules --with-logdir=/root/unrealircd/logs --with-cachedir=/root/unrealircd/cache --with-docdir=/root/unrealircd/doc --with-tmpdir=/root/unrealircd/tmp --with-privatelibdir=/root/unrealircd/lib --with-scriptdir=/root/unrealircd --with-nick-history=100 --with-permissions=0600 --enable-dynamic-linking
configure: error: working directory cannot be determined

now like i said, I get this error when installing ANYTHING involving a ./configure script. it is also worth noting that as any user I am unable to run ./configure, with same said errors.

cating /etc/passwd says proper home directory for said users.

Now what is my problem here?


The documentation clearly says:

https://www.unrealircd.org/docs/FAQ#Compile.2Fbuild_problems

Compile/build problems

I ran ./configure and got tons of problems

Do NOT use ./configure! Run ./Config instead.

https://www.unrealircd.org/docs/Installing_from_source

Compiling

First, run the ./Config script which will ask a number of questions. You can just press Enter to accept the default answers.

./Config

Now, compile UnrealIRCd by running make, this may take a minute (or two):

make