$OpenBSD: patch-configure,v 1.4 2010/01/07 09:49:21 jakemsr Exp $ --- configure.orig Wed May 23 11:57:45 2007 +++ configure Sat Dec 26 03:23:34 2009 @@ -6,8 +6,8 @@ my $prefix = "/usr/local"; my $package = "eboard"; my $version = "1.0.4"; my $cxx = "g++"; -my @cxxflags = ("-O6"); -my @ldflags = ("-lpthread"); +my @cxxflags = (); +my @ldflags = ("-pthread"); my @libs = (); my $configh = "config.h"; my $configmake = "config.make"; @@ -236,7 +236,7 @@ sub append_flags { my $x = shift @_; my @y; - @y = split(/:/, $x); + @y = split(/\s+/, $x); for (@y) { push @cxxflags, "$_"; } @@ -264,7 +264,7 @@ sub macro_check { my $hdr = shift @_; my $mac = shift @_; my $chn = shift @_; - my $program = "#include <$hdr>\n#if !defined($mac)\n#error not there\n#endif\n"; + my $program = "#include \n#include <$hdr>\n#if !defined($mac)\n#error not there\n#endif\n"; print "checking for $mac in $hdr... "; if (!open(TESTCC,">test.cc")) { @@ -342,6 +342,8 @@ sub header_check { print "$y"; if ($bsdbug != 0) { $program = "#include \n#include \n#include \n#include \n#include <$z>\nint main() { return 0; }\n"; + } elsif ($z == "sys/audioio.h") { + $program = "#include \n#include <$z>\nint main() { return 0; }\n"; } else { $program = "#include <$z>\nint main() { return 0; }\n"; } @@ -512,6 +514,10 @@ if (!header_check("stdio.h","stdlib.h","string.h","uni #optional headers header_check("strings.h","sys/soundcard.h","sys/audioio.h","linux/joystick.h"); +if (header_check("sndio.h")) { + append_libs("sndio"); +} + $t1=macro_check("netinet/in.h","IPPROTO_TCP","HAVE_IPPROTO_TCP_ON_IN_H"); $t2=macro_check("netinet/in.h","TCP_NODELAY","HAVE_TCP_NODELAY_ON_IN_H"); $t3=macro_check("netinet/in.h","SOL_TCP","HAVE_SOL_TCP_ON_IN_H"); @@ -536,7 +542,7 @@ if ($t2 != 0) { print "netinet/tcp.h not required, SOL_TCP present.\n"; } } else { - if ($t5 != 0 && ($t1!=0 || $t4!=0) && ($t3!=0 || $t6!=0) ) { + if ($t5 != 0 && ($t1!=0 || $t4!=0 || $t3!=0 || $t6!=0) ) { cppdef("NEED_TCP_H"); cppdef("USE_SOCK_OPTS"); if ($t1!=0 || $t4!=0) {