configure: Make it possible to adjust LDPATH on the configure command line.
Francois Gouget
fgouget at codeweavers.com
Fri Sep 20 04:48:15 CDT 2013
This makes it possible to specify where specific libraries like FreeType can be found at compile time.
---
configure | 23 ++++++++++++++++++-----
configure.ac | 19 ++++++++++++++++---
2 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/configure b/configure
index a2f8e22..3c23c2d 100755
--- a/configure
+++ b/configure
@@ -633,8 +633,8 @@ LIBPOLL
LIBDL
EXTRA_BINARIES
MAIN_BINARY
-TOOLSEXT
LDPATH
+TOOLSEXT
UNWINDFLAGS
BUILTINFLAG
EXTRACFLAGS
@@ -13336,20 +13336,33 @@ $as_echo "#define __ASM_STDCALL_FUNC(name,args,code) __ASM_DEFINE_FUNC(name,__AS
-LDPATH=""
-
case $build_os in
cygwin*|mingw32*)
TOOLSEXT=".exe"
- LDPATH="PATH=\"\$(TOOLSDIR)/libs/wine:\$\$PATH\""
+ ;;
+esac
+
+if test -n "$LDPATH"
+then
+ LDPATH="$LDPATH:"
+fi
+case $build_os in
+ cygwin*|mingw32*)
+ LDPATH="PATH=\"\$(TOOLSDIR)/libs/wine:$LDPATH\$\$PATH\""
;;
darwin*|macosx*)
+ if test -n "$LDPATH"
+ then
+ LDPATH="DYLD_LIBRARY_PATH=\"$LDPATH\$\$DYLD_LIBRARY_PATH\""
+ fi
;;
*)
- LDPATH="LD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/wine:\$\$LD_LIBRARY_PATH\""
+ LDPATH="LD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/wine:$LDPATH\$\$LD_LIBRARY_PATH\""
;;
esac
+LDPATH=$LDPATH
+
MAIN_BINARY="wine"
diff --git a/configure.ac b/configure.ac
index b687119..2b50724 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1967,18 +1967,31 @@ AC_DEFINE([__ASM_STDCALL_FUNC(name,args,code)],[__ASM_DEFINE_FUNC(name,__ASM_STD
dnl **** Platform-specific checks ****
-AC_SUBST(LDPATH,"")
case $build_os in
cygwin*|mingw32*)
AC_SUBST(TOOLSEXT,".exe")
- LDPATH="PATH=\"\$(TOOLSDIR)/libs/wine:\$\$PATH\""
+ ;;
+esac
+
+if test -n "$LDPATH"
+then
+ LDPATH="$LDPATH:"
+fi
+case $build_os in
+ cygwin*|mingw32*)
+ LDPATH="PATH=\"\$(TOOLSDIR)/libs/wine:$LDPATH\$\$PATH\""
;;
darwin*|macosx*)
+ if test -n "$LDPATH"
+ then
+ LDPATH="DYLD_LIBRARY_PATH=\"$LDPATH\$\$DYLD_LIBRARY_PATH\""
+ fi
;;
*)
- LDPATH="LD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/wine:\$\$LD_LIBRARY_PATH\""
+ LDPATH="LD_LIBRARY_PATH=\"\$(TOOLSDIR)/libs/wine:$LDPATH\$\$LD_LIBRARY_PATH\""
;;
esac
+AC_SUBST(LDPATH, $LDPATH)
AC_SUBST(MAIN_BINARY,"wine")
test "x$enable_win64" != "xyes" || MAIN_BINARY="wine64"
--
1.8.4.rc3
More information about the wine-patches
mailing list