comparison configure.in @ 8623:53fb843ca498

configure.in (REGEX_LIBS): undo part of previous change
author John W. Eaton <jwe@octave.org>
date Wed, 28 Jan 2009 21:08:53 -0500
parents f1534e248260
children bef8f001032f
comparison
equal deleted inserted replaced
8622:640b5d25ac19 8623:53fb843ca498
455 PCRE_HAS_MACROS_WE_NEED 455 PCRE_HAS_MACROS_WE_NEED
456 #endif], ac_cv_pcre_h_macros_present=yes, ac_cv_pcre_h_macros_present=no)]) 456 #endif], ac_cv_pcre_h_macros_present=yes, ac_cv_pcre_h_macros_present=no)])
457 WITH_PCRE="$ac_cv_pcre_h_macros_present" 457 WITH_PCRE="$ac_cv_pcre_h_macros_present"
458 458
459 REGEX_LIBS= 459 REGEX_LIBS=
460
460 using_pcre=no 461 using_pcre=no
461 using_regex=no 462 using_regex=no
463
462 if test "$WITH_PCRE" = yes; then 464 if test "$WITH_PCRE" = yes; then
463 if test "$WITH_PCRE_CONFIG" = yes; then 465 if test "$WITH_PCRE_CONFIG" = yes; then
464 REGEX_LIBS=$(pcre-config --libs) 466 REGEX_LIBS=$(pcre-config --libs)
465 else 467 else
466 REGEX_LIBS=-lpcre 468 REGEX_LIBS=-lpcre
476 else 478 else
477 warn_pcre="PCRE library not found. This will result in some loss of functionality for the regular expression matching functions." 479 warn_pcre="PCRE library not found. This will result in some loss of functionality for the regular expression matching functions."
478 AC_MSG_WARN($warn_pcre) 480 AC_MSG_WARN($warn_pcre)
479 fi 481 fi
480 482
481 if test "$using_pcre" = no; then 483 AC_CHECK_FUNCS(regexec, [using_regex=yes], [
482 AC_CHECK_FUNCS(regexec, [using_regex=yes], [ 484 AC_CHECK_LIB(regex, regexec, [using_regex=yes
483 AC_CHECK_LIB(regex, regexec, [using_regex=yes 485 REGEX_LIBS="-lregex $REGEX_LIBS"], [
484 REGEX_LIBS="-lregex"], [
485 warn_regex="regular expression functions not found. The regular expression matching functions will be disabled." 486 warn_regex="regular expression functions not found. The regular expression matching functions will be disabled."
486 AC_MSG_WARN($warn_regex)])]) 487 AC_MSG_WARN($warn_regex)])])
487 if test "$using_regex" = yes; then 488
488 AC_DEFINE(HAVE_REGEX, 1, [Define if regex library is available.]) 489 if test "$using_regex" = yes; then
489 fi 490 AC_DEFINE(HAVE_REGEX, 1, [Define if regex library is available.])
490 fi 491 fi
492
491 AC_SUBST(REGEX_LIBS) 493 AC_SUBST(REGEX_LIBS)
492 494
493 ### Check for ZLIB library. 495 ### Check for ZLIB library.
494 496
495 WITH_ZLIB=true 497 WITH_ZLIB=true