From 0bfe054e0e93cf0c0a19f63eb2cfb6b4afd88ef7 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Fri, 3 Jul 2015 15:52:18 -0400 Subject: Initial commit of the regex matcher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wrap glibc’s regex engine to allow matching and group capture in POSIX extended regular expressions. It might be worth rewriting this in terms of the C++11 regex engine; it’s more featureful and more pleasant to use, although it would require more casting. (C can’t represent the std::regex type, so I’d need to use some void pointers.) --- configure.ac | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 configure.ac (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..a9c1c74 --- /dev/null +++ b/configure.ac @@ -0,0 +1,48 @@ +# Copyright 2015 the Massachusetts Institute of Technology +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + +AC_INIT([urweb-regex], [1.0.0], [bbaren@mit.edu]) +AM_INIT_AUTOMAKE([no-dist-gzip dist-xz foreign subdir-objects]) +LT_INIT + +AC_CONFIG_MACRO_DIR([m4]) + +AC_CONFIG_SRCDIR([config.h.in]) +AC_CONFIG_HEADERS([config.h]) + +AC_PROG_CXX([clang++]) +AX_CXX_COMPILE_STDCXX_11([noext], [mandatory]) + +AC_CHECK_HEADERS([regex.h], + [], + [AC_MSG_FAILURE([a POSIX-compatible regex.h is required])]) + +AC_CHECK_HEADERS([urweb/urweb_cpp.h], + [], + [AC_MSG_FAILURE([Ur/Web headers are required])]) +save_LIBS=$LIBS +LIBS="$LIBS -lurweb" +AC_LINK_IFELSE([AC_LANG_CALL( + [int uw_init_client_data; + int uw_copy_client_data; + int uw_global_custom; + int uw_do_expunge; + int uw_post_expunge; + int uw_free_client_data;], + [uw_error])], + [], + [AC_MSG_FAILURE([could not link with -lurweb])]) +LIBS=$save_LIBS + +AC_OUTPUT([Makefile]) -- cgit v1.2.3