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
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 )
65 echo "autoconf not found -- aborting"
69 # Autogenerate lib/configure.m4.
70 if test x$GNUM4 != x ; then
71 echo -n "Building lib/configure ... "
73 $GNUM4 lib/configure.m4 > lib/configure
74 chmod a+x lib/configure
77 echo "No GNU m4. Impossible to build lib/configure -- aborting"
81 echo -n "Creating POTFILES.in... "
84 # This file is automatically generated by autogen.sh. This command was
85 # used to extract the files from the sources:
87 # grep -E "_\(\".*\"\)" \`find src -name \*.[hHC]\` | \\
88 # awk 'BEGIN {FS= ":"} {print $1}' | sort | uniq
90 # This must be done when standing in lyx/
92 # This is all the files that contains internationalization strings.
96 grep -E "_\(\".*\"\)" `find src -name \*.[hHC]` | \
97 awk 'BEGIN {FS= ":"} {print $1}' | sort -f -d | uniq >> tmppot
98 mv tmppot po/POTFILES.in
102 echo 'run "./configure ; make"'