1#!/bin/sh 2 3TARGET=icc-profiles-openicc 4TARGET_NAME="Color Management Data" 5 6ERROR=0 7WARNING=0 8 9ROOT_DIR="$0" 10ROOT_DIR=`echo $ROOT_DIR | sed 's%/configure%%1'` 11ROOT_DIR=`(cd $ROOT_DIR; pwd)` 12BUILD_DIR="`pwd`" 13 14CONF=makefile 15CONF_TEMP_SH=config.tmp.sh 16CONF_LOG=config.log 17SPEC=$TARGET.spec 18DEB="$TARGET"_control 19zeile="$0 $@" 20if [ -f $ROOT_DIR/default_profiles/printing/makefile.in ]; then 21 PRINT_CONF=default_profiles/printing/makefile 22 BASE_CONF=default_profiles/base/makefile 23 PROFILE_DIR="default_profiles/printing default_profiles/base" 24else 25 PRINT_CONF=error.txt 26 BASE_CONF=error.txt 27fi 28MAKEFILE_DIR=". $PROFILE_DIR"; export MAKEFILE_DIR 29 30if [ `uname` = "Linux" ]; then 31 v=-v 32fi 33 34if [ "$ROOT_DIR" != "." ]; then 35 mkdir -p default_profiles/base 36 mkdir -p default_profiles/printing 37fi 38 39export ROOT_DIR 40export CONF CONF_LOG CONF_TEMP_SH 41 42test -f error.tmp && rm error.tmp 43test -f $CONF_TEMP_SH && rm $CONF_TEMP_SH 44 45VERSION_A=1 46VERSION_B=3 47VERSION_C=1 48VERSION_ABI_A=1 49VERSION_ABI_B=0 50RELEASE=0 51OPENICC_START_MONTH=11 52OPENICC_START_YEAR=2004 53OPENICC_DEVEL_MONTH=03 54OPENICC_DEVEL_MONTH=3 # numeric 55OPENICC_DEVEL_YEAR=2012 56time="`date +%y%m%d.%H%M%S`" 57DATE="$OPENICC_START_MONTH $OPENICC_START_YEAR - $OPENICC_DEVEL_MONTH $OPENICC_DEVEL_YEAR" 58VERSION=$VERSION_A.$VERSION_B.$VERSION_C 59if [ $VERSION_A -gt 9 ]; then 60 VERSION_L="$VERSION_A" 61else 62 VERSION_L="0$VERSION_A" 63fi 64if [ $VERSION_B -gt 9 ]; then 65 VERSION_L="$VERSION_L$VERSION_B" 66else 67 VERSION_L="${VERSION_L}0$VERSION_B" 68fi 69if [ $VERSION_C -gt 9 ]; then 70 VERSION_L="$VERSION_L$VERSION_C" 71else 72 VERSION_L="${VERSION_L}0$VERSION_C" 73fi 74VERSION_L=`echo $VERSION_L | sed 's/^0*//g'` 75 76INFOECHO="echo" 77 78 79rpm=0 80verbose=1 81 82 83STRIPOPT="sed s/-O.//" 84 85if [ $# -gt 0 ]; then 86 prefix="" 87 while [ $# -gt 0 ]; do 88 arg=$1 89 # prefix exec_prefix bindir sbindir libdir includedir datadir mandir 90 switch=prefix 91 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 92 prefix="`echo \"$1\" | sed s/\"--$switch=\"//`" 93 fi 94 switch="exec-prefix" 95 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 96 exec_prefix="`echo $1 | sed s/--$switch=//`" 97 fi 98 switch=bindir 99 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 100 bindir="`echo $1 | sed s/--$switch=//`" 101 fi 102 switch=sbindir 103 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 104 sbindir="`echo $1 | sed s/--$switch=//`" 105 fi 106 switch=libdir 107 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 108 libdir="`echo $1 | sed s/--$switch=//`" 109 fi 110 switch=cmmsubpath 111 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 112 cmmsubpath="`echo $1 | sed s/--$switch=//`" 113 fi 114 switch=includedir 115 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 116 includedir="`echo $1 | sed s/--$switch=//`" 117 fi 118 switch=datadir 119 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 120 datadir="`echo $1 | sed s/--$switch=//`" 121 fi 122 switch=mandir 123 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 124 mandir="`echo $1 | sed s/--$switch=//`" 125 fi 126 # syscolordir usercolordir iccdirname settingsdirname targetdirname pixmapdir icondir desktopdir 127 switch=syscolordir 128 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 129 syscolordir="`echo $1 | sed s/--$switch=//`" 130 fi 131 switch=usercolordir 132 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 133 usercolordir="`echo $1 | sed s/--$switch=//`" 134 fi 135 switch=iccdirname 136 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 137 iccdirname="`echo $1 | sed s/--$switch=//`" 138 fi 139 switch=settingsdirname 140 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 141 settingsdirname="`echo $1 | sed s/--$switch=//`" 142 fi 143 switch=targetdirname 144 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 145 targetdirname="`echo $1 | sed s/--$switch=//`" 146 fi 147 switch=pixmapdir 148 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 149 pixmapdir="`echo $1 | sed s/--$switch=//`" 150 fi 151 switch=icondir 152 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 153 icondir="`echo $1 | sed s/--$switch=//`" 154 fi 155 switch=desktopdir 156 if [ "`echo \"$1\" | sed s/\"--$switch=\"//`" != "$1" ]; then 157 desktopdir="`echo $1 | sed s/--$switch=//`" 158 fi 159 switch=with-rpath 160 if [ "`echo \"$1\" | sed s/\"--$switch\"//`" != "$1" ]; then 161 rpath=1 162 fi 163 switch=rpm-only 164 if [ "`echo \"$1\" | sed s/\"--$switch\"//`" != "$1" ]; then 165 rpm="1" 166 fi 167 switch=quick 168 if [ "`echo \"$1\" | sed s/\"--$switch\"//`" != "$1" ]; then 169 quick="1" 170 fi 171 switch=enable-verbose 172 if [ "`echo \"$1\" | sed s/\"--$switch\"//`" != "$1" ]; then 173 verbose="1" 174 fi 175 switch=disable-verbose 176 if [ "`echo \"$1\" | sed s/\"--$switch\"//`" != "$1" ]; then 177 verbose="0" 178 fi 179 switch=help 180 if [ "`echo \"$1\" | sed s/\"--$switch\"//`" != "$1" ]; then 181test -n "$INFOECHO" && $INFOECHO "Usage:" 182test -n "$INFOECHO" && $INFOECHO " --prefix=[/usr/local] package prefix" 183test -n "$INFOECHO" && $INFOECHO " --exec-prefix=[\$prefix] package exec-prefix" 184test -n "$INFOECHO" && $INFOECHO " --bindir=[\$exec-prefix/bin] binary installation path" 185test -n "$INFOECHO" && $INFOECHO " --sbindir=[\$exec-prefix/sbin] super user binary installation path" 186test -n "$INFOECHO" && $INFOECHO " --libdir=[\$exec-prefix/lib] main library installation path" 187test -n "$INFOECHO" && $INFOECHO " --cmmsubpath=[color/cmms] module installation path" 188test -n "$INFOECHO" && $INFOECHO " --includedir=[\$prefix/include] include file installation" 189test -n "$INFOECHO" && $INFOECHO " --datadir=[\$prefix/data] application data base path" 190test -n "$INFOECHO" && $INFOECHO " --mandir=[\$datadir/man] manual installation path" 191test -n "$INFOECHO" && $INFOECHO " --syscolordir=[\$datadir/color] Oyranos system color path" 192test -n "$INFOECHO" && $INFOECHO " --usercolordir=[~/.color] Oyranos user color path" 193test -n "$INFOECHO" && $INFOECHO " --iccdirname=[icc] Oyranos ICC profile directory" 194test -n "$INFOECHO" && $INFOECHO " --settingsdirname=[settings] Oyranos settings directory" 195test -n "$INFOECHO" && $INFOECHO " --targetdirname=[target] Oyranos target directory" 196test -n "$INFOECHO" && $INFOECHO " --pixmapdir=[\$datadir/pixmaps] icon installation path" 197test -n "$INFOECHO" && $INFOECHO " --icondir=[\$datadir/icons] mime icon installation path" 198test -n "$INFOECHO" && $INFOECHO " --desktopdir=[\$datadir/applications] xdg installation path" 199test -n "$INFOECHO" && $INFOECHO " --rpm-only generate only rpm spec file" 200test -n "$INFOECHO" && $INFOECHO " --enable-verbose verbose compiling [default enable]" 201test -n "$INFOECHO" && $INFOECHO " --disable-verbose verbose compiling [default enable]" 202 203test -n "$INFOECHO" && $INFOECHO " --quick generate config files only" 204test -n "$INFOECHO" && $INFOECHO " --help" 205test -n "$INFOECHO" && $INFOECHO "" 206test -n "$INFOECHO" && $INFOECHO "" 207 exit 208 fi 209 shift 210 done 211fi 212 213# BSD sh shells do not support the -e option to echo 214if [ "-e" = "`echo -e `" ]; then 215 e="" 216else 217 e="" 218fi 219 220# config.log will not work as expected if called as pure BSD shell 221test -z "$zeile" && zeile="exit 1" || echo "" 222 223# no RPM spec file generation 224if [ 0 -eq $rpm ]; then 225 ECHO="echo" 226 RPMECHO="echo" 227 test -f $CONF_LOG && rm $CONF_LOG 228 $ECHO $e "$zeile \$@" > $CONF_LOG 229 $ECHO $e "exit 0" >> $CONF_LOG 230 $ECHO $e "" >> $CONF_LOG 231 $ECHO $e "" >> $CONF_LOG 232 chmod 0755 $CONF_LOG 233 # avoid a warning 234 $ECHO "" > $CONF_LOG.h 235else 236 ECHO="" 237 RPMECHO="echo" 238fi 239export ECHO 240 241if [ -n "$ECHO" ]; then 242 echo_=""; 243 $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 244 echo_="################################################################" 245 $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 246 echo_="# #" 247 $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 248 echo_=" Welcome to $TARGET_NAME Version $VERSION configurator" 249 $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 250 echo_="# $time #" 251 $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 252 echo_="# Configuration #" 253 $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 254fi 255 256test -n "$ECHO" && $ECHO "" > $CONF 257test -n "$ECHO" && $ECHO "" > $PRINT_CONF 258test -n "$ECHO" && $ECHO "" > $BASE_CONF 259test -n "$RPMECHO" && $RPMECHO "# generated $SPEC automatically by configure from $ROOT_DIR/$SPEC.in" > $SPEC 260test -n "$RPMECHO" && $RPMECHO "" >> $SPEC 261 262 263#prefix 264if [ -z "$prefix" ]; then 265 prefix=/usr/local 266fi 267 268# define some common variables in front of config.site 269 270# import config.site 271if [ -z "$datadir" ]; then 272 if [ -f $prefix/share/config.site ]; then 273 . $prefix/share/config.site 274 test -n "$ECHO" && (. $prefix/share/config.site >> $CONF_LOG ) 275 fi 276else 277 if [ -f $datadir/config.site ]; then 278 . $datadir/config.site 279 test -n "$ECHO" && (. $datadir/config.site >> $CONF_LOG ) 280 fi 281fi 282 283 284 285test -n "$ECHO" && $ECHO "# automatically generated by configure from $ROOT_DIR/$CONF.in - it will be overwritten" >> $CONF 286 287test -n "$ECHO" && $ECHO "" >> $CONF 288test -n "$ECHO" && $ECHO "TARGET = $TARGET" >> $CONF 289 290if [ -n "$ECHO" ]; then 291 echo_="# #" 292 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 293fi 294 295 296# detect System 297 298UNAME_=`uname` 299OSUNAME=BSD 300if [ $? = 0 ] && [ $UNAME_ = "Darwin" ]; then 301 arch=`uname -p` 302 version=`uname -r` 303 echo_="Darwin $arch $version detected"; 304 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 305 APPLE="1" 306 test -n "$ECHO" && $ECHO "APPLE = 1" >> $CONF 307 OSUNAME=Darwin 308else 309 if [ $UNAME_ = "Linux" ]; then 310 test -n "$ECHO" && $ECHO "LINUX = 1" >> $CONF 311 echo_="Linux system detected" 312 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 313 SYS=0 314 if [ -f /etc/SuSE-release ]; then 315 if [ `cat /etc/SuSE-release | grep Linux | wc -l` -ne 0 ]; then 316 echo_="`cat /etc/SuSE-release | grep Linux`" 317 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 318 SYS=1; fi 319 if [ $SYS -eq 0 ]; then 320 echo_="`cat /etc/SuSE-release | grep SUSE`" 321 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 322 SYS=1; fi fi 323 if [ -f /etc/redhat-release ]; then 324 echo_="`cat /etc/redhat-release`" 325 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 326 SYS=1; fi 327 if [ -f /etc/debian_version ]; then 328 if [ -f /etc/issue.net ]; then 329 echo_="`cat /etc/issue.net || cat /etc/debian_version`" 330 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 331 SYS=2; fi; fi 332 if [ $SYS -eq 0 ]; then 333 if [ -f /etc/issue.net ]; then 334 echo_="`cat /etc/issue.net`" 335 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 336 fi; fi 337 OSUNAME=Linux 338 else 339 if [ $UNAME_ = "SunOS" ]; then 340 test -n "$ECHO" && $ECHO "SOLARIS = 1" >> $CONF 341 echo_="SunOS detected" 342 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 343 OSUNAME=SunOS 344 else 345 if [ $UNAME_ = "OpenBSD" ] || [ $UNAME_ = "NetBSD" ] || [ $UNAME_ = "FreeBSD" ]; then 346 test -n "$ECHO" && $ECHO "BSD = 1" >> $CONF 347 OS_EXT=.bsd 348 echo_="BSD $UNAME_ detected" 349 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 350 OSUNAME=BSD 351 else 352 echo_="Oyranos may or may not compile on your $UNAME_ system" 353 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 354 fi 355 fi 356 fi 357fi 358OS_EXT="" 359 360 361MACH_=`uname -m` 362deb_arch=$MACH_ 363if [ $? = 0 ]; then 364 if [ "$MACH_" = "x86_64" ]; then 365 echo_="X86_64 detected" 366 deb_arch=amd64 367 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 368 else 369 if [ "$MACH_" = "sun4u" ]; then 370 echo_="spark ultra 4 detected" 371 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 372 else 373 echo_="$MACH_ system detected" 374 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 375 if [ "$MACH_" = "i686" ]; then 376 deb_arch=i386 377 fi 378 fi 379 fi 380fi 381LIBDIR="lib"$BARCH 382export OSUNAME 383echo_="deb_arch=$deb_arch" 384test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_"; 385 386 387# exec_prefix bindir sbindir libdir cmmsubpath includedir datadir 388if [ -z "$exec_prefix" ]; then 389 exec_prefix="$prefix" 390fi 391if [ -z "$bindir" ]; then 392 bindir="$exec_prefix/bin" 393fi 394if [ -z "$sbindir" ]; then 395 sbindir="$exec_prefix/sbin" 396fi 397if [ -z "$libdir" ]; then 398 libdir="$exec_prefix/$LIBDIR" 399fi 400if [ -z "$cmmsubpath" ]; then 401 cmmsubpath="colour/modules" 402fi 403cmmdir="$libdir/$cmmsubpath" 404if [ -z "$includedir" ]; then 405 includedir="$prefix/include" 406fi 407if [ -z "$datadir" ]; then 408 datadir="$prefix/share" 409fi 410if [ -z "$mandir" ]; then 411 mandir="$datadir/man" 412fi 413# syscolordir usercolordir iccdirname settingsdirname targetdirname pixmapdir icondir desktopdir 414if [ -z "$syscolordir" ]; then 415 syscolordir="$datadir/color" 416fi 417if [ -z "$usercolordir" ]; then 418 usercolordir="~/.color" 419fi 420if [ -z "$iccdirname" ]; then 421 iccdirname="icc" 422fi 423if [ -z "$settingsdirname" ]; then 424 settingsdirname="settings" 425fi 426if [ -z "$targetdirname" ]; then 427 targetdirname="target" 428fi 429if [ -z "$pixmapdir" ]; then 430 pixmapdir="$datadir/pixmaps" 431fi 432if [ -z "$icondir" ]; then 433 icondir="$datadir/icons" 434fi 435if [ -z "$desktopdir" ]; then 436 desktopdir="$datadir/applications" 437fi 438export prefix exec_prefix bindir sbindir libdir includedir datadir mandir 439export syscolordir usercolordir pixmapdir icondir desktopdir 440export verbose 441 442PATH=$bindir:$PATH 443export PATH 444 445 446# detect Libraries 447 448test -n "$ECHO" && $ECHO "LIB=/"$LIBDIR >> $CONF 449 450 451# set some compiler and linker options 452 453if [ $OSUNAME = "Darwin" ]; then 454 dyld_libdir="$libdir/" 455 dyld_cmmdir="$cmmdir/" 456 dyld_metadir="$metadir/" 457 COPY="cp -pv" 458 LINK="ln -s" 459 MOVE="mv -v" 460 RM="rm -vf" 461 INSTALL="install -p $DEBUG_SWITCH" 462else 463 if [ $OSUNAME = "Linux" ]; then 464 COPY="cp -vdpa" 465 LINK="ln -sv" 466 MOVE="mv -v" 467 RM="rm -vf" 468 INSTALL="install -p $DEBUG_SWITCH" 469 else 470 COPY="cp -p" 471 LINK="ln -s" 472 MOVE="mv" 473 RM="rm -f" 474 if [ $OSUNAME = "BSD" ]; then 475 INSTALL="install -p $DEBUG_SWITCH" 476 fi 477 if [ $OSUNAME = "SunOS" ]; then 478 INSTALL="install" 479 else 480 INSTALL="install -p" 481 fi 482 test -n "$ECHO" && $ECHO "I18N_LIB = \$(iconv) \$(intl) \$(LIBNAMEV)" >> $CONF 483 test -n "$ECHO" && $ECHO "I18N_LIBSTAT = \$(iconv) \$(intl) \$(LIBNAMEV)" >> $CONF 484 CXXFLAGS="$CXXFLAGS -fPIC" 485 fi 486fi 487 488if [ -n "$DSO_LIB_VERSION" ]; then 489 test -n "$ECHO" && $ECHO "DSO_LIB_VERSION = $DSO_LIB_VERSION" >> $CONF 490 export DSO_LIB_VERSION SO 491fi 492test -n "$ECHO" && $ECHO "LINK_FLAGS_DYNAMIC = $LINK_FLAGS_DYNAMIC \$(DSO_LIB_VERSION)" >> $CONF 493test -n "$ECHO" && $ECHO "SO = $SO" >> $CONF 494test -n "$ECHO" && $ECHO "LIBEXT = $LIBEXT" >> $CONF 495export LINK_FLAGS_DYNAMIC SO LIBEXT 496 497for i in $MAKEFILE_DIR; do 498 mkdir -p $i 499 test -n "$ECHO" && $ECHO "src_dir = $ROOT_DIR/$i" | sed 's%/\.%%' >> "$i/makefile" 500 test -n "$ECHO" && $ECHO "" >> "$i/makefile" 501 test -n "$ECHO" && $ECHO "COPY = $COPY" >> "$i/makefile" 502 test -n "$ECHO" && $ECHO "LINK = $LINK" >> "$i/makefile" 503 test -n "$ECHO" && $ECHO "MOVE = $MOVE" >> "$i/makefile" 504 test -n "$ECHO" && $ECHO "RM = $RM" >> "$i/makefile" 505 test -n "$ECHO" && $ECHO "$osuname" >> "$i/makefile" 506 test -n "$ECHO" && $ECHO "EXEC_END = $EXEC_END" >> "$i/makefile" 507 test -n "$ECHO" && $ECHO "MAKEFILE_ARCH = Makefile$OS_EXT" >> "$i/makefile" 508done 509 510 511export CXXFLAGS 512 513test -n "$INFOECHO" && $INFOECHO "" 514 515 516# tell about required libs 517for i in $nochecklibs; do 518 new_libs=`echo $new_libs | sed s/$i//` 519done 520export X_ADD 521 522 523# Alle ifdefs landen hier 524 525test -n "$ECHO" && $ECHO "" >> $CONF 526test -n "$ECHO" && $ECHO "VERSION_A = $VERSION_A" >> $CONF 527test -n "$ECHO" && $ECHO "VERSION_B = $VERSION_B" >> $CONF 528test -n "$ECHO" && $ECHO "VERSION_C = $VERSION_C" >> $CONF 529test -n "$ECHO" && $ECHO "VERSION = $VERSION" >> $CONF 530test -n "$ECHO" && $ECHO "VERSION_L = $VERSION_L" >> $CONF 531test -n "$ECHO" && $ECHO "RELEASE = $RELEASE" >> $CONF 532test -n "$ECHO" && $ECHO "" >> $CONF 533 534test -n "$INFOECHO" && $INFOECHO "" 535 536 537 538test -n "$RPMECHO" && $RPMECHO "Version: $VERSION" >> $SPEC 539test -n "$RPMECHO" && $RPMECHO "Source: $TARGET"-"$VERSION".tar.bz2 >> $SPEC 540test -n "$RPMECHO" && $RPMECHO "Release: $RELEASE" >> $SPEC 541test -n "$RPMECHO" && $RPMECHO "%define syscolordir $syscolordir" >> $SPEC 542test -n "$RPMECHO" && $RPMECHO "%define usercolordir $usercolordir" >> $SPEC 543test -n "$RPMECHO" && $RPMECHO "%define iccdirname $iccdirname" >> $SPEC 544test -n "$RPMECHO" && $RPMECHO "%define cmmsubpath $cmmsubpath" >> $SPEC 545test -n "$RPMECHO" && $RPMECHO "%define settingsdirname $settingsdirname" >> $SPEC 546test -n "$RPMECHO" && $RPMECHO "%define targetdirname $targetdirname" >> $SPEC 547test -n "$RPMECHO" && $RPMECHO "%define pixmapdir $pixmapdir" >> $SPEC 548test -n "$RPMECHO" && $RPMECHO "%define icondir $icondir" >> $SPEC 549test -n "$RPMECHO" && $RPMECHO "%define desktopdir $desktopdir" >> $SPEC 550test -n "$RPMECHO" && cat $ROOT_DIR/"$SPEC.in" >> $SPEC 551echo_="generated $SPEC from $ROOT_DIR/$SPEC.in" 552test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 553 554test -n "$RPMECHO" && $RPMECHO "Version: $VERSION-$RELEASE" > $DEB 555test -n "$RPMECHO" && $RPMECHO "Architecture: $deb_arch" >> $DEB 556test -n "$RPMECHO" && cat $ROOT_DIR/"$DEB.in" >> $DEB 557echo_="generated $DEB from $ROOT_DIR/$DEB.in" 558test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 559 560 561if [ -n "$ECHO" ]; then 562 echo_="" 563 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 564 echo_="# Paths #" 565 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 566 echo_="# #" 567 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 568 echo_="prefix = $prefix" 569 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 570 echo_="exec_prefix = $exec_prefix" 571 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 572 echo_="bindir = $bindir" 573 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 574 echo_="sbindir = $sbindir" 575 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 576 echo_="libdir = $libdir" 577 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 578 echo_="cmmdir = $cmmdir" 579 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 580 echo_="cmmsubpath = $cmmsubpath" 581 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 582 echo_="includedir = $includedir" 583 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 584 echo_="datadir = $datadir" 585 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 586 echo_="mandir = $mandir" 587 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 588 echo_="syscolordir = $syscolordir" 589 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 590 echo_="usercolordir = $usercolordir" 591 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 592 echo_="iccdirname = $iccdirname" 593 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 594 echo_="settingsdirname = $settingsdirname" 595 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 596 echo_="targetdirname = $targetdirname" 597 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 598 echo_="pixmapdir = $pixmapdir" 599 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 600 echo_="icondir = $icondir" 601 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 602 echo_="desktopdir = $desktopdir" 603 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 604 echo_="################################################################" 605 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 606 echo_="" 607 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 608fi 609 610test -n "$ECHO" && $ECHO "build_dir = $BUILD_DIR" >> $CONF 611test -n "$ECHO" && $ECHO "prefix=$prefix" >> $CONF 612test -n "$ECHO" && $ECHO "exec_prefix=$exec_prefix" >> $CONF 613test -n "$ECHO" && $ECHO "bindir=$bindir" >> $CONF 614test -n "$ECHO" && $ECHO "sbindir=$sbindir" >> $CONF 615test -n "$ECHO" && $ECHO "libdir=$libdir" >> $CONF 616test -n "$ECHO" && $ECHO "cmmdir=$cmmdir" >> $CONF 617test -n "$ECHO" && $ECHO "metadir=$metadir" >> $CONF 618test -n "$ECHO" && $ECHO "cmmsubpath=$cmmsubpath" >> $CONF 619test -n "$ECHO" && $ECHO "includedir=$includedir" >> $CONF 620test -n "$ECHO" && $ECHO "dyld_libdir=$dyld_libdir" >> $CONF 621test -n "$ECHO" && $ECHO "dyld_cmmdir=$dyld_cmmdir" >> $CONF 622test -n "$ECHO" && $ECHO "dyld_metadir=$dyld_metadir" >> $CONF 623test -n "$ECHO" && $ECHO "datadir=$datadir" >> $CONF 624test -n "$ECHO" && $ECHO "mandir=$mandir" >> $CONF 625test -n "$ECHO" && $ECHO "syscolordir=$syscolordir" >> $CONF 626test -n "$ECHO" && $ECHO "usercolordir=$usercolordir" >> $CONF 627test -n "$ECHO" && $ECHO "iccdirname=$iccdirname" >> $CONF 628test -n "$ECHO" && $ECHO "settingsdirname=$settingsdirname" >> $CONF 629test -n "$ECHO" && $ECHO "targetdirname=$targetdirname" >> $CONF 630test -n "$ECHO" && $ECHO "pixmapdir=$pixmapdir" >> $CONF 631test -n "$ECHO" && $ECHO "icondir=$icondir" >> $CONF 632test -n "$ECHO" && $ECHO "desktopdir=$desktopdir" >> $CONF 633test -n "$ECHO" && $ECHO "" >> $CONF 634 635test -n "$ECHO" && $ECHO "syscolordir = $syscolordir" >> $PRINT_CONF 636test -n "$ECHO" && $ECHO "iccdirname = $iccdirname" >> $PRINT_CONF 637test -n "$ECHO" && $ECHO "targetdirname = $targetdirname" >> $PRINT_CONF 638test -n "$ECHO" && $ECHO "syscolordir = $syscolordir" >> $BASE_CONF 639test -n "$ECHO" && $ECHO "iccdirname = $iccdirname" >> $BASE_CONF 640test -n "$ECHO" && $ECHO "targetdirname = $targetdirname" >> $BASE_CONF 641 642 643 644test -n "$ECHO" && $ECHO "INSTALL = $INSTALL" >> $CONF 645test -n "$ECHO" && $ECHO "INSTALL = $INSTALL" >> $PRINT_CONF 646test -n "$ECHO" && $ECHO "INSTALL = $INSTALL" >> $BASE_CONF 647 648 649test -n "$ECHO" && $ECHO "" >> $CONF 650test -n "$ECHO" && $ECHO "" >> $CONF 651 652test -n "$INFOECHO" && $INFOECHO "" 653test -n "$INFOECHO" && $INFOECHO "" 654 655# prepare makefile from MAKEFILE_DIR 656if [ -n "$ECHO" ]; then 657 PREPARE_MAKEFILES=1; export PREPARE_MAKEFILES 658 $ROOT_DIR/configure_tests.sh 659 PREPARE_MAKEFILES=0; export PREPARE_MAKEFILES 660fi 661 662 663test -f error.tmp && ERROR=1 664test -f error.tmp && rm error.tmp 665if [ $ERROR != 0 ] && [ -z "$quick" ]; then 666 echo_="!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" 667 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 668 echo_="!!! An ERROR occured !!!" 669 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 670 echo_="!!! See Log above !!!" 671 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 672 echo_="!!! remove $CONF !!!" 673 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 674 echo_="!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" 675 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 676 test -n "$INFOECHO" && $INFOECHO "" 677 exit 678elif [ $WARNING != 0 ]; then 679 echo_="!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" 680 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 681 echo_="!!! Warning !!!" 682 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 683 echo_="!!! See Log above !!!" 684 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 685 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 686 echo_="!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" 687 test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG; test -n "$INFOECHO" && $INFOECHO "$echo_" 688fi 689 690echo_="char * oy_config_log_=\" \\" 691test -n "$ECHO" && $ECHO "$echo_" > $CONF_LOG.h 692test -n "$ECHO" && cat $CONF_LOG | sed 's/\"/\\\"/g ; s/$/\ \\n\\/g' >> $CONF_LOG.h 693echo_="\";" 694test -n "$ECHO" && $ECHO $e "$echo_" >> $CONF_LOG.h 695 696 697if [ -f error.txt ] && [ `cat error.txt | wc -l` -lt 1 ]; then 698 rm error.txt 699fi 700 701exit 0 702