tizen 2.3.1 release
[external/ragel.git] / configure.in
index 9e1c05b..e00e89c 100644 (file)
@@ -18,21 +18,25 @@ dnl   You should have received a copy of the GNU General Public License
 dnl   along with Ragel; if not, write to the Free Software
 dnl   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
   
-AC_INIT(ragel, 6.5)
-PUBDATE="May 2009"
+AC_INIT(ragel, 6.6)
+PUBDATE="Dec 2009"
 
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([foreign])
 AC_SUBST(PUBDATE)
 AC_CONFIG_HEADER(ragel/config.h)
 
+dnl Choose defaults for the build_parsers and build_manual vars. If the dist
+dnl file is present in the root then default to no, otherwise go for it.
+AC_CHECK_FILES( $srcdir/DIST, 
+       [ . $srcdir/DIST; ], 
+       [ build_parsers=yes; build_manual=yes; ] )
+
 dnl Set to true if the build system should generate parsers from ragel and kelbt
 dnl sources. Set to false if generated files are included and not to be built
 dnl (production).
-build_parsers=yes;
 AM_CONDITIONAL(BUILD_PARSERS, [test "x$build_parsers" = "xyes"])
 
 dnl Set to true if the manual should be built.
-build_manual=yes;
 AM_CONDITIONAL(BUILD_MANUAL, [test "x$build_manual" = "xyes"])
 
 dnl Checks for programs.
@@ -41,15 +45,18 @@ AC_PROG_CXX
 AC_CHECK_TOOL(AR, ar)
 AC_PROG_RANLIB
 
+# Default flags.
+CXXFLAGS="-g"
+
 dnl Set test on c++ compiler.
 AC_LANG_CPLUSPLUS
 
 dnl Check for definition of MAKE.
 AC_PROG_MAKE_SET
 
+# Checks to carry out if we are building parsers.
 if test "x$build_parsers" = "xyes"; then
 
-dnl Check for Ragel
 AC_CHECK_PROG(RAGEL, ragel, ragel)
 if test -z "$RAGEL"; then
        echo
@@ -58,7 +65,6 @@ if test -z "$RAGEL"; then
        exit 1
 fi
 
-dnl Check for Kelbt
 AC_CHECK_PROG(KELBT, kelbt, kelbt)
 if test -z "$KELBT"; then
        echo
@@ -67,7 +73,28 @@ if test -z "$KELBT"; then
        exit 1
 fi
 
-fi # BUILD_PARSERS
+fi 
+
+# Checks to carry out if we are building the manual.
+if test "x$build_manual" = "xyes"; then
+
+AC_CHECK_PROG(FIG2DEV, fig2dev, fig2dev)
+if test -z "$FIG2DEV"; then
+       echo
+       echo "error: fig2dev is required to build the manual"
+       echo
+       exit 1
+fi
+
+AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex)
+if test -z "$PDFLATEX"; then
+       echo
+       echo "error: pdflatex is required to build the manual"
+       echo
+       exit 1
+fi
+
+fi
 
 dnl Check for the D compiler
 AC_CHECK_PROG(GDC, gdc, gdc)
@@ -105,6 +132,7 @@ AC_OUTPUT(
                doc/Makefile doc/ragel.1
                contrib/Makefile
                test/Makefile test/runtests
+               examples/Makefile
        ],
        [chmod +x test/runtests]
 )