java (1340:518b528dc67e) java (1341:f11eb1b5b339)
1
2# Copyright (C) NGINX, Inc.
3
4
5shift
6
7NXT_JAVA_HOME=${JAVA_HOME-}
8NXT_JAR_REPO=https://repo1.maven.org/maven2/

--- 70 unchanged lines hidden (view full) ---

79 $echo $0: error: Java home directory not found.
80 $echo
81 exit 1
82 fi
83
84 NXT_JAVA="${NXT_JAVA_HOME}/bin/java"
85
86else
1
2# Copyright (C) NGINX, Inc.
3
4
5shift
6
7NXT_JAVA_HOME=${JAVA_HOME-}
8NXT_JAR_REPO=https://repo1.maven.org/maven2/

--- 70 unchanged lines hidden (view full) ---

79 $echo $0: error: Java home directory not found.
80 $echo
81 exit 1
82 fi
83
84 NXT_JAVA="${NXT_JAVA_HOME}/bin/java"
85
86else
87 $echo -n "checking for java executable"
87 $echo -n "checking for java executable ..."
88 $echo "checking for java executable ..." >> $NXT_AUTOCONF_ERR
89
90 NXT_JAVA=`which java || :`
91 if [ -z "$NXT_JAVA" -o ! -x "$NXT_JAVA" ]; then
88 $echo "checking for java executable ..." >> $NXT_AUTOCONF_ERR
89
90 NXT_JAVA=`which java || :`
91 if [ -z "$NXT_JAVA" -o ! -x "$NXT_JAVA" ]; then
92 $echo " not found"
92 $echo
93 $echo $0: error: java executable not found.
94 $echo
95 exit 1
96 fi
97
98 $echo " found $NXT_JAVA"
99 $echo "found $NXT_JAVA" >> $NXT_AUTOCONF_ERR
100
101 "$NXT_JAVA" -version
102
93 $echo
94 $echo $0: error: java executable not found.
95 $echo
96 exit 1
97 fi
98
99 $echo " found $NXT_JAVA"
100 $echo "found $NXT_JAVA" >> $NXT_AUTOCONF_ERR
101
102 "$NXT_JAVA" -version
103
103 $echo -n "checking java.home"
104 $echo -n "checking java.home ..."
104 $echo "checking java.home ..." >> $NXT_AUTOCONF_ERR
105
106 NXT_JAVA_HOME=`$NXT_JAVA -XshowSettings 2>&1 | grep -F -e java.home | sed -e 's/^.*= //'`
107 if [ -z "$NXT_JAVA_HOME" ]; then
105 $echo "checking java.home ..." >> $NXT_AUTOCONF_ERR
106
107 NXT_JAVA_HOME=`$NXT_JAVA -XshowSettings 2>&1 | grep -F -e java.home | sed -e 's/^.*= //'`
108 if [ -z "$NXT_JAVA_HOME" ]; then
109 $echo " not found"
108 $echo
109 $echo $0: error: java.home not found.
110 $echo
111 exit 1
112 fi
113
114 $echo " $NXT_JAVA_HOME"
115 $echo "got java.home $NXT_JAVA_HOME" >> $NXT_AUTOCONF_ERR

--- 28 unchanged lines hidden (view full) ---

144 NXT_JAVA_INCLUDE="${NXT_JAVA_INCLUDE} -I${NXT_JAVA_HOME}/include/darwin"
145 ;;
146 FreeBSD)
147 NXT_JAVA_INCLUDE="${NXT_JAVA_INCLUDE} -I${NXT_JAVA_HOME}/include/freebsd"
148 ;;
149esac
150
151if [ -z "$NXT_JAVA_LIB_PATH" ]; then
110 $echo
111 $echo $0: error: java.home not found.
112 $echo
113 exit 1
114 fi
115
116 $echo " $NXT_JAVA_HOME"
117 $echo "got java.home $NXT_JAVA_HOME" >> $NXT_AUTOCONF_ERR

--- 28 unchanged lines hidden (view full) ---

146 NXT_JAVA_INCLUDE="${NXT_JAVA_INCLUDE} -I${NXT_JAVA_HOME}/include/darwin"
147 ;;
148 FreeBSD)
149 NXT_JAVA_INCLUDE="${NXT_JAVA_INCLUDE} -I${NXT_JAVA_HOME}/include/freebsd"
150 ;;
151esac
152
153if [ -z "$NXT_JAVA_LIB_PATH" ]; then
152 $echo -n "checking library path"
154 $echo -n "checking library path ..."
153 $echo "checking library path ..." >> $NXT_AUTOCONF_ERR
154
155 if [ ! -x "$NXT_JAVA" ]; then
155 $echo "checking library path ..." >> $NXT_AUTOCONF_ERR
156
157 if [ ! -x "$NXT_JAVA" ]; then
158 $echo " not found"
156 $echo
157 $echo $0: error: java executable not found.
158 $echo
159 exit 1
160 fi
161
162 NXT_JAVA_LIB_PATH=`$NXT_JAVA -XshowSettings 2>&1 | grep -F -e sun.boot.library.path | sed -e 's/^.*= //'`
163
164 if [ -z "$NXT_JAVA_LIB_PATH" ]; then
159 $echo
160 $echo $0: error: java executable not found.
161 $echo
162 exit 1
163 fi
164
165 NXT_JAVA_LIB_PATH=`$NXT_JAVA -XshowSettings 2>&1 | grep -F -e sun.boot.library.path | sed -e 's/^.*= //'`
166
167 if [ -z "$NXT_JAVA_LIB_PATH" ]; then
168 $echo " not found"
165 $echo
166 $echo $0: error: library path not found.
167 $echo
168 exit 1
169 fi
170
171 NXT_JAVA_LIB_PATH="${NXT_JAVA_LIB_PATH}/server"
172

--- 436 unchanged lines hidden ---
169 $echo
170 $echo $0: error: library path not found.
171 $echo
172 exit 1
173 fi
174
175 NXT_JAVA_LIB_PATH="${NXT_JAVA_LIB_PATH}/server"
176

--- 436 unchanged lines hidden ---