--- gnutls-3.4.2/gl/m4/lib-link.m4.orig 2008-05-17 07:44:04.000000000 +0200 +++ gnutls-3.4.2/gl/m4/lib-link.m4 2011-04-02 11:29:18.159546509 +0200 @@ -322,7 +322,11 @@ fi if test "X$found_dir" != "X"; then dnl Found the library. + if test "X$found_dir" = "X/usr/$acl_libdirstem"; then + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + else LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + fi if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the --- gnutls-3.3.26/lib/Makefile.am.orig 2017-01-09 08:11:25.000000000 +0100 +++ gnutls-3.3.26/lib/Makefile.am 2017-02-04 10:47:27.231553284 +0100 @@ -149,7 +149,7 @@ endif if ENABLE_TROUSERS -thirdparty_libadd += $(LIBDL) +thirdparty_libadd += $(LTLIBDL) endif if ENABLE_OPENPGP --- gnutls-3.3.26/configure.ac.orig 2017-01-09 07:42:13.000000000 +0100 +++ gnutls-3.3.26/configure.ac 2017-02-04 10:47:15.884886746 +0100 @@ -329,7 +329,7 @@ AC_DEFINE([ENABLE_FIPS140], 1, [Enable FIPS140-2 mode]) - AC_SUBST([FIPS140_LIBS], $LIBDL) + AC_SUBST([FIPS140_LIBS], $LTLIBDL) else enable_fips=no AC_MSG_WARN([[