61:2c68549dabef | 63:ac47c2fb2c4a |
---|---|
211 # | 211 # |
212 | 212 |
213 # create buffer for make variables required by dependencies | 213 # create buffer for make variables required by dependencies |
214 echo > "$TEMP_DIR/make.mk" | 214 echo > "$TEMP_DIR/make.mk" |
215 | 215 |
216 test_pkg_config() | |
217 { | |
218 if "$PKG_CONFIG" --exists "$1" ; then : | |
219 else return 1 ; fi | |
220 if [ -n "$2" ] && "$PKG_CONFIG" --atleast-version="$2" "$1" ; then : | |
221 else return 1 ; fi | |
222 if [ -n "$3" ] && "$PKG_CONFIG" --exact-version="$3" "$1" ; then : | |
223 else return 1 ; fi | |
224 if [ -n "$4" ] && "$PKG_CONFIG" --max-version="$4" "$1" ; then : | |
225 else return 1 ; fi | |
226 return 0 | |
227 } | |
228 | |
216 dependency_error_qt4() | 229 dependency_error_qt4() |
217 { | 230 { |
218 printf "checking for qt4... " | 231 printf "checking for qt4... " |
219 # dependency qt4 | 232 # dependency qt4 |
220 while true | 233 while true |
270 while true | 283 while true |
271 do | 284 do |
272 if [ -z "$PKG_CONFIG" ]; then | 285 if [ -z "$PKG_CONFIG" ]; then |
273 break | 286 break |
274 fi | 287 fi |
275 if $PKG_CONFIG libcurl ; then | 288 if test_pkg_config "libcurl" "" "" "" ; then |
276 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libcurl`" | 289 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libcurl`" |
277 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libcurl`" | 290 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libcurl`" |
278 else | 291 else |
279 break | 292 break |
280 fi | 293 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 gtk+-2.0 ; then | 310 if test_pkg_config "gtk+-2.0" "" "" "" ; then |
298 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-2.0`" | 311 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-2.0`" |
299 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-2.0`" | 312 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-2.0`" |
300 else | 313 else |
301 break | 314 break |
302 fi | 315 fi |
314 while true | 327 while true |
315 do | 328 do |
316 if [ -z "$PKG_CONFIG" ]; then | 329 if [ -z "$PKG_CONFIG" ]; then |
317 break | 330 break |
318 fi | 331 fi |
319 if $PKG_CONFIG sqlite3 ; then | 332 if test_pkg_config "sqlite3" "" "" "" ; then |
320 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sqlite3`" | 333 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sqlite3`" |
321 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sqlite3`" | 334 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sqlite3`" |
322 else | 335 else |
323 break | 336 break |
324 fi | 337 fi |
364 while true | 377 while true |
365 do | 378 do |
366 if [ -z "$PKG_CONFIG" ]; then | 379 if [ -z "$PKG_CONFIG" ]; then |
367 break | 380 break |
368 fi | 381 fi |
369 if $PKG_CONFIG gtk+-5.0 ; then | 382 if test_pkg_config "gtk+-5.0" "" "" "" ; then |
370 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-5.0`" | 383 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-5.0`" |
371 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-5.0`" | 384 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-5.0`" |
372 else | 385 else |
373 break | 386 break |
374 fi | 387 fi |
400 while true | 413 while true |
401 do | 414 do |
402 if [ -z "$PKG_CONFIG" ]; then | 415 if [ -z "$PKG_CONFIG" ]; then |
403 break | 416 break |
404 fi | 417 fi |
405 if $PKG_CONFIG --atleast-version=2.8 libxml-2.0 ; then | 418 if test_pkg_config "libxml-2.0" "2.8" "" "" ; then |
406 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libxml-2.0`" | 419 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libxml-2.0`" |
407 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libxml-2.0`" | 420 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libxml-2.0`" |
408 else | 421 else |
409 break | 422 break |
410 fi | 423 fi |