summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorgrant <grant>2003-07-19 03:05:00 +0000
committergrant <grant>2003-07-19 03:05:00 +0000
commit2ea136e7e37423093c8eecf0dd1229bc01902e58 (patch)
treed5ea5ea925af581e5e9305e3df7a0736bb46adb7 /pkgtools
parent4f337a20b6aee92ab50ed0e275ea880164d8278e (diff)
downloadpkgsrc-2ea136e7e37423093c8eecf0dd1229bc01902e58.tar.gz
test for time.h, sys/time.h and inclusion of both.
include system fts.h if we have one, or our own.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/libnbcompat/files/config.h.in9
-rwxr-xr-xpkgtools/libnbcompat/files/configure81
-rw-r--r--pkgtools/libnbcompat/files/configure.ac8
-rw-r--r--pkgtools/libnbcompat/files/nbcompat.h6
4 files changed, 88 insertions, 16 deletions
diff --git a/pkgtools/libnbcompat/files/config.h.in b/pkgtools/libnbcompat/files/config.h.in
index 94e44b6ab4c..18d1f8a3d4a 100644
--- a/pkgtools/libnbcompat/files/config.h.in
+++ b/pkgtools/libnbcompat/files/config.h.in
@@ -302,6 +302,9 @@
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
@@ -314,6 +317,9 @@
/* Define to 1 if you have the `timegm' function. */
#undef HAVE_TIMEGM
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
+
/* Define to 1 if you have the <tzfile.h> header file. */
#undef HAVE_TZFILE_H
@@ -389,6 +395,9 @@
/* Define to 1 if strerror_r returns char *. */
#undef STRERROR_R_CHAR_P
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
diff --git a/pkgtools/libnbcompat/files/configure b/pkgtools/libnbcompat/files/configure
index 63c29bc47ce..62a4a12a9fb 100755
--- a/pkgtools/libnbcompat/files/configure
+++ b/pkgtools/libnbcompat/files/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.57 for libnbcompat 20030717.
+# Generated by GNU Autoconf 2.57 for libnbcompat 20030719.
#
# Report bugs to <grant@NetBSD.org>.
#
@@ -268,8 +268,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='libnbcompat'
PACKAGE_TARNAME='libnbcompat'
-PACKAGE_VERSION='20030717'
-PACKAGE_STRING='libnbcompat 20030717'
+PACKAGE_VERSION='20030719'
+PACKAGE_STRING='libnbcompat 20030719'
PACKAGE_BUGREPORT='grant@NetBSD.org'
# Factoring default headers for most tests.
@@ -778,7 +778,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libnbcompat 20030717 to adapt to many kinds of systems.
+\`configure' configures libnbcompat 20030719 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -844,7 +844,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libnbcompat 20030717:";;
+ short | recursive ) echo "Configuration of libnbcompat 20030719:";;
esac
cat <<\_ACEOF
@@ -923,7 +923,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-libnbcompat configure 20030717
+libnbcompat configure 20030719
generated by GNU Autoconf 2.57
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
@@ -938,7 +938,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libnbcompat $as_me 20030717, which was
+It was created by libnbcompat $as_me 20030719, which was
generated by GNU Autoconf 2.57. Invocation command line was
$ $0 $@
@@ -2891,6 +2891,62 @@ _ACEOF
fi
+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+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 <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ 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
+ ac_cv_header_time=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_time=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
@@ -3123,10 +3179,11 @@ done
+
for ac_header in assert.h arpa/nameser.h dirent.h err.h errno.h fcntl.h \
fts.h libutil.h locale.h machine/endian.h param.h paths.h \
poll.h regex.h stringlist.h sys/byteorder.h sys/poll.h \
- termcap.h tzfile.h unistd.h util.h vis.h limits.h
+ termcap.h time.h tzfile.h unistd.h util.h vis.h limits.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -3280,8 +3337,9 @@ done
+
for ac_header in bind/bitypes.h inttypes.h sys/bitypes.h sys/cdefs.h \
- sys/endian.h sys/mount.h sys/queue.h \
+ sys/endian.h sys/mount.h sys/queue.h sys/time.h \
sys/stat.h sys/statvfs.h sys/vfs.h sys/types.h \
sys/byteorder.h
do
@@ -3426,7 +3484,6 @@ done
-
echo "$as_me:$LINENO: checking for __attribute__" >&5
echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6
if test "${ac_cv___attribute__+set}" = set; then
@@ -7407,7 +7464,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by libnbcompat $as_me 20030717, which was
+This file was extended by libnbcompat $as_me 20030719, which was
generated by GNU Autoconf 2.57. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7467,7 +7524,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-libnbcompat config.status 20030717
+libnbcompat config.status 20030719
configured by $0, generated by GNU Autoconf 2.57,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/pkgtools/libnbcompat/files/configure.ac b/pkgtools/libnbcompat/files/configure.ac
index 21863d76bed..fcd0291e755 100644
--- a/pkgtools/libnbcompat/files/configure.ac
+++ b/pkgtools/libnbcompat/files/configure.ac
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
-AC_INIT([libnbcompat], [20030717], [grant@NetBSD.org])
+AC_INIT([libnbcompat], [20030719], [grant@NetBSD.org])
AC_CONFIG_HEADER(config.h)
AC_ARG_PROGRAM
@@ -24,19 +24,19 @@ AC_SUBST(AUTOHEADER)
dnl Checks for header files.
AC_HEADER_STDC
+AC_HEADER_TIME
AC_CHECK_HEADERS([sys/endian.h sys/file.h sys/mkdev.h sys/param.h])
AC_CHECK_HEADERS([assert.h arpa/nameser.h dirent.h err.h errno.h fcntl.h \
fts.h libutil.h locale.h machine/endian.h param.h paths.h \
poll.h regex.h stringlist.h sys/byteorder.h sys/poll.h \
- termcap.h tzfile.h unistd.h util.h vis.h limits.h])
+ termcap.h time.h tzfile.h unistd.h util.h vis.h limits.h])
AC_CHECK_HEADERS([bind/bitypes.h inttypes.h sys/bitypes.h sys/cdefs.h \
- sys/endian.h sys/mount.h sys/queue.h \
+ sys/endian.h sys/mount.h sys/queue.h sys/time.h \
sys/stat.h sys/statvfs.h sys/vfs.h sys/types.h \
sys/byteorder.h])
-
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C___ATTRIBUTE__
AC_TYPE_SIZE_T
diff --git a/pkgtools/libnbcompat/files/nbcompat.h b/pkgtools/libnbcompat/files/nbcompat.h
index d90e1d4f8f4..442c6b21be7 100644
--- a/pkgtools/libnbcompat/files/nbcompat.h
+++ b/pkgtools/libnbcompat/files/nbcompat.h
@@ -59,6 +59,12 @@
# endif
#endif
+#if HAVE_FTS_H
+# include <fts.h>
+#else
+# include "fts.h"
+#endif
+
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>