xref: /minix3/external/bsd/flex/dist/configure.ac (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc#                                               -*- Autoconf -*-
2*0a6a1f1dSLionel Sambuc# Process this file with autoconf to produce a configure script.
3*0a6a1f1dSLionel Sambuc
4*0a6a1f1dSLionel Sambuc# This file is part of flex.
5*0a6a1f1dSLionel Sambuc
6*0a6a1f1dSLionel Sambuc# Redistribution and use in source and binary forms, with or without
7*0a6a1f1dSLionel Sambuc# modification, are permitted provided that the following conditions
8*0a6a1f1dSLionel Sambuc# are met:
9*0a6a1f1dSLionel Sambuc
10*0a6a1f1dSLionel Sambuc# 1. Redistributions of source code must retain the above copyright
11*0a6a1f1dSLionel Sambuc# notice, this list of conditions and the following disclaimer.
12*0a6a1f1dSLionel Sambuc# 2. Redistributions in binary form must reproduce the above copyright
13*0a6a1f1dSLionel Sambuc# notice, this list of conditions and the following disclaimer in the
14*0a6a1f1dSLionel Sambuc# documentation and/or other materials provided with the distribution.
15*0a6a1f1dSLionel Sambuc
16*0a6a1f1dSLionel Sambuc# Neither the name of the University nor the names of its contributors
17*0a6a1f1dSLionel Sambuc# may be used to endorse or promote products derived from this software
18*0a6a1f1dSLionel Sambuc# without specific prior written permission.
19*0a6a1f1dSLionel Sambuc
20*0a6a1f1dSLionel Sambuc# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
21*0a6a1f1dSLionel Sambuc# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
22*0a6a1f1dSLionel Sambuc# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23*0a6a1f1dSLionel Sambuc# PURPOSE.
24*0a6a1f1dSLionel Sambuc
25*0a6a1f1dSLionel Sambuc# autoconf requirements and initialization
26*0a6a1f1dSLionel Sambuc
27*0a6a1f1dSLionel SambucAC_INIT([the fast lexical analyser generator], [2.5.39],
28*0a6a1f1dSLionel Sambuc[flex-help@lists.sourceforge.net], [flex])
29*0a6a1f1dSLionel SambucSHARED_VERSION_INFO="2:0:0"
30*0a6a1f1dSLionel SambucAC_SUBST(SHARED_VERSION_INFO)
31*0a6a1f1dSLionel Sambuc
32*0a6a1f1dSLionel SambucAC_CONFIG_SRCDIR([scan.l])
33*0a6a1f1dSLionel SambucAM_INIT_AUTOMAKE([gnu check-news std-options dist-bzip2 dist-xz 1.10])
34*0a6a1f1dSLionel SambucAC_CONFIG_HEADER([config.h:conf.in])
35*0a6a1f1dSLionel SambucAC_CONFIG_LIBOBJ_DIR([lib])
36*0a6a1f1dSLionel Sambuc
37*0a6a1f1dSLionel Sambuc# checks for programs
38*0a6a1f1dSLionel Sambuc
39*0a6a1f1dSLionel SambucAM_GNU_GETTEXT([external])
40*0a6a1f1dSLionel SambucAM_GNU_GETTEXT_VERSION([0.18.1])
41*0a6a1f1dSLionel SambucAC_PROG_YACC
42*0a6a1f1dSLionel SambucAM_PROG_LEX
43*0a6a1f1dSLionel SambucAC_PROG_CC
44*0a6a1f1dSLionel SambucAC_PROG_CXX
45*0a6a1f1dSLionel SambucAM_PROG_CC_C_O
46*0a6a1f1dSLionel SambucAC_PROG_LN_S
47*0a6a1f1dSLionel SambucLT_INIT
48*0a6a1f1dSLionel SambucAC_PROG_AWK
49*0a6a1f1dSLionel SambucAC_PROG_INSTALL
50*0a6a1f1dSLionel Sambuc
51*0a6a1f1dSLionel SambucAC_PATH_PROG(BISON, bison,bison)
52*0a6a1f1dSLionel SambucAC_PATH_PROG(HELP2MAN, help2man, help2man)
53*0a6a1f1dSLionel Sambuc
54*0a6a1f1dSLionel Sambuc# Check for a m4 that supports -P
55*0a6a1f1dSLionel Sambuc
56*0a6a1f1dSLionel SambucAC_CACHE_CHECK([for m4 that supports -P], [ac_cv_path_M4],
57*0a6a1f1dSLionel Sambuc[AC_PATH_PROGS_FEATURE_CHECK([M4], [gm4 gnum4 m4],
58*0a6a1f1dSLionel Sambuc              [[m4out=`echo 'm''4_divnum' | $ac_path_M4 -P`]
59*0a6a1f1dSLionel Sambuc                [test "x$m4out" = x0 \
60*0a6a1f1dSLionel Sambuc                && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
61*0a6a1f1dSLionel Sambuc              [AC_MSG_ERROR([could not find m4 that supports -P])])])
62*0a6a1f1dSLionel SambucAC_SUBST([M4], [$ac_cv_path_M4])
63*0a6a1f1dSLionel SambucAC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the m4 executable name.])
64*0a6a1f1dSLionel Sambuc
65*0a6a1f1dSLionel SambucAC_PATH_PROG(INDENT, indent, indent)
66*0a6a1f1dSLionel Sambuc# if INDENT is set to 'indent' then we didn't find indent
67*0a6a1f1dSLionel Sambucif test "$INDENT" != indent ; then
68*0a6a1f1dSLionel Sambuc   AC_MSG_CHECKING(if $INDENT is GNU indent)
69*0a6a1f1dSLionel Sambuc   if $INDENT --version 2>/dev/null | head -n 1|grep "GNU indent" > /dev/null ; then
70*0a6a1f1dSLionel Sambuc      AC_MSG_RESULT(yes)
71*0a6a1f1dSLionel Sambuc   else
72*0a6a1f1dSLionel Sambuc      AC_MSG_RESULT(no)
73*0a6a1f1dSLionel Sambuc      AC_MSG_WARN($INDENT does not appear to be GNU indent.)
74*0a6a1f1dSLionel Sambuc   fi
75*0a6a1f1dSLionel Sambucelse
76*0a6a1f1dSLionel Sambuc   AC_MSG_WARN(no indent program found: make indent target will not function)
77*0a6a1f1dSLionel Sambucfi
78*0a6a1f1dSLionel Sambuc
79*0a6a1f1dSLionel Sambuc# checks for headers
80*0a6a1f1dSLionel Sambuc
81*0a6a1f1dSLionel SambucAC_HEADER_STDC
82*0a6a1f1dSLionel SambucAC_HEADER_SYS_WAIT
83*0a6a1f1dSLionel SambucAC_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])
84*0a6a1f1dSLionel Sambuc
85*0a6a1f1dSLionel Sambuc# checks for libraries
86*0a6a1f1dSLionel Sambuc
87*0a6a1f1dSLionel Sambuc# The test test-pthread uses libpthread, so we check for it here, but
88*0a6a1f1dSLionel Sambuc# all we need is the preprocessor symbol defined since we don't need
89*0a6a1f1dSLionel Sambuc# LIBS to include libpthread for building flex.
90*0a6a1f1dSLionel Sambuc
91*0a6a1f1dSLionel SambucAC_CHECK_LIB(pthread, pthread_mutex_lock,
92*0a6a1f1dSLionel SambucAC_DEFINE([HAVE_LIBPTHREAD], 1, [pthread library] ),
93*0a6a1f1dSLionel SambucAC_DEFINE([HAVE_LIBPTHREAD], 0, [pthread library] )
94*0a6a1f1dSLionel Sambuc)
95*0a6a1f1dSLionel SambucAC_CHECK_HEADERS([pthread.h])
96*0a6a1f1dSLionel Sambuc
97*0a6a1f1dSLionel SambucAC_CHECK_LIB(m, log10)
98*0a6a1f1dSLionel Sambuc
99*0a6a1f1dSLionel Sambuc# Checks for typedefs, structures, and compiler characteristics.
100*0a6a1f1dSLionel Sambuc
101*0a6a1f1dSLionel SambucAC_HEADER_STDBOOL
102*0a6a1f1dSLionel SambucAC_C_CONST
103*0a6a1f1dSLionel SambucAC_TYPE_SIZE_T
104*0a6a1f1dSLionel Sambuc
105*0a6a1f1dSLionel Sambuc# Checks for library functions.
106*0a6a1f1dSLionel Sambuc
107*0a6a1f1dSLionel SambucAC_FUNC_ALLOCA
108*0a6a1f1dSLionel SambucAC_FUNC_FORK
109*0a6a1f1dSLionel SambucAC_FUNC_MALLOC
110*0a6a1f1dSLionel SambucAC_FUNC_REALLOC
111*0a6a1f1dSLionel SambucAC_CHECK_FUNCS([dup2 isascii memset pow regcomp setlocale strchr strtol])
112*0a6a1f1dSLionel Sambuc
113*0a6a1f1dSLionel SambucAC_CONFIG_FILES(
114*0a6a1f1dSLionel SambucMakefile
115*0a6a1f1dSLionel Sambucdoc/Makefile
116*0a6a1f1dSLionel Sambucexamples/Makefile
117*0a6a1f1dSLionel Sambucexamples/fastwc/Makefile
118*0a6a1f1dSLionel Sambucexamples/manual/Makefile
119*0a6a1f1dSLionel Sambuclib/Makefile
120*0a6a1f1dSLionel Sambucpo/Makefile.in
121*0a6a1f1dSLionel Sambuctests/Makefile
122*0a6a1f1dSLionel Sambuctests/TEMPLATE/Makefile
123*0a6a1f1dSLionel Sambuctests/test-array-nr/Makefile
124*0a6a1f1dSLionel Sambuctests/test-array-r/Makefile
125*0a6a1f1dSLionel Sambuctests/test-basic-nr/Makefile
126*0a6a1f1dSLionel Sambuctests/test-basic-r/Makefile
127*0a6a1f1dSLionel Sambuctests/test-bison-yylloc/Makefile
128*0a6a1f1dSLionel Sambuctests/test-bison-yylval/Makefile
129*0a6a1f1dSLionel Sambuctests/test-c-cpp-nr/Makefile
130*0a6a1f1dSLionel Sambuctests/test-c-cpp-r/Makefile
131*0a6a1f1dSLionel Sambuctests/test-header-nr/Makefile
132*0a6a1f1dSLionel Sambuctests/test-header-r/Makefile
133*0a6a1f1dSLionel Sambuctests/test-include-by-buffer/Makefile
134*0a6a1f1dSLionel Sambuctests/test-include-by-push/Makefile
135*0a6a1f1dSLionel Sambuctests/test-include-by-reentrant/Makefile
136*0a6a1f1dSLionel Sambuctests/test-multiple-scanners-nr/Makefile
137*0a6a1f1dSLionel Sambuctests/test-multiple-scanners-r/Makefile
138*0a6a1f1dSLionel Sambuctests/test-noansi-nr/Makefile
139*0a6a1f1dSLionel Sambuctests/test-noansi-r/Makefile
140*0a6a1f1dSLionel Sambuctests/test-prefix-nr/Makefile
141*0a6a1f1dSLionel Sambuctests/test-prefix-r/Makefile
142*0a6a1f1dSLionel Sambuctests/test-pthread/Makefile
143*0a6a1f1dSLionel Sambuctests/test-string-nr/Makefile
144*0a6a1f1dSLionel Sambuctests/test-string-r/Makefile
145*0a6a1f1dSLionel Sambuctests/test-yyextra/Makefile
146*0a6a1f1dSLionel Sambuctests/test-alloc-extra/Makefile
147*0a6a1f1dSLionel Sambuctests/test-lineno-nr/Makefile
148*0a6a1f1dSLionel Sambuctests/test-lineno-trailing/Makefile
149*0a6a1f1dSLionel Sambuctests/test-lineno-r/Makefile
150*0a6a1f1dSLionel Sambuctests/test-linedir-r/Makefile
151*0a6a1f1dSLionel Sambuctests/test-debug-r/Makefile
152*0a6a1f1dSLionel Sambuctests/test-debug-nr/Makefile
153*0a6a1f1dSLionel Sambuctests/test-mem-nr/Makefile
154*0a6a1f1dSLionel Sambuctests/test-mem-r/Makefile
155*0a6a1f1dSLionel Sambuctests/test-posix/Makefile
156*0a6a1f1dSLionel Sambuctests/test-posixly-correct/Makefile
157*0a6a1f1dSLionel Sambuctests/test-table-opts/Makefile
158*0a6a1f1dSLionel Sambuctests/test-c++-basic/Makefile
159*0a6a1f1dSLionel Sambuctests/test-bison-nr/Makefile
160*0a6a1f1dSLionel Sambuctests/test-reject/Makefile
161*0a6a1f1dSLionel Sambuctests/test-c++-multiple-scanners/Makefile
162*0a6a1f1dSLionel Sambuctests/test-top/Makefile
163*0a6a1f1dSLionel Sambuctests/test-rescan-nr/Makefile
164*0a6a1f1dSLionel Sambuctests/test-rescan-r/Makefile
165*0a6a1f1dSLionel Sambuctests/test-quotes/Makefile
166*0a6a1f1dSLionel Sambuctests/test-ccl/Makefile
167*0a6a1f1dSLionel Sambuctests/test-extended/Makefile
168*0a6a1f1dSLionel Sambuctests/test-c++-yywrap/Makefile
169*0a6a1f1dSLionel Sambuctests/test-concatenated-options/Makefile
170*0a6a1f1dSLionel Sambucdnl --new-test-here-- This line is processed by tests/create-test.
171*0a6a1f1dSLionel Sambuc)
172*0a6a1f1dSLionel Sambuc
173*0a6a1f1dSLionel SambucAC_OUTPUT
174