|
1 |
| -# $Header: /cvsroot/pgsql/aclocal.m4,v 1.5 2000/08/27 19:00:00 petere Exp $ |
| 1 | +# $Header: /cvsroot/pgsql/aclocal.m4,v 1.6 2000/08/28 11:53:12 petere Exp $ |
2 | 2 | # This comes from the official Autoconf macro archive at
|
3 | 3 | # <http://research.cys.de/autoconf-archive/>
|
4 | 4 | # (I removed the $ before the Id CVS keyword below.)
|
@@ -65,7 +65,7 @@ extern accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_acc
|
65 | 65 | AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG3,$ac_cv_func_accept_arg3)
|
66 | 66 | ])
|
67 | 67 | # Macros to detect C compiler features
|
68 |
| -# $Header: /cvsroot/pgsql/aclocal.m4,v 1.5 2000/08/27 19:00:00 petere Exp $ |
| 68 | +# $Header: /cvsroot/pgsql/aclocal.m4,v 1.6 2000/08/28 11:53:12 petere Exp $ |
69 | 69 |
|
70 | 70 |
|
71 | 71 |
|
@@ -154,7 +154,7 @@ undefine([AC_TYPE_NAME])dnl
|
154 | 154 | undefine([AC_CV_NAME])dnl
|
155 | 155 | ])# PGAC_CHECK_ALIGNOF
|
156 | 156 | # Macros that test various C library quirks
|
157 |
| -# $Header: /cvsroot/pgsql/aclocal.m4,v 1.5 2000/08/27 19:00:00 petere Exp $ |
| 157 | +# $Header: /cvsroot/pgsql/aclocal.m4,v 1.6 2000/08/28 11:53:12 petere Exp $ |
158 | 158 |
|
159 | 159 |
|
160 | 160 | # PGAC_VAR_INT_TIMEZONE
|
|
233 | 233 | HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
|
234 | 234 | AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS
|
235 | 235 | # Macros to detect certain C++ features
|
236 |
| -# $Header: /cvsroot/pgsql/aclocal.m4,v 1.5 2000/08/27 19:00:00 petere Exp $ |
| 236 | +# $Header: /cvsroot/pgsql/aclocal.m4,v 1.6 2000/08/28 11:53:12 petere Exp $ |
237 | 237 |
|
238 | 238 |
|
239 | 239 | # PGAC_CLASS_STRING
|
@@ -299,10 +299,82 @@ AC_LANG_RESTORE])
|
299 | 299 | if test $pgac_cv_cxx_namespace_std = yes ; then
|
300 | 300 | AC_DEFINE(HAVE_NAMESPACE_STD, 1, [Define to 1 if the C++ compiler understands `using namespace std'])
|
301 | 301 | fi])# PGAC_CXX_NAMESPACE_STD
|
| 302 | +# $Header: /cvsroot/pgsql/aclocal.m4,v 1.6 2000/08/28 11:53:12 petere Exp $ |
| 303 | + |
| 304 | + |
| 305 | +# PGAC_PATH_FLEX |
| 306 | +# -------------- |
| 307 | +# Look for Flex, set the output variable FLEX to its path if found. |
| 308 | +# Avoid the buggy version 2.5.3. Also find Flex if its installed |
| 309 | +# under `lex', but do not accept other Lex programs. |
| 310 | + |
| 311 | +AC_DEFUN([PGAC_PATH_FLEX], |
| 312 | +[AC_CACHE_CHECK([for flex], pgac_cv_path_flex, |
| 313 | +[# Let the user override the test |
| 314 | +if test -n "$FLEX"; then |
| 315 | + pgac_cv_path_flex=$FLEX |
| 316 | +else |
| 317 | + pgac_save_IFS=$IFS |
| 318 | + IFS=: |
| 319 | + for pgac_dir in $PATH; do |
| 320 | + if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then |
| 321 | + pgac_dir=`pwd` |
| 322 | + fi |
| 323 | + for pgac_prog in flex lex; do |
| 324 | + pgac_candidate="$pgac_dir/$pgac_prog" |
| 325 | + if test -f "$pgac_candidate" \ |
| 326 | + && $pgac_candidate --version >/dev/null 2>&1 |
| 327 | + then |
| 328 | + echo '%%' > conftest.l |
| 329 | + if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then |
| 330 | + if $pgac_candidate --version | grep '2\.5\.3' >/dev/null 2>&1; then |
| 331 | + pgac_broken_flex=$pgac_candidate |
| 332 | + continue |
| 333 | + fi |
| 334 | +
|
| 335 | + pgac_cv_path_flex=$pgac_candidate |
| 336 | + break 2 |
| 337 | + fi |
| 338 | + fi |
| 339 | + done |
| 340 | + done |
| 341 | + IFS=$pgac_save_IFS |
| 342 | + rm -f conftest.l |
| 343 | + : ${pgac_cv_path_flex=no} |
| 344 | +fi |
| 345 | +])[]dnl AC_CACHE_CHECK |
| 346 | +
|
| 347 | +if test x"$pgac_cv_path_flex" = x"no"; then |
| 348 | + if test -n "$pgac_broken_flex"; then |
| 349 | + AC_MSG_WARN([ |
| 350 | +*** |
| 351 | +The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You |
| 352 | +should get version 2.5.4 or later. |
| 353 | +###]) |
| 354 | + fi |
| 355 | +
|
| 356 | + AC_MSG_WARN([ |
| 357 | +*** |
| 358 | +Without Flex you won't be able to build PostgreSQL from scratch, or change |
| 359 | +any of the scanner definition files. You can obtain Flex from a GNU mirror |
| 360 | +site. (If you are using the official distribution of PostgreSQL then you |
| 361 | +do not need to worry about this because the lexer files are pre-generated.) |
| 362 | +***]) |
| 363 | +fi |
| 364 | +
|
| 365 | +if test x"$pgac_cv_path_flex" = x"no"; then |
| 366 | + FLEX= |
| 367 | +else |
| 368 | + FLEX=$pgac_cv_path_flex |
| 369 | +fi |
| 370 | +
|
| 371 | +AC_SUBST(FLEX) |
| 372 | +AC_SUBST(FLEXFLAGS) |
| 373 | +])# PGAC_PATH_FLEX |
302 | 374 | #
|
303 | 375 | # Autoconf macros for configuring the build of Python extension modules
|
304 | 376 | #
|
305 |
| -# $Header: /cvsroot/pgsql/aclocal.m4,v 1.5 2000/08/27 19:00:00 petere Exp $ |
| 377 | +# $Header: /cvsroot/pgsql/aclocal.m4,v 1.6 2000/08/28 11:53:12 petere Exp $ |
306 | 378 | #
|
307 | 379 |
|
308 | 380 | # PGAC_PROG_PYTHON
|
|
0 commit comments