strrchr is declared in <strings.h>, not <string.h>.
_GNU_SOURCE needs to be defined before any glibc headers are included,
otherwise it is not effective.
Also patch some old autoconf-internal issues in the hydra-gtk
configure script.
On Debian/Ubuntu, compilation against openssl 3.0 causes a failure to
find INT_MAX, despite the openssl headers including limits.h. However,
the fact that the libmemcached-dev package provides both
/usr/include/libmemcached{,-1.0} directories, both of which contain
memcached.h, mean that MCACHED_IPATH ends up set to the libmemcached-1.0
one, which contains a limits.h, which shadows /usr/include/limits.h.
Don't do that.
Updating the logic here to check for freerdpv3 first and if found do not check for freerdpv2. Also fixed paths for freerdpv2 paths.
Updated bash "or" to use "||" and "and" to use "&&" conditionals with proper POSIX specifications.
For example on the Fedora 31 the path for the firebird include ibase.h is /usr/include/firebird/ibase.
This patch should also consider the firebird subdirectory inside the regular include directory.
That's fixing the compilation issues as /lib does not exist on these systems, remove pie warnings, and add support for libraries installed with macPorts
On Gentoo Linux (and possibly others?) with Subversion 1.12.0,
compilation of hydra-svn.c fails with:
In file included from /usr/include/subversion-1/svn_client.h:34,
from hydra-svn.c:9:
/usr/include/apr-1/apr.h:632:2: error: #error no decision has been made on APR_PATH_MAX for your platform
#error no decision has been made on APR_PATH_MAX for your platform
^~~~~
This happens when PATH_MAX is not defined.
PATH_MAX is defined by /usr/include/linux/limits.h, but rather than
include'ing that directly and possibly breaking other platforms,
include sys/param.h (which will include linux/limits.h indirectly)
iff PATH_MAX is not defined and sys/param.h exists.
I based the approach on how math.h is handled.
If they are compiling to target an alternative directory there are likely dependencies to the same target. Test for PREFIX/lib and PREFIX/include to be sure.