3 ACLOCAL
="aclocal -I m4 -I config"
4 AUTOHEADER
="autoheader"
5 AUTOMAKE
="automake --add-missing --copy --foreign"
8 # Discover what version of automake we are using.
9 automake_version
=`$AUTOMAKE --version 2>/dev/null | head -n 1`
11 test "$automake_version" != "" && {
12 echo "Using $automake_version"
14 echo "LyX requires automake >= 1.5"
18 case $automake_version in
19 *' '1.
[5-9]*|
*' '1.10*)
23 echo "This automake version is not supported by LyX."
24 echo "LyX only supports automake 1.5 to 1.10."
29 # Discover what version of autoconf we are using.
30 autoversion
=`$AUTOCONF --version 2>/dev/null | head -n 1`
32 test "$autoversion" != "" && {
33 echo "Using $autoversion"
35 echo "LyX requires autoconf >= 2.52"
40 *' '2.5[2-9]|
*' '2.60[ab
]|
*' '2.6[0-1])
43 echo "This autoconf version is not supported by LyX."
44 echo "LyX only supports autoconf 2.52-2.61."
49 echo -n "Locating GNU m4... "
51 for prog
in $M4 gm4 gnum4
m4; do
52 # continue if $prog generates error (e.g. does not exist)
53 ( $prog --version ) < /dev
/null
> /dev
/null
2>&1
54 if test $?
-ne 0 ; then continue; fi
56 # /dev/null input prevents a hang of the script for some m4 compilers (e.g. on FreeBSD)
57 case `$prog --version < /dev/null 2>&1` in
62 if test x
$GNUM4 = x
; then
69 # Delete old cache directories.
70 # automake will stop if their contents was created by an earlier version.
73 # Generate the Makefiles and configure files
74 if ( $ACLOCAL --version ) < /dev
/null
> /dev
/null
2>&1; then
75 echo "Building macros..."
78 ( cd $dir ; $ACLOCAL )
82 echo "aclocal not found -- aborting"
86 if ( $AUTOHEADER --version ) < /dev
/null
> /dev
/null
2>&1; then
87 echo "Building config header template..."
90 ( cd $dir ; $AUTOHEADER )
94 echo "autoheader not found -- aborting"
98 if ( $AUTOMAKE --version ) < /dev
/null
> /dev
/null
2>&1; then
99 echo "Building Makefile templates..."
102 ( cd $dir ; $AUTOMAKE )
106 echo "automake not found -- aborting"
110 if ( $AUTOCONF --version ) < /dev
/null
> /dev
/null
2>&1; then
111 echo "Building configure..."
114 ( cd $dir ; $AUTOCONF )
118 echo "autoconf not found -- aborting"
123 echo 'run "./configure ; make"'