Support non weak symbol pthread platforms.
* m4/lock.m4, m4/threadlib.m4: New. From libgpg-error master. * m4/Makefile.am (EXTRA_DIST): Add them. * configure.ac (HAVE_PTHREAD): Remove test and ac_define. (gl_LOCK): Do not use under Windows. (LIBGCRYPT_CONFIG_LIBS): Add LIBTHREAD to support non-ELF pthread systems. * src/Makefile.am (dumpsexp_LDADD, mpicalc_LDADD, hmac256_LDADD) (gcryptrnd_LDADD): Add LIBTHREAD. * src/ath.c: Include pthread for any pthread version. (ath_init, ath_install, ath_mutex_init, ath_mutex_destroy) (ath_mutex_lock, ath_mutex_unlock): Support non-weak symbol pthread systems. * tests/Makefile.am (LDADD): Add LIBTHREAD. * tests/t-lock.c: Replace HAVE_PTHREAD by USE_POSIX_THREADS (run_test): Run only under W32 or pthread.
This has been tested on "AIX power-aix 1 7" using gcc 4.8.
- Signed-off-by: Werner Koch <wk@gnupg.org>