Re: fixing AC_OPENMP for Apple clang
Dima Pasechnik <[email protected]> Sat, 4 Apr 2026 11:09:59 -0500
| Newsgroups | gmane.comp.sysutils.autoconf.general |
|---|---|
| Message-ID | <adE31zdVn1wFxfn9@tarski> |
--jU74UlaEHlhum6K/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 04, 2026 at 10:18:59AM -0400, Zack Weinberg wrote: > On Sat, Apr 4, 2026, at 12:07 AM, Dima Pasechnik wrote: > > What I am confused about is that there seems to be no way in the current > > AC_OPENMP to tell whether the call was a success. Note that there is > > case in the macro where no flags are needed. Then the test may succeed, > > or may fail. > ... > > Only by reading the macro code, or by doing a trial run and looking at > > config.log, one can conclude that to test for failure > > (say, with current language C) > > one has to test ac_cv_prog_c_openmp for being equal to 'unsupported'. > > > > Should the manual be more clear on this? >=20 > Yes, this should be clarified. However, the reason it's not documented r= ight now is that it was assumed the rest of the configure script *wouldn't = need to know* whether OpenMP support is actually available or not. That in= formation is available to the *program* by checking whether the preprocesso= r macro `_OPENMP` is defined, and the people who wrote AC_OPENMP originally= (before my time) assumed that was good enough. Some legacy code we have uses GNU gengetopt to set up options for an interactive code at configure time, by filling an .ggo.in template, so it needs to know whether to emable an OpenMP-related option or not. Testing $ac_cv_prog_c_openmp is the most natural thing to do in this case, it seems. Dima --jU74UlaEHlhum6K/ Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQFPBAABCAA5FiEEJVdDnfI7raAa4RJxoksLHjfJBTEFAmnRN9QbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyAAoJEKJLCx43yQUxla4IAMS4sCutS5fjbn5wNmIX VJqPiRiACJYspNW5wnJzH9c6tBwaNEL5T4YRZfgXrWZiCSKgplt7m8xlr4iWsZLZ 54KpFay0/M/0aukLLXSnEKXLctXB4cuozJh+j0zThVxEmpxyolgh+GlDkXSr/A1q Nu5wy7btpcVLbQ/rjX/bJIe1xwrp+7DRDV187vphvg0Hhypy62THwZ7lJm3wkLVK 0gRlzeaNBtgBGW6TIy7ydcNOpcZbl7A/jr7GMubhWQiCtWhDhjXQu18NDKEoOBKH o9nBu3gy3PrfqNAibs4Stfhd5NZhJtRqer4Q1D1MZxZMwxH5Pw+J33m0jUWmaeSM K4k= =jboj -----END PGP SIGNATURE----- --jU74UlaEHlhum6K/--