]> git.lyx.org Git - lyx.git/blob - autogen.sh
create the initial po/POTFILE.in at autogen.sh time; I hope this does
[lyx.git] / autogen.sh
1 #!/bin/sh
2
3 ACLOCAL="aclocal -I m4 -I config"
4 AUTOHEADER="autoheader"
5 AUTOMAKE="automake --add-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 test "$automake_version" != "" && {
12     echo "Using $automake_version"
13 } || {
14     echo "LyX requires automake >= 1.5"
15     exit 1
16 }
17
18 case $automake_version in
19     *' '1.[5-9]*|*' '1.10*)
20         ;;
21     *)
22
23         echo "This automake version is not supported by LyX."
24         echo "LyX only supports automake 1.5 to 1.10."
25         exit 1
26         ;;
27 esac
28
29 # Discover what version of autoconf we are using.
30 autoversion=`$AUTOCONF --version 2>/dev/null | head -n 1`
31
32 test "$autoversion" != "" && {
33     echo "Using $autoversion"
34 } || {
35     echo "LyX requires autoconf >= 2.52"
36     exit 1
37 }
38
39 case $autoversion in
40     *' '2.5[2-9]|*' '2.60[ab]|*' '2.6[0-2])
41         ;;
42     *)
43         echo "This autoconf version is not supported by LyX."
44         echo "LyX only supports autoconf 2.52-2.61."
45         exit 1
46         ;;
47 esac
48
49 # Delete old cache directories.
50 # automake will stop if their contents was created by an earlier version.
51 rm -rf autom4te.cache
52
53 # Generate the Makefiles and configure files
54 echo "Building macros..."
55 if ( $ACLOCAL --version ) < /dev/null > /dev/null 2>&1; then
56         $ACLOCAL
57 else
58         echo "aclocal not found -- aborting"
59         exit 1
60 fi
61
62 echo "Building config header template..."
63 if ( $AUTOHEADER --version ) < /dev/null > /dev/null 2>&1; then
64         $AUTOHEADER
65 else
66         echo "autoheader not found -- aborting"
67         exit 1
68 fi
69
70 echo "Building Makefile templates..."
71 if ( $AUTOMAKE --version ) < /dev/null > /dev/null 2>&1; then
72         $AUTOMAKE
73 else
74         echo "automake not found -- aborting"
75         exit 1
76 fi
77
78 echo "Building configure..."
79 if ( $AUTOCONF --version ) < /dev/null > /dev/null 2>&1; then
80         $AUTOCONF
81 else
82         echo "autoconf not found -- aborting"
83         exit 1
84 fi
85
86 echo "Building po/POTFILES.in..."
87 make -s -f po/Rules-lyx srcdir=po top_srcdir=.
88
89 echo
90 echo 'run "./configure ; make"'
91 echo