Unbreak autoconf checks with clang by not using nested functions

with input from sthen@
This commit is contained in:
giovanni 2017-09-26 16:14:07 +00:00
parent e2a3a5abe0
commit 726719ab41
3 changed files with 48 additions and 25 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.66 2017/08/15 11:11:40 sthen Exp $
# $OpenBSD: Makefile,v 1.67 2017/09/26 16:14:07 giovanni Exp $
COMMENT-main= authentication library for courier
COMMENT-ldap= ldap authentication module for courier-authLib
@ -7,7 +7,7 @@ COMMENT-pgsql= pgsql authentication module for courier-authLib
COMMENT-userdb= userdb authentication module for courier-authLib
DISTNAME= courier-authlib-0.68.0
REVISION= 1
REVISION= 2
PKGNAME-main= ${DISTNAME}
PKGNAME-ldap= ${DISTNAME:S/lib-/lib-ldap-/}
PKGNAME-mysql= ${DISTNAME:S/lib-/lib-mysql-/}
@ -38,7 +38,10 @@ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/}
EXTRACT_SUFX= .tar.bz2
USE_GMAKE= Yes
CONFIGURE_STYLE= gnu
AUTOCONF_VERSION= 2.69
# only libs/rfc822/configure.ac is patched
AUTOCONF_DIR= ${WRKSRC}/libs/rfc822
CONFIGURE_STYLE= autoconf
CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib" \
LDFLAGS="-L${LOCALBASE}/lib" \

View File

@ -1,22 +0,0 @@
$OpenBSD: patch-configure,v 1.8 2017/08/04 23:14:32 giovanni Exp $
Index: configure
--- configure.orig
+++ configure
@@ -19658,7 +19658,7 @@ then
$COURIERCONFIG >conftest.out || exit 1
sed -n '/^mail/p' <conftest.out >conftest2.out || exit 1
. ./conftest2.out
- rm -f conftest.out conftest2.out
+ rm -f ./conftest.out ./conftest2.out
cmailuser="$mailuser"
cmailgroup="$mailgroup"
@@ -19670,7 +19670,7 @@ then
$bindir/courierauthconfig --configfiles >conftest.out || exit 1
sed -n '/^mail/p' <conftest.out >conftest2.out || exit 1
. ./conftest2.out
- rm -f conftest.out conftest2.out
+ rm -f ./conftest.out ./conftest2.out
cmailuser="$mailuser"
cmailgroup="$mailgroup"

View File

@ -0,0 +1,42 @@
$OpenBSD: patch-libs_rfc822_configure_ac,v 1.1 2017/09/26 16:14:07 giovanni Exp $
Index: libs/rfc822/configure.ac
--- libs/rfc822/configure.ac.orig
+++ libs/rfc822/configure.ac
@@ -64,23 +64,13 @@ AC_CACHE_CHECK([how to calculate alternate timezone],l
AC_TRY_COMPILE([
#include <time.h>
],[
-int main()
-{
time_t t=altzone;
-
- return (0);
-}
], librfc822_cv_SYS_TIMEZONE=altzone,
AC_TRY_COMPILE([
#include <time.h>
],[
-int main()
-{
int n=daylight;
-
- return (0);
-}
], librfc822_cv_SYS_TIMEZONE=daylight,
AC_TRY_COMPILE([
@@ -88,12 +78,7 @@ int n=daylight;
extern struct tm dummy;
],[
-int main()
-{
long n=dummy.tm_gmtoff;
-
- return (0);
-}
] ,librfc822_cv_SYS_TIMEZONE=tm_gmtoff,
librfc822_cv_SYS_TIMEZONE=unknown
)