Skip to content

Haiku: fix configure C++ error message with -std=c++11#79

Merged
sezero merged 1 commit intolibxmp:masterfrom
AliceLR:fix-haiku-configure
Feb 20, 2026
Merged

Haiku: fix configure C++ error message with -std=c++11#79
sezero merged 1 commit intolibxmp:masterfrom
AliceLR:fix-haiku-configure

Conversation

@AliceLR
Copy link
Contributor

@AliceLR AliceLR commented Feb 20, 2026

In my current Haiku (R1 beta 5) environment, configure will append -std=c++11 to CXX. The CXX check for BeOS/Haiku uses which "$CXX", which breaks when CXX contains options. I got rid of the quotes and switched it to command -v instead.

This has not been verified on actual BeOS, so if possible, please test that (I'm not aware how to, currently). edit: it's supposed to have Bash, but unclear if it's a version that supports -v?

Closes #78.

In my current Haiku (R1 beta 5) environment, configure will append
-std=c++11 to CXX. The CXX check for BeOS/Haiku uses `which "$CXX"`,
which breaks when CXX contains options. I got rid of the quotes
and switched it to command -v instead.

This has not been verified on actual BeOS.
@AliceLR AliceLR added this to the 4.2.1 milestone Feb 20, 2026
@sezero
Copy link
Collaborator

sezero commented Feb 20, 2026

Is that command thing haiku specific? My linux bash doesn't know anything about it.

Do we have to verify CXX existence, btw? Why not just remove that check? Seems overzealous.

@sezero
Copy link
Collaborator

sezero commented Feb 20, 2026

Is that command thing haiku specific? My linux bash doesn't know anything about it.

Agh, nevermind, seems like I tested wrong. This is OK.

@sezero sezero merged commit 4f533a7 into libxmp:master Feb 20, 2026
1 check passed
@AliceLR
Copy link
Contributor Author

AliceLR commented Feb 20, 2026

Is that command thing haiku specific? My linux bash doesn't know anything about it.

-v for the command utility is POSIX but it was optional in 2004 and only mandatory as of 2008. I assume Bash had it long before that, but who knows... it's still technically more portable than which though (and doesn't get upset about the extra option like which does). 🙂

Do we have to verify CXX existence, btw? Why not just remove that check? Seems overzealous.

We might be able to replace it with AC_LANG(C++) or something, which it looks like I'm going to have put somewhere to detect B_AUDIO_INT anyway (they did not provide actual defines for these in media/MediaDefs.h...). Another odd thing about this driver: xmp is defining its own copies of B_AUDIO_CHAR and B_AUDIO_SHORT (and ignoring B_AUDIO_UCHAR and the libxmp unsigned flag). As far as I can tell, media/MediaDefs.h is supposed to be present in BeOS. I don't understand why it's doing this.

edit: actually, it looks like B_AUDIO_UCHAR and B_AUDIO_INT are from BeOS, so I don't have to do that autoconf modification (B_AUDIO_DOUBLE seems like the only Haiku-specific one). I think AC_LANG(C++) would still be fine though.

@AliceLR AliceLR deleted the fix-haiku-configure branch February 20, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Haiku] configure: error: C++ compiler required on this platform (haiku)

2 participants