Mercurial > octave-dspies
comparison configure.in @ 7169:f83b2ca41b05
[project @ 2007-11-13 17:17:38 by jwe]
author | jwe |
---|---|
date | Tue, 13 Nov 2007 17:17:38 +0000 |
parents | 6ca57492b26e |
children | ff2ff2c09865 |
comparison
equal
deleted
inserted
replaced
7168:f345eb60f941 | 7169:f83b2ca41b05 |
---|---|
27 | 27 |
28 EXTERN_CFLAGS="$CFLAGS" | 28 EXTERN_CFLAGS="$CFLAGS" |
29 EXTERN_CXXFLAGS="$CXXFLAGS" | 29 EXTERN_CXXFLAGS="$CXXFLAGS" |
30 | 30 |
31 AC_INIT | 31 AC_INIT |
32 AC_REVISION($Revision: 1.592 $) | 32 AC_REVISION($Revision: 1.593 $) |
33 AC_PREREQ(2.57) | 33 AC_PREREQ(2.57) |
34 AC_CONFIG_SRCDIR([src/octave.cc]) | 34 AC_CONFIG_SRCDIR([src/octave.cc]) |
35 AC_CONFIG_HEADER(config.h) | 35 AC_CONFIG_HEADER(config.h) |
36 | 36 |
37 OCTAVE_HOST_TYPE | 37 OCTAVE_HOST_TYPE |
421 fi | 421 fi |
422 | 422 |
423 AC_SUBST(TEXINFO_QHULL) | 423 AC_SUBST(TEXINFO_QHULL) |
424 | 424 |
425 ### Check for pcre/regex library. | 425 ### Check for pcre/regex library. |
426 AC_SUBST(REGEX_LIBS) | 426 WITH_PCRE=no |
427 WITH_PCRE_CONFIG=no | 427 REGEX_LIBS= |
428 AC_CHECK_HEADERS([pcre/pcre.h pcre.h], WITH_PCRE=yes, WITH_PCRE=no) | 428 AC_CHECK_LIB(pcre, pcre_compile, [ |
429 if test $WITH_PCRE = no ; then | 429 m4_foreach_w([hdr], [pcre/pcre.h pcre.h], |
430 AC_CHECK_PROG(WITH_PCRE_CONFIG, pcre-config, yes, no) | 430 [AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([hdr])), |
431 if test $WITH_PCRE_CONFIG = yes ; then | 431 [Define to 1 if you have the <]m4_defn([hdr])[> |
432 WITH_PCRE=yes | 432 header file, and it defines PCRE_INFO_NAMECOUNT, |
433 fi | 433 PCRE_INFO_NAMEENTRYSIZE, and PCRE_INFO_NAMETABLE.])]) |
434 fi | 434 for hdr in pcre/pcre.h pcre.h; do |
435 AC_CACHE_CHECK([whether pcre.h has the macros we need], | 435 AC_MSG_CHECKING([whether $hdr defines the macros we need]) |
436 [ac_cv_pcre_h_macros_present], | 436 AC_EGREP_CPP([PCRE_HAS_MACROS_WE_NEED], [ |
437 [AC_EGREP_CPP([PCRE_HAS_MACROS_WE_NEED], [ | 437 #include <$hdr> |
438 #include <pcre.h> | |
439 #if defined (PCRE_INFO_NAMECOUNT) \ | 438 #if defined (PCRE_INFO_NAMECOUNT) \ |
440 && defined (PCRE_INFO_NAMEENTRYSIZE) \ | 439 && defined (PCRE_INFO_NAMEENTRYSIZE) \ |
441 && defined (PCRE_INFO_NAMETABLE) | 440 && defined (PCRE_INFO_NAMETABLE) |
442 PCRE_HAS_MACROS_WE_NEED | 441 PCRE_HAS_MACROS_WE_NEED |
443 #endif], ac_cv_pcre_h_macros_present=yes, ac_cv_pcre_h_macros_present=no)]) | 442 #endif], [ |
444 WITH_PCRE="$ac_cv_pcre_h_macros_present" | 443 dnl We check the header after the egrep to avoid defining HAVE_X_H macros |
445 if test $WITH_PCRE = yes ; then | 444 dnl for headers that we can't use. |
446 AC_CHECK_LIB(pcre, pcre_compile, WITH_PCRE=yes, WITH_PCRE=no) | 445 AC_MSG_RESULT([yes]) |
447 if test $WITH_PCRE = yes ; then | 446 AC_CHECK_HEADER($hdr, [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$hdr), 1)]) |
448 AC_DEFINE(HAVE_PCRE, 1, [Define if PCRE is available.]) | 447 AC_DEFINE(HAVE_PCRE, 1, [Define if PCRE is available.]) |
449 if test $WITH_PCRE_CONFIG = yes ; then | 448 WITH_PCRE=yes |
450 REGEX_LIBS=`pcre-config --cflags --libs` | 449 REGEX_LIBS=-lpcre |
451 else | 450 break |
452 REGEX_LIBS="-lpcre" | 451 ], [AC_MSG_RESULT([no])]) |
453 fi | 452 done |
454 fi | 453 ]) |
455 fi | 454 |
456 if test $WITH_PCRE = no; then | 455 if test $WITH_PCRE = no; then |
457 warn_pcre="PCRE library not found. This will result in some loss of functionality for the regular expression matching functions." | 456 warn_pcre="PCRE library not found. This will result in some loss of functionality for the regular expression matching functions." |
458 AC_MSG_WARN($warn_pcre) | 457 AC_MSG_WARN($warn_pcre) |
459 fi | 458 fi |
459 | |
460 AC_CHECK_FUNCS(regexec, WITH_REGEX=yes , [ | 460 AC_CHECK_FUNCS(regexec, WITH_REGEX=yes , [ |
461 AC_CHECK_LIB(regex, regexec, WITH_REGEX=yes, WITH_REGEX=no)]) | 461 AC_CHECK_LIB(regex, regexec, WITH_REGEX=yes, WITH_REGEX=no)]) |
462 if test $WITH_REGEX = yes ; then | 462 if test $WITH_REGEX = yes ; then |
463 AC_DEFINE(HAVE_REGEX, 1, [Define if regex is available.]) | 463 AC_DEFINE(HAVE_REGEX, 1, [Define if regex is available.]) |
464 if test $WITH_PCRE = no ; then | 464 if test $WITH_PCRE = no ; then |
468 fi | 468 fi |
469 if test $WITH_REGEX = no; then | 469 if test $WITH_REGEX = no; then |
470 warn_regex="regular expression functions not found. The regular expression matching functions will be disabled." | 470 warn_regex="regular expression functions not found. The regular expression matching functions will be disabled." |
471 AC_MSG_WARN($warn_regex) | 471 AC_MSG_WARN($warn_regex) |
472 fi | 472 fi |
473 AC_SUBST(REGEX_LIBS) | |
473 | 474 |
474 ### Check for ZLIB library. | 475 ### Check for ZLIB library. |
475 | 476 |
476 WITH_ZLIB=true | 477 WITH_ZLIB=true |
477 AC_ARG_WITH(zlib, | 478 AC_ARG_WITH(zlib, |