view m4/coshf.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

# coshf.m4 serial 2
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_COSHF],
[
  AC_REQUIRE([gl_MATH_H_DEFAULTS])
  AC_REQUIRE([gl_FUNC_COSH])

  dnl Persuade glibc <math.h> to declare coshf().
  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])

  dnl Test whether coshf() exists. Assume that coshf(), if it exists, is
  dnl defined in the same library as cosh().
  save_LIBS="$LIBS"
  LIBS="$LIBS $COSH_LIBM"
  AC_CHECK_FUNCS([coshf])
  LIBS="$save_LIBS"
  if test $ac_cv_func_coshf = yes; then
    COSHF_LIBM="$COSH_LIBM"
  else
    HAVE_COSHF=0
    COSHF_LIBM="$COSH_LIBM"
  fi
  AC_SUBST([COSHF_LIBM])
])