-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·64 lines (58 loc) · 1.77 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
arg1=$1
CORE_DIR=`pwd`
echo "$CORE_DIR"
export CORE_DIR
set -- perl arch/Config.pl -corepath=$CORE_DIR
#=================================================================
# Look for support libraries:
for lib in z png jasper ; do
cap=$( echo "$lib" | tr a-z A-Z )
var=LIB_${cap}_PATH
val=$( eval "echo \"\$$var\"" )
if [[ -z "$val" ]] ; then
echo "** WARNING: path to $cap library $var not set."
echo "** would you like to try to fix? [y]"
for ask in 1 2 ; do
read resp
if [[ "$resp" == y || -z "$resp" ]] ; then
echo "Enter full path to $cap library on your system."
read resp
if [[ ! -d "$resp" ]] ; then
echo "invalid path: $resp. Try again? [y]"
continue
else
val="$resp"
eval "$var=\"$resp\""
break # found the library
fi
elif [[ "$resp" == n ]] ; then
break # skip this library by user request
fi
done
fi
if [[ ! -z "$val" ]] ; then
set -- "$@" "-lib$lib=$val"
fi
done
# if the uname command exists, give it a shot and see if
# we can narrow the choices; otherwise, spam 'em
os="ARCH"
mach="ARCH"
type uname > /dev/null
if [ $? -eq 0 ] ; then
os=`uname`
if [ "$os" = "AIX" -o "$os" = "IRIX" -o "$os" = "IRIX64" -o "$os" = "SunOS" -o "$os" = "HP-UX" -o "$os" = "Darwin" ] ; then
mach="ARCH"
else
if [ "$os" = "OSF1" -o "$os" = "Linux" -o "$os" = "UNICOS/mp" -o "$os" = "UNIX_System_V" ] ; then
mach=`uname -m`
else
os="ARCH"
mach="ARCH"
fi
fi
fi
# so proceed with configuration
set -- "$@" -os=$os -mach=$mach
"$@"