Respect LDFLAGS & fix configure check for libobjc2

clang from ports did pass -L/usr/local/lib to the linker, gcc or clang
from base don't do that, so fix detection.  Note that "gcc" is used at
configure time if available, even if the actual build uses "cc".

Maintainer timeout.
This commit is contained in:
jca 2017-08-03 14:46:33 +00:00
parent 556fe6695f
commit 91e7f7707f
2 changed files with 20 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.13 2017/07/27 09:55:45 sthen Exp $
# $OpenBSD: Makefile,v 1.14 2017/08/03 14:46:33 jca Exp $
COMMENT = LDAP authentication plugin for OpenVPN 2.x
@ -35,10 +35,11 @@ AUTOCONF_VERSION = 2.69
CONFIGURE_STYLE = autoconf
MAKE_FILE = Makefile
CONFIGURE_ARGS += --prefix=${LOCALBASE} \
--with-check=${LOCALBASE} \
CONFIGURE_ARGS = --with-check=${LOCALBASE} \
--with-openldap=${LOCALBASE} \
--with-openvpn=${LOCALBASE}/include/openvpn
CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib ${LDFLAGS}"
SAMPLES_DIR = ${PREFIX}/share/examples/openvpn-auth-ldap

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-platform_m4,v 1.1 2017/08/03 14:46:33 jca Exp $
Don't clobber LDFLAGS.
Index: platform.m4
--- platform.m4.orig
+++ platform.m4
@@ -97,7 +97,7 @@ AC_DEFUN(OD_CONFIG_PLUGIN, [
PLUGIN_LD="${CC} -shared"
PLUGIN_LD_FLAGS=""
PLUGIN_SUFFIX=".so"
- LDFLAGS="-export-dynamic"
+ LDFLAGS="-export-dynamic ${LDFLAGS}"
;;
esac