1997-10-02 23:05:46 +00:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
|
|
|
# ld_lib_path.sh
|
|
|
|
#
|
|
|
|
# Return the name of the environment variable for the operating
|
|
|
|
# system that is used by the dynamic loader.
|
|
|
|
#
|
|
|
|
# Copyright (C) 1997 Free Software Foundation, Inc.
|
|
|
|
#
|
|
|
|
# Author: Scott Christley <scottc@net-community.com>
|
1997-10-13 23:30:17 +00:00
|
|
|
# Author: Ovidiu Predescu <ovidiu@net-community.com>
|
1997-10-02 23:05:46 +00:00
|
|
|
# This file is part of the GNUstep Makefile Package.
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public
|
|
|
|
# License along with this library; see the file COPYING.LIB.
|
|
|
|
# If not, write to the Free Software Foundation,
|
|
|
|
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
#
|
|
|
|
|
|
|
|
# The first (and only) parameter to this script is the canonical
|
1997-10-28 19:00:28 +00:00
|
|
|
# operating system name.
|
1997-10-13 23:30:17 +00:00
|
|
|
|
1997-10-28 19:00:28 +00:00
|
|
|
last_path_part=Libraries/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS/$LIBRARY_COMBO
|
1999-02-16 04:15:27 +00:00
|
|
|
tool_path_part=Libraries/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS
|
1997-10-13 23:30:17 +00:00
|
|
|
|
|
|
|
host_os=$GNUSTEP_HOST_OS
|
|
|
|
|
|
|
|
if [ -z "$host_os" ]; then
|
|
|
|
host_os=$1
|
|
|
|
fi
|
|
|
|
|
1997-10-16 18:52:02 +00:00
|
|
|
old_IFS="$IFS"
|
|
|
|
IFS="
|
|
|
|
"
|
1997-10-15 22:45:58 +00:00
|
|
|
|
1997-10-13 23:30:17 +00:00
|
|
|
case "$host_os" in
|
1997-10-02 23:05:46 +00:00
|
|
|
|
1997-10-13 23:30:17 +00:00
|
|
|
*nextstep4*)
|
1998-09-14 14:54:23 +00:00
|
|
|
if [ -z "$DYLD_LIBRARY_PATH" ]; then
|
1999-02-16 04:15:27 +00:00
|
|
|
DYLD_LIBRARY_PATH="$GNUSTEP_USER_ROOT/$last_path_part:$GNUSTEP_USER_ROOT/$tool_path_part:$GNUSTEP_LOCAL_ROOT/$last_path_part:$GNUSTEP_LOCAL_ROOT/$tool_path_part:$GNUSTEP_SYSTEM_ROOT/$last_path_part:$GNUSTEP_SYSTEM_ROOT/$tool_path_part"
|
1998-08-20 17:48:46 +00:00
|
|
|
else
|
1999-02-16 04:15:27 +00:00
|
|
|
DYLD_LIBRARY_PATH="$GNUSTEP_USER_ROOT/$last_path_part:$GNUSTEP_USER_ROOT/$tool_path_part:$GNUSTEP_LOCAL_ROOT/$last_path_part:$GNUSTEP_LOCAL_ROOT/$tool_path_part:$GNUSTEP_SYSTEM_ROOT/$last_path_part:$GNUSTEP_SYSTEM_ROOT/$tool_path_part:$DYLD_LIBRARY_PATH"
|
1998-08-20 17:48:46 +00:00
|
|
|
fi
|
1997-10-15 22:45:58 +00:00
|
|
|
if [ -n "$additional_library_paths" ]; then
|
1997-10-16 18:52:02 +00:00
|
|
|
for dir in $additional_library_paths; do
|
1997-10-15 22:45:58 +00:00
|
|
|
additional="${additional}${dir}:"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
DYLD_LIBRARY_PATH="${additional}${DYLD_LIBRARY_PATH}"
|
1997-12-05 02:09:12 +00:00
|
|
|
export DYLD_LIBRARY_PATH
|
|
|
|
;;
|
1997-10-02 23:05:46 +00:00
|
|
|
|
1997-10-13 23:30:17 +00:00
|
|
|
*)
|
1998-09-14 14:54:23 +00:00
|
|
|
if [ -z "$LD_LIBRARY_PATH" ]; then
|
1999-02-16 04:15:27 +00:00
|
|
|
LD_LIBRARY_PATH="$GNUSTEP_USER_ROOT/$last_path_part:$GNUSTEP_USER_ROOT/$tool_path_part:$GNUSTEP_LOCAL_ROOT/$last_path_part:$GNUSTEP_LOCAL_ROOT/$tool_path_part:$GNUSTEP_SYSTEM_ROOT/$last_path_part:$GNUSTEP_SYSTEM_ROOT/$tool_path_part"
|
1998-08-20 17:48:46 +00:00
|
|
|
else
|
1999-02-16 04:15:27 +00:00
|
|
|
LD_LIBRARY_PATH="$GNUSTEP_USER_ROOT/$last_path_part:$GNUSTEP_USER_ROOT/$tool_path_part:$GNUSTEP_LOCAL_ROOT/$last_path_part:$GNUSTEP_LOCAL_ROOT/$tool_path_part:$GNUSTEP_SYSTEM_ROOT/$last_path_part:$GNUSTEP_SYSTEM_ROOT/$tool_path_part:$LD_LIBRARY_PATH"
|
1998-08-20 17:48:46 +00:00
|
|
|
fi
|
1997-10-15 22:45:58 +00:00
|
|
|
if [ -n "$additional_library_paths" ]; then
|
1997-10-16 18:52:02 +00:00
|
|
|
for dir in $additional_library_paths; do
|
1997-10-15 22:45:58 +00:00
|
|
|
additional="${additional}${dir}:"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
LD_LIBRARY_PATH="${additional}${LD_LIBRARY_PATH}"
|
1997-10-13 23:30:17 +00:00
|
|
|
export LD_LIBRARY_PATH;;
|
1997-10-02 23:05:46 +00:00
|
|
|
|
1997-10-13 23:30:17 +00:00
|
|
|
esac
|
1997-10-02 23:05:46 +00:00
|
|
|
|
1997-10-16 18:52:02 +00:00
|
|
|
IFS="$old_IFS"
|