4 AUTOHEADER="autoheader"
5 AUTOMAKE="automake -a -c --foreign"
8 # Discover what version of autoconf we are using.
9 autoversion=`$AUTOCONF --version | head -n 1`
11 echo "Using $autoversion"
14 cp config/acconfig.h .
15 cp config/configure.in .
17 cp config/relyx_configure.in lib/reLyX/configure.in
18 rm -f lib/reLyX/configure.ac
23 cp config/configure.ac .
24 rm -f lib/reLyX/configure.in
25 cp config/relyx_configure.ac lib/reLyX/configure.ac
28 echo "This autoconf version is not supported by LyX."
29 echo "LyX only supports autoconf 2.13 and 2.53."
35 ACINCLUDE_FILES="lyxinclude.m4 libtool.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4 xforms.m4 qt.m4 gtk--.m4 gnome--.m4 gnome.m4 pspell.m4 pkg.m4"
36 SIGCPP_ACINCLUDE_FILES="libtool.m4"
38 echo -n "Locating GNU m4... "
40 for prog in $M4 gm4 gnum4 m4; do
41 # continue if $prog generates error (e.g. does not exist)
42 ( $prog --version ) < /dev/null > /dev/null 2>&1
43 if test $? -ne 0 ; then continue; fi
45 # /dev/null input prevents a hang of the script for some m4 compilers (e.g. on FreeBSD)
46 case `$prog --version < /dev/null 2>&1` in
51 if test x$GNUM4 = x ; then
58 # Generate acinclude.m4
59 echo -n "Generate acinclude.m4... "
61 (cd config ; cat ${ACINCLUDE_FILES} >../acinclude.m4)
64 # Generate the Makefiles and configure files
65 if ( $ACLOCAL --version ) < /dev/null > /dev/null 2>&1; then
66 echo "Building macros..."
67 for dir in . lib/reLyX ; do
69 ( cd $dir ; $ACLOCAL )
73 echo "aclocal not found -- aborting"
77 if ( $AUTOHEADER --version ) < /dev/null > /dev/null 2>&1; then
78 echo "Building config header template..."
81 ( cd $dir ; $AUTOHEADER )
85 echo "autoheader not found -- aborting"
89 if ( $AUTOMAKE --version ) < /dev/null > /dev/null 2>&1; then
90 echo "Building Makefile templates..."
91 for dir in . lib/reLyX ; do
93 ( cd $dir ; $AUTOMAKE )
97 echo "automake not found -- aborting"
101 if ( $AUTOCONF --version ) < /dev/null > /dev/null 2>&1; then
102 echo "Building configure..."
103 for dir in . lib/reLyX ; do
105 ( cd $dir ; $AUTOCONF )
109 echo "autoconf not found -- aborting"
113 # Autogenerate lib/configure.m4.
114 echo -n "Building lib/configure ... "
116 $GNUM4 lib/configure.m4 > lib/configure
117 chmod a+x lib/configure
121 echo 'run "./configure ; make"'