Author: Gianluca Guida <glguida@tlbflush.org>
Date: Sun Feb 26 18:40:50 UTC 2017
Parent: d358ce60dbbd70d911b65ded498ea77ea32b15b9
Log message:
configure.ac: requires flex
1: diff --git a/aclocal.m4 b/aclocal.m4
2: index 64872f1..e70ea93 100644
3: --- a/aclocal.m4
4: +++ b/aclocal.m4
5: @@ -268,6 +268,66 @@ s/.* (\{0,1\}\([0-9]*\.[0-9]*\.[0-9]*\))\{0,1\}.*/\1/;p'`
6: ])
7: ])
8:
9: +# ===========================================================================
10: +# http://www.gnu.org/software/autoconf-archive/ax_prog_flex.html
11: +# ===========================================================================
12: +#
13: +# SYNOPSIS
14: +#
15: +# AX_PROG_FLEX(ACTION-IF-TRUE,ACTION-IF-FALSE)
16: +#
17: +# DESCRIPTION
18: +#
19: +# Check whether flex is the scanner generator. Run ACTION-IF-TRUE if
20: +# successful, ACTION-IF-FALSE otherwise
21: +#
22: +# LICENSE
23: +#
24: +# Copyright (c) 2009 Francesco Salvestrini <salvestrini@users.sourceforge.net>
25: +# Copyright (c) 2010 Diego Elio Petteno` <flameeyes@gmail.com>
26: +#
27: +# This program is free software; you can redistribute it and/or modify it
28: +# under the terms of the GNU General Public License as published by the
29: +# Free Software Foundation; either version 2 of the License, or (at your
30: +# option) any later version.
31: +#
32: +# This program is distributed in the hope that it will be useful, but
33: +# WITHOUT ANY WARRANTY; without even the implied warranty of
34: +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
35: +# Public License for more details.
36: +#
37: +# You should have received a copy of the GNU General Public License along
38: +# with this program. If not, see <http://www.gnu.org/licenses/>.
39: +#
40: +# As a special exception, the respective Autoconf Macro's copyright owner
41: +# gives unlimited permission to copy, distribute and modify the configure
42: +# scripts that are the output of Autoconf when processing the Macro. You
43: +# need not follow the terms of the GNU General Public License when using
44: +# or distributing such scripts, even though portions of the text of the
45: +# Macro appear in them. The GNU General Public License (GPL) does govern
46: +# all other use of the material that constitutes the Autoconf Macro.
47: +#
48: +# This special exception to the GPL applies to versions of the Autoconf
49: +# Macro released by the Autoconf Archive. When you make and distribute a
50: +# modified version of the Autoconf Macro, you may extend this special
51: +# exception to the GPL to apply to your modified version as well.
52: +
53: +#serial 12
54: +
55: +AC_DEFUN([AX_PROG_FLEX], [
56: + AC_REQUIRE([AM_PROG_LEX])
57: + AC_REQUIRE([AC_PROG_EGREP])
58: +
59: + AC_CACHE_CHECK([if flex is the lexer generator],[ax_cv_prog_flex],[
60: + AS_IF([$LEX --version 2>/dev/null | $EGREP -qw '^g?flex'],
61: + [ax_cv_prog_flex=yes], [ax_cv_prog_flex=no])
62: + ])
63: + AS_IF([test "$ax_cv_prog_flex" = "yes"],
64: + m4_ifnblank([$1], [[$1]]),
65: + m4_ifnblank([$2], [[$2]])
66: + )
67: +])
68: +
69: # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
70: # serial 1 (pkg-config-0.24)
71: #
72: diff --git a/configure b/configure
73: index 55603f4..f16c84a 100755
74: --- a/configure
75: +++ b/configure
76: @@ -662,7 +662,6 @@ LIBSIGSEGV_PREFIX
77: LTLIBSIGSEGV
78: LIBSIGSEGV
79: HAVE_LIBSIGSEGV
80: -EGREP
81: CPP
82: host_os
83: host_vendor
84: @@ -677,11 +676,12 @@ BDW_GC_CFLAGS
85: PKG_CONFIG_LIBDIR
86: PKG_CONFIG_PATH
87: PKG_CONFIG
88: +YFLAGS
89: +YACC
90: +EGREP
91: LEXLIB
92: LEX_OUTPUT_ROOT
93: LEX
94: -YFLAGS
95: -YACC
96: BISON_VERSION
97: GREP
98: SED
99: @@ -4211,49 +4211,6 @@ $as_echo "$as_me: WARNING: could not find bison" >&2;}
100:
101: fi
102:
103: -for ac_prog in 'bison -y' byacc
104: -do
105: - # Extract the first word of "$ac_prog", so it can be a program name with args.
106: -set dummy $ac_prog; ac_word=$2
107: -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
108: -$as_echo_n "checking for $ac_word... " >&6; }
109: -if ${ac_cv_prog_YACC+:} false; then :
110: - $as_echo_n "(cached) " >&6
111: -else
112: - if test -n "$YACC"; then
113: - ac_cv_prog_YACC="$YACC" # Let the user override the test.
114: -else
115: -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
116: -for as_dir in $PATH
117: -do
118: - IFS=$as_save_IFS
119: - test -z "$as_dir" && as_dir=.
120: - for ac_exec_ext in '' $ac_executable_extensions; do
121: - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
122: - ac_cv_prog_YACC="$ac_prog"
123: - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
124: - break 2
125: - fi
126: -done
127: - done
128: -IFS=$as_save_IFS
129: -
130: -fi
131: -fi
132: -YACC=$ac_cv_prog_YACC
133: -if test -n "$YACC"; then
134: - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
135: -$as_echo "$YACC" >&6; }
136: -else
137: - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
138: -$as_echo "no" >&6; }
139: -fi
140: -
141: -
142: - test -n "$YACC" && break
143: -done
144: -test -n "$YACC" || YACC="yacc"
145: -
146:
147: for ac_prog in flex lex
148: do
149: @@ -4417,6 +4374,145 @@ fi
150: if test "$LEX" = :; then
151: LEX=${am_missing_run}flex
152: fi
153: +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
154: +$as_echo_n "checking for egrep... " >&6; }
155: +if ${ac_cv_path_EGREP+:} false; then :
156: + $as_echo_n "(cached) " >&6
157: +else
158: + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
159: + then ac_cv_path_EGREP="$GREP -E"
160: + else
161: + if test -z "$EGREP"; then
162: + ac_path_EGREP_found=false
163: + # Loop through the user's path and test for each of PROGNAME-LIST
164: + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
165: +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
166: +do
167: + IFS=$as_save_IFS
168: + test -z "$as_dir" && as_dir=.
169: + for ac_prog in egrep; do
170: + for ac_exec_ext in '' $ac_executable_extensions; do
171: + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
172: + as_fn_executable_p "$ac_path_EGREP" || continue
173: +# Check for GNU ac_path_EGREP and select it if it is found.
174: + # Check for GNU $ac_path_EGREP
175: +case `"$ac_path_EGREP" --version 2>&1` in
176: +*GNU*)
177: + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
178: +*)
179: + ac_count=0
180: + $as_echo_n 0123456789 >"conftest.in"
181: + while :
182: + do
183: + cat "conftest.in" "conftest.in" >"conftest.tmp"
184: + mv "conftest.tmp" "conftest.in"
185: + cp "conftest.in" "conftest.nl"
186: + $as_echo 'EGREP' >> "conftest.nl"
187: + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
188: + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
189: + as_fn_arith $ac_count + 1 && ac_count=$as_val
190: + if test $ac_count -gt ${ac_path_EGREP_max-0}; then
191: + # Best one so far, save it but keep looking for a better one
192: + ac_cv_path_EGREP="$ac_path_EGREP"
193: + ac_path_EGREP_max=$ac_count
194: + fi
195: + # 10*(2^10) chars as input seems more than enough
196: + test $ac_count -gt 10 && break
197: + done
198: + rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
199: +esac
200: +
201: + $ac_path_EGREP_found && break 3
202: + done
203: + done
204: + done
205: +IFS=$as_save_IFS
206: + if test -z "$ac_cv_path_EGREP"; then
207: + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
208: + fi
209: +else
210: + ac_cv_path_EGREP=$EGREP
211: +fi
212: +
213: + fi
214: +fi
215: +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
216: +$as_echo "$ac_cv_path_EGREP" >&6; }
217: + EGREP="$ac_cv_path_EGREP"
218: +
219: +
220: +
221: +
222: +
223: +
224: + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if flex is the lexer generator" >&5
225: +$as_echo_n "checking if flex is the lexer generator... " >&6; }
226: +if ${ax_cv_prog_flex+:} false; then :
227: + $as_echo_n "(cached) " >&6
228: +else
229: +
230: + if $LEX --version 2>/dev/null | $EGREP -qw '^g?flex'; then :
231: + ax_cv_prog_flex=yes
232: +else
233: + ax_cv_prog_flex=no
234: +fi
235: +
236: +fi
237: +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_prog_flex" >&5
238: +$as_echo "$ax_cv_prog_flex" >&6; }
239: + if test "$ax_cv_prog_flex" = "yes"; then :
240: +
241: +else
242: + as_fn_error $? "Requires flex" "$LINENO" 5
243: +
244: +fi
245: +
246: +for ac_prog in 'bison -y' byacc
247: +do
248: + # Extract the first word of "$ac_prog", so it can be a program name with args.
249: +set dummy $ac_prog; ac_word=$2
250: +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
251: +$as_echo_n "checking for $ac_word... " >&6; }
252: +if ${ac_cv_prog_YACC+:} false; then :
253: + $as_echo_n "(cached) " >&6
254: +else
255: + if test -n "$YACC"; then
256: + ac_cv_prog_YACC="$YACC" # Let the user override the test.
257: +else
258: +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
259: +for as_dir in $PATH
260: +do
261: + IFS=$as_save_IFS
262: + test -z "$as_dir" && as_dir=.
263: + for ac_exec_ext in '' $ac_executable_extensions; do
264: + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
265: + ac_cv_prog_YACC="$ac_prog"
266: + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
267: + break 2
268: + fi
269: +done
270: + done
271: +IFS=$as_save_IFS
272: +
273: +fi
274: +fi
275: +YACC=$ac_cv_prog_YACC
276: +if test -n "$YACC"; then
277: + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
278: +$as_echo "$YACC" >&6; }
279: +else
280: + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
281: +$as_echo "no" >&6; }
282: +fi
283: +
284: +
285: + test -n "$YACC" && break
286: +done
287: +test -n "$YACC" || YACC="yacc"
288: +
289: +if test "$LEX" = :; then
290: + LEX=${am_missing_run}flex
291: +fi
292:
293: # Checks for libraries.
294:
295: @@ -5008,73 +5104,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
296: ac_compiler_gnu=$ac_cv_c_compiler_gnu
297:
298:
299: -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
300: -$as_echo_n "checking for egrep... " >&6; }
301: -if ${ac_cv_path_EGREP+:} false; then :
302: - $as_echo_n "(cached) " >&6
303: -else
304: - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
305: - then ac_cv_path_EGREP="$GREP -E"
306: - else
307: - if test -z "$EGREP"; then
308: - ac_path_EGREP_found=false
309: - # Loop through the user's path and test for each of PROGNAME-LIST
310: - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
311: -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
312: -do
313: - IFS=$as_save_IFS
314: - test -z "$as_dir" && as_dir=.
315: - for ac_prog in egrep; do
316: - for ac_exec_ext in '' $ac_executable_extensions; do
317: - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
318: - as_fn_executable_p "$ac_path_EGREP" || continue
319: -# Check for GNU ac_path_EGREP and select it if it is found.
320: - # Check for GNU $ac_path_EGREP
321: -case `"$ac_path_EGREP" --version 2>&1` in
322: -*GNU*)
323: - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
324: -*)
325: - ac_count=0
326: - $as_echo_n 0123456789 >"conftest.in"
327: - while :
328: - do
329: - cat "conftest.in" "conftest.in" >"conftest.tmp"
330: - mv "conftest.tmp" "conftest.in"
331: - cp "conftest.in" "conftest.nl"
332: - $as_echo 'EGREP' >> "conftest.nl"
333: - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
334: - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
335: - as_fn_arith $ac_count + 1 && ac_count=$as_val
336: - if test $ac_count -gt ${ac_path_EGREP_max-0}; then
337: - # Best one so far, save it but keep looking for a better one
338: - ac_cv_path_EGREP="$ac_path_EGREP"
339: - ac_path_EGREP_max=$ac_count
340: - fi
341: - # 10*(2^10) chars as input seems more than enough
342: - test $ac_count -gt 10 && break
343: - done
344: - rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
345: -esac
346: -
347: - $ac_path_EGREP_found && break 3
348: - done
349: - done
350: - done
351: -IFS=$as_save_IFS
352: - if test -z "$ac_cv_path_EGREP"; then
353: - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
354: - fi
355: -else
356: - ac_cv_path_EGREP=$EGREP
357: -fi
358: -
359: - fi
360: -fi
361: -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
362: -$as_echo "$ac_cv_path_EGREP" >&6; }
363: - EGREP="$ac_cv_path_EGREP"
364: -
365: -
366:
367:
368: { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
369: diff --git a/configure.ac b/configure.ac
370: index fd3fd4e..a4bfcee 100644
371: --- a/configure.ac
372: +++ b/configure.ac
373: @@ -12,6 +12,7 @@ AC_PROG_CC
374:
375: AC_PATH_PROG([BISON],[bison])
376: AX_PROG_BISON_VERSION([3.0], [], AC_MSG_ERROR([Requires bison 3.0 or later]))
377: +AX_PROG_FLEX([], AC_MSG_ERROR([Requires flex]))
378: AC_PROG_YACC
379: AM_PROG_LEX
380: