Unbreak autoconf checks with clang by not using nested functions

This commit is contained in:
dcoppa 2017-09-27 10:35:22 +00:00
parent ec16d0bef7
commit 6162be5649
6 changed files with 77 additions and 30 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.47 2017/07/26 22:45:28 sthen Exp $
# $OpenBSD: Makefile,v 1.48 2017/09/27 10:35:22 dcoppa Exp $
COMMENT= UCB/LBNL Network Simulator Version 2
V= 2.35
DISTNAME= ns-src-$V
PKGNAME= ns-$V
REVISION = 2
REVISION = 3
CATEGORIES= net
MAINTAINER = Stuart Cassoff <stwo@users.sourceforge.net>
@ -25,7 +25,9 @@ BUILD_DEPENDS= devel/tclcl
LIB_DEPENDS= lang/otcl \
${MODTK_LIB_DEPENDS}
CONFIGURE_STYLE=gnu
CONFIGURE_STYLE=autoconf no-autoheader
AUTOCONF_VERSION=2.68
CONFIGURE_ARGS= --with-tcl-ver=${MODTCL_VERSION} \
--with-tk-ver=${MODTK_VERSION} \
--with-tcl=${LOCALBASE} \

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-conf_configure_in_TclCL,v 1.1 2017/09/27 10:35:22 dcoppa Exp $
Index: conf/configure.in.TclCL
--- conf/configure.in.TclCL.orig
+++ conf/configure.in.TclCL
@@ -26,6 +26,7 @@ TCLCL_H_PLACES="\
/usr/contrib/include \
/usr/include"
TCLCL_H_PLACES_D="$d \
+ $d/include/tclcl \
$d/include"
TCLCL_LIB_PLACES="\
../tclcl-$TCLCL_VERS \

View File

@ -0,0 +1,33 @@
$OpenBSD: patch-conf_configure_in_nse,v 1.1 2017/09/27 10:35:22 dcoppa Exp $
Index: conf/configure.in.nse
--- conf/configure.in.nse.orig
+++ conf/configure.in.nse
@@ -79,13 +79,10 @@ AC_TRY_COMPILE([
#include <stdio.h>
#include <netinet/tcp.h>
], [
-int main()
-{
struct tcphdr *tcp;
tcp->source= 1;
return 0;
-}
], [
V_DEFINE="$V_DEFINE -DLINUX_TCP_HEADER"
AC_MSG_RESULT(found)
@@ -102,13 +99,10 @@ AC_TRY_COMPILE([
#include <stdio.h>
#include <netinet/tcp.h>
], [
-int main()
-{
struct tcphdr *tcp;
tcp->th_sport= 1;
return 0;
-}
], [
AC_MSG_RESULT(found)
tcphdr=yes

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-conf_configure_in_tcl,v 1.1 2017/09/27 10:35:22 dcoppa Exp $
Index: conf/configure.in.tcl
--- conf/configure.in.tcl.orig
+++ conf/configure.in.tcl
@@ -19,6 +19,7 @@ TCL_OLD_ALT_VERS=`echo $TCL_OLD_VERS | sed 's/\.//'`
dnl These paths are pretty hellish and should probably be pruned.
dnl Also, 64-bit support is just hacked on for the common cases.
TCL_TCL_PLACES_D="$d \
+ $d/lib/tcl/tcl$TCL_VERS \
$d/lib64/tcl$TCL_HI_VERS \
$d/lib64/tcl$TCL_VERS \
$d/lib64/tcl$TCL_ALT_VERS \

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-conf_configure_in_tk,v 1.1 2017/09/27 10:35:22 dcoppa Exp $
Index: conf/configure.in.tk
--- conf/configure.in.tk.orig
+++ conf/configure.in.tk
@@ -19,6 +19,7 @@ TK_OLD_ALT_VERS=`echo $TK_OLD_VERS | sed 's/\.//'`
dnl Also, 64-bit support is just hacked on for the common cases.
TK_TCL_PLACES_D="$d \
+ $d/lib/tcl/tk$TK_VERS \
$d/lib64/tk$TK_VERS \
$d/lib64/tk$TK_ALT_VERS \
$d/lib64/tk$TK_VERS \

View File

@ -1,27 +0,0 @@
$OpenBSD: patch-configure,v 1.4 2012/04/28 18:07:57 stu Exp $
--- configure.orig Fri Nov 4 13:29:46 2011
+++ configure Mon Apr 23 23:04:20 2012
@@ -5463,6 +5463,7 @@ TCL_OLD_VERS=8.4
TCL_OLD_ALT_VERS=`echo $TCL_OLD_VERS | sed 's/\.//'`
TCL_TCL_PLACES_D="$d \
+ $d/lib/tcl/tcl$TCL_VERS \
$d/lib64/tcl$TCL_HI_VERS \
$d/lib64/tcl$TCL_VERS \
$d/lib64/tcl$TCL_ALT_VERS \
@@ -6065,6 +6066,7 @@ TK_OLD_VERS=8.4
TK_OLD_ALT_VERS=`echo $TK_OLD_VERS | sed 's/\.//'`
TK_TCL_PLACES_D="$d \
+ $d/lib/tcl/tk$TK_VERS \
$d/lib64/tk$TK_VERS \
$d/lib64/tk$TK_ALT_VERS \
$d/lib64/tk$TK_VERS \
@@ -6652,6 +6654,7 @@ TCLCL_H_PLACES="\
/usr/contrib/include \
/usr/include"
TCLCL_H_PLACES_D="$d \
+ $d/include/tclcl \
$d/include"
TCLCL_LIB_PLACES="\
../tclcl-$TCLCL_VERS \