configure 14.9 KB
Newer Older
dimitri's avatar
dimitri committed
1
#!/bin/sh
mueller's avatar
mueller committed
2 3 4
#
# $Id$
#
dimitri's avatar
dimitri committed
5
# Copyright (C) 1997-2005 by Dimitri van Heesch.
mueller's avatar
mueller committed
6 7 8 9 10 11 12
# 
# Permission to use, copy, modify, and distribute this software and its
# documentation under the terms of the GNU General Public License is hereby 
# granted. No representations are made about the suitability of this software 
# for any purpose. It is provided "as is" without express or implied warranty.
# See the GNU General Public License for more details.
# 
dimitri's avatar
dimitri committed
13 14
# Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license.
mueller's avatar
mueller committed
15 16 17
# 
# shell script to configure doxygen

dimitri's avatar
dimitri committed
18 19
doxygen_version_major=1
doxygen_version_minor=4
dimitri's avatar
dimitri committed
20
doxygen_version_revision=6
dimitri's avatar
dimitri committed
21 22

#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
dimitri's avatar
dimitri committed
23
doxygen_version_mmn=NO
dimitri's avatar
dimitri committed
24

mueller's avatar
mueller committed
25 26 27 28 29
bin_dirs=`echo $PATH | sed -e "s/:/ /g"`

f_debug=NO
f_shared=YES
f_make=NO
30
f_dot=NO
mueller's avatar
mueller committed
31 32
f_perl=NO
f_plf_auto=NO
dimitri's avatar
dimitri committed
33
f_prefix=/usr/local
dimitri's avatar
dimitri committed
34
f_insttool=NO
mueller's avatar
mueller committed
35
f_english=NO
dimitri's avatar
dimitri committed
36
f_wizard=NO
dimitri's avatar
dimitri committed
37
f_thread=NO
dimitri's avatar
dimitri committed
38
f_langs=nl,se,cz,fr,id,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,br,dk,sk,ua,gr,tw,sr,ca,lt,za
mueller's avatar
mueller committed
39

mueller's avatar
mueller committed
40
while test -n "$1";  do
mueller's avatar
mueller committed
41
  case $1 in
dimitri's avatar
dimitri committed
42
    --prefix | -prefix)
mueller's avatar
mueller committed
43 44
       shift; f_prefix=$1
       ;;
dimitri's avatar
dimitri committed
45 46 47 48
    --docdir | -docdir)
       shift; f_docdir=$1/doxygen
       ;;
    --shared | -shared)
mueller's avatar
mueller committed
49 50
       f_shared=YES
       ;;
dimitri's avatar
dimitri committed
51
    --static | -static)
mueller's avatar
mueller committed
52 53
       f_shared=NO
       ;;
dimitri's avatar
dimitri committed
54
    --release | -release)
mueller's avatar
mueller committed
55 56
       f_debug=NO
       ;;
dimitri's avatar
dimitri committed
57
    --debug | -debug)
mueller's avatar
mueller committed
58 59
       f_debug=YES
       ;;
dimitri's avatar
dimitri committed
60
    --english-only | -english-only)
mueller's avatar
mueller committed
61 62
       f_english=YES
       ;;
dimitri's avatar
dimitri committed
63 64 65
    --enable-langs | -enable-langs)
       shift; f_langs=$1
       ;;
dimitri's avatar
dimitri committed
66
    --platform | -platform)
mueller's avatar
mueller committed
67 68
       shift; f_platform=$1
       ;;
dimitri's avatar
dimitri committed
69
    --make | -make)
mueller's avatar
mueller committed
70 71
       shift; f_make=$1
       ;;
dimitri's avatar
dimitri committed
72
    --dot | -dot)
73 74
       shift; f_dot=$1
       ;;
dimitri's avatar
dimitri committed
75
    --perl | -perl)
mueller's avatar
mueller committed
76 77
       shift; f_perl=$1
       ;;
dimitri's avatar
dimitri committed
78
    --install | -install)
mueller's avatar
mueller committed
79 80
       shift; f_insttool=$1
       ;;
dimitri's avatar
dimitri committed
81
    --with-doxywizard | -with-doxywizard)
dimitri's avatar
dimitri committed
82 83
       f_wizard=YES
       ;;
mueller's avatar
mueller committed
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
    -h | -help | --help)
       f_help=y
       ;;
    *)
       echo $1: unknown argument
       f_help=y
       f_error=y
       ;;
  esac
  shift
done

if test "$f_help" = y; then
  cat <<EOF
Usage: $0 [--help] [--shared] [--static] [--release] [--debug] 
99
          [--perl name] [--make name] [--dot name] [--platform target] 
dimitri's avatar
dimitri committed
100
          [--prefix dir] [--docdir dir] [--install name] [--english-only] 
dimitri's avatar
dimitri committed
101
          [----enable-langs list] [--with-doxywizard] 
mueller's avatar
mueller committed
102

103
Options: 
mueller's avatar
mueller committed
104

mueller's avatar
mueller committed
105 106 107 108 109 110 111 112 113
  --help                Print this help
  --shared | --static   Build using shared or static linking
		        [default: shared]
  --release | --debug   Build for release or debug 
		        [default: release]
  --perl name           Use \`name' as the name of the perl interpreter 
		        [default: autodetect]
  --make name           Use \`name' as the name of the GNU make tool
		        [default: autodetect]
114 115 116
  --dot name            Use \`name' as the name of the dot tool that
                        is part of the Graphviz package.
                        [default: autodetect]
mueller's avatar
mueller committed
117 118
  --platform target     Do not detect platform but use \`target' instead.
                        See PLATFORMS for a list of possibilities
dimitri's avatar
dimitri committed
119 120
  --prefix dir          Installation prefix directory (doxygen will be
                        put in PREFIX/bin/doxygen)
dimitri's avatar
dimitri committed
121
                        [default: $f_prefix]
dimitri's avatar
dimitri committed
122 123
  --docdir dir          Documentation is installed in DOCDIR/doxygen/
                        [default: PREFIX/share/doc/packages]
mueller's avatar
mueller committed
124
  --install name        Use \`name' as the name of the GNU install tool
dimitri's avatar
dimitri committed
125
                        [default: autodetect]
mueller's avatar
mueller committed
126
  --english-only        Include support for English only.
dimitri's avatar
dimitri committed
127 128
  --enable-langs list 	Include support for output languages listed in list.
  			[default: $f_langs]
dimitri's avatar
dimitri committed
129
  --with-doxywizard     Build the GUI frontend for doxygen. This
dimitri's avatar
dimitri committed
130
                        requires Qt 3.3.x
dimitri's avatar
dimitri committed
131

mueller's avatar
mueller committed
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
EOF
  test "$f_error" = y && exit 1
  exit 0;
fi

u_release=`(uname -r) 2>/dev/null` || u_release=unknown
u_system=`(uname -s) 2>/dev/null` || u_system=unknown

if test -z "$f_platform"; then
  f_platforms="`cat PLATFORMS`"
  
  case "$u_system:$u_release" in
    AIX*)
      f_platform=aix-xlc
      ;;
dimitri's avatar
dimitri committed
147 148 149
    BeOS*)
      f_platform=beos-g++
      ;;
mueller's avatar
mueller committed
150 151 152
    dgux:*)
      f_platform=dgux-g++
      ;;
dimitri's avatar
dimitri committed
153 154
    Darwin:*)
      f_platform=macosx-c++
dimitri's avatar
dimitri committed
155 156 157
      if test "$f_insttool" = NO; then
        f_insttool=/usr/bin/install
      fi
dimitri's avatar
dimitri committed
158
      ;;
mueller's avatar
mueller committed
159 160 161 162 163
    FreeBSD:*)
      f_platform=freebsd-g++
      ;;
    HP-UX:*)
      f_platform=hpux-g++
dimitri's avatar
dimitri committed
164 165 166
      if test "$f_insttool" = NO; then
        f_insttool=/usr/bin/install
      fi
mueller's avatar
mueller committed
167 168 169 170 171 172 173
      ;;
    IRIX64:*)
      f_platform=irix-64
      ;;
    IRIX:*)
      f_platform=irix-n32
      ;;
dimitri's avatar
dimitri committed
174
    Linux:*|GNU:*|GNU/*:*)
mueller's avatar
mueller committed
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
      f_platform=linux-g++
      ;;
    NetBSD:*)
      f_platform=netbsd-g++
      ;;
    OpenBSD:*)
      f_platform=openbsd-g++
      ;;
    OSF1:*)
      f_platform=osf1-g++
      ;;
    QNX:*)
      f_platform=qnx-g++
      ;;
    *:3.2)
      f_platform=sco-g++
      ;;
    SunOS:4*)
      f_platform=sunos-g++
      ;;
    SunOS:5*)
dimitri's avatar
dimitri committed
196
      f_platform=solaris-g++
dimitri's avatar
dimitri committed
197 198 199
      if test "$f_insttool" = NO; then
        f_insttool=/usr/bin/install
      fi
mueller's avatar
mueller committed
200 201 202 203 204 205 206
      ;;
    ULTRIX:*)
      f_platform=ultrix-g++
      ;;
    UNIX_SV:4.2*)
      f_platform=unixware-g++
      ;;
dimitri's avatar
dimitri committed
207 208 209
    Cygwin:*)
      f_platform=win32-g++
      ;;
dimitri's avatar
dimitri committed
210 211 212
    *MiNT:*)
      f_platform=m68k-atari-mint-g++
      ;;
mueller's avatar
mueller committed
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
    *)
    echo
    echo "Your platform was not recognised by this configure script"
    echo "Please use the -platform option to specify one of platforms"
    echo "in this list:"
    echo
    for p in $f_platforms
    do
      echo "    $0 $* -platform $p"
    done
    echo
    exit 2
  esac 
  echo "  Autodetected platform $f_platform... "
  f_plf_auto=YES
fi

dimitri's avatar
dimitri committed
230 231 232 233
if test -z "$f_docdir"; then
  f_docdir=$f_prefix/share/doc/packages/doxygen
fi

mueller's avatar
mueller committed
234 235 236 237 238 239 240 241 242 243 244
if test "$f_plf_auto" = NO; then
  echo -n "  Checking for platform $f_platform... "
  if test '!' -d tmake/lib/$f_platform; then
    echo "not supported!" 
    echo
    exit 2
  fi
  echo "supported"
fi

#- check for qt --------------------------------------------------------------
dimitri's avatar
dimitri committed
245
 
dimitri's avatar
dimitri committed
246
LIBDIR=lib
dimitri's avatar
dimitri committed
247
if test "$f_wizard" = YES; then
dimitri's avatar
dimitri committed
248 249 250
  if test -z "$QTDIR"; then
    echo "  QTDIR environment variable not set!"
    echo -n "  Checking for Qt..."
dimitri's avatar
dimitri committed
251
    for d in /usr/{lib,share,qt}/{qt-3,qt3,qt,qt*,3}; do
dimitri's avatar
dimitri committed
252 253
      if test -d "$d/lib" -a -d "$d/include" -a -x "$d/bin/moc"; then
        QTDIR=$d
dimitri's avatar
dimitri committed
254
      fi
dimitri's avatar
dimitri committed
255 256 257 258
    done
  else
    echo "  Detected Qt via the QTDIR environment variable..."
    echo -n "                    "
dimitri's avatar
dimitri committed
259
  fi
dimitri's avatar
dimitri committed
260
  if test -z "$QTDIR"; then
dimitri's avatar
dimitri committed
261
    echo "QTDIR not set and Qt not found at standard locations!"
dimitri's avatar
dimitri committed
262 263
    echo
    echo "tmake requires the QTDIR environment variable to be set."
dimitri's avatar
dimitri committed
264
    echo "check the Qt installation instructions!"
dimitri's avatar
dimitri committed
265 266 267
    exit 2
  else
    if test ! -d "$QTDIR/lib"; then
dimitri's avatar
dimitri committed
268 269 270 271 272
      if test ! -d "$QTDIR/lib64"; then
        echo "QTDIR is set to $QTDIR, but library directory $QTDIR/lib does not exist!"
        exit 2
      fi
      LIBDIR=lib64
dimitri's avatar
dimitri committed
273 274
    fi
    if test ! -d "$QTDIR/include"; then
dimitri's avatar
dimitri committed
275
      echo "QTDIR is set to $QTDIR, but include directory $QTDIR/include does not exist!"
dimitri's avatar
dimitri committed
276 277
      exit 2
    fi
dimitri's avatar
dimitri committed
278
    if test ! -x "$QTDIR/bin/moc"; then
dimitri's avatar
dimitri committed
279
      echo "QTDIR is set to $QTDIR, but the moc tool could not be found in $QTDIR/bin!"
dimitri's avatar
dimitri committed
280 281
      exit 2
    fi
dimitri's avatar
dimitri committed
282
    echo " headers $QTDIR/include,"
dimitri's avatar
dimitri committed
283 284
    echo "                     libraries $QTDIR/$LIBDIR"  
    if test -n "`ls $QTDIR/$LIBDIR/* | grep qt-mt`"; then
dimitri's avatar
dimitri committed
285 286
      f_thread=YES
    fi
dimitri's avatar
dimitri committed
287 288 289
  fi
fi
   
mueller's avatar
mueller committed
290 291
# - check for make ------------------------------------------------------------

mueller's avatar
mueller committed
292
echo -n "  Checking for GNU make tool... "
mueller's avatar
mueller committed
293
if test "$f_make" = NO; then
mueller's avatar
mueller committed
294
  make_names="gmake make"
mueller's avatar
mueller committed
295 296 297 298 299
  make_dirs="/usr/bin /usr/local/bin /bin /sbin $bin_dirs"
  make_prog=NO
  for i in $make_names; do
    for j in $make_dirs; do
      if test -x "$j/$i"; then
mueller's avatar
mueller committed
300 301 302 303
        if test -n "`$j/$i --version 2>/dev/null | grep GNU`"; then
          make_prog="$j/$i"
          break 2
        fi
mueller's avatar
mueller committed
304 305 306 307 308 309 310 311 312 313 314 315 316
      fi
    done
  done
  f_make="$make_prog" 
fi

if test "$f_make" = NO; then
  echo "not found!";
  echo
  exit 2
fi
echo "using $f_make"

dimitri's avatar
dimitri committed
317 318 319 320 321 322 323 324 325 326 327
# - check for install ------------------------------------------------------------

echo -n "  Checking for GNU install tool... "
if test "$f_insttool" = NO; then
  install_names="ginstall install"
  install_dirs="/usr/bin /usr/local/bin /bin /sbin $bin_dirs"
  install_prog=NO
  install_found=NO
  for i in $install_names; do
    for j in $install_dirs; do
      if test -x "$j/$i"; then
dimitri's avatar
dimitri committed
328
        if test -n "`$j/$i --version 2>/dev/null | grep utils`"; then
dimitri's avatar
dimitri committed
329 330 331 332
          install_found=YES
          install_prog="$j/$i"
          break 2
        fi
dimitri's avatar
dimitri committed
333 334 335 336 337 338 339 340
      fi
    done
  done
  f_insttool="$install_prog" 
fi

if test "$f_insttool" = NO; then
  if test "$install_found" = YES; then
dimitri's avatar
dimitri committed
341
    echo;
dimitri's avatar
dimitri committed
342 343
  else
    echo "not found!";
dimitri's avatar
dimitri committed
344
    echo
dimitri's avatar
dimitri committed
345
  fi
dimitri's avatar
dimitri committed
346
  echo "GNU version of install is required: this is part of the fileutils/coreutils package: "
dimitri's avatar
dimitri committed
347
  echo "see http://www.gnu.org/software/fileutils/fileutils.html"
dimitri's avatar
dimitri committed
348 349 350 351 352 353
  echo
  exit 2
fi
echo "using $f_insttool";


354 355
# - check for dot ------------------------------------------------------------

dimitri's avatar
dimitri committed
356
echo -n "  Checking for dot (part of GraphViz)... "
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374
if test "$f_dot" = NO; then
  dot_dirs="$bin_dirs"
  dot_prog=NO
  for j in $dot_dirs; do
    if test -x "$j/dot"; then
      dot_prog="$j/dot"
      break 2
    fi
  done
  f_dot="$dot_prog" 
fi

if test "$f_dot" = NO; then
  echo "not found!";
else
  echo "using $f_dot"
fi

mueller's avatar
mueller committed
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
# - check for perl ------------------------------------------------------------

echo -n "  Checking for perl... "
if test "$f_perl" = NO; then
  perl_names="perl perl5"
  perl_dirs="/usr/bin /usr/local/bin /bin /sbin $bin_dirs"
  perl_prog=NO
  perl_found=NO
  for i in $perl_names; do
    for j in $perl_dirs; do
      if test -x "$j/$i"; then
        perl_found=YES
        if $j/$i -e 'require 5.000;' 2>/dev/null ; then
          perl_prog="$j/$i"
          break 2
        fi
      fi
    done
  done
  f_perl="$perl_prog" 
fi

if test "$f_perl" = NO; then
  if test "$perl_found" = YES; then
    echo "version is too old (5.000 or higher is required)."
  else
    echo "not found!";
  fi
  echo
  exit 2
fi
echo "using $f_perl";

dimitri's avatar
dimitri committed
408

mueller's avatar
mueller committed
409 410
# -----------------------------------------------------------------------------

dimitri's avatar
dimitri committed
411 412 413 414 415 416 417 418 419 420 421
#
# Make VERSION file
#
echo "  Creating VERSION file."
# Output should be something like 1.4.5-20051010
if test "$doxygen_version_mmn" = NO; then
  echo "$doxygen_version_major.$doxygen_version_minor.$doxygen_version_revision" > VERSION
else
  echo "$doxygen_version_major.$doxygen_version_minor.$doxygen_version_revision-$doxygen_version_mmn" > VERSION
fi

mueller's avatar
mueller committed
422 423 424
test -f .makeconfig && rm .makeconfig
test -f .tmakeconfig && rm .tmakeconfig

dimitri's avatar
dimitri committed
425 426 427 428
if test -z $PWD; then
  PWD=`pwd`
fi

mueller's avatar
mueller committed
429 430 431
cat > .makeconfig <<EOF
DOXYGEN   = $PWD
TMAKEPATH = $PWD/tmake/lib/$f_platform
dimitri's avatar
dimitri committed
432
ENV       = env TMAKEPATH=\$(TMAKEPATH)
mueller's avatar
mueller committed
433 434 435 436
TMAKE     = $PWD/tmake/bin/tmake
MAKE      = $f_make
PERL      = $f_perl
RM        = rm -f
dimitri's avatar
dimitri committed
437
CP        = cp
mueller's avatar
mueller committed
438
VERSION   = `cat VERSION`
mueller's avatar
mueller committed
439 440
INSTALL   = $f_prefix
INSTTOOL  = $f_insttool
mueller's avatar
mueller committed
441
DOXYDOCS  = ..
dimitri's avatar
dimitri committed
442
DOCDIR    = $f_docdir
dimitri's avatar
dimitri committed
443
QTDIR     = $QTDIR
mueller's avatar
mueller committed
444 445
EOF

446 447 448 449 450 451
if test "$f_dot" != NO; then
  cat >> .makeconfig <<EOF
HAVE_DOT  = $f_dot
EOF
fi

dimitri's avatar
dimitri committed
452 453 454 455 456 457 458
if test "$f_platform" = "m68k-atari-mint-g++"; then
  cat >> .makeconfig <<EOF
TMAKE += -unix
EOF
fi


dimitri's avatar
dimitri committed
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
# Make doxygen.spec...
#
echo "  Created doxygen.spec file, for rpm generation."

echo "%define version $doxygen_version_major.$doxygen_version_minor.$doxygen_version_revision" > spec.tmp
if test "$doxygen_version_mmn" = NO; then
  echo "%define revision 1" >> spec.tmp
  echo "%define mmn 1"      >> spec.tmp
else
  echo "%define revision $doxygen_version_mmn" >> spec.tmp
  echo "%define mmn $doxygen_version_mmn"      >> spec.tmp
fi

mkdir -p packages
mkdir -p packages/rpm

if test "$f_wizard" = YES; then
  cat spec.tmp ./packages/rpm/doxygen.spec.in > ./packages/rpm/doxygen.spec
else
  cat spec.tmp ./packages/rpm/doxygen-nodoxywizard.spec.in > ./packages/rpm/doxygen.spec
fi

rm -f spec.tmp


# make .tmakeconfig
#
mueller's avatar
mueller committed
486 487
touch .tmakeconfig
if test "$f_shared" = NO; then
dimitri's avatar
dimitri committed
488
  if test "$f_platform" = "osf1-cxx" -o "$f_platform" = "irix-n32"; then
mueller's avatar
mueller committed
489
  cat >> .tmakeconfig <<EOF
dimitri's avatar
dimitri committed
490
    TMAKE_LFLAGS += -non_shared
mueller's avatar
mueller committed
491
EOF
dimitri's avatar
dimitri committed
492
  elif test "$f_platform" = "solaris-cc"; then
dimitri's avatar
dimitri committed
493
  cat >> .tmakeconfig <<EOF
dimitri's avatar
dimitri committed
494
    TMAKE_LFLAGS += -Bstatic
dimitri's avatar
dimitri committed
495 496 497
EOF
  elif test "$f_platform" = "hpux-cc"; then
  cat >> .tmakeconfig <<EOF
dimitri's avatar
dimitri committed
498
    TMAKE_LFLAGS += -noshared
dimitri's avatar
dimitri committed
499
EOF
dimitri's avatar
dimitri committed
500 501
  else
  cat >> .tmakeconfig <<EOF
dimitri's avatar
dimitri committed
502
    TMAKE_LFLAGS += -static
dimitri's avatar
dimitri committed
503 504
EOF
  fi
mueller's avatar
mueller committed
505
fi
dimitri's avatar
dimitri committed
506 507 508 509 510 511
if test "$f_wizard" = YES; then
  cat >> .tmakeconfig <<EOF
TMAKE_MOC = $QTDIR/bin/moc
EOF
fi

mueller's avatar
mueller committed
512
if test "$f_english" = YES; then
513
  cat >> .tmakeconfig <<EOF
dimitri's avatar
dimitri committed
514
TMAKE_CXXFLAGS += -DENGLISH_ONLY
mueller's avatar
mueller committed
515 516 517
EOF
fi

dimitri's avatar
dimitri committed
518
f_inmakefiles="Makefile.in qtools/Makefile.in src/Makefile.in examples/Makefile.in doc/Makefile.in addon/doxywizard/Makefile.in addon/doxmlparser/src/Makefile.in addon/doxmlparser/test/Makefile.in addon/doxmlparser/examples/metrics/Makefile.in libpng/Makefile.in libmd5/Makefile.in"
dimitri's avatar
dimitri committed
519 520

for i in $f_inmakefiles ; do
mueller's avatar
mueller committed
521 522 523 524 525 526 527 528 529
     SRC=$i
     DST=`echo $i|sed 's%\(.*\).in$%\1%'`
     TIME=`date`
     cat > $DST <<EOF
#
# This file was generated from `basename $i` on $TIME
#

EOF
dimitri's avatar
dimitri committed
530
     cat .makeconfig >> $DST
dimitri's avatar
dimitri committed
531
     if test $i = Makefile.in; then
dimitri's avatar
dimitri committed
532 533 534
       echo "" >> $DST
       echo "all: src/version.cpp " >> $DST
       echo "	\$(MAKE) -C qtools" >> $DST
dimitri's avatar
dimitri committed
535
       echo "	\$(MAKE) -C libpng" >> $DST
dimitri's avatar
dimitri committed
536
       echo "	\$(MAKE) -C libmd5" >> $DST
dimitri's avatar
dimitri committed
537
       echo "	\$(MAKE) -C src" >> $DST
dimitri's avatar
dimitri committed
538 539 540
       if test $f_wizard = YES; then
         echo "	\$(MAKE) -C addon/doxywizard" >> $DST
       fi
dimitri's avatar
dimitri committed
541
       echo "" >> $DST
dimitri's avatar
dimitri committed
542 543 544 545
       echo "doxywizard_install:" >> $DST
       if test $f_wizard = YES; then
         echo "	\$(MAKE) -C addon/doxywizard install" >> $DST
       fi
dimitri's avatar
dimitri committed
546
       echo "" >> $DST
dimitri's avatar
dimitri committed
547
     fi
dimitri's avatar
dimitri committed
548
     cat $SRC >> $DST
mueller's avatar
mueller committed
549 550 551
     echo "  Created $DST from $SRC..."
done

dimitri's avatar
dimitri committed
552
f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in addon/doxywizard/doxywizard.pro.in addon/doxmlparser/src/doxmlparser.pro.in addon/doxmlparser/test/xmlparse.pro.in addon/doxmlparser/examples/metrics/metrics.pro.in libpng/libpng.pro.in libmd5/libmd5.pro.in" 
dimitri's avatar
dimitri committed
553 554

for i in $f_inprofiles ; do
mueller's avatar
mueller committed
555 556 557 558 559 560 561 562 563 564
     SRC=$i
     DST=`echo $i|sed 's%\(.*\).in$%\1%'`
     TIME=`date`
     cat > $DST <<EOF
#
# This file was generated from `basename $i` on $TIME
#

EOF
     if test "$f_debug" = NO; then
dimitri's avatar
dimitri committed
565
       realopts="release"
mueller's avatar
mueller committed
566
     else
dimitri's avatar
dimitri committed
567 568 569 570
       realopts="debug"
     fi
     if test "$f_thread" = YES; then
       realopts="$realopts thread"
mueller's avatar
mueller committed
571
     fi
dimitri's avatar
dimitri committed
572
     cat $SRC .tmakeconfig | sed -e "s/\$extraopts/$realopts/g" >> $DST
mueller's avatar
mueller committed
573 574 575
     echo "  Created $DST from $SRC..."
done

dimitri's avatar
dimitri committed
576 577
# - generating src/lang_cfg.h 

dimitri's avatar
dimitri committed
578
if test -f "src/lang_cfg.h"; then
dimitri's avatar
dimitri committed
579 580
    chmod u+w src/lang_cfg.h   # make sure file can be overwritten
fi
dimitri's avatar
dimitri committed
581 582 583
echo -n "  Generating src/lang_cfg.h..."
echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>); 
        chomp @l; 
dimitri's avatar
dimitri committed
584
	@allowed=(split(/,/,"NL,SE,CZ,FR,ID,IT,DE,JP,JE,ES,FI,RU,HR,PL,PT,HU,KR,KE,RO,SI,CN,NO,BR,DK,SK,UA,GR,TW,SR,CA,LT,ZA"));
dimitri's avatar
dimitri committed
585 586 587 588 589 590 591 592 593 594
	foreach my $elem (@l){ 
	     $elem =~ tr/a-z/A-Z/;
	     $r=0;
	     foreach my $tst (@allowed){
		if ($tst eq $elem) { $r=1; last; } 		
	     }	    
	     if ($r!=1) { die "ERROR: Invalid language $elem was selected!\n"; } 
	     print "#define LANG_$elem\n";
        };' > ./src/lang_cfg.h   
echo