2 # Process this file with autoconf to produce a configure script.
4 # This file is part of flex.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
10 # 1. Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
12 # 2. Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in the
14 # documentation and/or other materials provided with the distribution.
16 # Neither the name of the University nor the names of its contributors
17 # may be used to endorse or promote products derived from this software
18 # without specific prior written permission.
20 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
21 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
22 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25 # autoconf requirements and initialization
27 AC_INIT([the fast lexical analyser generator], [2.5.37],
28 [flex-help@lists.sourceforge.net], [flex])
29 AC_CONFIG_SRCDIR([scan.l])
30 AM_INIT_AUTOMAKE([gnits dist-bzip2 1.10])
31 AC_CONFIG_HEADER([config.h:conf.in])
32 AC_CONFIG_LIBOBJ_DIR([lib])
36 AM_GNU_GETTEXT([external])
37 AM_GNU_GETTEXT_VERSION(0.12)
48 AC_PATH_PROG(BISON, bison,bison)
49 AC_PATH_PROG(HELP2MAN, help2man, help2man)
51 # Check for a m4 that supports -P
53 AC_CACHE_CHECK([for m4 that supports -P], [ac_cv_path_M4],
54 [AC_PATH_PROGS_FEATURE_CHECK([M4], [gm4 gnum4 m4],
55 [[m4out=`echo 'm''4_divnum' | $ac_path_M4 -P`]
56 [test "x$m4out" = x0 \
57 && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
58 [AC_MSG_ERROR([could not find m4 that supports -P])])])
59 AC_SUBST([M4], [$ac_cv_path_M4])
60 AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the m4 executable name.])
62 AC_PATH_PROG(INDENT, indent, indent)
63 # if INDENT is set to 'indent' then we didn't find indent
64 if test "$INDENT" != indent ; then
65 AC_MSG_CHECKING(if $INDENT is GNU indent)
66 if $INDENT --version 2>/dev/null | head -n 1|grep "GNU indent" > /dev/null ; then
70 AC_MSG_WARN($INDENT does not appear to be GNU indent.)
73 AC_MSG_WARN(no indent program found: make indent target will not function)
80 AC_CHECK_HEADERS([inttypes.h libintl.h limits.h locale.h malloc.h netinet/in.h regex.h stddef.h stdlib.h string.h strings.h unistd.h])
82 # checks for libraries
84 # The test test-pthread uses libpthread, so we check for it here, but
85 # all we need is the preprocessor symbol defined since we don't need
86 # LIBS to include libpthread for building flex.
88 AC_CHECK_LIB(pthread, pthread_mutex_lock,
89 AC_DEFINE([HAVE_LIBPTHREAD], 1, [pthread library] ),
90 AC_DEFINE([HAVE_LIBPTHREAD], 0, [pthread library] )
92 AC_CHECK_HEADERS([pthread.h])
94 AC_CHECK_LIB(m, log10)
96 # Checks for typedefs, structures, and compiler characteristics.
102 # Checks for library functions.
108 AC_CHECK_FUNCS([dup2 isascii memset pow regcomp setlocale strchr strtol])
114 examples/fastwc/Makefile
115 examples/manual/Makefile
120 tests/TEMPLATE/Makefile
121 tests/test-array-nr/Makefile
122 tests/test-array-r/Makefile
123 tests/test-basic-nr/Makefile
124 tests/test-basic-r/Makefile
125 tests/test-bison-yylloc/Makefile
126 tests/test-bison-yylval/Makefile
127 tests/test-c-cpp-nr/Makefile
128 tests/test-c-cpp-r/Makefile
129 tests/test-header-nr/Makefile
130 tests/test-header-r/Makefile
131 tests/test-include-by-buffer/Makefile
132 tests/test-include-by-push/Makefile
133 tests/test-include-by-reentrant/Makefile
134 tests/test-multiple-scanners-nr/Makefile
135 tests/test-multiple-scanners-r/Makefile
136 tests/test-noansi-nr/Makefile
137 tests/test-noansi-r/Makefile
138 tests/test-prefix-nr/Makefile
139 tests/test-prefix-r/Makefile
140 tests/test-pthread/Makefile
141 tests/test-string-nr/Makefile
142 tests/test-string-r/Makefile
143 tests/test-yyextra/Makefile
144 tests/test-alloc-extra/Makefile
145 tests/test-lineno-nr/Makefile
146 tests/test-lineno-r/Makefile
147 tests/test-linedir-r/Makefile
148 tests/test-debug-r/Makefile
149 tests/test-debug-nr/Makefile
150 tests/test-mem-nr/Makefile
151 tests/test-mem-r/Makefile
152 tests/test-posix/Makefile
153 tests/test-posixly-correct/Makefile
154 tests/test-table-opts/Makefile
155 tests/test-c++-basic/Makefile
156 tests/test-bison-nr/Makefile
157 tests/test-reject/Makefile
158 tests/test-c++-multiple-scanners/Makefile
159 tests/test-top/Makefile
160 tests/test-rescan-nr/Makefile
161 tests/test-rescan-r/Makefile
162 tests/test-quotes/Makefile
163 tests/test-ccl/Makefile
164 tests/test-extended/Makefile
165 tests/test-c++-yywrap/Makefile
166 tests/test-concatenated-options/Makefile
167 dnl --new-test-here-- This line is processed by tests/create-test.