fix build

tested on i386 (heko) and sparc (naddy)
rc2 cipher is broken on sparc, all others work
This commit is contained in:
avsm 2001-10-13 22:56:24 +00:00
parent d62f7b9c61
commit 89e0cd956d
2 changed files with 66 additions and 17 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.10 2001/07/06 09:27:04 avsm Exp $
# $OpenBSD: Makefile,v 1.11 2001/10/13 22:56:24 avsm Exp $
COMMENT= "interface to access block/stream encryption algorithms"
@ -11,8 +11,8 @@ MASTER_SITES= ftp://mcrypt.hellug.gr/pub/mcrypt/libmcrypt/ \
HOMEPAGE= http://mcrypt.hellug.gr/lib/
MAINTAINER= Anil Madhavapeddy <avsm@openbsd.org>
LIB_DEPENDS= mhash.2::security/mhash
USE_LIBTOOL= Yes
LIB_DEPENDS= mhash.2::security/mhash \
ltdl.1::devel/libtool
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes

View File

@ -1,17 +1,34 @@
$OpenBSD: patch-aclocal_m4,v 1.1 2001/06/12 16:05:15 avsm Exp $
--- aclocal.m4.orig Tue Jun 12 16:15:04 2001
+++ aclocal.m4 Tue Jun 12 16:20:44 2001
@@ -1269,6 +1269,9 @@ cygwin* | mingw* | pw32* )
$OpenBSD: patch-aclocal_m4,v 1.2 2001/10/13 22:56:24 avsm Exp $
--- aclocal.m4.orig Sat Oct 13 19:24:31 2001
+++ aclocal.m4 Sat Oct 13 19:27:23 2001
@@ -866,7 +866,14 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ case "$host_os" in
+ openbsd*)
+ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+ ;;
+ *)
+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ ;;
+ esac
fi
# Allow CC to be a program name with arguments.
@@ -1269,7 +1276,9 @@ cygwin* | mingw* | pw32* )
with_gnu_ld=no
fi
;;
-
+openbsd*)
+ with_gnu_ld=no
+ ;;
esac
@@ -1673,10 +1676,21 @@ else
ld_shlibs=yes
@@ -1673,10 +1682,24 @@ else
;;
openbsd*)
@ -19,19 +36,51 @@ $OpenBSD: patch-aclocal_m4,v 1.1 2001/06/12 16:05:15 avsm Exp $
- hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
+ case "$host_os" in
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then
+ export_dynamic_flag_spec='${wl}-E'
+ fi
+ ;;
+ esac
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
+ ;;
+ esac
+ fi
;;
os2*)
@@ -2150,9 +2173,25 @@ newsos6)
openbsd*)
version_type=sunos
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- need_version=no
+ need_lib_prefix=no
+ need_version=no
+ sys_lib_search_path_spec="/usr/lib"
+ sys_lib_dlsearch_path_spec="/usr/lib /usr/local/lib"
+ file_magic_cmd=/usr/bin/file
+ file_magic_test_file=`echo /usr/lib/libc.so.*`
+ if test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ case "$host_os" in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ deplibs_check_method='file_magic OpenBSD.* shared library'
+ shlibpath_overrides_runpath=yes
fi
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'