Module: wine Branch: master Commit: 46d82c56f02f85b154ca0257cd12817c1da19959 URL: http://source.winehq.org/git/wine.git/?a=commit;h=46d82c56f02f85b154ca0257cd...
Author: Alexandre Julliard julliard@winehq.org Date: Mon May 7 20:50:12 2007 +0200
configure: Added rpath support for Solaris.
---
configure | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 4 ++- 2 files changed, 64 insertions(+), 1 deletions(-)
diff --git a/configure b/configure index c6481f8..1117a7b 100755 --- a/configure +++ b/configure @@ -13654,6 +13654,67 @@ ac_res=`eval echo '${'$as_ac_var'}'` echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then LIBWINE_LDFLAGS="-Wl,--rpath,\$$ORIGIN/`$(RELPATH) $(bindir) $(libdir)`" +else + as_ac_var=`echo "ac_cv_cflags_-fPIC -Wl,-R,$ORIGIN/../lib" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking whether the compiler supports -fPIC -Wl,-R,$ORIGIN/../lib" >&5 +echo $ECHO_N "checking whether the compiler supports -fPIC -Wl,-R,$ORIGIN/../lib... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test "${$as_var+set}" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_wine_try_cflags_saved=$CFLAGS +CFLAGS="$CFLAGS -fPIC -Wl,-R,$ORIGIN/../lib" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *"* | *`* | *\*) ac_try_echo=$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +CFLAGS=$ac_wine_try_cflags_saved +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + LIBWINE_LDFLAGS="-Wl,-R,\$$ORIGIN/`$(RELPATH) $(bindir) $(libdir)`" +fi + fi
diff --git a/configure.ac b/configure.ac index 683e753..e65f812 100644 --- a/configure.ac +++ b/configure.ac @@ -1032,7 +1032,9 @@ case $host_os in [AC_SUBST(LDEXECFLAGS,["-Wl,--export-dynamic"])])
WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,$ORIGIN/../lib], - [LIBWINE_LDFLAGS="-Wl,--rpath,\$$ORIGIN/`$(RELPATH) $(bindir) $(libdir)`"]) + [LIBWINE_LDFLAGS="-Wl,--rpath,\$$ORIGIN/`$(RELPATH) $(bindir) $(libdir)`"], + [WINE_TRY_CFLAGS([-fPIC -Wl,-R,$ORIGIN/../lib], + [LIBWINE_LDFLAGS="-Wl,-R,\$$ORIGIN/`$(RELPATH) $(bindir) $(libdir)`"])])
case $host_cpu in *i[[3456789]]86* | x86_64)