| 1 | diff --git a/configure b/configure
|
| 2 | index 296c3e4..e838871 100755
|
| 3 | |
| 4 | |
| 5 | @@ -10306,6 +10306,38 @@ then :
|
| 6 | fi
|
| 7 | ;;
|
| 8 | esac
|
| 9 | +
|
| 10 | + # do this at the end because it needs double dollar for makefile
|
| 11 | + as_ac_var=`printf "%s\n" "ac_cv_cflags_-Wl,-rpath,\\\\\\$ORIGIN" | $as_tr_sh`
|
| 12 | +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-rpath,\\\$ORIGIN" >&5
|
| 13 | +printf %s "checking whether the compiler supports -Wl,-rpath,\\\$ORIGIN... " >&6; }
|
| 14 | +if eval test \${$as_ac_var+y}
|
| 15 | +then :
|
| 16 | + printf %s "(cached) " >&6
|
| 17 | +else $as_nop
|
| 18 | + ac_wine_try_cflags_saved=$CFLAGS
|
| 19 | +CFLAGS="$CFLAGS -Wl,-rpath,\\\$ORIGIN"
|
| 20 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
| 21 | +/* end confdefs.h. */
|
| 22 | +int main(int argc, char **argv) { return 0; }
|
| 23 | +_ACEOF
|
| 24 | +if ac_fn_c_try_link "$LINENO"
|
| 25 | +then :
|
| 26 | + eval "$as_ac_var=yes"
|
| 27 | +else $as_nop
|
| 28 | + eval "$as_ac_var=no"
|
| 29 | +fi
|
| 30 | +rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
| 31 | + conftest$ac_exeext conftest.$ac_ext
|
| 32 | +CFLAGS=$ac_wine_try_cflags_saved
|
| 33 | +fi
|
| 34 | +eval ac_res=\$$as_ac_var
|
| 35 | + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
| 36 | +printf "%s\n" "$ac_res" >&6; }
|
| 37 | +if eval test \"x\$"$as_ac_var"\" = x"yes"
|
| 38 | +then :
|
| 39 | + UNIXLDFLAGS="$UNIXLDFLAGS '-Wl,-rpath,\$\$ORIGIN'"
|
| 40 | +fi
|
| 41 | ;;
|
| 42 | esac
|
| 43 |
|
| 44 | diff --git a/configure.ac b/configure.ac
|
| 45 | index 140f26a..02497c9 100644
|
| 46 | |
| 47 | |
| 48 | @@ -784,6 +784,9 @@ case $host_os in
|
| 49 | [WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-z,max-page-size=0x1000"])
|
| 50 | ;;
|
| 51 | esac
|
| 52 | +
|
| 53 | + # do this at the end because it needs double dollar for makefile
|
| 54 | + WINE_TRY_CFLAGS([-Wl,-rpath,\\\$ORIGIN],[UNIXLDFLAGS="$UNIXLDFLAGS '-Wl,-rpath,\$\$ORIGIN'"])
|
| 55 | ;;
|
| 56 | esac
|
| 57 |
|