2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[2667] Add --disable-rpath configure switch.

Some dynamic linkers are wise enough (at least the Linux one) to correctly pick
needed shared libraries without hardcoded rpath. The --disable-rpath configure
switch allows distributors to avoid hardcoded rpath paths in libraries and
executables.

Signed-off-by: Adam Tkac <atkac@redhat.com>
This commit is contained in:
Adam Tkac
2013-01-10 18:04:04 +01:00
committed by JINMEI Tatuya
parent 937c982cf3
commit 1c50c5a6ee

View File

@@ -9,9 +9,16 @@ dnl the found option flag. The main configure.ac can use it as follows:
dnl if test "x$ISC_RPATH_FLAG" != "x"; then dnl if test "x$ISC_RPATH_FLAG" != "x"; then
dnl LDFLAGS="$LDFLAGS ${ISC_RPATH_FLAG}/usr/local/lib/some_library" dnl LDFLAGS="$LDFLAGS ${ISC_RPATH_FLAG}/usr/local/lib/some_library"
dnl fi dnl fi
dnl
dnl If you pass --disable-rpath to configure, ISC_RPATH_FLAG is not set
AC_DEFUN([AX_ISC_RPATH], [ AC_DEFUN([AX_ISC_RPATH], [
AC_ARG_ENABLE(rpath,
[AC_HELP_STRING([--disable-rpath], [don't hardcode library path into binaries])],
rpath=$enableval, rpath=yes)
if test x$rpath != xno; then
# We'll tweak both CXXFLAGS and CCFLAGS so this function will work whichever # We'll tweak both CXXFLAGS and CCFLAGS so this function will work whichever
# language is used in the main script. Note also that it's not LDFLAGS; # language is used in the main script. Note also that it's not LDFLAGS;
# technically this is a linker flag, but we've noticed $LDFLAGS can be placed # technically this is a linker flag, but we've noticed $LDFLAGS can be placed
@@ -42,5 +49,6 @@ AC_TRY_LINK([],[],
CXXFLAGS=$CXXFLAGS_SAVED CXXFLAGS=$CXXFLAGS_SAVED
CCFLAGS=$CCFLAGS_SAVED CCFLAGS=$CCFLAGS_SAVED
fi
])dnl AX_ISC_RPATH ])dnl AX_ISC_RPATH