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
28 AC_INIT([the fast lexical analyser generator], [2.5.35],
29 [flex-help@lists.sourceforge.net], [flex])
30 AC_CONFIG_SRCDIR([scan.l])
31 AM_INIT_AUTOMAKE([gnits dist-bzip2])
32 AC_CONFIG_HEADER([config.h:conf.in])
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 GNU m4 that supports --prefix-builtins
53 AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
55 if test x"$M4" != x; then
56 AC_MSG_CHECKING([for GNU m4])
57 case `$M4 --help < /dev/null 2>&1` in
58 *prefix-builtins*) AC_MSG_RESULT(yes) ;;
59 *) AC_MSG_RESULT(no) ;
60 AC_MSG_ERROR([GNU M4 1.4 is required]) ;;
63 AC_MSG_ERROR([GNU M4 1.4 is required]) ;
66 AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
68 AC_PATH_PROG(INDENT, indent, indent)
69 # if INDENT is set to 'indent' then we didn't find indent
70 if test "$INDENT" != indent ; then
71 AC_MSG_CHECKING(if $INDENT is GNU indent)
72 if $INDENT --version 2>/dev/null | head -n 1|grep "GNU indent" > /dev/null ; then
76 AC_MSG_WARN($INDENT does not appear to be GNU indent.)
79 AC_MSG_WARN(no indent program found: make indent target will not function)
82 # checks for libraries
87 AC_CHECK_HEADERS([inttypes.h libintl.h limits.h locale.h malloc.h netinet/in.h stddef.h stdlib.h string.h strings.h unistd.h])
88 AC_CHECK_LIB(m, log10)
90 # The test test-pthread uses libpthread, so we check for it here, but
91 # all we need is the preprocessor symbol defined since we don't need
92 # LIBS to include libpthread for building flex.
94 AC_CHECK_LIB(pthread, pthread_mutex_lock,
95 AC_DEFINE([HAVE_LIBPTHREAD], 1, [pthread library] ),
96 AC_DEFINE([HAVE_LIBPTHREAD], 0, [pthread library] )
98 AC_CHECK_HEADERS([pthread.h])
100 # Checks for typedefs, structures, and compiler characteristics.
106 # Checks for library functions.
111 AC_CHECK_FUNCS([dup2 isascii memset pow regcomp setlocale strchr strtol])
117 examples/fastwc/Makefile
118 examples/manual/Makefile
123 tests/TEMPLATE/Makefile
124 tests/test-array-nr/Makefile
125 tests/test-array-r/Makefile
126 tests/test-basic-nr/Makefile
127 tests/test-basic-r/Makefile
128 tests/test-bison-yylloc/Makefile
129 tests/test-bison-yylval/Makefile
130 tests/test-c-cpp-nr/Makefile
131 tests/test-c-cpp-r/Makefile
132 tests/test-header-nr/Makefile
133 tests/test-header-r/Makefile
134 tests/test-include-by-buffer/Makefile
135 tests/test-include-by-push/Makefile
136 tests/test-include-by-reentrant/Makefile
137 tests/test-multiple-scanners-nr/Makefile
138 tests/test-multiple-scanners-r/Makefile
139 tests/test-noansi-nr/Makefile
140 tests/test-noansi-r/Makefile
141 tests/test-prefix-nr/Makefile
142 tests/test-prefix-r/Makefile
143 tests/test-pthread/Makefile
144 tests/test-string-nr/Makefile
145 tests/test-string-r/Makefile
146 tests/test-yyextra/Makefile
147 tests/test-alloc-extra/Makefile
148 tests/test-lineno-nr/Makefile
149 tests/test-lineno-r/Makefile
150 tests/test-linedir-r/Makefile
151 tests/test-debug-r/Makefile
152 tests/test-debug-nr/Makefile
153 tests/test-mem-nr/Makefile
154 tests/test-mem-r/Makefile
155 tests/test-posix/Makefile
156 tests/test-posixly-correct/Makefile
157 tests/test-table-opts/Makefile
158 tests/test-c++-basic/Makefile
159 tests/test-bison-nr/Makefile
160 tests/test-reject/Makefile
161 tests/test-c++-multiple-scanners/Makefile
162 tests/test-top/Makefile
163 tests/test-rescan-nr/Makefile
164 tests/test-rescan-r/Makefile
165 tests/test-quotes/Makefile
166 tests/test-ccl/Makefile
167 tests/test-extended/Makefile
168 tests/test-c++-yywrap/Makefile
169 tests/test-concatenated-options/Makefile
170 dnl --new-test-here-- This line is processed by tests/create-test.