Set PKG_CONFIG_PATH if #!c and #!vala

This commit is contained in:
pancake 2015-08-19 11:18:39 +02:00
parent 56fec2ddfc
commit 681c2c2c45
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@
static int lang_c_file(RLang *lang, const char *file) {
void *lib;
char *cc, *p, name[512], buf[512];
char *a, *cc, *p, name[512], buf[512];
const char *libpath, *libname;
if (strlen (file) > (sizeof(name)-10))
@ -21,8 +21,7 @@ static int lang_c_file(RLang *lang, const char *file) {
return R_FALSE;
}
{
char *a = (char*)r_str_lchr (name, '/');
a = (char*)r_str_lchr (name, '/');
if (a) {
*a = 0;
libpath = name;
@ -31,7 +30,7 @@ static int lang_c_file(RLang *lang, const char *file) {
libpath = ".";
libname = name;
}
}
r_sys_setenv ("PKG_CONFIG_PATH", R2_LIBDIR"/pkgconfig");
p = strstr (name, ".c"); if (p) *p=0;
cc = r_sys_getenv ("CC");
if (!cc || !*cc)

View File

@ -33,6 +33,7 @@ static int lang_vala_file(RLang *lang, const char *file) {
libname = strdup (file);
strcpy (srcdir, ".");
}
r_sys_setenv ("PKG_CONFIG_PATH", R2_LIBDIR"/pkgconfig");
vapidir = r_sys_getenv ("VAPIDIR");
if (vapidir) {
if (*vapidir) {