| 204 "--datarootdir="*) datarootdir=${D}{ARG#--datarootdir=} ;; |
204 "--datarootdir="*) datarootdir=${D}{ARG#--datarootdir=} ;; |
| 205 "--datadir="*) datadir=${D}{ARG#--datadir=} ;; |
205 "--datadir="*) datadir=${D}{ARG#--datadir=} ;; |
| 206 "--sysconfdir="*) sysconfdir=${D}{ARG#--sysconfdir=} ;; |
206 "--sysconfdir="*) sysconfdir=${D}{ARG#--sysconfdir=} ;; |
| 207 "--sharedstatedir="*) sharedstatedir=${D}{ARG#--sharedstatedir=} ;; |
207 "--sharedstatedir="*) sharedstatedir=${D}{ARG#--sharedstatedir=} ;; |
| 208 "--localstatedir="*) localstatedir=${D}{ARG#--localstatedir=} ;; |
208 "--localstatedir="*) localstatedir=${D}{ARG#--localstatedir=} ;; |
| |
209 "--runstatedir="*) runstatedir=${D}{ARG#--runstatedir=} ;; |
| 209 "--includedir="*) includedir=${D}{ARG#--includedir=} ;; |
210 "--includedir="*) includedir=${D}{ARG#--includedir=} ;; |
| 210 "--infodir="*) infodir=${D}{ARG#--infodir=} ;; |
211 "--infodir="*) infodir=${D}{ARG#--infodir=} ;; |
| 211 "--mandir"*) mandir=${D}{ARG#--mandir} ;; |
212 "--mandir"*) mandir=${D}{ARG#--mandir} ;; |
| 212 "--localedir"*) localedir=${D}{ARG#--localedir} ;; |
213 "--localedir"*) localedir=${D}{ARG#--localedir} ;; |
| 213 "--help"*) printhelp; abort_configure ;; |
214 "--help"*) printhelp; abort_configure ;; |
| 214 "--debug") BUILD_TYPE="debug" ;; |
215 "--debug") BUILD_TYPE="debug" ;; |
| 215 "--release") BUILD_TYPE="release" ;; |
216 "--release") BUILD_TYPE="release" ;; |
| 216 #foreach( $opt in $options ) |
217 #foreach( $opt in $options ) |
| 217 "--${opt.argument}="*) ${opt.varName}=${D}{ARG#--${opt.argument}=} ;; |
218 "--${opt.arg}="*) ${opt.varName}=${D}{ARG#--${opt.arg}=} ;; |
| 218 "--${opt.argument}") echo "option '$ARG' needs a value:"; echo " $ARG=${opt.valuesString}"; abort_configure ;; |
219 "--${opt.arg}") echo "option '$ARG' needs a value:"; echo " $ARG=${opt.valuesString}"; abort_configure ;; |
| 219 #end |
220 #end |
| 220 #foreach( $feature in $features ) |
221 #foreach( $feature in $features ) |
| 221 "--enable-${feature.arg}") ${feature.varName}=on ;; |
222 "--enable-${feature.arg}") ${feature.varName}=on ;; |
| 222 "--disable-${feature.arg}") unset ${feature.varName} ;; |
223 "--disable-${feature.arg}") unset ${feature.varName} ;; |
| 223 #end |
224 #end |
| 234 : ${sbindir:='${exec_prefix}/sbin'} |
235 : ${sbindir:='${exec_prefix}/sbin'} |
| 235 : ${libdir:='${exec_prefix}/lib'} |
236 : ${libdir:='${exec_prefix}/lib'} |
| 236 : ${libexecdir:='${exec_prefix}/libexec'} |
237 : ${libexecdir:='${exec_prefix}/libexec'} |
| 237 : ${datarootdir:='${prefix}/share'} |
238 : ${datarootdir:='${prefix}/share'} |
| 238 : ${datadir:='${datarootdir}'} |
239 : ${datadir:='${datarootdir}'} |
| 239 : ${sysconfdir:='${prefix}/etc'} |
|
| 240 : ${sharedstatedir:='${prefix}/com'} |
240 : ${sharedstatedir:='${prefix}/com'} |
| 241 : ${localstatedir:='${prefix}/var'} |
241 if [ -z "$sysconfdir" ]; then |
| 242 : ${runstatedir:='${localstatedir}/run'} |
242 if [ "$prefix" = '/usr' ]; then |
| |
243 sysconfdir='/etc' |
| |
244 else |
| |
245 sysconfdir='${prefix}/etc' |
| |
246 fi |
| |
247 fi |
| |
248 if [ -z "$localstatedir" ]; then |
| |
249 if [ "$prefix" = '/usr' ]; then |
| |
250 localstatedir='/var' |
| |
251 else |
| |
252 localstatedir='${prefix}/var' |
| |
253 fi |
| |
254 fi |
| |
255 if [ -z "$runstatedir" ]; then |
| |
256 if [ "$prefix" = '/usr' ]; then |
| |
257 runstatedir='/var/run' |
| |
258 else |
| |
259 runstatedir='${prefix}/var' |
| |
260 fi |
| |
261 fi |
| 243 : ${includedir:='${prefix}/include'} |
262 : ${includedir:='${prefix}/include'} |
| 244 : ${infodir:='${datarootdir}/info'} |
263 : ${infodir:='${datarootdir}/info'} |
| 245 : ${mandir:='${datarootdir}/man'} |
264 : ${mandir:='${datarootdir}/man'} |
| 246 : ${localedir:='${datarootdir}/locale'} |
265 : ${localedir:='${datarootdir}/locale'} |
| 247 |
266 |
| 649 #end |
668 #end |
| 650 fi |
669 fi |
| 651 #end |
670 #end |
| 652 |
671 |
| 653 #foreach( $opt in $target.options ) |
672 #foreach( $opt in $target.options ) |
| 654 # Option: --${opt.argument} |
673 # Option: --${opt.arg} |
| 655 if [ -z "${D}${opt.varName}" ]; then |
674 if [ -z "${D}${opt.varName}" ]; then |
| 656 echo "auto-detecting option '${opt.argument}'" |
675 echo "auto-detecting option '${opt.arg}'" |
| 657 SAVED_ERROR="$ERROR" |
676 SAVED_ERROR="$ERROR" |
| 658 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" |
677 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" |
| 659 ERROR=1 |
678 ERROR=1 |
| 660 while true |
679 while true |
| 661 do |
680 do |
| 662 #foreach( $optdef in $opt.defaults ) |
681 #foreach( $optdef in $opt.defaults ) |
| 663 #if( $optdef.platform ) |
682 #if( $optdef.platform ) |
| 664 if isplatform "$optdef.platform"; then |
683 if isplatform "$optdef.platform"; then |
| 665 #end |
684 #end |
| 666 if $optdef.func ; then |
685 if $optdef.func ; then |
| 667 echo " ${opt.argument}: ${optdef.valueName}" >> "$TEMP_DIR/options" |
686 echo " ${opt.arg}: ${optdef.valueName}" >> "$TEMP_DIR/options" |
| 668 ERROR=0 |
687 ERROR=0 |
| 669 break |
688 break |
| 670 fi |
689 fi |
| 671 #if( $optdef.platform ) |
690 #if( $optdef.platform ) |
| 672 fi |
691 fi |
| 674 #end |
693 #end |
| 675 break |
694 break |
| 676 done |
695 done |
| 677 if [ $ERROR -ne 0 ]; then |
696 if [ $ERROR -ne 0 ]; then |
| 678 SAVED_ERROR=1 |
697 SAVED_ERROR=1 |
| 679 SAVED_DEPENDENCIES_FAILED="option '${opt.argument}' $SAVED_DEPENDENCIES_FAILED" |
698 SAVED_DEPENDENCIES_FAILED="option '${opt.arg}' $SAVED_DEPENDENCIES_FAILED" |
| 680 fi |
699 fi |
| 681 ERROR="$SAVED_ERROR" |
700 ERROR="$SAVED_ERROR" |
| 682 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED" |
701 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED" |
| 683 else |
702 else |
| 684 echo "checking option ${opt.argument} = ${D}${opt.varName}" |
703 echo "checking option ${opt.arg} = ${D}${opt.varName}" |
| 685 if false; then |
704 if false; then |
| 686 false |
705 false |
| 687 #foreach( $optval in $opt.values ) |
706 #foreach( $optval in $opt.values ) |
| 688 elif [ "${D}${opt.varName}" = "${optval.value}" ]; then |
707 elif [ "${D}${opt.varName}" = "${optval.value}" ]; then |
| 689 echo " ${opt.argument}: ${D}${opt.varName}" >> $TEMP_DIR/options |
708 echo " ${opt.arg}: ${D}${opt.varName}" >> $TEMP_DIR/options |
| 690 if $optval.func ; then |
709 if $optval.func ; then |
| 691 : |
710 : |
| 692 else |
711 else |
| 693 ERROR=1 |
712 ERROR=1 |
| 694 DEPENDENCIES_FAILED="option '${opt.argument}' $DEPENDENCIES_FAILED" |
713 DEPENDENCIES_FAILED="option '${opt.arg}' $DEPENDENCIES_FAILED" |
| 695 fi |
714 fi |
| 696 #end |
715 #end |
| 697 else |
716 else |
| 698 echo |
717 echo |
| 699 echo "Invalid option value - usage:" |
718 echo "Invalid option value - usage:" |
| 700 echo " --${opt.argument}=${opt.valuesString}" |
719 echo " --${opt.arg}=${opt.valuesString}" |
| 701 abort_configure |
720 abort_configure |
| 702 fi |
721 fi |
| 703 fi |
722 fi |
| 704 #end |
723 #end |
| 705 |
724 |