--- courier-authlib-0.68.0/authdaemond.c.orig 2017-01-28 03:57:11.000000000 +0100 +++ courier-authlib-0.68.0/authdaemond.c 2018-03-19 19:12:27.664936669 +0100 @@ -114,7 +114,10 @@ fprintf(stderr, "INFO: Installing %s\n", buf); p += i; - h=lt_dlopenext(buf); + sprintf(buf2, "courier_%s_init", buf+3); + + strcat(buf, ".so"); + h=lt_dlopen(buf); if (h == NULL) { @@ -122,8 +125,6 @@ continue; } - sprintf(buf2, "courier_%s_init", buf+3); - pt=lt_dlsym(h, buf2); if (pt == NULL) { --- courier-authlib-0.68.0/authinfo.c.orig 2013-08-25 20:44:47.000000000 +0200 +++ courier-authlib-0.68.0/authinfo.c 2018-03-21 20:10:48.566256960 +0100 @@ -105,8 +105,8 @@ if (strcmp(argv[n], "--ldflags") == 0) { - printf("-L%s\n", - PKGLIBDIR); + printf("-L%s -Wl,-rpath,%s\n", + PKGLIBDIR, PKGLIBDIR); } if (strcmp(argv[n], "--cppflags") == 0) {