/usr/lib/roaraudio/build-system/configure.lib is in libroar-dev 1.0~beta11-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 | #!/bin/false
# vim:ft=sh
# Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2012
#
# This file is part of roard a part of RoarAudio,
# a cross-platform sound system for both, home and professional use.
# See README for details.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3
# as published by the Free Software Foundation.
#
# RoarAudio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this software; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
# some very basic string functions:
to_upper() {
tr 'a-z' 'A-Z'
}
to_escaped() {
tr 'A-Z/.+-' 'a-z____'
}
error_missing() {
_object="$1"
[ "$_object" = '' ] && _object="$last_tested_object"
echo "Error: $_object is missing but required."
exit 1
}
error_internal() {
if [ "$1" = '' ]
then
echo "Error: Internal error within configure script. Contact author."
else
echo "Error: $1"
fi
exit 1;
}
set_dev_vendor() {
if [ "$#" = '2' ]
then
DEV_VENDOR="$1"
DEV_VENDOR_NAME="$2"
DEV_VENDOR_STRING="$DEV_VENDOR/$DEV_VENDOR_NAME"
else
DEV_VENDOR=''
DEV_VENDOR_NAME="$1"
DEV_VENDOR_STRING="$DEV_VENDOR_NAME"
fi
}
set_std_vendor() {
if [ "$#" = '2' ]
then
STD_VENDOR="$1"
STD_VENDOR_NAME="$2"
STD_VENDOR_STRING="$STD_VENDOR/$STD_VENDOR_NAME"
else
STD_VENDOR=''
STD_VENDOR_NAME="$1"
STD_VENDOR_STRING="$STD_VENDOR_NAME"
fi
}
write_help() {
echo 'COMMON OPTIONS:'
echo
echo '--ldpath DIR - Add DIR to (compile time) search list for libs'
echo '--incpath DIR - Add DIR to search list for headers'
echo '--addpath DIR - Add DIR/lib to lib, DIR/include to header search list'
echo '--root DIR - The same as "--addpath DIR --prefix DIR"'
echo
echo '--cflags FLAGS - Sets additional compiler flags (default: '"$CFLAGS"')'
echo '--ldflags FLAGS - Sets additional linker flags (default: '"$LDFLAGS"')'
echo '--opti LEVEL - Sets optimizer level (default: '"$OPTI_O"')'
echo '--without-debugging - Disable compiling debug information into binaries'
echo '--link-deps MODE - Model for linking dependencies: auto, full or indirect'
echo
echo '--cc CC - Set name of C compiler (CC) to CC'
echo '--ranlib RANLIB - Set name of ranlib (RANLIB) to RANLIB'
echo
echo '--root-uid UID - Sets User ID (UID) of the root user/superuser'
echo
echo '--no-LIB - disable library LIB'
echo '--maybe-LIB - autodetect library LIB (default)'
echo
echo '--prefix DIR - Set general prefix (default: '"$PREFIX"')'
echo '--prefix-bin DIR - Set prefix for binaries (default: $PREFIX/bin)'
echo '--prefix-sbin DIR - Set prefix for system binaries (default: $PREFIX/sbin)'
echo '--prefix-lib DIR - Set prefix for libraries (default: $PREFIX/libs)'
echo '--prefix-inc DIR - Set prefix for include files (default: $PREFIX/include)'
echo '--prefix-man DIR - Set prefix for manpages (default: $PREFIX/share/man)'
echo '--prefix-pc DIR - Set prefix for pkg-config (default: $PREFIX_LIB/pkgconfig)'
echo '--prefix-sysconf DIR - Set prefix for system configuration (default: '"$PREFIX_SYSCONF"')'
echo '--prefix-dev DIR - Set prefix for devices (default: '"$PREFIX_DEV"')'
echo '--prefix-doc DIR - Set prefix for documentation (default: $PREFIX/share/doc)'
echo '--prefix-tmp DIR - Set prefix for temporary files (default: '"$PREFIX_TMP"')'
echo '--prefix-var DIR - Set prefix for variable files (default: '"$PREFIX_VAR"')'
echo '--prefix-cache DIR - Set prefix for application caches (default: $PREFIX_VAR/cache)'
echo '--prefix-data DIR - Set prefix for variable application data (default: $PREFIX_VAR/lib)'
echo '--prefix-lock DIR - Set prefix for lock files (locked resources) (default: $PREFIX_VAR/lock)'
echo '--prefix-log DIR - Set prefix for log files (default: $PREFIX_VAR/log)'
echo '--prefix-mail DIR - Set prefix for user'\''s mailboxes (default: $PREFIX_VAR/mail)'
echo '--prefix-run DIR - Set prefix for information about the running system (default: $PREFIX_VAR/run)'
echo '--prefix-spool DIR - Set prefix for spools (queued jobs) (default: $PREFIX_VAR/spool)'
echo
echo '--without-beta - Disable beta code'
echo '--without-experimental - Disable experimental code'
echo
echo '--distribution-version-string STRING'
echo ' - Sets distribution part of version string'
echo
echo '--mmcu MMCU - Sets -mmcu compiler/linker option'
echo '--target-win32 - Disable everything useful'
echo '--exec-helper HELPER - Exec all test programms using this command (HELPER $cmd $args)'
echo ' use '\''--exec-helper wine'\'' when building win32 binaries'
echo
}
parse_option() {
# Options are given via $n.
# we can not shift used ones so we tell the caller
# how many to shift: shift $SHIFT_COUNT
SHIFT_COUNT=0
# we also tell if the option was handelt.
HANDLED=true # will be reset if not.
case "$1" in
'--ldpath')
LDPATH="$LDPATH -L$2"
SHIFT_COUNT=1
;;
'--incpath')
INCPATH="$INCPATH -I$2"
SHIFT_COUNT=1
;;
'--addpath')
LDPATH="$LDPATH -L$2/lib/"
INCPATH="$INCPATH -I$2/include/"
SHIFT_COUNT=1
;;
'--root')
LDPATH="$LDPATH -L$2/lib/"
INCPATH="$INCPATH -I$2/include/"
PREFIX="$2"
SHIFT_COUNT=1
;;
'--cflags')
CFLAGS="$2"
SHIFT_COUNT=1
;;
'--ldflags')
LDFLAGS="$2"
SHIFT_COUNT=1
;;
'--opti')
OPTI_O="$2"
SHIFT_COUNT=1
;;
'--without-debugging')
DEBUG_g=''
;;
'--link-deps')
LINK_DEPS="$2"
SHIFT_COUNT=1
;;
'--cc')
CC="$2"
SHIFT_COUNT=1
;;
'--ranlib')
RANLIB="$2"
SHIFT_COUNT=1
;;
'--root-uid')
ROOT_UID="$2"
SHIFT_COUNT=1
;;
'--no-'*)
lib=$(echo "$1" | sed 's/^--no-//' | to_escaped)
eval no_lib_$lib=true
;;
'--maybe-'*)
lib=$(echo "$1" | sed 's/^--maybe-//' | to_escaped)
eval unset no_lib_$lib
;;
'--distribution-version-string')
DISTRIBUTION_VERSION_STRING="$2"
SHIFT_COUNT=1
;;
'--without-beta')
BETA=false
EXPERIMENTAL=false
;;
'--without-experimental')
EXPERIMENTAL=false
;;
'--prefix')
PREFIX="$2"
SHIFT_COUNT=1
;;
'--prefix-bin')
PREFIX_BIN="$2"
SHIFT_COUNT=1
;;
'--prefix-sbin')
PREFIX_SBIN="$2"
SHIFT_COUNT=1
;;
'--prefix-lib')
PREFIX_LIB="$2"
SHIFT_COUNT=1
;;
'--prefix-inc')
PREFIX_INC="$2"
SHIFT_COUNT=1
;;
'--prefix-man')
PREFIX_MAN="$2"
SHIFT_COUNT=1
;;
'--prefix-pc')
PREFIX_PC="$2"
SHIFT_COUNT=1
;;
'--prefix-ckport')
PREFIX_CKPORT="$2"
SHIFT_COUNT=1
;;
'--prefix-sysconf')
PREFIX_SYSCONF="$2"
SHIFT_COUNT=1
;;
'--prefix-dev')
PREFIX_DEV="$2"
SHIFT_COUNT=1
;;
'--prefix-doc')
PREFIX_DOC="$2"
SHIFT_COUNT=1
;;
'--prefix-tmp')
PREFIX_TMP="$2"
SHIFT_COUNT=1
;;
'--prefix-var')
PREFIX_VAR="$2"
SHIFT_COUNT=1
;;
'--prefix-cache')
PREFIX_CACHE="$2"
SHIFT_COUNT=1
;;
'--prefix-data')
PREFIX_DATA="$2"
SHIFT_COUNT=1
;;
'--prefix-lock')
PREFIX_LOCK="$2"
SHIFT_COUNT=1
;;
'--prefix-log')
PREFIX_LOG="$2"
SHIFT_COUNT=1
;;
'--prefix-mail')
PREFIX_MAIL="$2"
SHIFT_COUNT=1
;;
'--prefix-run')
PREFIX_RUN="$2"
SHIFT_COUNT=1
;;
'--prefix-spool')
PREFIX_SPOOL="$2"
SHIFT_COUNT=1
;;
####################################
# autof* options block:
'--prefix='*)
PREFIX=$(echo "$1" | cut -d= -f2)
;;
'--prefix-bin='*)
PREFIX_BIN=$(echo "$1" | cut -d= -f2)
;;
'--prefix-sbin='*)
PREFIX_SBIN=$(echo "$1" | cut -d= -f2)
;;
'--prefix-lib='*)
PREFIX_LIB=$(echo "$1" | cut -d= -f2)
;;
'--prefix-inc='*)
PREFIX_INC=$(echo "$1" | cut -d= -f2)
;;
'--prefix-man='*)
PREFIX_MAN=$(echo "$1" | cut -d= -f2)
;;
'--prefix-pc='*)
PREFIX_PC=$(echo "$1" | cut -d= -f2)
;;
'--prefix-ckport='*)
PREFIX_CKPORT=$(echo "$1" | cut -d= -f2)
;;
'--prefix-sysconf='*)
PREFIX_SYSCONF=$(echo "$1" | cut -d= -f2)
;;
'--prefix-dev='*)
PREFIX_DEV=$(echo "$1" | cut -d= -f2)
;;
'--prefix-doc='*)
PREFIX_DOC=$(echo "$1" | cut -d= -f2)
;;
'--prefix-tmp='*)
PREFIX_TMP=$(echo "$1" | cut -d= -f2)
;;
'--prefix-var='*)
PREFIX_VAR=$(echo "$1" | cut -d= -f2)
;;
'--prefix-cache='*)
PREFIX_CACHE=$(echo "$1" | cut -d= -f2)
;;
'--prefix-data='*)
PREFIX_DATA=$(echo "$1" | cut -d= -f2)
;;
'--prefix-lock='*)
PREFIX_LOCK=$(echo "$1" | cut -d= -f2)
;;
'--prefix-log='*)
PREFIX_LOG=$(echo "$1" | cut -d= -f2)
;;
'--prefix-mail='*)
PREFIX_MAIL=$(echo "$1" | cut -d= -f2)
;;
'--prefix-run='*)
PREFIX_RUN=$(echo "$1" | cut -d= -f2)
;;
'--prefix-spool='*)
PREFIX_SPOOL=$(echo "$1" | cut -d= -f2)
;;
####################################
'--mmcu')
MMCU="$2"
SHIFT_COUNT=1
;;
'--exec-helper')
EXEC_HELPER="$2"
SHIFT_COUNT=1
;;
'--target-win32')
TARGET_WIN32=true
;;
*)
HANDLED=false
;;
esac;
if $HANDLED
then
SHIFT_COUNT=`expr $SHIFT_COUNT + 1`
fi
}
open_configure_files() {
exec 3> config.h 4> Makefile.conf 5> config.log
}
update_target() {
TARGET_CYGWIN=`echo "$SYSNAME" | if grep CYGWIN > /dev/null; then echo true; else echo false; fi`
TARGET_WIN32=`echo "$SYSNAME" | if grep MINGW32 > /dev/null; then echo true; else echo $TARGET_WIN32; fi`
if $TARGET_WIN32
then
TARGET_TYPE='win32'
elif $TARGET_MICROCONTROLLER
then
TARGET_TYPE='microcontroller'
elif $TARGET_CYGWIN
then
TARGET_TYPE='cygwin'
else
TARGET_TYPE='generic'
fi
if [ "$SYSNAME" = 'Darwin' ]
then
echo "Adding common $SYSNAME shared lib arguments..."
SHARED="$SHARED -fno-common -dynamiclib -compatibility_version 0.1 -current_version 0.1.0"
SHARED_CF="$SHARED_CF -fno-common"
elif [ "$SYSNAME" = 'NetBSD' ]
then
echo "Adding common $SYSNAME libpath arguments..."
LDPATH="$LDPATH -L/usr/local/lib/"
elif [ "$SYSNAME" = 'OpenBSD' ]
then
echo "Adding common $SYSNAME search path arguments..."
LDPATH="$LDPATH -L/usr/local/lib/"
INCPATH="$INCPATH -I/usr/local/include/"
# echo "Adding $SYSNAME build arguments..."
# SNDIO_EMUL=false
elif [ "$SYSNAME" = 'FreeBSD' ]
then
echo "Adding common $SYSNAME search path arguments..."
LDPATH="$LDPATH -L/usr/local/lib/"
INCPATH="$INCPATH -I/usr/local/include/"
elif $TARGET_WIN32
then
echo "Adding common win32 build arguments..."
rdynamic=false
fPIC=false
SHARED_SUFFIX='.dll'
TF_E="$TF_E.exe"
# should those be also in the cygwin port?
IMPLIB='$(BASENAME)$(SHARED_SUFFIX).a'
LDFLAGS="$LDFLAGS -Wl,--out-implib=\$@.a"
elif $TARGET_CYGWIN
then
echo "Adding common cygwin build arguments..."
rdynamic=false
fPIC=false
SHARED_SUFFIX='.dll'
TF_E="$TF_E.exe"
fi
}
update_prefixes() {
[ "$PREFIX_BIN" = '' ] && PREFIX_BIN="$PREFIX/bin/"
[ "$PREFIX_SBIN" = '' ] && PREFIX_SBIN="$PREFIX/sbin/"
[ "$PREFIX_LIB" = '' ] && PREFIX_LIB="$PREFIX/lib/"
[ "$PREFIX_INC" = '' ] && PREFIX_INC="$PREFIX/include/"
[ "$PREFIX_MAN" = '' ] && PREFIX_MAN="$PREFIX/share/man/"
[ "$PREFIX_PC" = '' ] && PREFIX_PC="$PREFIX_LIB/pkgconfig/"
[ "$PREFIX_CKPORT" = '' ] && PREFIX_CKPORT="$PREFIX_LIB/ckport/db/"
[ "$PREFIX_SYSCONF" = '' ] && PREFIX_SYSCONF="/etc/"
[ "$PREFIX_DEV" = '' ] && PREFIX_DEV="/dev/"
[ "$PREFIX_DOC" = '' ] && PREFIX_DOC="$PREFIX/share/doc/"
[ "$PREFIX_TMP" = '' ] && PREFIX_TMP="/tmp/"
[ "$PREFIX_VAR" = '' ] && PREFIX_VAR="/var/"
[ "$PREFIX_CACHE" = '' ] && PREFIX_CACHE="$PREFIX_VAR/cache/"
[ "$PREFIX_DATA" = '' ] && PREFIX_DATA="$PREFIX_VAR/lib/"
[ "$PREFIX_LOCK" = '' ] && PREFIX_LOCK="$PREFIX_VAR/lock/"
[ "$PREFIX_LOG" = '' ] && PREFIX_LOG="$PREFIX_VAR/log/"
[ "$PREFIX_MAIL" = '' ] && PREFIX_MAIL="$PREFIX_VAR/mail/"
[ "$PREFIX_RUN" = '' ] && PREFIX_RUN="$PREFIX_VAR/run/"
[ "$PREFIX_SPOOL" = '' ] && PREFIX_SPOOL="$PREFIX_VAR/spool/"
}
update_ccft() {
CCTF="$CC $CFLAGS $LDFLAGS $LDPATH $INCPATH -Iinclude/ -o $TF_E $TF_C"
}
cleanup_ccft() {
rm -f $TF_C $TF_E
}
update_cc() {
if [ "$MMCU" != '' ]
then
CC="$CC -mmcu=$MMCU"
fi
}
write_header_makefileconf() {
{
echo "VERSION=$VERSION"
echo "DISTRIBUTION_VERSION_STRING=$DISTRIBUTION_VERSION_STRING"
echo
[ "$DEV_VENDOR" != '' ] && echo "DEV_VENDOR=$DEV_VENDOR"
[ "$DEV_VENDOR_NAME" != '' ] && echo "DEV_VENDOR_NAME=$DEV_VENDOR_NAME"
[ "$DEV_VENDOR_STRING" != '' ] && echo "DEV_VENDOR_STRING=$DEV_VENDOR_STRING"
[ "$STD_VENDOR" != '' ] && echo "STD_VENDOR=$STD_VENDOR"
[ "$STD_VENDOR_NAME" != '' ] && echo "STD_VENDOR_NAME=$STD_VENDOR_NAME"
[ "$STD_VENDOR_STRING" != '' ] && echo "STD_VENDOR_STRING=$STD_VENDOR_STRING"
echo
echo "TARGET_TYPE=$TARGET_TYPE"
echo "SHARED=$SHARED"
echo "SHARED_CF=$SHARED_CF"
echo "SHARED_SUFFIX=$SHARED_SUFFIX"
$rdynamic && echo 'rdynamic=-rdynamic'
$fPIC && echo 'fPIC=-fPIC'
$Wextra && echo 'Wextra=-Wextra'
echo "Wall=-Wall"
echo
echo "CC=$CC"
echo "RANLIB=$RANLIB"
echo "LDPATH=$LDPATH"
echo "INCPATH=$INCPATH"
echo "ROAR_BUILDSYSTEM_DIR=$ROAR_BUILDSYSTEM_DIR"
echo
echo "OPTI_O=-O$OPTI_O"
echo "DEBUG_g=$DEBUG_g"
echo "IMPLIB=$IMPLIB"
echo
[ "$CFLAGS" != '' ] && echo "CFLAGS += $CFLAGS"
[ "$LDFLAGS" != '' ] && echo "LDFLAGS += $LDFLAGS"
echo
echo "EXEC_HELPER=$EXEC_HELPER"
echo "CROSS_COMPILE=$CROSS_COMPILE"
echo
echo "PREFIX=$PREFIX"
echo "PREFIX_BIN=$PREFIX_BIN"
echo "PREFIX_SBIN=$PREFIX_SBIN"
echo "PREFIX_LIB=$PREFIX_LIB"
echo "PREFIX_INC=$PREFIX_INC"
echo "PREFIX_MAN=$PREFIX_MAN"
echo "PREFIX_PC=$PREFIX_PC"
echo "PREFIX_CKPORT=$PREFIX_CKPORT"
echo "PREFIX_SYSCONF=$PREFIX_SYSCONF"
echo "PREFIX_DEV=$PREFIX_DEV"
echo "PREFIX_DOC=$PREFIX_DOC"
echo "PREFIX_TMP=$PREFIX_TMP"
echo "PREFIX_VAR=$PREFIX_VAR"
echo "PREFIX_CACHE=$PREFIX_CACHE"
echo "PREFIX_DATA=$PREFIX_DATA"
echo "PREFIX_LOCK=$PREFIX_LOCK"
echo "PREFIX_LOG=$PREFIX_LOG"
echo "PREFIX_MAIL=$PREFIX_MAIL"
echo "PREFIX_RUN=$PREFIX_RUN"
echo "PREFIX_SPOOL=$PREFIX_SPOOL"
echo
} >&4
}
write_footer_makefileconf() {
{
echo
echo '#ll'
} >&4
}
write_header_configlog() {
{
cat <<'EOF'
//config.log:
/*
* Logfile for configure script $Revision: 1.20 $ of RoarAudio
*/
EOF
echo '/* uname: ' $(uname -a) '*/'
echo '/* Date : ' $(date) '*/'
echo
echo
echo
echo "ARGS(): $_CARGS"
for i in PATH SHELL CC RANLIB PKG_CONFIG SYSNAME \
TARGET_TYPE TARGET_CYGWIN TARGET_WIN32 TARGET_MICROCONTROLLER CROSS_COMPILE \
MINIMAL EXEC_HELPER \
"$@"
do
eval echo "BASICCONF\($i\): \$$i";
done
echo
echo
} >&5
}
write_footer_configlog() {
{
echo
echo '//ll'
} >&5
}
write_header_configh() {
{
echo '#ifdef __RABS_COMMENT__'
echo '//config.h:'
echo '#endif'
echo
echo "#ifndef $1"
echo "#define $1"
echo
echo '#ifdef __RABS_COMMENT__'
echo '/* uname: ' $(uname -a) '*/'
echo '/* Date : ' $(date) '*/'
echo '#endif'
echo
} >&3
}
write_footer_configh() {
{
echo
echo '#endif'
echo
echo '#ifdef __RABS_COMMENT__'
echo 'End of File.'
echo '#endif'
} >&3
}
write_vars_configh_string() {
{
for f in "$@"
do
eval val=\"\$$f\"
echo "#define $f \"$val\""
done
} >&3
}
write_vars_configh_literal() {
{
for f in "$@"
do
eval val=\"\$$f\"
echo "#define $f $val"
done
} >&3
}
write_header() {
write_header_makefileconf
write_header_configlog
write_header_configh "$@"
}
write_footer() {
write_footer_makefileconf
write_footer_configlog
write_footer_configh
}
write_summery_header() {
echo
echo "Summery:"
}
write_summery() {
_type="$1"
_name="$2"
_displayname="$3"
[ "$_displayname" = '' ] && _displayname="$_name"
#types:
# Wextra
# BIN_FORMAT
# LINK_DEPS
# lib
# _envname=`echo "$_h" | to_escaped`
# eval "_t=\$libname_$_envname"
# RUNTIME_DETECT
# func
# eval funcname_$_funcname=true
# generic:
# var
# bool
# retval
# convert types which are subtypes of others:
case "$_type" in
'Wextra')
_type=bool
_name=Wextra
[ "$_displayname" = '' ] && _displayname="-Wextra"
;;
'bin_format')
_type=var
_name=BIN_FORMAT
[ "$_displayname" = '' ] && _displayname="binary format"
;;
'linkdeps')
_type=var
_name=LINK_DEPS
[ "$_displayname" = '' ] && _displayname="linkage model"
;;
'RUNTIME_DETECT')
_type=bool
_name=RUNTIME_DETECT
[ "$_displayname" = '' ] && _displayname="runtime detect"
;;
'lib')
eval eval _no="\\\$no_lib_\$envname2envlib_`echo "$_name" | to_escaped`";
if [ "$_no" != '' ]
then
_no="disabled by user"
_type=var
_name=_no
else
_type=bool
_name=libname_`echo "$_name" | to_escaped`
fi
;;
'func')
_type=bool
_name=funcname_`echo "$_name" | to_escaped`
;;
esac;
_retval=999999
_status=''
case "$_type" in
'retval')
_retval="$_name"
;;
'bool')
_false=false
[ "$_name" = '' ] && _name=_false
eval \$$_name > /dev/null
_retval=$?
;;
'var')
eval _status="\$$_name"
_retval=0
;;
*)
error_internal "Unknown type in summry display: $_type"
;;
esac
if [ "$_status" = '' ]
then
if [ "$_retval" = '0' ]
then
_status='ok'
else
_status='not supported'
fi
fi
_dummy=`echo "$_displayname" | tr '[:print:]' x`
_dots=`printf "%-24s" $_dummy | tr -d x | tr " " .`
echo " $_displayname$_dots: $_status"
}
#ll
|