Remove building with NOCRYPTO option
[minix.git] / external / bsd / bind / dist / contrib / idn / idnkit-1.0-src / tools / runidn / runidn.in
blob0036928f80af8198e6b73f8d4acbacf8267eebb8
1 #! /bin/sh
2 # Id: runidn.in,v 1.1 2003/06/04 00:27:14 marka Exp
4 # Copyright (c) 2000 Japan Network Information Center. All rights reserved.
5 #
6 # By using this file, you agree to the terms and conditions set forth bellow.
7 #
8 # LICENSE TERMS AND CONDITIONS
9 #
10 # The following License Terms and Conditions apply, unless a different
11 # license is obtained from Japan Network Information Center ("JPNIC"),
12 # a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
13 # Chiyoda-ku, Tokyo 101-0047, Japan.
15 # 1. Use, Modification and Redistribution (including distribution of any
16 # modified or derived work) in source and/or binary forms is permitted
17 # under this License Terms and Conditions.
19 # 2. Redistribution of source code must retain the copyright notices as they
20 # appear in each source code file, this License Terms and Conditions.
22 # 3. Redistribution in binary form must reproduce the Copyright Notice,
23 # this License Terms and Conditions, in the documentation and/or other
24 # materials provided with the distribution. For the purposes of binary
25 # distribution the "Copyright Notice" refers to the following language:
26 # "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved."
28 # 4. The name of JPNIC may not be used to endorse or promote products
29 # derived from this Software without specific prior written approval of
30 # JPNIC.
32 # 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
33 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
35 # PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
36 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
37 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
38 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
39 # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
40 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
41 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
42 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
44 # Parse command line options.
45 usage="Usage: `basename $0` [-e local-encoding] command [argument..]"
46 while test $# -gt 0; do
47 case "$1" in
48 -e)
49 if test $# -le 1; then
50 echo $usage 1>&2
51 exit 1
53 IDN_LOCAL_CODESET="$2"
54 export IDN_LOCAL_CODESET
55 shift
58 break
60 -*)
61 echo $usage 1>&2
62 exit 1
65 break
67 esac
68 shift
69 done
70 if test $# -eq 0; then
71 echo $usage 1>&2
72 exit 1
75 # Load library info.
76 preload=
77 iconv_file=@ICONVSOFILE@
78 if test "$iconv_file" != none; then
79 preload="$iconv_file@PRELOAD_SEP@"
82 prefix=@prefix@
83 exec_prefix=@exec_prefix@
84 libdir=`echo @libdir@`
85 if test ! -f $libdir/libidnkitres.la; then
86 cat <<EOF 1>&2
87 Have you installed idnkit? I cannot find libidnkitres.la.
88 EOF
89 exit 1
91 eval `grep '^dlname' $libdir/libidnkitres.la`
92 if test "$dlname" = ""; then
93 cat <<EOF 1>&2
94 Sorry, runidn won't work because libidnkitres is not dynamically loadable.
95 EOF
96 exit 1
98 preload=$preload$libdir/$dlname
100 # Set @PRELOAD_VAR@.
101 if [ X$@PRELOAD_VAR@ = X ]; then
102 @PRELOAD_VAR@="$preload@PRELOAD_LAST@"
103 else
104 @PRELOAD_VAR@="$preload@PRELOAD_SEP@$@PRELOAD_VAR@@PRELOAD_LAST@"
106 export @PRELOAD_VAR@
108 # Shoot.
109 exec "$@"