Unbreak build if there are more than one version of a shared library around.

From naddy@ a long time ago
This commit is contained in:
wilfried 2004-12-22 08:59:47 +00:00
parent 169e7ada84
commit e7bcf59b0c
3 changed files with 33 additions and 53 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.7 2004/08/10 09:14:47 xsa Exp $
# $OpenBSD: Makefile,v 1.8 2004/12/22 08:59:47 wilfried Exp $
COMMENT= "GNU awk"
@ -19,8 +19,12 @@ MASTER_SITES= ${MASTER_SITE_GNU:=gawk/}
MODULES= devel/gettext
CONFIGURE_STYLE= gnu
CONFIGURE_STYLE= autoconf
AUTOCONF_VERSION= 2.57
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
pre-build:
@touch -r ${WRKSRC}/test/Makefile.am ${WRKSRC}/test/Maketests
.include <bsd.port.mk>

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-aclocal_m4,v 1.1 2004/12/22 08:59:47 wilfried Exp $
--- aclocal.m4.orig Tue Oct 5 19:47:27 2004
+++ aclocal.m4 Tue Oct 5 19:48:42 2004
@@ -2170,9 +2170,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
found_so=
found_a=
if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ if test -n "$shlibext" && test "`echo $additional_libdir/lib$name.$shlibext*`" != "$additional_libdir/lib$name.$shlibext*"; then
found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
+ found_so="-l$name"
if test -f "$additional_libdir/lib$name.la"; then
found_la="$additional_libdir/lib$name.la"
fi
@@ -2192,9 +2192,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ if test -n "$shlibext" && test "`echo $dir/lib$name.$shlibext*`" != "$dir/lib$name.$shlibext*"; then
found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
+ found_so="-l$name"
if test -f "$dir/lib$name.la"; then
found_la="$dir/lib$name.la"
fi

View File

@ -1,51 +0,0 @@
$OpenBSD: patch-configure,v 1.1 2003/04/02 08:37:48 wilfried Exp $
--- configure.orig Sun Mar 16 11:25:37 2003
+++ configure Wed Apr 2 10:17:42 2003
@@ -6461,9 +6461,9 @@ fi;
found_so=
found_a=
if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"*; then
found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
+ found_so="-l$name"
if test -f "$additional_libdir/lib$name.la"; then
found_la="$additional_libdir/lib$name.la"
fi
@@ -6491,9 +6491,9 @@ fi;
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"*; then
found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
+ found_so="-l$name"
if test -f "$dir/lib$name.la"; then
found_la="$dir/lib$name.la"
fi
@@ -7593,9 +7593,9 @@ fi;
found_so=
found_a=
if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"*; then
found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
+ found_so="-l$name"
if test -f "$additional_libdir/lib$name.la"; then
found_la="$additional_libdir/lib$name.la"
fi
@@ -7623,9 +7623,9 @@ fi;
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"*; then
found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
+ found_so="-l$name"
if test -f "$dir/lib$name.la"; then
found_la="$dir/lib$name.la"
fi