aboutsummaryrefslogtreecommitdiff
path: root/src/configure.ac
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2009-10-12 12:01:54 +0000
committerChristophe Romain <christophe.romain@process-one.net>2009-10-12 12:01:54 +0000
commitc311ea15059241f3ef3631ff5b0a8c7332be1bdd (patch)
treebead5a4056aca35f2f83043db142541a7f2a4815 /src/configure.ac
parentreturn 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.ac27
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