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