bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] Wrong path to fnmatch_.h with gl_FUNC_FNMATCH_GNU ?


From: Bruno Haible
Subject: Re: [Bug-gnulib] Wrong path to fnmatch_.h with gl_FUNC_FNMATCH_GNU ?
Date: Mon, 26 May 2003 13:30:59 +0200 (CEST)

James Youngman writes:

> exec "$1"/gnulib-tool --create-testdir --dir="$destdir" --lib=libgnulib 
> $modules

Cool! You're succeeding to use gnulib-tool although the --import
option is NYI :-)

> However, when I try the result on Solaris 2.8, I get an error relating
> to the use of FNM_CASEFOLD.   This is because gnulib/m4/fnmatch.m4
> does 
> 
> AC_CONFIG_LINKS([lib/fnmatch.h:lib/fnmatch_.h])
> 
> However, in this case the relevant command to make the link I need
> would be 
> 
> AC_CONFIG_LINKS([gnulib/lib/fnmatch.h:gnulib/lib/fnmatch_.h])

Does the appended patch work for you? It touches the modules 'fnmatch'
and 'poll', which has the same problem.

Bruno

*** modules/fnmatch     20 Jan 2003 10:02:37 -0000      1.3
--- modules/fnmatch     26 May 2003 11:28:52 -0000
***************
*** 15,23 ****
  # No macro. You should also use one of fnmatch-posix or fnmatch-gnu.
  
  Makefile.am:
! lib_SOURCES += fnmatch_.h
! EXTRA_DIST += fnmatch_loop.c
! DISTCLEANFILES += fnmatch.h
  
  Include:
  <fnmatch.h>
--- 15,28 ----
  # No macro. You should also use one of fnmatch-posix or fnmatch-gnu.
  
  Makefile.am:
! EXTRA_DIST += fnmatch_.h fnmatch_loop.c
! 
! # The following is needed in order to create an <fnmatch.h> when the system
! # doesn't have one that supports the required API.
! all-local $(lib_OBJECTS): @FNMATCH_H@
! fnmatch.h: fnmatch_.h
!       cp $(srcdir)/fnmatch_.h fnmatch.h
! MOSTLYCLEANFILES += fnmatch.h
  
  Include:
  <fnmatch.h>
*** m4/fnmatch.m4       31 Dec 2002 13:43:06 -0000      1.12
--- m4/fnmatch.m4       26 May 2003 11:28:52 -0000
***************
*** 3,9 ****
  # This is a modified version of autoconf's AC_FUNC_FNMATCH.
  # This file should be simplified after Autoconf 2.57 is required.
  
! # Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
  
  # 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
--- 3,9 ----
  # This is a modified version of autoconf's AC_FUNC_FNMATCH.
  # This file should be simplified after Autoconf 2.57 is required.
  
! # Copyright (C) 2000-2003 Free Software Foundation, Inc.
  
  # 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
***************
*** 73,79 ****
  AC_CHECK_FUNCS([btowc mbsrtowcs mempcpy wmempcpy])
  AC_CHECK_HEADERS([wchar.h wctype.h])
  AC_LIBOBJ([fnmatch])
! AC_CONFIG_LINKS([lib/fnmatch.h:lib/fnmatch_.h])
  AC_DEFINE(fnmatch, rpl_fnmatch,
            [Define to rpl_fnmatch if the replacement function should be used.])
  ])# _AC_LIBOBJ_FNMATCH
--- 73,79 ----
  AC_CHECK_FUNCS([btowc mbsrtowcs mempcpy wmempcpy])
  AC_CHECK_HEADERS([wchar.h wctype.h])
  AC_LIBOBJ([fnmatch])
! FNMATCH_H=fnmatch.h
  AC_DEFINE(fnmatch, rpl_fnmatch,
            [Define to rpl_fnmatch if the replacement function should be used.])
  ])# _AC_LIBOBJ_FNMATCH
***************
*** 89,94 ****
--- 89,95 ----
  
  AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
  [
+   FNMATCH_H=
    _AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_posix],
                        [rm -f lib/fnmatch.h],
                        [_AC_LIBOBJ_FNMATCH])
***************
*** 100,105 ****
--- 101,107 ----
      AC_DEFINE([fnmatch], [posix_fnmatch],
        [Define to a replacement function name for fnmatch().])
    fi
+   AC_SUBST([FNMATCH_H])
  ])
  
  
***************
*** 108,113 ****
--- 110,116 ----
    dnl Persuade glibc <fnmatch.h> to declare FNM_CASEFOLD etc.
    AC_REQUIRE([AC_GNU_SOURCE])
  
+   FNMATCH_H=
    _AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
                        [rm -f lib/fnmatch.h],
                        [_AC_LIBOBJ_FNMATCH])
***************
*** 119,122 ****
--- 122,126 ----
      AC_DEFINE([fnmatch], [gnu_fnmatch],
        [Define to a replacement function name for fnmatch().])
    fi
+   AC_SUBST([FNMATCH_H])
  ])
*** modules/poll        20 Feb 2003 13:10:05 -0000      1.1
--- modules/poll        26 May 2003 11:28:52 -0000
***************
*** 12,19 ****
  gl_FUNC_POLL
  
  Makefile.am:
! noinst_HEADERS += poll_.h
! DISTCLEANFILES += poll.h
  
  Include:
  #include <poll.h>
--- 12,25 ----
  gl_FUNC_POLL
  
  Makefile.am:
! EXTRA_DIST += poll_.h
! 
! # The following is needed in order to create an <poll.h> when the system
! # doesn't have one.
! all-local $(lib_OBJECTS): @POLL_H@
! poll.h: poll_.h
!       cp $(srcdir)/poll_.h poll.h
! MOSTLYCLEANFILES += poll.h
  
  Include:
  #include <poll.h>
*** m4/poll.m4  20 Feb 2003 13:10:05 -0000      1.1
--- m4/poll.m4  26 May 2003 11:28:52 -0000
***************
*** 1,4 ****
! # poll.m4 serial 1
  dnl Copyright (c) 2003 Free Software Foundation, Inc.
  dnl This file is free software, distributed under the terms of the GNU
  dnl General Public License.  As a special exception to the GNU General
--- 1,4 ----
! # poll.m4 serial 2
  dnl Copyright (c) 2003 Free Software Foundation, Inc.
  dnl This file is free software, distributed under the terms of the GNU
  dnl General Public License.  As a special exception to the GNU General
***************
*** 9,17 ****
  AC_DEFUN([gl_FUNC_POLL],
  [
    AC_CHECK_HEADERS(poll.h)
!   if test x$ac_cv_header_poll_h = xno; then
!     AC_CONFIG_LINKS([lib/poll.h:lib/poll_.h])
    fi
  
    AC_REPLACE_FUNCS(poll)
    if test $ac_cv_func_poll = no; then
--- 9,20 ----
  AC_DEFUN([gl_FUNC_POLL],
  [
    AC_CHECK_HEADERS(poll.h)
!   if test "$ac_cv_header_poll_h" = no; then
!     POLL_H=poll.h
!   else
!     POLL_H=
    fi
+   AC_SUBST([POLL_H])
  
    AC_REPLACE_FUNCS(poll)
    if test $ac_cv_func_poll = no; then




reply via email to

[Prev in Thread] Current Thread [Next in Thread]