| 1 | dnl Process this file with autoconf to produce a configure script. | 
|---|
| 2 |  | 
|---|
| 3 | dnl This file is part of flex. | 
|---|
| 4 |  | 
|---|
| 5 | dnl Redistribution and use in source and binary forms, with or without | 
|---|
| 6 | dnl modification, are permitted provided that the following conditions | 
|---|
| 7 | dnl are met: | 
|---|
| 8 |  | 
|---|
| 9 | dnl 1. Redistributions of source code must retain the above copyright | 
|---|
| 10 | dnl notice, this list of conditions and the following disclaimer. | 
|---|
| 11 | dnl 2. Redistributions in binary form must reproduce the above copyright | 
|---|
| 12 | dnl notice, this list of conditions and the following disclaimer in the | 
|---|
| 13 | dnl documentation and/or other materials provided with the distribution. | 
|---|
| 14 |  | 
|---|
| 15 | dnl Neither the name of the University nor the names of its contributors | 
|---|
| 16 | dnl may be used to endorse or promote products derived from this software | 
|---|
| 17 | dnl without specific prior written permission. | 
|---|
| 18 |  | 
|---|
| 19 | dnl THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | 
|---|
| 20 | dnl IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | 
|---|
| 21 | dnl WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 
|---|
| 22 | dnl PURPOSE. | 
|---|
| 23 |  | 
|---|
| 24 | dnl autoconf requirements and initialization | 
|---|
| 25 |  | 
|---|
| 26 | AC_PREREQ(2.54) | 
|---|
| 27 | AC_INIT(flex,2.5.33,flex-help@lists.sourceforge.net) | 
|---|
| 28 | AC_CONFIG_SRCDIR(scan.l) | 
|---|
| 29 | AM_INIT_AUTOMAKE | 
|---|
| 30 | AC_CONFIG_HEADER(config.h:conf.in) | 
|---|
| 31 |  | 
|---|
| 32 | dnl checks for programs | 
|---|
| 33 |  | 
|---|
| 34 | AM_GNU_GETTEXT([external]) | 
|---|
| 35 | AM_GNU_GETTEXT_VERSION(0.12) | 
|---|
| 36 |  | 
|---|
| 37 | AC_PROG_YACC | 
|---|
| 38 | AM_PROG_LEX | 
|---|
| 39 | AC_PROG_CC | 
|---|
| 40 | AC_PROG_CXX | 
|---|
| 41 | AC_PROG_LN_S | 
|---|
| 42 | AC_PROG_RANLIB | 
|---|
| 43 |  | 
|---|
| 44 | AC_PATH_PROG(BISON, bison,bison) | 
|---|
| 45 | AC_PATH_PROG(HELP2MAN, help2man, help2man) | 
|---|
| 46 |  | 
|---|
| 47 |  | 
|---|
| 48 | # Check for a GNU m4 that supports --prefix-builtins | 
|---|
| 49 | AC_PATH_PROGS(M4, gm4 gnum4 m4, m4) | 
|---|
| 50 | if test x"$M4" != x; then | 
|---|
| 51 | AC_MSG_CHECKING([for GNU m4]) | 
|---|
| 52 | case `$M4 --help < /dev/null 2>&1` in | 
|---|
| 53 | *prefix-builtins*) AC_MSG_RESULT(yes) ;; | 
|---|
| 54 | *) AC_MSG_RESULT(no) ; | 
|---|
| 55 | AC_MSG_ERROR([GNU M4 1.4 is required]) ;; | 
|---|
| 56 | esac | 
|---|
| 57 | else | 
|---|
| 58 | AC_MSG_ERROR([GNU M4 1.4 is required]) ; | 
|---|
| 59 | fi | 
|---|
| 60 | AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.]) | 
|---|
| 61 |  | 
|---|
| 62 | AC_PATH_PROG(INDENT, indent, indent) | 
|---|
| 63 | dnl 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 | 
|---|
| 67 | AC_MSG_RESULT(yes) | 
|---|
| 68 | else | 
|---|
| 69 | AC_MSG_RESULT(no) | 
|---|
| 70 | AC_MSG_WARN($INDENT does not appear to be GNU indent.) | 
|---|
| 71 | fi | 
|---|
| 72 | else | 
|---|
| 73 | AC_MSG_WARN(no indent program found: make indent target will not function) | 
|---|
| 74 | fi | 
|---|
| 75 |  | 
|---|
| 76 | dnl checks for libraries | 
|---|
| 77 | AC_CHECK_LIB(m, log) | 
|---|
| 78 |  | 
|---|
| 79 | dnl checks for header files | 
|---|
| 80 |  | 
|---|
| 81 | AC_HEADER_STDC | 
|---|
| 82 | AC_CHECK_HEADERS(unistd.h stdbool.h  netinet/in.h limits.h) | 
|---|
| 83 | AC_CHECK_HEADERS( sys/wait.h sys/params.h) | 
|---|
| 84 | AC_CHECK_HEADERS(cunistd) | 
|---|
| 85 | AC_CHECK_HEADERS(locale.h libintl.h) | 
|---|
| 86 | AC_CHECK_HEADERS(regex.h) | 
|---|
| 87 |  | 
|---|
| 88 | dnl checks for types | 
|---|
| 89 |  | 
|---|
| 90 | AC_TYPE_SIZE_T | 
|---|
| 91 |  | 
|---|
| 92 | dnl checks for functions | 
|---|
| 93 |  | 
|---|
| 94 | AC_CHECK_DECLS(__func__) | 
|---|
| 95 |  | 
|---|
| 96 | AC_CONFIG_FILES( | 
|---|
| 97 | flex.spec | 
|---|
| 98 | Makefile | 
|---|
| 99 | doc/Makefile | 
|---|
| 100 | examples/Makefile | 
|---|
| 101 | examples/fastwc/Makefile | 
|---|
| 102 | examples/manual/Makefile | 
|---|
| 103 | m4/Makefile | 
|---|
| 104 | po/Makefile.in | 
|---|
| 105 | tools/Makefile | 
|---|
| 106 | tests/Makefile | 
|---|
| 107 | tests/TEMPLATE/Makefile | 
|---|
| 108 | tests/test-array-nr/Makefile | 
|---|
| 109 | tests/test-array-r/Makefile | 
|---|
| 110 | tests/test-basic-nr/Makefile | 
|---|
| 111 | tests/test-basic-r/Makefile | 
|---|
| 112 | tests/test-bison-yylloc/Makefile | 
|---|
| 113 | tests/test-bison-yylval/Makefile | 
|---|
| 114 | tests/test-c-cpp-nr/Makefile | 
|---|
| 115 | tests/test-c-cpp-r/Makefile | 
|---|
| 116 | tests/test-header-nr/Makefile | 
|---|
| 117 | tests/test-header-r/Makefile | 
|---|
| 118 | tests/test-include-by-buffer/Makefile | 
|---|
| 119 | tests/test-include-by-push/Makefile | 
|---|
| 120 | tests/test-include-by-reentrant/Makefile | 
|---|
| 121 | tests/test-multiple-scanners-nr/Makefile | 
|---|
| 122 | tests/test-multiple-scanners-r/Makefile | 
|---|
| 123 | tests/test-noansi-nr/Makefile | 
|---|
| 124 | tests/test-noansi-r/Makefile | 
|---|
| 125 | tests/test-prefix-nr/Makefile | 
|---|
| 126 | tests/test-prefix-r/Makefile | 
|---|
| 127 | tests/test-pthread/Makefile | 
|---|
| 128 | tests/test-string-nr/Makefile | 
|---|
| 129 | tests/test-string-r/Makefile | 
|---|
| 130 | tests/test-yyextra/Makefile | 
|---|
| 131 | tests/test-lineno-nr/Makefile | 
|---|
| 132 | tests/test-lineno-r/Makefile | 
|---|
| 133 | tests/test-linedir-r/Makefile | 
|---|
| 134 | tests/test-debug-r/Makefile | 
|---|
| 135 | tests/test-debug-nr/Makefile | 
|---|
| 136 | tests/test-mem-nr/Makefile | 
|---|
| 137 | tests/test-mem-r/Makefile | 
|---|
| 138 | tests/test-posix/Makefile | 
|---|
| 139 | tests/test-posixly-correct/Makefile | 
|---|
| 140 | tests/test-table-opts/Makefile | 
|---|
| 141 | tests/test-c++-basic/Makefile | 
|---|
| 142 | tests/test-bison-nr/Makefile | 
|---|
| 143 | tests/test-reject/Makefile | 
|---|
| 144 | tests/test-c++-multiple-scanners/Makefile | 
|---|
| 145 | tests/test-top/Makefile | 
|---|
| 146 | tests/test-rescan-nr/Makefile | 
|---|
| 147 | tests/test-rescan-r/Makefile | 
|---|
| 148 | dnl --new-test-here-- This line is processed by tests/create-test. | 
|---|
| 149 | ) | 
|---|
| 150 |  | 
|---|
| 151 | AC_OUTPUT | 
|---|