5 AUTOMAKE="automake -a -c --foreign"
9 echo -n "Locating GNU m4..."
10 for prog in $M4 gm4 gnum4 m4 ; do
11 case `$prog --version 2>&1` in
13 GNUM4=`type -path $prog`
19 if test x$ok = xno ; then
23 # Generate acinclude.m4
24 echo -n "Generate acinclude.m4..."
27 for fil in config/lyxinclude.m4 config/libtool.m4 config/gettext.m4 config/lcmessage.m4 config/progtest.m4 ; do
28 cat $fil >> acinclude.m4
32 # Generate the Makefiles and configure files
33 if ( aclocal --version ) </dev/null > /dev/null 2>&1; then
34 echo -n "Building macros..."
35 $ACLOCAL ; (cd lib/reLyX; $ACLOCAL )
38 echo "aclocal not found -- aborting"
42 if ( autoheader --version ) </dev/null > /dev/null 2>&1; then
43 echo -n "Building config header template..."
47 echo "autoheader not found -- aborting"
51 if ( $AUTOMAKE --version ) </dev/null > /dev/null 2>&1; then
52 echo -n "Building Makefile templates..."
53 $AUTOMAKE ; (cd lib/reLyX ; $AUTOMAKE )
56 echo "automake not found -- aborting"
60 if ( $AUTOCONF --version ) </dev/null > /dev/null 2>&1; then
61 echo -n "Building configure..."
62 $AUTOCONF ; ( cd lib/reLyX ; $AUTOCONF )
64 echo 'run "./configure ; make"'
66 echo "autoconf not found -- aborting"
70 # Autogenerate lib/configure.m4.
71 if test x$GNUM4 != x ; then
72 echo -n "Building lib/configure ..."
74 $GNUM4 lib/configure.m4 > lib/configure
75 chmod a+x lib/configure
78 echo "No GNU m4. Impossible to build lib/configure -- aborting"
82 echo -n "Creating POTFILES.in..."
85 # This file is automatically generated by autogen.sh. This command was
86 # used to extract the files from the sources:
88 # grep -E "_\(\".*\"\)" \`find src -name \*.[hHC]\` | \\
89 # awk 'BEGIN {FS= ":"} {print $1}' | sort | uniq
91 # This must be done when standing in lyx/
93 # This is all the files that contains internationalization strings.
97 grep -E "_\(\".*\"\)" `find src -name \*.[hHC]` | \
98 awk 'BEGIN {FS= ":"} {print $1}' | sort -f -d | uniq >> tmppot
99 mv tmppot po/POTFILES.in