patchGNU Autoconf Archive - Patches: patch #9900, New AX_CHECK_PCRE2

 
 

patch #9900: New AX_CHECK_PCRE2

Submitter:  None
Submitted:  Mon 02 Mar 2020 08:29:18 PM UTC
   
 
Priority:  5 - Normal Status:  Done
Assigned to:  None Originator Email:  -email is unavailable-
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 07 Jun 2021 07:14:29 PM UTC, comment #4: 


comment #3:

> Added to the archive in 1ce158d78a281e7be9bf495c0b5f1d193142a130. Thank you very much for the submission.


Thank you! Today I ran into a very strange problem, which I do not understand. This problem may not be necessarily related to the AX_CHECK_PCRE2 submission. I just don't know why this happens even after years of using autoconf.

My configure.ac has:

AX_CHECK_PCRE2([8],
[],
[echo "sorry, PCRE2 is not usable"]
)

Then running autoheader produces a config.h.in with the PCRE2 entry. Nice.

But with this minor change:

AX_CHECK_PCRE2([8],
[echo "using PCRE2"],
[echo "sorry, PCRE2 is not usable"]
)

running autoheader does NOT add a PCRE2 entry to config.h.in. This means that all builds fail after autoconf and when the user executes ./configure.

I've looked into this, but can't figure out what is going on with autoheader. Perhaps other users will run into this bug with autoheader or with AX_CHECK_PCRE2.

- Robert

Anonymous
Fri 19 Feb 2021 10:58:31 AM UTC, comment #3: 

Added to the archive in 1ce158d78a281e7be9bf495c0b5f1d193142a130. Thank you very much for the submission.

Peter Simons <simons>
Group administrator
Tue 03 Mar 2020 01:13:08 AM UTC, comment #2: 

Sure, it makes sense to add an option to specify 8, 16, and/or 32 bit character support. Attached is an updated version with option 'bits'. We need at least 8-bit support, which is always present in the library anyways. The 'bits' option may contain 8, 16, and/or 32 to specify one or more bit widths. When this option is empty, 8-bit character support is assumed.

(file #48538)

Anonymous
Mon 02 Mar 2020 08:49:17 PM UTC, comment #1: 

Can we have an optional argument to check for the 16 and/or 32 libs also, please?
They are often required for wchar systems.

Reini Urban <reini_urban>
Mon 02 Mar 2020 08:29:18 PM UTC, original submission:  

New autoconf check to find the PCRE2 pcre2.h header and libpcre2-8 library files. AX_CHECK_PCRE2([action-if-found], [action-if-not-found]) sets HAVE_PCRE2 to 1 if both are found on the usual paths /usr/local /usr /opt/local /sw or on the user-specified path with option --with-pcre2=DIR. If both header file and library are found, shell commands 'action-if-found' is run. If 'action-if-found' is not specified, the default action appends '-I${PCRE2_HOME}/include' to CPFLAGS, appends '-L$PCRE2_HOME}/lib' to LDFLAGS, prepends '-lpcre2-8' to LIBS, and calls AC_DEFINE(HAVE_PCRE2). You should use autoheader to include a definition for this symbol in a config.h file. Sample usage in a C/C++ source is as follows:

     #ifdef HAVE_PCRE2
     #define PCRE2_CODE_UNIT_WIDTH 8
     #include <pcre2.h>
     #endif /* HAVE_PCRE2 */

This covers the most common uses of PCRE2.

If either the header file (pcre2.h) or the library (libpcre2-8) is not  found, shell commands 'action-if-not-found' is run. If 'action-if-not-found' is not specified, the configuration exits on error, asking for a valid PCRE2 installation directory or --without-pcre2.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #48538:  ax_check_pcre2.m4 added by None (6KiB - application/octet-stream)
file #48537:  ax_check_pcre2.m4 added by None (5KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by simons (Posted a comment)
  • -email is unavailable- added by reini_urban (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-02-19 simons StatusNone Done
        Open/ClosedOpen Closed
    2020-03-03 None Attached File- Added ax_check_pcre2.m4, #48538
    2020-03-02 None Attached File- Added ax_check_pcre2.m4, #48537

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code