diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 7e83121f..648f13ac 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -263,11 +263,11 @@ AS_IF([test "$UDUNITS_HOME" = ""], UDUNITS_EXCLUDE=$UDUNITS_HOME AC_CHECK_FILE([$UDUNITS_HOME/include/udunits2.h], [UDUNITS_INCLUDES=-I$UDUNITS_HOME/include - UDUNITS_LDFLAGS="-L$UDUNITS_HOME/lib -ludunits2" + UDUNITS_LDFLAGS="-Wl,-rpath,$UDUNITS_HOME/lib -L$UDUNITS_HOME/lib -ludunits2" ], [AC_CHECK_FILE([$UDUNITS_HOME/lib/udunits2.h], [UDUNITS_INCLUDES=-I$UDUNITS_HOME/lib - UDUNITS_LDFLAGS="-L$UDUNITS_HOME/lib -ludunits2" + UDUNITS_LDFLAGS="-Wl,-rpath,$UDUNITS_HOME/lib -L$UDUNITS_HOME/lib -ludunits2" ], AC_MSG_ERROR([could not find udunits2])) ] diff --git a/configure b/configure index 8362b7a1..82894e0f 100755 --- a/configure +++ b/configure @@ -6762,7 +6762,7 @@ eval ac_res=\$$as_ac_File $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : UDUNITS_INCLUDES=-I$UDUNITS_HOME/include - UDUNITS_LDFLAGS="-L$UDUNITS_HOME/lib -ludunits2" + UDUNITS_LDFLAGS="-Wl,-rpath,$UDUNITS_HOME/lib -L$UDUNITS_HOME/lib -ludunits2" else as_ac_File=`$as_echo "ac_cv_file_$UDUNITS_HOME/lib/udunits2.h" | $as_tr_sh` @@ -6784,7 +6784,7 @@ eval ac_res=\$$as_ac_File $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : UDUNITS_INCLUDES=-I$UDUNITS_HOME/lib - UDUNITS_LDFLAGS="-L$UDUNITS_HOME/lib -ludunits2" + UDUNITS_LDFLAGS="-Wl,-rpath,$UDUNITS_HOME/lib -L$UDUNITS_HOME/lib -ludunits2" else as_fn_error $? "could not find udunits2" "$LINENO" 5