--enable-dev is passed to configure.
svn path=/trunk/yasm/; revision=184
# $IdPath$
+PERL_VERSION=5.004
+
AC_INIT(src/main.c)
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(yasm, 0.0.1)
AC_ARG_ENABLE(dev,
-[ --enable-dev Use standard development FLAGS settings],
+[ --enable-dev Enable full development build capability],
[case "${enableval}" in
yes) dev=true ;;
no) dev=false ;;
ALL_LINGUAS=""
AM_GNU_GETTEXT
-AM_PROG_LEX
-AC_PROG_YACC
+# Needed tools for building lexers and parsers from original source.
+# Only needed for development: generated .c's are included with distributions.
+if ${dev}; then
+ AM_PROG_LEX
+ AC_PROG_YACC
+
+ # Check for Perl (gen_instr.pl and the like)
+ AC_PATH_PROGS(PERL, $PERL perl5 perl)
+ if test -z "$PERL" || test "$PERL" = ":"; then
+ AC_MSG_ERROR([perl not found in \$PATH])
+ fi
+
+ AC_MSG_CHECKING([for minimum required perl version >= $PERL_VERSION])
+ _perl_version=`PERL_VERSION=$PERL_VERSION $PERL -e 'print "$]"; if ($] >= $ENV{PERL_VERSION}) { exit(0); } else { exit(1); }' 2>&5`
+ _perl_res=$?
+ AC_MSG_RESULT([$_perl_version])
+
+ if test "$_perl_res" != 0; then
+ AC_MSG_ERROR([Perl $PERL_VERSION or higher is required.])
+ fi
+
+ # Check for groff (for rendering manpages)
+ AC_PATH_PROGS(GROFF, $GROFF groff)
+ if test -z "$PERL" || test "$PERL" = ":"; then
+ AC_MSG_ERROR([groff not found in \$PATH])
+ fi
+fi
+
AC_PROG_INSTALL
AC_PROG_RANLIB
# $IdPath$
+PERL_VERSION=5.004
+
AC_INIT(src/main.c)
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(yasm, 0.0.1)
AC_ARG_ENABLE(dev,
-[ --enable-dev Use standard development FLAGS settings],
+[ --enable-dev Enable full development build capability],
[case "${enableval}" in
yes) dev=true ;;
no) dev=false ;;
ALL_LINGUAS=""
AM_GNU_GETTEXT
-AM_PROG_LEX
-AC_PROG_YACC
+# Needed tools for building lexers and parsers from original source.
+# Only needed for development: generated .c's are included with distributions.
+if ${dev}; then
+ AM_PROG_LEX
+ AC_PROG_YACC
+
+ # Check for Perl (gen_instr.pl and the like)
+ AC_PATH_PROGS(PERL, $PERL perl5 perl)
+ if test -z "$PERL" || test "$PERL" = ":"; then
+ AC_MSG_ERROR([perl not found in \$PATH])
+ fi
+
+ AC_MSG_CHECKING([for minimum required perl version >= $PERL_VERSION])
+ _perl_version=`PERL_VERSION=$PERL_VERSION $PERL -e 'print "$]"; if ($] >= $ENV{PERL_VERSION}) { exit(0); } else { exit(1); }' 2>&5`
+ _perl_res=$?
+ AC_MSG_RESULT([$_perl_version])
+
+ if test "$_perl_res" != 0; then
+ AC_MSG_ERROR([Perl $PERL_VERSION or higher is required.])
+ fi
+
+ # Check for groff (for rendering manpages)
+ AC_PATH_PROGS(GROFF, $GROFF groff)
+ if test -z "$PERL" || test "$PERL" = ":"; then
+ AC_MSG_ERROR([groff not found in \$PATH])
+ fi
+fi
+
AC_PROG_INSTALL
AC_PROG_RANLIB
EXTRA_DIST = queue.3
queue.html: queue.3
- groff -mmandoc -Thtml queue.3 >queue.html
+ $(GROFF) -mmandoc -Thtml queue.3 >queue.html
queue.ps: queue.3
- groff -mmandoc -Tps queue.3 >queue.ps
+ $(GROFF) -mmandoc -Tps queue.3 >queue.ps
noinst_LIBRARIES = libparser.a
+if DEV
libparser_a_SOURCES = \
parser.c \
bison.y \
token.l
+else
+libparser_a_SOURCES = \
+ parser.c \
+ bison.c \
+ token.c
+
+bison.c: bison.y
+ @echo "Run configure with --enable-dev before making changes here."
+ @exit 1
+
+token.c: token.l
+ @echo "Run configure with --enable-dev before making changes here."
+ @exit 1
+endif
noinst_SCRIPTS = gen_instr.pl
endif
token.l bison.y: $(top_srcdir)/src/instrs.dat token.l.in bison.y.in gen_instr.pl
+if DEV
$(PERL) gen_instr.pl -i $(top_srcdir)/src/instrs.dat -t token.l -g bison.y
+else
+ @echo "Run configure with --enable-dev before making changes here."
+ @exit 1
+endif
BUILT_SOURCES = token.l bison.y
noinst_LIBRARIES = libparser.a
+if DEV
libparser_a_SOURCES = \
parser.c \
bison.y \
token.l
+else
+libparser_a_SOURCES = \
+ parser.c \
+ bison.c \
+ token.c
+
+bison.c: bison.y
+ @echo "Run configure with --enable-dev before making changes here."
+ @exit 1
+
+token.c: token.l
+ @echo "Run configure with --enable-dev before making changes here."
+ @exit 1
+endif
noinst_SCRIPTS = gen_instr.pl
endif
token.l bison.y: $(top_srcdir)/src/instrs.dat token.l.in bison.y.in gen_instr.pl
+if DEV
$(PERL) gen_instr.pl -i $(top_srcdir)/src/instrs.dat -t token.l -g bison.y
+else
+ @echo "Run configure with --enable-dev before making changes here."
+ @exit 1
+endif
BUILT_SOURCES = token.l bison.y