]> git.sesse.net Git - mlt/blob - configure
make install part 2 - building configs
[mlt] / 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         (
25                 echo version=0.1.0
26                 echo prefix=$prefix
27                 echo bindir=$prefix/bin
28         ) > config.mak
29
30         echo "#!/bin/sh" > mlt-config
31         sed 's/^/export /' < config.mak >> mlt-config
32         cat < mlt-config-template >> mlt-config
33
34         echo -n > packages.dat
35 }
36
37 # Debug mode
38 set +x
39
40 # Define build directory for scripts called
41 export build_dir=`dirname $0`
42 export prefix=/usr/local
43 export help=0
44
45 # Iterate through arguments
46 for i in $*
47 do
48         case $i in
49                 --help )                help=1 ;;
50                 --prefix=* )    prefix="${i#--prefix=}" ;;
51         esac
52 done
53
54 # Show help if requested
55 [ $help = 1 ] && show_help || build_config 
56
57 # Iterate through each of the components
58 for i in framework modules inigo valerie miracle humperdink
59 do
60         if [ -x src/$i/configure ]
61         then
62                 echo "Configuring `basename $i`:"
63                 pushd src/$i > /dev/null
64                 ./configure $@
65                 [ $? != 0 ] && exit 1
66                 popd > /dev/null
67         fi
68 done
69