always use local glob.[ch] if GLOB_NOMATCH or GLOB_ABORTED aren't
defined.
This commit is contained in:
parent
c632d292ab
commit
4b9a7b94e1
4 changed files with 94 additions and 2 deletions
67
pkgtools/libnbcompat/files/configure
vendored
67
pkgtools/libnbcompat/files/configure
vendored
|
@ -8080,6 +8080,73 @@ _ACEOF
|
|||
LIBOBJS="$LIBOBJS statfs.$ac_objext"
|
||||
fi
|
||||
|
||||
pkg_use_nbcompat_glob=yes
|
||||
|
||||
echo "$as_me:$LINENO: checking if GLOB_NOMATCH and GLOB_ABORTED are defined in glob.h" >&5
|
||||
echo $ECHO_N "checking if GLOB_NOMATCH and GLOB_ABORTED are defined in glob.h... $ECHO_C" >&6
|
||||
if test "${pkg_cv_GLOB_NOMATCH_ABORTED+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <glob.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int f = GLOB_NOMATCH + GLOB_ABORTED ;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
pkg_cv_GLOB_NOMATCH_ABORTED=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
pkg_cv_GLOB_NOMATCH_ABORTED=no
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $pkg_cv_GLOB_NOMATCH_ABORTED" >&5
|
||||
echo "${ECHO_T}$pkg_cv_GLOB_NOMATCH_ABORTED" >&6
|
||||
if test "x$pkg_cv_GLOB_NOMATCH_ABORTED" = "xyes"; then
|
||||
pkg_use_nbcompat_glob=no
|
||||
else
|
||||
|
||||
:
|
||||
fi
|
||||
|
||||
|
||||
if test $pkg_use_nbcompat_glob = yes; then
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_NBCOMPAT_GLOB 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
LIBOBJS="$LIBOBJS glob.$ac_objext"
|
||||
fi
|
||||
|
||||
|
||||
if test $ac_cv_type_long_long = yes -a $ac_cv_sizeof_off_t -ge 8; then
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
dnl $NetBSD: configure.ac,v 1.31 2003/12/05 15:43:10 erh Exp $
|
||||
dnl $NetBSD: configure.ac,v 1.32 2003/12/08 14:52:02 grant Exp $
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.52)
|
||||
|
@ -216,6 +216,22 @@ if test $pkg_use_nbcompat_statfs = yes; then
|
|||
AC_LIBOBJ(statfs)
|
||||
fi
|
||||
|
||||
pkg_use_nbcompat_glob=yes
|
||||
AC_MSG_TRY_COMPILE([if GLOB_NOMATCH and GLOB_ABORTED are defined in glob.h],
|
||||
pkg_cv_GLOB_NOMATCH_ABORTED,
|
||||
[ #include <glob.h> ],
|
||||
[ int f = GLOB_NOMATCH + GLOB_ABORTED ],
|
||||
[ pkg_use_nbcompat_glob=no ])
|
||||
|
||||
if test $pkg_use_nbcompat_glob = yes; then
|
||||
AC_DEFINE(HAVE_NBCOMPAT_GLOB, 1)
|
||||
AH_TEMPLATE([HAVE_NBCOMPAT_GLOB], [
|
||||
Define to 1 if the `glob' function is built into the library.
|
||||
])
|
||||
AC_LIBOBJ(glob)
|
||||
fi
|
||||
|
||||
|
||||
if test $ac_cv_type_long_long = yes -a $ac_cv_sizeof_off_t -ge 8; then
|
||||
|
||||
dnl We assume that if sprintf() supports %lld or %qd,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nbcompat.h,v 1.27 2003/12/05 15:41:06 erh Exp $ */
|
||||
/* $NetBSD: nbcompat.h,v 1.28 2003/12/08 14:52:02 grant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -225,6 +225,12 @@ struct { \
|
|||
# include <nbcompat/err.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_NBCOMPAT_GLOB
|
||||
# if HAVE_GLOB_H
|
||||
# undef HAVE_GLOB_H
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if HAVE_GLOB_H
|
||||
# include <glob.h>
|
||||
#else
|
||||
|
|
|
@ -158,6 +158,9 @@
|
|||
/* Define to 1 if the `getopt_long' function is built into the library. */
|
||||
#undef HAVE_NBCOMPAT_GETOPT_LONG
|
||||
|
||||
/* Define to 1 if the `glob' function is built into the library. */
|
||||
#undef HAVE_NBCOMPAT_GLOB
|
||||
|
||||
/* Define to 1 if the `MD5Init' function is built into the library. */
|
||||
#undef HAVE_NBCOMPAT_MD5INIT
|
||||
|
||||
|
|
Loading…
Reference in a new issue