From 0a5257b520ae540775367eb20a4db3e76436cdf9 Mon Sep 17 00:00:00 2001 From: Diego Elio 'Flameeyes' Pettenò Date: Fri, 17 Jul 2009 20:41:58 +0200 Subject: Also request Darwin extensions, as they are needed for stuff like NSIG. Without this definition, non-POSIX interfaces (which are needed) are hidden by the _POSIX_C_SOURCE request (for clock_gettime). --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 9b49f23e..18007357 100644 --- a/configure.ac +++ b/configure.ac @@ -76,6 +76,7 @@ case $host in ;; *-*-darwin* ) AC_DEFINE([_POSIX_C_SOURCE], [200112L], [Needed to get clock_gettime on Mac OS X]) + AC_DEFINE([_DARWIN_C_SOURCE], [200112L], [Needed to get NSIG on Mac OS X]) ;; esac -- cgit From 191c57effe385c797d8f226accd9afceee972888 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Fri, 17 Jul 2009 13:45:37 +0200 Subject: make bootstrap.sh aware of Darwin environment Signed-off-by: Daniel Mack --- bootstrap.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index aa9755fa..a5bd9a78 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -40,10 +40,22 @@ run_versioned() { set -ex +case $(uname) in + *Darwin*) + CP_OPTS="-R" + CHMOD_OPTS="" + LIBTOOLIZE="glibtoolize" + ;; + *) + CP_OPTS="-av" + CHMOD_OPTS="-c" + ;; +esac + if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then echo "Activating pre-commit hook." - cp -av .git/hooks/pre-commit.sample .git/hooks/pre-commit - chmod -c +x .git/hooks/pre-commit + cp ${CP_OPTS} .git/hooks/pre-commit.sample .git/hooks/pre-commit + chmod ${CHMOD_OPTS} +x .git/hooks/pre-commit fi if [ -f .tarball-version ]; then -- cgit From 8c85c9999661a57e1bd10e79ad398b812ff4ea87 Mon Sep 17 00:00:00 2001 From: Diego Elio 'Flameeyes' Pettenò Date: Fri, 17 Jul 2009 20:48:44 +0200 Subject: Further simplify on Daniel's patch for bootstrap.sh. Instead of having further indirections, stick to POSIX command options for cp and chmod. This leaves just the LIBTOOL handling to be Darwin-specific. --- bootstrap.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index a5bd9a78..79e0a7dc 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -42,20 +42,14 @@ set -ex case $(uname) in *Darwin*) - CP_OPTS="-R" - CHMOD_OPTS="" LIBTOOLIZE="glibtoolize" ;; - *) - CP_OPTS="-av" - CHMOD_OPTS="-c" - ;; esac if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then echo "Activating pre-commit hook." - cp ${CP_OPTS} .git/hooks/pre-commit.sample .git/hooks/pre-commit - chmod ${CHMOD_OPTS} +x .git/hooks/pre-commit + cp -pv .git/hooks/pre-commit.sample .git/hooks/pre-commit + chmod -v +x .git/hooks/pre-commit fi if [ -f .tarball-version ]; then -- cgit