Skip to content

Commit

Permalink
ensure that we automatically point to the correct libdir
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed May 15, 2020
1 parent fb4b9bd commit 3589f52
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions scripts/jlibtool.c
Expand Up @@ -2336,24 +2336,15 @@ static int run_mode(command_t *cmd)
}

strcpy(libpath, cmd->arglist->vals[0]);
add_dotlibs(libpath);
#if 0
l = strrchr(libpath, '/');
if (!l) l = strrchr(libpath, '\\');
if (l) {
*l = '\0';
l = libpath;
} else {
l = ".libs/";
}
#endif

l = "./build/lib/local/.libs";
setenv(LD_LIBRARY_PATH_LOCAL, l, 1);
l = strstr(libpath, "/bin");
if (l) strcpy(l, "/lib/local/.libs");

setenv(LD_LIBRARY_PATH_LOCAL, libpath, 1);
#ifdef __APPLE__
setenv("DYLD_FALLBACK_LIBRARY_PATH", l, 1);
setenv("DYLD_FALLBACK_LIBRARY_PATH", libpath, 1);
#endif
setenv("FR_LIBRARY_PATH", "./build/lib/local/.libs", 1);
setenv("FR_LIBRARY_PATH", libpath, 1);
rv = run_command(cmd, cmd->arglist);
if (rv) goto finish;
}
Expand Down

0 comments on commit 3589f52

Please sign in to comment.