diff options
| author | Ivan Maidanski <ivmai@mail.ru> | 2011-09-21 13:14:29 +0400 |
|---|---|---|
| committer | Ivan Maidanski <ivmai@mail.ru> | 2011-09-21 13:14:29 +0400 |
| commit | ad82960e07f9e9b8431778d3e99e548212713ce7 (patch) | |
| tree | a6620b0040be968eb04def426f0ccf64e3152a21 /configure.ac | |
| parent | a57f21af8336f875080b8bb73cdbff05ce72cb5d (diff) | |
| download | libatomic_ops-ad82960e07f9e9b8431778d3e99e548212713ce7.tar.gz | |
Fix configure for mingw-w64/32.
* configure.ac (PICFLAG, THREADDLLIBS): Define as empty for MinGW.
* configure.ac (have_pthreads): New definition (set to true unless
MinGW).
* configure.ac (HAVE_PTHREAD_H): New AM conditional (based on
have_pthreads value).
* tests/Makefile.am (test_atomic_pthreads_SOURCES,
test_atomic_pthreads_CPPFLAGS, test_atomic_pthreads_LDADD): Define
only if HAVE_PTHREAD_H.
* tests/Makefile.am (TESTS): Don't include test_atomic_pthreads unless
HAVE_PTHREAD_H.
* tests/Makefile.am (check_PROGRAMS): Define to TESTS value.
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 9724281..3c6c282 100644 --- a/configure.ac +++ b/configure.ac @@ -30,8 +30,8 @@ if test "$GCC" = yes; then # Workaround: at least GCC 3.4.6 does not define this macro. CFLAGS="$CFLAGS -D__PIC__=1" ;; - *-*-cygwin*) - # Cygwin does not need -fPIC. + *-*-cygwin* | *-*-mingw*) + # Cygwin and Mingw[-w32/64] do not need -fPIC. ;; *) AC_MSG_RESULT(-fPIC) @@ -70,6 +70,7 @@ AC_SUBST(DEFS) AH_TEMPLATE([_PTHREADS], [Indicates the use of pthreads (NetBSD).]) THREADDLLIBS= +have_pthreads=true ## Libraries needed to support threads. AC_CHECK_LIB(pthread, pthread_self, THREADDLLIBS="-lpthread",,) AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads.]) @@ -83,9 +84,14 @@ case "$host" in *-*-cygwin* | *-*-darwin*) THREADDLLIBS= ;; + *-*-mingw*) + THREADDLLIBS= + have_pthreads=false + ;; esac AC_SUBST(THREADDLLIBS) +AM_CONDITIONAL(HAVE_PTHREAD_H, test x$have_pthreads = xtrue) AM_CONDITIONAL(NEED_ASM, test x$need_asm = xtrue) AC_CONFIG_FILES([ |
