Skip to content

Commit 069874c

Browse files
committed
Merge branch 'mo/hpux-dynpath'
Auto-detect how to tell HP-UX aCC where to use dynamically linked libraries from at runtime. * mo/hpux-dynpath: configure: Detect linking style for HP aCC on HP-UX
2 parents 71221f2 + 9a1699c commit 069874c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

configure.ac

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,18 @@ else
475475
if test "$git_cv_ld_rpath" = "yes"; then
476476
CC_LD_DYNPATH=-rpath
477477
else
478-
CC_LD_DYNPATH=
479-
AC_MSG_WARN([linker does not support runtime path to dynamic libraries])
478+
AC_CACHE_CHECK([if linker supports -Wl,+b,], git_cv_ld_wl_b, [
479+
SAVE_LDFLAGS="${LDFLAGS}"
480+
LDFLAGS="${SAVE_LDFLAGS} -Wl,+b,/"
481+
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [git_cv_ld_wl_b=yes], [git_cv_ld_wl_b=no])
482+
LDFLAGS="${SAVE_LDFLAGS}"
483+
])
484+
if test "$git_cv_ld_wl_b" = "yes"; then
485+
CC_LD_DYNPATH=-Wl,+b,
486+
else
487+
CC_LD_DYNPATH=
488+
AC_MSG_WARN([linker does not support runtime path to dynamic libraries])
489+
fi
480490
fi
481491
fi
482492
fi

0 commit comments

Comments
 (0)