From 6d04ff98c4bfc21ad3fa779237a16ba760080fac Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sun, 19 Apr 2020 16:31:45 -0400 Subject: Better reporting when a package does not exist * Add additional errors * Fix user_input function missing an error return value * spmbuild sources a temporary file instead of output from a sub-shell * Fix indentation problem * A reason can be attached to spmerrno using spmerrno_cause() --- lib/internal_cmd.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/internal_cmd.c') diff --git a/lib/internal_cmd.c b/lib/internal_cmd.c index b1e8faa..e5f875f 100644 --- a/lib/internal_cmd.c +++ b/lib/internal_cmd.c @@ -237,7 +237,13 @@ int mkruntime_interface(int argc, char **argv) { } runtime_set(rt, "CFLAGS", "-I$SPM_INCLUDE $CFLAGS"); +#if defined(__APPLE__) && defined (__MACH__) + runtime_set(rt, "LDFLAGS", "-rpath $SPM_LIB:$SPM_LIB64 -L$SPM_LIB -L$SPM_LIB64 $LDFLAGS"); +#elif defined(__linux) || defined (__linux__) runtime_set(rt, "LDFLAGS", "-Wl,-rpath=$SPM_LIB:$SPM_LIB64 -L$SPM_LIB -L$SPM_LIB64 $LDFLAGS"); +#else + // TODO: Windows? +#endif runtime_export(rt, NULL); runtime_free(rt); -- cgit