[pure-lang-svn] SF.net SVN: pure-lang:[464] pure/trunk
Status: Beta
Brought to you by:
agraef
|
From: <ag...@us...> - 2008-08-11 10:26:37
|
Revision: 464
http://pure-lang.svn.sourceforge.net/pure-lang/?rev=464&view=rev
Author: agraef
Date: 2008-08-11 10:26:44 +0000 (Mon, 11 Aug 2008)
Log Message:
-----------
OSX compatibility fixes.
Modified Paths:
--------------
pure/trunk/ChangeLog
pure/trunk/Makefile.in
pure/trunk/configure
pure/trunk/configure.ac
Modified: pure/trunk/ChangeLog
===================================================================
--- pure/trunk/ChangeLog 2008-08-11 10:01:55 UTC (rev 463)
+++ pure/trunk/ChangeLog 2008-08-11 10:26:44 UTC (rev 464)
@@ -1,3 +1,10 @@
+2008-08-11 Albert Graef <Dr....@t-...>
+
+ * configure.ac, Makefile.in: Additional configury for proper
+ handling of dynamic linking on OSX (-install_name option,
+ DYLD_LIBRARY_PATH). Reported by Ryan Schmidt. NOTE: This change
+ requires a reconfigure.
+
2008-08-10 Albert Graef <Dr....@t-...>
* interpreter.cc (doeval, dodefn): Optimize the case of toplevel
Modified: pure/trunk/Makefile.in
===================================================================
--- pure/trunk/Makefile.in 2008-08-11 10:01:55 UTC (rev 463)
+++ pure/trunk/Makefile.in 2008-08-11 10:26:44 UTC (rev 464)
@@ -257,15 +257,15 @@
rm -f $(srcdir)/test/*.log
$(srcdir)/test/prelude.log: lib/prelude.pure lib/primitives.pure lib/strings.pure
- LD_LIBRARY_PATH=. PURELIB=$(srcdir)/lib ./pure -n -v$(level) $< > $@ 2>&1
+ @LD_LIB_PATH@=. PURELIB=$(srcdir)/lib ./pure -n -v$(level) $< > $@ 2>&1
%.log: %.pure
- LD_LIBRARY_PATH=. PURELIB=$(srcdir)/lib ./pure -v$(level) < $< > $@ 2>&1
+ @LD_LIB_PATH@=. PURELIB=$(srcdir)/lib ./pure -v$(level) < $< > $@ 2>&1
check: pure
@ echo Running tests.
- @ (export LD_LIBRARY_PATH=.; export PURELIB=$(srcdir)/lib; echo $(ECHO_N) "prelude.pure: "; if ./pure $(ECHO_N) -v$(level) $(srcdir)/lib/prelude.pure 2>&1 | diff -q - $(srcdir)/test/prelude.log > /dev/null; then echo passed; else echo FAILED; fi)
- @ (export LD_LIBRARY_PATH=.; export PURELIB=$(srcdir)/lib; for x in $(notdir $(tests)); do echo $(ECHO_N) "$$x: "; if ./pure -v$(level) < $(srcdir)/test/$$x 2>&1 | diff -q - $(srcdir)/test/"`basename $$x .pure`.log" > /dev/null; then echo passed; else echo FAILED; fi; done)
+ @ (export @LD_LIB_PATH@=.; export PURELIB=$(srcdir)/lib; echo $(ECHO_N) "prelude.pure: "; if ./pure $(ECHO_N) -v$(level) $(srcdir)/lib/prelude.pure 2>&1 | diff -q - $(srcdir)/test/prelude.log > /dev/null; then echo passed; else echo FAILED; fi)
+ @ (export @LD_LIB_PATH@=.; export PURELIB=$(srcdir)/lib; for x in $(notdir $(tests)); do echo $(ECHO_N) "$$x: "; if ./pure -v$(level) < $(srcdir)/test/$$x 2>&1 | diff -q - $(srcdir)/test/"`basename $$x .pure`.log" > /dev/null; then echo passed; else echo FAILED; fi; done)
# DO NOT DELETE
Modified: pure/trunk/configure
===================================================================
--- pure/trunk/configure 2008-08-11 10:01:55 UTC (rev 463)
+++ pure/trunk/configure 2008-08-11 10:26:44 UTC (rev 464)
@@ -662,6 +662,7 @@
PIC
DLLEXT
AUXLIBS
+LD_LIB_PATH
INSTALL_PROGRAM
INSTALL_SCRIPT
INSTALL_DATA
@@ -1853,12 +1854,14 @@
PIC=
DLLEXT=".so"
AUXLIBS=
+LD_LIB_PATH="LD_LIBRARY_PATH"
case "$host" in
*-*-mingw*) AUXLIBS="-DLIBGLOB='\"libglob.dll\"' -DLIBREGEX='\"libgnurx-0.dll\"'";
LIBS="$LIBS -limagehlp -lpsapi";
LDFLAGS="-Wl,--enable-auto-import"; DLLEXT=".dll";;
x86_64-*-linux*) PIC="-fPIC";;
- *-*-darwin*) rdynamic=""; shared="-dynamiclib"; DLLEXT=".dylib";;
+ *-*-darwin*) LD_LIB_PATH="DYLD_LIBRARY_PATH";
+ rdynamic=""; shared="-dynamiclib -install_name \$(libdir)/\$(libpure)"; DLLEXT=".dylib";;
hppa*-hp-hpux*) rdynamic=""; DLLEXT=".sl";;
esac
@@ -1867,6 +1870,7 @@
+
cat >>confdefs.h <<_ACEOF
#define DLLEXT "${DLLEXT}"
_ACEOF
@@ -6136,6 +6140,7 @@
PIC!$PIC$ac_delim
DLLEXT!$DLLEXT$ac_delim
AUXLIBS!$AUXLIBS$ac_delim
+LD_LIB_PATH!$LD_LIB_PATH$ac_delim
INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
INSTALL_DATA!$INSTALL_DATA$ac_delim
@@ -6159,7 +6164,7 @@
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 72; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Modified: pure/trunk/configure.ac
===================================================================
--- pure/trunk/configure.ac 2008-08-11 10:01:55 UTC (rev 463)
+++ pure/trunk/configure.ac 2008-08-11 10:26:44 UTC (rev 464)
@@ -21,12 +21,14 @@
PIC=
DLLEXT=".so"
AUXLIBS=
+LD_LIB_PATH="LD_LIBRARY_PATH"
case "$host" in
*-*-mingw*) AUXLIBS="-DLIBGLOB='\"libglob.dll\"' -DLIBREGEX='\"libgnurx-0.dll\"'";
LIBS="$LIBS -limagehlp -lpsapi";
LDFLAGS="-Wl,--enable-auto-import"; DLLEXT=".dll";;
x86_64-*-linux*) PIC="-fPIC";;
- *-*-darwin*) rdynamic=""; shared="-dynamiclib"; DLLEXT=".dylib";;
+ *-*-darwin*) LD_LIB_PATH="DYLD_LIBRARY_PATH";
+ rdynamic=""; shared="-dynamiclib -install_name \$(libdir)/\$(libpure)"; DLLEXT=".dylib";;
hppa*-hp-hpux*) rdynamic=""; DLLEXT=".sl";;
esac
AC_SUBST(shared)
@@ -34,6 +36,7 @@
AC_SUBST(PIC)
AC_SUBST(DLLEXT)
AC_SUBST(AUXLIBS)
+AC_SUBST(LD_LIB_PATH)
AC_DEFINE_UNQUOTED(DLLEXT, "${DLLEXT}", [Define to the filename extension for shared libraries.])
dnl Check for programs.
AC_PROG_INSTALL
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|