r783: Add check if sound/audio configuration is supported in dv format
[cinelerra_cv/mob.git] / autogen.sh
blob037d5e001d08b9d14342b57a3906fb25695a8478
1 #!/bin/sh
3 # Clean symlinks created with previous versions of automake
4 rm -f install-sh
5 rm -f missing
6 rm -f compile
8 # autogen.sh for Cinelerra Unofficial CVS
9 #
10 # This script allows you to create a ./configure script
11 # It is only needed when building from CVS when no ./configure script is provided
13 # WARNING: Recent versions of automake and autoconf are needed.
14 # You will need at least automake 1.7 and autoconf 2.57.
16 # If the script is not able to locate the needed versions,
17 # use variables to define absolute paths to the executables.
19 # The available variables are:
20 # AUTOMAKE=/path/to/automake
21 # ACLOCAL=/path/to/aclocal
22 # AUTOCONF=/path/to/autoconf
23 # AUTOHEADER=/path/to/autoheader
25 # Example (needed for Debian SID):
27 # export AUTOMAKE=/usr/bin/automake-1.7
28 # export ACLOCAL=/usr/bin/aclocal-1.7
29 # sh autogen.sh
31 echo "User defined paths to the preferred autoconf and automake versions."
32 echo "Read the script if you would like to modify them."
34 if test "$AUTOMAKE" = ""; then
35 AUTOMAKE=automake
37 echo 'AUTOMAKE'"=$AUTOMAKE"
39 if test "$ACLOCAL" = ""; then
40 ACLOCAL=aclocal
42 echo 'ACLOCAL'=$ACLOCAL
44 if test "$AUTOCONF" = ""; then
45 AUTOCONF=autoconf
47 echo 'AUTOCONF'=$AUTOCONF
49 if test "$AUTOHEADER" = ""; then
50 AUTOHEADER=autoheader
52 echo 'AUTOHEADER'=$AUTOHEADER
55 # You should not be modifying anything from here
58 echo "Now building the ./configure script..."
60 # check for recent automake >= 1.7
61 amversion=`$AUTOMAKE --version | grep "automake (GNU automake)" | cut -b 25-`
62 echo "checking for automake version... ${amversion:-unknown}"
63 case "$amversion" in
64 0.* | 1.[0-6] | 1.[0-6].* | 1.[0-6]-* )
65 echo "Error: an old version of automake was detected. You need at least automake 1.7 or a newer version." 1>&2
66 echo "If several versions of automake are installed on your system, you can modify the AUTOMAKE wrapper." 1>&2
67 echo "For example: AUTOMAKE=/usr/bin/automake-1.7" 1>&2
68 exit 1
70 esac
71 # automake ok
73 # check for recent aclocal >= 1.7
74 acversion=`$ACLOCAL --version | grep "aclocal (GNU automake)" | cut -b 24-`
75 echo "checking for aclocal version... ${acversion:-unknown}"
76 case "$acversion" in
77 0.* | 1.[0-6] | 1.[0-6].* | 1.[0-6]-* )
78 echo "Error: and old version of aclocal was detected. You need at least aclocal 1.7 or a newer version." 1>&2
79 echo "usually, automake and aclocal are part of the same Automake package, they should be of the same version." 1>&2
80 echo "If several versions of aclocal are installed on your system, you can modify the ACLOCAL wrapper." 1>&2
81 echo "For example: ACLOCAL=/usr/bin/aclocal-1.7" 1>&2
82 exit 1
84 esac
85 # automake ok
87 echo "Running aclocal -I m4 ..." &&
88 $ACLOCAL -I m4 &&
90 echo "Running libtoolize ..."
91 libtoolize --force &&
93 echo "Running autoheader ..." &&
94 $AUTOHEADER &&
96 echo "Running automake ..." &&
97 $AUTOMAKE --foreign --add-missing &&
99 echo "Running autoconf ..." &&
100 $AUTOCONF &&
102 echo "Finished"