Skip to content

Commit

Permalink
Make: add -rpath to LD_SEARCH_FLAGS (#2280)
Browse files Browse the repository at this point in the history
* Make: add -rpath to LD_SEARCH_FLAGS
  • Loading branch information
metzm authored and neteler committed Apr 21, 2022
1 parent 41092ab commit 1bcefc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
SHLIB_SUFFIX=".so"
SHLIB_LD="${CC} -shared"
LDFLAGS="-Wl,--export-dynamic"
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR} -Wl,-rpath,${INST_DIR}/lib'
LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
;;
*-pc-cygwin)
Expand Down Expand Up @@ -562,7 +562,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
SHLIB_SUFFIX=".so"
LDFLAGS="-Wl,--export-dynamic"
#LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR} -Wl,-rpath,${INST_DIR}/lib'
# TODO: add optional pthread support with any combination of:
# CFLAGS="$CFLAGS -pthread"
# LDFLAGS="$LDFLAGS -lpthread"
Expand All @@ -576,7 +576,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
SHLIB_LD_LIBS="${LIBS}"
LDFLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
SHLIB_LD_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -L${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath,${INST_DIR}/lib -L${LIB_RUNTIME_DIR}'
# some older NetBSD versions do not handle version numbers with dots.
#STLIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
#SHLIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
Expand Down
6 changes: 3 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4032,7 +4032,7 @@ ac_save_ldflags="$LDFLAGS"
SHLIB_SUFFIX=".so"
SHLIB_LD="${CC} -shared"
LDFLAGS="-Wl,--export-dynamic"
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR} -Wl,-rpath,${INST_DIR}/lib'
LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
;;
*-pc-cygwin)
Expand Down Expand Up @@ -4114,7 +4114,7 @@ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
SHLIB_SUFFIX=".so"
LDFLAGS="-Wl,--export-dynamic"
#LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR} -Wl,-rpath,${INST_DIR}/lib'
# TODO: add optional pthread support with any combination of:
# CFLAGS="$CFLAGS -pthread"
# LDFLAGS="$LDFLAGS -lpthread"
Expand All @@ -4128,7 +4128,7 @@ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
SHLIB_LD_LIBS="${LIBS}"
LDFLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
SHLIB_LD_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -L${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath,${INST_DIR}/lib -L${LIB_RUNTIME_DIR}'
# some older NetBSD versions do not handle version numbers with dots.
#STLIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
#SHLIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
Expand Down

0 comments on commit 1bcefc7

Please sign in to comment.