2 #*************************************************************************
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 # Copyright 2008 by Sun Microsystems, Inc.
8 # OpenOffice.org - a multi-platform office productivity suite
10 # $RCSfile: header.hxx,v $
14 # This file is part of OpenOffice.org.
16 # OpenOffice.org is free software: you can redistribute it and/or modify
17 # it under the terms of the GNU Lesser General Public License version 3
18 # only, as published by the Free Software Foundation.
20 # OpenOffice.org is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU Lesser General Public License version 3 for more details
24 # (a copy is included in the LICENSE file that accompanied this code).
26 # You should have received a copy of the GNU Lesser General Public License
27 # version 3 along with OpenOffice.org. If not, see
28 # <http://www.openoffice.org/license.html>
29 # for a copy of the LGPLv3 License.
31 #*************************************************************************
32 # checkdll.sh - execute checkdll with all -L arguments to this script
33 # prepended to LD_LIBRARY_PATH
35 set -- `getopt "L:" "$@"` ||
{
36 echo "Usage: `basename $0` [-L library_path] <shared_library>" 1>&2
40 checkdll
="$SOLARVERSION/$INPATH/bin$UPDMINOREXT/checkdll"
42 if [ -x $checkdll ]; then
46 -L) shift; option
=$1;;
49 case "${libpath+X}" in
50 X
) libpath
=$libpath:$option;;
55 shift # remove the trailing ---
58 Darwin
) case "${DYLD_LIBRARY_PATH+X}" in
59 X
) DYLD_LIBRARY_PATH
=$libpath:$DYLD_LIBRARY_PATH;;
60 *) DYLD_LIBRARY_PATH
=$libpath;;
62 export DYLD_LIBRARY_PATH
;;
63 IRIX
) case "${LD_LIBRARYN32_PATH+X}" in
64 X
) LD_LIBRARYN32_PATH
=$libpath:$LD_LIBRARYN32_PATH;;
65 *) LD_LIBRARYN32_PATH
=$libpath;;
67 export LD_LIBRARYN32_PATH
;;
68 IRIX64
) case "${LD_LIBRARYN32_PATH+X}" in
69 X
) LD_LIBRARYN32_PATH
=$libpath:$LD_LIBRARYN32_PATH;;
70 *) LD_LIBRARYN32_PATH
=$libpath;;
72 export LD_LIBRARYN32_PATH
;;
73 *) case "${LD_LIBRARY_PATH+X}" in
74 X
) LD_LIBRARY_PATH
=$libpath:$LD_LIBRARY_PATH;;
75 *) LD_LIBRARY_PATH
=$libpath;;
77 export LD_LIBRARY_PATH
;;
81 if [ $?
-ne 0 ]; then exit 1 ; fi
83 for parameter
in $
*; do
86 realname
=`echo $library | sed "s/check_//"`
87 if [ $library != $realname ]; then
89 export LD_LIBRARY_PATH
93 echo "WARNING: checkdll not found!" 1>&2