Browse Source

[autotools]: make sure pkg-config m4 is available in autoconf, check for ragel in ./configure

personal/stbuehler/wip
Stefan Bühler 11 years ago
parent
commit
7a67ba94d7
  1. 7
      configure.ac
  2. 2
      src/angel/Makefile.am
  3. 2
      src/common/Makefile.am
  4. 10
      src/main/Makefile.am

7
configure.ac

@ -18,10 +18,17 @@ AC_PROG_MAKE_SET
AC_PROG_INSTALL
# AC_PROG_RANLIB
AC_PATH_PROG([RAGEL], [ragel], [
AC_MSG_ERROR([ragel not found])
])
AC_SUBST([RAGEL])
dnl libtool
AC_DISABLE_STATIC
AC_ENABLE_SHARED
m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal([pkg-config not installed])])
LT_INIT
# Checks for header files.

2
src/angel/Makefile.am

@ -16,7 +16,7 @@ lighttpd_angel_shared_src= \
BUILT_SOURCES=angel_config_parser.c
angel_config_parser.c: angel_config_parser.rl
ragel -C -T1 -o $@ $<
$(RAGEL) -C -T1 -o $@ $<
EXTRA_DIST=angel_config_parser.rl

2
src/common/Makefile.am

@ -23,7 +23,7 @@ common_src= \
BUILT_SOURCES=ip_parsers.c
ip_parsers.c: ip_parsers.rl
ragel -C -T1 -o $@ $<
$(RAGEL) -C -T1 -o $@ $<
EXTRA_DIST=ip_parsers.rl

10
src/main/Makefile.am

@ -73,15 +73,15 @@ EXTRA_liblighttpd2_shared_la_SOURCES=$(lua_src) profiler.c
BUILT_SOURCES=config_parser.c http_range_parser.c http_request_parser.c http_response_parser.c url_parser.c
config_parser.c: config_parser.rl
ragel -C -T0 -o $@ $<
$(RAGEL) -C -T0 -o $@ $<
http_range_parser.c: http_range_parser.rl
ragel -C -T1 -o $@ $<
$(RAGEL) -C -T1 -o $@ $<
http_request_parser.c: http_request_parser.rl
ragel -C -T1 -o $@ $<
$(RAGEL) -C -T1 -o $@ $<
http_response_parser.c: http_response_parser.rl
ragel -C -T1 -o $@ $<
$(RAGEL) -C -T1 -o $@ $<
url_parser.c: url_parser.rl
ragel -C -T1 -o $@ $<
$(RAGEL) -C -T1 -o $@ $<
EXTRA_DIST=config_parser.rl http_range_parser.rl http_request_parser.rl http_response_parser.rl url_parser.rl

Loading…
Cancel
Save