view build-aux/config.libpath @ 17366:9855b352e525

regex: port to mingw's recent addition of undeclared alarm On mingw (at least, when cross-compiling with Fedora 18's mingw32-headers-2.0.999-0.15.trunk.20121110.fc18.noarch build), compilation of test-regex fails: test-regex.c: In function 'main': test-regex.c:42:11: error: 'SIGALRM' undeclared (first use in this function) test-regex.c:42:11: note: each undeclared identifier is reported only once for each function it appears in test-regex.c:43:3: warning: implicit declaration of function 'alarm' It turns out that recent mingw64 added an export of alarm() and SIGALRM, but guarded their declarations behind __USE_MINGW_ALARM (default off, and with alarm() only in the non-standard <io.h>); so the m4 tests were setting HAVE_ALARM to 1 based on link success but then failing to compile. * doc/posix-functions/alarm.texi (alarm): Document that alarm exists but still doesn't work in newer mingw. * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Check for alarm declaration, not existence. Ensure SIGALRM is not trapped. * m4/mktime.m4 (gl_FUNC_MKTIME): Likewise. * m4/regex.m4 (gl_REGEX): Likewise. * m4/remainderf.m4 (gl_FUNC_REMAINDERF_WORKS): Likewise. * tests/test-regex.c (main): Use correct probe for alarm. Signed-off-by: Eric Blake <eblake@redhat.com>
author Eric Blake <eblake@redhat.com>
date Mon, 11 Mar 2013 14:51:33 -0600
parents e542fd46ad6f
children
line wrap: on
line source

#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable at run time.
#
#   Copyright 1996-2013 Free Software Foundation, Inc.
#   Taken from GNU libtool, 2003
#   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#   As a special exception to the GNU General Public License, if you
#   distribute this file as part of a program that contains a
#   configuration script generated by Autoconf, you may include it under
#   the same distribution terms that you use for the rest of that program.
#
# The first argument passed to this file is the canonical host specification,
#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variable LD should be set by the caller.
#
# The set of defined variables is at the end of this script.

host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

shlibpath_var=
case $host_os in
  aix3*)
    shlibpath_var=LIBPATH
    ;;
  aix[4-9]*)
    if test "$host_cpu" = ia64; then
      # AIX 5 supports IA64
      shlibpath_var=LD_LIBRARY_PATH
    else
      shlibpath_var=LIBPATH
    fi
    ;;
  beos*)
    shlibpath_var=LIBRARY_PATH
    ;;
  bsdi[45]*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  cygwin* | mingw* | pw32* | cegcc*)
    # FIXME: first we should search . and the directory the executable is in
    shlibpath_var=PATH
    ;;
  darwin* | rhapsody*)
    shlibpath_var=DYLD_LIBRARY_PATH
    ;;
  dgux*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  freebsd* | dragonfly*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  gnu*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  hpux9* | hpux10* | hpux11*)
    case "$host_cpu" in
      ia64* | hppa*64*) shlibpath_var=LD_LIBRARY_PATH ;;
      *) shlibpath_var=SHLIB_PATH ;;
    esac
    ;;
  interix[3-9]*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  irix5* | irix6* | nonstopux*)
    case $host_os in
      irix5* | nonstopux*)
        shlibsuff=
        ;;
      *)
        case $LD in # libtool.m4 will add one of these switches to LD
          *-32|*"-32 ") shlibsuff= ;;
          *-n32|*"-n32 ") shlibsuff=N32 ;;
          *-64|*"-64 ") shlibsuff=64 ;;
          *) shlibsuff= ;;
        esac
        ;;
    esac
    shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
    ;;
  linux*oldld* | linux*aout* | linux*coff*)
    ;;
  linux* | k*bsd*-gnu)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  netbsd*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  newsos6)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  nto-qnx*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  openbsd*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  os2*)
    shlibpath_var=LIBPATH
    ;;
  osf3* | osf4* | osf5*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  rdos*)
    ;;
  solaris*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  sunos4*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  sysv4 | sysv4.3*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  sysv4*MP*)
    if test -d /usr/nec ;then
      shlibpath_var=LD_LIBRARY_PATH
    fi
    ;;
  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
  uts4*)
    shlibpath_var=LD_LIBRARY_PATH
    ;;
esac

LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF

# This is the shared library path variable.
shlibpath_var=$shlibpath_var

EOF