pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat/files always use local glob.[ch] ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/072a05be33c8
branches: trunk
changeset: 464390:072a05be33c8
user: grant <grant%pkgsrc.org@localhost>
date: Mon Dec 08 14:52:02 2003 +0000
description:
always use local glob.[ch] if GLOB_NOMATCH or GLOB_ABORTED aren't
defined.
diffstat:
pkgtools/libnbcompat/files/configure | 67 +++++++++++++++++++++++++
pkgtools/libnbcompat/files/configure.ac | 18 ++++++-
pkgtools/libnbcompat/files/nbcompat.h | 8 ++-
pkgtools/libnbcompat/files/nbcompat/config.h.in | 3 +
4 files changed, 94 insertions(+), 2 deletions(-)
diffs (144 lines):
diff -r 1d394f454941 -r 072a05be33c8 pkgtools/libnbcompat/files/configure
--- a/pkgtools/libnbcompat/files/configure Mon Dec 08 14:43:48 2003 +0000
+++ b/pkgtools/libnbcompat/files/configure Mon Dec 08 14:52:02 2003 +0000
@@ -8080,6 +8080,73 @@
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
diff -r 1d394f454941 -r 072a05be33c8 pkgtools/libnbcompat/files/configure.ac
--- a/pkgtools/libnbcompat/files/configure.ac Mon Dec 08 14:43:48 2003 +0000
+++ b/pkgtools/libnbcompat/files/configure.ac Mon Dec 08 14:52:02 2003 +0000
@@ -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 @@
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,
diff -r 1d394f454941 -r 072a05be33c8 pkgtools/libnbcompat/files/nbcompat.h
--- a/pkgtools/libnbcompat/files/nbcompat.h Mon Dec 08 14:43:48 2003 +0000
+++ b/pkgtools/libnbcompat/files/nbcompat.h Mon Dec 08 14:52:02 2003 +0000
@@ -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 @@
# 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
diff -r 1d394f454941 -r 072a05be33c8 pkgtools/libnbcompat/files/nbcompat/config.h.in
--- a/pkgtools/libnbcompat/files/nbcompat/config.h.in Mon Dec 08 14:43:48 2003 +0000
+++ b/pkgtools/libnbcompat/files/nbcompat/config.h.in Mon Dec 08 14:52:02 2003 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index