| 56 |
56 |
| 57 # Simple uname based platform detection |
57 # Simple uname based platform detection |
| 58 # $PLATFORM is used for platform dependent dependency selection |
58 # $PLATFORM is used for platform dependent dependency selection |
| 59 OS=`uname -s` |
59 OS=`uname -s` |
| 60 OS_VERSION=`uname -r` |
60 OS_VERSION=`uname -r` |
| |
61 ARCH=`uname -m` |
| 61 printf "detect platform... " |
62 printf "detect platform... " |
| 62 if [ "$OS" = "SunOS" ]; then |
63 if [ "$OS" = "SunOS" ]; then |
| 63 PLATFORM="solaris sunos unix svr4" |
64 PLATFORM="solaris sunos unix svr4" |
| 64 elif [ "$OS" = "Linux" ]; then |
65 elif [ "$OS" = "Linux" ]; then |
| 65 PLATFORM="linux unix" |
66 PLATFORM="linux unix" |
| 174 "--datarootdir="*) datarootdir=${ARG#--datarootdir=} ;; |
175 "--datarootdir="*) datarootdir=${ARG#--datarootdir=} ;; |
| 175 "--datadir="*) datadir=${ARG#--datadir=} ;; |
176 "--datadir="*) datadir=${ARG#--datadir=} ;; |
| 176 "--sysconfdir="*) sysconfdir=${ARG#--sysconfdir=} ;; |
177 "--sysconfdir="*) sysconfdir=${ARG#--sysconfdir=} ;; |
| 177 "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;; |
178 "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;; |
| 178 "--localstatedir="*) localstatedir=${ARG#--localstatedir=} ;; |
179 "--localstatedir="*) localstatedir=${ARG#--localstatedir=} ;; |
| |
180 "--runstatedir="*) runstatedir=${ARG#--runstatedir=} ;; |
| 179 "--includedir="*) includedir=${ARG#--includedir=} ;; |
181 "--includedir="*) includedir=${ARG#--includedir=} ;; |
| 180 "--infodir="*) infodir=${ARG#--infodir=} ;; |
182 "--infodir="*) infodir=${ARG#--infodir=} ;; |
| 181 "--mandir"*) mandir=${ARG#--mandir} ;; |
183 "--mandir"*) mandir=${ARG#--mandir} ;; |
| 182 "--localedir"*) localedir=${ARG#--localedir} ;; |
184 "--localedir"*) localedir=${ARG#--localedir} ;; |
| 183 "--help"*) printhelp; abort_configure ;; |
185 "--help"*) printhelp; abort_configure ;; |
| 199 : ${sbindir:='${exec_prefix}/sbin'} |
201 : ${sbindir:='${exec_prefix}/sbin'} |
| 200 : ${libdir:='${exec_prefix}/lib'} |
202 : ${libdir:='${exec_prefix}/lib'} |
| 201 : ${libexecdir:='${exec_prefix}/libexec'} |
203 : ${libexecdir:='${exec_prefix}/libexec'} |
| 202 : ${datarootdir:='${prefix}/share'} |
204 : ${datarootdir:='${prefix}/share'} |
| 203 : ${datadir:='${datarootdir}'} |
205 : ${datadir:='${datarootdir}'} |
| 204 : ${sysconfdir:='${prefix}/etc'} |
|
| 205 : ${sharedstatedir:='${prefix}/com'} |
206 : ${sharedstatedir:='${prefix}/com'} |
| 206 : ${localstatedir:='${prefix}/var'} |
207 if [ -z "$sysconfdir" ]; then |
| 207 : ${runstatedir:='${localstatedir}/run'} |
208 if [ "$prefix" = '/usr' ]; then |
| |
209 sysconfdir='/etc' |
| |
210 else |
| |
211 sysconfdir='${prefix}/etc' |
| |
212 fi |
| |
213 fi |
| |
214 if [ -z "$localstatedir" ]; then |
| |
215 if [ "$prefix" = '/usr' ]; then |
| |
216 localstatedir='/var' |
| |
217 else |
| |
218 localstatedir='${prefix}/var' |
| |
219 fi |
| |
220 fi |
| |
221 if [ -z "$runstatedir" ]; then |
| |
222 if [ "$prefix" = '/usr' ]; then |
| |
223 runstatedir='/var/run' |
| |
224 else |
| |
225 runstatedir='${prefix}/var' |
| |
226 fi |
| |
227 fi |
| 208 : ${includedir:='${prefix}/include'} |
228 : ${includedir:='${prefix}/include'} |
| 209 : ${infodir:='${datarootdir}/info'} |
229 : ${infodir:='${datarootdir}/info'} |
| 210 : ${mandir:='${datarootdir}/man'} |
230 : ${mandir:='${datarootdir}/man'} |
| 211 : ${localedir:='${datarootdir}/locale'} |
231 : ${localedir:='${datarootdir}/locale'} |
| 212 |
232 |
| 240 echo ok |
260 echo ok |
| 241 elif [ -f "$prefix/etc/config.site" ]; then |
261 elif [ -f "$prefix/etc/config.site" ]; then |
| 242 printf "loading site defaults... " |
262 printf "loading site defaults... " |
| 243 . "$prefix/etc/config.site" |
263 . "$prefix/etc/config.site" |
| 244 echo ok |
264 echo ok |
| |
265 else |
| |
266 # try to detect the correct libdir on our own, except it was changed by the user |
| |
267 if test "$libdir" = '${exec_prefix}/lib'; then |
| |
268 if [ "$OS" = "SunOS" ]; then |
| |
269 test -d "${exec_prefix}/lib/amd64" && libdir='${exec_prefix}/lib/amd64' |
| |
270 else |
| |
271 # check if the standard libdir even exists |
| |
272 if test -d "${exec_prefix}/lib" ; then |
| |
273 : |
| |
274 else |
| |
275 # if it does not, maybe a lib32 exists |
| |
276 test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32' |
| |
277 fi |
| |
278 # now check if there is a special 64bit libdir that we should use |
| |
279 for i in x86_64 ppc64 s390x aarch64 aarch64_be arm64 ; do |
| |
280 if [ $ARCH = $i ]; then |
| |
281 test -d "${exec_prefix}/lib64" && libdir='${exec_prefix}/lib64' |
| |
282 break |
| |
283 fi |
| |
284 done |
| |
285 fi |
| |
286 fi |
| 245 fi |
287 fi |
| 246 |
288 |
| 247 |
289 |
| 248 # generate vars.mk |
290 # generate vars.mk |
| 249 cat > "$TEMP_DIR/vars.mk" << __EOF__ |
291 cat > "$TEMP_DIR/vars.mk" << __EOF__ |
| 377 { |
419 { |
| 378 print_check_msg "$dep_checked_toolkit" "checking for toolkit... " |
420 print_check_msg "$dep_checked_toolkit" "checking for toolkit... " |
| 379 # dependency toolkit |
421 # dependency toolkit |
| 380 while true |
422 while true |
| 381 do |
423 do |
| 382 if test -n "$TOOLKIT_HOME" > /dev/null ; then |
424 if test -n "$TOOLKIT_HOME" > /dev/null 2>&1 ; then |
| 383 : |
425 : |
| 384 else |
426 else |
| 385 break |
427 break |
| 386 fi |
428 fi |
| 387 if test -f "$TOOLKIT_HOME/lib/libuitk.a" > /dev/null ; then |
429 if test -f "$TOOLKIT_HOME/lib/libuitk.a" > /dev/null 2>&1 ; then |
| 388 : |
430 : |
| 389 else |
431 else |
| 390 break |
432 break |
| 391 fi |
433 fi |
| 392 if test -f "$TOOLKIT_HOME/include/ui/ui.h" > /dev/null ; then |
434 if test -f "$TOOLKIT_HOME/include/ui/ui.h" > /dev/null 2>&1 ; then |
| 393 : |
435 : |
| 394 else |
436 else |
| 395 break |
437 break |
| 396 fi |
438 fi |
| 397 TEMP_CFLAGS="$TEMP_CFLAGS -I$TOOLKIT_HOME/include" |
439 TEMP_CFLAGS="$TEMP_CFLAGS -I$TOOLKIT_HOME/include" |
| 529 break |
571 break |
| 530 done |
572 done |
| 531 |
573 |
| 532 # build type |
574 # build type |
| 533 if [ "$BUILD_TYPE" = "debug" ]; then |
575 if [ "$BUILD_TYPE" = "debug" ]; then |
| 534 TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS" |
576 TEMP_CFLAGS="\${DEBUG_CFLAGS} $TEMP_CFLAGS" |
| 535 TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS" |
577 TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS} $TEMP_CXXFLAGS" |
| 536 fi |
578 fi |
| 537 if [ "$BUILD_TYPE" = "release" ]; then |
579 if [ "$BUILD_TYPE" = "release" ]; then |
| 538 TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS" |
580 TEMP_CFLAGS="\${RELEASE_CFLAGS} $TEMP_CFLAGS" |
| 539 TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS" |
581 TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS} $TEMP_CXXFLAGS" |
| 540 fi |
582 fi |
| 541 |
583 |
| 542 # add general dependency flags to flags.mk |
584 # add general dependency flags to flags.mk |
| 543 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
585 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
| 544 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
586 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |