]> git.lyx.org Git - lyx.git/blob - autogen.sh
* metainfo.xml - homepage missing
[lyx.git] / autogen.sh
1 #!/bin/sh
2
3 ACLOCAL="aclocal -I m4 -I config"
4 AUTOHEADER="autoheader"
5 AUTOMAKE="automake --add-missing --force-missing --copy --foreign"
6 AUTOCONF="autoconf"
7
8 # Discover what version of automake we are using.
9 automake_version=$($AUTOMAKE --version 2>/dev/null | head -n 1)
10
11 if test "$automake_version" != ""; then
12     echo "Using $automake_version"
13 else
14     echo "LyX requires automake >= 1.14"
15     exit 1
16 fi
17
18 # Discover what version of autoconf we are using.
19 autoversion=$($AUTOCONF --version 2>/dev/null | head -n 1)
20
21 if test "$autoversion" != ""; then
22     echo "Using $autoversion"
23 else
24     echo "LyX requires autoconf >= 2.65"
25     exit 1
26 fi
27
28 # Delete old cache directories.
29 # automake will stop if their contents was created by an earlier version.
30 rm -rf autom4te.cache
31
32 # Generate the Makefiles and configure files
33 echo "Building macros..."
34 if ( $ACLOCAL --version ) < /dev/null > /dev/null 2>&1; then
35         $ACLOCAL
36 else
37         echo "aclocal not found -- aborting"
38         exit 1
39 fi
40
41 echo "Building config header template..."
42 if ( $AUTOHEADER --version ) < /dev/null > /dev/null 2>&1; then
43         $AUTOHEADER
44 else
45         echo "autoheader not found -- aborting"
46         exit 1
47 fi
48
49 echo "Building Makefile templates..."
50 if ( $AUTOMAKE --version ) < /dev/null > /dev/null 2>&1; then
51         $AUTOMAKE
52 else
53         echo "automake not found -- aborting"
54         exit 1
55 fi
56
57 echo "Building configure..."
58 if ( $AUTOCONF --version ) < /dev/null > /dev/null 2>&1; then
59         $AUTOCONF
60 else
61         echo "autoconf not found -- aborting"
62         exit 1
63 fi
64
65 echo "Building po/POTFILES.in..."
66 if ( make -s -f po/Rules-lyx srcdir=po top_srcdir=. po/POTFILES.in ); then
67     :
68 else
69         echo "Building po/POTFILES.in failed -- aborting"
70         exit 1
71 fi
72
73 echo
74 echo 'run "./configure && make"'
75 echo