[PATCH] Make the configure.in look more like an autoconf script.
Diego 'Flameeyes' Pettenò
flamee... at gmail.com
Wed Oct 1 15:06:14 UTC 2008
---
configure.in | 61 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 31 insertions(+), 30 deletions(-)
diff --git a/configure.in b/configure.in
index 0b9fa44..df70e9c 100644
--- a/configure.in
+++ b/configure.in
@@ -18,7 +18,8 @@ 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/main.cpp, 6.3)
+AC_PREREQ([2.60])
+AC_INIT(ragel, 6.3)
AC_CONFIG_HEADER(common/config.h)
AM_INIT_AUTOMAKE([1.10 foreign])
@@ -46,36 +47,16 @@ AC_LANG_CPLUSPLUS
dnl Check for definition of MAKE.
AC_PROG_MAKE_SET
-if test $enable_parsers = yes; then
+AS_IF([test "x$enable_parsres" = "xyes"], [
+ AC_CHECK_PROG(RAGEL, ragel, ragel)
+ AS_IF([test -z "$RAGEL"], [AC_MSG_ERROR([ragel is required to build the parsers])])
-dnl Check for Ragel
-AC_CHECK_PROG(RAGEL, ragel, ragel)
-if test -z "$RAGEL"; then
- echo
- echo "error: ragel is required to build the parsers"
- echo
- exit 1
-fi
-
-dnl Check for gperf
-AC_CHECK_PROG(GPERF, gperf, gperf)
-if test -z "$GPERF"; then
- echo
- echo "error: gperf is required to build the parsers"
- echo
- exit 1
-fi
-
-dnl Check for Kelbt
-AC_CHECK_PROG(KELBT, kelbt, kelbt)
-if test -z "$KELBT"; then
- echo
- echo "error: kelbt is required to build the parsers"
- echo
- exit 1
-fi
+ AC_CHECK_PROG(GPERF, gperf, gperf)
+ AS_IF([test -z "$GPERF"], [AC_MSG_ERROR([gperf is required to build the parsers])])
-fi # BUILD_PARSERS
+ AC_CHECK_PROG(KELBT, kelbt, kelbt)
+ AS_IF([test -z "$KELBT"], [AC_MSG_ERROR([kelbt is required to build the parsers])])
+])
dnl Check for the D compiler
AC_CHECK_PROG(GDC, gdc, gdc)
@@ -113,6 +94,26 @@ AC_CHECK_PROG(GMCS, gmcs, gmcs)
AC_SUBST(GMCS)
dnl write output files
-AC_OUTPUT(Makefile common/Makefile ragel/Makefile redfsm/Makefile rlgen-cd/Makefile rlgen-java/Makefile rlgen-ruby/Makefile rlgen-dot/Makefile rlgen-csharp/Makefile doc/Makefile test/Makefile examples/Makefile test/runtests doc/ragel.1 doc/rlgen-cd.1 doc/rlgen-java.1 doc/rlgen-ruby.1 doc/rlgen-dot.1 doc/version.tex)
+AC_OUTPUT([
+ Makefile
+ common/Makefile
+ doc/Makefile
+ doc/ragel.1
+ doc/rlgen-cd.1
+ doc/rlgen-dot.1
+ doc/rlgen-java.1
+ doc/rlgen-ruby.1
+ doc/version.tex
+ examples/Makefile
+ ragel/Makefile
+ redfsm/Makefile
+ rlgen-cd/Makefile
+ rlgen-csharp/Makefile
+ rlgen-dot/Makefile
+ rlgen-java/Makefile
+ rlgen-ruby/Makefile
+ test/Makefile
+ test/runtests
+])
echo "configuration of ragel complete"
More information about the ragel-users
mailing list