Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jul 1997 21:40:21 -0600 (MDT)
From:      Alan Lundin <aflundi@lundin.abq.nm.us>
To:        "Richard Wackerbarth" <rkw@dataplex.net>, "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc:        current@FreeBSD.ORG
Subject:   Re: Heads up and and a call for a show of hands.
Message-ID:  <199707130340.VAA04548@lundin.abq.nm.us.>
In-Reply-To: "Richard Wackerbarth" <rkw@dataplex.net> "Re: Heads up and and a call for a show of hands." (Jul 11, 11:43am)

next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 11, 11:43am, "Richard Wackerbarth" wrote:
> Subject: Re: Heads up and and a call for a show of hands.
> 
> On Fri, Jul 11, 1997 10:16 AM, Jordan K. Hubbard
> <mailto:jkh@time.cdrom.com> wrote:
> 
> >	Should /etc/ld.so.conf be an _override_ or an _add on_ to the "detected"
> ldconfig path list?
> [arguments omitted]
> 
> Why not get both effects. Have two config files, for example, 
> /etc/ld.so.conf and /usr/local/etc/ld.so.conf.
> [ ... ]

Why not just source ld.so.conf if it exists then you
can have either behavior depending on what is in ld.so.conf:

/etc/rc
  [...]
  _LDC=/usr/lib
  if [ -d /usr/lib/compat ]; then _LDC="${_LDC} /usr/lib/compat" ; fi
  if [ -d /usr/X11R6/lib ]; then _LDC="${_LDC} /usr/X11R6/lib" ; fi
  if [ -d /usr/local/lib ]; then _LDC="${_LDC} /usr/local/lib" ; fi
  echo 'setting ldconfig path:' ${_LDC}
  if [ -f /etc/ld.so.conf ]; then
	. /etc/ld.so.conf
  fi
  ldconfig ${_LDC}
  [...]

and ld.so.conf can contain something like

  ${_LDC}="${_LDC} /my/new/lib/dir"

for append behavior or

  ${_LDC}="/usr/X11R6/lib /my/new/lib/dir /usr/local/lib"

for override behavior.

--alan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707130340.VAA04548>