~youscribe/parted/3.1

« back to all changes in this revision

Viewing changes to m4/rpmatch.m4

  • Committer: Guilhem Lettron
  • Date: 2012-10-22 14:37:59 UTC
  • Revision ID: guilhem+ubuntu@lettron.fr-20121022143759-m403kecgz13sknvp
3.1 from tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# rpmatch.m4 serial 10
 
2
dnl Copyright (C) 2002-2003, 2007-2012 Free Software Foundation, Inc.
 
3
dnl This file is free software; the Free Software Foundation
 
4
dnl gives unlimited permission to copy and/or distribute it,
 
5
dnl with or without modifications, as long as this notice is preserved.
 
6
 
 
7
AC_DEFUN([gl_FUNC_RPMATCH],
 
8
[
 
9
  dnl Persuade glibc <stdlib.h> to declare rpmatch().
 
10
  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
11
 
 
12
  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
 
13
  AC_CHECK_FUNCS([rpmatch])
 
14
  if test $ac_cv_func_rpmatch = no; then
 
15
    HAVE_RPMATCH=0
 
16
  fi
 
17
])
 
18
 
 
19
# Prerequisites of lib/rpmatch.c.
 
20
AC_DEFUN([gl_PREREQ_RPMATCH], [
 
21
  AC_CACHE_CHECK([for nl_langinfo and YESEXPR], [gl_cv_langinfo_yesexpr],
 
22
    [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
 
23
       [[char* cs = nl_langinfo(YESEXPR); return !cs;]])],
 
24
       [gl_cv_langinfo_yesexpr=yes],
 
25
       [gl_cv_langinfo_yesexpr=no])
 
26
    ])
 
27
  if test $gl_cv_langinfo_yesexpr = yes; then
 
28
    AC_DEFINE([HAVE_LANGINFO_YESEXPR], [1],
 
29
      [Define if you have <langinfo.h> and nl_langinfo(YESEXPR).])
 
30
  fi
 
31
])