pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat Ensure that struct option is defi...
details: https://anonhg.NetBSD.org/pkgsrc/rev/eccbd3e0f91b
branches: trunk
changeset: 460885:eccbd3e0f91b
user: jlam <jlam%pkgsrc.org@localhost>
date: Sat Sep 06 06:13:46 2003 +0000
description:
Ensure that struct option is defined properly before accepting that having
getopt.h implies having getopt_long. Also Fix checks for setmode, pwcache,
and vis so that if any of a list of functions is missing, then use the
nbcompat versions.
diffstat:
pkgtools/libnbcompat/Makefile | 4 +-
pkgtools/libnbcompat/files/configure | 586 +++++++++++++++++++--
pkgtools/libnbcompat/files/configure.ac | 55 +-
pkgtools/libnbcompat/files/nbcompat.h | 6 +-
pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in | 6 +-
5 files changed, 572 insertions(+), 85 deletions(-)
diffs (truncated from 874 to 300 lines):
diff -r 06e9df84b23f -r eccbd3e0f91b pkgtools/libnbcompat/Makefile
--- a/pkgtools/libnbcompat/Makefile Sat Sep 06 05:53:03 2003 +0000
+++ b/pkgtools/libnbcompat/Makefile Sat Sep 06 06:13:46 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2003/09/06 01:39:29 jlam Exp $
+# $NetBSD: Makefile,v 1.23 2003/09/06 06:13:46 jlam Exp $
#
DISTNAME= libnbcompat-20030830
@@ -10,6 +10,8 @@
HOMEPAGE= http://www.NetBSD.org/
COMMENT= Portable NetBSD compatibility library
+PKG_INSTALLATION_TYPES= overwrite pkgviews
+
NO_TOOLS= # defined
NO_BUILDLINK= # defined
NO_PKGTOOLS_REQD_CHECK= # defined
diff -r 06e9df84b23f -r eccbd3e0f91b pkgtools/libnbcompat/files/configure
--- a/pkgtools/libnbcompat/files/configure Sat Sep 06 05:53:03 2003 +0000
+++ b/pkgtools/libnbcompat/files/configure Sat Sep 06 06:13:46 2003 +0000
@@ -3167,9 +3167,8 @@
-
for ac_header in arpa/nameser.h assert.h bind/bitypes.h dirent.h err.h \
- errno.h fcntl.h fts.h getopt.h glob.h inttypes.h libutil.h limits.h \
+ errno.h fcntl.h fts.h glob.h inttypes.h libutil.h limits.h \
machine/endian.h memory.h ndir.h netdb.h netinet/in6_machtypes.h \
paths.h poll.h pwd.h stdint.h stdlib.h stringlist.h strings.h \
string.h sys/bitypes.h sys/byteorder.h sys/cdefs.h sys/dir.h \
@@ -3463,19 +3462,23 @@
done
-pkg_use_nbcompat_vis=yes
-if test "${ac_cv_header_vis_h+set}" = set; then
- echo "$as_me:$LINENO: checking for vis.h" >&5
-echo $ECHO_N "checking for vis.h... $ECHO_C" >&6
-if test "${ac_cv_header_vis_h+set}" = set; then
+pkg_use_nbcompat_getopt_long=yes
+
+for ac_header in getopt.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_vis_h" >&5
-echo "${ECHO_T}$ac_cv_header_vis_h" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
-echo "$as_me:$LINENO: checking vis.h usability" >&5
-echo $ECHO_N "checking vis.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
@@ -3484,7 +3487,7 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#include <vis.h>
+#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -3510,8 +3513,8 @@
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
-echo "$as_me:$LINENO: checking vis.h presence" >&5
-echo $ECHO_N "checking vis.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
@@ -3519,7 +3522,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <vis.h>
+#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -3552,10 +3555,10 @@
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc in
yes:no )
- { echo "$as_me:$LINENO: WARNING: vis.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: vis.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: vis.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: vis.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
(
cat <<\_ASBOX
## ------------------------------------ ##
@@ -3566,12 +3569,12 @@
sed "s/^/$as_me: WARNING: /" >&2
;;
no:yes )
- { echo "$as_me:$LINENO: WARNING: vis.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: vis.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: vis.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: vis.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: vis.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: vis.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
(
cat <<\_ASBOX
## ------------------------------------ ##
@@ -3582,18 +3585,229 @@
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-echo "$as_me:$LINENO: checking for vis.h" >&5
-echo $ECHO_N "checking for vis.h... $ECHO_C" >&6
-if test "${ac_cv_header_vis_h+set}" = set; then
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+
+ echo "$as_me:$LINENO: checking for struct option" >&5
+echo $ECHO_N "checking for struct option... $ECHO_C" >&6
+if test "${pkg_cv_have_struct_option+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 <getopt.h>
+int
+main ()
+{
+ struct option X ;
+ ;
+ 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_have_struct_option=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ pkg_cv_have_struct_option=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $pkg_cv_have_struct_option" >&5
+echo "${ECHO_T}$pkg_cv_have_struct_option" >&6
+ if test "x$pkg_cv_have_struct_option" = "xyes"; then
+ pkg_use_nbcompat_getopt_long=no
+ else
+ pkg_use_nbcompat_getopt_long=yes
+ :
+ fi
+
+
+fi
+
+done
+
+if test $pkg_use_nbcompat_getopt_long = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_NBCOMPAT_GETOPT_LONG 1
+_ACEOF
+
+
+
+ LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
+fi
+
+pkg_use_nbcompat_vis=yes
+
+for ac_header in vis.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_vis_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_vis_h" >&5
-echo "${ECHO_T}$ac_cv_header_vis_h" >&6
-
-fi
-if test $ac_cv_header_vis_h = yes; then
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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. */
+$ac_includes_default
+#include <$ac_header>
+_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_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+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 <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
Home |
Main Index |
Thread Index |
Old Index