From fe3d5b7ff102876395e2a3c0035460d96fb49970 Mon Sep 17 00:00:00 2001 From: Nathanael Nerode Date: Thu, 3 Oct 2002 18:50:19 +0000 Subject: [PATCH] Makefile.tpl: Make RPATH_ENVVAR substitution more autoconfy. 2002-10-03 Nathanael Nerode * Makefile.tpl: Make RPATH_ENVVAR substitution more autoconfy. * configure.in: Make RPATH_ENVVAR substitution more autoconfy. * Makefile.in: Regenerate. From-SVN: r57782 --- ChangeLog | 6 ++++++ Makefile.in | 2 +- Makefile.tpl | 2 +- configure.in | 19 ++++++++++--------- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb627e0be92..05936b20bc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-10-03 Nathanael Nerode + + * Makefile.tpl: Make RPATH_ENVVAR substitution more autoconfy. + * configure.in: Make RPATH_ENVVAR substitution more autoconfy. + * Makefile.in: Regenerate. + 2002-10-02 Janis Johnson * MAINTAINERS: Add myself as web pages co-maintainer. diff --git a/Makefile.in b/Makefile.in index c78623f4c83..6d5acc65b44 100644 --- a/Makefile.in +++ b/Makefile.in @@ -205,7 +205,7 @@ SET_LIB_PATH = # This is the name of the environment variable used for the path to # the libraries. This may be changed by configure.in. -RPATH_ENVVAR = LD_LIBRARY_PATH +RPATH_ENVVAR = @RPATH_ENVVAR@ # This is the list of directories that may be needed in RPATH_ENVVAR # so that programs built for the host machine work. diff --git a/Makefile.tpl b/Makefile.tpl index 01532e6e2b9..2c72994066c 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -208,7 +208,7 @@ SET_LIB_PATH = # This is the name of the environment variable used for the path to # the libraries. This may be changed by configure.in. -RPATH_ENVVAR = LD_LIBRARY_PATH +RPATH_ENVVAR = @RPATH_ENVVAR@ # This is the list of directories that may be needed in RPATH_ENVVAR # so that programs built for the host machine work. diff --git a/configure.in b/configure.in index bee4c2998a6..98f56c34ebf 100644 --- a/configure.in +++ b/configure.in @@ -1325,17 +1325,18 @@ if test "${shared}" = "yes" ; then Makefile > Makefile.tem rm -f Makefile mv -f Makefile.tem Makefile - - case "${host}" in - *-*-hpux*) - sed -e 's/^RPATH_ENVVAR[ ]*=.*$/RPATH_ENVVAR = SHLIB_PATH/' \ - Makefile > Makefile.tem - rm -f Makefile - mv -f Makefile.tem Makefile - ;; - esac fi + +case "${host}" in + *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; + *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; +esac +sed -e "s/@RPATH_ENVVAR@/${RPATH_ENVVAR}/" Makefile > Makefile.tem +rm -f Makefile +mv -f Makefile.tem Makefile + + # Base args. Strip norecursion, cache-file, srcdir, host, build, target. # These are the ones we might not want to pass down to subconfigures. baseargs=`echo "${arguments}" | \