[sr #111341] Macro Expansion Fails if Within AX_PTHREAD

Khalid Masum <[email protected]> Thu, 20 Nov 2025 01:47:17 -0500 (EST)
Newsgroups gmane.comp.sysutils.autoconf.bugs
Message-ID <[email protected]>
Follow-up Comment #1, sr #111341 (group autoconf):


[comment #0 original submission:]
> What works:
> 
> ```
> #configure.ac
> AC_INIT([helloworld], [0.1], [[email protected]])
> AC_MSG_NOTICE([Testing Notify])
> AC_OUTPUT
> ```
> 
> What does not work:
> 
> ```
> #configure.ac
> AC_INIT([helloworld], [0.1], [[email protected]])
> AX_PTHREAD([],[AC_MSG_NOTICE([AC_PACKAGE_NAME Needs POSIX Threads
> (pthread)])])
> AC_OUTPUT
> ```
> 
> Error:
> 
> ```
> AC_INIT([helloworld], [0.1], [[email protected]])
> AX_PTHREAD([],[AC_MSG_NOTICE([AC_PACKAGE_NAME Needs POSIX Threads
> (pthread)])])
> AC_OUTPUT
> ```

Sorry, the error message is:

```
configure.ac:2: error: undefined or overquoted macro: AC_MSG_NOTICE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:2: error: undefined or overquoted macro: AC_PACKAGE_NAME

```

By the way even with AC_PACKAGE_NAME removed from inside AC_MSG_NOTICE this
error persists.
> 
> Happens with `AC_MSG_ERROR` as well.
> 
> Tested on current master:
> 
> ```
> commit: cf8b90f6ff221a59a4c625b6f6c41b84c14ee1b9
> Support for the Algol 68 language
> ```
> 
> Tested on a Debian chroot (debootstrap) runing on Fedora host on x86_64
> 
> ```
> OS: Debian GNU/Linux 13 (trixie) x86_64
> Kernel: Linux 6.17.7-200.fc42.x86_64
> ```


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?111341>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaR65dQAKCRCqLAuaBUf3
TrBUAP4kcECZ5S3e8Ppe/INwQ9A49HXaYgzvD3QNj5bHY1T3xAEAqc9rYfGGtZwv
h0OWKh9iS9z4a8cvooXWlWqm13Lh9Ak=
=VXKd
-----END PGP SIGNATURE-----