]> git.lyx.org Git - lyx.git/blob - autogen.sh
update gettext to 0.10.38
[lyx.git] / autogen.sh
1 #!/bin/sh
2
3 ACLOCAL=aclocal
4 AUTOHEADER=autoheader
5 AUTOMAKE="automake -a -c --foreign"
6 AUTOCONF=autoconf
7 GNUM4=
8
9 ACINCLUDE_FILES="lyxinclude.m4 libtool.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4 sigc++.m4 qt2.m4 gtk--.m4 gnome--.m4 gnome.m4 pspell.m4"
10 SIGCPP_ACINCLUDE_FILES="libtool.m4"
11
12 echo -n "Locating GNU m4... "
13 for prog in $M4 gm4 gnum4 m4 ; do
14   case `$prog --version 2>&1` in
15     *GNU*) ok=yes
16            GNUM4=$prog
17            echo "found: $GNUM4"
18            break ;;
19     *) ;;
20   esac
21 done
22 if test x$ok = xno ; then
23     echo "not found."
24 fi
25
26 # Generate acinclude.m4
27 echo -n "Generate acinclude.m4... "
28 rm -f acinclude.m4 sigc++/acinclude.m4
29 (cd config ; cat ${ACINCLUDE_FILES} >../acinclude.m4)
30 (cd config ; cat ${SIGCPP_ACINCLUDE_FILES} >../sigc++/acinclude.m4)
31 echo "done."
32
33 # Generate the Makefiles and configure files
34 if ( aclocal --version ) </dev/null > /dev/null 2>&1; then
35         echo "Building macros..."
36         for dir in . lib/reLyX sigc++ ; do
37             echo "        $dir"
38             ( cd $dir ; $ACLOCAL )
39         done
40         echo "done."
41 else
42         echo "aclocal not found -- aborting"
43         exit
44 fi
45
46 if ( autoheader --version ) </dev/null > /dev/null 2>&1; then
47         echo "Building config header template..."
48         for dir in . sigc++ ; do
49             echo "        $dir"
50             ( cd $dir ; $AUTOHEADER )
51         done
52         echo "done."
53 else
54         echo "autoheader not found -- aborting"
55         exit
56 fi
57
58 if ( $AUTOMAKE --version ) </dev/null > /dev/null 2>&1; then
59         echo "Building Makefile templates..."
60         for dir in . lib/reLyX sigc++ ; do
61             echo "        $dir"
62             ( cd $dir ; $AUTOMAKE )
63         done
64         echo "done."
65 else
66         echo "automake not found -- aborting"
67         exit
68 fi
69
70 if ( $AUTOCONF --version ) </dev/null > /dev/null 2>&1; then
71         echo "Building configure..."
72         for dir in . lib/reLyX sigc++ ; do
73             echo "       $dir"
74             ( cd $dir ; $AUTOCONF )
75         done
76         echo "done."
77 else
78         echo "autoconf not found -- aborting"
79         exit
80 fi
81
82 # Autogenerate lib/configure.m4.
83 if test x$GNUM4 != x ; then
84     echo -n "Building lib/configure ... "
85     rm -f lib/configure
86     $GNUM4 lib/configure.m4 > lib/configure
87     chmod a+x lib/configure
88     echo "done."
89 else
90     echo "No GNU m4. Impossible to build lib/configure -- aborting"
91     exit
92 fi
93
94 echo
95 echo 'run "./configure ; make"'
96 echo