git/list[1] front-page[2] threads[3] people[4] search[5] about
 

autoconf changes

From
Ben Walton <bwalton@artsci.utoronto.ca>
Date
Mar 12, 2009, 19:20 UTC
Message-ID
<1236885612-22575-1-git-send-email-bwalton@artsci.utoronto.ca>
Hi All,

I discovered recently (when building 1.6.2 on solaris 8 sparc) that the autoconf detection for POSIX Threads wasn't quite adequate for my needs. This is partly due to gcc only warning on invalid flags in some cases (-pthread on solaris 8 sparc) but still exiting cleanly.

When I got looking at things, I found several items that I don't think are quite right. For example, any of the --with- options that take a path argument didn't actually use the value supplied when testing for features in a library. If the user didn't also set a good CPPFLAGS/LDFLAGS (which they should, but that's beside the point), things like the deflateUnbound zlib function might be ignored even when present.

I decided to dig in and modify the configure.ac file fairly heavily. What I've put together in the forthcoming patch set does the following:

1. Handles user arguments early in the configure script and makes the
   values that get set in config.mak.autogen available in the rest of
   the script (I find those names nicer that $with_...).  These
   settings now make it into config.log too.
2. Use the values supplied to wrap tests with a modified CPP/LD FLAGS
   pair when applicable.
3. Fixed the asciidoc test to better handle python 2.6 (I haven't
   tested with 2.4, but the change is quite simple and shouldn't be a
   problem [as someone else mentioned recently: famous last words]).
4. Allows the user to pass in compiler flags to enable POSIX Threads
   which will override the default pair of tests.
5. Tries to maintain the original actions and intents where possible.

I've tested this on solaris 8 and Linux (Ubuntu 9.04) and it seems to do all the things I'd expect.

I hope you'll find these to be useful changes.

Thanks -Ben

Next: Ben Walton
Message 1 of 8 in “autoconf changes”
  1. Ben WaltonMar 12, 2009
  2. configure: ensure settings from user are also usable in the scriptBen Walton, Mar 12, 2009
  3. configure: reorganize flow of argument checksBen Walton, Mar 12, 2009
  4. configure: add macros to stash FLAG variablesBen Walton, Mar 12, 2009
  5. configure: wrap some library tests with GIT_STASH_FLAGSBen Walton, Mar 12, 2009
  6. configure: asciidoc version test cleanupBen Walton, Mar 12, 2009
  7. configure: make iconv tests aware of user argumentsBen Walton, Mar 12, 2009
  8. configure: rework pthread handling to allow for user defined flagsBen Walton, Mar 12, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.