diff --git a/autogen.sh b/autogen.sh index 79bcea881..06abcdf17 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,10 @@ #!/bin/sh -bs_dir="$(dirname $(readlink -f $0))" +# bs_dir="$(dirname $(readlink -f $0))" +if [ "$(uname -s)" = 'Linux' ]; then + bs_dir=$(dirname "$(readlink -f "$0" || echo "$(echo "$0" | sed -e 's,\\,/,g')")") +else + bs_dir=$(dirname "$(readlink "$0" || echo "$(echo "$0" | sed -e 's,\\,/,g')")") +fi #Some versions of libtoolize don't like there being no ltmain.sh file already touch "${bs_dir}"/ltmain.sh diff --git a/util.c b/util.c index c525b3d29..c154624b5 100644 --- a/util.c +++ b/util.c @@ -989,7 +989,7 @@ void cgtimer_sub(cgtimer_t *a, cgtimer_t *b, cgtimer_t *res) } #endif /* WIN32 */ -#ifdef CLOCK_MONOTONIC /* Essentially just linux */ +#if defined(CLOCK_MONOTONIC) && !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(WIN32) /* Essentially just linux */ void cgtimer_time(cgtimer_t *ts_start) { clock_gettime(CLOCK_MONOTONIC, ts_start);