From 0ca6b5697c79ebc8ef871595a4a1d7b0cd3399f1 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Sun, 16 Sep 2012 09:38:32 +0200 Subject: [PATCH] Better errors. Use install path, if it exists --- scripts/jlibtool.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/jlibtool.c b/scripts/jlibtool.c index f4dceb7..14984c3 100644 --- a/scripts/jlibtool.c +++ b/scripts/jlibtool.c @@ -2028,9 +2028,18 @@ static void link_fixup(command_t *c) #ifdef DYNAMIC_INSTALL_NAME push_count_chars(c->shared_opts.normal, DYNAMIC_INSTALL_NAME); + if (!c->install_path) { + fprintf(stderr, "Installation mode requires -rpath\n"); + exit(1); + } + tmp = (char*)malloc(PATH_MAX); strcpy(tmp, c->install_path); - strcat(tmp, strrchr(c->shared_name.normal, '/')); + if (c->shared_name.install) { + strcat(tmp, strrchr(c->shared_name.install, '/')); + } else { + strcat(tmp, strrchr(c->shared_name.normal, '/')); + } push_count_chars(c->shared_opts.normal, tmp); #endif } -- 2.1.4