fix westley for mixed element text and entity references
[melted] / configure
1 #!/bin/bash
2
3 function show_help
4 {
5         cat << EOF
6 Funky non-autotool config script for MLT.
7
8         Options are:
9
10         --help                  - this information
11         --prefix=directory      - install prefix for path (default: $prefix)
12 EOF
13
14         for i in src/modules/*
15         do
16                 [ -d $i ] && [ "`basename $i`" != "CVS" ] && echo "     --disable-`basename $i`"
17         done
18
19         echo
20 }
21
22 function build_config
23 {
24         echo VERSION=0.1.0
25         echo prefix=$prefix
26         echo bindir=$prefix/bin
27 }
28
29 # Debug mode
30 set +x
31
32 # Define build directory for scripts called
33 export build_dir=`dirname $0`
34 export prefix=/usr/local
35 export help=0
36
37 # Iterate through arguments
38 for i in $*
39 do
40         case $i in
41                 --help )                help=1 ;;
42                 --prefix=* )    prefix="${i#--prefix=}" ;;
43         esac
44 done
45
46 # Show help if requested
47 [ $help = 1 ] && show_help || build_config > config.mak
48
49 # Iterate through each of the components
50 for i in framework modules inigo valerie miracle humperdink
51 do
52         if [ -x src/$i/configure ]
53         then
54                 echo "Configuring `basename $i`:"
55                 pushd src/$i > /dev/null
56                 ./configure $@
57                 [ $? != 0 ] && exit 1
58                 popd > /dev/null
59         fi
60 done
61