summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2003-09-16 16:48:22 +0000
committergrant <grant@pkgsrc.org>2003-09-16 16:48:22 +0000
commitb55c2bb5b15696d013b4e6c1b693a89ac3bd16e8 (patch)
treef9d10e8ffcf775b3a78d56f3f50253e9c0d6f8ca /pkgtools
parent85e2f8afb196d2faa16b609fb0a0902110e545ac (diff)
downloadpkgsrc-b55c2bb5b15696d013b4e6c1b693a89ac3bd16e8.tar.gz
test that md5.h can be compiled and that it provides MD5Init(),
otherwise, pretend we don't have it. fixes build on some RedHat systems where md5.h is incompatible with NetBSD's. bump to 20030916.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/libnbcompat/Makefile4
-rwxr-xr-xpkgtools/libnbcompat/files/configure227
-rw-r--r--pkgtools/libnbcompat/files/configure.ac23
-rw-r--r--pkgtools/libnbcompat/files/nbcompat.h8
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/config.h.in3
5 files changed, 251 insertions, 14 deletions
diff --git a/pkgtools/libnbcompat/Makefile b/pkgtools/libnbcompat/Makefile
index 4863a79a0c2..80ee4b57873 100644
--- a/pkgtools/libnbcompat/Makefile
+++ b/pkgtools/libnbcompat/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.25 2003/09/14 07:36:12 grant Exp $
+# $NetBSD: Makefile,v 1.26 2003/09/16 16:48:22 grant Exp $
#
-DISTNAME= libnbcompat-20030914
+DISTNAME= libnbcompat-20030916
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/libnbcompat/files/configure b/pkgtools/libnbcompat/files/configure
index 169929d2786..8b344366f38 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 20030914.
+# Generated by GNU Autoconf 2.57 for libnbcompat 20030916.
#
# 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='20030914'
-PACKAGE_STRING='libnbcompat 20030914'
+PACKAGE_VERSION='20030916'
+PACKAGE_STRING='libnbcompat 20030916'
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 20030914 to adapt to many kinds of systems.
+\`configure' configures libnbcompat 20030916 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 20030914:";;
+ short | recursive ) echo "Configuration of libnbcompat 20030916:";;
esac
cat <<\_ACEOF
@@ -923,7 +923,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-libnbcompat configure 20030914
+libnbcompat configure 20030916
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 20030914, which was
+It was created by libnbcompat $as_me 20030916, which was
generated by GNU Autoconf 2.57. Invocation command line was
$ $0 $@
@@ -3464,6 +3464,215 @@ fi
done
+pkg_use_nbcompat_md5=yes
+
+for ac_header in md5.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: `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
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { 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
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { 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
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+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 MD5Init in md5.h" >&5
+echo $ECHO_N "checking for MD5Init in md5.h... $ECHO_C" >&6
+if test "${pkg_cv_have_md5init+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 <md5.h>
+int
+main ()
+{
+ MD5_CTX *f; MD5Init(f); ;
+ ;
+ 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_md5init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ pkg_cv_have_md5init=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $pkg_cv_have_md5init" >&5
+echo "${ECHO_T}$pkg_cv_have_md5init" >&6
+ if test "x$pkg_cv_have_md5init" = "xyes"; then
+ pkg_use_nbcompat_md5=no
+ else
+ pkg_use_nbcompat_md5=yes
+ :
+ fi
+
+
+fi
+
+done
+
+
+if test $pkg_use_nbcompat_md5 = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_NBCOMPAT_MD5INIT 1
+_ACEOF
+
+
+
+fi
+
pkg_use_nbcompat_getopt_long=yes
for ac_header in getopt.h
@@ -8488,7 +8697,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by libnbcompat $as_me 20030914, which was
+This file was extended by libnbcompat $as_me 20030916, which was
generated by GNU Autoconf 2.57. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8548,7 +8757,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-libnbcompat config.status 20030914
+libnbcompat config.status 20030916
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 bcf79251283..f0d45d50482 100644
--- a/pkgtools/libnbcompat/files/configure.ac
+++ b/pkgtools/libnbcompat/files/configure.ac
@@ -1,8 +1,8 @@
-dnl $NetBSD: configure.ac,v 1.29 2003/09/14 07:36:15 grant Exp $
+dnl $NetBSD: configure.ac,v 1.30 2003/09/16 16:48:25 grant Exp $
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
-AC_INIT([libnbcompat], [20030914], [grant@NetBSD.org])
+AC_INIT([libnbcompat], [20030916], [grant@NetBSD.org])
AC_CONFIG_HEADER(nbcompat/config.h)
AC_ARG_PROGRAM
@@ -45,6 +45,25 @@ AC_CHECK_HEADERS([arpa/nameser.h assert.h bind/bitypes.h dirent.h err.h \
AC_CHECK_HEADERS([md5.h rmd160.h sha1.h])
+pkg_use_nbcompat_md5=yes
+AC_CHECK_HEADERS([md5.h], [
+ AC_MSG_TRY_COMPILE([for MD5Init in md5.h], pkg_cv_have_md5init,
+ [ #include <sys/types.h>
+ #include <md5.h> ],
+ [ MD5_CTX *f; MD5Init(f); ],
+ pkg_use_nbcompat_md5=no,
+ pkg_use_nbcompat_md5=yes,
+ )
+])
+
+if test $pkg_use_nbcompat_md5 = yes; then
+ AC_DEFINE(HAVE_NBCOMPAT_MD5INIT)
+ AH_TEMPLATE([HAVE_NBCOMPAT_MD5INIT], [
+ Define to 1 if the `MD5Init' function is built into the
+ library.
+ ])
+fi
+
pkg_use_nbcompat_getopt_long=yes
AC_CHECK_HEADERS([getopt.h], [
AC_MSG_TRY_COMPILE([for struct option], pkg_cv_have_struct_option,
diff --git a/pkgtools/libnbcompat/files/nbcompat.h b/pkgtools/libnbcompat/files/nbcompat.h
index fb3315e9bb0..59af3b90f37 100644
--- a/pkgtools/libnbcompat/files/nbcompat.h
+++ b/pkgtools/libnbcompat/files/nbcompat.h
@@ -1,4 +1,4 @@
-/* $NetBSD: nbcompat.h,v 1.23 2003/09/14 14:24:12 grant Exp $ */
+/* $NetBSD: nbcompat.h,v 1.24 2003/09/16 16:48:25 grant Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -324,6 +324,12 @@ void tputs(const char *, int, int (*)(int));
# include <libutil.h>
#endif
+#if HAVE_NBCOMPAT_MD5INIT
+# if HAVE_MD5_H
+# undef HAVE_MD5_H
+# endif
+#endif
+
#if HAVE_MD5_H
# include <md5.h>
#else
diff --git a/pkgtools/libnbcompat/files/nbcompat/config.h.in b/pkgtools/libnbcompat/files/nbcompat/config.h.in
index dff1197e838..7751f12cb39 100644
--- a/pkgtools/libnbcompat/files/nbcompat/config.h.in
+++ b/pkgtools/libnbcompat/files/nbcompat/config.h.in
@@ -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 `MD5Init' function is built into the library. */
+#undef HAVE_NBCOMPAT_MD5INIT
+
/* Define to 1 if the `statfs' function is built into the library. */
#undef HAVE_NBCOMPAT_STATFS