diff options
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 |