mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Bernhard Walle <bernhard@bwalle.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] sitecopy: Fix build on non-Linux hosts
Date: Thu, 19 Jan 2012 19:23:41 +0100	[thread overview]
Message-ID: <1326997421-83223-1-git-send-email-bernhard@bwalle.de> (raw)
In-Reply-To: <201201191017.36329.jbe@pengutronix.de>

The build system of sitecopy uses 'uname' to determine the operating
system for which it compiles sitecopy. However, on non-Linux hosts, this
leads to wrong results.

Fixes Darwin (tested on Mac OS 10.7 Lion).

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
 patches/sitecopy-0.16.6/autoconf-neon-darwin.diff |   44 +++++++++++++++++++++
 patches/sitecopy-0.16.6/autogen.sh                |    1 +
 patches/sitecopy-0.16.6/series                    |    1 +
 3 files changed, 46 insertions(+), 0 deletions(-)
 create mode 100644 patches/sitecopy-0.16.6/autoconf-neon-darwin.diff
 create mode 120000 patches/sitecopy-0.16.6/autogen.sh

diff --git a/patches/sitecopy-0.16.6/autoconf-neon-darwin.diff b/patches/sitecopy-0.16.6/autoconf-neon-darwin.diff
new file mode 100644
index 0000000..245f684
--- /dev/null
+++ b/patches/sitecopy-0.16.6/autoconf-neon-darwin.diff
@@ -0,0 +1,44 @@
+---
+ m4/neon/neon.m4 |   23 +++++++++++------------
+ 1 file changed, 11 insertions(+), 12 deletions(-)
+
+--- a/m4/neon/neon.m4
++++ b/m4/neon/neon.m4
+@@ -410,19 +410,17 @@ fi
+ ])
+ 
+ AC_DEFUN([NE_CHECK_OS], [
+-# Check for Darwin, which needs extra cpp and linker flags.
+-AC_CACHE_CHECK([for uname], ne_cv_os_uname, [
+- ne_cv_os_uname=`uname -s 2>/dev/null`
+-])
+ 
+-if test "$ne_cv_os_uname" = "Darwin"; then
+-  CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
+-  LDFLAGS="$LDFLAGS -flat_namespace" 
+-  # poll has various issues in various Darwin releases
+-  if test x${ac_cv_func_poll+set} != xset; then
+-    ac_cv_func_poll=no
+-  fi
+-fi
++case "$host_os" in
++  darwin*)
++    CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
++    LDFLAGS="$LDFLAGS -flat_namespace"
++    # poll has various issues in various Darwin releases
++    if test x${ac_cv_func_poll+set} != xset; then
++      ac_cv_func_poll=no
++    fi
++    ;;
++esac
+ ])
+ 
+ AC_DEFUN([NEON_COMMON_CHECKS], [
+@@ -431,6 +429,7 @@ AC_DEFUN([NEON_COMMON_CHECKS], [
+ # is used.
+ 
+ AC_REQUIRE([AC_PROG_CC])
++AC_REQUIRE([AC_CANONICAL_SYSTEM])
+ AC_REQUIRE([AC_ISC_POSIX])
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_C_CONST])
diff --git a/patches/sitecopy-0.16.6/autogen.sh b/patches/sitecopy-0.16.6/autogen.sh
new file mode 120000
index 0000000..9f8a4cb
--- /dev/null
+++ b/patches/sitecopy-0.16.6/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/patches/sitecopy-0.16.6/series b/patches/sitecopy-0.16.6/series
index c295b75..f84ad01 100644
--- a/patches/sitecopy-0.16.6/series
+++ b/patches/sitecopy-0.16.6/series
@@ -1 +1,2 @@
 sitecopy-neon-openssl.diff
+autoconf-neon-darwin.diff
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2012-01-19 18:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16 20:27 Bernhard Walle
2012-01-18 10:05 ` Juergen Beisert
2012-01-18 10:08   ` Bernhard Walle
2012-01-18 10:23     ` Juergen Beisert
2012-01-19  7:25       ` Bernhard Walle
2012-01-19  9:17         ` Juergen Beisert
2012-01-19 18:23           ` Bernhard Walle [this message]
2012-01-22 10:49 ` Michael Olbrich
2012-01-22 12:59   ` Bernhard Walle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1326997421-83223-1-git-send-email-bernhard@bwalle.de \
    --to=bernhard@bwalle.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox