diff options
author | Christophe Romain <christophe.romain@process-one.net> | 2009-10-12 12:01:54 +0000 |
---|---|---|
committer | Christophe Romain <christophe.romain@process-one.net> | 2009-10-12 12:01:54 +0000 |
commit | c311ea15059241f3ef3631ff5b0a8c7332be1bdd (patch) | |
tree | bead5a4056aca35f2f83043db142541a7f2a4815 /src/configure.ac | |
parent | return invalid-options on badly formed subscription options (diff) |
autodetect compilation parameters for Mac OS X Snow Leopard (EJAB-1056)
SVN Revision: 2658
Diffstat (limited to 'src/configure.ac')
-rw-r--r-- | src/configure.ac | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/configure.ac b/src/configure.ac index 25adc0529..101baac2f 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -139,4 +139,31 @@ if test "$ENABLEUSER" != ""; then AC_SUBST([INSTALLUSER], [$ENABLEUSER]) fi +AC_CANONICAL_SYSTEM +#AC_DEFINE_UNQUOTED(CPU_VENDOR_OS, "$target") +#AC_SUBST(target_os) + + +case "$target_os" in + *darwin10*) + echo "Target OS is 'Darwin10'" + AC_LANG(Erlang) + AC_RUN_IFELSE( + [AC_LANG_PROGRAM([],[dnl + halt(case erlang:system_info(wordsize) of + 8 -> 0; 4 -> 1 end)])], + [AC_MSG_NOTICE(found 64-bit Erlang) + CBIT=-m64], + [AC_MSG_NOTICE(found 32-bit Erlang) + CBIT=-m32]) + ;; + *) + echo "Target OS is '$target_os'" + CBIT="" + ;; +esac +CFLAGS="$CFLAGS $CBIT" +LD_SHARED="$LD_SHARED $CBIT" +echo "CBIT is set to '$CBIT'" + AC_OUTPUT |