X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=aclocal.m4;h=3e673f92b825f45dcfd6d843bf0f5a4c040b1a02;hb=94a113df234ef20ec3718a3d9285d238c1dff615;hp=c50d3481daafe08b575fd91c17d917d5088129ac;hpb=6bb8d64a971afce310df3349e8767b790c2845ee;p=ghc-hetmet.git diff --git a/aclocal.m4 b/aclocal.m4 index c50d348..3e673f9 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -24,6 +24,14 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS], ;; esac + case $$1 in + i386-apple-darwin|x86_64-apple-darwin) + # We support back to OS X 10.5 + $2="$$2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5" + $3="$$3 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5" + ;; + esac + # If gcc knows about the stack protector, turn it off. # Otherwise the stack-smash handler gets triggered. echo 'int main(void) {return 0;}' > conftest.c @@ -31,7 +39,25 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS], then $2="$$2 -fno-stack-protector" fi - rm conftest.c conftest.o + rm -f conftest.c conftest.o +]) + + +# FP_VISIBILITY_HIDDEN +# ---------------------------------- +# Is the visibility hidden attribute supported? +AC_DEFUN([FP_VISIBILITY_HIDDEN], +[ + AC_MSG_CHECKING([whether __attribute__((visibility("hidden"))) is supported]) + echo '__attribute__((visibility("hidden"))) void foo(void) {}' > conftest.c + if $CC -Wall -Werror -c conftest.c > /dev/null 2>&1 + then + AC_MSG_RESULT([yes]) + AC_DEFINE(HAS_VISIBILITY_HIDDEN, 1, [Has visibility hidden]) + else + AC_MSG_RESULT([no]) + fi + rm -f conftest.c conftest.o ])