src/test/resources/golden-sample/configure

changeset 63
ac47c2fb2c4a
parent 60
43d6680e6410
child 66
dc758dcd4645
equal deleted inserted replaced
61:2c68549dabef 63:ac47c2fb2c4a
208 # 208 #
209 209
210 # create buffer for make variables required by dependencies 210 # create buffer for make variables required by dependencies
211 echo > "$TEMP_DIR/make.mk" 211 echo > "$TEMP_DIR/make.mk"
212 212
213 test_pkg_config()
214 {
215 if "$PKG_CONFIG" --exists "$1" ; then :
216 else return 1 ; fi
217 if [ -n "$2" ] && "$PKG_CONFIG" --atleast-version="$2" "$1" ; then :
218 else return 1 ; fi
219 if [ -n "$3" ] && "$PKG_CONFIG" --exact-version="$3" "$1" ; then :
220 else return 1 ; fi
221 if [ -n "$4" ] && "$PKG_CONFIG" --max-version="$4" "$1" ; then :
222 else return 1 ; fi
223 return 0
224 }
225
213 dependency_error_libpq() 226 dependency_error_libpq()
214 { 227 {
215 printf "checking for libpq... " 228 printf "checking for libpq... "
216 # dependency libpq 229 # dependency libpq
217 while true 230 while true
218 do 231 do
219 if [ -z "$PKG_CONFIG" ]; then 232 if [ -z "$PKG_CONFIG" ]; then
220 break 233 break
221 fi 234 fi
222 if $PKG_CONFIG libpq ; then 235 if test_pkg_config "libpq" "" "" "" ; then
223 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libpq`" 236 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libpq`"
224 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libpq`" 237 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libpq`"
225 else 238 else
226 break 239 break
227 fi 240 fi
239 while true 252 while true
240 do 253 do
241 if [ -z "$PKG_CONFIG" ]; then 254 if [ -z "$PKG_CONFIG" ]; then
242 break 255 break
243 fi 256 fi
244 if $PKG_CONFIG openssl ; then 257 if test_pkg_config "openssl" "" "" "" ; then
245 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags openssl`" 258 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags openssl`"
246 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs openssl`" 259 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs openssl`"
247 else 260 else
248 break 261 break
249 fi 262 fi
292 while true 305 while true
293 do 306 do
294 if [ -z "$PKG_CONFIG" ]; then 307 if [ -z "$PKG_CONFIG" ]; then
295 break 308 break
296 fi 309 fi
297 if $PKG_CONFIG libxml-2.0 ; then 310 if test_pkg_config "libxml-2.0" "" "" "" ; then
298 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libxml-2.0`" 311 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libxml-2.0`"
299 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libxml-2.0`" 312 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libxml-2.0`"
300 else 313 else
301 break 314 break
302 fi 315 fi

mercurial