pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat/files make sure we define HAVE_PO...
details: https://anonhg.NetBSD.org/pkgsrc/rev/826c551ef13d
branches: trunk
changeset: 473691:826c551ef13d
user: grant <grant%pkgsrc.org@localhost>
date: Fri Apr 23 11:42:46 2004 +0000
description:
make sure we define HAVE_POLL if a usable poll() implementation is
found, and re-arrange the test a little for clarity.
fixes build on (at least) FreeBSD 5.x.
diffstat:
pkgtools/libnbcompat/files/configure | 64 +++++++++++++-----------
pkgtools/libnbcompat/files/configure.ac | 27 +++++++---
pkgtools/libnbcompat/files/nbcompat/config.h.in | 3 +
3 files changed, 55 insertions(+), 39 deletions(-)
diffs (165 lines):
diff -r fce43e601ee8 -r 826c551ef13d pkgtools/libnbcompat/files/configure
--- a/pkgtools/libnbcompat/files/configure Fri Apr 23 09:52:50 2004 +0000
+++ b/pkgtools/libnbcompat/files/configure Fri Apr 23 11:42:46 2004 +0000
@@ -8460,20 +8460,7 @@
fi
if test $pkg_use_nbcompat_poll = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_NBCOMPAT_POLL 1
-_ACEOF
-
-
-
- case $LIBOBJS in
- "poll.$ac_objext" | \
- *" poll.$ac_objext" | \
- "poll.$ac_objext "* | \
- *" poll.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS poll.$ac_objext" ;;
-esac
-
+ pkg_cv_POLL_NATIVE=no
else
echo "$as_me:$LINENO: checking for poll" >&5
echo $ECHO_N "checking for poll... $ECHO_C" >&6
@@ -8570,7 +8557,7 @@
echo "$as_me:$LINENO: checking if poll() is implemented natively" >&5
echo $ECHO_N "checking if poll() is implemented natively... $ECHO_C" >&6
-if test "${pkg_cv_POLL_COMPAT+set}" = set; then
+if test "${pkg_cv_POLL_NATIVE+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -8620,22 +8607,39 @@
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- pkg_cv_POLL_COMPAT=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- pkg_cv_POLL_COMPAT=no
+ pkg_cv_POLL_NATIVE=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ pkg_cv_POLL_NATIVE=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $pkg_cv_POLL_COMPAT" >&5
-echo "${ECHO_T}$pkg_cv_POLL_COMPAT" >&6
- if test "x$pkg_cv_POLL_COMPAT" = "xyes"; then
+echo "$as_me:$LINENO: result: $pkg_cv_POLL_NATIVE" >&5
+echo "${ECHO_T}$pkg_cv_POLL_NATIVE" >&6
+ if test "x$pkg_cv_POLL_NATIVE" = "xyes"; then
:
else
- case $LIBOBJS in
+ :
+ :
+ fi
+
+
+fi
+
+fi
+
+if test $pkg_cv_POLL_NATIVE = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_POLL 1
+_ACEOF
+
+
+
+else
+ case $LIBOBJS in
"poll.$ac_objext" | \
*" poll.$ac_objext" | \
"poll.$ac_objext "* | \
@@ -8643,11 +8647,11 @@
*) LIBOBJS="$LIBOBJS poll.$ac_objext" ;;
esac
- :
- fi
-
-
-fi
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_NBCOMPAT_POLL 1
+_ACEOF
+
+
fi
diff -r fce43e601ee8 -r 826c551ef13d pkgtools/libnbcompat/files/configure.ac
--- a/pkgtools/libnbcompat/files/configure.ac Fri Apr 23 09:52:50 2004 +0000
+++ b/pkgtools/libnbcompat/files/configure.ac Fri Apr 23 11:42:46 2004 +0000
@@ -1,4 +1,4 @@
-dnl $NetBSD: configure.ac,v 1.42 2004/04/20 12:13:05 grant Exp $
+dnl $NetBSD: configure.ac,v 1.43 2004/04/23 11:42:46 grant Exp $
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
@@ -194,15 +194,11 @@
fi
if test $pkg_use_nbcompat_poll = yes; then
- AC_DEFINE(HAVE_NBCOMPAT_POLL, 1)
- AH_TEMPLATE([HAVE_NBCOMPAT_POLL], [
- Define to 1 if the `poll' function is built into the library.
- ])
- AC_LIBOBJ(poll)
+ pkg_cv_POLL_NATIVE=no
else
AC_CHECK_FUNC(poll, [
AC_MSG_TRY_COMPILE([if poll() is implemented natively],
- pkg_cv_POLL_COMPAT,
+ pkg_cv_POLL_NATIVE,
[ #if HAVE_POLL_H
#include <poll.h>
#endif
@@ -214,8 +210,21 @@
#error "poll() is emulated"
#endif
],
- [:], [AC_LIBOBJ(poll)])
-])
+ [:], [:])
+ ])
+fi
+
+if test $pkg_cv_POLL_NATIVE = yes; then
+ AC_DEFINE(HAVE_POLL, 1)
+ AH_TEMPLATE([HAVE_POLL], [
+ Define to 1 if you have the `poll' function.
+ ])
+else
+ AC_LIBOBJ(poll)
+ AC_DEFINE(HAVE_NBCOMPAT_POLL, 1)
+ AH_TEMPLATE([HAVE_NBCOMPAT_POLL], [
+ Define to 1 if the `poll' function is built into the library.
+ ])
fi
AC_CHECK_FUNCS([strunvis strvis strsvis])
diff -r fce43e601ee8 -r 826c551ef13d pkgtools/libnbcompat/files/nbcompat/config.h.in
--- a/pkgtools/libnbcompat/files/nbcompat/config.h.in Fri Apr 23 09:52:50 2004 +0000
+++ b/pkgtools/libnbcompat/files/nbcompat/config.h.in Fri Apr 23 11:42:46 2004 +0000
@@ -185,6 +185,9 @@
/* Define to 1 if you have the <paths.h> header file. */
#undef HAVE_PATHS_H
+/* Define to 1 if you have the `poll' function. */
+#undef HAVE_POLL
+
/* Define to 1 if you have the <poll.h> header file. */
#undef HAVE_POLL_H
Home |
Main Index |
Thread Index |
Old Index