summaryrefslogtreecommitdiff
path: root/config/acx_pthread.m4
Commit message (Collapse)AuthorAgeFilesLines
* Replace our hacked version of ax_pthread.m4 with latest upstream version.Heikki Linnakangas2015-07-081-170/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Our version was different from the upstream version in that we tried to use all possible pthread-related flags that the compiler accepts, rather than just the first one that works. That change was made in commit e48322a6d6cfce1ec52ab303441df329ddbc04d1, to work-around a bug affecting GCC versions 3.2 and below (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8888), although we didn't realize that it was a GCC bug at the time. We hardly care about that old GCC versions anymore, so we no longer need that workaround. This fixes the macro for compilers that print warnings with the chosen flags. That's pretty annoying on its own right, but it also inconspicuously disabled thread-safety, because we refused to use any pthread-related flags if the compiler produced warnings. Max Filippov reported that problem when linking with uClibc and OpenSSL. The warnings-check was added because the workaround for the GCC bug caused warnings otherwise, so it's no longer needed either. We can just use the upstream version as is. If you really want to compile with GCC version 3.2 or older, you can still work-around it manually by setting PTHREAD_CFLAGS="-pthread -lpthread" manually on the configure command line. Backpatch to 9.5. I don't want to unnecessarily rock the boat on stable branches, but 9.5 seems like fair game.
* Replace obsolete autoconf macros with their modern replacements.Heikki Linnakangas2015-07-021-5/+4
| | | | | | | | | | | | | | | AC_TRY_COMPILE(...) -> AC_COMPILE_IFELSE([AC_LANG_PROGRAM(...)]) AC_TRY_LINK(...) -> AC_LINK_IFELSE([AC_LANG_PROGRAM(...)]) AC_TRY_RUN(...) -> AC_RUN_IFELSE([AC_LANG_PROGRAM(...)]) AC_LANG_SAVE/RESTORE -> AC_LANG_PUSH/POP AC_DECL_SYS_SIGLIST -> AC_CHECK_DECLS(...) (per snippet in autoconf manual) Also use AC_LANG_SOURCE instead of AC_LANG_PROGRAM, where the main() function is not needed. With these changes, autoconf -Wall doesn't complain anymore. Andreas Karlsson
* Remove some useless code in the configure script.Tom Lane2014-07-011-67/+10
| | | | | | | | | | | | Almost ten years ago, commit e48322a6d6cfce1ec52ab303441df329ddbc04d1 broke the logic in ACX_PTHREAD by looping through all the possible flags rather than stopping with the first one that would work. This meant that $acx_pthread_ok was no longer meaningful after the loop; it would usually be "no", whether or not we'd found working thread flags. The reason nobody noticed is that Postgres doesn't actually use any of the symbols set up by the code after the loop. Rather than complicate things some more to make it work as designed, let's just remove all that dead code, and thereby save a few cycles in each configure run.
* Better support for thread-support flag detection with clangPeter Eisentraut2011-02-161-1/+2
| | | | | | When testing the stderr produced by various thread-support flags, also run a compilation in addition to a link, because clang warns on certain flags when compiling but not when linking.
* Allow Win32 libpq will use it's minimal pthread implementation, and ecpgBruce Momjian2005-08-291-1/+1
| | | | | | will use pthreadGC2. Dave Page
* Update aix cc_r wording.Bruce Momjian2004-12-141-3/+3
|
* Mention aix cc_r is not supported, and whyBruce Momjian2004-12-141-0/+3
|
* If we're going to test for switch validity by observing whether theTom Lane2004-10-241-1/+3
| | | | | | | compiler emits any warnings, the test program had better be 100% correct, not only 90% correct. The recent addition of -Wold-style-definition broke thread-safety detection on every platform that has that switch, because the test program used an old-style definition.
* Send thread test output to file descriptor 5 like configure does ratherBruce Momjian2004-09-111-1/+1
| | | | than /dev/null, which Win32 doesn't have.
* Check for ignored thread compiler options to reduce compiler noise.Bruce Momjian2004-09-111-7/+21
|
* Fix agressive collection of thread flags.Bruce Momjian2004-08-171-2/+3
|
* Fix syntax error just introduced.Bruce Momjian2004-08-161-1/+0
|
* Be more aggressive about adding flags to thread compiles. The configureBruce Momjian2004-08-121-9/+14
| | | | | | | | | | test only tests for building a binary, not building a shared library. On Linux, you can build a binary with -pthread, but you can't build a binary that uses a threaded shared library unless you also use -pthread when building the binary, or adding -lpthread to the shared library build. This patch has the effect of doing the later by adding both -pthread and -lpthread when building libpq.
* Minor style cleanup of thread test script.Bruce Momjian2004-08-121-11/+11
|
* Unconditionally define:Bruce Momjian2004-04-261-4/+8
| | | | | | | | | | -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS for all ports. It can't hurt if they are not supported, but it makes our job easier for porting. Should fix Darwin compile and other platforms without mucking with the thread detection code.
* Add new auto-detection of thread flags.Bruce Momjian2004-04-231-0/+199
Allow additional thread flags to be added via port templates. Change thread flag names to PTHREAD_CFLAGS and PTHREAD_LIBS to match new configure script.