view m4/read.m4 @ 17751:9e8d98ca3311

pthread, pthread_sigmask, threadlib: port to Ubuntu 14.04 Problem reported by Assaf Gordon in: http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html Apparently Ubuntu is doing some fancy link-time optimization that doesn't work with -lpthread but does work with -pthread. Work around the bug by preferring -pthread to -lpthread. This change affects only LIBS, not CFLAGS, which is a little weird, but it works. * m4/pthread.m4 (gl_PTHREAD_CHECK): * m4/threadlib.m4 (gl_THREADLIB_BODY): Prefer -pthread to -lpthread. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Treat -pthread like -lpthread.
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 04 Sep 2014 14:55:12 -0700
parents 344018b6e5d7
children ab58d4870664
line wrap: on
line source

# read.m4 serial 4
dnl Copyright (C) 2011-2014 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

AC_DEFUN([gl_FUNC_READ],
[
  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
  AC_REQUIRE([gl_MSVC_INVAL])
  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
    REPLACE_READ=1
  fi
  dnl This ifdef is just an optimization, to avoid performing a configure
  dnl check whose result is not used. It does not make the test of
  dnl GNULIB_UNISTD_H_NONBLOCKING or GNULIB_NONBLOCKING redundant.
  m4_ifdef([gl_NONBLOCKING_IO], [
    gl_NONBLOCKING_IO
    if test $gl_cv_have_nonblocking != yes; then
      REPLACE_READ=1
    fi
  ])
])

# Prerequisites of lib/read.c.
AC_DEFUN([gl_PREREQ_READ], [:])