85 "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;; |
94 "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;; |
86 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
95 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
87 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
96 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
88 "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
97 "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
89 "--mandir"*) MANDIR=${ARG#--mandir} ;; |
98 "--mandir"*) MANDIR=${ARG#--mandir} ;; |
90 "--help"*) printhelp; rm -Rf "$TEMP_DIR"; exit 1 ;; |
99 "--help"*) printhelp; abort_configure ;; |
91 "--debug") BUILD_TYPE="debug" ;; |
100 "--debug") BUILD_TYPE="debug" ;; |
92 "--release") BUILD_TYPE="release" ;; |
101 "--release") BUILD_TYPE="release" ;; |
93 "--toolkit="*) OPT_TOOLKIT=${ARG#--toolkit=} ;; |
102 "--toolkit="*) OPT_TOOLKIT=${ARG#--toolkit=} ;; |
94 "--enable-db") FEATURE_DB=on ;; |
103 "--enable-db") FEATURE_DB=on ;; |
95 "--disable-db") unset FEATURE_DB ;; |
104 "--disable-db") unset FEATURE_DB ;; |
96 "--enable-gui") FEATURE_GUI=on ;; |
105 "--enable-gui") FEATURE_GUI=on ;; |
97 "--disable-gui") unset FEATURE_GUI ;; |
106 "--disable-gui") unset FEATURE_GUI ;; |
98 "-"*) echo "unknown option: $ARG"; rm -Rf "$TEMP_DIR"; exit 1 ;; |
107 "-"*) echo "unknown option: $ARG"; abort_configure ;; |
99 esac |
108 esac |
100 done |
109 done |
101 |
110 |
|
111 |
102 # set dir variables |
112 # set dir variables |
103 if [ -z "$BINDIR" ]; then |
113 : ${BINDIR:="$EPREFIX/bin"} |
104 BINDIR=$EPREFIX/bin |
114 : ${SBINDIR:="$EPREFIX/sbin"} |
105 fi |
115 : ${LIBDIR:="$EPREFIX/lib"} |
106 if [ -z "$SBINDIR" ]; then |
116 : ${LIBEXECDIR:="$EPREFIX/libexec"} |
107 SBINDIR=$EPREFIX/sbin |
117 : ${DATADIR:="$PREFIX/share"} |
108 fi |
118 : ${SYSCONFDIR:="$PREFIX/etc"} |
109 if [ -z "$LIBDIR" ]; then |
119 : ${SHAREDSTATEDIR:="$PREFIX/com"} |
110 LIBDIR=$EPREFIX/lib |
120 : ${LOCALSTATEDIR:="$PREFIX/var"} |
111 fi |
121 : ${INCLUDEDIR:="$PREFIX/include"} |
112 if [ -z "$LIBEXEC" ]; then |
122 : ${INFODIR:="$PREFIX/info"} |
113 LIBEXECDIR=$EPREFIX/libexec |
123 : ${MANDIR:="$PREFIX/man"} |
114 fi |
124 |
115 if [ -z "$DATADIR" ]; then |
125 # Test for availability of pkg-config |
116 DATADIR=$PREFIX/share |
126 PKG_CONFIG=`command -v pkg-config` |
117 fi |
127 : ${PKG_CONFIG:="false"} |
118 if [ -z "$SYSCONFDIR" ]; then |
|
119 SYSCONFDIR=$PREFIX/etc |
|
120 fi |
|
121 if [ -z "$SHAREDSTATEDIR" ]; then |
|
122 SHAREDSTATEDIR=$PREFIX/com |
|
123 fi |
|
124 if [ -z "$LOCALSTATEDIR" ]; then |
|
125 LOCALSTATEDIR=$PREFIX/var |
|
126 fi |
|
127 if [ -z "$INCLUDEDIR" ]; then |
|
128 INCLUDEDIR=$PREFIX/include |
|
129 fi |
|
130 if [ -z "$INFODIR" ]; then |
|
131 INFODIR=$PREFIX/info |
|
132 fi |
|
133 if [ -z "$MANDIR" ]; then |
|
134 MANDIR=$PREFIX/man |
|
135 fi |
|
136 |
|
137 which pkg-config > /dev/null |
|
138 if [ $? -eq 0 ]; then |
|
139 PKG_CONFIG=pkg-config |
|
140 else |
|
141 PKG_CONFIG=false |
|
142 fi |
|
143 |
128 |
144 # Simple uname based platform detection |
129 # Simple uname based platform detection |
145 # $PLATFORM is used for platform dependent dependency selection |
130 # $PLATFORM is used for platform dependent dependency selection |
|
131 OS=`uname -s` |
|
132 OS_VERSION=`uname -r` |
146 printf "detect platform... " |
133 printf "detect platform... " |
147 if [ "$OS" = "SunOS" ]; then |
134 if [ "$OS" = "SunOS" ]; then |
148 PLATFORM="solaris sunos unix svr4" |
135 PLATFORM="solaris sunos unix svr4" |
149 fi |
136 fi |
150 if [ "$OS" = "Linux" ]; then |
137 if [ "$OS" = "Linux" ]; then |
213 SHAREDSTATEDIR=$SHAREDSTATEDIR |
186 SHAREDSTATEDIR=$SHAREDSTATEDIR |
214 LOCALSTATEDIR=$LOCALSTATEDIR |
187 LOCALSTATEDIR=$LOCALSTATEDIR |
215 INCLUDEDIR=$INCLUDEDIR |
188 INCLUDEDIR=$INCLUDEDIR |
216 INFODIR=$INFODIR |
189 INFODIR=$INFODIR |
217 MANDIR=$MANDIR |
190 MANDIR=$MANDIR |
218 |
|
219 __EOF__ |
191 __EOF__ |
220 |
192 cat > "$TEMP_DIR/config.mk" << __EOF__ |
221 echo > "$TEMP_DIR/make.mk" |
193 # |
222 |
194 # config.mk generated by configure |
223 ENV_CFLAGS=$CFLAGS |
195 # |
224 ENV_LDFLAGS=$LDFLAGS |
196 __EOF__ |
225 ENV_CXXFLAGS=$CXXFLAGS |
197 sort -u "$TEMP_DIR/vars.mk" >> "$TEMP_DIR/config.mk" |
226 |
198 |
227 # Toolchain detection |
199 |
|
200 # toolchain detection |
228 # this will insert make vars to config.mk |
201 # this will insert make vars to config.mk |
229 . make/toolchain.sh |
202 . make/toolchain.sh |
230 |
203 if [ -n "$TOOLCHAIN_ERROR" ]; then |
231 # add user specified flags to config.mk |
204 echo "Toolchain error: $TOOLCHAIN_ERROR" |
232 echo "# project specific flags" >> "$TEMP_DIR/config.mk" |
205 echo "Abort." |
233 if [ -n "${ENV_CFLAGS}" ]; then |
206 abort_configure |
234 echo "CFLAGS += $ENV_CFLAGS" >> "$TEMP_DIR/config.mk" |
|
235 fi |
|
236 if [ -n "${ENV_CXXFLAGS}" ]; then |
|
237 echo "CXXFLAGS += $ENV_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
|
238 fi |
|
239 if [ -n "${ENV_LDFLAGS}" ]; then |
|
240 echo "LDFLAGS += $ENV_LDFLAGS" >> "$TEMP_DIR/config.mk" |
|
241 fi |
207 fi |
242 |
208 |
243 # |
209 # |
244 # DEPENDENCIES |
210 # DEPENDENCIES |
245 # |
211 # |
246 |
212 |
247 dependency_qt4() |
213 # create buffer for make variables required by dependencies |
|
214 echo > "$TEMP_DIR/make.mk" |
|
215 |
|
216 dependency_error_qt4() |
248 { |
217 { |
249 printf "checking for qt4... " |
218 printf "checking for qt4... " |
250 # dependency qt4 |
219 # dependency qt4 |
251 while true |
220 while true |
252 do |
221 do |
253 which qmake-qt4 > /dev/null |
222 if which qmake-qt4 > /dev/null ; then |
254 if [ $? -ne 0 ]; then |
223 : |
255 break |
224 else |
256 fi |
225 break |
257 echo yes |
226 fi |
258 return 0 |
227 echo yes |
259 done |
228 return 1 |
260 |
229 done |
261 echo no |
230 |
262 return 1 |
231 echo no |
263 } |
232 return 0 |
264 dependency_curl() |
233 } |
|
234 dependency_error_curl() |
265 { |
235 { |
266 printf "checking for curl... " |
236 printf "checking for curl... " |
267 # dependency curl platform="windows" |
237 # dependency curl platform="windows" |
268 while true |
238 while true |
269 do |
239 do |
270 if isnotplatform "windows"; then |
240 if notisplatform "windows"; then |
271 break |
241 break |
272 fi |
242 fi |
273 TEMP_CFLAGS="$TEMP_CFLAGS -I/mingw/include" |
243 TEMP_CFLAGS="$TEMP_CFLAGS -I/mingw/include" |
274 TEMP_LDFLAGS="$TEMP_LDFLAGS -lcurl" |
244 TEMP_LDFLAGS="$TEMP_LDFLAGS -lcurl" |
275 echo yes |
245 echo yes |
276 return 0 |
246 return 1 |
277 done |
247 done |
278 |
248 |
279 # dependency curl platform="macos" |
249 # dependency curl platform="macos" |
280 while true |
250 while true |
281 do |
251 do |
282 if isnotplatform "macos"; then |
252 if notisplatform "macos"; then |
283 break |
253 break |
284 fi |
254 fi |
285 curl-config --cflags > /dev/null |
255 if tmp_flags=`curl-config --cflags` ; then |
286 if [ $? -eq 0 ]; then |
256 TEMP_CFLAGS="$TEMP_CFLAGS $tmp_flags" |
287 TEMP_CFLAGS="$TEMP_CFLAGS `curl-config --cflags`" |
257 else |
288 else |
258 break |
289 break |
259 fi |
290 fi |
260 if tmp_flags=`curl-config --ldflags` ; then |
291 curl-config --ldflags > /dev/null |
261 TEMP_LDFLAGS="$TEMP_LDFLAGS $tmp_flags" |
292 if [ $? -eq 0 ]; then |
262 else |
293 TEMP_LDFLAGS="$TEMP_LDFLAGS `curl-config --ldflags`" |
263 break |
294 else |
264 fi |
295 break |
265 echo yes |
296 fi |
266 return 1 |
297 echo yes |
|
298 return 0 |
|
299 done |
267 done |
300 |
268 |
301 # dependency curl |
269 # dependency curl |
302 while true |
270 while true |
303 do |
271 do |
304 if [ -z "$PKG_CONFIG" ]; then |
272 if [ -z "$PKG_CONFIG" ]; then |
305 break |
273 break |
306 fi |
274 fi |
307 $PKG_CONFIG libcurl |
275 if $PKG_CONFIG libcurl ; then |
308 if [ $? -ne 0 ] ; then |
276 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libcurl`" |
309 break |
277 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libcurl`" |
310 fi |
278 else |
311 TEMP_CFLAGS="$TEMP_CFLAGS `$PKG_CONFIG --cflags libcurl`" |
279 break |
312 TEMP_LDFLAGS="$TEMP_LDFLAGS `$PKG_CONFIG --libs libcurl`" |
280 fi |
313 echo yes |
281 echo yes |
314 return 0 |
282 return 1 |
315 done |
283 done |
316 |
284 |
317 echo no |
285 echo no |
318 return 1 |
286 return 0 |
319 } |
287 } |
320 dependency_gtk2() |
288 dependency_error_gtk2() |
321 { |
289 { |
322 printf "checking for gtk2... " |
290 printf "checking for gtk2... " |
323 # dependency gtk2 |
291 # dependency gtk2 |
324 while true |
292 while true |
325 do |
293 do |
326 if [ -z "$PKG_CONFIG" ]; then |
294 if [ -z "$PKG_CONFIG" ]; then |
327 break |
295 break |
328 fi |
296 fi |
329 $PKG_CONFIG gtk+-2.0 |
297 if $PKG_CONFIG gtk+-2.0 ; then |
330 if [ $? -ne 0 ] ; then |
298 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-2.0`" |
331 break |
299 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-2.0`" |
332 fi |
300 else |
333 TEMP_CFLAGS="$TEMP_CFLAGS `$PKG_CONFIG --cflags gtk+-2.0`" |
301 break |
334 TEMP_LDFLAGS="$TEMP_LDFLAGS `$PKG_CONFIG --libs gtk+-2.0`" |
302 fi |
335 echo yes |
303 echo yes |
336 return 0 |
304 return 1 |
337 done |
305 done |
338 |
306 |
339 echo no |
307 echo no |
340 return 1 |
308 return 0 |
341 } |
309 } |
342 dependency_sqlite() |
310 dependency_error_sqlite() |
343 { |
311 { |
344 printf "checking for sqlite... " |
312 printf "checking for sqlite... " |
345 # dependency sqlite |
313 # dependency sqlite |
346 while true |
314 while true |
347 do |
315 do |
348 if [ -z "$PKG_CONFIG" ]; then |
316 if [ -z "$PKG_CONFIG" ]; then |
349 break |
317 break |
350 fi |
318 fi |
351 $PKG_CONFIG sqlite3 |
319 if $PKG_CONFIG sqlite3 ; then |
352 if [ $? -ne 0 ] ; then |
320 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sqlite3`" |
353 break |
321 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sqlite3`" |
354 fi |
322 else |
355 TEMP_CFLAGS="$TEMP_CFLAGS `$PKG_CONFIG --cflags sqlite3`" |
323 break |
356 TEMP_LDFLAGS="$TEMP_LDFLAGS `$PKG_CONFIG --libs sqlite3`" |
324 fi |
357 echo yes |
325 echo yes |
358 return 0 |
326 return 1 |
359 done |
327 done |
360 |
328 |
361 echo no |
329 echo no |
362 return 1 |
330 return 0 |
363 } |
331 } |
364 dependency_test() |
332 dependency_error_test() |
365 { |
333 { |
366 printf "checking for test... " |
334 printf "checking for test... " |
367 # dependency test platform="bsd" |
335 # dependency test platform="bsd" |
368 while true |
336 while true |
369 do |
337 do |
370 if isnotplatform "bsd"; then |
338 if notisplatform "bsd"; then |
371 break |
339 break |
372 fi |
340 fi |
373 if isplatform "macos"; then |
341 if isplatform "macos"; then |
374 break |
342 break |
375 fi |
343 fi |
376 TEMP_CFLAGS="$TEMP_CFLAGS -DBSD" |
344 TEMP_CFLAGS="$TEMP_CFLAGS -DBSD" |
377 echo yes |
345 echo yes |
378 return 0 |
346 return 1 |
379 done |
347 done |
380 |
348 |
381 # dependency test |
349 # dependency test |
382 while true |
350 while true |
383 do |
351 do |
384 TEMP_CFLAGS="$TEMP_CFLAGS -DTEST" |
352 TEMP_CFLAGS="$TEMP_CFLAGS -DTEST" |
385 echo yes |
353 echo yes |
386 return 0 |
354 return 1 |
387 done |
355 done |
388 |
356 |
389 echo no |
357 echo no |
390 return 1 |
358 return 0 |
391 } |
359 } |
392 dependency_gtk3() |
360 dependency_error_gtk3() |
393 { |
361 { |
394 printf "checking for gtk3... " |
362 printf "checking for gtk3... " |
395 # dependency gtk3 |
363 # dependency gtk3 |
396 while true |
364 while true |
397 do |
365 do |
398 if [ -z "$PKG_CONFIG" ]; then |
366 if [ -z "$PKG_CONFIG" ]; then |
399 break |
367 break |
400 fi |
368 fi |
401 $PKG_CONFIG gtk+-5.0 |
369 if $PKG_CONFIG gtk+-5.0 ; then |
402 if [ $? -ne 0 ] ; then |
370 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-5.0`" |
403 break |
371 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-5.0`" |
404 fi |
372 else |
405 TEMP_CFLAGS="$TEMP_CFLAGS `$PKG_CONFIG --cflags gtk+-5.0`" |
373 break |
406 TEMP_LDFLAGS="$TEMP_LDFLAGS `$PKG_CONFIG --libs gtk+-5.0`" |
374 fi |
407 echo yes |
375 echo yes |
408 return 0 |
376 return 1 |
409 done |
377 done |
410 |
378 |
411 echo no |
379 echo no |
412 return 1 |
380 return 0 |
413 } |
381 } |
414 dependency_deptest() |
382 dependency_error_deptest() |
415 { |
383 { |
416 printf "checking for deptest... " |
384 printf "checking for deptest... " |
417 # dependency deptest |
385 # dependency deptest |
418 while true |
386 while true |
419 do |
387 do |
420 TEMP_CFLAGS="$TEMP_CFLAGS -DDEPTEST" |
388 TEMP_CFLAGS="$TEMP_CFLAGS -DDEPTEST" |
421 echo yes |
389 echo yes |
422 return 0 |
390 return 1 |
423 done |
391 done |
424 |
392 |
425 echo no |
393 echo no |
426 return 1 |
394 return 0 |
427 } |
395 } |
428 dependency_libxml2() |
396 dependency_error_libxml2() |
429 { |
397 { |
430 printf "checking for libxml2... " |
398 printf "checking for libxml2... " |
431 # dependency libxml2 |
399 # dependency libxml2 |
432 while true |
400 while true |
433 do |
401 do |
434 if [ -z "$PKG_CONFIG" ]; then |
402 if [ -z "$PKG_CONFIG" ]; then |
435 break |
403 break |
436 fi |
404 fi |
437 $PKG_CONFIG --atleast-version=2.8 libxml-2.0 |
405 if $PKG_CONFIG --atleast-version=2.8 libxml-2.0 ; then |
438 if [ $? -ne 0 ] ; then |
406 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libxml-2.0`" |
439 break |
407 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libxml-2.0`" |
440 fi |
408 else |
441 TEMP_CFLAGS="$TEMP_CFLAGS `$PKG_CONFIG --cflags libxml-2.0`" |
409 break |
442 TEMP_LDFLAGS="$TEMP_LDFLAGS `$PKG_CONFIG --libs libxml-2.0`" |
410 fi |
443 cat >> $TEMP_DIR/make.mk << __EOF__ |
411 cat >> $TEMP_DIR/make.mk << __EOF__ |
444 # Dependency: libxml2 |
412 # Dependency: libxml2 |
445 xml = libxml2 |
413 xml = libxml2 |
446 |
414 |
447 __EOF__ |
415 __EOF__ |
448 echo yes |
416 echo yes |
449 return 0 |
417 return 1 |
450 done |
418 done |
451 |
419 |
452 echo no |
420 echo no |
453 return 1 |
421 return 0 |
454 } |
422 } |
455 |
423 |
456 DEPENDENCIES_FAILED= |
424 DEPENDENCIES_FAILED= |
457 ERROR=0 |
425 ERROR=0 |
458 # general dependencies |
426 # unnamed dependencies |
459 TEMP_CFLAGS= |
427 TEMP_CFLAGS= |
460 TEMP_LDFLAGS= |
428 TEMP_LDFLAGS= |
461 while true |
429 while true |
462 do |
430 do |
463 while true |
431 while true |
549 } |
507 } |
550 |
508 |
551 # |
509 # |
552 # TARGETS |
510 # TARGETS |
553 # |
511 # |
554 TEMP_CFLAGS= |
|
555 TEMP_CXXFLAGS= |
|
556 TEMP_LDFLAGS= |
|
557 |
512 |
558 # Target: dav |
513 # Target: dav |
559 TEMP_CFLAGS= |
514 TEMP_CFLAGS= |
560 TEMP_LDFLAGS= |
515 TEMP_LDFLAGS= |
561 TEMP_CXXFLAGS= |
516 |
562 |
517 if dependency_error_curl; then |
563 dependency_curl |
|
564 if [ $? -ne 0 ]; then |
|
565 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED curl " |
518 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED curl " |
566 ERROR=1 |
519 ERROR=1 |
567 fi |
520 fi |
568 dependency_libxml2 |
521 if dependency_error_libxml2; then |
569 if [ $? -ne 0 ]; then |
|
570 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 " |
522 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libxml2 " |
571 ERROR=1 |
523 ERROR=1 |
572 fi |
524 fi |
573 dependency_test |
525 if dependency_error_test; then |
574 if [ $? -ne 0 ]; then |
|
575 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED test " |
526 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED test " |
576 ERROR=1 |
527 ERROR=1 |
577 fi |
528 fi |
578 |
529 |
579 # Features |
530 # Features |
580 if [ -n "$FEATURE_DB" ]; then |
531 if [ -n "$FEATURE_DB" ]; then |
581 # check dependency |
532 # check dependency |
582 dependency_sqlite |
533 if dependency_error_sqlite ; then |
583 if [ $? -ne 0 ]; then |
|
584 # "auto" features can fail and are just disabled in this case |
534 # "auto" features can fail and are just disabled in this case |
585 if [ "$FEATURE_DB" != "auto" ]; then |
535 if [ "$FEATURE_DB" = "auto" ]; then |
|
536 unset FEATURE_DB |
|
537 else |
586 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sqlite " |
538 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sqlite " |
587 ERROR=1 |
539 ERROR=1 |
588 else |
|
589 unset FEATURE_DB |
|
590 fi |
540 fi |
591 fi |
541 fi |
592 fi |
542 fi |
593 if [ -n "$FEATURE_GUI" ]; then |
543 if [ -n "$FEATURE_GUI" ]; then |
594 # check dependency |
544 # check dependency |
595 dependency_gtk3 |
545 if dependency_error_gtk3 ; then |
596 if [ $? -ne 0 ]; then |
|
597 # "auto" features can fail and are just disabled in this case |
546 # "auto" features can fail and are just disabled in this case |
598 if [ "$FEATURE_GUI" != "auto" ]; then |
547 if [ "$FEATURE_GUI" = "auto" ]; then |
|
548 unset FEATURE_GUI |
|
549 else |
599 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED gtk3 " |
550 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED gtk3 " |
600 ERROR=1 |
551 ERROR=1 |
601 else |
|
602 unset FEATURE_GUI |
|
603 fi |
552 fi |
604 fi |
553 fi |
605 fi |
554 fi |
606 |
555 |
607 # Option: --toolkit |
556 # Option: --toolkit |
608 if [ -z $OPT_TOOLKIT ]; then |
557 if [ -z $OPT_TOOLKIT ]; then |
609 SAVED_ERROR="$ERROR" |
558 SAVED_ERROR="$ERROR" |
610 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" |
559 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" |
611 ERROR=0 |
560 ERROR=1 |
612 while true |
561 while true |
613 do |
562 do |
614 if isplatform "windows"; then |
563 if isplatform "windows"; then |
615 checkopt_toolkit_wpf |
564 if checkopt_toolkit_wpf ; then |
616 if [ $? -eq 0 ]; then |
|
617 echo " toolkit: wpf" >> "$TEMP_DIR/options" |
565 echo " toolkit: wpf" >> "$TEMP_DIR/options" |
618 ERROR=0 |
566 ERROR=0 |
619 break |
567 break |
620 fi |
568 fi |
621 fi |
569 fi |
622 checkopt_toolkit_gtk3 |
570 if checkopt_toolkit_gtk3 ; then |
623 if [ $? -eq 0 ]; then |
|
624 echo " toolkit: gtk3" >> "$TEMP_DIR/options" |
571 echo " toolkit: gtk3" >> "$TEMP_DIR/options" |
625 ERROR=0 |
572 ERROR=0 |
626 break |
573 break |
627 fi |
574 fi |
628 checkopt_toolkit_gtk2 |
575 if checkopt_toolkit_gtk2 ; then |
629 if [ $? -eq 0 ]; then |
|
630 echo " toolkit: gtk2" >> "$TEMP_DIR/options" |
576 echo " toolkit: gtk2" >> "$TEMP_DIR/options" |
631 ERROR=0 |
577 ERROR=0 |
632 break |
578 break |
633 fi |
579 fi |
634 break |
580 break |
641 else |
587 else |
642 if false; then |
588 if false; then |
643 false |
589 false |
644 elif [ "$OPT_TOOLKIT" = "gtk3" ]; then |
590 elif [ "$OPT_TOOLKIT" = "gtk3" ]; then |
645 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
591 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
646 checkopt_toolkit_gtk3 |
592 if checkopt_toolkit_gtk3 ; then |
647 if [ $? -ne 0 ]; then |
593 : |
|
594 else |
648 ERROR=1 |
595 ERROR=1 |
649 fi |
596 fi |
650 elif [ "$OPT_TOOLKIT" = "cli" ]; then |
597 elif [ "$OPT_TOOLKIT" = "cli" ]; then |
651 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
598 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
652 checkopt_toolkit_cli |
599 if checkopt_toolkit_cli ; then |
653 if [ $? -ne 0 ]; then |
600 : |
|
601 else |
654 ERROR=1 |
602 ERROR=1 |
655 fi |
603 fi |
656 elif [ "$OPT_TOOLKIT" = "gtk2" ]; then |
604 elif [ "$OPT_TOOLKIT" = "gtk2" ]; then |
657 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
605 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
658 checkopt_toolkit_gtk2 |
606 if checkopt_toolkit_gtk2 ; then |
659 if [ $? -ne 0 ]; then |
607 : |
|
608 else |
660 ERROR=1 |
609 ERROR=1 |
661 fi |
610 fi |
662 elif [ "$OPT_TOOLKIT" = "wpf" ]; then |
611 elif [ "$OPT_TOOLKIT" = "wpf" ]; then |
663 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
612 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options |
664 checkopt_toolkit_wpf |
613 if checkopt_toolkit_wpf ; then |
665 if [ $? -ne 0 ]; then |
614 : |
|
615 else |
666 ERROR=1 |
616 ERROR=1 |
667 fi |
617 fi |
668 fi |
618 fi |
669 fi |
619 fi |
670 |
620 |
671 echo >> "$TEMP_DIR/config.mk" |
621 echo >> "$TEMP_DIR/config.mk" |
672 if [ -n "${TEMP_CFLAGS}" ]; then |
622 if [ -n "${TEMP_CFLAGS}" ]; then |
673 echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
623 echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
674 fi |
624 fi |
675 if [ -n "${TEMP_CXXFLAGS}" ]; then |
|
676 echo "DAV_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
|
677 fi |
|
678 if [ "$BUILD_TYPE" = "debug" ]; then |
625 if [ "$BUILD_TYPE" = "debug" ]; then |
679 echo 'DAV_CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
626 echo 'DAV_CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
680 echo 'DAV_CXXFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
681 fi |
627 fi |
682 if [ "$BUILD_TYPE" = "release" ]; then |
628 if [ "$BUILD_TYPE" = "release" ]; then |
683 echo 'DAV_CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
629 echo 'DAV_CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
684 echo 'DAV_CXXFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
685 fi |
630 fi |
686 if [ -n "${TEMP_LDFLAGS}" ]; then |
631 if [ -n "${TEMP_LDFLAGS}" ]; then |
687 echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
632 echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
688 fi |
633 fi |
689 |
634 |
690 # Target |
635 # Target |
691 TEMP_CFLAGS= |
636 TEMP_CFLAGS= |
692 TEMP_LDFLAGS= |
637 TEMP_LDFLAGS= |
693 TEMP_CXXFLAGS= |
638 |
694 |
639 if dependency_error_deptest; then |
695 dependency_deptest |
|
696 if [ $? -ne 0 ]; then |
|
697 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED deptest " |
640 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED deptest " |
698 ERROR=1 |
641 ERROR=1 |
699 fi |
642 fi |
700 |
643 |
701 # Features |
644 # Features |
703 |
646 |
704 echo >> "$TEMP_DIR/config.mk" |
647 echo >> "$TEMP_DIR/config.mk" |
705 if [ -n "${TEMP_CFLAGS}" ]; then |
648 if [ -n "${TEMP_CFLAGS}" ]; then |
706 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
649 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
707 fi |
650 fi |
708 if [ -n "${TEMP_CXXFLAGS}" ]; then |
|
709 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
|
710 fi |
|
711 if [ "$BUILD_TYPE" = "debug" ]; then |
651 if [ "$BUILD_TYPE" = "debug" ]; then |
712 echo 'CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
652 echo 'CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
713 echo 'CXXFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
714 fi |
653 fi |
715 if [ "$BUILD_TYPE" = "release" ]; then |
654 if [ "$BUILD_TYPE" = "release" ]; then |
716 echo 'CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
655 echo 'CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
717 echo 'CXXFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
718 fi |
656 fi |
719 if [ -n "${TEMP_LDFLAGS}" ]; then |
657 if [ -n "${TEMP_LDFLAGS}" ]; then |
720 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
658 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
721 fi |
659 fi |
722 |
660 |
723 if [ $ERROR -ne 0 ]; then |
661 if [ $ERROR -ne 0 ]; then |
724 echo |
662 echo |
725 echo "Error: Unresolved dependencies" |
663 echo "Error: Unresolved dependencies" |
726 echo "$DEPENDENCIES_FAILED" |
664 echo "$DEPENDENCIES_FAILED" |
727 rm -Rf "$TEMP_DIR" |
665 abort_configure |
728 exit 1 |
|
729 fi |
666 fi |
730 |
667 |
731 echo "configure finished" |
668 echo "configure finished" |
732 echo |
669 echo |
733 echo "Build Config:" |
670 echo "Build Config:" |