etc/services - sync with NetBSD-8
[minix.git] / external / bsd / flex / dist / configure.ac
blob871082fbe2ebca49ff2d05b9fafc795564ae1984
1 #                                               -*- Autoconf -*-
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
8 # are met:
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
23 # PURPOSE.
25 # autoconf requirements and initialization
27 AC_INIT([the fast lexical analyser generator], [2.5.39],
28 [flex-help@lists.sourceforge.net], [flex])
29 SHARED_VERSION_INFO="2:0:0"
30 AC_SUBST(SHARED_VERSION_INFO)
32 AC_CONFIG_SRCDIR([scan.l])
33 AM_INIT_AUTOMAKE([gnu check-news std-options dist-bzip2 dist-xz 1.10])
34 AC_CONFIG_HEADER([config.h:conf.in])
35 AC_CONFIG_LIBOBJ_DIR([lib])
37 # checks for programs
39 AM_GNU_GETTEXT([external])
40 AM_GNU_GETTEXT_VERSION([0.18.1])
41 AC_PROG_YACC
42 AM_PROG_LEX
43 AC_PROG_CC
44 AC_PROG_CXX
45 AM_PROG_CC_C_O
46 AC_PROG_LN_S
47 LT_INIT
48 AC_PROG_AWK
49 AC_PROG_INSTALL
51 AC_PATH_PROG(BISON, bison,bison)
52 AC_PATH_PROG(HELP2MAN, help2man, help2man)
54 # Check for a m4 that supports -P
56 AC_CACHE_CHECK([for m4 that supports -P], [ac_cv_path_M4],
57 [AC_PATH_PROGS_FEATURE_CHECK([M4], [gm4 gnum4 m4],
58               [[m4out=`echo 'm''4_divnum' | $ac_path_M4 -P`]
59                 [test "x$m4out" = x0 \
60                 && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
61               [AC_MSG_ERROR([could not find m4 that supports -P])])])
62 AC_SUBST([M4], [$ac_cv_path_M4])
63 AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the m4 executable name.])
65 AC_PATH_PROG(INDENT, indent, indent)
66 # if INDENT is set to 'indent' then we didn't find indent
67 if test "$INDENT" != indent ; then
68    AC_MSG_CHECKING(if $INDENT is GNU indent)
69    if $INDENT --version 2>/dev/null | head -n 1|grep "GNU indent" > /dev/null ; then
70       AC_MSG_RESULT(yes)
71    else
72       AC_MSG_RESULT(no)
73       AC_MSG_WARN($INDENT does not appear to be GNU indent.)
74    fi
75 else
76    AC_MSG_WARN(no indent program found: make indent target will not function)
79 # checks for headers
81 AC_HEADER_STDC
82 AC_HEADER_SYS_WAIT
83 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])
85 # checks for libraries
87 # The test test-pthread uses libpthread, so we check for it here, but
88 # all we need is the preprocessor symbol defined since we don't need
89 # LIBS to include libpthread for building flex.
91 AC_CHECK_LIB(pthread, pthread_mutex_lock,
92 AC_DEFINE([HAVE_LIBPTHREAD], 1, [pthread library] ),
93 AC_DEFINE([HAVE_LIBPTHREAD], 0, [pthread library] )
95 AC_CHECK_HEADERS([pthread.h])
97 AC_CHECK_LIB(m, log10)
99 # Checks for typedefs, structures, and compiler characteristics.
101 AC_HEADER_STDBOOL
102 AC_C_CONST
103 AC_TYPE_SIZE_T
105 # Checks for library functions.
107 AC_FUNC_ALLOCA
108 AC_FUNC_FORK
109 AC_FUNC_MALLOC
110 AC_FUNC_REALLOC
111 AC_CHECK_FUNCS([dup2 isascii memset pow regcomp setlocale strchr strtol])
113 AC_CONFIG_FILES(
114 Makefile
115 doc/Makefile
116 examples/Makefile
117 examples/fastwc/Makefile
118 examples/manual/Makefile
119 lib/Makefile
120 po/Makefile.in
121 tests/Makefile
122 tests/TEMPLATE/Makefile
123 tests/test-array-nr/Makefile
124 tests/test-array-r/Makefile
125 tests/test-basic-nr/Makefile
126 tests/test-basic-r/Makefile
127 tests/test-bison-yylloc/Makefile
128 tests/test-bison-yylval/Makefile
129 tests/test-c-cpp-nr/Makefile
130 tests/test-c-cpp-r/Makefile
131 tests/test-header-nr/Makefile
132 tests/test-header-r/Makefile
133 tests/test-include-by-buffer/Makefile
134 tests/test-include-by-push/Makefile
135 tests/test-include-by-reentrant/Makefile
136 tests/test-multiple-scanners-nr/Makefile
137 tests/test-multiple-scanners-r/Makefile
138 tests/test-noansi-nr/Makefile
139 tests/test-noansi-r/Makefile
140 tests/test-prefix-nr/Makefile
141 tests/test-prefix-r/Makefile
142 tests/test-pthread/Makefile
143 tests/test-string-nr/Makefile
144 tests/test-string-r/Makefile
145 tests/test-yyextra/Makefile
146 tests/test-alloc-extra/Makefile
147 tests/test-lineno-nr/Makefile
148 tests/test-lineno-trailing/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.
173 AC_OUTPUT