mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 21:45:37 +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:
@@ -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 LDFLAGS="$LDFLAGS ${ISC_RPATH_FLAG}/usr/local/lib/some_library"
|
||||
dnl fi
|
||||
dnl
|
||||
dnl If you pass --disable-rpath to configure, ISC_RPATH_FLAG is not set
|
||||
|
||||
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
|
||||
# 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
|
||||
@@ -42,5 +49,6 @@ AC_TRY_LINK([],[],
|
||||
|
||||
CXXFLAGS=$CXXFLAGS_SAVED
|
||||
CCFLAGS=$CCFLAGS_SAVED
|
||||
fi
|
||||
|
||||
])dnl AX_ISC_RPATH
|
||||
|
Reference in New Issue
Block a user