]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Better errors. Use install path, if it exists
authorAlan T. DeKok <aland@freeradius.org>
Sun, 16 Sep 2012 07:38:32 +0000 (09:38 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 16 Sep 2012 07:39:23 +0000 (09:39 +0200)
scripts/jlibtool.c

index f4dceb7b40965a0c37555c2751a39a29ceb730ee..14984c3e616452960b1d81393b629542f5258762 100644 (file)
@@ -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
         }