pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat libnbcompat-20090409:
details: https://anonhg.NetBSD.org/pkgsrc/rev/dbc581774559
branches: trunk
changeset: 557304:dbc581774559
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon Apr 13 11:30:46 2009 +0000
description:
libnbcompat-20090409:
Resort and improve getopt_long detection. Should fix issues on Interix
reported by mishka@ and QNX problems reported by Sean Boudreau.
diffstat:
pkgtools/libnbcompat/Makefile | 4 +-
pkgtools/libnbcompat/files/configure | 171 +++++++++++++++--------
pkgtools/libnbcompat/files/configure.ac | 15 +-
pkgtools/libnbcompat/files/nbcompat.h | 8 +-
pkgtools/libnbcompat/files/nbcompat/config.h.in | 6 +-
5 files changed, 128 insertions(+), 76 deletions(-)
diffs (277 lines):
diff -r e1ffde2cea27 -r dbc581774559 pkgtools/libnbcompat/Makefile
--- a/pkgtools/libnbcompat/Makefile Mon Apr 13 09:09:19 2009 +0000
+++ b/pkgtools/libnbcompat/Makefile Mon Apr 13 11:30:46 2009 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.70 2009/03/22 22:33:13 joerg Exp $
+# $NetBSD: Makefile,v 1.71 2009/04/13 11:30:46 joerg Exp $
#
# NOTE: If you update this package, it is *mandatory* that you update
# pkgsrc/pkgtools/libnbcompat/files/README to reflect the actual
# list of tested and supported platforms.
#
-DISTNAME= libnbcompat-20090322
+DISTNAME= libnbcompat-20090413
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff -r e1ffde2cea27 -r dbc581774559 pkgtools/libnbcompat/files/configure
--- a/pkgtools/libnbcompat/files/configure Mon Apr 13 09:09:19 2009 +0000
+++ b/pkgtools/libnbcompat/files/configure Mon Apr 13 11:30:46 2009 +0000
@@ -6056,71 +6056,124 @@
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
-
-
- { $as_echo "$as_me:$LINENO: checking for struct option" >&5
+ { $as_echo "$as_me:$LINENO: checking for struct option" >&5
$as_echo_n "checking for struct option... " >&6; }
-if test "${pkg_cv_have_struct_option+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
- #include <getopt.h>
-int
-main ()
-{
- struct option X; ;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- pkg_cv_have_struct_option=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- pkg_cv_have_struct_option=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $pkg_cv_have_struct_option" >&5
-$as_echo "$pkg_cv_have_struct_option" >&6; }
- if test "x$pkg_cv_have_struct_option" = "xyes"; then
- :
- else
- case " $LIBOBJS " in
+if test "${ac_cv_type_struct_option+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_struct_option=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <getopt.h>
+
+int
+main ()
+{
+if (sizeof (struct option))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <getopt.h>
+
+int
+main ()
+{
+if (sizeof ((struct option)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_struct_option=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
+$as_echo "$ac_cv_type_struct_option" >&6; }
+if test "x$ac_cv_type_struct_option" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_OPTION 1
+_ACEOF
+
+:
+else
+ case " $LIBOBJS " in
*" getopt_long.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
;;
esac
- :
- fi
+fi
+
+else
+ case " $LIBOBJS " in
+ *" getopt_long.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
+ ;;
+esac
fi
diff -r e1ffde2cea27 -r dbc581774559 pkgtools/libnbcompat/files/configure.ac
--- a/pkgtools/libnbcompat/files/configure.ac Mon Apr 13 09:09:19 2009 +0000
+++ b/pkgtools/libnbcompat/files/configure.ac Mon Apr 13 11:30:46 2009 +0000
@@ -1,4 +1,4 @@
-dnl $NetBSD: configure.ac,v 1.72 2009/03/22 22:33:13 joerg Exp $
+dnl $NetBSD: configure.ac,v 1.73 2009/04/13 11:30:46 joerg Exp $
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
@@ -148,12 +148,13 @@
])
-AC_CHECK_HEADERS([getopt.h], [
- AC_MSG_TRY_COMPILE([for struct option], pkg_cv_have_struct_option,
- [ #include <getopt.h> ], [ struct option X; ],
- [:],
- [AC_LIBOBJ(getopt_long)])
-])
+AC_CHECK_HEADERS([getopt.h],
+ [ AC_CHECK_TYPES([struct option],
+ [:],
+ [ AC_LIBOBJ(getopt_long)],
+ [#include <getopt.h>])],
+ [ AC_LIBOBJ(getopt_long)]
+)
if test "$enable_bsd_getopt" = yes; then
if test "$ac_cv_have_decl_optreset" = no; then
diff -r e1ffde2cea27 -r dbc581774559 pkgtools/libnbcompat/files/nbcompat.h
--- a/pkgtools/libnbcompat/files/nbcompat.h Mon Apr 13 09:09:19 2009 +0000
+++ b/pkgtools/libnbcompat/files/nbcompat.h Mon Apr 13 11:30:46 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nbcompat.h,v 1.42 2008/10/19 21:02:07 joerg Exp $ */
+/* $NetBSD: nbcompat.h,v 1.43 2009/04/13 11:30:46 joerg Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -128,9 +128,7 @@
# include <nbcompat/vis.h>
#endif
-#if HAVE_NBCOMPAT_GETOPT_LONG
-# if HAVE_GETOPT_H
-# undef HAVE_GETOPT_H
-# endif
+#if !HAVE_GETOPT_H || !HAVE_STRUCT_OPTION
+# undef HAVE_GETOPT_H
# include <nbcompat/getopt.h>
#endif
diff -r e1ffde2cea27 -r dbc581774559 pkgtools/libnbcompat/files/nbcompat/config.h.in
--- a/pkgtools/libnbcompat/files/nbcompat/config.h.in Mon Apr 13 09:09:19 2009 +0000
+++ b/pkgtools/libnbcompat/files/nbcompat/config.h.in Mon Apr 13 11:30:46 2009 +0000
@@ -206,9 +206,6 @@
/* Define to 1 if the `fts_*' functions are built into the library. */
#undef HAVE_NBCOMPAT_FTS
-/* 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
@@ -369,6 +366,9 @@
/* Define to 1 if the system has the type `struct in6_addr'. */
#undef HAVE_STRUCT_IN6_ADDR
+/* Define to 1 if the system has the type `struct option'. */
+#undef HAVE_STRUCT_OPTION
+
/* Define to 1 if the system has the type `struct sockaddr_in6'. */
#undef HAVE_STRUCT_SOCKADDR_IN6
Home |
Main Index |
Thread Index |
Old Index