[svn] commit: r2764 - in /branches/trac313: configure.ac src/bin/bind10/run_bind10.sh.in src/bin/xfrin/tests/Makefile.am src/bin/xfrout/tests/Makefile.am src/lib/dns/python/tests/Makefile.am src/lib/python/isc/notify/tests/Makefile.am
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Aug 18 20:51:44 UTC 2010
Author: jinmei
Date: Wed Aug 18 20:51:43 2010
New Revision: 2764
Log:
explicitly specify DYLD_LIBRARY_PATH for darwin (MacOS X) for "from source" operations.
Modified:
branches/trac313/configure.ac
branches/trac313/src/bin/bind10/run_bind10.sh.in
branches/trac313/src/bin/xfrin/tests/Makefile.am
branches/trac313/src/bin/xfrout/tests/Makefile.am
branches/trac313/src/lib/dns/python/tests/Makefile.am
branches/trac313/src/lib/python/isc/notify/tests/Makefile.am
Modified: branches/trac313/configure.ac
==============================================================================
--- branches/trac313/configure.ac (original)
+++ branches/trac313/configure.ac Wed Aug 18 20:51:43 2010
@@ -40,14 +40,30 @@
[enable_static_link=yes], [enable_static_link=no])
AM_CONDITIONAL(USE_STATIC_LINK, test $enable_static_link = yes)
-# OS dependent compiler flags
+# OS dependent configuration
+SET_ENV_LIBRARY_PATH=no
+ENV_LIBRARY_PATH=LD_LIBRARY_PATH
+
case "$host" in
*-solaris*)
# Solaris requires special definitions to get some standard libraries
# (e.g. getopt(3)) available with common used header files.
CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
;;
+*-apple-darwin*)
+ # libtool doesn't work pefectly with Darwin: libtool embeds the
+ # final install path in dynamic libraries and our loadable python
+ # modules always refer to that path even if it's loaded within the
+ # source tree. This prevents pre-install tests from working.
+ # To work around this problem we explicitly specify paths to dynamic
+ # libraries when we use them in the source tree.
+ SET_ENV_LIBRARY_PATH=yes
+ ENV_LIBRARY_PATH=DYLD_LIBRARY_PATH
+ ;;
esac
+AM_CONDITIONAL(SET_ENV_LIBRARY_PATH, test $SET_ENV_LIBRARY_PATH = yes)
+AC_SUBST(SET_ENV_LIBRARY_PATH)
+AC_SUBST(ENV_LIBRARY_PATH)
m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python3 python3.1])
AC_ARG_WITH([pythonpath],
Modified: branches/trac313/src/bin/bind10/run_bind10.sh.in
==============================================================================
--- branches/trac313/src/bin/bind10/run_bind10.sh.in (original)
+++ branches/trac313/src/bin/bind10/run_bind10.sh.in Wed Aug 18 20:51:43 2010
@@ -24,8 +24,15 @@
export PATH
PYTHONPATH=@abs_top_builddir@/src/lib/python:@abs_top_builddir@/src/lib/dns/python/.libs:@abs_top_builddir@/src/lib/xfr/.libs
-#PYTHONPATH=@abs_top_srcdir@/src/lib/python:@abs_top_builddir@/src/lib/python:@abs_top_builddir@/src/lib/dns/.libs:@abs_top_builddir@/src/lib/xfr/.libs
export PYTHONPATH
+
+# If necessary (rare cases), explicitly specify paths to dynamic libraries
+# required by loadable python modules.
+SET_ENV_LIBRARY_PATH=@SET_ENV_LIBRARY_PATH@
+if test $SET_ENV_LIBRARY_PATH = yes; then
+ @ENV_LIBRARY_PATH@=@abs_top_builddir@/src/lib/dns/.libs:@abs_top_builddir@/src/lib/exceptions/.libs:$@ENV_LIBRARY_PATH@
+ export @ENV_LIBRARY_PATH@
+fi
B10_FROM_SOURCE=@abs_top_srcdir@
export B10_FROM_SOURCE
Modified: branches/trac313/src/bin/xfrin/tests/Makefile.am
==============================================================================
--- branches/trac313/src/bin/xfrin/tests/Makefile.am (original)
+++ branches/trac313/src/bin/xfrin/tests/Makefile.am Wed Aug 18 20:51:43 2010
@@ -1,5 +1,12 @@
PYTESTS = xfrin_test.py
EXTRA_DIST = $(PYTESTS)
+
+# If necessary (rare cases), explicitly specify paths to dynamic libraries
+# required by loadable python modules.
+B10_LIBRARY_PATH =
+if SET_ENV_LIBRARY_PATH
+B10_LIBRARY_PATH += $(ENV_LIBRARY_PATH)=$(abs_top_builddir)/src/lib/dns/.libs:$(abs_top_builddir)/src/lib/exceptions/.libs:$(abs_top_builddir)/src/lib/xfr/.libs:$$$(ENV_LIBRARY_PATH)
+endif
# later will have configure option to choose this, like: coverage run --branch
PYCOVERAGE = $(PYTHON)
@@ -8,5 +15,6 @@
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_builddir)/src/lib/dns/python/.libs:$(abs_top_builddir)/src/bin/xfrin:$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python \
+ $(B10_LIBRARY_PATH) \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
done
Modified: branches/trac313/src/bin/xfrout/tests/Makefile.am
==============================================================================
--- branches/trac313/src/bin/xfrout/tests/Makefile.am (original)
+++ branches/trac313/src/bin/xfrout/tests/Makefile.am Wed Aug 18 20:51:43 2010
@@ -1,5 +1,12 @@
PYTESTS = xfrout_test.py
EXTRA_DIST = $(PYTESTS)
+
+# If necessary (rare cases), explicitly specify paths to dynamic libraries
+# required by loadable python modules.
+B10_LIBRARY_PATH =
+if SET_ENV_LIBRARY_PATH
+B10_LIBRARY_PATH += $(ENV_LIBRARY_PATH)=$(abs_top_builddir)/src/lib/dns/.libs:$(abs_top_builddir)/src/lib/exceptions/.libs:$(abs_top_builddir)/src/lib/xfr/.libs:$$$(ENV_LIBRARY_PATH)
+endif
# later will have configure option to choose this, like: coverage run --branch
PYCOVERAGE = $(PYTHON)
@@ -8,5 +15,6 @@
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_builddir)/src/bin/xfrout:$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/dns/python/.libs:$(abs_top_builddir)/src/lib/xfr/.libs \
+ $(B10_LIBRARY_PATH) \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
done
Modified: branches/trac313/src/lib/dns/python/tests/Makefile.am
==============================================================================
--- branches/trac313/src/lib/dns/python/tests/Makefile.am (original)
+++ branches/trac313/src/lib/dns/python/tests/Makefile.am Wed Aug 18 20:51:43 2010
@@ -10,6 +10,13 @@
EXTRA_DIST = $(PYTESTS)
+# If necessary (rare cases), explicitly specify paths to dynamic libraries
+# required by loadable python modules.
+B10_LIBRARY_PATH =
+if SET_ENV_LIBRARY_PATH
+B10_LIBRARY_PATH += $(ENV_LIBRARY_PATH)=$(abs_top_builddir)/src/lib/dns/.libs:$(abs_top_builddir)/src/lib/exceptions/.libs:$$$(ENV_LIBRARY_PATH)
+endif
+
# later will have configure option to choose this, like: coverage run --branch
PYCOVERAGE = $(PYTHON)
# test using command-line arguments, so use check-local target instead of TESTS
@@ -18,5 +25,6 @@
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/dns/python/.libs \
TESTDATA_PATH=$(abs_top_srcdir)/src/lib/dns/tests/testdata \
+ $(B10_LIBRARY_PATH) \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
done
Modified: branches/trac313/src/lib/python/isc/notify/tests/Makefile.am
==============================================================================
--- branches/trac313/src/lib/python/isc/notify/tests/Makefile.am (original)
+++ branches/trac313/src/lib/python/isc/notify/tests/Makefile.am Wed Aug 18 20:51:43 2010
@@ -1,5 +1,12 @@
PYTESTS = notify_out_test.py
EXTRA_DIST = $(PYTESTS)
+
+# If necessary (rare cases), explicitly specify paths to dynamic libraries
+# required by loadable python modules.
+B10_LIBRARY_PATH =
+if SET_ENV_LIBRARY_PATH
+B10_LIBRARY_PATH += $(ENV_LIBRARY_PATH)=$(abs_top_builddir)/src/lib/dns/.libs:$(abs_top_builddir)/src/lib/exceptions/.libs:$$$(ENV_LIBRARY_PATH)
+endif
# later will have configure option to choose this, like: coverage run --branch
PYCOVERAGE = $(PYTHON)
@@ -8,5 +15,6 @@
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/dns/python/.libs \
+ $(B10_LIBRARY_PATH) \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
done
More information about the bind10-changes
mailing list